diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 41a1b410e6ce..c007a73393a2 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:411589ea6aca20f400adb0291a11fb9f12bf3f968ff7e5ec1d2a2eb1800ea5d1 + digest: sha256:4875b2142cb4325542ba4f3175a81921c4b2b8256db012b220e3ca9637b34154 # created: 2023-01-20T00:00:00.000000000Z diff --git a/.github/requirements.txt b/.github/requirements.txt index 970684c64b74..ffc8736a1f3c 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -20,7 +20,7 @@ requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 +urllib3==1.26.18 \ + --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ + --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 # via requests diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index d0a534c44a10..356d2e23b796 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -16,6 +16,8 @@ branchProtectionRules: - lint - OwlBot Post Processor - 'Kokoro - Test: Integration' + - 'Kokoro - Test: Java GraalVM Native Image' + - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: 1.0.x isAdminEnforced: true requiredApprovingReviewCount: 1 diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index c7d3777c95b4..a8b10c050cf9 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -23,7 +23,7 @@ google_api_core==2.8.2 google-cloud-storage==2.0.0 google-cloud-core==2.3.1 typing-extensions==4.1.1 -urllib3==1.26.12 +urllib3==1.26.18 zipp==3.6.0 rsa==4.9 six==1.16.0 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index c43502f9b934..e8ca43c8599b 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -436,9 +436,9 @@ typing-extensions==4.1.1 \ --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 +urllib3==1.26.18 \ + --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ + --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 # via # -r requirements.in # requests diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e9e21f7821da..c41415c5ecac 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.22.0" + ".": "1.23.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a080050d5038..ff521bea2dd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,66 @@ # Changelog +## [1.23.0](https://github.com/googleapis/google-cloud-java/compare/v1.22.0...v1.23.0) (2023-10-25) + + +### ⚠ BREAKING CHANGES + +* [analyticsadmin] delete `BatchDeleteUserLinks`, `DeleteUserLink`, `BatchUpdateUserLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alph... ([#9982](https://github.com/googleapis/google-cloud-java/issues/9982)) +* [merchantapi] non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed ([#9981](https://github.com/googleapis/google-cloud-java/issues/9981)) +* Destination enum is wrapped in a message +* Update go_package and Go importpath: +* `destination` field in the `product_performance_view` table is renamed to `marketing_method` +* `destination` term in the `product_view` table is renamed to `reporting_context` +* `predicted_gross_profit_change_fraction` and `predicted_monthly_gross_profit_change` fields are removed from the `price_insights_product_view` table +* `ReportGranularity`, `RelativeDemand`, `RelativeDemandChangeType`, `TrafficSource` enums are wrapped into messages +* Destination enum is wrapped in a message +* Update go_package and Go importpath: + +### Features + +* [batch] expose display_name to batch v1 API ([#9967](https://github.com/googleapis/google-cloud-java/issues/9967)) ([934c929](https://github.com/googleapis/google-cloud-java/commit/934c92940ec76f96aa71b13249a81cde58bab5ee)) +* [clouddeploy] added platform log RolloutUpdateEvent ([#9979](https://github.com/googleapis/google-cloud-java/issues/9979)) ([ebdc309](https://github.com/googleapis/google-cloud-java/commit/ebdc30925e4bf247ede4f393fb268eaa8706eac0)) +* [cloudoptimization] added the route modifiers ([#9963](https://github.com/googleapis/google-cloud-java/issues/9963)) ([1f558b0](https://github.com/googleapis/google-cloud-java/commit/1f558b06a7564d843148fb7a10be94df9d61578f)) +* [discoveryengine] add v1alpha public library for discoveryengine ([#9953](https://github.com/googleapis/google-cloud-java/issues/9953)) ([f4b2dda](https://github.com/googleapis/google-cloud-java/commit/f4b2dda909a384ffcbe55b1498fe4e0259d09bcf)) +* [merchantapi] `channel` field is added to the `product_view` table ([#9956](https://github.com/googleapis/google-cloud-java/issues/9956)) ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* [merchantapi] Channel enum is added ([#9957](https://github.com/googleapis/google-cloud-java/issues/9957)) ([9135abe](https://github.com/googleapis/google-cloud-java/commit/9135abe92be0639bde65a98709cd9d9df6385ae7)) +* [redis-cluster] new module for redis-cluster ([#9993](https://github.com/googleapis/google-cloud-java/issues/9993)) ([c280a9c](https://github.com/googleapis/google-cloud-java/commit/c280a9cf2c26e45dfabb60d45318fe40cd67a88a)) +* [securitycenter] Add SimulateSecurityHealthAnalyticsCustomModule API for testing SHA custom module ([#9980](https://github.com/googleapis/google-cloud-java/issues/9980)) ([84afb01](https://github.com/googleapis/google-cloud-java/commit/84afb01dd57588ca316e852143b433d2e1c7fd81)) +* A new message `MarketingMethod` is added ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* Channel enum is added ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* ReportingContext enum is added ([9135abe](https://github.com/googleapis/google-cloud-java/commit/9135abe92be0639bde65a98709cd9d9df6385ae7)) +* ReportingContext enum is added ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) + + +### Bug Fixes + +* [analyticsadmin] delete `BatchDeleteUserLinks`, `DeleteUserLink`, `BatchUpdateUserLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alph... ([#9982](https://github.com/googleapis/google-cloud-java/issues/9982)) ([75d2527](https://github.com/googleapis/google-cloud-java/commit/75d252766bdf96a47ac40e3ccca2ddcbbb930a11)) +* [merchantapi] non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed ([#9981](https://github.com/googleapis/google-cloud-java/issues/9981)) ([f242404](https://github.com/googleapis/google-cloud-java/commit/f242404af5d3a84b84bfd57937a06f9cbb99674c)) +* `destination` field in the `product_performance_view` table is renamed to `marketing_method` ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* `destination` term in the `product_view` table is renamed to `reporting_context` ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* `predicted_gross_profit_change_fraction` and `predicted_monthly_gross_profit_change` fields are removed from the `price_insights_product_view` table ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* `ReportGranularity`, `RelativeDemand`, `RelativeDemandChangeType`, `TrafficSource` enums are wrapped into messages ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* convert java-talent integration test to v4 ([#9948](https://github.com/googleapis/google-cloud-java/issues/9948)) ([91c76e0](https://github.com/googleapis/google-cloud-java/commit/91c76e0429ee18cb517d757a06653a64ab904e62)) +* **deps:** update dependency com.google.apis:google-api-services-cloudresourcemanager to v1-rev20231022-2.0.0 ([#9990](https://github.com/googleapis/google-cloud-java/issues/9990)) ([89dd580](https://github.com/googleapis/google-cloud-java/commit/89dd580c90ae8f710d8a0491ca141cc36c2b7d14)) +* **deps:** update dependency com.google.apis:google-api-services-storage to v1-rev20231012-2.0.0 ([#9965](https://github.com/googleapis/google-cloud-java/issues/9965)) ([6accd08](https://github.com/googleapis/google-cloud-java/commit/6accd08c5db92e367973d580bd2764f3a08ca1da)) +* **deps:** update dependency com.google.cloud:google-cloud-pubsub-bom to v1.125.6 ([#9954](https://github.com/googleapis/google-cloud-java/issues/9954)) ([7104b86](https://github.com/googleapis/google-cloud-java/commit/7104b86b9154e46fa00705c4442047f1dc6ce311)) +* **deps:** update dependency com.google.cloud:google-cloud-pubsub-bom to v1.125.7 ([#9971](https://github.com/googleapis/google-cloud-java/issues/9971)) ([52b9c23](https://github.com/googleapis/google-cloud-java/commit/52b9c237df8d1c01619a09ad0bb99a7d0bb68313)) +* **deps:** update dependency com.google.cloud:google-cloud-pubsub-bom to v1.125.8 ([#9987](https://github.com/googleapis/google-cloud-java/issues/9987)) ([81180df](https://github.com/googleapis/google-cloud-java/commit/81180df3f6d135417a3072f24c42fc142edb4eec)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) +* **deps:** update dependency com.google.cloud:google-cloud-storage to v2.28.0 ([#9959](https://github.com/googleapis/google-cloud-java/issues/9959)) ([0d8d17e](https://github.com/googleapis/google-cloud-java/commit/0d8d17ef1bab873be8f6b34f3c6364d5d18d1198)) +* **deps:** update dependency com.google.cloud:google-cloud-storage to v2.29.0 ([#9988](https://github.com/googleapis/google-cloud-java/issues/9988)) ([82fb240](https://github.com/googleapis/google-cloud-java/commit/82fb24020f6fa3b1572b8bd6d44839981cc47043)) +* Destination enum is wrapped in a message ([9135abe](https://github.com/googleapis/google-cloud-java/commit/9135abe92be0639bde65a98709cd9d9df6385ae7)) +* Destination enum is wrapped in a message ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* lenient vision face annotation results ([#9947](https://github.com/googleapis/google-cloud-java/issues/9947)) ([b12f226](https://github.com/googleapis/google-cloud-java/commit/b12f226051bfc264b6f498aaed48ecca18f50196)) +* Update go_package and Go importpath: ([9135abe](https://github.com/googleapis/google-cloud-java/commit/9135abe92be0639bde65a98709cd9d9df6385ae7)) +* Update go_package and Go importpath: ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) + + +### Documentation + +* [documentai] minor clarification on fields related to page range ([#9955](https://github.com/googleapis/google-cloud-java/issues/9955)) ([ff54c9f](https://github.com/googleapis/google-cloud-java/commit/ff54c9fc8293782dc10af0622ea79f41dbcb007b)) + ## [1.22.0](https://github.com/googleapis/google-cloud-java/compare/v1.21.0...v1.22.0) (2023-10-11) diff --git a/README.md b/README.md index b96af0e3ba07..a8cf05b1da4d 100644 --- a/README.md +++ b/README.md @@ -168,8 +168,8 @@ Libraries are available on GitHub and Maven Central for developing Java applicat | [Logging Servlet Initializer](https://github.com/googleapis/java-logging-servlet-initializer) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-logging-servlet-initializer.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-logging-servlet-initializer&core=gav) | | [Maps Platform Datasets API](https://github.com/googleapis/google-cloud-java/tree/main/java-maps-mapsplatformdatasets) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.maps/google-maps-mapsplatformdatasets.svg)](https://search.maven.org/search?q=g:com.google.maps%20AND%20a:google-maps-mapsplatformdatasets&core=gav) | | [Media Translation API](https://github.com/googleapis/google-cloud-java/tree/main/java-mediatranslation) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-mediatranslation.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-mediatranslation&core=gav) | -| [Merchant API](https://github.com/googleapis/google-cloud-java/tree/main/java-shopping-merchant-reports) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-reports.svg)](https://search.maven.org/search?q=g:com.google.shopping%20AND%20a:google-shopping-merchant-reports&core=gav) | | [Merchant API](https://github.com/googleapis/google-cloud-java/tree/main/java-shopping-merchant-inventories) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-inventories.svg)](https://search.maven.org/search?q=g:com.google.shopping%20AND%20a:google-shopping-merchant-inventories&core=gav) | +| [Merchant API](https://github.com/googleapis/google-cloud-java/tree/main/java-shopping-merchant-reports) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-reports.svg)](https://search.maven.org/search?q=g:com.google.shopping%20AND%20a:google-shopping-merchant-reports&core=gav) | | [Migration Center API](https://github.com/googleapis/google-cloud-java/tree/main/java-migrationcenter) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-migrationcenter.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-migrationcenter&core=gav) | | [Monitoring Metrics Scopes](https://github.com/googleapis/google-cloud-java/tree/main/java-monitoring-metricsscope) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-monitoring-metricsscope.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-monitoring-metricsscope&core=gav) | | [NIO Filesystem Provider for Storage](https://github.com/googleapis/java-storage-nio) | [![preview][preview-stability]][preview-description] | [![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-nio.svg)](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-nio&core=gav) | diff --git a/changelog.json b/changelog.json index 54313386407e..90d490ec3a19 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,300 @@ { "repository": "googleapis/google-cloud-java", "entries": [ + { + "changes": [ + { + "type": "fix", + "sha": "b12f226051bfc264b6f498aaed48ecca18f50196", + "message": "lenient vision face annotation results", + "issues": [ + "9947" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-vision", + "id": "15e433a1-7226-4045-b525-51735771c218", + "createTime": "2023-10-25T03:09:16.122Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "91c76e0429ee18cb517d757a06653a64ab904e62", + "message": "convert java-talent integration test to v4", + "issues": [ + "9948" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-talent", + "id": "fab0a5c1-e788-42f0-a84a-cebc7ae6f102", + "createTime": "2023-10-25T03:09:16.073Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "1f558b06a7564d843148fb7a10be94df9d61578f", + "message": "[cloudoptimization] added the route modifiers", + "issues": [ + "9963" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-optimization", + "id": "9824b455-9da8-4457-bdfe-c198f6a265d9", + "createTime": "2023-10-25T03:09:16.069Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "934c92940ec76f96aa71b13249a81cde58bab5ee", + "message": "[batch] expose display_name to batch v1 API", + "issues": [ + "9967" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-batch", + "id": "941a8f32-9abd-480d-9d1a-857e6d2102c5", + "createTime": "2023-10-25T03:09:16.059Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "9135abe92be0639bde65a98709cd9d9df6385ae7", + "message": "ReportingContext enum is added", + "issues": [] + }, + { + "type": "fix", + "sha": "9135abe92be0639bde65a98709cd9d9df6385ae7", + "message": "Destination enum is wrapped in a message", + "issues": [], + "breakingChangeNote": "Destination enum is wrapped in a message" + }, + { + "type": "fix", + "sha": "9135abe92be0639bde65a98709cd9d9df6385ae7", + "message": "Update go_package and Go importpath:", + "issues": [], + "breakingChangeNote": "Update go_package and Go importpath:" + }, + { + "type": "feat", + "sha": "9135abe92be0639bde65a98709cd9d9df6385ae7", + "message": "[merchantapi] Channel enum is added", + "issues": [ + "9957" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.shopping:google-shopping-merchant-inventories", + "id": "55a79d9a-f8c3-4575-baa3-150f6a53682b", + "createTime": "2023-10-25T03:09:16.054Z" + }, + { + "changes": [ + { + "type": "docs", + "sha": "ff54c9fc8293782dc10af0622ea79f41dbcb007b", + "message": "[documentai] minor clarification on fields related to page range", + "issues": [ + "9955" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-document-ai", + "id": "bfd1e4ee-b182-4023-9144-8d98763c4270", + "createTime": "2023-10-25T03:09:16.050Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f4b2dda909a384ffcbe55b1498fe4e0259d09bcf", + "message": "[discoveryengine] add v1alpha public library for discoveryengine", + "issues": [ + "9953" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-discoveryengine", + "id": "609d4f85-7bbe-49e2-b763-7fd3c45914a7", + "createTime": "2023-10-25T03:09:16.027Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "84afb01dd57588ca316e852143b433d2e1c7fd81", + "message": "[securitycenter] Add SimulateSecurityHealthAnalyticsCustomModule API for testing SHA custom module", + "issues": [ + "9980" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-securitycenter", + "id": "eb8bf57e-7971-487a-b074-8d70f19ced54", + "createTime": "2023-10-25T03:09:15.946Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ebdc30925e4bf247ede4f393fb268eaa8706eac0", + "message": "[clouddeploy] added platform log RolloutUpdateEvent", + "issues": [ + "9979" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-deploy", + "id": "aa10fb7b-da70-4ed4-82c0-8da1288ba1d9", + "createTime": "2023-10-25T03:09:15.934Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "f242404af5d3a84b84bfd57937a06f9cbb99674c", + "message": "[merchantapi] non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed", + "issues": [ + "9981" + ], + "breakingChangeNote": "[merchantapi] non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed ([#9981](https://github.com/googleapis/google-cloud-java/issues/9981))" + }, + { + "type": "feat", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "A new message `MarketingMethod` is added", + "issues": [] + }, + { + "type": "fix", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "`destination` field in the `product_performance_view` table is renamed to `marketing_method`", + "issues": [], + "breakingChangeNote": "`destination` field in the `product_performance_view` table is renamed to `marketing_method`" + }, + { + "type": "fix", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "`destination` term in the `product_view` table is renamed to `reporting_context`", + "issues": [], + "breakingChangeNote": "`destination` term in the `product_view` table is renamed to `reporting_context`" + }, + { + "type": "fix", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "`predicted_gross_profit_change_fraction` and `predicted_monthly_gross_profit_change` fields are removed from the `price_insights_product_view` table", + "issues": [], + "breakingChangeNote": "`predicted_gross_profit_change_fraction` and `predicted_monthly_gross_profit_change` fields are removed from the `price_insights_product_view` table" + }, + { + "type": "fix", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "`ReportGranularity`, `RelativeDemand`, `RelativeDemandChangeType`, `TrafficSource` enums are wrapped into messages", + "issues": [], + "breakingChangeNote": "`ReportGranularity`, `RelativeDemand`, `RelativeDemandChangeType`, `TrafficSource` enums are wrapped into messages" + }, + { + "type": "feat", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "Channel enum is added", + "issues": [] + }, + { + "type": "feat", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "ReportingContext enum is added", + "issues": [] + }, + { + "type": "fix", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "Destination enum is wrapped in a message", + "issues": [], + "breakingChangeNote": "Destination enum is wrapped in a message" + }, + { + "type": "fix", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "Update go_package and Go importpath:", + "issues": [], + "breakingChangeNote": "Update go_package and Go importpath:" + }, + { + "type": "feat", + "sha": "2a8403b4c948f315911384c46c74d33afcb2eb65", + "message": "[merchantapi] `channel` field is added to the `product_view` table", + "issues": [ + "9956" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.shopping:google-shopping-merchant-reports", + "id": "97c35fee-0af0-475d-a2a0-d7222940b155", + "createTime": "2023-10-25T03:09:15.922Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "75d252766bdf96a47ac40e3ccca2ddcbbb930a11", + "message": "[analyticsadmin] delete `BatchDeleteUserLinks`, `DeleteUserLink`, `BatchUpdateUserLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alph...", + "issues": [ + "9982" + ], + "breakingChangeNote": "[analyticsadmin] delete `BatchDeleteUserLinks`, `DeleteUserLink`, `BatchUpdateUserLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alph... ([#9982](https://github.com/googleapis/google-cloud-java/issues/9982))" + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.analytics:google-analytics-admin", + "id": "5c825026-d443-4de1-9297-7ff325d921db", + "createTime": "2023-10-25T03:09:15.835Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c280a9cf2c26e45dfabb60d45318fe40cd67a88a", + "message": "[redis-cluster] new module for redis-cluster", + "issues": [ + "9993" + ] + } + ], + "version": "1.23.0", + "language": "JAVA", + "artifactName": "com.google.cloud:google-cloud-redis-cluster", + "id": "033914c7-f597-4435-b862-7de7b1f24219", + "createTime": "2023-10-25T03:09:15.823Z" + }, { "changes": [ { @@ -12143,5 +12437,5 @@ "createTime": "2023-02-03T16:27:23.198Z" } ], - "updateTime": "2023-10-11T13:41:33.030Z" + "updateTime": "2023-10-25T03:09:16.122Z" } \ No newline at end of file diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 583273fb890b..681958e00ff6 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -4,7 +4,7 @@ com.google.cloud gapic-libraries-bom pom - 1.22.0 + 1.23.0 Google Cloud Java BOM BOM for the libraries in google-cloud-java repository. Users should not @@ -15,7 +15,7 @@ google-cloud-pom-parent com.google.cloud - 1.22.0 + 1.23.0 ../google-cloud-pom-parent/pom.xml @@ -24,1088 +24,1095 @@ com.google.cloud google-cloud-accessapproval-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-identity-accesscontextmanager-bom - 1.29.0 + 1.30.0 pom import com.google.cloud google-cloud-advisorynotifications-bom - 0.17.0 + 0.18.0 pom import com.google.cloud google-cloud-aiplatform-bom - 3.29.0 + 3.30.0 pom import com.google.cloud google-cloud-alloydb-connectors-bom - 0.6.0 + 0.7.0 pom import com.google.cloud google-cloud-alloydb-bom - 0.17.0 + 0.18.0 pom import com.google.analytics google-analytics-admin-bom - 0.38.0 + 0.39.0 pom import com.google.analytics google-analytics-data-bom - 0.39.0 + 0.40.0 pom import com.google.cloud google-cloud-analyticshub-bom - 0.25.0 + 0.26.0 pom import com.google.cloud google-cloud-api-gateway-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-apigee-connect-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-apigee-registry-bom - 0.28.0 + 0.29.0 pom import com.google.cloud google-cloud-apikeys-bom - 0.26.0 + 0.27.0 pom import com.google.cloud google-cloud-appengine-admin-bom - 2.28.0 + 2.29.0 pom import com.google.area120 google-area120-tables-bom - 0.32.0 + 0.33.0 pom import com.google.cloud google-cloud-artifact-registry-bom - 1.27.0 + 1.28.0 pom import com.google.cloud google-cloud-asset-bom - 3.32.0 + 3.33.0 pom import com.google.cloud google-cloud-assured-workloads-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-automl-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-bare-metal-solution-bom - 0.28.0 + 0.29.0 pom import com.google.cloud google-cloud-batch-bom - 0.28.0 + 0.29.0 pom import com.google.cloud google-cloud-beyondcorp-appconnections-bom - 0.26.0 + 0.27.0 pom import com.google.cloud google-cloud-beyondcorp-appconnectors-bom - 0.26.0 + 0.27.0 pom import com.google.cloud google-cloud-beyondcorp-appgateways-bom - 0.26.0 + 0.27.0 pom import com.google.cloud google-cloud-beyondcorp-clientconnectorservices-bom - 0.26.0 + 0.27.0 pom import com.google.cloud google-cloud-beyondcorp-clientgateways-bom - 0.26.0 + 0.27.0 pom import com.google.cloud google-cloud-biglake-bom - 0.16.0 + 0.17.0 pom import com.google.cloud google-cloud-bigqueryconnection-bom - 2.30.0 + 2.31.0 pom import com.google.cloud google-cloud-bigquery-data-exchange-bom - 2.23.0 + 2.24.0 pom import com.google.cloud google-cloud-bigquerydatapolicy-bom - 0.25.0 + 0.26.0 pom import com.google.cloud google-cloud-bigquerydatatransfer-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-bigquerymigration-bom - 0.31.0 + 0.32.0 pom import com.google.cloud google-cloud-bigqueryreservation-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-billingbudgets-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-billing-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-binary-authorization-bom - 1.27.0 + 1.28.0 pom import com.google.cloud google-cloud-certificate-manager-bom - 0.31.0 + 0.32.0 pom import com.google.cloud google-cloud-channel-bom - 3.32.0 + 3.33.0 pom import com.google.cloud google-cloud-build-bom - 3.30.0 + 3.31.0 pom import com.google.cloud google-cloud-cloudcommerceconsumerprocurement-bom - 0.26.0 + 0.27.0 pom import com.google.cloud google-cloud-cloudsupport-bom - 0.12.0 + 0.13.0 pom import com.google.cloud google-cloud-compute-bom - 1.38.0 + 1.39.0 pom import com.google.cloud google-cloud-confidentialcomputing-bom - 0.14.0 + 0.15.0 pom import com.google.cloud google-cloud-contact-center-insights-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-containeranalysis-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-container-bom - 2.31.0 + 2.32.0 pom import com.google.cloud google-cloud-contentwarehouse-bom - 0.24.0 + 0.25.0 pom import com.google.cloud google-cloud-datacatalog-bom - 1.34.0 + 1.35.0 pom import com.google.cloud google-cloud-dataflow-bom - 0.32.0 + 0.33.0 pom import com.google.cloud google-cloud-dataform-bom - 0.27.0 + 0.28.0 pom import com.google.cloud google-cloud-data-fusion-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-datalabeling-bom - 0.148.0 + 0.149.0 pom import com.google.cloud google-cloud-datalineage-bom - 0.20.0 + 0.21.0 pom import com.google.cloud google-cloud-dataplex-bom - 1.26.0 + 1.27.0 pom import com.google.cloud google-cloud-dataproc-bom - 4.25.0 + 4.26.0 pom import com.google.cloud google-cloud-dataproc-metastore-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-datastream-bom - 1.27.0 + 1.28.0 pom import com.google.cloud google-cloud-debugger-client-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-deploy-bom - 1.26.0 + 1.27.0 pom import com.google.cloud google-cloud-dialogflow-cx-bom - 0.39.0 + 0.40.0 pom import com.google.cloud google-cloud-dialogflow-bom - 4.34.0 + 4.35.0 pom import com.google.cloud google-cloud-discoveryengine-bom - 0.24.0 + 0.25.0 pom import com.google.cloud google-cloud-distributedcloudedge-bom - 0.25.0 + 0.26.0 pom import com.google.cloud google-cloud-dlp-bom - 3.32.0 + 3.33.0 pom import com.google.cloud google-cloud-dms-bom - 2.27.0 + 2.28.0 pom import com.google.cloud google-cloud-document-ai-bom - 2.32.0 + 2.33.0 pom import com.google.cloud google-cloud-domains-bom - 1.25.0 + 1.26.0 pom import com.google.cloud google-cloud-enterpriseknowledgegraph-bom - 0.24.0 + 0.25.0 pom import com.google.cloud google-cloud-errorreporting-bom - 0.149.0-beta + 0.150.0-beta pom import com.google.cloud google-cloud-essential-contacts-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-eventarc-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-eventarc-publishing-bom - 0.28.0 + 0.29.0 pom import com.google.cloud google-cloud-filestore-bom - 1.29.0 + 1.30.0 pom import com.google.cloud google-cloud-functions-bom - 2.30.0 + 2.31.0 pom import com.google.cloud google-cloud-gke-backup-bom - 0.27.0 + 0.28.0 pom import com.google.cloud google-cloud-gke-connect-gateway-bom - 0.29.0 + 0.30.0 pom import com.google.cloud google-cloud-gkehub-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-gke-multi-cloud-bom - 0.27.0 + 0.28.0 pom import com.google.cloud google-cloud-gsuite-addons-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-iam-admin-bom - 3.23.0 + 3.24.0 pom import com.google.cloud google-cloud-iamcredentials-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-iam-policy-bom - 1.26.0 + 1.27.0 pom import com.google.cloud google-cloud-ids-bom - 1.27.0 + 1.28.0 pom import com.google.cloud google-cloud-infra-manager-bom - 0.5.0 + 0.6.0 pom import com.google.cloud google-cloud-iot-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-kms-bom - 2.31.0 + 2.32.0 pom import com.google.cloud google-cloud-kmsinventory-bom - 0.17.0 + 0.18.0 pom import com.google.cloud google-cloud-language-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-life-sciences-bom - 0.30.0 + 0.31.0 pom import com.google.cloud google-cloud-managed-identities-bom - 1.26.0 + 1.27.0 pom import com.google.cloud google-cloud-mediatranslation-bom - 0.34.0 + 0.35.0 pom import com.google.cloud google-cloud-memcache-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-migrationcenter-bom - 0.10.0 + 0.11.0 pom import com.google.cloud google-cloud-monitoring-dashboard-bom - 2.30.0 + 2.31.0 pom import com.google.cloud google-cloud-monitoring-bom - 3.29.0 + 3.30.0 pom import com.google.cloud google-cloud-monitoring-metricsscope-bom - 0.22.0 + 0.23.0 pom import com.google.cloud google-cloud-netapp-bom - 0.7.0 + 0.8.0 pom import com.google.cloud google-cloud-networkconnectivity-bom - 1.27.0 + 1.28.0 pom import com.google.cloud google-cloud-network-management-bom - 1.29.0 + 1.30.0 pom import com.google.cloud google-cloud-network-security-bom - 0.31.0 + 0.32.0 pom import com.google.cloud google-cloud-notebooks-bom - 1.26.0 + 1.27.0 pom import com.google.cloud google-cloud-optimization-bom - 1.26.0 + 1.27.0 pom import com.google.cloud google-cloud-orchestration-airflow-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-orgpolicy-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-os-config-bom - 2.30.0 + 2.31.0 pom import com.google.cloud google-cloud-os-login-bom - 2.27.0 + 2.28.0 pom import com.google.cloud google-cloud-phishingprotection-bom - 0.59.0 + 0.60.0 pom import com.google.cloud google-cloud-policysimulator-bom - 0.7.0 + 0.8.0 pom import com.google.cloud google-cloud-policy-troubleshooter-bom - 1.27.0 + 1.28.0 pom import com.google.cloud google-cloud-private-catalog-bom - 0.30.0 + 0.31.0 pom import com.google.cloud google-cloud-profiler-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-publicca-bom - 0.25.0 + 0.26.0 pom import com.google.cloud google-cloud-rapidmigrationassessment-bom - 0.11.0 + 0.12.0 pom import com.google.cloud google-cloud-recaptchaenterprise-bom - 3.25.0 + 3.26.0 pom import com.google.cloud google-cloud-recommendations-ai-bom - 0.35.0 + 0.36.0 pom import com.google.cloud google-cloud-recommender-bom - 2.30.0 + 2.31.0 + pom + import + + + com.google.cloud + google-cloud-redis-cluster-bom + 0.1.0 pom import com.google.cloud google-cloud-redis-bom - 2.31.0 + 2.32.0 pom import com.google.cloud google-cloud-resourcemanager-bom - 1.30.0 + 1.31.0 pom import com.google.cloud google-cloud-resource-settings-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-retail-bom - 2.30.0 + 2.31.0 pom import com.google.cloud google-cloud-run-bom - 0.28.0 + 0.29.0 pom import com.google.cloud google-cloud-scheduler-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-secretmanager-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-securitycenter-bom - 2.36.0 + 2.37.0 pom import com.google.cloud google-cloud-securitycenter-settings-bom - 0.31.0 + 0.32.0 pom import com.google.cloud google-cloud-security-private-ca-bom - 2.30.0 + 2.31.0 pom import com.google.cloud google-cloud-service-control-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-servicedirectory-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-service-management-bom - 3.26.0 + 3.27.0 pom import com.google.cloud google-cloud-service-usage-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-shell-bom - 2.27.0 + 2.28.0 pom import com.google.cloud google-cloud-speech-bom - 4.23.0 + 4.24.0 pom import com.google.cloud google-cloud-storageinsights-bom - 0.13.0 + 0.14.0 pom import com.google.cloud google-cloud-storage-transfer-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-talent-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-tasks-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-texttospeech-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-tpu-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-trace-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-translate-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-video-intelligence-bom - 2.27.0 + 2.28.0 pom import com.google.cloud google-cloud-live-stream-bom - 0.30.0 + 0.31.0 pom import com.google.cloud google-cloud-video-stitcher-bom - 0.28.0 + 0.29.0 pom import com.google.cloud google-cloud-video-transcoder-bom - 1.27.0 + 1.28.0 pom import com.google.cloud google-cloud-vision-bom - 3.26.0 + 3.27.0 pom import com.google.cloud google-cloud-vmmigration-bom - 1.28.0 + 1.29.0 pom import com.google.cloud google-cloud-vmwareengine-bom - 0.22.0 + 0.23.0 pom import com.google.cloud google-cloud-vpcaccess-bom - 2.29.0 + 2.30.0 pom import com.google.cloud google-cloud-webrisk-bom - 2.27.0 + 2.28.0 pom import com.google.cloud google-cloud-websecurityscanner-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-workflow-executions-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-workflows-bom - 2.28.0 + 2.29.0 pom import com.google.cloud google-cloud-workstations-bom - 0.16.0 + 0.17.0 pom import com.google.cloud google-cloud-dns - 2.26.0 + 2.27.0 io.grafeas grafeas - 2.29.0 + 2.30.0 com.google.cloud google-cloud-notification - 0.146.0-beta + 0.147.0-beta diff --git a/google-cloud-jar-parent/pom.xml b/google-cloud-jar-parent/pom.xml index 05013cce4a49..c6b8814f5479 100644 --- a/google-cloud-jar-parent/pom.xml +++ b/google-cloud-jar-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-jar-parent com.google.cloud - 1.22.0 + 1.23.0 pom Google Cloud JAR Parent @@ -15,7 +15,7 @@ com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../google-cloud-pom-parent/pom.xml @@ -27,7 +27,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.17.0 + 3.18.0 pom import @@ -39,14 +39,14 @@ com.google.cloud google-cloud-pubsub-bom - 1.125.4 + 1.125.8 pom import com.google.cloud google-cloud-storage - 2.27.1 + 2.29.0 com.google.apis @@ -61,12 +61,12 @@ com.google.apis google-api-services-cloudresourcemanager - v1-rev20230806-2.0.0 + v1-rev20231022-2.0.0 com.google.apis google-api-services-storage - v1-rev20230926-2.0.0 + v1-rev20231012-2.0.0 @@ -164,7 +164,7 @@ org.jacoco jacoco-maven-plugin - 0.8.10 + 0.8.11 diff --git a/google-cloud-pom-parent/pom.xml b/google-cloud-pom-parent/pom.xml index ab66993d5e1c..734b9f1e4e94 100644 --- a/google-cloud-pom-parent/pom.xml +++ b/google-cloud-pom-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-pom-parent com.google.cloud - 1.22.0 + 1.23.0 pom Google Cloud POM Parent https://github.com/googleapis/google-cloud-java @@ -15,7 +15,7 @@ com.google.cloud google-cloud-shared-config - 1.5.8 + 1.6.0 diff --git a/java-accessapproval/CHANGELOG.md b/java-accessapproval/CHANGELOG.md index 401c49ba52ba..91509cc80944 100644 --- a/java-accessapproval/CHANGELOG.md +++ b/java-accessapproval/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-accessapproval/README.md b/java-accessapproval/README.md index 9dc3dd031a71..d9f50a74380b 100644 --- a/java-accessapproval/README.md +++ b/java-accessapproval/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-accessapproval - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-accessapproval:2.29.0' +implementation 'com.google.cloud:google-cloud-accessapproval:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-accessapproval" % "2.30.0" ``` diff --git a/java-accessapproval/google-cloud-accessapproval-bom/pom.xml b/java-accessapproval/google-cloud-accessapproval-bom/pom.xml index dd9ccf6ac3a0..b85f563397cf 100644 --- a/java-accessapproval/google-cloud-accessapproval-bom/pom.xml +++ b/java-accessapproval/google-cloud-accessapproval-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-accessapproval-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-accessapproval - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-accessapproval-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-accessapproval-v1 - 2.29.0 + 2.30.0 diff --git a/java-accessapproval/google-cloud-accessapproval/pom.xml b/java-accessapproval/google-cloud-accessapproval/pom.xml index 1d602ba03314..2a80f71c217f 100644 --- a/java-accessapproval/google-cloud-accessapproval/pom.xml +++ b/java-accessapproval/google-cloud-accessapproval/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-accessapproval - 2.29.0 + 2.30.0 jar Google Cloud Access Approval Java idiomatic client for Google Cloud accessapproval com.google.cloud google-cloud-accessapproval-parent - 2.29.0 + 2.30.0 google-cloud-accessapproval diff --git a/java-accessapproval/grpc-google-cloud-accessapproval-v1/pom.xml b/java-accessapproval/grpc-google-cloud-accessapproval-v1/pom.xml index 294b04b692e5..a1927df2581f 100644 --- a/java-accessapproval/grpc-google-cloud-accessapproval-v1/pom.xml +++ b/java-accessapproval/grpc-google-cloud-accessapproval-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-accessapproval-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-accessapproval-v1 GRPC library for grpc-google-cloud-accessapproval-v1 com.google.cloud google-cloud-accessapproval-parent - 2.29.0 + 2.30.0 diff --git a/java-accessapproval/pom.xml b/java-accessapproval/pom.xml index c3698aa5a99b..ee564b797651 100644 --- a/java-accessapproval/pom.xml +++ b/java-accessapproval/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-accessapproval-parent pom - 2.29.0 + 2.30.0 Google Cloud Access Approval Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-accessapproval-v1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-accessapproval-v1 - 2.29.0 + 2.30.0 com.google.cloud google-cloud-accessapproval - 2.29.0 + 2.30.0 diff --git a/java-accessapproval/proto-google-cloud-accessapproval-v1/pom.xml b/java-accessapproval/proto-google-cloud-accessapproval-v1/pom.xml index e832c47fcf91..d7757e7e9ddc 100644 --- a/java-accessapproval/proto-google-cloud-accessapproval-v1/pom.xml +++ b/java-accessapproval/proto-google-cloud-accessapproval-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-accessapproval-v1 - 2.29.0 + 2.30.0 proto-google-cloud-accessapproval-v1beta1 PROTO library for proto-google-cloud-accessapproval-v1 com.google.cloud google-cloud-accessapproval-parent - 2.29.0 + 2.30.0 diff --git a/java-accesscontextmanager/CHANGELOG.md b/java-accesscontextmanager/CHANGELOG.md index 763f74091369..85b7e0f157ce 100644 --- a/java-accesscontextmanager/CHANGELOG.md +++ b/java-accesscontextmanager/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.29.0 (2023-10-11) ### Dependencies diff --git a/java-accesscontextmanager/README.md b/java-accesscontextmanager/README.md index bacbed700f3b..2388d63ed05e 100644 --- a/java-accesscontextmanager/README.md +++ b/java-accesscontextmanager/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-identity-accesscontextmanager - 1.29.0 + 1.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-identity-accesscontextmanager:1.29.0' +implementation 'com.google.cloud:google-identity-accesscontextmanager:1.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-identity-accesscontextmanager" % "1.29.0" +libraryDependencies += "com.google.cloud" % "google-identity-accesscontextmanager" % "1.30.0" ``` diff --git a/java-accesscontextmanager/google-identity-accesscontextmanager-bom/pom.xml b/java-accesscontextmanager/google-identity-accesscontextmanager-bom/pom.xml index 02dcec89d8e5..627fd7037fc1 100644 --- a/java-accesscontextmanager/google-identity-accesscontextmanager-bom/pom.xml +++ b/java-accesscontextmanager/google-identity-accesscontextmanager-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-identity-accesscontextmanager-bom - 1.29.0 + 1.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,22 +27,22 @@ com.google.cloud google-identity-accesscontextmanager - 1.29.0 + 1.30.0 com.google.api.grpc grpc-google-identity-accesscontextmanager-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-identity-accesscontextmanager-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-identity-accesscontextmanager-type - 1.29.0 + 1.30.0 diff --git a/java-accesscontextmanager/google-identity-accesscontextmanager/pom.xml b/java-accesscontextmanager/google-identity-accesscontextmanager/pom.xml index de4dc452e0b5..ab3efa93a77b 100644 --- a/java-accesscontextmanager/google-identity-accesscontextmanager/pom.xml +++ b/java-accesscontextmanager/google-identity-accesscontextmanager/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-identity-accesscontextmanager - 1.29.0 + 1.30.0 jar Google Identity Access Context Manager Identity Access Context Manager n/a com.google.cloud google-identity-accesscontextmanager-parent - 1.29.0 + 1.30.0 google-identity-accesscontextmanager diff --git a/java-accesscontextmanager/grpc-google-identity-accesscontextmanager-v1/pom.xml b/java-accesscontextmanager/grpc-google-identity-accesscontextmanager-v1/pom.xml index f11a14733967..eb1d51ca3ea1 100644 --- a/java-accesscontextmanager/grpc-google-identity-accesscontextmanager-v1/pom.xml +++ b/java-accesscontextmanager/grpc-google-identity-accesscontextmanager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-identity-accesscontextmanager-v1 - 1.29.0 + 1.30.0 grpc-google-identity-accesscontextmanager-v1 GRPC library for google-identity-accesscontextmanager com.google.cloud google-identity-accesscontextmanager-parent - 1.29.0 + 1.30.0 diff --git a/java-accesscontextmanager/pom.xml b/java-accesscontextmanager/pom.xml index a3c30a1bb543..b3a800528cd1 100644 --- a/java-accesscontextmanager/pom.xml +++ b/java-accesscontextmanager/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-identity-accesscontextmanager-parent pom - 1.29.0 + 1.30.0 Google Identity Access Context Manager Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -30,22 +30,22 @@ com.google.api.grpc proto-google-identity-accesscontextmanager-type - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-identity-accesscontextmanager-v1 - 1.29.0 + 1.30.0 com.google.api.grpc grpc-google-identity-accesscontextmanager-v1 - 1.29.0 + 1.30.0 com.google.cloud google-identity-accesscontextmanager - 1.29.0 + 1.30.0 diff --git a/java-accesscontextmanager/proto-google-identity-accesscontextmanager-type/pom.xml b/java-accesscontextmanager/proto-google-identity-accesscontextmanager-type/pom.xml index 1599cb22132d..e5211836dc34 100644 --- a/java-accesscontextmanager/proto-google-identity-accesscontextmanager-type/pom.xml +++ b/java-accesscontextmanager/proto-google-identity-accesscontextmanager-type/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-identity-accesscontextmanager-type - 1.29.0 + 1.30.0 proto-google-identity-accesscontextmanager-type PROTO library for proto-google-identity-accesscontextmanager-type com.google.cloud google-identity-accesscontextmanager-parent - 1.29.0 + 1.30.0 diff --git a/java-accesscontextmanager/proto-google-identity-accesscontextmanager-v1/pom.xml b/java-accesscontextmanager/proto-google-identity-accesscontextmanager-v1/pom.xml index 50f178ba5956..298e62ed3887 100644 --- a/java-accesscontextmanager/proto-google-identity-accesscontextmanager-v1/pom.xml +++ b/java-accesscontextmanager/proto-google-identity-accesscontextmanager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-identity-accesscontextmanager-v1 - 1.29.0 + 1.30.0 proto-google-identity-accesscontextmanager-v1 PROTO library for proto-google-identity-accesscontextmanager-v1 com.google.cloud google-identity-accesscontextmanager-parent - 1.29.0 + 1.30.0 @@ -37,7 +37,7 @@ com.google.api.grpc proto-google-identity-accesscontextmanager-type - 1.29.0 + 1.30.0 diff --git a/java-advisorynotifications/CHANGELOG.md b/java-advisorynotifications/CHANGELOG.md index 7e0a30ce3b2e..b76fad8aa0e2 100644 --- a/java-advisorynotifications/CHANGELOG.md +++ b/java-advisorynotifications/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.18.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.17.0 (2023-10-11) ### Dependencies diff --git a/java-advisorynotifications/README.md b/java-advisorynotifications/README.md index 8bf1cc1b5f2f..1a29f251241a 100644 --- a/java-advisorynotifications/README.md +++ b/java-advisorynotifications/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-advisorynotifications - 0.17.0 + 0.18.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-advisorynotifications:0.17.0' +implementation 'com.google.cloud:google-cloud-advisorynotifications:0.18.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-advisorynotifications" % "0.17.0" +libraryDependencies += "com.google.cloud" % "google-cloud-advisorynotifications" % "0.18.0" ``` diff --git a/java-advisorynotifications/google-cloud-advisorynotifications-bom/pom.xml b/java-advisorynotifications/google-cloud-advisorynotifications-bom/pom.xml index ac50d7788d98..12a33b41dcd0 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications-bom/pom.xml +++ b/java-advisorynotifications/google-cloud-advisorynotifications-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-advisorynotifications-bom - 0.17.0 + 0.18.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-advisorynotifications - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-advisorynotifications-v1 - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-advisorynotifications-v1 - 0.17.0 + 0.18.0 diff --git a/java-advisorynotifications/google-cloud-advisorynotifications/pom.xml b/java-advisorynotifications/google-cloud-advisorynotifications/pom.xml index 30a39eaf3221..927cc7589df6 100644 --- a/java-advisorynotifications/google-cloud-advisorynotifications/pom.xml +++ b/java-advisorynotifications/google-cloud-advisorynotifications/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-advisorynotifications - 0.17.0 + 0.18.0 jar Google Advisory Notifications API Advisory Notifications API An API for accessing Advisory Notifications in Google Cloud. com.google.cloud google-cloud-advisorynotifications-parent - 0.17.0 + 0.18.0 google-cloud-advisorynotifications diff --git a/java-advisorynotifications/grpc-google-cloud-advisorynotifications-v1/pom.xml b/java-advisorynotifications/grpc-google-cloud-advisorynotifications-v1/pom.xml index 9d2350b5e6b1..744ad6440a74 100644 --- a/java-advisorynotifications/grpc-google-cloud-advisorynotifications-v1/pom.xml +++ b/java-advisorynotifications/grpc-google-cloud-advisorynotifications-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-advisorynotifications-v1 - 0.17.0 + 0.18.0 grpc-google-cloud-advisorynotifications-v1 GRPC library for google-cloud-advisorynotifications com.google.cloud google-cloud-advisorynotifications-parent - 0.17.0 + 0.18.0 diff --git a/java-advisorynotifications/pom.xml b/java-advisorynotifications/pom.xml index 0947f7534d53..08548ec34c3f 100644 --- a/java-advisorynotifications/pom.xml +++ b/java-advisorynotifications/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-advisorynotifications-parent pom - 0.17.0 + 0.18.0 Google Advisory Notifications API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-advisorynotifications - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-advisorynotifications-v1 - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-advisorynotifications-v1 - 0.17.0 + 0.18.0 diff --git a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/pom.xml b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/pom.xml index 10ed591287e8..3fd3ff1469bd 100644 --- a/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/pom.xml +++ b/java-advisorynotifications/proto-google-cloud-advisorynotifications-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-advisorynotifications-v1 - 0.17.0 + 0.18.0 proto-google-cloud-advisorynotifications-v1 Proto library for google-cloud-advisorynotifications com.google.cloud google-cloud-advisorynotifications-parent - 0.17.0 + 0.18.0 diff --git a/java-aiplatform/CHANGELOG.md b/java-aiplatform/CHANGELOG.md index f8f18293dd66..60299096d820 100644 --- a/java-aiplatform/CHANGELOG.md +++ b/java-aiplatform/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.29.0 (2023-10-11) ### Features diff --git a/java-aiplatform/README.md b/java-aiplatform/README.md index d95701325143..26727094aaeb 100644 --- a/java-aiplatform/README.md +++ b/java-aiplatform/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-aiplatform - 3.29.0 + 3.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-aiplatform:3.29.0' +implementation 'com.google.cloud:google-cloud-aiplatform:3.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "3.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-aiplatform" % "3.30.0" ``` diff --git a/java-aiplatform/google-cloud-aiplatform-bom/pom.xml b/java-aiplatform/google-cloud-aiplatform-bom/pom.xml index 9e00776fcb4e..f7d2794a0a75 100644 --- a/java-aiplatform/google-cloud-aiplatform-bom/pom.xml +++ b/java-aiplatform/google-cloud-aiplatform-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-aiplatform-bom - 3.29.0 + 3.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-aiplatform - 3.29.0 + 3.30.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.29.0 + 3.30.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.45.0 + 0.46.0 com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.29.0 + 3.30.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.45.0 + 0.46.0 diff --git a/java-aiplatform/google-cloud-aiplatform/pom.xml b/java-aiplatform/google-cloud-aiplatform/pom.xml index e3fdc31c154f..2478aa6b6900 100644 --- a/java-aiplatform/google-cloud-aiplatform/pom.xml +++ b/java-aiplatform/google-cloud-aiplatform/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-aiplatform - 3.29.0 + 3.30.0 jar Google Cloud Vertex AI Java client for Google Cloud Vertex AI services. com.google.cloud google-cloud-aiplatform-parent - 3.29.0 + 3.30.0 google-cloud-aiplatform diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/pom.xml b/java-aiplatform/grpc-google-cloud-aiplatform-v1/pom.xml index 978d3b4729ab..f4109bdc22d0 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1/pom.xml +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.29.0 + 3.30.0 grpc-google-cloud-aiplatform-v1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.29.0 + 3.30.0 diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/pom.xml b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/pom.xml index 9a89cd4bfe46..bd2d200c0f25 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/pom.xml +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.45.0 + 0.46.0 grpc-google-cloud-aiplatform-v1beta1 GRPC library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.29.0 + 3.30.0 diff --git a/java-aiplatform/pom.xml b/java-aiplatform/pom.xml index 8745248da7be..3051e2e0579c 100644 --- a/java-aiplatform/pom.xml +++ b/java-aiplatform/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-aiplatform-parent pom - 3.29.0 + 3.30.0 Google Cloud Vertex AI Parent Java client for Google Cloud Vertex AI services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-aiplatform - 3.29.0 + 3.30.0 com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.29.0 + 3.30.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.45.0 + 0.46.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1 - 3.29.0 + 3.30.0 com.google.api.grpc grpc-google-cloud-aiplatform-v1beta1 - 0.45.0 + 0.46.0 diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/pom.xml b/java-aiplatform/proto-google-cloud-aiplatform-v1/pom.xml index 14256927f865..6fdd2d46b298 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/pom.xml +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-aiplatform-v1 - 3.29.0 + 3.30.0 proto-google-cloud-aiplatform-v1 Proto library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.29.0 + 3.30.0 diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/pom.xml b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/pom.xml index 7323f3c50364..478227f1ae11 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/pom.xml +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-aiplatform-v1beta1 - 0.45.0 + 0.46.0 proto-google-cloud-aiplatform-v1beta1 Proto library for google-cloud-aiplatform com.google.cloud google-cloud-aiplatform-parent - 3.29.0 + 3.30.0 diff --git a/java-alloydb-connectors/CHANGELOG.md b/java-alloydb-connectors/CHANGELOG.md index fbd4010463e7..75c61468b2bd 100644 --- a/java-alloydb-connectors/CHANGELOG.md +++ b/java-alloydb-connectors/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.7.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.6.0 (2023-10-11) ### Dependencies diff --git a/java-alloydb-connectors/README.md b/java-alloydb-connectors/README.md index 0f2824584ebc..b27deec6450d 100644 --- a/java-alloydb-connectors/README.md +++ b/java-alloydb-connectors/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-alloydb-connectors - 0.6.0 + 0.7.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-alloydb-connectors:0.6.0' +implementation 'com.google.cloud:google-cloud-alloydb-connectors:0.7.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-alloydb-connectors" % "0.6.0" +libraryDependencies += "com.google.cloud" % "google-cloud-alloydb-connectors" % "0.7.0" ``` diff --git a/java-alloydb-connectors/google-cloud-alloydb-connectors-bom/pom.xml b/java-alloydb-connectors/google-cloud-alloydb-connectors-bom/pom.xml index 3124cb692234..01545eeceb8c 100644 --- a/java-alloydb-connectors/google-cloud-alloydb-connectors-bom/pom.xml +++ b/java-alloydb-connectors/google-cloud-alloydb-connectors-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-alloydb-connectors-bom - 0.6.0 + 0.7.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,22 +27,22 @@ com.google.cloud google-cloud-alloydb-connectors - 0.6.0 + 0.7.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1alpha - 0.6.0 + 0.7.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1beta - 0.6.0 + 0.7.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1 - 0.6.0 + 0.7.0 diff --git a/java-alloydb-connectors/google-cloud-alloydb-connectors/pom.xml b/java-alloydb-connectors/google-cloud-alloydb-connectors/pom.xml index c86bc5611d65..510a634cb407 100644 --- a/java-alloydb-connectors/google-cloud-alloydb-connectors/pom.xml +++ b/java-alloydb-connectors/google-cloud-alloydb-connectors/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-alloydb-connectors - 0.6.0 + 0.7.0 jar Google AlloyDB connectors AlloyDB connectors AlloyDB is a fully-managed, PostgreSQL-compatible database for demanding transactional workloads. It provides enterprise-grade performance and availability while maintaining 100% compatibility with open-source PostgreSQL. com.google.cloud google-cloud-alloydb-connectors-parent - 0.6.0 + 0.7.0 google-cloud-alloydb-connectors diff --git a/java-alloydb-connectors/pom.xml b/java-alloydb-connectors/pom.xml index faf173ae2be5..f5684a00e91b 100644 --- a/java-alloydb-connectors/pom.xml +++ b/java-alloydb-connectors/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-alloydb-connectors-parent pom - 0.6.0 + 0.7.0 Google AlloyDB connectors Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,22 +29,22 @@ com.google.cloud google-cloud-alloydb-connectors - 0.6.0 + 0.7.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1 - 0.6.0 + 0.7.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1beta - 0.6.0 + 0.7.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1alpha - 0.6.0 + 0.7.0 diff --git a/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1/pom.xml b/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1/pom.xml index c38bf817ff93..c72ccb3be756 100644 --- a/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1/pom.xml +++ b/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1 - 0.6.0 + 0.7.0 proto-google-cloud-alloydb-connectors-v1 Proto library for google-cloud-alloydb-connectors com.google.cloud google-cloud-alloydb-connectors-parent - 0.6.0 + 0.7.0 diff --git a/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1alpha/pom.xml b/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1alpha/pom.xml index 3a4f4fdca97b..0cb274006030 100644 --- a/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1alpha/pom.xml +++ b/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1alpha - 0.6.0 + 0.7.0 proto-google-cloud-alloydb-connectors-v1alpha Proto library for google-cloud-alloydb-connectors com.google.cloud google-cloud-alloydb-connectors-parent - 0.6.0 + 0.7.0 diff --git a/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1beta/pom.xml b/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1beta/pom.xml index 14999ae31f32..ae458a7e1807 100644 --- a/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1beta/pom.xml +++ b/java-alloydb-connectors/proto-google-cloud-alloydb-connectors-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-alloydb-connectors-v1beta - 0.6.0 + 0.7.0 proto-google-cloud-alloydb-connectors-v1beta Proto library for google-cloud-alloydb-connectors com.google.cloud google-cloud-alloydb-connectors-parent - 0.6.0 + 0.7.0 diff --git a/java-alloydb/CHANGELOG.md b/java-alloydb/CHANGELOG.md index 8c303579d0c4..fd32b1649466 100644 --- a/java-alloydb/CHANGELOG.md +++ b/java-alloydb/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.18.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.17.0 (2023-10-11) ### Dependencies diff --git a/java-alloydb/README.md b/java-alloydb/README.md index 4575c584c3d0..a6ce42513877 100644 --- a/java-alloydb/README.md +++ b/java-alloydb/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-alloydb - 0.17.0 + 0.18.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-alloydb:0.17.0' +implementation 'com.google.cloud:google-cloud-alloydb:0.18.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-alloydb" % "0.17.0" +libraryDependencies += "com.google.cloud" % "google-cloud-alloydb" % "0.18.0" ``` diff --git a/java-alloydb/google-cloud-alloydb-bom/pom.xml b/java-alloydb/google-cloud-alloydb-bom/pom.xml index 2e39a8be11fb..219fc8192dc1 100644 --- a/java-alloydb/google-cloud-alloydb-bom/pom.xml +++ b/java-alloydb/google-cloud-alloydb-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-alloydb-bom - 0.17.0 + 0.18.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,37 +27,37 @@ com.google.cloud google-cloud-alloydb - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-alloydb-v1beta - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-alloydb-v1 - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-alloydb-v1alpha - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-alloydb-v1 - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-alloydb-v1beta - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-alloydb-v1alpha - 0.17.0 + 0.18.0 diff --git a/java-alloydb/google-cloud-alloydb/pom.xml b/java-alloydb/google-cloud-alloydb/pom.xml index c3274401cd7c..92696b960d1c 100644 --- a/java-alloydb/google-cloud-alloydb/pom.xml +++ b/java-alloydb/google-cloud-alloydb/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-alloydb - 0.17.0 + 0.18.0 jar Google AlloyDB AlloyDB AlloyDB is a fully managed, PostgreSQL-compatible database service with industry-leading performance, availability, and scale. com.google.cloud google-cloud-alloydb-parent - 0.17.0 + 0.18.0 google-cloud-alloydb diff --git a/java-alloydb/grpc-google-cloud-alloydb-v1/pom.xml b/java-alloydb/grpc-google-cloud-alloydb-v1/pom.xml index e838c376cad7..23ef047b3f63 100644 --- a/java-alloydb/grpc-google-cloud-alloydb-v1/pom.xml +++ b/java-alloydb/grpc-google-cloud-alloydb-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-alloydb-v1 - 0.17.0 + 0.18.0 grpc-google-cloud-alloydb-v1 GRPC library for google-cloud-alloydb com.google.cloud google-cloud-alloydb-parent - 0.17.0 + 0.18.0 diff --git a/java-alloydb/grpc-google-cloud-alloydb-v1alpha/pom.xml b/java-alloydb/grpc-google-cloud-alloydb-v1alpha/pom.xml index d3d907acfb26..91e2b0015373 100644 --- a/java-alloydb/grpc-google-cloud-alloydb-v1alpha/pom.xml +++ b/java-alloydb/grpc-google-cloud-alloydb-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-alloydb-v1alpha - 0.17.0 + 0.18.0 grpc-google-cloud-alloydb-v1alpha GRPC library for google-cloud-alloydb com.google.cloud google-cloud-alloydb-parent - 0.17.0 + 0.18.0 diff --git a/java-alloydb/grpc-google-cloud-alloydb-v1beta/pom.xml b/java-alloydb/grpc-google-cloud-alloydb-v1beta/pom.xml index 61f6e9ba1952..156b77d54ae8 100644 --- a/java-alloydb/grpc-google-cloud-alloydb-v1beta/pom.xml +++ b/java-alloydb/grpc-google-cloud-alloydb-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-alloydb-v1beta - 0.17.0 + 0.18.0 grpc-google-cloud-alloydb-v1beta GRPC library for google-cloud-alloydb com.google.cloud google-cloud-alloydb-parent - 0.17.0 + 0.18.0 diff --git a/java-alloydb/pom.xml b/java-alloydb/pom.xml index 464dd0fc9d07..0c250ae3411e 100644 --- a/java-alloydb/pom.xml +++ b/java-alloydb/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-alloydb-parent pom - 0.17.0 + 0.18.0 Google AlloyDB Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.cloud google-cloud-alloydb - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-alloydb-v1beta - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-alloydb-v1 - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-alloydb-v1alpha - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-alloydb-v1 - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-alloydb-v1beta - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-alloydb-v1alpha - 0.17.0 + 0.18.0 diff --git a/java-alloydb/proto-google-cloud-alloydb-v1/pom.xml b/java-alloydb/proto-google-cloud-alloydb-v1/pom.xml index a835bd1a466d..6a04e6ad9468 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1/pom.xml +++ b/java-alloydb/proto-google-cloud-alloydb-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-alloydb-v1 - 0.17.0 + 0.18.0 proto-google-cloud-alloydb-v1 Proto library for google-cloud-alloydb com.google.cloud google-cloud-alloydb-parent - 0.17.0 + 0.18.0 diff --git a/java-alloydb/proto-google-cloud-alloydb-v1alpha/pom.xml b/java-alloydb/proto-google-cloud-alloydb-v1alpha/pom.xml index 22b25f7e35f2..672f3db95ff8 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1alpha/pom.xml +++ b/java-alloydb/proto-google-cloud-alloydb-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-alloydb-v1alpha - 0.17.0 + 0.18.0 proto-google-cloud-alloydb-v1alpha Proto library for google-cloud-alloydb com.google.cloud google-cloud-alloydb-parent - 0.17.0 + 0.18.0 diff --git a/java-alloydb/proto-google-cloud-alloydb-v1beta/pom.xml b/java-alloydb/proto-google-cloud-alloydb-v1beta/pom.xml index c78678534d03..3149c465efdf 100644 --- a/java-alloydb/proto-google-cloud-alloydb-v1beta/pom.xml +++ b/java-alloydb/proto-google-cloud-alloydb-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-alloydb-v1beta - 0.17.0 + 0.18.0 proto-google-cloud-alloydb-v1beta Proto library for google-cloud-alloydb com.google.cloud google-cloud-alloydb-parent - 0.17.0 + 0.18.0 diff --git a/java-analytics-admin/CHANGELOG.md b/java-analytics-admin/CHANGELOG.md index 9e7432c5ce8e..db3290d75775 100644 --- a/java-analytics-admin/CHANGELOG.md +++ b/java-analytics-admin/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.39.0 (2023-10-25) + +### Features + +* delete `BatchDeleteUserLinks`, `DeleteUserLink`, `BatchUpdateUserLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alph... ([#9982](https://github.com/googleapis/google-cloud-java/issues/9982)) +* delete `BatchDeleteUserLinks`, `DeleteUserLink`, `BatchUpdateUserLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alph... ([#9982](https://github.com/googleapis/google-cloud-java/issues/9982)) ([75d2527](https://github.com/googleapis/google-cloud-java/commit/75d252766bdf96a47ac40e3ccca2ddcbbb930a11)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.38.0 (2023-10-11) ### Dependencies diff --git a/java-analytics-admin/README.md b/java-analytics-admin/README.md index 9e53fe565fe0..2266580d924f 100644 --- a/java-analytics-admin/README.md +++ b/java-analytics-admin/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.analytics google-analytics-admin - 0.38.0 + 0.39.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.analytics:google-analytics-admin:0.38.0' +implementation 'com.google.analytics:google-analytics-admin:0.39.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.38.0" +libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.39.0" ``` @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.analytics/google-analytics-admin.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-admin/0.34.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.analytics/google-analytics-admin/0.38.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-analytics-admin/google-analytics-admin-bom/pom.xml b/java-analytics-admin/google-analytics-admin-bom/pom.xml index ef75e28c821c..8eacd4262817 100644 --- a/java-analytics-admin/google-analytics-admin-bom/pom.xml +++ b/java-analytics-admin/google-analytics-admin-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.analytics google-analytics-admin-bom - 0.38.0 + 0.39.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.analytics google-analytics-admin - 0.38.0 + 0.39.0 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.38.0 + 0.39.0 com.google.api.grpc grpc-google-analytics-admin-v1beta - 0.38.0 + 0.39.0 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.38.0 + 0.39.0 com.google.api.grpc proto-google-analytics-admin-v1beta - 0.38.0 + 0.39.0 diff --git a/java-analytics-admin/google-analytics-admin/pom.xml b/java-analytics-admin/google-analytics-admin/pom.xml index eb84d743d7bb..ec5c38e10754 100644 --- a/java-analytics-admin/google-analytics-admin/pom.xml +++ b/java-analytics-admin/google-analytics-admin/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.analytics google-analytics-admin - 0.38.0 + 0.39.0 jar Google Analytics Admin allows you to manage Google Analytics accounts and properties. com.google.analytics google-analytics-admin-parent - 0.38.0 + 0.39.0 google-analytics-admin diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java index c47bac89ac22..e72cbee3d675 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java @@ -418,7 +418,7 @@ public final UnaryCallable listAccoun * restored using the Trash Can UI. * *

If the accounts are not restored before the expiration time, the account and all child - * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found. @@ -456,7 +456,7 @@ public final void deleteAccount(AccountName name) { * restored using the Trash Can UI. * *

If the accounts are not restored before the expiration time, the account and all child - * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found. @@ -493,7 +493,7 @@ public final void deleteAccount(String name) { * restored using the Trash Can UI. * *

If the accounts are not restored before the expiration time, the account and all child - * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found. @@ -529,7 +529,7 @@ public final void deleteAccount(DeleteAccountRequest request) { * restored using the Trash Can UI. * *

If the accounts are not restored before the expiration time, the account and all child - * resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found. @@ -1145,7 +1145,7 @@ public final UnaryCallable createPropertyCallab * restored using the Trash Can UI. * *

If the properties are not restored before the expiration time, the Property and all child - * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found, or is not a GA4 Property. @@ -1183,7 +1183,7 @@ public final Property deleteProperty(PropertyName name) { * restored using the Trash Can UI. * *

If the properties are not restored before the expiration time, the Property and all child - * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found, or is not a GA4 Property. @@ -1220,7 +1220,7 @@ public final Property deleteProperty(String name) { * restored using the Trash Can UI. * *

If the properties are not restored before the expiration time, the Property and all child - * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found, or is not a GA4 Property. @@ -1258,7 +1258,7 @@ public final Property deleteProperty(DeletePropertyRequest request) { * restored using the Trash Can UI. * *

If the properties are not restored before the expiration time, the Property and all child - * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. + * resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * *

Returns an error if the target is not found, or is not a GA4 Property. @@ -1383,7 +1383,9 @@ public final UnaryCallable updatePropertyCallab // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a user's link to an account or property. + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1395,23 +1397,30 @@ public final UnaryCallable updatePropertyCallab * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - * UserLink response = analyticsAdminServiceClient.getUserLink(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink); * } * } * - * @param name Required. Example format: accounts/1234/userLinks/5678 + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param firebaseLink Required. The Firebase link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink getUserLink(UserLinkName name) { - GetUserLinkRequest request = - GetUserLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getUserLink(request); + public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink firebaseLink) { + CreateFirebaseLinkRequest request = + CreateFirebaseLinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setFirebaseLink(firebaseLink) + .build(); + return createFirebaseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a user's link to an account or property. + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1423,22 +1432,30 @@ public final UserLink getUserLink(UserLinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); - * UserLink response = analyticsAdminServiceClient.getUserLink(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink); * } * } * - * @param name Required. Example format: accounts/1234/userLinks/5678 + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param firebaseLink Required. The Firebase link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink getUserLink(String name) { - GetUserLinkRequest request = GetUserLinkRequest.newBuilder().setName(name).build(); - return getUserLink(request); + public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebaseLink) { + CreateFirebaseLinkRequest request = + CreateFirebaseLinkRequest.newBuilder() + .setParent(parent) + .setFirebaseLink(firebaseLink) + .build(); + return createFirebaseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a user's link to an account or property. + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1450,24 +1467,27 @@ public final UserLink getUserLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetUserLinkRequest request = - * GetUserLinkRequest.newBuilder() - * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * CreateFirebaseLinkRequest request = + * CreateFirebaseLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setFirebaseLink(FirebaseLink.newBuilder().build()) * .build(); - * UserLink response = analyticsAdminServiceClient.getUserLink(request); + * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink getUserLink(GetUserLinkRequest request) { - return getUserLinkCallable().call(request); + public final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request) { + return createFirebaseLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a user's link to an account or property. + * Creates a FirebaseLink. + * + *

Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1479,24 +1499,25 @@ public final UserLink getUserLink(GetUserLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetUserLinkRequest request = - * GetUserLinkRequest.newBuilder() - * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * CreateFirebaseLinkRequest request = + * CreateFirebaseLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setFirebaseLink(FirebaseLink.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getUserLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createFirebaseLinkCallable().futureCall(request); * // Do something. - * UserLink response = future.get(); + * FirebaseLink response = future.get(); * } * } */ - public final UnaryCallable getUserLinkCallable() { - return stub.getUserLinkCallable(); + public final UnaryCallable createFirebaseLinkCallable() { + return stub.createFirebaseLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about multiple users' links to an account or property. + * Deletes a FirebaseLink on a property * *

Sample code: * @@ -1508,25 +1529,26 @@ public final UnaryCallable getUserLinkCallable() { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchGetUserLinksRequest request = - * BatchGetUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllNames(new ArrayList()) - * .build(); - * BatchGetUserLinksResponse response = analyticsAdminServiceClient.batchGetUserLinks(request); + * FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + * analyticsAdminServiceClient.deleteFirebaseLink(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BatchGetUserLinksResponse batchGetUserLinks(BatchGetUserLinksRequest request) { - return batchGetUserLinksCallable().call(request); + public final void deleteFirebaseLink(FirebaseLinkName name) { + DeleteFirebaseLinkRequest request = + DeleteFirebaseLinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteFirebaseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about multiple users' links to an account or property. + * Deletes a FirebaseLink on a property * *

Sample code: * @@ -1538,26 +1560,24 @@ public final BatchGetUserLinksResponse batchGetUserLinks(BatchGetUserLinksReques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchGetUserLinksRequest request = - * BatchGetUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllNames(new ArrayList()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.batchGetUserLinksCallable().futureCall(request); - * // Do something. - * BatchGetUserLinksResponse response = future.get(); + * String name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString(); + * analyticsAdminServiceClient.deleteFirebaseLink(name); * } * } + * + * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - batchGetUserLinksCallable() { - return stub.batchGetUserLinksCallable(); + public final void deleteFirebaseLink(String name) { + DeleteFirebaseLinkRequest request = + DeleteFirebaseLinkRequest.newBuilder().setName(name).build(); + deleteFirebaseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property. + * Deletes a FirebaseLink on a property * *

Sample code: * @@ -1569,27 +1589,53 @@ public final BatchGetUserLinksResponse batchGetUserLinks(BatchGetUserLinksReques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AccountName parent = AccountName.of("[ACCOUNT]"); - * for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { - * // doThingsWith(element); - * } + * DeleteFirebaseLinkRequest request = + * DeleteFirebaseLinkRequest.newBuilder() + * .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteFirebaseLink(request); * } * } * - * @param parent Required. Example format: accounts/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListUserLinksPagedResponse listUserLinks(AccountName parent) { - ListUserLinksRequest request = - ListUserLinksRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listUserLinks(request); + public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request) { + deleteFirebaseLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property. + * Deletes a FirebaseLink on a property + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteFirebaseLinkRequest request =
+   *       DeleteFirebaseLinkRequest.newBuilder()
+   *           .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteFirebaseLinkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFirebaseLinkCallable() { + return stub.deleteFirebaseLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1602,26 +1648,27 @@ public final ListUserLinksPagedResponse listUserLinks(AccountName parent) { * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + * for (FirebaseLink element : + * analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Example format: accounts/1234 + * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListUserLinksPagedResponse listUserLinks(PropertyName parent) { - ListUserLinksRequest request = - ListUserLinksRequest.newBuilder() + public final ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName parent) { + ListFirebaseLinksRequest request = + ListFirebaseLinksRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); - return listUserLinks(request); + return listFirebaseLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property. + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1633,24 +1680,26 @@ public final ListUserLinksPagedResponse listUserLinks(PropertyName parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = AccountName.of("[ACCOUNT]").toString(); - * for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (FirebaseLink element : + * analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Example format: accounts/1234 + * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListUserLinksPagedResponse listUserLinks(String parent) { - ListUserLinksRequest request = ListUserLinksRequest.newBuilder().setParent(parent).build(); - return listUserLinks(request); + public final ListFirebaseLinksPagedResponse listFirebaseLinks(String parent) { + ListFirebaseLinksRequest request = + ListFirebaseLinksRequest.newBuilder().setParent(parent).build(); + return listFirebaseLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property. + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1662,13 +1711,14 @@ public final ListUserLinksPagedResponse listUserLinks(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListUserLinksRequest request = - * ListUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) + * ListFirebaseLinksRequest request = + * ListFirebaseLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * for (UserLink element : analyticsAdminServiceClient.listUserLinks(request).iterateAll()) { + * for (FirebaseLink element : + * analyticsAdminServiceClient.listFirebaseLinks(request).iterateAll()) { * // doThingsWith(element); * } * } @@ -1677,13 +1727,13 @@ public final ListUserLinksPagedResponse listUserLinks(String parent) { * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest request) { - return listUserLinksPagedCallable().call(request); + public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksRequest request) { + return listFirebaseLinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property. + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1695,29 +1745,29 @@ public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest reque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListUserLinksRequest request = - * ListUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) + * ListFirebaseLinksRequest request = + * ListFirebaseLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listUserLinksPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.listFirebaseLinksPagedCallable().futureCall(request); * // Do something. - * for (UserLink element : future.get().iterateAll()) { + * for (FirebaseLink element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ - public final UnaryCallable - listUserLinksPagedCallable() { - return stub.listUserLinksPagedCallable(); + public final UnaryCallable + listFirebaseLinksPagedCallable() { + return stub.listFirebaseLinksPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property. + * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: * @@ -1729,16 +1779,16 @@ public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest reque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListUserLinksRequest request = - * ListUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) + * ListFirebaseLinksRequest request = + * ListFirebaseLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); * while (true) { - * ListUserLinksResponse response = - * analyticsAdminServiceClient.listUserLinksCallable().call(request); - * for (UserLink element : response.getUserLinksList()) { + * ListFirebaseLinksResponse response = + * analyticsAdminServiceClient.listFirebaseLinksCallable().call(request); + * for (FirebaseLink element : response.getFirebaseLinksList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -1751,19 +1801,14 @@ public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest reque * } * } */ - public final UnaryCallable listUserLinksCallable() { - return stub.listUserLinksCallable(); + public final UnaryCallable + listFirebaseLinksCallable() { + return stub.listFirebaseLinksCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property, including implicit ones that come from - * effective permissions granted by groups or organization admin roles. - * - *

If a returned user link does not have direct permissions, they cannot be removed from the - * account or property directly with the DeleteUserLink command. They have to be removed from the - * group/etc that gives them permissions, which is currently only usable/discoverable in the GA or - * GMP UIs. + * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * *

Sample code: * @@ -1775,35 +1820,26 @@ public final UnaryCallable listUser * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AuditUserLinksRequest request = - * AuditUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * for (AuditUserLink element : - * analyticsAdminServiceClient.auditUserLinks(request).iterateAll()) { - * // doThingsWith(element); - * } + * GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); + * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the site tag to lookup. Note that site tags are singletons + * and do not have unique IDs. Format: + * properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: + * "properties/123/dataStreams/456/globalSiteTag" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest request) { - return auditUserLinksPagedCallable().call(request); + public final GlobalSiteTag getGlobalSiteTag(GlobalSiteTagName name) { + GetGlobalSiteTagRequest request = + GetGlobalSiteTagRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getGlobalSiteTag(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property, including implicit ones that come from - * effective permissions granted by groups or organization admin roles. - * - *

If a returned user link does not have direct permissions, they cannot be removed from the - * account or property directly with the DeleteUserLink command. They have to be removed from the - * group/etc that gives them permissions, which is currently only usable/discoverable in the GA or - * GMP UIs. + * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * *

Sample code: * @@ -1815,35 +1851,25 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AuditUserLinksRequest request = - * AuditUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.auditUserLinksPagedCallable().futureCall(request); - * // Do something. - * for (AuditUserLink element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * String name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name); * } * } + * + * @param name Required. The name of the site tag to lookup. Note that site tags are singletons + * and do not have unique IDs. Format: + * properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: + * "properties/123/dataStreams/456/globalSiteTag" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - auditUserLinksPagedCallable() { - return stub.auditUserLinksPagedCallable(); + public final GlobalSiteTag getGlobalSiteTag(String name) { + GetGlobalSiteTagRequest request = GetGlobalSiteTagRequest.newBuilder().setName(name).build(); + return getGlobalSiteTag(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all user links on an account or property, including implicit ones that come from - * effective permissions granted by groups or organization admin roles. - * - *

If a returned user link does not have direct permissions, they cannot be removed from the - * account or property directly with the DeleteUserLink command. They have to be removed from the - * group/etc that gives them permissions, which is currently only usable/discoverable in the GA or - * GMP UIs. + * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * *

Sample code: * @@ -1855,40 +1881,24 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AuditUserLinksRequest request = - * AuditUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * GetGlobalSiteTagRequest request = + * GetGlobalSiteTagRequest.newBuilder() + * .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .build(); - * while (true) { - * AuditUserLinksResponse response = - * analyticsAdminServiceClient.auditUserLinksCallable().call(request); - * for (AuditUserLink element : response.getUserLinksList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - auditUserLinksCallable() { - return stub.auditUserLinksCallable(); + public final GlobalSiteTag getGlobalSiteTag(GetGlobalSiteTagRequest request) { + return getGlobalSiteTagCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a user link on an account or property. - * - *

If the user with the specified email already has permissions on the account or property, - * then the user's existing permissions will be unioned with the permissions specified in the new - * UserLink. + * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * *

Sample code: * @@ -1900,32 +1910,24 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AccountName parent = AccountName.of("[ACCOUNT]"); - * UserLink userLink = UserLink.newBuilder().build(); - * UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + * GetGlobalSiteTagRequest request = + * GetGlobalSiteTagRequest.newBuilder() + * .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.getGlobalSiteTagCallable().futureCall(request); + * // Do something. + * GlobalSiteTag response = future.get(); * } * } - * - * @param parent Required. Example format: accounts/1234 - * @param userLink Required. The user link to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink createUserLink(AccountName parent, UserLink userLink) { - CreateUserLinkRequest request = - CreateUserLinkRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setUserLink(userLink) - .build(); - return createUserLink(request); + public final UnaryCallable getGlobalSiteTagCallable() { + return stub.getGlobalSiteTagCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a user link on an account or property. - * - *

If the user with the specified email already has permissions on the account or property, - * then the user's existing permissions will be unioned with the permissions specified in the new - * UserLink. + * Creates a GoogleAdsLink. * *

Sample code: * @@ -1938,31 +1940,28 @@ public final UserLink createUserLink(AccountName parent, UserLink userLink) { * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * PropertyName parent = PropertyName.of("[PROPERTY]"); - * UserLink userLink = UserLink.newBuilder().build(); - * UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + * GoogleAdsLink response = + * analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink); * } * } * - * @param parent Required. Example format: accounts/1234 - * @param userLink Required. The user link to create. + * @param parent Required. Example format: properties/1234 + * @param googleAdsLink Required. The GoogleAdsLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink createUserLink(PropertyName parent, UserLink userLink) { - CreateUserLinkRequest request = - CreateUserLinkRequest.newBuilder() + public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLink googleAdsLink) { + CreateGoogleAdsLinkRequest request = + CreateGoogleAdsLinkRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) - .setUserLink(userLink) + .setGoogleAdsLink(googleAdsLink) .build(); - return createUserLink(request); + return createGoogleAdsLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a user link on an account or property. - * - *

If the user with the specified email already has permissions on the account or property, - * then the user's existing permissions will be unioned with the permissions specified in the new - * UserLink. + * Creates a GoogleAdsLink. * *

Sample code: * @@ -1974,29 +1973,29 @@ public final UserLink createUserLink(PropertyName parent, UserLink userLink) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = AccountName.of("[ACCOUNT]").toString(); - * UserLink userLink = UserLink.newBuilder().build(); - * UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + * GoogleAdsLink response = + * analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink); * } * } * - * @param parent Required. Example format: accounts/1234 - * @param userLink Required. The user link to create. + * @param parent Required. Example format: properties/1234 + * @param googleAdsLink Required. The GoogleAdsLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink createUserLink(String parent, UserLink userLink) { - CreateUserLinkRequest request = - CreateUserLinkRequest.newBuilder().setParent(parent).setUserLink(userLink).build(); - return createUserLink(request); + public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink googleAdsLink) { + CreateGoogleAdsLinkRequest request = + CreateGoogleAdsLinkRequest.newBuilder() + .setParent(parent) + .setGoogleAdsLink(googleAdsLink) + .build(); + return createGoogleAdsLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a user link on an account or property. - * - *

If the user with the specified email already has permissions on the account or property, - * then the user's existing permissions will be unioned with the permissions specified in the new - * UserLink. + * Creates a GoogleAdsLink. * *

Sample code: * @@ -2008,30 +2007,25 @@ public final UserLink createUserLink(String parent, UserLink userLink) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateUserLinkRequest request = - * CreateUserLinkRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setNotifyNewUser(true) - * .setUserLink(UserLink.newBuilder().build()) + * CreateGoogleAdsLinkRequest request = + * CreateGoogleAdsLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) * .build(); - * UserLink response = analyticsAdminServiceClient.createUserLink(request); + * GoogleAdsLink response = analyticsAdminServiceClient.createGoogleAdsLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink createUserLink(CreateUserLinkRequest request) { - return createUserLinkCallable().call(request); + public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest request) { + return createGoogleAdsLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a user link on an account or property. - * - *

If the user with the specified email already has permissions on the account or property, - * then the user's existing permissions will be unioned with the permissions specified in the new - * UserLink. + * Creates a GoogleAdsLink. * *

Sample code: * @@ -2043,29 +2037,26 @@ public final UserLink createUserLink(CreateUserLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateUserLinkRequest request = - * CreateUserLinkRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setNotifyNewUser(true) - * .setUserLink(UserLink.newBuilder().build()) + * CreateGoogleAdsLinkRequest request = + * CreateGoogleAdsLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createUserLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createGoogleAdsLinkCallable().futureCall(request); * // Do something. - * UserLink response = future.get(); + * GoogleAdsLink response = future.get(); * } * } */ - public final UnaryCallable createUserLinkCallable() { - return stub.createUserLinkCallable(); + public final UnaryCallable + createGoogleAdsLinkCallable() { + return stub.createGoogleAdsLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates information about multiple users' links to an account or property. - * - *

This method is transactional. If any UserLink cannot be created, none of the UserLinks will - * be created. + * Updates a GoogleAdsLink on a property * *

Sample code: * @@ -2077,31 +2068,32 @@ public final UnaryCallable createUserLinkCallab * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchCreateUserLinksRequest request = - * BatchCreateUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setNotifyNewUsers(true) - * .addAllRequests(new ArrayList()) - * .build(); - * BatchCreateUserLinksResponse response = - * analyticsAdminServiceClient.batchCreateUserLinks(request); + * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * GoogleAdsLink response = + * analyticsAdminServiceClient.updateGoogleAdsLink(googleAdsLink, updateMask); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param googleAdsLink The GoogleAdsLink to update + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BatchCreateUserLinksResponse batchCreateUserLinks( - BatchCreateUserLinksRequest request) { - return batchCreateUserLinksCallable().call(request); + public final GoogleAdsLink updateGoogleAdsLink( + GoogleAdsLink googleAdsLink, FieldMask updateMask) { + UpdateGoogleAdsLinkRequest request = + UpdateGoogleAdsLinkRequest.newBuilder() + .setGoogleAdsLink(googleAdsLink) + .setUpdateMask(updateMask) + .build(); + return updateGoogleAdsLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates information about multiple users' links to an account or property. - * - *

This method is transactional. If any UserLink cannot be created, none of the UserLinks will - * be created. + * Updates a GoogleAdsLink on a property * *

Sample code: * @@ -2113,27 +2105,25 @@ public final BatchCreateUserLinksResponse batchCreateUserLinks( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchCreateUserLinksRequest request = - * BatchCreateUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setNotifyNewUsers(true) - * .addAllRequests(new ArrayList()) + * UpdateGoogleAdsLinkRequest request = + * UpdateGoogleAdsLinkRequest.newBuilder() + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.batchCreateUserLinksCallable().futureCall(request); - * // Do something. - * BatchCreateUserLinksResponse response = future.get(); + * GoogleAdsLink response = analyticsAdminServiceClient.updateGoogleAdsLink(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - batchCreateUserLinksCallable() { - return stub.batchCreateUserLinksCallable(); + public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest request) { + return updateGoogleAdsLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a user link on an account or property. + * Updates a GoogleAdsLink on a property * *

Sample code: * @@ -2145,23 +2135,26 @@ public final BatchCreateUserLinksResponse batchCreateUserLinks( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UserLink userLink = UserLink.newBuilder().build(); - * UserLink response = analyticsAdminServiceClient.updateUserLink(userLink); + * UpdateGoogleAdsLinkRequest request = + * UpdateGoogleAdsLinkRequest.newBuilder() + * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.updateGoogleAdsLinkCallable().futureCall(request); + * // Do something. + * GoogleAdsLink response = future.get(); * } * } - * - * @param userLink Required. The user link to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink updateUserLink(UserLink userLink) { - UpdateUserLinkRequest request = - UpdateUserLinkRequest.newBuilder().setUserLink(userLink).build(); - return updateUserLink(request); + public final UnaryCallable + updateGoogleAdsLinkCallable() { + return stub.updateGoogleAdsLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a user link on an account or property. + * Deletes a GoogleAdsLink on a property * *

Sample code: * @@ -2173,22 +2166,25 @@ public final UserLink updateUserLink(UserLink userLink) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateUserLinkRequest request = - * UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build(); - * UserLink response = analyticsAdminServiceClient.updateUserLink(request); + * GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + * analyticsAdminServiceClient.deleteGoogleAdsLink(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Example format: properties/1234/googleAdsLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UserLink updateUserLink(UpdateUserLinkRequest request) { - return updateUserLinkCallable().call(request); + public final void deleteGoogleAdsLink(GoogleAdsLinkName name) { + DeleteGoogleAdsLinkRequest request = + DeleteGoogleAdsLinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteGoogleAdsLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a user link on an account or property. + * Deletes a GoogleAdsLink on a property * *

Sample code: * @@ -2200,22 +2196,23 @@ public final UserLink updateUserLink(UpdateUserLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateUserLinkRequest request = - * UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateUserLinkCallable().futureCall(request); - * // Do something. - * UserLink response = future.get(); + * String name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString(); + * analyticsAdminServiceClient.deleteGoogleAdsLink(name); * } * } + * + * @param name Required. Example format: properties/1234/googleAdsLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable updateUserLinkCallable() { - return stub.updateUserLinkCallable(); + public final void deleteGoogleAdsLink(String name) { + DeleteGoogleAdsLinkRequest request = + DeleteGoogleAdsLinkRequest.newBuilder().setName(name).build(); + deleteGoogleAdsLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates information about multiple users' links to an account or property. + * Deletes a GoogleAdsLink on a property * *

Sample code: * @@ -2227,27 +2224,24 @@ public final UnaryCallable updateUserLinkCallab * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchUpdateUserLinksRequest request = - * BatchUpdateUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) + * DeleteGoogleAdsLinkRequest request = + * DeleteGoogleAdsLinkRequest.newBuilder() + * .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) * .build(); - * BatchUpdateUserLinksResponse response = - * analyticsAdminServiceClient.batchUpdateUserLinks(request); + * analyticsAdminServiceClient.deleteGoogleAdsLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BatchUpdateUserLinksResponse batchUpdateUserLinks( - BatchUpdateUserLinksRequest request) { - return batchUpdateUserLinksCallable().call(request); + public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request) { + deleteGoogleAdsLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates information about multiple users' links to an account or property. + * Deletes a GoogleAdsLink on a property * *

Sample code: * @@ -2259,26 +2253,24 @@ public final BatchUpdateUserLinksResponse batchUpdateUserLinks( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchUpdateUserLinksRequest request = - * BatchUpdateUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) + * DeleteGoogleAdsLinkRequest request = + * DeleteGoogleAdsLinkRequest.newBuilder() + * .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.batchUpdateUserLinksCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteGoogleAdsLinkCallable().futureCall(request); * // Do something. - * BatchUpdateUserLinksResponse response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - batchUpdateUserLinksCallable() { - return stub.batchUpdateUserLinksCallable(); + public final UnaryCallable deleteGoogleAdsLinkCallable() { + return stub.deleteGoogleAdsLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a user link on an account or property. + * Lists GoogleAdsLinks on a property. * *

Sample code: * @@ -2290,23 +2282,28 @@ public final BatchUpdateUserLinksResponse batchUpdateUserLinks( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - * analyticsAdminServiceClient.deleteUserLink(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (GoogleAdsLink element : + * analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. Example format: accounts/1234/userLinks/5678 + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteUserLink(UserLinkName name) { - DeleteUserLinkRequest request = - DeleteUserLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteUserLink(request); + public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName parent) { + ListGoogleAdsLinksRequest request = + ListGoogleAdsLinksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listGoogleAdsLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a user link on an account or property. + * Lists GoogleAdsLinks on a property. * *

Sample code: * @@ -2318,22 +2315,26 @@ public final void deleteUserLink(UserLinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); - * analyticsAdminServiceClient.deleteUserLink(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (GoogleAdsLink element : + * analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. Example format: accounts/1234/userLinks/5678 + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteUserLink(String name) { - DeleteUserLinkRequest request = DeleteUserLinkRequest.newBuilder().setName(name).build(); - deleteUserLink(request); + public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent) { + ListGoogleAdsLinksRequest request = + ListGoogleAdsLinksRequest.newBuilder().setParent(parent).build(); + return listGoogleAdsLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a user link on an account or property. + * Lists GoogleAdsLinks on a property. * *

Sample code: * @@ -2345,24 +2346,30 @@ public final void deleteUserLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteUserLinkRequest request = - * DeleteUserLinkRequest.newBuilder() - * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * ListGoogleAdsLinksRequest request = + * ListGoogleAdsLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * analyticsAdminServiceClient.deleteUserLink(request); + * for (GoogleAdsLink element : + * analyticsAdminServiceClient.listGoogleAdsLinks(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteUserLink(DeleteUserLinkRequest request) { - deleteUserLinkCallable().call(request); + public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( + ListGoogleAdsLinksRequest request) { + return listGoogleAdsLinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a user link on an account or property. + * Lists GoogleAdsLinks on a property. * *

Sample code: * @@ -2374,24 +2381,29 @@ public final void deleteUserLink(DeleteUserLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteUserLinkRequest request = - * DeleteUserLinkRequest.newBuilder() - * .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + * ListGoogleAdsLinksRequest request = + * ListGoogleAdsLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteUserLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.listGoogleAdsLinksPagedCallable().futureCall(request); * // Do something. - * future.get(); + * for (GoogleAdsLink element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable deleteUserLinkCallable() { - return stub.deleteUserLinkCallable(); + public final UnaryCallable + listGoogleAdsLinksPagedCallable() { + return stub.listGoogleAdsLinksPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes information about multiple users' links to an account or property. + * Lists GoogleAdsLinks on a property. * *

Sample code: * @@ -2403,25 +2415,36 @@ public final UnaryCallable deleteUserLinkCallable( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchDeleteUserLinksRequest request = - * BatchDeleteUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) + * ListGoogleAdsLinksRequest request = + * ListGoogleAdsLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * analyticsAdminServiceClient.batchDeleteUserLinks(request); + * while (true) { + * ListGoogleAdsLinksResponse response = + * analyticsAdminServiceClient.listGoogleAdsLinksCallable().call(request); + * for (GoogleAdsLink element : response.getGoogleAdsLinksList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void batchDeleteUserLinks(BatchDeleteUserLinksRequest request) { - batchDeleteUserLinksCallable().call(request); + public final UnaryCallable + listGoogleAdsLinksCallable() { + return stub.listGoogleAdsLinksCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes information about multiple users' links to an account or property. + * Get data sharing settings on an account. Data sharing settings are singletons. * *

Sample code: * @@ -2433,27 +2456,26 @@ public final void batchDeleteUserLinks(BatchDeleteUserLinksRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchDeleteUserLinksRequest request = - * BatchDeleteUserLinksRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.batchDeleteUserLinksCallable().futureCall(request); - * // Do something. - * future.get(); + * DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name); * } * } + * + * @param name Required. The name of the settings to lookup. Format: + * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable batchDeleteUserLinksCallable() { - return stub.batchDeleteUserLinksCallable(); + public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName name) { + GetDataSharingSettingsRequest request = + GetDataSharingSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDataSharingSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a FirebaseLink. - * - *

Properties can have at most one FirebaseLink. + * Get data sharing settings on an account. Data sharing settings are singletons. * *

Sample code: * @@ -2465,65 +2487,24 @@ public final UnaryCallable batchDeleteUserLi * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink); + * String name = DataSharingSettingsName.of("[ACCOUNT]").toString(); + * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name); * } * } * - * @param parent Required. Format: properties/{property_id} Example: properties/1234 - * @param firebaseLink Required. The Firebase link to create. + * @param name Required. The name of the settings to lookup. Format: + * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink firebaseLink) { - CreateFirebaseLinkRequest request = - CreateFirebaseLinkRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setFirebaseLink(firebaseLink) - .build(); - return createFirebaseLink(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a FirebaseLink. - * - *

Properties can have at most one FirebaseLink. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   String parent = PropertyName.of("[PROPERTY]").toString();
-   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
-   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink);
-   * }
-   * }
- * - * @param parent Required. Format: properties/{property_id} Example: properties/1234 - * @param firebaseLink Required. The Firebase link to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebaseLink) { - CreateFirebaseLinkRequest request = - CreateFirebaseLinkRequest.newBuilder() - .setParent(parent) - .setFirebaseLink(firebaseLink) - .build(); - return createFirebaseLink(request); + public final DataSharingSettings getDataSharingSettings(String name) { + GetDataSharingSettingsRequest request = + GetDataSharingSettingsRequest.newBuilder().setName(name).build(); + return getDataSharingSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a FirebaseLink. - * - *

Properties can have at most one FirebaseLink. + * Get data sharing settings on an account. Data sharing settings are singletons. * *

Sample code: * @@ -2535,27 +2516,24 @@ public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebas * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateFirebaseLinkRequest request = - * CreateFirebaseLinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setFirebaseLink(FirebaseLink.newBuilder().build()) + * GetDataSharingSettingsRequest request = + * GetDataSharingSettingsRequest.newBuilder() + * .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) * .build(); - * FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(request); + * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request) { - return createFirebaseLinkCallable().call(request); + public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRequest request) { + return getDataSharingSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a FirebaseLink. - * - *

Properties can have at most one FirebaseLink. + * Get data sharing settings on an account. Data sharing settings are singletons. * *

Sample code: * @@ -2567,25 +2545,25 @@ public final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateFirebaseLinkRequest request = - * CreateFirebaseLinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setFirebaseLink(FirebaseLink.newBuilder().build()) + * GetDataSharingSettingsRequest request = + * GetDataSharingSettingsRequest.newBuilder() + * .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createFirebaseLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getDataSharingSettingsCallable().futureCall(request); * // Do something. - * FirebaseLink response = future.get(); + * DataSharingSettings response = future.get(); * } * } */ - public final UnaryCallable createFirebaseLinkCallable() { - return stub.createFirebaseLinkCallable(); + public final UnaryCallable + getDataSharingSettingsCallable() { + return stub.getDataSharingSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a FirebaseLink on a property + * Lookup for a single "GA4" MeasurementProtocolSecret. * *

Sample code: * @@ -2597,26 +2575,30 @@ public final UnaryCallable createFireba * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); - * analyticsAdminServiceClient.deleteFirebaseLink(name); + * MeasurementProtocolSecretName name = + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.getMeasurementProtocolSecret(name); * } * } * - * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} - * Example: properties/1234/firebaseLinks/5678 + * @param name Required. The name of the measurement protocol secret to lookup. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteFirebaseLink(FirebaseLinkName name) { - DeleteFirebaseLinkRequest request = - DeleteFirebaseLinkRequest.newBuilder() + public final MeasurementProtocolSecret getMeasurementProtocolSecret( + MeasurementProtocolSecretName name) { + GetMeasurementProtocolSecretRequest request = + GetMeasurementProtocolSecretRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - deleteFirebaseLink(request); + return getMeasurementProtocolSecret(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a FirebaseLink on a property + * Lookup for a single "GA4" MeasurementProtocolSecret. * *

Sample code: * @@ -2628,24 +2610,28 @@ public final void deleteFirebaseLink(FirebaseLinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString(); - * analyticsAdminServiceClient.deleteFirebaseLink(name); + * String name = + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + * .toString(); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.getMeasurementProtocolSecret(name); * } * } * - * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} - * Example: properties/1234/firebaseLinks/5678 + * @param name Required. The name of the measurement protocol secret to lookup. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteFirebaseLink(String name) { - DeleteFirebaseLinkRequest request = - DeleteFirebaseLinkRequest.newBuilder().setName(name).build(); - deleteFirebaseLink(request); + public final MeasurementProtocolSecret getMeasurementProtocolSecret(String name) { + GetMeasurementProtocolSecretRequest request = + GetMeasurementProtocolSecretRequest.newBuilder().setName(name).build(); + return getMeasurementProtocolSecret(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a FirebaseLink on a property + * Lookup for a single "GA4" MeasurementProtocolSecret. * *

Sample code: * @@ -2657,24 +2643,29 @@ public final void deleteFirebaseLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteFirebaseLinkRequest request = - * DeleteFirebaseLinkRequest.newBuilder() - * .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * GetMeasurementProtocolSecretRequest request = + * GetMeasurementProtocolSecretRequest.newBuilder() + * .setName( + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + * .toString()) * .build(); - * analyticsAdminServiceClient.deleteFirebaseLink(request); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.getMeasurementProtocolSecret(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request) { - deleteFirebaseLinkCallable().call(request); + public final MeasurementProtocolSecret getMeasurementProtocolSecret( + GetMeasurementProtocolSecretRequest request) { + return getMeasurementProtocolSecretCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a FirebaseLink on a property + * Lookup for a single "GA4" MeasurementProtocolSecret. * *

Sample code: * @@ -2686,24 +2677,28 @@ public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteFirebaseLinkRequest request = - * DeleteFirebaseLinkRequest.newBuilder() - * .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + * GetMeasurementProtocolSecretRequest request = + * GetMeasurementProtocolSecretRequest.newBuilder() + * .setName( + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteFirebaseLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getMeasurementProtocolSecretCallable().futureCall(request); * // Do something. - * future.get(); + * MeasurementProtocolSecret response = future.get(); * } * } */ - public final UnaryCallable deleteFirebaseLinkCallable() { - return stub.deleteFirebaseLinkCallable(); + public final UnaryCallable + getMeasurementProtocolSecretCallable() { + return stub.getMeasurementProtocolSecretCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * Returns child MeasurementProtocolSecrets under the specified parent Property. * *

Sample code: * @@ -2715,28 +2710,30 @@ public final UnaryCallable deleteFirebaseLinkC * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (FirebaseLink element : - * analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) { + * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + * for (MeasurementProtocolSecret element : + * analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param parent Required. The resource name of the parent stream. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName parent) { - ListFirebaseLinksRequest request = - ListFirebaseLinksRequest.newBuilder() + public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( + DataStreamName parent) { + ListMeasurementProtocolSecretsRequest request = + ListMeasurementProtocolSecretsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); - return listFirebaseLinks(request); + return listMeasurementProtocolSecrets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * Returns child MeasurementProtocolSecrets under the specified parent Property. * *

Sample code: * @@ -2748,26 +2745,28 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (FirebaseLink element : - * analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) { + * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * for (MeasurementProtocolSecret element : + * analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param parent Required. The resource name of the parent stream. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListFirebaseLinksPagedResponse listFirebaseLinks(String parent) { - ListFirebaseLinksRequest request = - ListFirebaseLinksRequest.newBuilder().setParent(parent).build(); - return listFirebaseLinks(request); + public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( + String parent) { + ListMeasurementProtocolSecretsRequest request = + ListMeasurementProtocolSecretsRequest.newBuilder().setParent(parent).build(); + return listMeasurementProtocolSecrets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * Returns child MeasurementProtocolSecrets under the specified parent Property. * *

Sample code: * @@ -2779,14 +2778,14 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListFirebaseLinksRequest request = - * ListFirebaseLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) + * ListMeasurementProtocolSecretsRequest request = + * ListMeasurementProtocolSecretsRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * for (FirebaseLink element : - * analyticsAdminServiceClient.listFirebaseLinks(request).iterateAll()) { + * for (MeasurementProtocolSecret element : + * analyticsAdminServiceClient.listMeasurementProtocolSecrets(request).iterateAll()) { * // doThingsWith(element); * } * } @@ -2795,13 +2794,14 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(String parent) { * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksRequest request) { - return listFirebaseLinksPagedCallable().call(request); + public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( + ListMeasurementProtocolSecretsRequest request) { + return listMeasurementProtocolSecretsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * Returns child MeasurementProtocolSecrets under the specified parent Property. * *

Sample code: * @@ -2813,29 +2813,32 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListFirebaseLinksRequest request = - * ListFirebaseLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) + * ListMeasurementProtocolSecretsRequest request = + * ListMeasurementProtocolSecretsRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listFirebaseLinksPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .listMeasurementProtocolSecretsPagedCallable() + * .futureCall(request); * // Do something. - * for (FirebaseLink element : future.get().iterateAll()) { + * for (MeasurementProtocolSecret element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ - public final UnaryCallable - listFirebaseLinksPagedCallable() { - return stub.listFirebaseLinksPagedCallable(); + public final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> + listMeasurementProtocolSecretsPagedCallable() { + return stub.listMeasurementProtocolSecretsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. + * Returns child MeasurementProtocolSecrets under the specified parent Property. * *

Sample code: * @@ -2847,16 +2850,16 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListFirebaseLinksRequest request = - * ListFirebaseLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) + * ListMeasurementProtocolSecretsRequest request = + * ListMeasurementProtocolSecretsRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); * while (true) { - * ListFirebaseLinksResponse response = - * analyticsAdminServiceClient.listFirebaseLinksCallable().call(request); - * for (FirebaseLink element : response.getFirebaseLinksList()) { + * ListMeasurementProtocolSecretsResponse response = + * analyticsAdminServiceClient.listMeasurementProtocolSecretsCallable().call(request); + * for (MeasurementProtocolSecret element : response.getMeasurementProtocolSecretsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2869,14 +2872,15 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR * } * } */ - public final UnaryCallable - listFirebaseLinksCallable() { - return stub.listFirebaseLinksCallable(); + public final UnaryCallable< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsCallable() { + return stub.listMeasurementProtocolSecretsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. + * Creates a measurement protocol secret. * *

Sample code: * @@ -2888,26 +2892,33 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); - * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name); + * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + * MeasurementProtocolSecret measurementProtocolSecret = + * MeasurementProtocolSecret.newBuilder().build(); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.createMeasurementProtocolSecret( + * parent, measurementProtocolSecret); * } * } * - * @param name Required. The name of the site tag to lookup. Note that site tags are singletons - * and do not have unique IDs. Format: - * properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: - * "properties/123/dataStreams/456/globalSiteTag" + * @param parent Required. The parent resource where this secret will be created. Format: + * properties/{property}/dataStreams/{dataStream} + * @param measurementProtocolSecret Required. The measurement protocol secret to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GlobalSiteTag getGlobalSiteTag(GlobalSiteTagName name) { - GetGlobalSiteTagRequest request = - GetGlobalSiteTagRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getGlobalSiteTag(request); + public final MeasurementProtocolSecret createMeasurementProtocolSecret( + DataStreamName parent, MeasurementProtocolSecret measurementProtocolSecret) { + CreateMeasurementProtocolSecretRequest request = + CreateMeasurementProtocolSecretRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMeasurementProtocolSecret(measurementProtocolSecret) + .build(); + return createMeasurementProtocolSecret(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. + * Creates a measurement protocol secret. * *

Sample code: * @@ -2919,25 +2930,33 @@ public final GlobalSiteTag getGlobalSiteTag(GlobalSiteTagName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name); + * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * MeasurementProtocolSecret measurementProtocolSecret = + * MeasurementProtocolSecret.newBuilder().build(); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.createMeasurementProtocolSecret( + * parent, measurementProtocolSecret); * } * } * - * @param name Required. The name of the site tag to lookup. Note that site tags are singletons - * and do not have unique IDs. Format: - * properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: - * "properties/123/dataStreams/456/globalSiteTag" + * @param parent Required. The parent resource where this secret will be created. Format: + * properties/{property}/dataStreams/{dataStream} + * @param measurementProtocolSecret Required. The measurement protocol secret to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GlobalSiteTag getGlobalSiteTag(String name) { - GetGlobalSiteTagRequest request = GetGlobalSiteTagRequest.newBuilder().setName(name).build(); - return getGlobalSiteTag(request); + public final MeasurementProtocolSecret createMeasurementProtocolSecret( + String parent, MeasurementProtocolSecret measurementProtocolSecret) { + CreateMeasurementProtocolSecretRequest request = + CreateMeasurementProtocolSecretRequest.newBuilder() + .setParent(parent) + .setMeasurementProtocolSecret(measurementProtocolSecret) + .build(); + return createMeasurementProtocolSecret(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. + * Creates a measurement protocol secret. * *

Sample code: * @@ -2949,24 +2968,27 @@ public final GlobalSiteTag getGlobalSiteTag(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetGlobalSiteTagRequest request = - * GetGlobalSiteTagRequest.newBuilder() - * .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * CreateMeasurementProtocolSecretRequest request = + * CreateMeasurementProtocolSecretRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) * .build(); - * GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(request); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.createMeasurementProtocolSecret(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GlobalSiteTag getGlobalSiteTag(GetGlobalSiteTagRequest request) { - return getGlobalSiteTagCallable().call(request); + public final MeasurementProtocolSecret createMeasurementProtocolSecret( + CreateMeasurementProtocolSecretRequest request) { + return createMeasurementProtocolSecretCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. + * Creates a measurement protocol secret. * *

Sample code: * @@ -2978,24 +3000,26 @@ public final GlobalSiteTag getGlobalSiteTag(GetGlobalSiteTagRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetGlobalSiteTagRequest request = - * GetGlobalSiteTagRequest.newBuilder() - * .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * CreateMeasurementProtocolSecretRequest request = + * CreateMeasurementProtocolSecretRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getGlobalSiteTagCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createMeasurementProtocolSecretCallable().futureCall(request); * // Do something. - * GlobalSiteTag response = future.get(); + * MeasurementProtocolSecret response = future.get(); * } * } */ - public final UnaryCallable getGlobalSiteTagCallable() { - return stub.getGlobalSiteTagCallable(); + public final UnaryCallable + createMeasurementProtocolSecretCallable() { + return stub.createMeasurementProtocolSecretCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a GoogleAdsLink. + * Deletes target MeasurementProtocolSecret. * *

Sample code: * @@ -3007,29 +3031,28 @@ public final UnaryCallable getGlobalSite * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - * GoogleAdsLink response = - * analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink); + * MeasurementProtocolSecretName name = + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + * analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name); * } * } * - * @param parent Required. Example format: properties/1234 - * @param googleAdsLink Required. The GoogleAdsLink to create. + * @param name Required. The name of the MeasurementProtocolSecret to delete. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLink googleAdsLink) { - CreateGoogleAdsLinkRequest request = - CreateGoogleAdsLinkRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setGoogleAdsLink(googleAdsLink) + public final void deleteMeasurementProtocolSecret(MeasurementProtocolSecretName name) { + DeleteMeasurementProtocolSecretRequest request = + DeleteMeasurementProtocolSecretRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return createGoogleAdsLink(request); + deleteMeasurementProtocolSecret(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a GoogleAdsLink. + * Deletes target MeasurementProtocolSecret. * *

Sample code: * @@ -3041,29 +3064,27 @@ public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLin * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - * GoogleAdsLink response = - * analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink); + * String name = + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + * .toString(); + * analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name); * } * } * - * @param parent Required. Example format: properties/1234 - * @param googleAdsLink Required. The GoogleAdsLink to create. + * @param name Required. The name of the MeasurementProtocolSecret to delete. Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink googleAdsLink) { - CreateGoogleAdsLinkRequest request = - CreateGoogleAdsLinkRequest.newBuilder() - .setParent(parent) - .setGoogleAdsLink(googleAdsLink) - .build(); - return createGoogleAdsLink(request); + public final void deleteMeasurementProtocolSecret(String name) { + DeleteMeasurementProtocolSecretRequest request = + DeleteMeasurementProtocolSecretRequest.newBuilder().setName(name).build(); + deleteMeasurementProtocolSecret(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a GoogleAdsLink. + * Deletes target MeasurementProtocolSecret. * *

Sample code: * @@ -3075,25 +3096,28 @@ public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink goog * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateGoogleAdsLinkRequest request = - * CreateGoogleAdsLinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * DeleteMeasurementProtocolSecretRequest request = + * DeleteMeasurementProtocolSecretRequest.newBuilder() + * .setName( + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + * .toString()) * .build(); - * GoogleAdsLink response = analyticsAdminServiceClient.createGoogleAdsLink(request); + * analyticsAdminServiceClient.deleteMeasurementProtocolSecret(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest request) { - return createGoogleAdsLinkCallable().call(request); + public final void deleteMeasurementProtocolSecret( + DeleteMeasurementProtocolSecretRequest request) { + deleteMeasurementProtocolSecretCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a GoogleAdsLink. + * Deletes target MeasurementProtocolSecret. * *

Sample code: * @@ -3105,26 +3129,28 @@ public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateGoogleAdsLinkRequest request = - * CreateGoogleAdsLinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * DeleteMeasurementProtocolSecretRequest request = + * DeleteMeasurementProtocolSecretRequest.newBuilder() + * .setName( + * MeasurementProtocolSecretName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createGoogleAdsLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteMeasurementProtocolSecretCallable().futureCall(request); * // Do something. - * GoogleAdsLink response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - createGoogleAdsLinkCallable() { - return stub.createGoogleAdsLinkCallable(); + public final UnaryCallable + deleteMeasurementProtocolSecretCallable() { + return stub.deleteMeasurementProtocolSecretCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a GoogleAdsLink on a property + * Updates a measurement protocol secret. * *

Sample code: * @@ -3136,32 +3162,33 @@ public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + * MeasurementProtocolSecret measurementProtocolSecret = + * MeasurementProtocolSecret.newBuilder().build(); * FieldMask updateMask = FieldMask.newBuilder().build(); - * GoogleAdsLink response = - * analyticsAdminServiceClient.updateGoogleAdsLink(googleAdsLink, updateMask); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.updateMeasurementProtocolSecret( + * measurementProtocolSecret, updateMask); * } * } * - * @param googleAdsLink The GoogleAdsLink to update - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param measurementProtocolSecret Required. The measurement protocol secret to update. + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleAdsLink updateGoogleAdsLink( - GoogleAdsLink googleAdsLink, FieldMask updateMask) { - UpdateGoogleAdsLinkRequest request = - UpdateGoogleAdsLinkRequest.newBuilder() - .setGoogleAdsLink(googleAdsLink) + public final MeasurementProtocolSecret updateMeasurementProtocolSecret( + MeasurementProtocolSecret measurementProtocolSecret, FieldMask updateMask) { + UpdateMeasurementProtocolSecretRequest request = + UpdateMeasurementProtocolSecretRequest.newBuilder() + .setMeasurementProtocolSecret(measurementProtocolSecret) .setUpdateMask(updateMask) .build(); - return updateGoogleAdsLink(request); + return updateMeasurementProtocolSecret(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a GoogleAdsLink on a property + * Updates a measurement protocol secret. * *

Sample code: * @@ -3173,25 +3200,27 @@ public final GoogleAdsLink updateGoogleAdsLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateGoogleAdsLinkRequest request = - * UpdateGoogleAdsLinkRequest.newBuilder() - * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * UpdateMeasurementProtocolSecretRequest request = + * UpdateMeasurementProtocolSecretRequest.newBuilder() + * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * GoogleAdsLink response = analyticsAdminServiceClient.updateGoogleAdsLink(request); + * MeasurementProtocolSecret response = + * analyticsAdminServiceClient.updateMeasurementProtocolSecret(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest request) { - return updateGoogleAdsLinkCallable().call(request); + public final MeasurementProtocolSecret updateMeasurementProtocolSecret( + UpdateMeasurementProtocolSecretRequest request) { + return updateMeasurementProtocolSecretCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a GoogleAdsLink on a property + * Updates a measurement protocol secret. * *

Sample code: * @@ -3203,26 +3232,29 @@ public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateGoogleAdsLinkRequest request = - * UpdateGoogleAdsLinkRequest.newBuilder() - * .setGoogleAdsLink(GoogleAdsLink.newBuilder().build()) + * UpdateMeasurementProtocolSecretRequest request = + * UpdateMeasurementProtocolSecretRequest.newBuilder() + * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateGoogleAdsLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateMeasurementProtocolSecretCallable().futureCall(request); * // Do something. - * GoogleAdsLink response = future.get(); + * MeasurementProtocolSecret response = future.get(); * } * } */ - public final UnaryCallable - updateGoogleAdsLinkCallable() { - return stub.updateGoogleAdsLinkCallable(); + public final UnaryCallable + updateMeasurementProtocolSecretCallable() { + return stub.updateMeasurementProtocolSecretCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a GoogleAdsLink on a property + * Acknowledges the terms of user data collection for the specified property. + * + *

This acknowledgement must be completed (either in the Google Analytics UI or through this + * API) before MeasurementProtocolSecret resources may be created. * *

Sample code: * @@ -3234,25 +3266,30 @@ public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); - * analyticsAdminServiceClient.deleteGoogleAdsLink(name); + * AcknowledgeUserDataCollectionRequest request = + * AcknowledgeUserDataCollectionRequest.newBuilder() + * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * .setAcknowledgement("acknowledgement1769490938") + * .build(); + * AcknowledgeUserDataCollectionResponse response = + * analyticsAdminServiceClient.acknowledgeUserDataCollection(request); * } * } * - * @param name Required. Example format: properties/1234/googleAdsLinks/5678 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteGoogleAdsLink(GoogleAdsLinkName name) { - DeleteGoogleAdsLinkRequest request = - DeleteGoogleAdsLinkRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteGoogleAdsLink(request); + public final AcknowledgeUserDataCollectionResponse acknowledgeUserDataCollection( + AcknowledgeUserDataCollectionRequest request) { + return acknowledgeUserDataCollectionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a GoogleAdsLink on a property + * Acknowledges the terms of user data collection for the specified property. + * + *

This acknowledgement must be completed (either in the Google Analytics UI or through this + * API) before MeasurementProtocolSecret resources may be created. * *

Sample code: * @@ -3264,23 +3301,27 @@ public final void deleteGoogleAdsLink(GoogleAdsLinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString(); - * analyticsAdminServiceClient.deleteGoogleAdsLink(name); + * AcknowledgeUserDataCollectionRequest request = + * AcknowledgeUserDataCollectionRequest.newBuilder() + * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * .setAcknowledgement("acknowledgement1769490938") + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.acknowledgeUserDataCollectionCallable().futureCall(request); + * // Do something. + * AcknowledgeUserDataCollectionResponse response = future.get(); * } * } - * - * @param name Required. Example format: properties/1234/googleAdsLinks/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteGoogleAdsLink(String name) { - DeleteGoogleAdsLinkRequest request = - DeleteGoogleAdsLinkRequest.newBuilder().setName(name).build(); - deleteGoogleAdsLink(request); + public final UnaryCallable< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionCallable() { + return stub.acknowledgeUserDataCollectionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a GoogleAdsLink on a property + * Looks up a single SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3292,24 +3333,31 @@ public final void deleteGoogleAdsLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteGoogleAdsLinkRequest request = - * DeleteGoogleAdsLinkRequest.newBuilder() - * .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - * .build(); - * analyticsAdminServiceClient.deleteGoogleAdsLink(request); + * SKAdNetworkConversionValueSchemaName name = + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The resource name of SKAdNetwork conversion value schema to look up. + * Format: + * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request) { - deleteGoogleAdsLinkCallable().call(request); + public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema( + SKAdNetworkConversionValueSchemaName name) { + GetSKAdNetworkConversionValueSchemaRequest request = + GetSKAdNetworkConversionValueSchemaRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getSKAdNetworkConversionValueSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a GoogleAdsLink on a property + * Looks up a single SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3321,24 +3369,29 @@ public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteGoogleAdsLinkRequest request = - * DeleteGoogleAdsLinkRequest.newBuilder() - * .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteGoogleAdsLinkCallable().futureCall(request); - * // Do something. - * future.get(); + * String name = + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + * .toString(); + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(name); * } * } + * + * @param name Required. The resource name of SKAdNetwork conversion value schema to look up. + * Format: + * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable deleteGoogleAdsLinkCallable() { - return stub.deleteGoogleAdsLinkCallable(); + public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema(String name) { + GetSKAdNetworkConversionValueSchemaRequest request = + GetSKAdNetworkConversionValueSchemaRequest.newBuilder().setName(name).build(); + return getSKAdNetworkConversionValueSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists GoogleAdsLinks on a property. + * Looks up a single SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3350,28 +3403,29 @@ public final UnaryCallable deleteGoogleAdsLin * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (GoogleAdsLink element : - * analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) { - * // doThingsWith(element); - * } + * GetSKAdNetworkConversionValueSchemaRequest request = + * GetSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setName( + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + * .toString()) + * .build(); + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(request); * } * } * - * @param parent Required. Example format: properties/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName parent) { - ListGoogleAdsLinksRequest request = - ListGoogleAdsLinksRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listGoogleAdsLinks(request); + public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema( + GetSKAdNetworkConversionValueSchemaRequest request) { + return getSKAdNetworkConversionValueSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists GoogleAdsLinks on a property. + * Looks up a single SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3383,26 +3437,31 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName par * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (GoogleAdsLink element : - * analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) { - * // doThingsWith(element); - * } + * GetSKAdNetworkConversionValueSchemaRequest request = + * GetSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setName( + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + * .toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient + * .getSKAdNetworkConversionValueSchemaCallable() + * .futureCall(request); + * // Do something. + * SKAdNetworkConversionValueSchema response = future.get(); * } * } - * - * @param parent Required. Example format: properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent) { - ListGoogleAdsLinksRequest request = - ListGoogleAdsLinksRequest.newBuilder().setParent(parent).build(); - return listGoogleAdsLinks(request); + public final UnaryCallable< + GetSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> + getSKAdNetworkConversionValueSchemaCallable() { + return stub.getSKAdNetworkConversionValueSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists GoogleAdsLinks on a property. + * Creates a SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3414,30 +3473,34 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListGoogleAdsLinksRequest request = - * ListGoogleAdsLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * for (GoogleAdsLink element : - * analyticsAdminServiceClient.listGoogleAdsLinks(request).iterateAll()) { - * // doThingsWith(element); - * } + * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + * SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + * SKAdNetworkConversionValueSchema.newBuilder().build(); + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema( + * parent, skadnetworkConversionValueSchema); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The parent resource where this schema will be created. Format: + * properties/{property}/dataStreams/{dataStream} + * @param skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to + * create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( - ListGoogleAdsLinksRequest request) { - return listGoogleAdsLinksPagedCallable().call(request); + public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema( + DataStreamName parent, SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema) { + CreateSKAdNetworkConversionValueSchemaRequest request = + CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSkadnetworkConversionValueSchema(skadnetworkConversionValueSchema) + .build(); + return createSKAdNetworkConversionValueSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists GoogleAdsLinks on a property. + * Creates a SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3449,29 +3512,34 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListGoogleAdsLinksRequest request = - * ListGoogleAdsLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listGoogleAdsLinksPagedCallable().futureCall(request); - * // Do something. - * for (GoogleAdsLink element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + * SKAdNetworkConversionValueSchema.newBuilder().build(); + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema( + * parent, skadnetworkConversionValueSchema); * } * } + * + * @param parent Required. The parent resource where this schema will be created. Format: + * properties/{property}/dataStreams/{dataStream} + * @param skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to + * create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listGoogleAdsLinksPagedCallable() { - return stub.listGoogleAdsLinksPagedCallable(); + public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema( + String parent, SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema) { + CreateSKAdNetworkConversionValueSchemaRequest request = + CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() + .setParent(parent) + .setSkadnetworkConversionValueSchema(skadnetworkConversionValueSchema) + .build(); + return createSKAdNetworkConversionValueSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists GoogleAdsLinks on a property. + * Creates a SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3483,36 +3551,28 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListGoogleAdsLinksRequest request = - * ListGoogleAdsLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * CreateSKAdNetworkConversionValueSchemaRequest request = + * CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setSkadnetworkConversionValueSchema( + * SKAdNetworkConversionValueSchema.newBuilder().build()) * .build(); - * while (true) { - * ListGoogleAdsLinksResponse response = - * analyticsAdminServiceClient.listGoogleAdsLinksCallable().call(request); - * for (GoogleAdsLink element : response.getGoogleAdsLinksList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listGoogleAdsLinksCallable() { - return stub.listGoogleAdsLinksCallable(); + public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema( + CreateSKAdNetworkConversionValueSchemaRequest request) { + return createSKAdNetworkConversionValueSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get data sharing settings on an account. Data sharing settings are singletons. + * Creates a SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3524,26 +3584,30 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); - * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name); + * CreateSKAdNetworkConversionValueSchemaRequest request = + * CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setSkadnetworkConversionValueSchema( + * SKAdNetworkConversionValueSchema.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient + * .createSKAdNetworkConversionValueSchemaCallable() + * .futureCall(request); + * // Do something. + * SKAdNetworkConversionValueSchema response = future.get(); * } * } - * - * @param name Required. The name of the settings to lookup. Format: - * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName name) { - GetDataSharingSettingsRequest request = - GetDataSharingSettingsRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getDataSharingSettings(request); + public final UnaryCallable< + CreateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> + createSKAdNetworkConversionValueSchemaCallable() { + return stub.createSKAdNetworkConversionValueSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get data sharing settings on an account. Data sharing settings are singletons. + * Deletes target SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3555,24 +3619,29 @@ public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = DataSharingSettingsName.of("[ACCOUNT]").toString(); - * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name); + * SKAdNetworkConversionValueSchemaName name = + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + * analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(name); * } * } * - * @param name Required. The name of the settings to lookup. Format: - * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" + * @param name Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: + * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataSharingSettings getDataSharingSettings(String name) { - GetDataSharingSettingsRequest request = - GetDataSharingSettingsRequest.newBuilder().setName(name).build(); - return getDataSharingSettings(request); + public final void deleteSKAdNetworkConversionValueSchema( + SKAdNetworkConversionValueSchemaName name) { + DeleteSKAdNetworkConversionValueSchemaRequest request = + DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteSKAdNetworkConversionValueSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get data sharing settings on an account. Data sharing settings are singletons. + * Deletes target SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3584,24 +3653,27 @@ public final DataSharingSettings getDataSharingSettings(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDataSharingSettingsRequest request = - * GetDataSharingSettingsRequest.newBuilder() - * .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) - * .build(); - * DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(request); + * String name = + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + * .toString(); + * analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: + * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRequest request) { - return getDataSharingSettingsCallable().call(request); + public final void deleteSKAdNetworkConversionValueSchema(String name) { + DeleteSKAdNetworkConversionValueSchemaRequest request = + DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder().setName(name).build(); + deleteSKAdNetworkConversionValueSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Get data sharing settings on an account. Data sharing settings are singletons. + * Deletes target SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3613,25 +3685,28 @@ public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRe * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDataSharingSettingsRequest request = - * GetDataSharingSettingsRequest.newBuilder() - * .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + * DeleteSKAdNetworkConversionValueSchemaRequest request = + * DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setName( + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getDataSharingSettingsCallable().futureCall(request); - * // Do something. - * DataSharingSettings response = future.get(); + * analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - getDataSharingSettingsCallable() { - return stub.getDataSharingSettingsCallable(); + public final void deleteSKAdNetworkConversionValueSchema( + DeleteSKAdNetworkConversionValueSchemaRequest request) { + deleteSKAdNetworkConversionValueSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single "GA4" MeasurementProtocolSecret. + * Deletes target SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3643,30 +3718,30 @@ public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRe * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * MeasurementProtocolSecretName name = - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.getMeasurementProtocolSecret(name); + * DeleteSKAdNetworkConversionValueSchemaRequest request = + * DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setName( + * SKAdNetworkConversionValueSchemaName.of( + * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + * .toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient + * .deleteSKAdNetworkConversionValueSchemaCallable() + * .futureCall(request); + * // Do something. + * future.get(); * } * } - * - * @param name Required. The name of the measurement protocol secret to lookup. Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret getMeasurementProtocolSecret( - MeasurementProtocolSecretName name) { - GetMeasurementProtocolSecretRequest request = - GetMeasurementProtocolSecretRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getMeasurementProtocolSecret(request); + public final UnaryCallable + deleteSKAdNetworkConversionValueSchemaCallable() { + return stub.deleteSKAdNetworkConversionValueSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single "GA4" MeasurementProtocolSecret. + * Updates a SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3678,28 +3753,34 @@ public final MeasurementProtocolSecret getMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - * .toString(); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.getMeasurementProtocolSecret(name); + * SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + * SKAdNetworkConversionValueSchema.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.updateSKAdNetworkConversionValueSchema( + * skadnetworkConversionValueSchema, updateMask); * } * } * - * @param name Required. The name of the measurement protocol secret to lookup. Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @param skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to + * update. + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret getMeasurementProtocolSecret(String name) { - GetMeasurementProtocolSecretRequest request = - GetMeasurementProtocolSecretRequest.newBuilder().setName(name).build(); - return getMeasurementProtocolSecret(request); + public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSchema( + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema, FieldMask updateMask) { + UpdateSKAdNetworkConversionValueSchemaRequest request = + UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder() + .setSkadnetworkConversionValueSchema(skadnetworkConversionValueSchema) + .setUpdateMask(updateMask) + .build(); + return updateSKAdNetworkConversionValueSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single "GA4" MeasurementProtocolSecret. + * Updates a SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3711,29 +3792,28 @@ public final MeasurementProtocolSecret getMeasurementProtocolSecret(String name) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetMeasurementProtocolSecretRequest request = - * GetMeasurementProtocolSecretRequest.newBuilder() - * .setName( - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - * .toString()) + * UpdateSKAdNetworkConversionValueSchemaRequest request = + * UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setSkadnetworkConversionValueSchema( + * SKAdNetworkConversionValueSchema.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.getMeasurementProtocolSecret(request); + * SKAdNetworkConversionValueSchema response = + * analyticsAdminServiceClient.updateSKAdNetworkConversionValueSchema(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret getMeasurementProtocolSecret( - GetMeasurementProtocolSecretRequest request) { - return getMeasurementProtocolSecretCallable().call(request); + public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSchema( + UpdateSKAdNetworkConversionValueSchemaRequest request) { + return updateSKAdNetworkConversionValueSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single "GA4" MeasurementProtocolSecret. + * Updates a SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3745,28 +3825,31 @@ public final MeasurementProtocolSecret getMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetMeasurementProtocolSecretRequest request = - * GetMeasurementProtocolSecretRequest.newBuilder() - * .setName( - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - * .toString()) + * UpdateSKAdNetworkConversionValueSchemaRequest request = + * UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder() + * .setSkadnetworkConversionValueSchema( + * SKAdNetworkConversionValueSchema.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getMeasurementProtocolSecretCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .updateSKAdNetworkConversionValueSchemaCallable() + * .futureCall(request); * // Do something. - * MeasurementProtocolSecret response = future.get(); + * SKAdNetworkConversionValueSchema response = future.get(); * } * } */ - public final UnaryCallable - getMeasurementProtocolSecretCallable() { - return stub.getMeasurementProtocolSecretCallable(); + public final UnaryCallable< + UpdateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> + updateSKAdNetworkConversionValueSchemaCallable() { + return stub.updateSKAdNetworkConversionValueSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns child MeasurementProtocolSecrets under the specified parent Property. + * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one + * SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3779,29 +3862,30 @@ public final MeasurementProtocolSecret getMeasurementProtocolSecret( * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - * for (MeasurementProtocolSecret element : - * analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) { + * for (SKAdNetworkConversionValueSchema element : + * analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. The resource name of the parent stream. Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param parent Required. The DataStream resource to list schemas for. Format: + * properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( - DataStreamName parent) { - ListMeasurementProtocolSecretsRequest request = - ListMeasurementProtocolSecretsRequest.newBuilder() + public final ListSKAdNetworkConversionValueSchemasPagedResponse + listSKAdNetworkConversionValueSchemas(DataStreamName parent) { + ListSKAdNetworkConversionValueSchemasRequest request = + ListSKAdNetworkConversionValueSchemasRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); - return listMeasurementProtocolSecrets(request); + return listSKAdNetworkConversionValueSchemas(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns child MeasurementProtocolSecrets under the specified parent Property. + * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one + * SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3814,27 +3898,28 @@ public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocol * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * for (MeasurementProtocolSecret element : - * analyticsAdminServiceClient.listMeasurementProtocolSecrets(parent).iterateAll()) { + * for (SKAdNetworkConversionValueSchema element : + * analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. The resource name of the parent stream. Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param parent Required. The DataStream resource to list schemas for. Format: + * properties/{property_id}/dataStreams/{dataStream} Example: properties/1234/dataStreams/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( - String parent) { - ListMeasurementProtocolSecretsRequest request = - ListMeasurementProtocolSecretsRequest.newBuilder().setParent(parent).build(); - return listMeasurementProtocolSecrets(request); + public final ListSKAdNetworkConversionValueSchemasPagedResponse + listSKAdNetworkConversionValueSchemas(String parent) { + ListSKAdNetworkConversionValueSchemasRequest request = + ListSKAdNetworkConversionValueSchemasRequest.newBuilder().setParent(parent).build(); + return listSKAdNetworkConversionValueSchemas(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns child MeasurementProtocolSecrets under the specified parent Property. + * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one + * SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3846,14 +3931,14 @@ public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocol * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListMeasurementProtocolSecretsRequest request = - * ListMeasurementProtocolSecretsRequest.newBuilder() + * ListSKAdNetworkConversionValueSchemasRequest request = + * ListSKAdNetworkConversionValueSchemasRequest.newBuilder() * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * for (MeasurementProtocolSecret element : - * analyticsAdminServiceClient.listMeasurementProtocolSecrets(request).iterateAll()) { + * for (SKAdNetworkConversionValueSchema element : + * analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(request).iterateAll()) { * // doThingsWith(element); * } * } @@ -3862,14 +3947,15 @@ public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocol * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocolSecrets( - ListMeasurementProtocolSecretsRequest request) { - return listMeasurementProtocolSecretsPagedCallable().call(request); + public final ListSKAdNetworkConversionValueSchemasPagedResponse + listSKAdNetworkConversionValueSchemas(ListSKAdNetworkConversionValueSchemasRequest request) { + return listSKAdNetworkConversionValueSchemasPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns child MeasurementProtocolSecrets under the specified parent Property. + * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one + * SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3881,32 +3967,34 @@ public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocol * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListMeasurementProtocolSecretsRequest request = - * ListMeasurementProtocolSecretsRequest.newBuilder() + * ListSKAdNetworkConversionValueSchemasRequest request = + * ListSKAdNetworkConversionValueSchemasRequest.newBuilder() * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = + * ApiFuture future = * analyticsAdminServiceClient - * .listMeasurementProtocolSecretsPagedCallable() + * .listSKAdNetworkConversionValueSchemasPagedCallable() * .futureCall(request); * // Do something. - * for (MeasurementProtocolSecret element : future.get().iterateAll()) { + * for (SKAdNetworkConversionValueSchema element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ public final UnaryCallable< - ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsPagedResponse> - listMeasurementProtocolSecretsPagedCallable() { - return stub.listMeasurementProtocolSecretsPagedCallable(); + ListSKAdNetworkConversionValueSchemasRequest, + ListSKAdNetworkConversionValueSchemasPagedResponse> + listSKAdNetworkConversionValueSchemasPagedCallable() { + return stub.listSKAdNetworkConversionValueSchemasPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns child MeasurementProtocolSecrets under the specified parent Property. + * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one + * SKAdNetworkConversionValueSchema. * *

Sample code: * @@ -3918,16 +4006,19 @@ public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocol * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListMeasurementProtocolSecretsRequest request = - * ListMeasurementProtocolSecretsRequest.newBuilder() + * ListSKAdNetworkConversionValueSchemasRequest request = + * ListSKAdNetworkConversionValueSchemasRequest.newBuilder() * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); * while (true) { - * ListMeasurementProtocolSecretsResponse response = - * analyticsAdminServiceClient.listMeasurementProtocolSecretsCallable().call(request); - * for (MeasurementProtocolSecret element : response.getMeasurementProtocolSecretsList()) { + * ListSKAdNetworkConversionValueSchemasResponse response = + * analyticsAdminServiceClient + * .listSKAdNetworkConversionValueSchemasCallable() + * .call(request); + * for (SKAdNetworkConversionValueSchema element : + * response.getSkadnetworkConversionValueSchemasList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -3941,14 +4032,15 @@ public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocol * } */ public final UnaryCallable< - ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> - listMeasurementProtocolSecretsCallable() { - return stub.listMeasurementProtocolSecretsCallable(); + ListSKAdNetworkConversionValueSchemasRequest, + ListSKAdNetworkConversionValueSchemasResponse> + listSKAdNetworkConversionValueSchemasCallable() { + return stub.listSKAdNetworkConversionValueSchemasCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a measurement protocol secret. + * Searches through all changes to an account or its children given the specified set of filters. * *

Sample code: * @@ -3960,33 +4052,36 @@ public final ListMeasurementProtocolSecretsPagedResponse listMeasurementProtocol * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - * MeasurementProtocolSecret measurementProtocolSecret = - * MeasurementProtocolSecret.newBuilder().build(); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.createMeasurementProtocolSecret( - * parent, measurementProtocolSecret); + * SearchChangeHistoryEventsRequest request = + * SearchChangeHistoryEventsRequest.newBuilder() + * .setAccount(AccountName.of("[ACCOUNT]").toString()) + * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * .addAllResourceType(new ArrayList()) + * .addAllAction(new ArrayList()) + * .addAllActorEmail(new ArrayList()) + * .setEarliestChangeTime(Timestamp.newBuilder().build()) + * .setLatestChangeTime(Timestamp.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (ChangeHistoryEvent element : + * analyticsAdminServiceClient.searchChangeHistoryEvents(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param parent Required. The parent resource where this secret will be created. Format: - * properties/{property}/dataStreams/{dataStream} - * @param measurementProtocolSecret Required. The measurement protocol secret to create. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret createMeasurementProtocolSecret( - DataStreamName parent, MeasurementProtocolSecret measurementProtocolSecret) { - CreateMeasurementProtocolSecretRequest request = - CreateMeasurementProtocolSecretRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setMeasurementProtocolSecret(measurementProtocolSecret) - .build(); - return createMeasurementProtocolSecret(request); + public final SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents( + SearchChangeHistoryEventsRequest request) { + return searchChangeHistoryEventsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a measurement protocol secret. + * Searches through all changes to an account or its children given the specified set of filters. * *

Sample code: * @@ -3998,33 +4093,36 @@ public final MeasurementProtocolSecret createMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * MeasurementProtocolSecret measurementProtocolSecret = - * MeasurementProtocolSecret.newBuilder().build(); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.createMeasurementProtocolSecret( - * parent, measurementProtocolSecret); + * SearchChangeHistoryEventsRequest request = + * SearchChangeHistoryEventsRequest.newBuilder() + * .setAccount(AccountName.of("[ACCOUNT]").toString()) + * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * .addAllResourceType(new ArrayList()) + * .addAllAction(new ArrayList()) + * .addAllActorEmail(new ArrayList()) + * .setEarliestChangeTime(Timestamp.newBuilder().build()) + * .setLatestChangeTime(Timestamp.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.searchChangeHistoryEventsPagedCallable().futureCall(request); + * // Do something. + * for (ChangeHistoryEvent element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } - * - * @param parent Required. The parent resource where this secret will be created. Format: - * properties/{property}/dataStreams/{dataStream} - * @param measurementProtocolSecret Required. The measurement protocol secret to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret createMeasurementProtocolSecret( - String parent, MeasurementProtocolSecret measurementProtocolSecret) { - CreateMeasurementProtocolSecretRequest request = - CreateMeasurementProtocolSecretRequest.newBuilder() - .setParent(parent) - .setMeasurementProtocolSecret(measurementProtocolSecret) - .build(); - return createMeasurementProtocolSecret(request); + public final UnaryCallable< + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsPagedResponse> + searchChangeHistoryEventsPagedCallable() { + return stub.searchChangeHistoryEventsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a measurement protocol secret. + * Searches through all changes to an account or its children given the specified set of filters. * *

Sample code: * @@ -4036,27 +4134,42 @@ public final MeasurementProtocolSecret createMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateMeasurementProtocolSecretRequest request = - * CreateMeasurementProtocolSecretRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) + * SearchChangeHistoryEventsRequest request = + * SearchChangeHistoryEventsRequest.newBuilder() + * .setAccount(AccountName.of("[ACCOUNT]").toString()) + * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * .addAllResourceType(new ArrayList()) + * .addAllAction(new ArrayList()) + * .addAllActorEmail(new ArrayList()) + * .setEarliestChangeTime(Timestamp.newBuilder().build()) + * .setLatestChangeTime(Timestamp.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.createMeasurementProtocolSecret(request); + * while (true) { + * SearchChangeHistoryEventsResponse response = + * analyticsAdminServiceClient.searchChangeHistoryEventsCallable().call(request); + * for (ChangeHistoryEvent element : response.getChangeHistoryEventsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret createMeasurementProtocolSecret( - CreateMeasurementProtocolSecretRequest request) { - return createMeasurementProtocolSecretCallable().call(request); + public final UnaryCallable + searchChangeHistoryEventsCallable() { + return stub.searchChangeHistoryEventsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a measurement protocol secret. + * Lookup for Google Signals settings for a property. * *

Sample code: * @@ -4068,26 +4181,26 @@ public final MeasurementProtocolSecret createMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateMeasurementProtocolSecretRequest request = - * CreateMeasurementProtocolSecretRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createMeasurementProtocolSecretCallable().futureCall(request); - * // Do something. - * MeasurementProtocolSecret response = future.get(); + * GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); + * GoogleSignalsSettings response = analyticsAdminServiceClient.getGoogleSignalsSettings(name); * } * } + * + * @param name Required. The name of the google signals settings to retrieve. Format: + * properties/{property}/googleSignalsSettings + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - createMeasurementProtocolSecretCallable() { - return stub.createMeasurementProtocolSecretCallable(); + public final GoogleSignalsSettings getGoogleSignalsSettings(GoogleSignalsSettingsName name) { + GetGoogleSignalsSettingsRequest request = + GetGoogleSignalsSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getGoogleSignalsSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target MeasurementProtocolSecret. + * Lookup for Google Signals settings for a property. * *

Sample code: * @@ -4099,28 +4212,24 @@ public final MeasurementProtocolSecret createMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * MeasurementProtocolSecretName name = - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - * analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name); + * String name = GoogleSignalsSettingsName.of("[PROPERTY]").toString(); + * GoogleSignalsSettings response = analyticsAdminServiceClient.getGoogleSignalsSettings(name); * } * } * - * @param name Required. The name of the MeasurementProtocolSecret to delete. Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @param name Required. The name of the google signals settings to retrieve. Format: + * properties/{property}/googleSignalsSettings * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteMeasurementProtocolSecret(MeasurementProtocolSecretName name) { - DeleteMeasurementProtocolSecretRequest request = - DeleteMeasurementProtocolSecretRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteMeasurementProtocolSecret(request); + public final GoogleSignalsSettings getGoogleSignalsSettings(String name) { + GetGoogleSignalsSettingsRequest request = + GetGoogleSignalsSettingsRequest.newBuilder().setName(name).build(); + return getGoogleSignalsSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target MeasurementProtocolSecret. + * Lookup for Google Signals settings for a property. * *

Sample code: * @@ -4132,27 +4241,26 @@ public final void deleteMeasurementProtocolSecret(MeasurementProtocolSecretName * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - * .toString(); - * analyticsAdminServiceClient.deleteMeasurementProtocolSecret(name); + * GetGoogleSignalsSettingsRequest request = + * GetGoogleSignalsSettingsRequest.newBuilder() + * .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + * .build(); + * GoogleSignalsSettings response = + * analyticsAdminServiceClient.getGoogleSignalsSettings(request); * } * } * - * @param name Required. The name of the MeasurementProtocolSecret to delete. Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteMeasurementProtocolSecret(String name) { - DeleteMeasurementProtocolSecretRequest request = - DeleteMeasurementProtocolSecretRequest.newBuilder().setName(name).build(); - deleteMeasurementProtocolSecret(request); + public final GoogleSignalsSettings getGoogleSignalsSettings( + GetGoogleSignalsSettingsRequest request) { + return getGoogleSignalsSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target MeasurementProtocolSecret. + * Lookup for Google Signals settings for a property. * *

Sample code: * @@ -4164,28 +4272,25 @@ public final void deleteMeasurementProtocolSecret(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteMeasurementProtocolSecretRequest request = - * DeleteMeasurementProtocolSecretRequest.newBuilder() - * .setName( - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - * .toString()) + * GetGoogleSignalsSettingsRequest request = + * GetGoogleSignalsSettingsRequest.newBuilder() + * .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) * .build(); - * analyticsAdminServiceClient.deleteMeasurementProtocolSecret(request); + * ApiFuture future = + * analyticsAdminServiceClient.getGoogleSignalsSettingsCallable().futureCall(request); + * // Do something. + * GoogleSignalsSettings response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteMeasurementProtocolSecret( - DeleteMeasurementProtocolSecretRequest request) { - deleteMeasurementProtocolSecretCallable().call(request); + public final UnaryCallable + getGoogleSignalsSettingsCallable() { + return stub.getGoogleSignalsSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target MeasurementProtocolSecret. + * Updates Google Signals settings for a property. * *

Sample code: * @@ -4197,28 +4302,34 @@ public final void deleteMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteMeasurementProtocolSecretRequest request = - * DeleteMeasurementProtocolSecretRequest.newBuilder() - * .setName( - * MeasurementProtocolSecretName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - * .toString()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteMeasurementProtocolSecretCallable().futureCall(request); - * // Do something. - * future.get(); + * GoogleSignalsSettings googleSignalsSettings = GoogleSignalsSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * GoogleSignalsSettings response = + * analyticsAdminServiceClient.updateGoogleSignalsSettings( + * googleSignalsSettings, updateMask); * } * } + * + * @param googleSignalsSettings Required. The settings to update. The `name` field is used to + * identify the settings to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - deleteMeasurementProtocolSecretCallable() { - return stub.deleteMeasurementProtocolSecretCallable(); + public final GoogleSignalsSettings updateGoogleSignalsSettings( + GoogleSignalsSettings googleSignalsSettings, FieldMask updateMask) { + UpdateGoogleSignalsSettingsRequest request = + UpdateGoogleSignalsSettingsRequest.newBuilder() + .setGoogleSignalsSettings(googleSignalsSettings) + .setUpdateMask(updateMask) + .build(); + return updateGoogleSignalsSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a measurement protocol secret. + * Updates Google Signals settings for a property. * *

Sample code: * @@ -4230,33 +4341,27 @@ public final void deleteMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * MeasurementProtocolSecret measurementProtocolSecret = - * MeasurementProtocolSecret.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.updateMeasurementProtocolSecret( - * measurementProtocolSecret, updateMask); + * UpdateGoogleSignalsSettingsRequest request = + * UpdateGoogleSignalsSettingsRequest.newBuilder() + * .setGoogleSignalsSettings(GoogleSignalsSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * GoogleSignalsSettings response = + * analyticsAdminServiceClient.updateGoogleSignalsSettings(request); * } * } * - * @param measurementProtocolSecret Required. The measurement protocol secret to update. - * @param updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret updateMeasurementProtocolSecret( - MeasurementProtocolSecret measurementProtocolSecret, FieldMask updateMask) { - UpdateMeasurementProtocolSecretRequest request = - UpdateMeasurementProtocolSecretRequest.newBuilder() - .setMeasurementProtocolSecret(measurementProtocolSecret) - .setUpdateMask(updateMask) - .build(); - return updateMeasurementProtocolSecret(request); + public final GoogleSignalsSettings updateGoogleSignalsSettings( + UpdateGoogleSignalsSettingsRequest request) { + return updateGoogleSignalsSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a measurement protocol secret. + * Updates Google Signals settings for a property. * *

Sample code: * @@ -4268,27 +4373,26 @@ public final MeasurementProtocolSecret updateMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateMeasurementProtocolSecretRequest request = - * UpdateMeasurementProtocolSecretRequest.newBuilder() - * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) + * UpdateGoogleSignalsSettingsRequest request = + * UpdateGoogleSignalsSettingsRequest.newBuilder() + * .setGoogleSignalsSettings(GoogleSignalsSettings.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * MeasurementProtocolSecret response = - * analyticsAdminServiceClient.updateMeasurementProtocolSecret(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateGoogleSignalsSettingsCallable().futureCall(request); + * // Do something. + * GoogleSignalsSettings response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final MeasurementProtocolSecret updateMeasurementProtocolSecret( - UpdateMeasurementProtocolSecretRequest request) { - return updateMeasurementProtocolSecretCallable().call(request); + public final UnaryCallable + updateGoogleSignalsSettingsCallable() { + return stub.updateGoogleSignalsSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a measurement protocol secret. + * Creates a conversion event with the specified attributes. * *

Sample code: * @@ -4300,29 +4404,31 @@ public final MeasurementProtocolSecret updateMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateMeasurementProtocolSecretRequest request = - * UpdateMeasurementProtocolSecretRequest.newBuilder() - * .setMeasurementProtocolSecret(MeasurementProtocolSecret.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateMeasurementProtocolSecretCallable().futureCall(request); - * // Do something. - * MeasurementProtocolSecret response = future.get(); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + * ConversionEvent response = + * analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent); * } * } + * + * @param parent Required. The resource name of the parent property where this conversion event + * will be created. Format: properties/123 + * @param conversionEvent Required. The conversion event to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - updateMeasurementProtocolSecretCallable() { - return stub.updateMeasurementProtocolSecretCallable(); + public final ConversionEvent createConversionEvent( + PropertyName parent, ConversionEvent conversionEvent) { + CreateConversionEventRequest request = + CreateConversionEventRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConversionEvent(conversionEvent) + .build(); + return createConversionEvent(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Acknowledges the terms of user data collection for the specified property. - * - *

This acknowledgement must be completed (either in the Google Analytics UI or through this - * API) before MeasurementProtocolSecret resources may be created. + * Creates a conversion event with the specified attributes. * *

Sample code: * @@ -4334,30 +4440,31 @@ public final MeasurementProtocolSecret updateMeasurementProtocolSecret( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AcknowledgeUserDataCollectionRequest request = - * AcknowledgeUserDataCollectionRequest.newBuilder() - * .setProperty(PropertyName.of("[PROPERTY]").toString()) - * .setAcknowledgement("acknowledgement1769490938") - * .build(); - * AcknowledgeUserDataCollectionResponse response = - * analyticsAdminServiceClient.acknowledgeUserDataCollection(request); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + * ConversionEvent response = + * analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The resource name of the parent property where this conversion event + * will be created. Format: properties/123 + * @param conversionEvent Required. The conversion event to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AcknowledgeUserDataCollectionResponse acknowledgeUserDataCollection( - AcknowledgeUserDataCollectionRequest request) { - return acknowledgeUserDataCollectionCallable().call(request); + public final ConversionEvent createConversionEvent( + String parent, ConversionEvent conversionEvent) { + CreateConversionEventRequest request = + CreateConversionEventRequest.newBuilder() + .setParent(parent) + .setConversionEvent(conversionEvent) + .build(); + return createConversionEvent(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Acknowledges the terms of user data collection for the specified property. - * - *

This acknowledgement must be completed (either in the Google Analytics UI or through this - * API) before MeasurementProtocolSecret resources may be created. + * Creates a conversion event with the specified attributes. * *

Sample code: * @@ -4369,27 +4476,25 @@ public final AcknowledgeUserDataCollectionResponse acknowledgeUserDataCollection * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AcknowledgeUserDataCollectionRequest request = - * AcknowledgeUserDataCollectionRequest.newBuilder() - * .setProperty(PropertyName.of("[PROPERTY]").toString()) - * .setAcknowledgement("acknowledgement1769490938") + * CreateConversionEventRequest request = + * CreateConversionEventRequest.newBuilder() + * .setConversionEvent(ConversionEvent.newBuilder().build()) + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.acknowledgeUserDataCollectionCallable().futureCall(request); - * // Do something. - * AcknowledgeUserDataCollectionResponse response = future.get(); + * ConversionEvent response = analyticsAdminServiceClient.createConversionEvent(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> - acknowledgeUserDataCollectionCallable() { - return stub.acknowledgeUserDataCollectionCallable(); + public final ConversionEvent createConversionEvent(CreateConversionEventRequest request) { + return createConversionEventCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single SKAdNetworkConversionValueSchema. + * Creates a conversion event with the specified attributes. * *

Sample code: * @@ -4401,31 +4506,26 @@ public final AcknowledgeUserDataCollectionResponse acknowledgeUserDataCollection * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SKAdNetworkConversionValueSchemaName name = - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - * SKAdNetworkConversionValueSchema response = - * analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(name); + * CreateConversionEventRequest request = + * CreateConversionEventRequest.newBuilder() + * .setConversionEvent(ConversionEvent.newBuilder().build()) + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.createConversionEventCallable().futureCall(request); + * // Do something. + * ConversionEvent response = future.get(); * } * } - * - * @param name Required. The resource name of SKAdNetwork conversion value schema to look up. - * Format: - * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema( - SKAdNetworkConversionValueSchemaName name) { - GetSKAdNetworkConversionValueSchemaRequest request = - GetSKAdNetworkConversionValueSchemaRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getSKAdNetworkConversionValueSchema(request); + public final UnaryCallable + createConversionEventCallable() { + return stub.createConversionEventCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single SKAdNetworkConversionValueSchema. + * Updates a conversion event with the specified attributes. * *

Sample code: * @@ -4437,29 +4537,33 @@ public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchem * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - * .toString(); - * SKAdNetworkConversionValueSchema response = - * analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(name); + * ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * ConversionEvent response = + * analyticsAdminServiceClient.updateConversionEvent(conversionEvent, updateMask); * } * } * - * @param name Required. The resource name of SKAdNetwork conversion value schema to look up. - * Format: - * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} + * @param conversionEvent Required. The conversion event to update. The `name` field is used to + * identify the settings to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema(String name) { - GetSKAdNetworkConversionValueSchemaRequest request = - GetSKAdNetworkConversionValueSchemaRequest.newBuilder().setName(name).build(); - return getSKAdNetworkConversionValueSchema(request); + public final ConversionEvent updateConversionEvent( + ConversionEvent conversionEvent, FieldMask updateMask) { + UpdateConversionEventRequest request = + UpdateConversionEventRequest.newBuilder() + .setConversionEvent(conversionEvent) + .setUpdateMask(updateMask) + .build(); + return updateConversionEvent(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single SKAdNetworkConversionValueSchema. + * Updates a conversion event with the specified attributes. * *

Sample code: * @@ -4471,29 +4575,25 @@ public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchem * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetSKAdNetworkConversionValueSchemaRequest request = - * GetSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setName( - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - * .toString()) + * UpdateConversionEventRequest request = + * UpdateConversionEventRequest.newBuilder() + * .setConversionEvent(ConversionEvent.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * SKAdNetworkConversionValueSchema response = - * analyticsAdminServiceClient.getSKAdNetworkConversionValueSchema(request); + * ConversionEvent response = analyticsAdminServiceClient.updateConversionEvent(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchema( - GetSKAdNetworkConversionValueSchemaRequest request) { - return getSKAdNetworkConversionValueSchemaCallable().call(request); + public final ConversionEvent updateConversionEvent(UpdateConversionEventRequest request) { + return updateConversionEventCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single SKAdNetworkConversionValueSchema. + * Updates a conversion event with the specified attributes. * *

Sample code: * @@ -4505,31 +4605,26 @@ public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchem * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetSKAdNetworkConversionValueSchemaRequest request = - * GetSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setName( - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - * .toString()) + * UpdateConversionEventRequest request = + * UpdateConversionEventRequest.newBuilder() + * .setConversionEvent(ConversionEvent.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .getSKAdNetworkConversionValueSchemaCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateConversionEventCallable().futureCall(request); * // Do something. - * SKAdNetworkConversionValueSchema response = future.get(); + * ConversionEvent response = future.get(); * } * } */ - public final UnaryCallable< - GetSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> - getSKAdNetworkConversionValueSchemaCallable() { - return stub.getSKAdNetworkConversionValueSchemaCallable(); + public final UnaryCallable + updateConversionEventCallable() { + return stub.updateConversionEventCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SKAdNetworkConversionValueSchema. + * Retrieve a single conversion event. * *

Sample code: * @@ -4541,34 +4636,27 @@ public final SKAdNetworkConversionValueSchema getSKAdNetworkConversionValueSchem * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - * SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - * SKAdNetworkConversionValueSchema.newBuilder().build(); - * SKAdNetworkConversionValueSchema response = - * analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema( - * parent, skadnetworkConversionValueSchema); + * ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + * ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name); * } * } * - * @param parent Required. The parent resource where this schema will be created. Format: - * properties/{property}/dataStreams/{dataStream} - * @param skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to - * create. + * @param name Required. The resource name of the conversion event to retrieve. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema( - DataStreamName parent, SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema) { - CreateSKAdNetworkConversionValueSchemaRequest request = - CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSkadnetworkConversionValueSchema(skadnetworkConversionValueSchema) + public final ConversionEvent getConversionEvent(ConversionEventName name) { + GetConversionEventRequest request = + GetConversionEventRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return createSKAdNetworkConversionValueSchema(request); + return getConversionEvent(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SKAdNetworkConversionValueSchema. + * Retrieve a single conversion event. * *

Sample code: * @@ -4580,34 +4668,25 @@ public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - * SKAdNetworkConversionValueSchema.newBuilder().build(); - * SKAdNetworkConversionValueSchema response = - * analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema( - * parent, skadnetworkConversionValueSchema); + * String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString(); + * ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name); * } * } * - * @param parent Required. The parent resource where this schema will be created. Format: - * properties/{property}/dataStreams/{dataStream} - * @param skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to - * create. + * @param name Required. The resource name of the conversion event to retrieve. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema( - String parent, SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema) { - CreateSKAdNetworkConversionValueSchemaRequest request = - CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() - .setParent(parent) - .setSkadnetworkConversionValueSchema(skadnetworkConversionValueSchema) - .build(); - return createSKAdNetworkConversionValueSchema(request); + public final ConversionEvent getConversionEvent(String name) { + GetConversionEventRequest request = + GetConversionEventRequest.newBuilder().setName(name).build(); + return getConversionEvent(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SKAdNetworkConversionValueSchema. + * Retrieve a single conversion event. * *

Sample code: * @@ -4619,28 +4698,24 @@ public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateSKAdNetworkConversionValueSchemaRequest request = - * CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setSkadnetworkConversionValueSchema( - * SKAdNetworkConversionValueSchema.newBuilder().build()) + * GetConversionEventRequest request = + * GetConversionEventRequest.newBuilder() + * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) * .build(); - * SKAdNetworkConversionValueSchema response = - * analyticsAdminServiceClient.createSKAdNetworkConversionValueSchema(request); + * ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSchema( - CreateSKAdNetworkConversionValueSchemaRequest request) { - return createSKAdNetworkConversionValueSchemaCallable().call(request); + public final ConversionEvent getConversionEvent(GetConversionEventRequest request) { + return getConversionEventCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SKAdNetworkConversionValueSchema. + * Retrieve a single conversion event. * *

Sample code: * @@ -4652,30 +4727,25 @@ public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateSKAdNetworkConversionValueSchemaRequest request = - * CreateSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setSkadnetworkConversionValueSchema( - * SKAdNetworkConversionValueSchema.newBuilder().build()) + * GetConversionEventRequest request = + * GetConversionEventRequest.newBuilder() + * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .createSKAdNetworkConversionValueSchemaCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getConversionEventCallable().futureCall(request); * // Do something. - * SKAdNetworkConversionValueSchema response = future.get(); + * ConversionEvent response = future.get(); * } * } */ - public final UnaryCallable< - CreateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> - createSKAdNetworkConversionValueSchemaCallable() { - return stub.createSKAdNetworkConversionValueSchemaCallable(); + public final UnaryCallable + getConversionEventCallable() { + return stub.getConversionEventCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target SKAdNetworkConversionValueSchema. + * Deletes a conversion event in a property. * *

Sample code: * @@ -4687,29 +4757,27 @@ public final SKAdNetworkConversionValueSchema createSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SKAdNetworkConversionValueSchemaName name = - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - * analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(name); + * ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + * analyticsAdminServiceClient.deleteConversionEvent(name); * } * } * - * @param name Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: - * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} + * @param name Required. The resource name of the conversion event to delete. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSKAdNetworkConversionValueSchema( - SKAdNetworkConversionValueSchemaName name) { - DeleteSKAdNetworkConversionValueSchemaRequest request = - DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder() + public final void deleteConversionEvent(ConversionEventName name) { + DeleteConversionEventRequest request = + DeleteConversionEventRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - deleteSKAdNetworkConversionValueSchema(request); + deleteConversionEvent(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target SKAdNetworkConversionValueSchema. + * Deletes a conversion event in a property. * *

Sample code: * @@ -4721,27 +4789,25 @@ public final void deleteSKAdNetworkConversionValueSchema( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - * .toString(); - * analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(name); + * String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString(); + * analyticsAdminServiceClient.deleteConversionEvent(name); * } * } * - * @param name Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: - * properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema} + * @param name Required. The resource name of the conversion event to delete. Format: + * properties/{property}/conversionEvents/{conversion_event} Example: + * "properties/123/conversionEvents/456" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSKAdNetworkConversionValueSchema(String name) { - DeleteSKAdNetworkConversionValueSchemaRequest request = - DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder().setName(name).build(); - deleteSKAdNetworkConversionValueSchema(request); + public final void deleteConversionEvent(String name) { + DeleteConversionEventRequest request = + DeleteConversionEventRequest.newBuilder().setName(name).build(); + deleteConversionEvent(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target SKAdNetworkConversionValueSchema. + * Deletes a conversion event in a property. * *

Sample code: * @@ -4753,28 +4819,24 @@ public final void deleteSKAdNetworkConversionValueSchema(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteSKAdNetworkConversionValueSchemaRequest request = - * DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setName( - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - * .toString()) + * DeleteConversionEventRequest request = + * DeleteConversionEventRequest.newBuilder() + * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) * .build(); - * analyticsAdminServiceClient.deleteSKAdNetworkConversionValueSchema(request); + * analyticsAdminServiceClient.deleteConversionEvent(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSKAdNetworkConversionValueSchema( - DeleteSKAdNetworkConversionValueSchemaRequest request) { - deleteSKAdNetworkConversionValueSchemaCallable().call(request); + public final void deleteConversionEvent(DeleteConversionEventRequest request) { + deleteConversionEventCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes target SKAdNetworkConversionValueSchema. + * Deletes a conversion event in a property. * *

Sample code: * @@ -4786,30 +4848,26 @@ public final void deleteSKAdNetworkConversionValueSchema( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteSKAdNetworkConversionValueSchemaRequest request = - * DeleteSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setName( - * SKAdNetworkConversionValueSchemaName.of( - * "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - * .toString()) + * DeleteConversionEventRequest request = + * DeleteConversionEventRequest.newBuilder() + * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) * .build(); * ApiFuture future = - * analyticsAdminServiceClient - * .deleteSKAdNetworkConversionValueSchemaCallable() - * .futureCall(request); + * analyticsAdminServiceClient.deleteConversionEventCallable().futureCall(request); * // Do something. * future.get(); * } * } */ - public final UnaryCallable - deleteSKAdNetworkConversionValueSchemaCallable() { - return stub.deleteSKAdNetworkConversionValueSchemaCallable(); + public final UnaryCallable deleteConversionEventCallable() { + return stub.deleteConversionEventCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a SKAdNetworkConversionValueSchema. + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. * *

Sample code: * @@ -4821,34 +4879,30 @@ public final void deleteSKAdNetworkConversionValueSchema( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - * SKAdNetworkConversionValueSchema.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * SKAdNetworkConversionValueSchema response = - * analyticsAdminServiceClient.updateSKAdNetworkConversionValueSchema( - * skadnetworkConversionValueSchema, updateMask); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (ConversionEvent element : + * analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param skadnetworkConversionValueSchema Required. SKAdNetwork conversion value schema to - * update. - * @param updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. + * @param parent Required. The resource name of the parent property. Example: 'properties/123' * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSchema( - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema, FieldMask updateMask) { - UpdateSKAdNetworkConversionValueSchemaRequest request = - UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder() - .setSkadnetworkConversionValueSchema(skadnetworkConversionValueSchema) - .setUpdateMask(updateMask) + public final ListConversionEventsPagedResponse listConversionEvents(PropertyName parent) { + ListConversionEventsRequest request = + ListConversionEventsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) .build(); - return updateSKAdNetworkConversionValueSchema(request); + return listConversionEvents(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a SKAdNetworkConversionValueSchema. + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. * *

Sample code: * @@ -4860,28 +4914,65 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateSKAdNetworkConversionValueSchemaRequest request = - * UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setSkadnetworkConversionValueSchema( - * SKAdNetworkConversionValueSchema.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (ConversionEvent element : + * analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + * + * @param parent Required. The resource name of the parent property. Example: 'properties/123' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversionEventsPagedResponse listConversionEvents(String parent) { + ListConversionEventsRequest request = + ListConversionEventsRequest.newBuilder().setParent(parent).build(); + return listConversionEvents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListConversionEventsRequest request =
+   *       ListConversionEventsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
    *           .build();
-   *   SKAdNetworkConversionValueSchema response =
-   *       analyticsAdminServiceClient.updateSKAdNetworkConversionValueSchema(request);
+   *   for (ConversionEvent element :
+   *       analyticsAdminServiceClient.listConversionEvents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSchema( - UpdateSKAdNetworkConversionValueSchemaRequest request) { - return updateSKAdNetworkConversionValueSchemaCallable().call(request); + public final ListConversionEventsPagedResponse listConversionEvents( + ListConversionEventsRequest request) { + return listConversionEventsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a SKAdNetworkConversionValueSchema. + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. * *

Sample code: * @@ -4893,31 +4984,207 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateSKAdNetworkConversionValueSchemaRequest request = - * UpdateSKAdNetworkConversionValueSchemaRequest.newBuilder() - * .setSkadnetworkConversionValueSchema( - * SKAdNetworkConversionValueSchema.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * ListConversionEventsRequest request = + * ListConversionEventsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = + * ApiFuture future = + * analyticsAdminServiceClient.listConversionEventsPagedCallable().futureCall(request); + * // Do something. + * for (ConversionEvent element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + */ + public final UnaryCallable + listConversionEventsPagedCallable() { + return stub.listConversionEventsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of conversion events in the specified parent property. + * + *

Returns an empty list if no conversion events are found. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListConversionEventsRequest request =
+   *       ListConversionEventsRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListConversionEventsResponse response =
+   *         analyticsAdminServiceClient.listConversionEventsCallable().call(request);
+   *     for (ConversionEvent element : response.getConversionEventsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConversionEventsCallable() { + return stub.listConversionEventsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Look up a single DisplayVideo360AdvertiserLink + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DisplayVideo360AdvertiserLinkName name =
+   *       DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]");
+   *   DisplayVideo360AdvertiserLink response =
+   *       analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: + * properties/1234/displayVideo360AdvertiserLink/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink( + DisplayVideo360AdvertiserLinkName name) { + GetDisplayVideo360AdvertiserLinkRequest request = + GetDisplayVideo360AdvertiserLinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDisplayVideo360AdvertiserLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Look up a single DisplayVideo360AdvertiserLink + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name =
+   *       DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
+   *           .toString();
+   *   DisplayVideo360AdvertiserLink response =
+   *       analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: + * properties/1234/displayVideo360AdvertiserLink/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink(String name) { + GetDisplayVideo360AdvertiserLinkRequest request = + GetDisplayVideo360AdvertiserLinkRequest.newBuilder().setName(name).build(); + return getDisplayVideo360AdvertiserLink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Look up a single DisplayVideo360AdvertiserLink + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDisplayVideo360AdvertiserLinkRequest request =
+   *       GetDisplayVideo360AdvertiserLinkRequest.newBuilder()
+   *           .setName(
+   *               DisplayVideo360AdvertiserLinkName.of(
+   *                       "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
+   *                   .toString())
+   *           .build();
+   *   DisplayVideo360AdvertiserLink response =
+   *       analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink( + GetDisplayVideo360AdvertiserLinkRequest request) { + return getDisplayVideo360AdvertiserLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Look up a single DisplayVideo360AdvertiserLink + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDisplayVideo360AdvertiserLinkRequest request =
+   *       GetDisplayVideo360AdvertiserLinkRequest.newBuilder()
+   *           .setName(
+   *               DisplayVideo360AdvertiserLinkName.of(
+   *                       "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
    *       analyticsAdminServiceClient
-   *           .updateSKAdNetworkConversionValueSchemaCallable()
+   *           .getDisplayVideo360AdvertiserLinkCallable()
    *           .futureCall(request);
    *   // Do something.
-   *   SKAdNetworkConversionValueSchema response = future.get();
+   *   DisplayVideo360AdvertiserLink response = future.get();
    * }
    * }
*/ - public final UnaryCallable< - UpdateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> - updateSKAdNetworkConversionValueSchemaCallable() { - return stub.updateSKAdNetworkConversionValueSchemaCallable(); + public final UnaryCallable + getDisplayVideo360AdvertiserLinkCallable() { + return stub.getDisplayVideo360AdvertiserLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one - * SKAdNetworkConversionValueSchema. + * Lists all DisplayVideo360AdvertiserLinks on a property. * *

Sample code: * @@ -4929,32 +5196,29 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - * for (SKAdNetworkConversionValueSchema element : - * analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(parent).iterateAll()) { + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (DisplayVideo360AdvertiserLink element : + * analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Format: - * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema Example: - * properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSKAdNetworkConversionValueSchemasPagedResponse - listSKAdNetworkConversionValueSchemas(DataStreamName parent) { - ListSKAdNetworkConversionValueSchemasRequest request = - ListSKAdNetworkConversionValueSchemasRequest.newBuilder() + public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks( + PropertyName parent) { + ListDisplayVideo360AdvertiserLinksRequest request = + ListDisplayVideo360AdvertiserLinksRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); - return listSKAdNetworkConversionValueSchemas(request); + return listDisplayVideo360AdvertiserLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one - * SKAdNetworkConversionValueSchema. + * Lists all DisplayVideo360AdvertiserLinks on a property. * *

Sample code: * @@ -4966,30 +5230,27 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * for (SKAdNetworkConversionValueSchema element : - * analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(parent).iterateAll()) { + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (DisplayVideo360AdvertiserLink element : + * analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Format: - * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema Example: - * properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSKAdNetworkConversionValueSchemasPagedResponse - listSKAdNetworkConversionValueSchemas(String parent) { - ListSKAdNetworkConversionValueSchemasRequest request = - ListSKAdNetworkConversionValueSchemasRequest.newBuilder().setParent(parent).build(); - return listSKAdNetworkConversionValueSchemas(request); + public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks( + String parent) { + ListDisplayVideo360AdvertiserLinksRequest request = + ListDisplayVideo360AdvertiserLinksRequest.newBuilder().setParent(parent).build(); + return listDisplayVideo360AdvertiserLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one - * SKAdNetworkConversionValueSchema. + * Lists all DisplayVideo360AdvertiserLinks on a property. * *

Sample code: * @@ -5001,14 +5262,14 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListSKAdNetworkConversionValueSchemasRequest request = - * ListSKAdNetworkConversionValueSchemasRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * ListDisplayVideo360AdvertiserLinksRequest request = + * ListDisplayVideo360AdvertiserLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * for (SKAdNetworkConversionValueSchema element : - * analyticsAdminServiceClient.listSKAdNetworkConversionValueSchemas(request).iterateAll()) { + * for (DisplayVideo360AdvertiserLink element : + * analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(request).iterateAll()) { * // doThingsWith(element); * } * } @@ -5017,15 +5278,14 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSKAdNetworkConversionValueSchemasPagedResponse - listSKAdNetworkConversionValueSchemas(ListSKAdNetworkConversionValueSchemasRequest request) { - return listSKAdNetworkConversionValueSchemasPagedCallable().call(request); + public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks( + ListDisplayVideo360AdvertiserLinksRequest request) { + return listDisplayVideo360AdvertiserLinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one - * SKAdNetworkConversionValueSchema. + * Lists all DisplayVideo360AdvertiserLinks on a property. * *

Sample code: * @@ -5037,34 +5297,79 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListSKAdNetworkConversionValueSchemasRequest request = - * ListSKAdNetworkConversionValueSchemasRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * ListDisplayVideo360AdvertiserLinksRequest request = + * ListDisplayVideo360AdvertiserLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = + * ApiFuture future = * analyticsAdminServiceClient - * .listSKAdNetworkConversionValueSchemasPagedCallable() + * .listDisplayVideo360AdvertiserLinksPagedCallable() * .futureCall(request); * // Do something. - * for (SKAdNetworkConversionValueSchema element : future.get().iterateAll()) { + * for (DisplayVideo360AdvertiserLink element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ public final UnaryCallable< - ListSKAdNetworkConversionValueSchemasRequest, - ListSKAdNetworkConversionValueSchemasPagedResponse> - listSKAdNetworkConversionValueSchemasPagedCallable() { - return stub.listSKAdNetworkConversionValueSchemasPagedCallable(); + ListDisplayVideo360AdvertiserLinksRequest, + ListDisplayVideo360AdvertiserLinksPagedResponse> + listDisplayVideo360AdvertiserLinksPagedCallable() { + return stub.listDisplayVideo360AdvertiserLinksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all DisplayVideo360AdvertiserLinks on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListDisplayVideo360AdvertiserLinksRequest request =
+   *       ListDisplayVideo360AdvertiserLinksRequest.newBuilder()
+   *           .setParent(PropertyName.of("[PROPERTY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDisplayVideo360AdvertiserLinksResponse response =
+   *         analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinksCallable().call(request);
+   *     for (DisplayVideo360AdvertiserLink element :
+   *         response.getDisplayVideo360AdvertiserLinksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListDisplayVideo360AdvertiserLinksRequest, ListDisplayVideo360AdvertiserLinksResponse> + listDisplayVideo360AdvertiserLinksCallable() { + return stub.listDisplayVideo360AdvertiserLinksCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one - * SKAdNetworkConversionValueSchema. + * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper + * authorization both on the Google Analytics property and on the Display & Video 360 + * advertiser. Users who do not have access to the Display & Video 360 advertiser should + * instead seek to create a DisplayVideo360LinkProposal. * *

Sample code: * @@ -5076,41 +5381,35 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListSKAdNetworkConversionValueSchemasRequest request = - * ListSKAdNetworkConversionValueSchemasRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListSKAdNetworkConversionValueSchemasResponse response = - * analyticsAdminServiceClient - * .listSKAdNetworkConversionValueSchemasCallable() - * .call(request); - * for (SKAdNetworkConversionValueSchema element : - * response.getSkadnetworkConversionValueSchemasList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + * DisplayVideo360AdvertiserLink.newBuilder().build(); + * DisplayVideo360AdvertiserLink response = + * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink( + * parent, displayVideo360AdvertiserLink); * } * } + * + * @param parent Required. Example format: properties/1234 + * @param displayVideo360AdvertiserLink Required. The DisplayVideo360AdvertiserLink to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - ListSKAdNetworkConversionValueSchemasRequest, - ListSKAdNetworkConversionValueSchemasResponse> - listSKAdNetworkConversionValueSchemasCallable() { - return stub.listSKAdNetworkConversionValueSchemasCallable(); + public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( + PropertyName parent, DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink) { + CreateDisplayVideo360AdvertiserLinkRequest request = + CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink) + .build(); + return createDisplayVideo360AdvertiserLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Searches through all changes to an account or its children given the specified set of filters. + * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper + * authorization both on the Google Analytics property and on the Display & Video 360 + * advertiser. Users who do not have access to the Display & Video 360 advertiser should + * instead seek to create a DisplayVideo360LinkProposal. * *

Sample code: * @@ -5122,36 +5421,35 @@ public final SKAdNetworkConversionValueSchema updateSKAdNetworkConversionValueSc * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SearchChangeHistoryEventsRequest request = - * SearchChangeHistoryEventsRequest.newBuilder() - * .setAccount(AccountName.of("[ACCOUNT]").toString()) - * .setProperty(PropertyName.of("[PROPERTY]").toString()) - * .addAllResourceType(new ArrayList()) - * .addAllAction(new ArrayList()) - * .addAllActorEmail(new ArrayList()) - * .setEarliestChangeTime(Timestamp.newBuilder().build()) - * .setLatestChangeTime(Timestamp.newBuilder().build()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * for (ChangeHistoryEvent element : - * analyticsAdminServiceClient.searchChangeHistoryEvents(request).iterateAll()) { - * // doThingsWith(element); - * } + * String parent = PropertyName.of("[PROPERTY]").toString(); + * DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + * DisplayVideo360AdvertiserLink.newBuilder().build(); + * DisplayVideo360AdvertiserLink response = + * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink( + * parent, displayVideo360AdvertiserLink); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 + * @param displayVideo360AdvertiserLink Required. The DisplayVideo360AdvertiserLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents( - SearchChangeHistoryEventsRequest request) { - return searchChangeHistoryEventsPagedCallable().call(request); + public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( + String parent, DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink) { + CreateDisplayVideo360AdvertiserLinkRequest request = + CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() + .setParent(parent) + .setDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink) + .build(); + return createDisplayVideo360AdvertiserLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Searches through all changes to an account or its children given the specified set of filters. + * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper + * authorization both on the Google Analytics property and on the Display & Video 360 + * advertiser. Users who do not have access to the Display & Video 360 advertiser should + * instead seek to create a DisplayVideo360LinkProposal. * *

Sample code: * @@ -5163,36 +5461,30 @@ public final SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SearchChangeHistoryEventsRequest request = - * SearchChangeHistoryEventsRequest.newBuilder() - * .setAccount(AccountName.of("[ACCOUNT]").toString()) - * .setProperty(PropertyName.of("[PROPERTY]").toString()) - * .addAllResourceType(new ArrayList()) - * .addAllAction(new ArrayList()) - * .addAllActorEmail(new ArrayList()) - * .setEarliestChangeTime(Timestamp.newBuilder().build()) - * .setLatestChangeTime(Timestamp.newBuilder().build()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * CreateDisplayVideo360AdvertiserLinkRequest request = + * CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.searchChangeHistoryEventsPagedCallable().futureCall(request); - * // Do something. - * for (ChangeHistoryEvent element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * DisplayVideo360AdvertiserLink response = + * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsPagedResponse> - searchChangeHistoryEventsPagedCallable() { - return stub.searchChangeHistoryEventsPagedCallable(); + public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( + CreateDisplayVideo360AdvertiserLinkRequest request) { + return createDisplayVideo360AdvertiserLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Searches through all changes to an account or its children given the specified set of filters. + * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper + * authorization both on the Google Analytics property and on the Display & Video 360 + * advertiser. Users who do not have access to the Display & Video 360 advertiser should + * instead seek to create a DisplayVideo360LinkProposal. * *

Sample code: * @@ -5204,42 +5496,29 @@ public final SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SearchChangeHistoryEventsRequest request = - * SearchChangeHistoryEventsRequest.newBuilder() - * .setAccount(AccountName.of("[ACCOUNT]").toString()) - * .setProperty(PropertyName.of("[PROPERTY]").toString()) - * .addAllResourceType(new ArrayList()) - * .addAllAction(new ArrayList()) - * .addAllActorEmail(new ArrayList()) - * .setEarliestChangeTime(Timestamp.newBuilder().build()) - * .setLatestChangeTime(Timestamp.newBuilder().build()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * CreateDisplayVideo360AdvertiserLinkRequest request = + * CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) * .build(); - * while (true) { - * SearchChangeHistoryEventsResponse response = - * analyticsAdminServiceClient.searchChangeHistoryEventsCallable().call(request); - * for (ChangeHistoryEvent element : response.getChangeHistoryEventsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * ApiFuture future = + * analyticsAdminServiceClient + * .createDisplayVideo360AdvertiserLinkCallable() + * .futureCall(request); + * // Do something. + * DisplayVideo360AdvertiserLink response = future.get(); * } * } */ - public final UnaryCallable - searchChangeHistoryEventsCallable() { - return stub.searchChangeHistoryEventsCallable(); + public final UnaryCallable< + CreateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> + createDisplayVideo360AdvertiserLinkCallable() { + return stub.createDisplayVideo360AdvertiserLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for Google Signals settings for a property. + * Deletes a DisplayVideo360AdvertiserLink on a property. * *

Sample code: * @@ -5251,26 +5530,27 @@ public final SearchChangeHistoryEventsPagedResponse searchChangeHistoryEvents( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); - * GoogleSignalsSettings response = analyticsAdminServiceClient.getGoogleSignalsSettings(name); + * DisplayVideo360AdvertiserLinkName name = + * DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(name); * } * } * - * @param name Required. The name of the google signals settings to retrieve. Format: - * properties/{property}/googleSignalsSettings + * @param name Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: + * properties/1234/displayVideo360AdvertiserLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleSignalsSettings getGoogleSignalsSettings(GoogleSignalsSettingsName name) { - GetGoogleSignalsSettingsRequest request = - GetGoogleSignalsSettingsRequest.newBuilder() + public final void deleteDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLinkName name) { + DeleteDisplayVideo360AdvertiserLinkRequest request = + DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - return getGoogleSignalsSettings(request); + deleteDisplayVideo360AdvertiserLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for Google Signals settings for a property. + * Deletes a DisplayVideo360AdvertiserLink on a property. * *

Sample code: * @@ -5282,24 +5562,26 @@ public final GoogleSignalsSettings getGoogleSignalsSettings(GoogleSignalsSetting * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = GoogleSignalsSettingsName.of("[PROPERTY]").toString(); - * GoogleSignalsSettings response = analyticsAdminServiceClient.getGoogleSignalsSettings(name); + * String name = + * DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + * .toString(); + * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(name); * } * } * - * @param name Required. The name of the google signals settings to retrieve. Format: - * properties/{property}/googleSignalsSettings + * @param name Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: + * properties/1234/displayVideo360AdvertiserLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleSignalsSettings getGoogleSignalsSettings(String name) { - GetGoogleSignalsSettingsRequest request = - GetGoogleSignalsSettingsRequest.newBuilder().setName(name).build(); - return getGoogleSignalsSettings(request); + public final void deleteDisplayVideo360AdvertiserLink(String name) { + DeleteDisplayVideo360AdvertiserLinkRequest request = + DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder().setName(name).build(); + deleteDisplayVideo360AdvertiserLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for Google Signals settings for a property. + * Deletes a DisplayVideo360AdvertiserLink on a property. * *

Sample code: * @@ -5311,26 +5593,28 @@ public final GoogleSignalsSettings getGoogleSignalsSettings(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetGoogleSignalsSettingsRequest request = - * GetGoogleSignalsSettingsRequest.newBuilder() - * .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + * DeleteDisplayVideo360AdvertiserLinkRequest request = + * DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + * .toString()) * .build(); - * GoogleSignalsSettings response = - * analyticsAdminServiceClient.getGoogleSignalsSettings(request); + * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleSignalsSettings getGoogleSignalsSettings( - GetGoogleSignalsSettingsRequest request) { - return getGoogleSignalsSettingsCallable().call(request); + public final void deleteDisplayVideo360AdvertiserLink( + DeleteDisplayVideo360AdvertiserLinkRequest request) { + deleteDisplayVideo360AdvertiserLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for Google Signals settings for a property. + * Deletes a DisplayVideo360AdvertiserLink on a property. * *

Sample code: * @@ -5342,25 +5626,30 @@ public final GoogleSignalsSettings getGoogleSignalsSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetGoogleSignalsSettingsRequest request = - * GetGoogleSignalsSettingsRequest.newBuilder() - * .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + * DeleteDisplayVideo360AdvertiserLinkRequest request = + * DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getGoogleSignalsSettingsCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .deleteDisplayVideo360AdvertiserLinkCallable() + * .futureCall(request); * // Do something. - * GoogleSignalsSettings response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - getGoogleSignalsSettingsCallable() { - return stub.getGoogleSignalsSettingsCallable(); + public final UnaryCallable + deleteDisplayVideo360AdvertiserLinkCallable() { + return stub.deleteDisplayVideo360AdvertiserLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates Google Signals settings for a property. + * Updates a DisplayVideo360AdvertiserLink on a property. * *

Sample code: * @@ -5372,34 +5661,34 @@ public final GoogleSignalsSettings getGoogleSignalsSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GoogleSignalsSettings googleSignalsSettings = GoogleSignalsSettings.newBuilder().build(); + * DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + * DisplayVideo360AdvertiserLink.newBuilder().build(); * FieldMask updateMask = FieldMask.newBuilder().build(); - * GoogleSignalsSettings response = - * analyticsAdminServiceClient.updateGoogleSignalsSettings( - * googleSignalsSettings, updateMask); + * DisplayVideo360AdvertiserLink response = + * analyticsAdminServiceClient.updateDisplayVideo360AdvertiserLink( + * displayVideo360AdvertiserLink, updateMask); * } * } * - * @param googleSignalsSettings Required. The settings to update. The `name` field is used to - * identify the settings to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param displayVideo360AdvertiserLink The DisplayVideo360AdvertiserLink to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleSignalsSettings updateGoogleSignalsSettings( - GoogleSignalsSettings googleSignalsSettings, FieldMask updateMask) { - UpdateGoogleSignalsSettingsRequest request = - UpdateGoogleSignalsSettingsRequest.newBuilder() - .setGoogleSignalsSettings(googleSignalsSettings) + public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink( + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink, FieldMask updateMask) { + UpdateDisplayVideo360AdvertiserLinkRequest request = + UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder() + .setDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink) .setUpdateMask(updateMask) .build(); - return updateGoogleSignalsSettings(request); + return updateDisplayVideo360AdvertiserLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates Google Signals settings for a property. + * Updates a DisplayVideo360AdvertiserLink on a property. * *

Sample code: * @@ -5411,27 +5700,27 @@ public final GoogleSignalsSettings updateGoogleSignalsSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateGoogleSignalsSettingsRequest request = - * UpdateGoogleSignalsSettingsRequest.newBuilder() - * .setGoogleSignalsSettings(GoogleSignalsSettings.newBuilder().build()) + * UpdateDisplayVideo360AdvertiserLinkRequest request = + * UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder() + * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * GoogleSignalsSettings response = - * analyticsAdminServiceClient.updateGoogleSignalsSettings(request); + * DisplayVideo360AdvertiserLink response = + * analyticsAdminServiceClient.updateDisplayVideo360AdvertiserLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final GoogleSignalsSettings updateGoogleSignalsSettings( - UpdateGoogleSignalsSettingsRequest request) { - return updateGoogleSignalsSettingsCallable().call(request); + public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink( + UpdateDisplayVideo360AdvertiserLinkRequest request) { + return updateDisplayVideo360AdvertiserLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates Google Signals settings for a property. + * Updates a DisplayVideo360AdvertiserLink on a property. * *

Sample code: * @@ -5443,26 +5732,29 @@ public final GoogleSignalsSettings updateGoogleSignalsSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateGoogleSignalsSettingsRequest request = - * UpdateGoogleSignalsSettingsRequest.newBuilder() - * .setGoogleSignalsSettings(GoogleSignalsSettings.newBuilder().build()) + * UpdateDisplayVideo360AdvertiserLinkRequest request = + * UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder() + * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateGoogleSignalsSettingsCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .updateDisplayVideo360AdvertiserLinkCallable() + * .futureCall(request); * // Do something. - * GoogleSignalsSettings response = future.get(); + * DisplayVideo360AdvertiserLink response = future.get(); * } * } */ - public final UnaryCallable - updateGoogleSignalsSettingsCallable() { - return stub.updateGoogleSignalsSettingsCallable(); + public final UnaryCallable< + UpdateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> + updateDisplayVideo360AdvertiserLinkCallable() { + return stub.updateDisplayVideo360AdvertiserLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a conversion event with the specified attributes. + * Lookup for a single DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5474,31 +5766,30 @@ public final GoogleSignalsSettings updateGoogleSignalsSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - * ConversionEvent response = - * analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent); + * DisplayVideo360AdvertiserLinkProposalName name = + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + * DisplayVideo360AdvertiserLinkProposal response = + * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(name); * } * } * - * @param parent Required. The resource name of the parent property where this conversion event - * will be created. Format: properties/123 - * @param conversionEvent Required. The conversion event to create. + * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example + * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent createConversionEvent( - PropertyName parent, ConversionEvent conversionEvent) { - CreateConversionEventRequest request = - CreateConversionEventRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setConversionEvent(conversionEvent) + public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal( + DisplayVideo360AdvertiserLinkProposalName name) { + GetDisplayVideo360AdvertiserLinkProposalRequest request = + GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return createConversionEvent(request); + return getDisplayVideo360AdvertiserLinkProposal(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a conversion event with the specified attributes. + * Lookup for a single DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5510,31 +5801,29 @@ public final ConversionEvent createConversionEvent( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - * ConversionEvent response = - * analyticsAdminServiceClient.createConversionEvent(parent, conversionEvent); + * String name = + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString(); + * DisplayVideo360AdvertiserLinkProposal response = + * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(name); * } * } * - * @param parent Required. The resource name of the parent property where this conversion event - * will be created. Format: properties/123 - * @param conversionEvent Required. The conversion event to create. + * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example + * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent createConversionEvent( - String parent, ConversionEvent conversionEvent) { - CreateConversionEventRequest request = - CreateConversionEventRequest.newBuilder() - .setParent(parent) - .setConversionEvent(conversionEvent) - .build(); - return createConversionEvent(request); + public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal( + String name) { + GetDisplayVideo360AdvertiserLinkProposalRequest request = + GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder().setName(name).build(); + return getDisplayVideo360AdvertiserLinkProposal(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a conversion event with the specified attributes. + * Lookup for a single DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5546,25 +5835,29 @@ public final ConversionEvent createConversionEvent( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateConversionEventRequest request = - * CreateConversionEventRequest.newBuilder() - * .setConversionEvent(ConversionEvent.newBuilder().build()) - * .setParent(PropertyName.of("[PROPERTY]").toString()) + * GetDisplayVideo360AdvertiserLinkProposalRequest request = + * GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) * .build(); - * ConversionEvent response = analyticsAdminServiceClient.createConversionEvent(request); + * DisplayVideo360AdvertiserLinkProposal response = + * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent createConversionEvent(CreateConversionEventRequest request) { - return createConversionEventCallable().call(request); + public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal( + GetDisplayVideo360AdvertiserLinkProposalRequest request) { + return getDisplayVideo360AdvertiserLinkProposalCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a conversion event with the specified attributes. + * Lookup for a single DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5576,26 +5869,31 @@ public final ConversionEvent createConversionEvent(CreateConversionEventRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateConversionEventRequest request = - * CreateConversionEventRequest.newBuilder() - * .setConversionEvent(ConversionEvent.newBuilder().build()) - * .setParent(PropertyName.of("[PROPERTY]").toString()) + * GetDisplayVideo360AdvertiserLinkProposalRequest request = + * GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createConversionEventCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .getDisplayVideo360AdvertiserLinkProposalCallable() + * .futureCall(request); * // Do something. - * ConversionEvent response = future.get(); + * DisplayVideo360AdvertiserLinkProposal response = future.get(); * } * } */ - public final UnaryCallable - createConversionEventCallable() { - return stub.createConversionEventCallable(); + public final UnaryCallable< + GetDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> + getDisplayVideo360AdvertiserLinkProposalCallable() { + return stub.getDisplayVideo360AdvertiserLinkProposalCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a conversion event with the specified attributes. + * Lists DisplayVideo360AdvertiserLinkProposals on a property. * *

Sample code: * @@ -5607,33 +5905,65 @@ public final ConversionEvent createConversionEvent(CreateConversionEventRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * ConversionEvent response = - * analyticsAdminServiceClient.updateConversionEvent(conversionEvent, updateMask); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (DisplayVideo360AdvertiserLinkProposal element : + * analyticsAdminServiceClient + * .listDisplayVideo360AdvertiserLinkProposals(parent) + * .iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param conversionEvent Required. The conversion event to update. The `name` field is used to - * identify the settings to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent updateConversionEvent( - ConversionEvent conversionEvent, FieldMask updateMask) { - UpdateConversionEventRequest request = - UpdateConversionEventRequest.newBuilder() - .setConversionEvent(conversionEvent) - .setUpdateMask(updateMask) + public final ListDisplayVideo360AdvertiserLinkProposalsPagedResponse + listDisplayVideo360AdvertiserLinkProposals(PropertyName parent) { + ListDisplayVideo360AdvertiserLinkProposalsRequest request = + ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) .build(); - return updateConversionEvent(request); + return listDisplayVideo360AdvertiserLinkProposals(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = PropertyName.of("[PROPERTY]").toString();
+   *   for (DisplayVideo360AdvertiserLinkProposal element :
+   *       analyticsAdminServiceClient
+   *           .listDisplayVideo360AdvertiserLinkProposals(parent)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDisplayVideo360AdvertiserLinkProposalsPagedResponse + listDisplayVideo360AdvertiserLinkProposals(String parent) { + ListDisplayVideo360AdvertiserLinkProposalsRequest request = + ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder().setParent(parent).build(); + return listDisplayVideo360AdvertiserLinkProposals(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a conversion event with the specified attributes. + * Lists DisplayVideo360AdvertiserLinkProposals on a property. * *

Sample code: * @@ -5645,25 +5975,33 @@ public final ConversionEvent updateConversionEvent( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateConversionEventRequest request = - * UpdateConversionEventRequest.newBuilder() - * .setConversionEvent(ConversionEvent.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * ListDisplayVideo360AdvertiserLinkProposalsRequest request = + * ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ConversionEvent response = analyticsAdminServiceClient.updateConversionEvent(request); + * for (DisplayVideo360AdvertiserLinkProposal element : + * analyticsAdminServiceClient + * .listDisplayVideo360AdvertiserLinkProposals(request) + * .iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent updateConversionEvent(UpdateConversionEventRequest request) { - return updateConversionEventCallable().call(request); + public final ListDisplayVideo360AdvertiserLinkProposalsPagedResponse + listDisplayVideo360AdvertiserLinkProposals( + ListDisplayVideo360AdvertiserLinkProposalsRequest request) { + return listDisplayVideo360AdvertiserLinkProposalsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a conversion event with the specified attributes. + * Lists DisplayVideo360AdvertiserLinkProposals on a property. * *

Sample code: * @@ -5675,26 +6013,33 @@ public final ConversionEvent updateConversionEvent(UpdateConversionEventRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateConversionEventRequest request = - * UpdateConversionEventRequest.newBuilder() - * .setConversionEvent(ConversionEvent.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * ListDisplayVideo360AdvertiserLinkProposalsRequest request = + * ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateConversionEventCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .listDisplayVideo360AdvertiserLinkProposalsPagedCallable() + * .futureCall(request); * // Do something. - * ConversionEvent response = future.get(); + * for (DisplayVideo360AdvertiserLinkProposal element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable - updateConversionEventCallable() { - return stub.updateConversionEventCallable(); + public final UnaryCallable< + ListDisplayVideo360AdvertiserLinkProposalsRequest, + ListDisplayVideo360AdvertiserLinkProposalsPagedResponse> + listDisplayVideo360AdvertiserLinkProposalsPagedCallable() { + return stub.listDisplayVideo360AdvertiserLinkProposalsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieve a single conversion event. + * Lists DisplayVideo360AdvertiserLinkProposals on a property. * *

Sample code: * @@ -5706,27 +6051,41 @@ public final ConversionEvent updateConversionEvent(UpdateConversionEventRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - * ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name); + * ListDisplayVideo360AdvertiserLinkProposalsRequest request = + * ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListDisplayVideo360AdvertiserLinkProposalsResponse response = + * analyticsAdminServiceClient + * .listDisplayVideo360AdvertiserLinkProposalsCallable() + * .call(request); + * for (DisplayVideo360AdvertiserLinkProposal element : + * response.getDisplayVideo360AdvertiserLinkProposalsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param name Required. The resource name of the conversion event to retrieve. Format: - * properties/{property}/conversionEvents/{conversion_event} Example: - * "properties/123/conversionEvents/456" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent getConversionEvent(ConversionEventName name) { - GetConversionEventRequest request = - GetConversionEventRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getConversionEvent(request); + public final UnaryCallable< + ListDisplayVideo360AdvertiserLinkProposalsRequest, + ListDisplayVideo360AdvertiserLinkProposalsResponse> + listDisplayVideo360AdvertiserLinkProposalsCallable() { + return stub.listDisplayVideo360AdvertiserLinkProposalsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieve a single conversion event. + * Creates a DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5738,25 +6097,34 @@ public final ConversionEvent getConversionEvent(ConversionEventName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString(); - * ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + * DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + * DisplayVideo360AdvertiserLinkProposal response = + * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal( + * parent, displayVideo360AdvertiserLinkProposal); * } * } * - * @param name Required. The resource name of the conversion event to retrieve. Format: - * properties/{property}/conversionEvents/{conversion_event} Example: - * "properties/123/conversionEvents/456" + * @param parent Required. Example format: properties/1234 + * @param displayVideo360AdvertiserLinkProposal Required. The + * DisplayVideo360AdvertiserLinkProposal to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent getConversionEvent(String name) { - GetConversionEventRequest request = - GetConversionEventRequest.newBuilder().setName(name).build(); - return getConversionEvent(request); + public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal( + PropertyName parent, + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal) { + CreateDisplayVideo360AdvertiserLinkProposalRequest request = + CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDisplayVideo360AdvertiserLinkProposal(displayVideo360AdvertiserLinkProposal) + .build(); + return createDisplayVideo360AdvertiserLinkProposal(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieve a single conversion event. + * Creates a DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5768,24 +6136,33 @@ public final ConversionEvent getConversionEvent(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetConversionEventRequest request = - * GetConversionEventRequest.newBuilder() - * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - * .build(); - * ConversionEvent response = analyticsAdminServiceClient.getConversionEvent(request); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + * DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + * DisplayVideo360AdvertiserLinkProposal response = + * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal( + * parent, displayVideo360AdvertiserLinkProposal); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 + * @param displayVideo360AdvertiserLinkProposal Required. The + * DisplayVideo360AdvertiserLinkProposal to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ConversionEvent getConversionEvent(GetConversionEventRequest request) { - return getConversionEventCallable().call(request); + public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal( + String parent, DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal) { + CreateDisplayVideo360AdvertiserLinkProposalRequest request = + CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setParent(parent) + .setDisplayVideo360AdvertiserLinkProposal(displayVideo360AdvertiserLinkProposal) + .build(); + return createDisplayVideo360AdvertiserLinkProposal(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieve a single conversion event. + * Creates a DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5797,57 +6174,28 @@ public final ConversionEvent getConversionEvent(GetConversionEventRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetConversionEventRequest request = - * GetConversionEventRequest.newBuilder() - * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + * CreateDisplayVideo360AdvertiserLinkProposalRequest request = + * CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setDisplayVideo360AdvertiserLinkProposal( + * DisplayVideo360AdvertiserLinkProposal.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getConversionEventCallable().futureCall(request); - * // Do something. - * ConversionEvent response = future.get(); - * } - * } - */ - public final UnaryCallable - getConversionEventCallable() { - return stub.getConversionEventCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a conversion event in a property. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]");
-   *   analyticsAdminServiceClient.deleteConversionEvent(name);
+   *   DisplayVideo360AdvertiserLinkProposal response =
+   *       analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal(request);
    * }
    * }
* - * @param name Required. The resource name of the conversion event to delete. Format: - * properties/{property}/conversionEvents/{conversion_event} Example: - * "properties/123/conversionEvents/456" + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteConversionEvent(ConversionEventName name) { - DeleteConversionEventRequest request = - DeleteConversionEventRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteConversionEvent(request); + public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal( + CreateDisplayVideo360AdvertiserLinkProposalRequest request) { + return createDisplayVideo360AdvertiserLinkProposalCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a conversion event in a property. + * Creates a DisplayVideo360AdvertiserLinkProposal. * *

Sample code: * @@ -5859,25 +6207,31 @@ public final void deleteConversionEvent(ConversionEventName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString(); - * analyticsAdminServiceClient.deleteConversionEvent(name); + * CreateDisplayVideo360AdvertiserLinkProposalRequest request = + * CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setDisplayVideo360AdvertiserLinkProposal( + * DisplayVideo360AdvertiserLinkProposal.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient + * .createDisplayVideo360AdvertiserLinkProposalCallable() + * .futureCall(request); + * // Do something. + * DisplayVideo360AdvertiserLinkProposal response = future.get(); * } * } - * - * @param name Required. The resource name of the conversion event to delete. Format: - * properties/{property}/conversionEvents/{conversion_event} Example: - * "properties/123/conversionEvents/456" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteConversionEvent(String name) { - DeleteConversionEventRequest request = - DeleteConversionEventRequest.newBuilder().setName(name).build(); - deleteConversionEvent(request); + public final UnaryCallable< + CreateDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> + createDisplayVideo360AdvertiserLinkProposalCallable() { + return stub.createDisplayVideo360AdvertiserLinkProposalCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a conversion event in a property. + * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on + * cancelled proposals. * *

Sample code: * @@ -5889,24 +6243,30 @@ public final void deleteConversionEvent(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteConversionEventRequest request = - * DeleteConversionEventRequest.newBuilder() - * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - * .build(); - * analyticsAdminServiceClient.deleteConversionEvent(request); + * DisplayVideo360AdvertiserLinkProposalName name = + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example + * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteConversionEvent(DeleteConversionEventRequest request) { - deleteConversionEventCallable().call(request); + public final void deleteDisplayVideo360AdvertiserLinkProposal( + DisplayVideo360AdvertiserLinkProposalName name) { + DeleteDisplayVideo360AdvertiserLinkProposalRequest request = + DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteDisplayVideo360AdvertiserLinkProposal(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a conversion event in a property. + * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on + * cancelled proposals. * *

Sample code: * @@ -5918,26 +6278,28 @@ public final void deleteConversionEvent(DeleteConversionEventRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteConversionEventRequest request = - * DeleteConversionEventRequest.newBuilder() - * .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteConversionEventCallable().futureCall(request); - * // Do something. - * future.get(); + * String name = + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString(); + * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(name); * } * } + * + * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example + * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable deleteConversionEventCallable() { - return stub.deleteConversionEventCallable(); + public final void deleteDisplayVideo360AdvertiserLinkProposal(String name) { + DeleteDisplayVideo360AdvertiserLinkProposalRequest request = + DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder().setName(name).build(); + deleteDisplayVideo360AdvertiserLinkProposal(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of conversion events in the specified parent property. - * - *

Returns an empty list if no conversion events are found. + * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on + * cancelled proposals. * *

Sample code: * @@ -5949,30 +6311,29 @@ public final UnaryCallable deleteConversion * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (ConversionEvent element : - * analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) { - * // doThingsWith(element); - * } + * DeleteDisplayVideo360AdvertiserLinkProposalRequest request = + * DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) + * .build(); + * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(request); * } * } * - * @param parent Required. The resource name of the parent property. Example: 'properties/123' + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListConversionEventsPagedResponse listConversionEvents(PropertyName parent) { - ListConversionEventsRequest request = - ListConversionEventsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listConversionEvents(request); + public final void deleteDisplayVideo360AdvertiserLinkProposal( + DeleteDisplayVideo360AdvertiserLinkProposalRequest request) { + deleteDisplayVideo360AdvertiserLinkProposalCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of conversion events in the specified parent property. - * - *

Returns an empty list if no conversion events are found. + * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on + * cancelled proposals. * *

Sample code: * @@ -5984,28 +6345,31 @@ public final ListConversionEventsPagedResponse listConversionEvents(PropertyName * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (ConversionEvent element : - * analyticsAdminServiceClient.listConversionEvents(parent).iterateAll()) { - * // doThingsWith(element); - * } + * DeleteDisplayVideo360AdvertiserLinkProposalRequest request = + * DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient + * .deleteDisplayVideo360AdvertiserLinkProposalCallable() + * .futureCall(request); + * // Do something. + * future.get(); * } * } - * - * @param parent Required. The resource name of the parent property. Example: 'properties/123' - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListConversionEventsPagedResponse listConversionEvents(String parent) { - ListConversionEventsRequest request = - ListConversionEventsRequest.newBuilder().setParent(parent).build(); - return listConversionEvents(request); + public final UnaryCallable + deleteDisplayVideo360AdvertiserLinkProposalCallable() { + return stub.deleteDisplayVideo360AdvertiserLinkProposalCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of conversion events in the specified parent property. - * - *

Returns an empty list if no conversion events are found. + * Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal + * will be deleted and a new DisplayVideo360AdvertiserLink will be created. * *

Sample code: * @@ -6017,32 +6381,31 @@ public final ListConversionEventsPagedResponse listConversionEvents(String paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListConversionEventsRequest request = - * ListConversionEventsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * ApproveDisplayVideo360AdvertiserLinkProposalRequest request = + * ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) * .build(); - * for (ConversionEvent element : - * analyticsAdminServiceClient.listConversionEvents(request).iterateAll()) { - * // doThingsWith(element); - * } + * ApproveDisplayVideo360AdvertiserLinkProposalResponse response = + * analyticsAdminServiceClient.approveDisplayVideo360AdvertiserLinkProposal(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListConversionEventsPagedResponse listConversionEvents( - ListConversionEventsRequest request) { - return listConversionEventsPagedCallable().call(request); + public final ApproveDisplayVideo360AdvertiserLinkProposalResponse + approveDisplayVideo360AdvertiserLinkProposal( + ApproveDisplayVideo360AdvertiserLinkProposalRequest request) { + return approveDisplayVideo360AdvertiserLinkProposalCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of conversion events in the specified parent property. - * - *

Returns an empty list if no conversion events are found. + * Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal + * will be deleted and a new DisplayVideo360AdvertiserLink will be created. * *

Sample code: * @@ -6054,31 +6417,34 @@ public final ListConversionEventsPagedResponse listConversionEvents( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListConversionEventsRequest request = - * ListConversionEventsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * ApproveDisplayVideo360AdvertiserLinkProposalRequest request = + * ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listConversionEventsPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .approveDisplayVideo360AdvertiserLinkProposalCallable() + * .futureCall(request); * // Do something. - * for (ConversionEvent element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * ApproveDisplayVideo360AdvertiserLinkProposalResponse response = future.get(); * } * } */ - public final UnaryCallable - listConversionEventsPagedCallable() { - return stub.listConversionEventsPagedCallable(); + public final UnaryCallable< + ApproveDisplayVideo360AdvertiserLinkProposalRequest, + ApproveDisplayVideo360AdvertiserLinkProposalResponse> + approveDisplayVideo360AdvertiserLinkProposalCallable() { + return stub.approveDisplayVideo360AdvertiserLinkProposalCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of conversion events in the specified parent property. - * - *

Returns an empty list if no conversion events are found. + * Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a + * proposal initiated from Display & Video 360 - Withdrawing a proposal initiated from Google + * Analytics After being cancelled, a proposal will eventually be deleted automatically. * *

Sample code: * @@ -6090,36 +6456,31 @@ public final ListConversionEventsPagedResponse listConversionEvents( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListConversionEventsRequest request = - * ListConversionEventsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * CancelDisplayVideo360AdvertiserLinkProposalRequest request = + * CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) * .build(); - * while (true) { - * ListConversionEventsResponse response = - * analyticsAdminServiceClient.listConversionEventsCallable().call(request); - * for (ConversionEvent element : response.getConversionEventsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * DisplayVideo360AdvertiserLinkProposal response = + * analyticsAdminServiceClient.cancelDisplayVideo360AdvertiserLinkProposal(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listConversionEventsCallable() { - return stub.listConversionEventsCallable(); + public final DisplayVideo360AdvertiserLinkProposal cancelDisplayVideo360AdvertiserLinkProposal( + CancelDisplayVideo360AdvertiserLinkProposalRequest request) { + return cancelDisplayVideo360AdvertiserLinkProposalCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single DisplayVideo360AdvertiserLink + * Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a + * proposal initiated from Display & Video 360 - Withdrawing a proposal initiated from Google + * Analytics After being cancelled, a proposal will eventually be deleted automatically. * *

Sample code: * @@ -6131,29 +6492,31 @@ public final ListConversionEventsPagedResponse listConversionEvents( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DisplayVideo360AdvertiserLinkName name = - * DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - * DisplayVideo360AdvertiserLink response = - * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(name); + * CancelDisplayVideo360AdvertiserLinkProposalRequest request = + * CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * .setName( + * DisplayVideo360AdvertiserLinkProposalName.of( + * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + * .toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient + * .cancelDisplayVideo360AdvertiserLinkProposalCallable() + * .futureCall(request); + * // Do something. + * DisplayVideo360AdvertiserLinkProposal response = future.get(); * } * } - * - * @param name Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: - * properties/1234/displayVideo360AdvertiserLink/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink( - DisplayVideo360AdvertiserLinkName name) { - GetDisplayVideo360AdvertiserLinkRequest request = - GetDisplayVideo360AdvertiserLinkRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getDisplayVideo360AdvertiserLink(request); + public final UnaryCallable< + CancelDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> + cancelDisplayVideo360AdvertiserLinkProposalCallable() { + return stub.cancelDisplayVideo360AdvertiserLinkProposalCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single DisplayVideo360AdvertiserLink + * Creates a CustomDimension. * *

Sample code: * @@ -6165,27 +6528,30 @@ public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - * .toString(); - * DisplayVideo360AdvertiserLink response = - * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * CustomDimension customDimension = CustomDimension.newBuilder().build(); + * CustomDimension response = + * analyticsAdminServiceClient.createCustomDimension(parent, customDimension); * } * } * - * @param name Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: - * properties/1234/displayVideo360AdvertiserLink/5678 + * @param parent Required. Example format: properties/1234 + * @param customDimension Required. The CustomDimension to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink(String name) { - GetDisplayVideo360AdvertiserLinkRequest request = - GetDisplayVideo360AdvertiserLinkRequest.newBuilder().setName(name).build(); - return getDisplayVideo360AdvertiserLink(request); + public final CustomDimension createCustomDimension( + PropertyName parent, CustomDimension customDimension) { + CreateCustomDimensionRequest request = + CreateCustomDimensionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCustomDimension(customDimension) + .build(); + return createCustomDimension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single DisplayVideo360AdvertiserLink + * Creates a CustomDimension. * *

Sample code: * @@ -6197,29 +6563,30 @@ public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink(Stri * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDisplayVideo360AdvertiserLinkRequest request = - * GetDisplayVideo360AdvertiserLinkRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - * .toString()) - * .build(); - * DisplayVideo360AdvertiserLink response = - * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLink(request); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * CustomDimension customDimension = CustomDimension.newBuilder().build(); + * CustomDimension response = + * analyticsAdminServiceClient.createCustomDimension(parent, customDimension); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 + * @param customDimension Required. The CustomDimension to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink( - GetDisplayVideo360AdvertiserLinkRequest request) { - return getDisplayVideo360AdvertiserLinkCallable().call(request); + public final CustomDimension createCustomDimension( + String parent, CustomDimension customDimension) { + CreateCustomDimensionRequest request = + CreateCustomDimensionRequest.newBuilder() + .setParent(parent) + .setCustomDimension(customDimension) + .build(); + return createCustomDimension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single DisplayVideo360AdvertiserLink + * Creates a CustomDimension. * *

Sample code: * @@ -6231,30 +6598,25 @@ public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDisplayVideo360AdvertiserLinkRequest request = - * GetDisplayVideo360AdvertiserLinkRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - * .toString()) + * CreateCustomDimensionRequest request = + * CreateCustomDimensionRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setCustomDimension(CustomDimension.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .getDisplayVideo360AdvertiserLinkCallable() - * .futureCall(request); - * // Do something. - * DisplayVideo360AdvertiserLink response = future.get(); + * CustomDimension response = analyticsAdminServiceClient.createCustomDimension(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - getDisplayVideo360AdvertiserLinkCallable() { - return stub.getDisplayVideo360AdvertiserLinkCallable(); + public final CustomDimension createCustomDimension(CreateCustomDimensionRequest request) { + return createCustomDimensionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all DisplayVideo360AdvertiserLinks on a property. + * Creates a CustomDimension. * *

Sample code: * @@ -6266,29 +6628,26 @@ public final DisplayVideo360AdvertiserLink getDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (DisplayVideo360AdvertiserLink element : - * analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(parent).iterateAll()) { - * // doThingsWith(element); - * } + * CreateCustomDimensionRequest request = + * CreateCustomDimensionRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setCustomDimension(CustomDimension.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.createCustomDimensionCallable().futureCall(request); + * // Do something. + * CustomDimension response = future.get(); * } * } - * - * @param parent Required. Example format: properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks( - PropertyName parent) { - ListDisplayVideo360AdvertiserLinksRequest request = - ListDisplayVideo360AdvertiserLinksRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDisplayVideo360AdvertiserLinks(request); + public final UnaryCallable + createCustomDimensionCallable() { + return stub.createCustomDimensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all DisplayVideo360AdvertiserLinks on a property. + * Updates a CustomDimension on a property. * *

Sample code: * @@ -6300,27 +6659,32 @@ public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (DisplayVideo360AdvertiserLink element : - * analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(parent).iterateAll()) { - * // doThingsWith(element); - * } + * CustomDimension customDimension = CustomDimension.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * CustomDimension response = + * analyticsAdminServiceClient.updateCustomDimension(customDimension, updateMask); * } * } * - * @param parent Required. Example format: properties/1234 + * @param customDimension The CustomDimension to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks( - String parent) { - ListDisplayVideo360AdvertiserLinksRequest request = - ListDisplayVideo360AdvertiserLinksRequest.newBuilder().setParent(parent).build(); - return listDisplayVideo360AdvertiserLinks(request); + public final CustomDimension updateCustomDimension( + CustomDimension customDimension, FieldMask updateMask) { + UpdateCustomDimensionRequest request = + UpdateCustomDimensionRequest.newBuilder() + .setCustomDimension(customDimension) + .setUpdateMask(updateMask) + .build(); + return updateCustomDimension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all DisplayVideo360AdvertiserLinks on a property. + * Updates a CustomDimension on a property. * *

Sample code: * @@ -6332,30 +6696,25 @@ public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDisplayVideo360AdvertiserLinksRequest request = - * ListDisplayVideo360AdvertiserLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * UpdateCustomDimensionRequest request = + * UpdateCustomDimensionRequest.newBuilder() + * .setCustomDimension(CustomDimension.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * for (DisplayVideo360AdvertiserLink element : - * analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinks(request).iterateAll()) { - * // doThingsWith(element); - * } + * CustomDimension response = analyticsAdminServiceClient.updateCustomDimension(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360AdvertiserLinks( - ListDisplayVideo360AdvertiserLinksRequest request) { - return listDisplayVideo360AdvertiserLinksPagedCallable().call(request); + public final CustomDimension updateCustomDimension(UpdateCustomDimensionRequest request) { + return updateCustomDimensionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all DisplayVideo360AdvertiserLinks on a property. + * Updates a CustomDimension on a property. * *

Sample code: * @@ -6367,33 +6726,26 @@ public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDisplayVideo360AdvertiserLinksRequest request = - * ListDisplayVideo360AdvertiserLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * UpdateCustomDimensionRequest request = + * UpdateCustomDimensionRequest.newBuilder() + * .setCustomDimension(CustomDimension.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .listDisplayVideo360AdvertiserLinksPagedCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateCustomDimensionCallable().futureCall(request); * // Do something. - * for (DisplayVideo360AdvertiserLink element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * CustomDimension response = future.get(); * } * } */ - public final UnaryCallable< - ListDisplayVideo360AdvertiserLinksRequest, - ListDisplayVideo360AdvertiserLinksPagedResponse> - listDisplayVideo360AdvertiserLinksPagedCallable() { - return stub.listDisplayVideo360AdvertiserLinksPagedCallable(); + public final UnaryCallable + updateCustomDimensionCallable() { + return stub.updateCustomDimensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all DisplayVideo360AdvertiserLinks on a property. + * Lists CustomDimensions on a property. * *

Sample code: * @@ -6405,41 +6757,28 @@ public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDisplayVideo360AdvertiserLinksRequest request = - * ListDisplayVideo360AdvertiserLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListDisplayVideo360AdvertiserLinksResponse response = - * analyticsAdminServiceClient.listDisplayVideo360AdvertiserLinksCallable().call(request); - * for (DisplayVideo360AdvertiserLink element : - * response.getDisplayVideo360AdvertiserLinksList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (CustomDimension element : + * analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) { + * // doThingsWith(element); * } * } * } + * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - ListDisplayVideo360AdvertiserLinksRequest, ListDisplayVideo360AdvertiserLinksResponse> - listDisplayVideo360AdvertiserLinksCallable() { - return stub.listDisplayVideo360AdvertiserLinksCallable(); + public final ListCustomDimensionsPagedResponse listCustomDimensions(PropertyName parent) { + ListCustomDimensionsRequest request = + ListCustomDimensionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCustomDimensions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper - * authorization both on the Google Analytics property and on the Display & Video 360 - * advertiser. Users who do not have access to the Display & Video 360 advertiser should - * instead seek to create a DisplayVideo360LinkProposal. + * Lists CustomDimensions on a property. * *

Sample code: * @@ -6451,35 +6790,26 @@ public final ListDisplayVideo360AdvertiserLinksPagedResponse listDisplayVideo360 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - * DisplayVideo360AdvertiserLink.newBuilder().build(); - * DisplayVideo360AdvertiserLink response = - * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink( - * parent, displayVideo360AdvertiserLink); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (CustomDimension element : + * analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param parent Required. Example format: properties/1234 - * @param displayVideo360AdvertiserLink Required. The DisplayVideo360AdvertiserLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( - PropertyName parent, DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink) { - CreateDisplayVideo360AdvertiserLinkRequest request = - CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink) - .build(); - return createDisplayVideo360AdvertiserLink(request); + public final ListCustomDimensionsPagedResponse listCustomDimensions(String parent) { + ListCustomDimensionsRequest request = + ListCustomDimensionsRequest.newBuilder().setParent(parent).build(); + return listCustomDimensions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper - * authorization both on the Google Analytics property and on the Display & Video 360 - * advertiser. Users who do not have access to the Display & Video 360 advertiser should - * instead seek to create a DisplayVideo360LinkProposal. + * Lists CustomDimensions on a property. * *

Sample code: * @@ -6491,35 +6821,30 @@ public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - * DisplayVideo360AdvertiserLink.newBuilder().build(); - * DisplayVideo360AdvertiserLink response = - * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink( - * parent, displayVideo360AdvertiserLink); + * ListCustomDimensionsRequest request = + * ListCustomDimensionsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (CustomDimension element : + * analyticsAdminServiceClient.listCustomDimensions(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param parent Required. Example format: properties/1234 - * @param displayVideo360AdvertiserLink Required. The DisplayVideo360AdvertiserLink to create. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( - String parent, DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink) { - CreateDisplayVideo360AdvertiserLinkRequest request = - CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() - .setParent(parent) - .setDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink) - .build(); - return createDisplayVideo360AdvertiserLink(request); + public final ListCustomDimensionsPagedResponse listCustomDimensions( + ListCustomDimensionsRequest request) { + return listCustomDimensionsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper - * authorization both on the Google Analytics property and on the Display & Video 360 - * advertiser. Users who do not have access to the Display & Video 360 advertiser should - * instead seek to create a DisplayVideo360LinkProposal. + * Lists CustomDimensions on a property. * *

Sample code: * @@ -6531,30 +6856,29 @@ public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateDisplayVideo360AdvertiserLinkRequest request = - * CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() + * ListCustomDimensionsRequest request = + * ListCustomDimensionsRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * DisplayVideo360AdvertiserLink response = - * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLink(request); + * ApiFuture future = + * analyticsAdminServiceClient.listCustomDimensionsPagedCallable().futureCall(request); + * // Do something. + * for (CustomDimension element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( - CreateDisplayVideo360AdvertiserLinkRequest request) { - return createDisplayVideo360AdvertiserLinkCallable().call(request); + public final UnaryCallable + listCustomDimensionsPagedCallable() { + return stub.listCustomDimensionsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper - * authorization both on the Google Analytics property and on the Display & Video 360 - * advertiser. Users who do not have access to the Display & Video 360 advertiser should - * instead seek to create a DisplayVideo360LinkProposal. + * Lists CustomDimensions on a property. * *

Sample code: * @@ -6566,29 +6890,36 @@ public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateDisplayVideo360AdvertiserLinkRequest request = - * CreateDisplayVideo360AdvertiserLinkRequest.newBuilder() + * ListCustomDimensionsRequest request = + * ListCustomDimensionsRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .createDisplayVideo360AdvertiserLinkCallable() - * .futureCall(request); - * // Do something. - * DisplayVideo360AdvertiserLink response = future.get(); + * while (true) { + * ListCustomDimensionsResponse response = + * analyticsAdminServiceClient.listCustomDimensionsCallable().call(request); + * for (CustomDimension element : response.getCustomDimensionsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } */ - public final UnaryCallable< - CreateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> - createDisplayVideo360AdvertiserLinkCallable() { - return stub.createDisplayVideo360AdvertiserLinkCallable(); + public final UnaryCallable + listCustomDimensionsCallable() { + return stub.listCustomDimensionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLink on a property. + * Archives a CustomDimension on a property. * *

Sample code: * @@ -6600,27 +6931,26 @@ public final DisplayVideo360AdvertiserLink createDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DisplayVideo360AdvertiserLinkName name = - * DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(name); + * CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + * analyticsAdminServiceClient.archiveCustomDimension(name); * } * } * - * @param name Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: - * properties/1234/displayVideo360AdvertiserLinks/5678 + * @param name Required. The name of the CustomDimension to archive. Example format: + * properties/1234/customDimensions/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLinkName name) { - DeleteDisplayVideo360AdvertiserLinkRequest request = - DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder() + public final void archiveCustomDimension(CustomDimensionName name) { + ArchiveCustomDimensionRequest request = + ArchiveCustomDimensionRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - deleteDisplayVideo360AdvertiserLink(request); + archiveCustomDimension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLink on a property. + * Archives a CustomDimension on a property. * *

Sample code: * @@ -6632,26 +6962,24 @@ public final void deleteDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - * .toString(); - * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(name); + * String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString(); + * analyticsAdminServiceClient.archiveCustomDimension(name); * } * } * - * @param name Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: - * properties/1234/displayVideo360AdvertiserLinks/5678 + * @param name Required. The name of the CustomDimension to archive. Example format: + * properties/1234/customDimensions/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDisplayVideo360AdvertiserLink(String name) { - DeleteDisplayVideo360AdvertiserLinkRequest request = - DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder().setName(name).build(); - deleteDisplayVideo360AdvertiserLink(request); + public final void archiveCustomDimension(String name) { + ArchiveCustomDimensionRequest request = + ArchiveCustomDimensionRequest.newBuilder().setName(name).build(); + archiveCustomDimension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLink on a property. + * Archives a CustomDimension on a property. * *

Sample code: * @@ -6663,28 +6991,24 @@ public final void deleteDisplayVideo360AdvertiserLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteDisplayVideo360AdvertiserLinkRequest request = - * DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - * .toString()) + * ArchiveCustomDimensionRequest request = + * ArchiveCustomDimensionRequest.newBuilder() + * .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) * .build(); - * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLink(request); + * analyticsAdminServiceClient.archiveCustomDimension(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDisplayVideo360AdvertiserLink( - DeleteDisplayVideo360AdvertiserLinkRequest request) { - deleteDisplayVideo360AdvertiserLinkCallable().call(request); + public final void archiveCustomDimension(ArchiveCustomDimensionRequest request) { + archiveCustomDimensionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLink on a property. + * Archives a CustomDimension on a property. * *

Sample code: * @@ -6696,30 +7020,25 @@ public final void deleteDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteDisplayVideo360AdvertiserLinkRequest request = - * DeleteDisplayVideo360AdvertiserLinkRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - * .toString()) + * ArchiveCustomDimensionRequest request = + * ArchiveCustomDimensionRequest.newBuilder() + * .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) * .build(); * ApiFuture future = - * analyticsAdminServiceClient - * .deleteDisplayVideo360AdvertiserLinkCallable() - * .futureCall(request); + * analyticsAdminServiceClient.archiveCustomDimensionCallable().futureCall(request); * // Do something. * future.get(); * } * } */ - public final UnaryCallable - deleteDisplayVideo360AdvertiserLinkCallable() { - return stub.deleteDisplayVideo360AdvertiserLinkCallable(); + public final UnaryCallable + archiveCustomDimensionCallable() { + return stub.archiveCustomDimensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a DisplayVideo360AdvertiserLink on a property. + * Lookup for a single CustomDimension. * *

Sample code: * @@ -6731,34 +7050,26 @@ public final void deleteDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - * DisplayVideo360AdvertiserLink.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * DisplayVideo360AdvertiserLink response = - * analyticsAdminServiceClient.updateDisplayVideo360AdvertiserLink( - * displayVideo360AdvertiserLink, updateMask); + * CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + * CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name); * } * } * - * @param displayVideo360AdvertiserLink The DisplayVideo360AdvertiserLink to update - * @param updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. To replace the entire entity, use one path with the string "*" to match all - * fields. + * @param name Required. The name of the CustomDimension to get. Example format: + * properties/1234/customDimensions/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink( - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink, FieldMask updateMask) { - UpdateDisplayVideo360AdvertiserLinkRequest request = - UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder() - .setDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink) - .setUpdateMask(updateMask) + public final CustomDimension getCustomDimension(CustomDimensionName name) { + GetCustomDimensionRequest request = + GetCustomDimensionRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return updateDisplayVideo360AdvertiserLink(request); + return getCustomDimension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a DisplayVideo360AdvertiserLink on a property. + * Lookup for a single CustomDimension. * *

Sample code: * @@ -6770,27 +7081,53 @@ public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateDisplayVideo360AdvertiserLinkRequest request = - * UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder() - * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString(); + * CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name); + * } + * } + * + * @param name Required. The name of the CustomDimension to get. Example format: + * properties/1234/customDimensions/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomDimension getCustomDimension(String name) { + GetCustomDimensionRequest request = + GetCustomDimensionRequest.newBuilder().setName(name).build(); + return getCustomDimension(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup for a single CustomDimension. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetCustomDimensionRequest request =
+   *       GetCustomDimensionRequest.newBuilder()
+   *           .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString())
    *           .build();
-   *   DisplayVideo360AdvertiserLink response =
-   *       analyticsAdminServiceClient.updateDisplayVideo360AdvertiserLink(request);
+   *   CustomDimension response = analyticsAdminServiceClient.getCustomDimension(request);
    * }
    * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink( - UpdateDisplayVideo360AdvertiserLinkRequest request) { - return updateDisplayVideo360AdvertiserLinkCallable().call(request); + public final CustomDimension getCustomDimension(GetCustomDimensionRequest request) { + return getCustomDimensionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a DisplayVideo360AdvertiserLink on a property. + * Lookup for a single CustomDimension. * *

Sample code: * @@ -6802,29 +7139,25 @@ public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateDisplayVideo360AdvertiserLinkRequest request = - * UpdateDisplayVideo360AdvertiserLinkRequest.newBuilder() - * .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * GetCustomDimensionRequest request = + * GetCustomDimensionRequest.newBuilder() + * .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .updateDisplayVideo360AdvertiserLinkCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getCustomDimensionCallable().futureCall(request); * // Do something. - * DisplayVideo360AdvertiserLink response = future.get(); + * CustomDimension response = future.get(); * } * } */ - public final UnaryCallable< - UpdateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> - updateDisplayVideo360AdvertiserLinkCallable() { - return stub.updateDisplayVideo360AdvertiserLinkCallable(); + public final UnaryCallable + getCustomDimensionCallable() { + return stub.getCustomDimensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DisplayVideo360AdvertiserLinkProposal. + * Creates a CustomMetric. * *

Sample code: * @@ -6836,30 +7169,28 @@ public final DisplayVideo360AdvertiserLink updateDisplayVideo360AdvertiserLink( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DisplayVideo360AdvertiserLinkProposalName name = - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - * DisplayVideo360AdvertiserLinkProposal response = - * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * CustomMetric customMetric = CustomMetric.newBuilder().build(); + * CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric); * } * } * - * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example - * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @param parent Required. Example format: properties/1234 + * @param customMetric Required. The CustomMetric to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal( - DisplayVideo360AdvertiserLinkProposalName name) { - GetDisplayVideo360AdvertiserLinkProposalRequest request = - GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName(name == null ? null : name.toString()) + public final CustomMetric createCustomMetric(PropertyName parent, CustomMetric customMetric) { + CreateCustomMetricRequest request = + CreateCustomMetricRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCustomMetric(customMetric) .build(); - return getDisplayVideo360AdvertiserLinkProposal(request); + return createCustomMetric(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DisplayVideo360AdvertiserLinkProposal. + * Creates a CustomMetric. * *

Sample code: * @@ -6871,29 +7202,28 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString(); - * DisplayVideo360AdvertiserLinkProposal response = - * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * CustomMetric customMetric = CustomMetric.newBuilder().build(); + * CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric); * } * } * - * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. Example - * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @param parent Required. Example format: properties/1234 + * @param customMetric Required. The CustomMetric to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal( - String name) { - GetDisplayVideo360AdvertiserLinkProposalRequest request = - GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder().setName(name).build(); - return getDisplayVideo360AdvertiserLinkProposal(request); + public final CustomMetric createCustomMetric(String parent, CustomMetric customMetric) { + CreateCustomMetricRequest request = + CreateCustomMetricRequest.newBuilder() + .setParent(parent) + .setCustomMetric(customMetric) + .build(); + return createCustomMetric(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DisplayVideo360AdvertiserLinkProposal. + * Creates a CustomMetric. * *

Sample code: * @@ -6905,29 +7235,25 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDisplayVideo360AdvertiserLinkProposalRequest request = - * GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString()) + * CreateCustomMetricRequest request = + * CreateCustomMetricRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setCustomMetric(CustomMetric.newBuilder().build()) * .build(); - * DisplayVideo360AdvertiserLinkProposal response = - * analyticsAdminServiceClient.getDisplayVideo360AdvertiserLinkProposal(request); + * CustomMetric response = analyticsAdminServiceClient.createCustomMetric(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserLinkProposal( - GetDisplayVideo360AdvertiserLinkProposalRequest request) { - return getDisplayVideo360AdvertiserLinkProposalCallable().call(request); + public final CustomMetric createCustomMetric(CreateCustomMetricRequest request) { + return createCustomMetricCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DisplayVideo360AdvertiserLinkProposal. + * Creates a CustomMetric. * *

Sample code: * @@ -6939,31 +7265,25 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDisplayVideo360AdvertiserLinkProposalRequest request = - * GetDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString()) + * CreateCustomMetricRequest request = + * CreateCustomMetricRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setCustomMetric(CustomMetric.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .getDisplayVideo360AdvertiserLinkProposalCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createCustomMetricCallable().futureCall(request); * // Do something. - * DisplayVideo360AdvertiserLinkProposal response = future.get(); + * CustomMetric response = future.get(); * } * } */ - public final UnaryCallable< - GetDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> - getDisplayVideo360AdvertiserLinkProposalCallable() { - return stub.getDisplayVideo360AdvertiserLinkProposalCallable(); + public final UnaryCallable createCustomMetricCallable() { + return stub.createCustomMetricCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * Updates a CustomMetric on a property. * *

Sample code: * @@ -6975,65 +7295,31 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (DisplayVideo360AdvertiserLinkProposal element : - * analyticsAdminServiceClient - * .listDisplayVideo360AdvertiserLinkProposals(parent) - * .iterateAll()) { - * // doThingsWith(element); - * } + * CustomMetric customMetric = CustomMetric.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * CustomMetric response = + * analyticsAdminServiceClient.updateCustomMetric(customMetric, updateMask); * } * } * - * @param parent Required. Example format: properties/1234 + * @param customMetric The CustomMetric to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDisplayVideo360AdvertiserLinkProposalsPagedResponse - listDisplayVideo360AdvertiserLinkProposals(PropertyName parent) { - ListDisplayVideo360AdvertiserLinkProposalsRequest request = - ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) + public final CustomMetric updateCustomMetric(CustomMetric customMetric, FieldMask updateMask) { + UpdateCustomMetricRequest request = + UpdateCustomMetricRequest.newBuilder() + .setCustomMetric(customMetric) + .setUpdateMask(updateMask) .build(); - return listDisplayVideo360AdvertiserLinkProposals(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   String parent = PropertyName.of("[PROPERTY]").toString();
-   *   for (DisplayVideo360AdvertiserLinkProposal element :
-   *       analyticsAdminServiceClient
-   *           .listDisplayVideo360AdvertiserLinkProposals(parent)
-   *           .iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Example format: properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDisplayVideo360AdvertiserLinkProposalsPagedResponse - listDisplayVideo360AdvertiserLinkProposals(String parent) { - ListDisplayVideo360AdvertiserLinkProposalsRequest request = - ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder().setParent(parent).build(); - return listDisplayVideo360AdvertiserLinkProposals(request); + return updateCustomMetric(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * Updates a CustomMetric on a property. * *

Sample code: * @@ -7045,33 +7331,25 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDisplayVideo360AdvertiserLinkProposalsRequest request = - * ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * UpdateCustomMetricRequest request = + * UpdateCustomMetricRequest.newBuilder() + * .setCustomMetric(CustomMetric.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * for (DisplayVideo360AdvertiserLinkProposal element : - * analyticsAdminServiceClient - * .listDisplayVideo360AdvertiserLinkProposals(request) - * .iterateAll()) { - * // doThingsWith(element); - * } + * CustomMetric response = analyticsAdminServiceClient.updateCustomMetric(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDisplayVideo360AdvertiserLinkProposalsPagedResponse - listDisplayVideo360AdvertiserLinkProposals( - ListDisplayVideo360AdvertiserLinkProposalsRequest request) { - return listDisplayVideo360AdvertiserLinkProposalsPagedCallable().call(request); + public final CustomMetric updateCustomMetric(UpdateCustomMetricRequest request) { + return updateCustomMetricCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * Updates a CustomMetric on a property. * *

Sample code: * @@ -7083,33 +7361,25 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDisplayVideo360AdvertiserLinkProposalsRequest request = - * ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * UpdateCustomMetricRequest request = + * UpdateCustomMetricRequest.newBuilder() + * .setCustomMetric(CustomMetric.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .listDisplayVideo360AdvertiserLinkProposalsPagedCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateCustomMetricCallable().futureCall(request); * // Do something. - * for (DisplayVideo360AdvertiserLinkProposal element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * CustomMetric response = future.get(); * } * } */ - public final UnaryCallable< - ListDisplayVideo360AdvertiserLinkProposalsRequest, - ListDisplayVideo360AdvertiserLinkProposalsPagedResponse> - listDisplayVideo360AdvertiserLinkProposalsPagedCallable() { - return stub.listDisplayVideo360AdvertiserLinkProposalsPagedCallable(); + public final UnaryCallable updateCustomMetricCallable() { + return stub.updateCustomMetricCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * Lists CustomMetrics on a property. * *

Sample code: * @@ -7121,41 +7391,28 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDisplayVideo360AdvertiserLinkProposalsRequest request = - * ListDisplayVideo360AdvertiserLinkProposalsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListDisplayVideo360AdvertiserLinkProposalsResponse response = - * analyticsAdminServiceClient - * .listDisplayVideo360AdvertiserLinkProposalsCallable() - * .call(request); - * for (DisplayVideo360AdvertiserLinkProposal element : - * response.getDisplayVideo360AdvertiserLinkProposalsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (CustomMetric element : + * analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) { + * // doThingsWith(element); * } * } * } + * + * @param parent Required. Example format: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - ListDisplayVideo360AdvertiserLinkProposalsRequest, - ListDisplayVideo360AdvertiserLinkProposalsResponse> - listDisplayVideo360AdvertiserLinkProposalsCallable() { - return stub.listDisplayVideo360AdvertiserLinkProposalsCallable(); + public final ListCustomMetricsPagedResponse listCustomMetrics(PropertyName parent) { + ListCustomMetricsRequest request = + ListCustomMetricsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCustomMetrics(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLinkProposal. + * Lists CustomMetrics on a property. * *

Sample code: * @@ -7167,34 +7424,26 @@ public final DisplayVideo360AdvertiserLinkProposal getDisplayVideo360AdvertiserL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - * DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - * DisplayVideo360AdvertiserLinkProposal response = - * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal( - * parent, displayVideo360AdvertiserLinkProposal); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (CustomMetric element : + * analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param parent Required. Example format: properties/1234 - * @param displayVideo360AdvertiserLinkProposal Required. The - * DisplayVideo360AdvertiserLinkProposal to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal( - PropertyName parent, - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal) { - CreateDisplayVideo360AdvertiserLinkProposalRequest request = - CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDisplayVideo360AdvertiserLinkProposal(displayVideo360AdvertiserLinkProposal) - .build(); - return createDisplayVideo360AdvertiserLinkProposal(request); + public final ListCustomMetricsPagedResponse listCustomMetrics(String parent) { + ListCustomMetricsRequest request = + ListCustomMetricsRequest.newBuilder().setParent(parent).build(); + return listCustomMetrics(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLinkProposal. + * Lists CustomMetrics on a property. * *

Sample code: * @@ -7206,33 +7455,29 @@ public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360Advertis * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - * DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - * DisplayVideo360AdvertiserLinkProposal response = - * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal( - * parent, displayVideo360AdvertiserLinkProposal); + * ListCustomMetricsRequest request = + * ListCustomMetricsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (CustomMetric element : + * analyticsAdminServiceClient.listCustomMetrics(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param parent Required. Example format: properties/1234 - * @param displayVideo360AdvertiserLinkProposal Required. The - * DisplayVideo360AdvertiserLinkProposal to create. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal( - String parent, DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal) { - CreateDisplayVideo360AdvertiserLinkProposalRequest request = - CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setParent(parent) - .setDisplayVideo360AdvertiserLinkProposal(displayVideo360AdvertiserLinkProposal) - .build(); - return createDisplayVideo360AdvertiserLinkProposal(request); + public final ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsRequest request) { + return listCustomMetricsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLinkProposal. + * Lists CustomMetrics on a property. * *

Sample code: * @@ -7244,28 +7489,29 @@ public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360Advertis * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateDisplayVideo360AdvertiserLinkProposalRequest request = - * CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * ListCustomMetricsRequest request = + * ListCustomMetricsRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setDisplayVideo360AdvertiserLinkProposal( - * DisplayVideo360AdvertiserLinkProposal.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * DisplayVideo360AdvertiserLinkProposal response = - * analyticsAdminServiceClient.createDisplayVideo360AdvertiserLinkProposal(request); + * ApiFuture future = + * analyticsAdminServiceClient.listCustomMetricsPagedCallable().futureCall(request); + * // Do something. + * for (CustomMetric element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360AdvertiserLinkProposal( - CreateDisplayVideo360AdvertiserLinkProposalRequest request) { - return createDisplayVideo360AdvertiserLinkProposalCallable().call(request); + public final UnaryCallable + listCustomMetricsPagedCallable() { + return stub.listCustomMetricsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DisplayVideo360AdvertiserLinkProposal. + * Lists CustomMetrics on a property. * *

Sample code: * @@ -7277,31 +7523,36 @@ public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360Advertis * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateDisplayVideo360AdvertiserLinkProposalRequest request = - * CreateDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + * ListCustomMetricsRequest request = + * ListCustomMetricsRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setDisplayVideo360AdvertiserLinkProposal( - * DisplayVideo360AdvertiserLinkProposal.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .createDisplayVideo360AdvertiserLinkProposalCallable() - * .futureCall(request); - * // Do something. - * DisplayVideo360AdvertiserLinkProposal response = future.get(); + * while (true) { + * ListCustomMetricsResponse response = + * analyticsAdminServiceClient.listCustomMetricsCallable().call(request); + * for (CustomMetric element : response.getCustomMetricsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } */ - public final UnaryCallable< - CreateDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> - createDisplayVideo360AdvertiserLinkProposalCallable() { - return stub.createDisplayVideo360AdvertiserLinkProposalCallable(); + public final UnaryCallable + listCustomMetricsCallable() { + return stub.listCustomMetricsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on - * cancelled proposals. + * Archives a CustomMetric on a property. * *

Sample code: * @@ -7313,30 +7564,26 @@ public final DisplayVideo360AdvertiserLinkProposal createDisplayVideo360Advertis * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DisplayVideo360AdvertiserLinkProposalName name = - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(name); + * CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + * analyticsAdminServiceClient.archiveCustomMetric(name); * } * } * - * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example - * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @param name Required. The name of the CustomMetric to archive. Example format: + * properties/1234/customMetrics/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDisplayVideo360AdvertiserLinkProposal( - DisplayVideo360AdvertiserLinkProposalName name) { - DeleteDisplayVideo360AdvertiserLinkProposalRequest request = - DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + public final void archiveCustomMetric(CustomMetricName name) { + ArchiveCustomMetricRequest request = + ArchiveCustomMetricRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - deleteDisplayVideo360AdvertiserLinkProposal(request); + archiveCustomMetric(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on - * cancelled proposals. + * Archives a CustomMetric on a property. * *

Sample code: * @@ -7348,28 +7595,24 @@ public final void deleteDisplayVideo360AdvertiserLinkProposal( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString(); - * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(name); + * String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString(); + * analyticsAdminServiceClient.archiveCustomMetric(name); * } * } * - * @param name Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example - * format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @param name Required. The name of the CustomMetric to archive. Example format: + * properties/1234/customMetrics/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDisplayVideo360AdvertiserLinkProposal(String name) { - DeleteDisplayVideo360AdvertiserLinkProposalRequest request = - DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder().setName(name).build(); - deleteDisplayVideo360AdvertiserLinkProposal(request); + public final void archiveCustomMetric(String name) { + ArchiveCustomMetricRequest request = + ArchiveCustomMetricRequest.newBuilder().setName(name).build(); + archiveCustomMetric(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on - * cancelled proposals. + * Archives a CustomMetric on a property. * *

Sample code: * @@ -7381,29 +7624,24 @@ public final void deleteDisplayVideo360AdvertiserLinkProposal(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteDisplayVideo360AdvertiserLinkProposalRequest request = - * DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString()) + * ArchiveCustomMetricRequest request = + * ArchiveCustomMetricRequest.newBuilder() + * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) * .build(); - * analyticsAdminServiceClient.deleteDisplayVideo360AdvertiserLinkProposal(request); + * analyticsAdminServiceClient.archiveCustomMetric(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDisplayVideo360AdvertiserLinkProposal( - DeleteDisplayVideo360AdvertiserLinkProposalRequest request) { - deleteDisplayVideo360AdvertiserLinkProposalCallable().call(request); + public final void archiveCustomMetric(ArchiveCustomMetricRequest request) { + archiveCustomMetricCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on - * cancelled proposals. + * Archives a CustomMetric on a property. * *

Sample code: * @@ -7415,31 +7653,24 @@ public final void deleteDisplayVideo360AdvertiserLinkProposal( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteDisplayVideo360AdvertiserLinkProposalRequest request = - * DeleteDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString()) + * ArchiveCustomMetricRequest request = + * ArchiveCustomMetricRequest.newBuilder() + * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) * .build(); * ApiFuture future = - * analyticsAdminServiceClient - * .deleteDisplayVideo360AdvertiserLinkProposalCallable() - * .futureCall(request); + * analyticsAdminServiceClient.archiveCustomMetricCallable().futureCall(request); * // Do something. * future.get(); * } * } */ - public final UnaryCallable - deleteDisplayVideo360AdvertiserLinkProposalCallable() { - return stub.deleteDisplayVideo360AdvertiserLinkProposalCallable(); + public final UnaryCallable archiveCustomMetricCallable() { + return stub.archiveCustomMetricCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal - * will be deleted and a new DisplayVideo360AdvertiserLink will be created. + * Lookup for a single CustomMetric. * *

Sample code: * @@ -7451,70 +7682,52 @@ public final void deleteDisplayVideo360AdvertiserLinkProposal( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ApproveDisplayVideo360AdvertiserLinkProposalRequest request = - * ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString()) - * .build(); - * ApproveDisplayVideo360AdvertiserLinkProposalResponse response = - * analyticsAdminServiceClient.approveDisplayVideo360AdvertiserLinkProposal(request); + * CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + * CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the CustomMetric to get. Example format: + * properties/1234/customMetrics/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ApproveDisplayVideo360AdvertiserLinkProposalResponse - approveDisplayVideo360AdvertiserLinkProposal( - ApproveDisplayVideo360AdvertiserLinkProposalRequest request) { - return approveDisplayVideo360AdvertiserLinkProposalCallable().call(request); + public final CustomMetric getCustomMetric(CustomMetricName name) { + GetCustomMetricRequest request = + GetCustomMetricRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCustomMetric(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal - * will be deleted and a new DisplayVideo360AdvertiserLink will be created. + * Lookup for a single CustomMetric. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   ApproveDisplayVideo360AdvertiserLinkProposalRequest request =
-   *       ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder()
-   *           .setName(
-   *               DisplayVideo360AdvertiserLinkProposalName.of(
-   *                       "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsAdminServiceClient
-   *           .approveDisplayVideo360AdvertiserLinkProposalCallable()
-   *           .futureCall(request);
-   *   // Do something.
-   *   ApproveDisplayVideo360AdvertiserLinkProposalResponse response = future.get();
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString();
+   *   CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name);
    * }
    * }
+ * + * @param name Required. The name of the CustomMetric to get. Example format: + * properties/1234/customMetrics/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - ApproveDisplayVideo360AdvertiserLinkProposalRequest, - ApproveDisplayVideo360AdvertiserLinkProposalResponse> - approveDisplayVideo360AdvertiserLinkProposalCallable() { - return stub.approveDisplayVideo360AdvertiserLinkProposalCallable(); + public final CustomMetric getCustomMetric(String name) { + GetCustomMetricRequest request = GetCustomMetricRequest.newBuilder().setName(name).build(); + return getCustomMetric(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a - * proposal initiated from Display & Video 360 - Withdrawing a proposal initiated from Google - * Analytics After being cancelled, a proposal will eventually be deleted automatically. + * Lookup for a single CustomMetric. * *

Sample code: * @@ -7526,31 +7739,24 @@ public final void deleteDisplayVideo360AdvertiserLinkProposal( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CancelDisplayVideo360AdvertiserLinkProposalRequest request = - * CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString()) + * GetCustomMetricRequest request = + * GetCustomMetricRequest.newBuilder() + * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) * .build(); - * DisplayVideo360AdvertiserLinkProposal response = - * analyticsAdminServiceClient.cancelDisplayVideo360AdvertiserLinkProposal(request); + * CustomMetric response = analyticsAdminServiceClient.getCustomMetric(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DisplayVideo360AdvertiserLinkProposal cancelDisplayVideo360AdvertiserLinkProposal( - CancelDisplayVideo360AdvertiserLinkProposalRequest request) { - return cancelDisplayVideo360AdvertiserLinkProposalCallable().call(request); + public final CustomMetric getCustomMetric(GetCustomMetricRequest request) { + return getCustomMetricCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a - * proposal initiated from Display & Video 360 - Withdrawing a proposal initiated from Google - * Analytics After being cancelled, a proposal will eventually be deleted automatically. + * Lookup for a single CustomMetric. * *

Sample code: * @@ -7562,31 +7768,24 @@ public final DisplayVideo360AdvertiserLinkProposal cancelDisplayVideo360Advertis * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CancelDisplayVideo360AdvertiserLinkProposalRequest request = - * CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - * .setName( - * DisplayVideo360AdvertiserLinkProposalName.of( - * "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - * .toString()) + * GetCustomMetricRequest request = + * GetCustomMetricRequest.newBuilder() + * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .cancelDisplayVideo360AdvertiserLinkProposalCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getCustomMetricCallable().futureCall(request); * // Do something. - * DisplayVideo360AdvertiserLinkProposal response = future.get(); + * CustomMetric response = future.get(); * } * } */ - public final UnaryCallable< - CancelDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> - cancelDisplayVideo360AdvertiserLinkProposalCallable() { - return stub.cancelDisplayVideo360AdvertiserLinkProposalCallable(); + public final UnaryCallable getCustomMetricCallable() { + return stub.getCustomMetricCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomDimension. + * Returns the singleton data retention settings for this property. * *

Sample code: * @@ -7598,30 +7797,27 @@ public final DisplayVideo360AdvertiserLinkProposal cancelDisplayVideo360Advertis * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * CustomDimension customDimension = CustomDimension.newBuilder().build(); - * CustomDimension response = - * analyticsAdminServiceClient.createCustomDimension(parent, customDimension); + * DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + * DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name); * } * } * - * @param parent Required. Example format: properties/1234 - * @param customDimension Required. The CustomDimension to create. + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataRetentionSettings Example: + * "properties/1000/dataRetentionSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomDimension createCustomDimension( - PropertyName parent, CustomDimension customDimension) { - CreateCustomDimensionRequest request = - CreateCustomDimensionRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setCustomDimension(customDimension) + public final DataRetentionSettings getDataRetentionSettings(DataRetentionSettingsName name) { + GetDataRetentionSettingsRequest request = + GetDataRetentionSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return createCustomDimension(request); + return getDataRetentionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomDimension. + * Returns the singleton data retention settings for this property. * *

Sample code: * @@ -7633,30 +7829,25 @@ public final CustomDimension createCustomDimension( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * CustomDimension customDimension = CustomDimension.newBuilder().build(); - * CustomDimension response = - * analyticsAdminServiceClient.createCustomDimension(parent, customDimension); + * String name = DataRetentionSettingsName.of("[PROPERTY]").toString(); + * DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name); * } * } * - * @param parent Required. Example format: properties/1234 - * @param customDimension Required. The CustomDimension to create. + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataRetentionSettings Example: + * "properties/1000/dataRetentionSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomDimension createCustomDimension( - String parent, CustomDimension customDimension) { - CreateCustomDimensionRequest request = - CreateCustomDimensionRequest.newBuilder() - .setParent(parent) - .setCustomDimension(customDimension) - .build(); - return createCustomDimension(request); + public final DataRetentionSettings getDataRetentionSettings(String name) { + GetDataRetentionSettingsRequest request = + GetDataRetentionSettingsRequest.newBuilder().setName(name).build(); + return getDataRetentionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomDimension. + * Returns the singleton data retention settings for this property. * *

Sample code: * @@ -7668,25 +7859,26 @@ public final CustomDimension createCustomDimension( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateCustomDimensionRequest request = - * CreateCustomDimensionRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setCustomDimension(CustomDimension.newBuilder().build()) + * GetDataRetentionSettingsRequest request = + * GetDataRetentionSettingsRequest.newBuilder() + * .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) * .build(); - * CustomDimension response = analyticsAdminServiceClient.createCustomDimension(request); + * DataRetentionSettings response = + * analyticsAdminServiceClient.getDataRetentionSettings(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomDimension createCustomDimension(CreateCustomDimensionRequest request) { - return createCustomDimensionCallable().call(request); + public final DataRetentionSettings getDataRetentionSettings( + GetDataRetentionSettingsRequest request) { + return getDataRetentionSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomDimension. + * Returns the singleton data retention settings for this property. * *

Sample code: * @@ -7698,26 +7890,25 @@ public final CustomDimension createCustomDimension(CreateCustomDimensionRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateCustomDimensionRequest request = - * CreateCustomDimensionRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setCustomDimension(CustomDimension.newBuilder().build()) + * GetDataRetentionSettingsRequest request = + * GetDataRetentionSettingsRequest.newBuilder() + * .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createCustomDimensionCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getDataRetentionSettingsCallable().futureCall(request); * // Do something. - * CustomDimension response = future.get(); + * DataRetentionSettings response = future.get(); * } * } */ - public final UnaryCallable - createCustomDimensionCallable() { - return stub.createCustomDimensionCallable(); + public final UnaryCallable + getDataRetentionSettingsCallable() { + return stub.getDataRetentionSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a CustomDimension on a property. + * Updates the singleton data retention settings for this property. * *

Sample code: * @@ -7729,32 +7920,34 @@ public final CustomDimension createCustomDimension(CreateCustomDimensionRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CustomDimension customDimension = CustomDimension.newBuilder().build(); + * DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); * FieldMask updateMask = FieldMask.newBuilder().build(); - * CustomDimension response = - * analyticsAdminServiceClient.updateCustomDimension(customDimension, updateMask); + * DataRetentionSettings response = + * analyticsAdminServiceClient.updateDataRetentionSettings( + * dataRetentionSettings, updateMask); * } * } * - * @param customDimension The CustomDimension to update - * @param updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. To replace the entire entity, use one path with the string "*" to match all - * fields. + * @param dataRetentionSettings Required. The settings to update. The `name` field is used to + * identify the settings to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomDimension updateCustomDimension( - CustomDimension customDimension, FieldMask updateMask) { - UpdateCustomDimensionRequest request = - UpdateCustomDimensionRequest.newBuilder() - .setCustomDimension(customDimension) + public final DataRetentionSettings updateDataRetentionSettings( + DataRetentionSettings dataRetentionSettings, FieldMask updateMask) { + UpdateDataRetentionSettingsRequest request = + UpdateDataRetentionSettingsRequest.newBuilder() + .setDataRetentionSettings(dataRetentionSettings) .setUpdateMask(updateMask) .build(); - return updateCustomDimension(request); + return updateDataRetentionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a CustomDimension on a property. + * Updates the singleton data retention settings for this property. * *

Sample code: * @@ -7766,25 +7959,27 @@ public final CustomDimension updateCustomDimension( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateCustomDimensionRequest request = - * UpdateCustomDimensionRequest.newBuilder() - * .setCustomDimension(CustomDimension.newBuilder().build()) + * UpdateDataRetentionSettingsRequest request = + * UpdateDataRetentionSettingsRequest.newBuilder() + * .setDataRetentionSettings(DataRetentionSettings.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * CustomDimension response = analyticsAdminServiceClient.updateCustomDimension(request); + * DataRetentionSettings response = + * analyticsAdminServiceClient.updateDataRetentionSettings(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomDimension updateCustomDimension(UpdateCustomDimensionRequest request) { - return updateCustomDimensionCallable().call(request); + public final DataRetentionSettings updateDataRetentionSettings( + UpdateDataRetentionSettingsRequest request) { + return updateDataRetentionSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a CustomDimension on a property. + * Updates the singleton data retention settings for this property. * *

Sample code: * @@ -7796,59 +7991,26 @@ public final CustomDimension updateCustomDimension(UpdateCustomDimensionRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateCustomDimensionRequest request = - * UpdateCustomDimensionRequest.newBuilder() - * .setCustomDimension(CustomDimension.newBuilder().build()) + * UpdateDataRetentionSettingsRequest request = + * UpdateDataRetentionSettingsRequest.newBuilder() + * .setDataRetentionSettings(DataRetentionSettings.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateCustomDimensionCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateDataRetentionSettingsCallable().futureCall(request); * // Do something. - * CustomDimension response = future.get(); - * } - * } - */ - public final UnaryCallable - updateCustomDimensionCallable() { - return stub.updateCustomDimensionCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists CustomDimensions on a property. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   for (CustomDimension element :
-   *       analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Example format: properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListCustomDimensionsPagedResponse listCustomDimensions(PropertyName parent) { - ListCustomDimensionsRequest request = - ListCustomDimensionsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listCustomDimensions(request); + * DataRetentionSettings response = future.get(); + * } + * } + */ + public final UnaryCallable + updateDataRetentionSettingsCallable() { + return stub.updateDataRetentionSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomDimensions on a property. + * Creates a DataStream. * *

Sample code: * @@ -7860,26 +8022,28 @@ public final ListCustomDimensionsPagedResponse listCustomDimensions(PropertyName * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (CustomDimension element : - * analyticsAdminServiceClient.listCustomDimensions(parent).iterateAll()) { - * // doThingsWith(element); - * } + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * DataStream dataStream = DataStream.newBuilder().build(); + * DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream); * } * } * * @param parent Required. Example format: properties/1234 + * @param dataStream Required. The DataStream to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListCustomDimensionsPagedResponse listCustomDimensions(String parent) { - ListCustomDimensionsRequest request = - ListCustomDimensionsRequest.newBuilder().setParent(parent).build(); - return listCustomDimensions(request); + public final DataStream createDataStream(PropertyName parent, DataStream dataStream) { + CreateDataStreamRequest request = + CreateDataStreamRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataStream(dataStream) + .build(); + return createDataStream(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomDimensions on a property. + * Creates a DataStream. * *

Sample code: * @@ -7891,30 +8055,25 @@ public final ListCustomDimensionsPagedResponse listCustomDimensions(String paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListCustomDimensionsRequest request = - * ListCustomDimensionsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * for (CustomDimension element : - * analyticsAdminServiceClient.listCustomDimensions(request).iterateAll()) { - * // doThingsWith(element); - * } + * String parent = PropertyName.of("[PROPERTY]").toString(); + * DataStream dataStream = DataStream.newBuilder().build(); + * DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 + * @param dataStream Required. The DataStream to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListCustomDimensionsPagedResponse listCustomDimensions( - ListCustomDimensionsRequest request) { - return listCustomDimensionsPagedCallable().call(request); + public final DataStream createDataStream(String parent, DataStream dataStream) { + CreateDataStreamRequest request = + CreateDataStreamRequest.newBuilder().setParent(parent).setDataStream(dataStream).build(); + return createDataStream(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomDimensions on a property. + * Creates a DataStream. * *

Sample code: * @@ -7926,29 +8085,25 @@ public final ListCustomDimensionsPagedResponse listCustomDimensions( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListCustomDimensionsRequest request = - * ListCustomDimensionsRequest.newBuilder() + * CreateDataStreamRequest request = + * CreateDataStreamRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * .setDataStream(DataStream.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listCustomDimensionsPagedCallable().futureCall(request); - * // Do something. - * for (CustomDimension element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * DataStream response = analyticsAdminServiceClient.createDataStream(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listCustomDimensionsPagedCallable() { - return stub.listCustomDimensionsPagedCallable(); + public final DataStream createDataStream(CreateDataStreamRequest request) { + return createDataStreamCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomDimensions on a property. + * Creates a DataStream. * *

Sample code: * @@ -7960,36 +8115,25 @@ public final ListCustomDimensionsPagedResponse listCustomDimensions( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListCustomDimensionsRequest request = - * ListCustomDimensionsRequest.newBuilder() + * CreateDataStreamRequest request = + * CreateDataStreamRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * .setDataStream(DataStream.newBuilder().build()) * .build(); - * while (true) { - * ListCustomDimensionsResponse response = - * analyticsAdminServiceClient.listCustomDimensionsCallable().call(request); - * for (CustomDimension element : response.getCustomDimensionsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * ApiFuture future = + * analyticsAdminServiceClient.createDataStreamCallable().futureCall(request); + * // Do something. + * DataStream response = future.get(); * } * } */ - public final UnaryCallable - listCustomDimensionsCallable() { - return stub.listCustomDimensionsCallable(); + public final UnaryCallable createDataStreamCallable() { + return stub.createDataStreamCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomDimension on a property. + * Deletes a DataStream on a property. * *

Sample code: * @@ -8001,26 +8145,24 @@ public final ListCustomDimensionsPagedResponse listCustomDimensions( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - * analyticsAdminServiceClient.archiveCustomDimension(name); + * DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + * analyticsAdminServiceClient.deleteDataStream(name); * } * } * - * @param name Required. The name of the CustomDimension to archive. Example format: - * properties/1234/customDimensions/5678 + * @param name Required. The name of the DataStream to delete. Example format: + * properties/1234/dataStreams/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void archiveCustomDimension(CustomDimensionName name) { - ArchiveCustomDimensionRequest request = - ArchiveCustomDimensionRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - archiveCustomDimension(request); + public final void deleteDataStream(DataStreamName name) { + DeleteDataStreamRequest request = + DeleteDataStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteDataStream(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomDimension on a property. + * Deletes a DataStream on a property. * *

Sample code: * @@ -8032,24 +8174,23 @@ public final void archiveCustomDimension(CustomDimensionName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString(); - * analyticsAdminServiceClient.archiveCustomDimension(name); + * String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * analyticsAdminServiceClient.deleteDataStream(name); * } * } * - * @param name Required. The name of the CustomDimension to archive. Example format: - * properties/1234/customDimensions/5678 + * @param name Required. The name of the DataStream to delete. Example format: + * properties/1234/dataStreams/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void archiveCustomDimension(String name) { - ArchiveCustomDimensionRequest request = - ArchiveCustomDimensionRequest.newBuilder().setName(name).build(); - archiveCustomDimension(request); + public final void deleteDataStream(String name) { + DeleteDataStreamRequest request = DeleteDataStreamRequest.newBuilder().setName(name).build(); + deleteDataStream(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomDimension on a property. + * Deletes a DataStream on a property. * *

Sample code: * @@ -8061,24 +8202,24 @@ public final void archiveCustomDimension(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ArchiveCustomDimensionRequest request = - * ArchiveCustomDimensionRequest.newBuilder() - * .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + * DeleteDataStreamRequest request = + * DeleteDataStreamRequest.newBuilder() + * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .build(); - * analyticsAdminServiceClient.archiveCustomDimension(request); + * analyticsAdminServiceClient.deleteDataStream(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void archiveCustomDimension(ArchiveCustomDimensionRequest request) { - archiveCustomDimensionCallable().call(request); + public final void deleteDataStream(DeleteDataStreamRequest request) { + deleteDataStreamCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomDimension on a property. + * Deletes a DataStream on a property. * *

Sample code: * @@ -8090,25 +8231,24 @@ public final void archiveCustomDimension(ArchiveCustomDimensionRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ArchiveCustomDimensionRequest request = - * ArchiveCustomDimensionRequest.newBuilder() - * .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + * DeleteDataStreamRequest request = + * DeleteDataStreamRequest.newBuilder() + * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .build(); * ApiFuture future = - * analyticsAdminServiceClient.archiveCustomDimensionCallable().futureCall(request); + * analyticsAdminServiceClient.deleteDataStreamCallable().futureCall(request); * // Do something. * future.get(); * } * } */ - public final UnaryCallable - archiveCustomDimensionCallable() { - return stub.archiveCustomDimensionCallable(); + public final UnaryCallable deleteDataStreamCallable() { + return stub.deleteDataStreamCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single CustomDimension. + * Updates a DataStream on a property. * *

Sample code: * @@ -8120,55 +8260,30 @@ public final void archiveCustomDimension(ArchiveCustomDimensionRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - * CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name); + * DataStream dataStream = DataStream.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * DataStream response = analyticsAdminServiceClient.updateDataStream(dataStream, updateMask); * } * } * - * @param name Required. The name of the CustomDimension to get. Example format: - * properties/1234/customDimensions/5678 + * @param dataStream The DataStream to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomDimension getCustomDimension(CustomDimensionName name) { - GetCustomDimensionRequest request = - GetCustomDimensionRequest.newBuilder() - .setName(name == null ? null : name.toString()) + public final DataStream updateDataStream(DataStream dataStream, FieldMask updateMask) { + UpdateDataStreamRequest request = + UpdateDataStreamRequest.newBuilder() + .setDataStream(dataStream) + .setUpdateMask(updateMask) .build(); - return getCustomDimension(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lookup for a single CustomDimension. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   String name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString();
-   *   CustomDimension response = analyticsAdminServiceClient.getCustomDimension(name);
-   * }
-   * }
- * - * @param name Required. The name of the CustomDimension to get. Example format: - * properties/1234/customDimensions/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final CustomDimension getCustomDimension(String name) { - GetCustomDimensionRequest request = - GetCustomDimensionRequest.newBuilder().setName(name).build(); - return getCustomDimension(request); + return updateDataStream(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single CustomDimension. + * Updates a DataStream on a property. * *

Sample code: * @@ -8180,24 +8295,25 @@ public final CustomDimension getCustomDimension(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetCustomDimensionRequest request = - * GetCustomDimensionRequest.newBuilder() - * .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + * UpdateDataStreamRequest request = + * UpdateDataStreamRequest.newBuilder() + * .setDataStream(DataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * CustomDimension response = analyticsAdminServiceClient.getCustomDimension(request); + * DataStream response = analyticsAdminServiceClient.updateDataStream(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomDimension getCustomDimension(GetCustomDimensionRequest request) { - return getCustomDimensionCallable().call(request); + public final DataStream updateDataStream(UpdateDataStreamRequest request) { + return updateDataStreamCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single CustomDimension. + * Updates a DataStream on a property. * *

Sample code: * @@ -8209,25 +8325,25 @@ public final CustomDimension getCustomDimension(GetCustomDimensionRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetCustomDimensionRequest request = - * GetCustomDimensionRequest.newBuilder() - * .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + * UpdateDataStreamRequest request = + * UpdateDataStreamRequest.newBuilder() + * .setDataStream(DataStream.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getCustomDimensionCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateDataStreamCallable().futureCall(request); * // Do something. - * CustomDimension response = future.get(); + * DataStream response = future.get(); * } * } */ - public final UnaryCallable - getCustomDimensionCallable() { - return stub.getCustomDimensionCallable(); + public final UnaryCallable updateDataStreamCallable() { + return stub.updateDataStreamCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomMetric. + * Lists DataStreams on a property. * *

Sample code: * @@ -8240,27 +8356,26 @@ public final CustomDimension getCustomDimension(GetCustomDimensionRequest reques * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * PropertyName parent = PropertyName.of("[PROPERTY]"); - * CustomMetric customMetric = CustomMetric.newBuilder().build(); - * CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric); + * for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param parent Required. Example format: properties/1234 - * @param customMetric Required. The CustomMetric to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric createCustomMetric(PropertyName parent, CustomMetric customMetric) { - CreateCustomMetricRequest request = - CreateCustomMetricRequest.newBuilder() + public final ListDataStreamsPagedResponse listDataStreams(PropertyName parent) { + ListDataStreamsRequest request = + ListDataStreamsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) - .setCustomMetric(customMetric) .build(); - return createCustomMetric(request); + return listDataStreams(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomMetric. + * Lists DataStreams on a property. * *

Sample code: * @@ -8273,27 +8388,23 @@ public final CustomMetric createCustomMetric(PropertyName parent, CustomMetric c * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * String parent = PropertyName.of("[PROPERTY]").toString(); - * CustomMetric customMetric = CustomMetric.newBuilder().build(); - * CustomMetric response = analyticsAdminServiceClient.createCustomMetric(parent, customMetric); + * for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param parent Required. Example format: properties/1234 - * @param customMetric Required. The CustomMetric to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric createCustomMetric(String parent, CustomMetric customMetric) { - CreateCustomMetricRequest request = - CreateCustomMetricRequest.newBuilder() - .setParent(parent) - .setCustomMetric(customMetric) - .build(); - return createCustomMetric(request); + public final ListDataStreamsPagedResponse listDataStreams(String parent) { + ListDataStreamsRequest request = ListDataStreamsRequest.newBuilder().setParent(parent).build(); + return listDataStreams(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomMetric. + * Lists DataStreams on a property. * *

Sample code: * @@ -8305,25 +8416,28 @@ public final CustomMetric createCustomMetric(String parent, CustomMetric customM * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateCustomMetricRequest request = - * CreateCustomMetricRequest.newBuilder() + * ListDataStreamsRequest request = + * ListDataStreamsRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setCustomMetric(CustomMetric.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * CustomMetric response = analyticsAdminServiceClient.createCustomMetric(request); + * for (DataStream element : analyticsAdminServiceClient.listDataStreams(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric createCustomMetric(CreateCustomMetricRequest request) { - return createCustomMetricCallable().call(request); + public final ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest request) { + return listDataStreamsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a CustomMetric. + * Lists DataStreams on a property. * *

Sample code: * @@ -8335,25 +8449,29 @@ public final CustomMetric createCustomMetric(CreateCustomMetricRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateCustomMetricRequest request = - * CreateCustomMetricRequest.newBuilder() + * ListDataStreamsRequest request = + * ListDataStreamsRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setCustomMetric(CustomMetric.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createCustomMetricCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.listDataStreamsPagedCallable().futureCall(request); * // Do something. - * CustomMetric response = future.get(); + * for (DataStream element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable createCustomMetricCallable() { - return stub.createCustomMetricCallable(); + public final UnaryCallable + listDataStreamsPagedCallable() { + return stub.listDataStreamsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a CustomMetric on a property. + * Lists DataStreams on a property. * *

Sample code: * @@ -8365,31 +8483,36 @@ public final UnaryCallable createCustom * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CustomMetric customMetric = CustomMetric.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * CustomMetric response = - * analyticsAdminServiceClient.updateCustomMetric(customMetric, updateMask); + * ListDataStreamsRequest request = + * ListDataStreamsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListDataStreamsResponse response = + * analyticsAdminServiceClient.listDataStreamsCallable().call(request); + * for (DataStream element : response.getDataStreamsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param customMetric The CustomMetric to update - * @param updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. To replace the entire entity, use one path with the string "*" to match all - * fields. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric updateCustomMetric(CustomMetric customMetric, FieldMask updateMask) { - UpdateCustomMetricRequest request = - UpdateCustomMetricRequest.newBuilder() - .setCustomMetric(customMetric) - .setUpdateMask(updateMask) - .build(); - return updateCustomMetric(request); + public final UnaryCallable + listDataStreamsCallable() { + return stub.listDataStreamsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a CustomMetric on a property. + * Lookup for a single DataStream. * *

Sample code: * @@ -8401,25 +8524,24 @@ public final CustomMetric updateCustomMetric(CustomMetric customMetric, FieldMas * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateCustomMetricRequest request = - * UpdateCustomMetricRequest.newBuilder() - * .setCustomMetric(CustomMetric.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * CustomMetric response = analyticsAdminServiceClient.updateCustomMetric(request); + * DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + * DataStream response = analyticsAdminServiceClient.getDataStream(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the DataStream to get. Example format: + * properties/1234/dataStreams/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric updateCustomMetric(UpdateCustomMetricRequest request) { - return updateCustomMetricCallable().call(request); + public final DataStream getDataStream(DataStreamName name) { + GetDataStreamRequest request = + GetDataStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataStream(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a CustomMetric on a property. + * Lookup for a single DataStream. * *

Sample code: * @@ -8431,25 +8553,23 @@ public final CustomMetric updateCustomMetric(UpdateCustomMetricRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateCustomMetricRequest request = - * UpdateCustomMetricRequest.newBuilder() - * .setCustomMetric(CustomMetric.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateCustomMetricCallable().futureCall(request); - * // Do something. - * CustomMetric response = future.get(); + * String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * DataStream response = analyticsAdminServiceClient.getDataStream(name); * } * } + * + * @param name Required. The name of the DataStream to get. Example format: + * properties/1234/dataStreams/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable updateCustomMetricCallable() { - return stub.updateCustomMetricCallable(); + public final DataStream getDataStream(String name) { + GetDataStreamRequest request = GetDataStreamRequest.newBuilder().setName(name).build(); + return getDataStream(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomMetrics on a property. + * Lookup for a single DataStream. * *

Sample code: * @@ -8461,28 +8581,24 @@ public final UnaryCallable updateCustom * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (CustomMetric element : - * analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) { - * // doThingsWith(element); - * } + * GetDataStreamRequest request = + * GetDataStreamRequest.newBuilder() + * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .build(); + * DataStream response = analyticsAdminServiceClient.getDataStream(request); * } * } * - * @param parent Required. Example format: properties/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListCustomMetricsPagedResponse listCustomMetrics(PropertyName parent) { - ListCustomMetricsRequest request = - ListCustomMetricsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listCustomMetrics(request); + public final DataStream getDataStream(GetDataStreamRequest request) { + return getDataStreamCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomMetrics on a property. + * Lookup for a single DataStream. * *

Sample code: * @@ -8494,26 +8610,25 @@ public final ListCustomMetricsPagedResponse listCustomMetrics(PropertyName paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (CustomMetric element : - * analyticsAdminServiceClient.listCustomMetrics(parent).iterateAll()) { - * // doThingsWith(element); - * } + * GetDataStreamRequest request = + * GetDataStreamRequest.newBuilder() + * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.getDataStreamCallable().futureCall(request); + * // Do something. + * DataStream response = future.get(); * } * } - * - * @param parent Required. Example format: properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListCustomMetricsPagedResponse listCustomMetrics(String parent) { - ListCustomMetricsRequest request = - ListCustomMetricsRequest.newBuilder().setParent(parent).build(); - return listCustomMetrics(request); + public final UnaryCallable getDataStreamCallable() { + return stub.getDataStreamCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomMetrics on a property. + * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8525,29 +8640,25 @@ public final ListCustomMetricsPagedResponse listCustomMetrics(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListCustomMetricsRequest request = - * ListCustomMetricsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * for (CustomMetric element : - * analyticsAdminServiceClient.listCustomMetrics(request).iterateAll()) { - * // doThingsWith(element); - * } + * AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); + * Audience response = analyticsAdminServiceClient.getAudience(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the Audience to get. Example format: + * properties/1234/audiences/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsRequest request) { - return listCustomMetricsPagedCallable().call(request); + public final Audience getAudience(AudienceName name) { + GetAudienceRequest request = + GetAudienceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAudience(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomMetrics on a property. + * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8559,29 +8670,24 @@ public final ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListCustomMetricsRequest request = - * ListCustomMetricsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listCustomMetricsPagedCallable().futureCall(request); - * // Do something. - * for (CustomMetric element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * String name = AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString(); + * Audience response = analyticsAdminServiceClient.getAudience(name); * } * } + * + * @param name Required. The name of the Audience to get. Example format: + * properties/1234/audiences/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listCustomMetricsPagedCallable() { - return stub.listCustomMetricsPagedCallable(); + public final Audience getAudience(String name) { + GetAudienceRequest request = GetAudienceRequest.newBuilder().setName(name).build(); + return getAudience(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists CustomMetrics on a property. + * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8593,36 +8699,25 @@ public final ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListCustomMetricsRequest request = - * ListCustomMetricsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * GetAudienceRequest request = + * GetAudienceRequest.newBuilder() + * .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) * .build(); - * while (true) { - * ListCustomMetricsResponse response = - * analyticsAdminServiceClient.listCustomMetricsCallable().call(request); - * for (CustomMetric element : response.getCustomMetricsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * Audience response = analyticsAdminServiceClient.getAudience(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listCustomMetricsCallable() { - return stub.listCustomMetricsCallable(); + public final Audience getAudience(GetAudienceRequest request) { + return getAudienceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomMetric on a property. + * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8634,26 +8729,25 @@ public final ListCustomMetricsPagedResponse listCustomMetrics(ListCustomMetricsR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - * analyticsAdminServiceClient.archiveCustomMetric(name); + * GetAudienceRequest request = + * GetAudienceRequest.newBuilder() + * .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.getAudienceCallable().futureCall(request); + * // Do something. + * Audience response = future.get(); * } * } - * - * @param name Required. The name of the CustomMetric to archive. Example format: - * properties/1234/customMetrics/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void archiveCustomMetric(CustomMetricName name) { - ArchiveCustomMetricRequest request = - ArchiveCustomMetricRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - archiveCustomMetric(request); + public final UnaryCallable getAudienceCallable() { + return stub.getAudienceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomMetric on a property. + * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8665,24 +8759,28 @@ public final void archiveCustomMetric(CustomMetricName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString(); - * analyticsAdminServiceClient.archiveCustomMetric(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (Audience element : analyticsAdminServiceClient.listAudiences(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. The name of the CustomMetric to archive. Example format: - * properties/1234/customMetrics/5678 + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void archiveCustomMetric(String name) { - ArchiveCustomMetricRequest request = - ArchiveCustomMetricRequest.newBuilder().setName(name).build(); - archiveCustomMetric(request); + public final ListAudiencesPagedResponse listAudiences(PropertyName parent) { + ListAudiencesRequest request = + ListAudiencesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAudiences(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomMetric on a property. + * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8694,24 +8792,25 @@ public final void archiveCustomMetric(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ArchiveCustomMetricRequest request = - * ArchiveCustomMetricRequest.newBuilder() - * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - * .build(); - * analyticsAdminServiceClient.archiveCustomMetric(request); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (Audience element : analyticsAdminServiceClient.listAudiences(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void archiveCustomMetric(ArchiveCustomMetricRequest request) { - archiveCustomMetricCallable().call(request); + public final ListAudiencesPagedResponse listAudiences(String parent) { + ListAudiencesRequest request = ListAudiencesRequest.newBuilder().setParent(parent).build(); + return listAudiences(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives a CustomMetric on a property. + * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8723,24 +8822,29 @@ public final void archiveCustomMetric(ArchiveCustomMetricRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ArchiveCustomMetricRequest request = - * ArchiveCustomMetricRequest.newBuilder() - * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + * ListAudiencesRequest request = + * ListAudiencesRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.archiveCustomMetricCallable().futureCall(request); - * // Do something. - * future.get(); + * for (Audience element : analyticsAdminServiceClient.listAudiences(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable archiveCustomMetricCallable() { - return stub.archiveCustomMetricCallable(); + public final ListAudiencesPagedResponse listAudiences(ListAudiencesRequest request) { + return listAudiencesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single CustomMetric. + * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8752,24 +8856,30 @@ public final UnaryCallable archiveCustomMetri * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - * CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name); + * ListAudiencesRequest request = + * ListAudiencesRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.listAudiencesPagedCallable().futureCall(request); + * // Do something. + * for (Audience element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } - * - * @param name Required. The name of the CustomMetric to get. Example format: - * properties/1234/customMetrics/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric getCustomMetric(CustomMetricName name) { - GetCustomMetricRequest request = - GetCustomMetricRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getCustomMetric(request); + public final UnaryCallable + listAudiencesPagedCallable() { + return stub.listAudiencesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single CustomMetric. + * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default + * audiences will not show filter definitions. * *

Sample code: * @@ -8781,23 +8891,35 @@ public final CustomMetric getCustomMetric(CustomMetricName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString(); - * CustomMetric response = analyticsAdminServiceClient.getCustomMetric(name); + * ListAudiencesRequest request = + * ListAudiencesRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListAudiencesResponse response = + * analyticsAdminServiceClient.listAudiencesCallable().call(request); + * for (Audience element : response.getAudiencesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param name Required. The name of the CustomMetric to get. Example format: - * properties/1234/customMetrics/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric getCustomMetric(String name) { - GetCustomMetricRequest request = GetCustomMetricRequest.newBuilder().setName(name).build(); - return getCustomMetric(request); + public final UnaryCallable listAudiencesCallable() { + return stub.listAudiencesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single CustomMetric. + * Creates an Audience. * *

Sample code: * @@ -8809,24 +8931,28 @@ public final CustomMetric getCustomMetric(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetCustomMetricRequest request = - * GetCustomMetricRequest.newBuilder() - * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - * .build(); - * CustomMetric response = analyticsAdminServiceClient.getCustomMetric(request); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * Audience audience = Audience.newBuilder().build(); + * Audience response = analyticsAdminServiceClient.createAudience(parent, audience); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 + * @param audience Required. The audience to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CustomMetric getCustomMetric(GetCustomMetricRequest request) { - return getCustomMetricCallable().call(request); + public final Audience createAudience(PropertyName parent, Audience audience) { + CreateAudienceRequest request = + CreateAudienceRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAudience(audience) + .build(); + return createAudience(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single CustomMetric. + * Creates an Audience. * *

Sample code: * @@ -8838,24 +8964,25 @@ public final CustomMetric getCustomMetric(GetCustomMetricRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetCustomMetricRequest request = - * GetCustomMetricRequest.newBuilder() - * .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getCustomMetricCallable().futureCall(request); - * // Do something. - * CustomMetric response = future.get(); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * Audience audience = Audience.newBuilder().build(); + * Audience response = analyticsAdminServiceClient.createAudience(parent, audience); * } * } + * + * @param parent Required. Example format: properties/1234 + * @param audience Required. The audience to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getCustomMetricCallable() { - return stub.getCustomMetricCallable(); + public final Audience createAudience(String parent, Audience audience) { + CreateAudienceRequest request = + CreateAudienceRequest.newBuilder().setParent(parent).setAudience(audience).build(); + return createAudience(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the singleton data retention settings for this property. + * Creates an Audience. * *

Sample code: * @@ -8867,27 +8994,25 @@ public final UnaryCallable getCustomMetric * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); - * DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name); + * CreateAudienceRequest request = + * CreateAudienceRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setAudience(Audience.newBuilder().build()) + * .build(); + * Audience response = analyticsAdminServiceClient.createAudience(request); * } * } * - * @param name Required. The name of the settings to lookup. Format: - * properties/{property}/dataRetentionSettings Example: - * "properties/1000/dataRetentionSettings" + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataRetentionSettings getDataRetentionSettings(DataRetentionSettingsName name) { - GetDataRetentionSettingsRequest request = - GetDataRetentionSettingsRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getDataRetentionSettings(request); + public final Audience createAudience(CreateAudienceRequest request) { + return createAudienceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the singleton data retention settings for this property. + * Creates an Audience. * *

Sample code: * @@ -8899,25 +9024,25 @@ public final DataRetentionSettings getDataRetentionSettings(DataRetentionSetting * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = DataRetentionSettingsName.of("[PROPERTY]").toString(); - * DataRetentionSettings response = analyticsAdminServiceClient.getDataRetentionSettings(name); + * CreateAudienceRequest request = + * CreateAudienceRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setAudience(Audience.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.createAudienceCallable().futureCall(request); + * // Do something. + * Audience response = future.get(); * } * } - * - * @param name Required. The name of the settings to lookup. Format: - * properties/{property}/dataRetentionSettings Example: - * "properties/1000/dataRetentionSettings" - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataRetentionSettings getDataRetentionSettings(String name) { - GetDataRetentionSettingsRequest request = - GetDataRetentionSettingsRequest.newBuilder().setName(name).build(); - return getDataRetentionSettings(request); + public final UnaryCallable createAudienceCallable() { + return stub.createAudienceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the singleton data retention settings for this property. + * Updates an Audience on a property. * *

Sample code: * @@ -8929,26 +9054,28 @@ public final DataRetentionSettings getDataRetentionSettings(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDataRetentionSettingsRequest request = - * GetDataRetentionSettingsRequest.newBuilder() - * .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - * .build(); - * DataRetentionSettings response = - * analyticsAdminServiceClient.getDataRetentionSettings(request); + * Audience audience = Audience.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Audience response = analyticsAdminServiceClient.updateAudience(audience, updateMask); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param audience Required. The audience to update. The audience's `name` field is used to + * identify the audience to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataRetentionSettings getDataRetentionSettings( - GetDataRetentionSettingsRequest request) { - return getDataRetentionSettingsCallable().call(request); + public final Audience updateAudience(Audience audience, FieldMask updateMask) { + UpdateAudienceRequest request = + UpdateAudienceRequest.newBuilder().setAudience(audience).setUpdateMask(updateMask).build(); + return updateAudience(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the singleton data retention settings for this property. + * Updates an Audience on a property. * *

Sample code: * @@ -8960,25 +9087,25 @@ public final DataRetentionSettings getDataRetentionSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDataRetentionSettingsRequest request = - * GetDataRetentionSettingsRequest.newBuilder() - * .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + * UpdateAudienceRequest request = + * UpdateAudienceRequest.newBuilder() + * .setAudience(Audience.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getDataRetentionSettingsCallable().futureCall(request); - * // Do something. - * DataRetentionSettings response = future.get(); + * Audience response = analyticsAdminServiceClient.updateAudience(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - getDataRetentionSettingsCallable() { - return stub.getDataRetentionSettingsCallable(); + public final Audience updateAudience(UpdateAudienceRequest request) { + return updateAudienceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the singleton data retention settings for this property. + * Updates an Audience on a property. * *

Sample code: * @@ -8990,34 +9117,25 @@ public final DataRetentionSettings getDataRetentionSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * DataRetentionSettings response = - * analyticsAdminServiceClient.updateDataRetentionSettings( - * dataRetentionSettings, updateMask); + * UpdateAudienceRequest request = + * UpdateAudienceRequest.newBuilder() + * .setAudience(Audience.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.updateAudienceCallable().futureCall(request); + * // Do something. + * Audience response = future.get(); * } * } - * - * @param dataRetentionSettings Required. The settings to update. The `name` field is used to - * identify the settings to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataRetentionSettings updateDataRetentionSettings( - DataRetentionSettings dataRetentionSettings, FieldMask updateMask) { - UpdateDataRetentionSettingsRequest request = - UpdateDataRetentionSettingsRequest.newBuilder() - .setDataRetentionSettings(dataRetentionSettings) - .setUpdateMask(updateMask) - .build(); - return updateDataRetentionSettings(request); + public final UnaryCallable updateAudienceCallable() { + return stub.updateAudienceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the singleton data retention settings for this property. + * Archives an Audience on a property. * *

Sample code: * @@ -9029,27 +9147,24 @@ public final DataRetentionSettings updateDataRetentionSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateDataRetentionSettingsRequest request = - * UpdateDataRetentionSettingsRequest.newBuilder() - * .setDataRetentionSettings(DataRetentionSettings.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * ArchiveAudienceRequest request = + * ArchiveAudienceRequest.newBuilder() + * .setName(PropertyName.of("[PROPERTY]").toString()) * .build(); - * DataRetentionSettings response = - * analyticsAdminServiceClient.updateDataRetentionSettings(request); + * analyticsAdminServiceClient.archiveAudience(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataRetentionSettings updateDataRetentionSettings( - UpdateDataRetentionSettingsRequest request) { - return updateDataRetentionSettingsCallable().call(request); + public final void archiveAudience(ArchiveAudienceRequest request) { + archiveAudienceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the singleton data retention settings for this property. + * Archives an Audience on a property. * *

Sample code: * @@ -9061,26 +9176,24 @@ public final DataRetentionSettings updateDataRetentionSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateDataRetentionSettingsRequest request = - * UpdateDataRetentionSettingsRequest.newBuilder() - * .setDataRetentionSettings(DataRetentionSettings.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * ArchiveAudienceRequest request = + * ArchiveAudienceRequest.newBuilder() + * .setName(PropertyName.of("[PROPERTY]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateDataRetentionSettingsCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.archiveAudienceCallable().futureCall(request); * // Do something. - * DataRetentionSettings response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - updateDataRetentionSettingsCallable() { - return stub.updateDataRetentionSettingsCallable(); + public final UnaryCallable archiveAudienceCallable() { + return stub.archiveAudienceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DataStream. + * Look up a single SearchAds360Link * *

Sample code: * @@ -9092,28 +9205,26 @@ public final DataRetentionSettings updateDataRetentionSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * DataStream dataStream = DataStream.newBuilder().build(); - * DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream); + * SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + * SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(name); * } * } * - * @param parent Required. Example format: properties/1234 - * @param dataStream Required. The DataStream to create. + * @param name Required. The name of the SearchAds360Link to get. Example format: + * properties/1234/SearchAds360Link/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream createDataStream(PropertyName parent, DataStream dataStream) { - CreateDataStreamRequest request = - CreateDataStreamRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDataStream(dataStream) + public final SearchAds360Link getSearchAds360Link(SearchAds360LinkName name) { + GetSearchAds360LinkRequest request = + GetSearchAds360LinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return createDataStream(request); + return getSearchAds360Link(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DataStream. + * Look up a single SearchAds360Link * *

Sample code: * @@ -9125,25 +9236,24 @@ public final DataStream createDataStream(PropertyName parent, DataStream dataStr * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * DataStream dataStream = DataStream.newBuilder().build(); - * DataStream response = analyticsAdminServiceClient.createDataStream(parent, dataStream); + * String name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString(); + * SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(name); * } * } * - * @param parent Required. Example format: properties/1234 - * @param dataStream Required. The DataStream to create. + * @param name Required. The name of the SearchAds360Link to get. Example format: + * properties/1234/SearchAds360Link/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream createDataStream(String parent, DataStream dataStream) { - CreateDataStreamRequest request = - CreateDataStreamRequest.newBuilder().setParent(parent).setDataStream(dataStream).build(); - return createDataStream(request); + public final SearchAds360Link getSearchAds360Link(String name) { + GetSearchAds360LinkRequest request = + GetSearchAds360LinkRequest.newBuilder().setName(name).build(); + return getSearchAds360Link(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DataStream. + * Look up a single SearchAds360Link * *

Sample code: * @@ -9155,25 +9265,24 @@ public final DataStream createDataStream(String parent, DataStream dataStream) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateDataStreamRequest request = - * CreateDataStreamRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setDataStream(DataStream.newBuilder().build()) + * GetSearchAds360LinkRequest request = + * GetSearchAds360LinkRequest.newBuilder() + * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) * .build(); - * DataStream response = analyticsAdminServiceClient.createDataStream(request); + * SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream createDataStream(CreateDataStreamRequest request) { - return createDataStreamCallable().call(request); + public final SearchAds360Link getSearchAds360Link(GetSearchAds360LinkRequest request) { + return getSearchAds360LinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DataStream. + * Look up a single SearchAds360Link * *

Sample code: * @@ -9185,25 +9294,25 @@ public final DataStream createDataStream(CreateDataStreamRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateDataStreamRequest request = - * CreateDataStreamRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setDataStream(DataStream.newBuilder().build()) + * GetSearchAds360LinkRequest request = + * GetSearchAds360LinkRequest.newBuilder() + * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createDataStreamCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getSearchAds360LinkCallable().futureCall(request); * // Do something. - * DataStream response = future.get(); + * SearchAds360Link response = future.get(); * } * } */ - public final UnaryCallable createDataStreamCallable() { - return stub.createDataStreamCallable(); + public final UnaryCallable + getSearchAds360LinkCallable() { + return stub.getSearchAds360LinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DataStream on a property. + * Lists all SearchAds360Links on a property. * *

Sample code: * @@ -9215,24 +9324,28 @@ public final UnaryCallable createDataStream * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - * analyticsAdminServiceClient.deleteDataStream(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (SearchAds360Link element : + * analyticsAdminServiceClient.listSearchAds360Links(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. The name of the DataStream to delete. Example format: - * properties/1234/dataStreams/5678 + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDataStream(DataStreamName name) { - DeleteDataStreamRequest request = - DeleteDataStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteDataStream(request); + public final ListSearchAds360LinksPagedResponse listSearchAds360Links(PropertyName parent) { + ListSearchAds360LinksRequest request = + ListSearchAds360LinksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSearchAds360Links(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DataStream on a property. + * Lists all SearchAds360Links on a property. * *

Sample code: * @@ -9244,23 +9357,26 @@ public final void deleteDataStream(DataStreamName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * analyticsAdminServiceClient.deleteDataStream(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (SearchAds360Link element : + * analyticsAdminServiceClient.listSearchAds360Links(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. The name of the DataStream to delete. Example format: - * properties/1234/dataStreams/5678 + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDataStream(String name) { - DeleteDataStreamRequest request = DeleteDataStreamRequest.newBuilder().setName(name).build(); - deleteDataStream(request); + public final ListSearchAds360LinksPagedResponse listSearchAds360Links(String parent) { + ListSearchAds360LinksRequest request = + ListSearchAds360LinksRequest.newBuilder().setParent(parent).build(); + return listSearchAds360Links(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DataStream on a property. + * Lists all SearchAds360Links on a property. * *

Sample code: * @@ -9272,24 +9388,30 @@ public final void deleteDataStream(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteDataStreamRequest request = - * DeleteDataStreamRequest.newBuilder() - * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * ListSearchAds360LinksRequest request = + * ListSearchAds360LinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * analyticsAdminServiceClient.deleteDataStream(request); + * for (SearchAds360Link element : + * analyticsAdminServiceClient.listSearchAds360Links(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDataStream(DeleteDataStreamRequest request) { - deleteDataStreamCallable().call(request); + public final ListSearchAds360LinksPagedResponse listSearchAds360Links( + ListSearchAds360LinksRequest request) { + return listSearchAds360LinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a DataStream on a property. + * Lists all SearchAds360Links on a property. * *

Sample code: * @@ -9301,24 +9423,29 @@ public final void deleteDataStream(DeleteDataStreamRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteDataStreamRequest request = - * DeleteDataStreamRequest.newBuilder() - * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * ListSearchAds360LinksRequest request = + * ListSearchAds360LinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteDataStreamCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.listSearchAds360LinksPagedCallable().futureCall(request); * // Do something. - * future.get(); + * for (SearchAds360Link element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable deleteDataStreamCallable() { - return stub.deleteDataStreamCallable(); + public final UnaryCallable + listSearchAds360LinksPagedCallable() { + return stub.listSearchAds360LinksPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a DataStream on a property. + * Lists all SearchAds360Links on a property. * *

Sample code: * @@ -9330,30 +9457,36 @@ public final UnaryCallable deleteDataStreamCalla * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataStream dataStream = DataStream.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * DataStream response = analyticsAdminServiceClient.updateDataStream(dataStream, updateMask); + * ListSearchAds360LinksRequest request = + * ListSearchAds360LinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListSearchAds360LinksResponse response = + * analyticsAdminServiceClient.listSearchAds360LinksCallable().call(request); + * for (SearchAds360Link element : response.getSearchAds360LinksList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param dataStream The DataStream to update - * @param updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. To replace the entire entity, use one path with the string "*" to match all - * fields. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream updateDataStream(DataStream dataStream, FieldMask updateMask) { - UpdateDataStreamRequest request = - UpdateDataStreamRequest.newBuilder() - .setDataStream(dataStream) - .setUpdateMask(updateMask) - .build(); - return updateDataStream(request); + public final UnaryCallable + listSearchAds360LinksCallable() { + return stub.listSearchAds360LinksCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a DataStream on a property. + * Creates a SearchAds360Link. * *

Sample code: * @@ -9365,25 +9498,30 @@ public final DataStream updateDataStream(DataStream dataStream, FieldMask update * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateDataStreamRequest request = - * UpdateDataStreamRequest.newBuilder() - * .setDataStream(DataStream.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * DataStream response = analyticsAdminServiceClient.updateDataStream(request); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + * SearchAds360Link response = + * analyticsAdminServiceClient.createSearchAds360Link(parent, searchAds360Link); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 + * @param searchAds360Link Required. The SearchAds360Link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream updateDataStream(UpdateDataStreamRequest request) { - return updateDataStreamCallable().call(request); + public final SearchAds360Link createSearchAds360Link( + PropertyName parent, SearchAds360Link searchAds360Link) { + CreateSearchAds360LinkRequest request = + CreateSearchAds360LinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSearchAds360Link(searchAds360Link) + .build(); + return createSearchAds360Link(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a DataStream on a property. + * Creates a SearchAds360Link. * *

Sample code: * @@ -9395,25 +9533,30 @@ public final DataStream updateDataStream(UpdateDataStreamRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateDataStreamRequest request = - * UpdateDataStreamRequest.newBuilder() - * .setDataStream(DataStream.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateDataStreamCallable().futureCall(request); - * // Do something. - * DataStream response = future.get(); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + * SearchAds360Link response = + * analyticsAdminServiceClient.createSearchAds360Link(parent, searchAds360Link); * } * } + * + * @param parent Required. Example format: properties/1234 + * @param searchAds360Link Required. The SearchAds360Link to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable updateDataStreamCallable() { - return stub.updateDataStreamCallable(); + public final SearchAds360Link createSearchAds360Link( + String parent, SearchAds360Link searchAds360Link) { + CreateSearchAds360LinkRequest request = + CreateSearchAds360LinkRequest.newBuilder() + .setParent(parent) + .setSearchAds360Link(searchAds360Link) + .build(); + return createSearchAds360Link(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DataStreams on a property. + * Creates a SearchAds360Link. * *

Sample code: * @@ -9425,27 +9568,25 @@ public final UnaryCallable updateDataStream * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) { - * // doThingsWith(element); - * } + * CreateSearchAds360LinkRequest request = + * CreateSearchAds360LinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) + * .build(); + * SearchAds360Link response = analyticsAdminServiceClient.createSearchAds360Link(request); * } * } * - * @param parent Required. Example format: properties/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDataStreamsPagedResponse listDataStreams(PropertyName parent) { - ListDataStreamsRequest request = - ListDataStreamsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDataStreams(request); + public final SearchAds360Link createSearchAds360Link(CreateSearchAds360LinkRequest request) { + return createSearchAds360LinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DataStreams on a property. + * Creates a SearchAds360Link. * *

Sample code: * @@ -9457,24 +9598,26 @@ public final ListDataStreamsPagedResponse listDataStreams(PropertyName parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (DataStream element : analyticsAdminServiceClient.listDataStreams(parent).iterateAll()) { - * // doThingsWith(element); - * } + * CreateSearchAds360LinkRequest request = + * CreateSearchAds360LinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.createSearchAds360LinkCallable().futureCall(request); + * // Do something. + * SearchAds360Link response = future.get(); * } * } - * - * @param parent Required. Example format: properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDataStreamsPagedResponse listDataStreams(String parent) { - ListDataStreamsRequest request = ListDataStreamsRequest.newBuilder().setParent(parent).build(); - return listDataStreams(request); + public final UnaryCallable + createSearchAds360LinkCallable() { + return stub.createSearchAds360LinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DataStreams on a property. + * Deletes a SearchAds360Link on a property. * *

Sample code: * @@ -9486,28 +9629,26 @@ public final ListDataStreamsPagedResponse listDataStreams(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDataStreamsRequest request = - * ListDataStreamsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * for (DataStream element : analyticsAdminServiceClient.listDataStreams(request).iterateAll()) { - * // doThingsWith(element); - * } + * SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + * analyticsAdminServiceClient.deleteSearchAds360Link(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the SearchAds360Link to delete. Example format: + * properties/1234/SearchAds360Links/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest request) { - return listDataStreamsPagedCallable().call(request); + public final void deleteSearchAds360Link(SearchAds360LinkName name) { + DeleteSearchAds360LinkRequest request = + DeleteSearchAds360LinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteSearchAds360Link(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DataStreams on a property. + * Deletes a SearchAds360Link on a property. * *

Sample code: * @@ -9519,29 +9660,24 @@ public final ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListDataStreamsRequest request = - * ListDataStreamsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listDataStreamsPagedCallable().futureCall(request); - * // Do something. - * for (DataStream element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * String name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString(); + * analyticsAdminServiceClient.deleteSearchAds360Link(name); * } * } + * + * @param name Required. The name of the SearchAds360Link to delete. Example format: + * properties/1234/SearchAds360Links/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listDataStreamsPagedCallable() { - return stub.listDataStreamsPagedCallable(); + public final void deleteSearchAds360Link(String name) { + DeleteSearchAds360LinkRequest request = + DeleteSearchAds360LinkRequest.newBuilder().setName(name).build(); + deleteSearchAds360Link(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists DataStreams on a property. + * Deletes a SearchAds360Link on a property. * *

Sample code: * @@ -9552,37 +9688,25 @@ public final ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - * AnalyticsAdminServiceClient.create()) { - * ListDataStreamsRequest request = - * ListDataStreamsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListDataStreamsResponse response = - * analyticsAdminServiceClient.listDataStreamsCallable().call(request); - * for (DataStream element : response.getDataStreamsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * AnalyticsAdminServiceClient.create()) { + * DeleteSearchAds360LinkRequest request = + * DeleteSearchAds360LinkRequest.newBuilder() + * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + * .build(); + * analyticsAdminServiceClient.deleteSearchAds360Link(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listDataStreamsCallable() { - return stub.listDataStreamsCallable(); + public final void deleteSearchAds360Link(DeleteSearchAds360LinkRequest request) { + deleteSearchAds360LinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DataStream. + * Deletes a SearchAds360Link on a property. * *

Sample code: * @@ -9594,24 +9718,25 @@ public final ListDataStreamsPagedResponse listDataStreams(ListDataStreamsRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - * DataStream response = analyticsAdminServiceClient.getDataStream(name); + * DeleteSearchAds360LinkRequest request = + * DeleteSearchAds360LinkRequest.newBuilder() + * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.deleteSearchAds360LinkCallable().futureCall(request); + * // Do something. + * future.get(); * } * } - * - * @param name Required. The name of the DataStream to get. Example format: - * properties/1234/dataStreams/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream getDataStream(DataStreamName name) { - GetDataStreamRequest request = - GetDataStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getDataStream(request); + public final UnaryCallable + deleteSearchAds360LinkCallable() { + return stub.deleteSearchAds360LinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DataStream. + * Updates a SearchAds360Link on a property. * *

Sample code: * @@ -9623,23 +9748,32 @@ public final DataStream getDataStream(DataStreamName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * DataStream response = analyticsAdminServiceClient.getDataStream(name); + * SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * SearchAds360Link response = + * analyticsAdminServiceClient.updateSearchAds360Link(searchAds360Link, updateMask); * } * } * - * @param name Required. The name of the DataStream to get. Example format: - * properties/1234/dataStreams/5678 + * @param searchAds360Link The SearchAds360Link to update + * @param updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to match all + * fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream getDataStream(String name) { - GetDataStreamRequest request = GetDataStreamRequest.newBuilder().setName(name).build(); - return getDataStream(request); + public final SearchAds360Link updateSearchAds360Link( + SearchAds360Link searchAds360Link, FieldMask updateMask) { + UpdateSearchAds360LinkRequest request = + UpdateSearchAds360LinkRequest.newBuilder() + .setSearchAds360Link(searchAds360Link) + .setUpdateMask(updateMask) + .build(); + return updateSearchAds360Link(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DataStream. + * Updates a SearchAds360Link on a property. * *

Sample code: * @@ -9651,24 +9785,25 @@ public final DataStream getDataStream(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDataStreamRequest request = - * GetDataStreamRequest.newBuilder() - * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * UpdateSearchAds360LinkRequest request = + * UpdateSearchAds360LinkRequest.newBuilder() + * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * DataStream response = analyticsAdminServiceClient.getDataStream(request); + * SearchAds360Link response = analyticsAdminServiceClient.updateSearchAds360Link(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final DataStream getDataStream(GetDataStreamRequest request) { - return getDataStreamCallable().call(request); + public final SearchAds360Link updateSearchAds360Link(UpdateSearchAds360LinkRequest request) { + return updateSearchAds360LinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single DataStream. + * Updates a SearchAds360Link on a property. * *

Sample code: * @@ -9680,25 +9815,26 @@ public final DataStream getDataStream(GetDataStreamRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetDataStreamRequest request = - * GetDataStreamRequest.newBuilder() - * .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * UpdateSearchAds360LinkRequest request = + * UpdateSearchAds360LinkRequest.newBuilder() + * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getDataStreamCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateSearchAds360LinkCallable().futureCall(request); * // Do something. - * DataStream response = future.get(); + * SearchAds360Link response = future.get(); * } * } */ - public final UnaryCallable getDataStreamCallable() { - return stub.getDataStreamCallable(); + public final UnaryCallable + updateSearchAds360LinkCallable() { + return stub.updateSearchAds360LinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Lookup for a AttributionSettings singleton. * *

Sample code: * @@ -9710,25 +9846,26 @@ public final UnaryCallable getDataStreamCallab * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); - * Audience response = analyticsAdminServiceClient.getAudience(name); + * AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); + * AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(name); * } * } * - * @param name Required. The name of the Audience to get. Example format: - * properties/1234/audiences/5678 + * @param name Required. The name of the attribution settings to retrieve. Format: + * properties/{property}/attributionSettings * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience getAudience(AudienceName name) { - GetAudienceRequest request = - GetAudienceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getAudience(request); + public final AttributionSettings getAttributionSettings(AttributionSettingsName name) { + GetAttributionSettingsRequest request = + GetAttributionSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAttributionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Lookup for a AttributionSettings singleton. * *

Sample code: * @@ -9740,24 +9877,24 @@ public final Audience getAudience(AudienceName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString(); - * Audience response = analyticsAdminServiceClient.getAudience(name); + * String name = AttributionSettingsName.of("[PROPERTY]").toString(); + * AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(name); * } * } * - * @param name Required. The name of the Audience to get. Example format: - * properties/1234/audiences/5678 + * @param name Required. The name of the attribution settings to retrieve. Format: + * properties/{property}/attributionSettings * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience getAudience(String name) { - GetAudienceRequest request = GetAudienceRequest.newBuilder().setName(name).build(); - return getAudience(request); + public final AttributionSettings getAttributionSettings(String name) { + GetAttributionSettingsRequest request = + GetAttributionSettingsRequest.newBuilder().setName(name).build(); + return getAttributionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Lookup for a AttributionSettings singleton. * *

Sample code: * @@ -9769,25 +9906,24 @@ public final Audience getAudience(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAudienceRequest request = - * GetAudienceRequest.newBuilder() - * .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + * GetAttributionSettingsRequest request = + * GetAttributionSettingsRequest.newBuilder() + * .setName(AttributionSettingsName.of("[PROPERTY]").toString()) * .build(); - * Audience response = analyticsAdminServiceClient.getAudience(request); + * AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience getAudience(GetAudienceRequest request) { - return getAudienceCallable().call(request); + public final AttributionSettings getAttributionSettings(GetAttributionSettingsRequest request) { + return getAttributionSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single Audience. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Lookup for a AttributionSettings singleton. * *

Sample code: * @@ -9799,25 +9935,25 @@ public final Audience getAudience(GetAudienceRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAudienceRequest request = - * GetAudienceRequest.newBuilder() - * .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + * GetAttributionSettingsRequest request = + * GetAttributionSettingsRequest.newBuilder() + * .setName(AttributionSettingsName.of("[PROPERTY]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getAudienceCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getAttributionSettingsCallable().futureCall(request); * // Do something. - * Audience response = future.get(); + * AttributionSettings response = future.get(); * } * } */ - public final UnaryCallable getAudienceCallable() { - return stub.getAudienceCallable(); + public final UnaryCallable + getAttributionSettingsCallable() { + return stub.getAttributionSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Updates attribution settings on a property. * *

Sample code: * @@ -9829,28 +9965,33 @@ public final UnaryCallable getAudienceCallable() { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (Audience element : analyticsAdminServiceClient.listAudiences(parent).iterateAll()) { - * // doThingsWith(element); - * } + * AttributionSettings attributionSettings = AttributionSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * AttributionSettings response = + * analyticsAdminServiceClient.updateAttributionSettings(attributionSettings, updateMask); * } * } * - * @param parent Required. Example format: properties/1234 + * @param attributionSettings Required. The attribution settings to update. The `name` field is + * used to identify the settings to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAudiencesPagedResponse listAudiences(PropertyName parent) { - ListAudiencesRequest request = - ListAudiencesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) + public final AttributionSettings updateAttributionSettings( + AttributionSettings attributionSettings, FieldMask updateMask) { + UpdateAttributionSettingsRequest request = + UpdateAttributionSettingsRequest.newBuilder() + .setAttributionSettings(attributionSettings) + .setUpdateMask(updateMask) .build(); - return listAudiences(request); + return updateAttributionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Updates attribution settings on a property. * *

Sample code: * @@ -9862,25 +10003,26 @@ public final ListAudiencesPagedResponse listAudiences(PropertyName parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (Audience element : analyticsAdminServiceClient.listAudiences(parent).iterateAll()) { - * // doThingsWith(element); - * } + * UpdateAttributionSettingsRequest request = + * UpdateAttributionSettingsRequest.newBuilder() + * .setAttributionSettings(AttributionSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * AttributionSettings response = analyticsAdminServiceClient.updateAttributionSettings(request); * } * } * - * @param parent Required. Example format: properties/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAudiencesPagedResponse listAudiences(String parent) { - ListAudiencesRequest request = ListAudiencesRequest.newBuilder().setParent(parent).build(); - return listAudiences(request); + public final AttributionSettings updateAttributionSettings( + UpdateAttributionSettingsRequest request) { + return updateAttributionSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Updates attribution settings on a property. * *

Sample code: * @@ -9892,29 +10034,36 @@ public final ListAudiencesPagedResponse listAudiences(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAudiencesRequest request = - * ListAudiencesRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * UpdateAttributionSettingsRequest request = + * UpdateAttributionSettingsRequest.newBuilder() + * .setAttributionSettings(AttributionSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * for (Audience element : analyticsAdminServiceClient.listAudiences(request).iterateAll()) { - * // doThingsWith(element); - * } + * ApiFuture future = + * analyticsAdminServiceClient.updateAttributionSettingsCallable().futureCall(request); + * // Do something. + * AttributionSettings response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAudiencesPagedResponse listAudiences(ListAudiencesRequest request) { - return listAudiencesPagedCallable().call(request); + public final UnaryCallable + updateAttributionSettingsCallable() { + return stub.updateAttributionSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Returns a customized report of data access records. The report provides records of each time a + * user reads Google Analytics reporting data. Access records are retained for up to 2 years. + * + *

Data Access Reports can be requested for a property. The property must be in Google + * Analytics 360. This method is only available to Administrators. + * + *

These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and + * other products like Firebase & Admob that can retrieve data from Google Analytics through a + * linkage. These records don't include property configuration changes like adding a stream or + * changing a property's time zone. For configuration change history, see + * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). * *

Sample code: * @@ -9926,30 +10075,46 @@ public final ListAudiencesPagedResponse listAudiences(ListAudiencesRequest reque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAudiencesRequest request = - * ListAudiencesRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * RunAccessReportRequest request = + * RunAccessReportRequest.newBuilder() + * .setEntity("entity-1298275357") + * .addAllDimensions(new ArrayList()) + * .addAllMetrics(new ArrayList()) + * .addAllDateRanges(new ArrayList()) + * .setDimensionFilter(AccessFilterExpression.newBuilder().build()) + * .setMetricFilter(AccessFilterExpression.newBuilder().build()) + * .setOffset(-1019779949) + * .setLimit(102976443) + * .setTimeZone("timeZone-2077180903") + * .addAllOrderBys(new ArrayList()) + * .setReturnEntityQuota(true) + * .setIncludeAllUsers(true) + * .setExpandGroups(true) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listAudiencesPagedCallable().futureCall(request); - * // Do something. - * for (Audience element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * RunAccessReportResponse response = analyticsAdminServiceClient.runAccessReport(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listAudiencesPagedCallable() { - return stub.listAudiencesPagedCallable(); + public final RunAccessReportResponse runAccessReport(RunAccessReportRequest request) { + return runAccessReportCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists Audiences on a property. Audiences created before 2020 may not be supported. Default - * audiences will not show filter definitions. + * Returns a customized report of data access records. The report provides records of each time a + * user reads Google Analytics reporting data. Access records are retained for up to 2 years. + * + *

Data Access Reports can be requested for a property. The property must be in Google + * Analytics 360. This method is only available to Administrators. + * + *

These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and + * other products like Firebase & Admob that can retrieve data from Google Analytics through a + * linkage. These records don't include property configuration changes like adding a stream or + * changing a property's time zone. For configuration change history, see + * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). * *

Sample code: * @@ -9961,35 +10126,37 @@ public final ListAudiencesPagedResponse listAudiences(ListAudiencesRequest reque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAudiencesRequest request = - * ListAudiencesRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * RunAccessReportRequest request = + * RunAccessReportRequest.newBuilder() + * .setEntity("entity-1298275357") + * .addAllDimensions(new ArrayList()) + * .addAllMetrics(new ArrayList()) + * .addAllDateRanges(new ArrayList()) + * .setDimensionFilter(AccessFilterExpression.newBuilder().build()) + * .setMetricFilter(AccessFilterExpression.newBuilder().build()) + * .setOffset(-1019779949) + * .setLimit(102976443) + * .setTimeZone("timeZone-2077180903") + * .addAllOrderBys(new ArrayList()) + * .setReturnEntityQuota(true) + * .setIncludeAllUsers(true) + * .setExpandGroups(true) * .build(); - * while (true) { - * ListAudiencesResponse response = - * analyticsAdminServiceClient.listAudiencesCallable().call(request); - * for (Audience element : response.getAudiencesList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * ApiFuture future = + * analyticsAdminServiceClient.runAccessReportCallable().futureCall(request); + * // Do something. + * RunAccessReportResponse response = future.get(); * } * } */ - public final UnaryCallable listAudiencesCallable() { - return stub.listAudiencesCallable(); + public final UnaryCallable + runAccessReportCallable() { + return stub.runAccessReportCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an Audience. + * Creates an access binding on an account or property. * *

Sample code: * @@ -10001,28 +10168,29 @@ public final UnaryCallable listAudi * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * Audience audience = Audience.newBuilder().build(); - * Audience response = analyticsAdminServiceClient.createAudience(parent, audience); + * AccountName parent = AccountName.of("[ACCOUNT]"); + * AccessBinding accessBinding = AccessBinding.newBuilder().build(); + * AccessBinding response = + * analyticsAdminServiceClient.createAccessBinding(parent, accessBinding); * } * } * - * @param parent Required. Example format: properties/1234 - * @param audience Required. The audience to create. + * @param parent Required. Formats: - accounts/{account} - properties/{property} + * @param accessBinding Required. The access binding to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience createAudience(PropertyName parent, Audience audience) { - CreateAudienceRequest request = - CreateAudienceRequest.newBuilder() + public final AccessBinding createAccessBinding(AccountName parent, AccessBinding accessBinding) { + CreateAccessBindingRequest request = + CreateAccessBindingRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) - .setAudience(audience) + .setAccessBinding(accessBinding) .build(); - return createAudience(request); + return createAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an Audience. + * Creates an access binding on an account or property. * *

Sample code: * @@ -10034,25 +10202,29 @@ public final Audience createAudience(PropertyName parent, Audience audience) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * Audience audience = Audience.newBuilder().build(); - * Audience response = analyticsAdminServiceClient.createAudience(parent, audience); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * AccessBinding accessBinding = AccessBinding.newBuilder().build(); + * AccessBinding response = + * analyticsAdminServiceClient.createAccessBinding(parent, accessBinding); * } * } * - * @param parent Required. Example format: properties/1234 - * @param audience Required. The audience to create. + * @param parent Required. Formats: - accounts/{account} - properties/{property} + * @param accessBinding Required. The access binding to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience createAudience(String parent, Audience audience) { - CreateAudienceRequest request = - CreateAudienceRequest.newBuilder().setParent(parent).setAudience(audience).build(); - return createAudience(request); + public final AccessBinding createAccessBinding(PropertyName parent, AccessBinding accessBinding) { + CreateAccessBindingRequest request = + CreateAccessBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAccessBinding(accessBinding) + .build(); + return createAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an Audience. + * Creates an access binding on an account or property. * *

Sample code: * @@ -10064,25 +10236,29 @@ public final Audience createAudience(String parent, Audience audience) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateAudienceRequest request = - * CreateAudienceRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setAudience(Audience.newBuilder().build()) - * .build(); - * Audience response = analyticsAdminServiceClient.createAudience(request); + * String parent = AccountName.of("[ACCOUNT]").toString(); + * AccessBinding accessBinding = AccessBinding.newBuilder().build(); + * AccessBinding response = + * analyticsAdminServiceClient.createAccessBinding(parent, accessBinding); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Formats: - accounts/{account} - properties/{property} + * @param accessBinding Required. The access binding to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience createAudience(CreateAudienceRequest request) { - return createAudienceCallable().call(request); + public final AccessBinding createAccessBinding(String parent, AccessBinding accessBinding) { + CreateAccessBindingRequest request = + CreateAccessBindingRequest.newBuilder() + .setParent(parent) + .setAccessBinding(accessBinding) + .build(); + return createAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an Audience. + * Creates an access binding on an account or property. * *

Sample code: * @@ -10094,25 +10270,25 @@ public final Audience createAudience(CreateAudienceRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateAudienceRequest request = - * CreateAudienceRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setAudience(Audience.newBuilder().build()) + * CreateAccessBindingRequest request = + * CreateAccessBindingRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setAccessBinding(AccessBinding.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createAudienceCallable().futureCall(request); - * // Do something. - * Audience response = future.get(); + * AccessBinding response = analyticsAdminServiceClient.createAccessBinding(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable createAudienceCallable() { - return stub.createAudienceCallable(); + public final AccessBinding createAccessBinding(CreateAccessBindingRequest request) { + return createAccessBindingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an Audience on a property. + * Creates an access binding on an account or property. * *

Sample code: * @@ -10124,28 +10300,26 @@ public final UnaryCallable createAudienceCallab * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * Audience audience = Audience.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * Audience response = analyticsAdminServiceClient.updateAudience(audience, updateMask); + * CreateAccessBindingRequest request = + * CreateAccessBindingRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setAccessBinding(AccessBinding.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.createAccessBindingCallable().futureCall(request); + * // Do something. + * AccessBinding response = future.get(); * } * } - * - * @param audience Required. The audience to update. The audience's `name` field is used to - * identify the audience to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience updateAudience(Audience audience, FieldMask updateMask) { - UpdateAudienceRequest request = - UpdateAudienceRequest.newBuilder().setAudience(audience).setUpdateMask(updateMask).build(); - return updateAudience(request); + public final UnaryCallable + createAccessBindingCallable() { + return stub.createAccessBindingCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an Audience on a property. + * Gets information about an access binding. * *

Sample code: * @@ -10157,25 +10331,26 @@ public final Audience updateAudience(Audience audience, FieldMask updateMask) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateAudienceRequest request = - * UpdateAudienceRequest.newBuilder() - * .setAudience(Audience.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * Audience response = analyticsAdminServiceClient.updateAudience(request); + * AccessBindingName name = + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + * AccessBinding response = analyticsAdminServiceClient.getAccessBinding(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the access binding to retrieve. Formats: - + * accounts/{account}/accessBindings/{accessBinding} - + * properties/{property}/accessBindings/{accessBinding} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Audience updateAudience(UpdateAudienceRequest request) { - return updateAudienceCallable().call(request); + public final AccessBinding getAccessBinding(AccessBindingName name) { + GetAccessBindingRequest request = + GetAccessBindingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an Audience on a property. + * Gets information about an access binding. * *

Sample code: * @@ -10187,25 +10362,25 @@ public final Audience updateAudience(UpdateAudienceRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateAudienceRequest request = - * UpdateAudienceRequest.newBuilder() - * .setAudience(Audience.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateAudienceCallable().futureCall(request); - * // Do something. - * Audience response = future.get(); + * String name = + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]").toString(); + * AccessBinding response = analyticsAdminServiceClient.getAccessBinding(name); * } * } + * + * @param name Required. The name of the access binding to retrieve. Formats: - + * accounts/{account}/accessBindings/{accessBinding} - + * properties/{property}/accessBindings/{accessBinding} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable updateAudienceCallable() { - return stub.updateAudienceCallable(); + public final AccessBinding getAccessBinding(String name) { + GetAccessBindingRequest request = GetAccessBindingRequest.newBuilder().setName(name).build(); + return getAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives an Audience on a property. + * Gets information about an access binding. * *

Sample code: * @@ -10217,24 +10392,26 @@ public final UnaryCallable updateAudienceCallab * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ArchiveAudienceRequest request = - * ArchiveAudienceRequest.newBuilder() - * .setName(PropertyName.of("[PROPERTY]").toString()) + * GetAccessBindingRequest request = + * GetAccessBindingRequest.newBuilder() + * .setName( + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + * .toString()) * .build(); - * analyticsAdminServiceClient.archiveAudience(request); + * AccessBinding response = analyticsAdminServiceClient.getAccessBinding(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void archiveAudience(ArchiveAudienceRequest request) { - archiveAudienceCallable().call(request); + public final AccessBinding getAccessBinding(GetAccessBindingRequest request) { + return getAccessBindingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Archives an Audience on a property. + * Gets information about an access binding. * *

Sample code: * @@ -10246,24 +10423,26 @@ public final void archiveAudience(ArchiveAudienceRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ArchiveAudienceRequest request = - * ArchiveAudienceRequest.newBuilder() - * .setName(PropertyName.of("[PROPERTY]").toString()) + * GetAccessBindingRequest request = + * GetAccessBindingRequest.newBuilder() + * .setName( + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.archiveAudienceCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getAccessBindingCallable().futureCall(request); * // Do something. - * future.get(); + * AccessBinding response = future.get(); * } * } */ - public final UnaryCallable archiveAudienceCallable() { - return stub.archiveAudienceCallable(); + public final UnaryCallable getAccessBindingCallable() { + return stub.getAccessBindingCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single SearchAds360Link + * Updates an access binding on an account or property. * *

Sample code: * @@ -10275,26 +10454,23 @@ public final UnaryCallable archiveAudienceCallabl * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - * SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(name); + * AccessBinding accessBinding = AccessBinding.newBuilder().build(); + * AccessBinding response = analyticsAdminServiceClient.updateAccessBinding(accessBinding); * } * } * - * @param name Required. The name of the SearchAds360Link to get. Example format: - * properties/1234/SearchAds360Link/5678 + * @param accessBinding Required. The access binding to update. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link getSearchAds360Link(SearchAds360LinkName name) { - GetSearchAds360LinkRequest request = - GetSearchAds360LinkRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getSearchAds360Link(request); + public final AccessBinding updateAccessBinding(AccessBinding accessBinding) { + UpdateAccessBindingRequest request = + UpdateAccessBindingRequest.newBuilder().setAccessBinding(accessBinding).build(); + return updateAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single SearchAds360Link + * Updates an access binding on an account or property. * *

Sample code: * @@ -10306,24 +10482,24 @@ public final SearchAds360Link getSearchAds360Link(SearchAds360LinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString(); - * SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(name); + * UpdateAccessBindingRequest request = + * UpdateAccessBindingRequest.newBuilder() + * .setAccessBinding(AccessBinding.newBuilder().build()) + * .build(); + * AccessBinding response = analyticsAdminServiceClient.updateAccessBinding(request); * } * } * - * @param name Required. The name of the SearchAds360Link to get. Example format: - * properties/1234/SearchAds360Link/5678 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link getSearchAds360Link(String name) { - GetSearchAds360LinkRequest request = - GetSearchAds360LinkRequest.newBuilder().setName(name).build(); - return getSearchAds360Link(request); + public final AccessBinding updateAccessBinding(UpdateAccessBindingRequest request) { + return updateAccessBindingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single SearchAds360Link + * Updates an access binding on an account or property. * *

Sample code: * @@ -10335,24 +10511,25 @@ public final SearchAds360Link getSearchAds360Link(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetSearchAds360LinkRequest request = - * GetSearchAds360LinkRequest.newBuilder() - * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + * UpdateAccessBindingRequest request = + * UpdateAccessBindingRequest.newBuilder() + * .setAccessBinding(AccessBinding.newBuilder().build()) * .build(); - * SearchAds360Link response = analyticsAdminServiceClient.getSearchAds360Link(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateAccessBindingCallable().futureCall(request); + * // Do something. + * AccessBinding response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link getSearchAds360Link(GetSearchAds360LinkRequest request) { - return getSearchAds360LinkCallable().call(request); + public final UnaryCallable + updateAccessBindingCallable() { + return stub.updateAccessBindingCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Look up a single SearchAds360Link + * Deletes an access binding on an account or property. * *

Sample code: * @@ -10364,25 +10541,27 @@ public final SearchAds360Link getSearchAds360Link(GetSearchAds360LinkRequest req * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetSearchAds360LinkRequest request = - * GetSearchAds360LinkRequest.newBuilder() - * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getSearchAds360LinkCallable().futureCall(request); - * // Do something. - * SearchAds360Link response = future.get(); + * AccessBindingName name = + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + * analyticsAdminServiceClient.deleteAccessBinding(name); * } * } + * + * @param name Required. Formats: - accounts/{account}/accessBindings/{accessBinding} - + * properties/{property}/accessBindings/{accessBinding} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - getSearchAds360LinkCallable() { - return stub.getSearchAds360LinkCallable(); + public final void deleteAccessBinding(AccessBindingName name) { + DeleteAccessBindingRequest request = + DeleteAccessBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all SearchAds360Links on a property. + * Deletes an access binding on an account or property. * *

Sample code: * @@ -10394,28 +10573,25 @@ public final SearchAds360Link getSearchAds360Link(GetSearchAds360LinkRequest req * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (SearchAds360Link element : - * analyticsAdminServiceClient.listSearchAds360Links(parent).iterateAll()) { - * // doThingsWith(element); - * } + * String name = + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]").toString(); + * analyticsAdminServiceClient.deleteAccessBinding(name); * } * } * - * @param parent Required. Example format: properties/1234 + * @param name Required. Formats: - accounts/{account}/accessBindings/{accessBinding} - + * properties/{property}/accessBindings/{accessBinding} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSearchAds360LinksPagedResponse listSearchAds360Links(PropertyName parent) { - ListSearchAds360LinksRequest request = - ListSearchAds360LinksRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSearchAds360Links(request); + public final void deleteAccessBinding(String name) { + DeleteAccessBindingRequest request = + DeleteAccessBindingRequest.newBuilder().setName(name).build(); + deleteAccessBinding(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all SearchAds360Links on a property. + * Deletes an access binding on an account or property. * *

Sample code: * @@ -10427,26 +10603,26 @@ public final ListSearchAds360LinksPagedResponse listSearchAds360Links(PropertyNa * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (SearchAds360Link element : - * analyticsAdminServiceClient.listSearchAds360Links(parent).iterateAll()) { - * // doThingsWith(element); - * } + * DeleteAccessBindingRequest request = + * DeleteAccessBindingRequest.newBuilder() + * .setName( + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + * .toString()) + * .build(); + * analyticsAdminServiceClient.deleteAccessBinding(request); * } * } * - * @param parent Required. Example format: properties/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSearchAds360LinksPagedResponse listSearchAds360Links(String parent) { - ListSearchAds360LinksRequest request = - ListSearchAds360LinksRequest.newBuilder().setParent(parent).build(); - return listSearchAds360Links(request); + public final void deleteAccessBinding(DeleteAccessBindingRequest request) { + deleteAccessBindingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all SearchAds360Links on a property. + * Deletes an access binding on an account or property. * *

Sample code: * @@ -10458,30 +10634,26 @@ public final ListSearchAds360LinksPagedResponse listSearchAds360Links(String par * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListSearchAds360LinksRequest request = - * ListSearchAds360LinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * DeleteAccessBindingRequest request = + * DeleteAccessBindingRequest.newBuilder() + * .setName( + * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + * .toString()) * .build(); - * for (SearchAds360Link element : - * analyticsAdminServiceClient.listSearchAds360Links(request).iterateAll()) { - * // doThingsWith(element); - * } + * ApiFuture future = + * analyticsAdminServiceClient.deleteAccessBindingCallable().futureCall(request); + * // Do something. + * future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListSearchAds360LinksPagedResponse listSearchAds360Links( - ListSearchAds360LinksRequest request) { - return listSearchAds360LinksPagedCallable().call(request); + public final UnaryCallable deleteAccessBindingCallable() { + return stub.deleteAccessBindingCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all SearchAds360Links on a property. + * Lists all access bindings on an account or property. * *

Sample code: * @@ -10493,29 +10665,28 @@ public final ListSearchAds360LinksPagedResponse listSearchAds360Links( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListSearchAds360LinksRequest request = - * ListSearchAds360LinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listSearchAds360LinksPagedCallable().futureCall(request); - * // Do something. - * for (SearchAds360Link element : future.get().iterateAll()) { + * AccountName parent = AccountName.of("[ACCOUNT]"); + * for (AccessBinding element : + * analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) { * // doThingsWith(element); * } * } * } + * + * @param parent Required. Formats: - accounts/{account} - properties/{property} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listSearchAds360LinksPagedCallable() { - return stub.listSearchAds360LinksPagedCallable(); + public final ListAccessBindingsPagedResponse listAccessBindings(AccountName parent) { + ListAccessBindingsRequest request = + ListAccessBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAccessBindings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all SearchAds360Links on a property. + * Lists all access bindings on an account or property. * *

Sample code: * @@ -10527,36 +10698,28 @@ public final ListSearchAds360LinksPagedResponse listSearchAds360Links( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListSearchAds360LinksRequest request = - * ListSearchAds360LinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListSearchAds360LinksResponse response = - * analyticsAdminServiceClient.listSearchAds360LinksCallable().call(request); - * for (SearchAds360Link element : response.getSearchAds360LinksList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (AccessBinding element : + * analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) { + * // doThingsWith(element); * } * } * } + * + * @param parent Required. Formats: - accounts/{account} - properties/{property} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listSearchAds360LinksCallable() { - return stub.listSearchAds360LinksCallable(); + public final ListAccessBindingsPagedResponse listAccessBindings(PropertyName parent) { + ListAccessBindingsRequest request = + ListAccessBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAccessBindings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SearchAds360Link. + * Lists all access bindings on an account or property. * *

Sample code: * @@ -10568,30 +10731,26 @@ public final ListSearchAds360LinksPagedResponse listSearchAds360Links( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - * SearchAds360Link response = - * analyticsAdminServiceClient.createSearchAds360Link(parent, searchAds360Link); + * String parent = AccountName.of("[ACCOUNT]").toString(); + * for (AccessBinding element : + * analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param parent Required. Example format: properties/1234 - * @param searchAds360Link Required. The SearchAds360Link to create. + * @param parent Required. Formats: - accounts/{account} - properties/{property} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link createSearchAds360Link( - PropertyName parent, SearchAds360Link searchAds360Link) { - CreateSearchAds360LinkRequest request = - CreateSearchAds360LinkRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSearchAds360Link(searchAds360Link) - .build(); - return createSearchAds360Link(request); + public final ListAccessBindingsPagedResponse listAccessBindings(String parent) { + ListAccessBindingsRequest request = + ListAccessBindingsRequest.newBuilder().setParent(parent).build(); + return listAccessBindings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SearchAds360Link. + * Lists all access bindings on an account or property. * *

Sample code: * @@ -10603,30 +10762,30 @@ public final SearchAds360Link createSearchAds360Link( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - * SearchAds360Link response = - * analyticsAdminServiceClient.createSearchAds360Link(parent, searchAds360Link); + * ListAccessBindingsRequest request = + * ListAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (AccessBinding element : + * analyticsAdminServiceClient.listAccessBindings(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param parent Required. Example format: properties/1234 - * @param searchAds360Link Required. The SearchAds360Link to create. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link createSearchAds360Link( - String parent, SearchAds360Link searchAds360Link) { - CreateSearchAds360LinkRequest request = - CreateSearchAds360LinkRequest.newBuilder() - .setParent(parent) - .setSearchAds360Link(searchAds360Link) - .build(); - return createSearchAds360Link(request); + public final ListAccessBindingsPagedResponse listAccessBindings( + ListAccessBindingsRequest request) { + return listAccessBindingsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SearchAds360Link. + * Lists all access bindings on an account or property. * *

Sample code: * @@ -10638,25 +10797,29 @@ public final SearchAds360Link createSearchAds360Link( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateSearchAds360LinkRequest request = - * CreateSearchAds360LinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) + * ListAccessBindingsRequest request = + * ListAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * SearchAds360Link response = analyticsAdminServiceClient.createSearchAds360Link(request); + * ApiFuture future = + * analyticsAdminServiceClient.listAccessBindingsPagedCallable().futureCall(request); + * // Do something. + * for (AccessBinding element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link createSearchAds360Link(CreateSearchAds360LinkRequest request) { - return createSearchAds360LinkCallable().call(request); + public final UnaryCallable + listAccessBindingsPagedCallable() { + return stub.listAccessBindingsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a SearchAds360Link. + * Lists all access bindings on an account or property. * *

Sample code: * @@ -10668,26 +10831,39 @@ public final SearchAds360Link createSearchAds360Link(CreateSearchAds360LinkReque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateSearchAds360LinkRequest request = - * CreateSearchAds360LinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) + * ListAccessBindingsRequest request = + * ListAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createSearchAds360LinkCallable().futureCall(request); - * // Do something. - * SearchAds360Link response = future.get(); + * while (true) { + * ListAccessBindingsResponse response = + * analyticsAdminServiceClient.listAccessBindingsCallable().call(request); + * for (AccessBinding element : response.getAccessBindingsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } */ - public final UnaryCallable - createSearchAds360LinkCallable() { - return stub.createSearchAds360LinkCallable(); + public final UnaryCallable + listAccessBindingsCallable() { + return stub.listAccessBindingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a SearchAds360Link on a property. + * Creates information about multiple access bindings to an account or property. + * + *

This method is transactional. If any AccessBinding cannot be created, none of the + * AccessBindings will be created. * *

Sample code: * @@ -10699,26 +10875,30 @@ public final SearchAds360Link createSearchAds360Link(CreateSearchAds360LinkReque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - * analyticsAdminServiceClient.deleteSearchAds360Link(name); + * BatchCreateAccessBindingsRequest request = + * BatchCreateAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .addAllRequests(new ArrayList()) + * .build(); + * BatchCreateAccessBindingsResponse response = + * analyticsAdminServiceClient.batchCreateAccessBindings(request); * } * } * - * @param name Required. The name of the SearchAds360Link to delete. Example format: - * properties/1234/SearchAds360Links/5678 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSearchAds360Link(SearchAds360LinkName name) { - DeleteSearchAds360LinkRequest request = - DeleteSearchAds360LinkRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteSearchAds360Link(request); + public final BatchCreateAccessBindingsResponse batchCreateAccessBindings( + BatchCreateAccessBindingsRequest request) { + return batchCreateAccessBindingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a SearchAds360Link on a property. + * Creates information about multiple access bindings to an account or property. + * + *

This method is transactional. If any AccessBinding cannot be created, none of the + * AccessBindings will be created. * *

Sample code: * @@ -10730,24 +10910,26 @@ public final void deleteSearchAds360Link(SearchAds360LinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString(); - * analyticsAdminServiceClient.deleteSearchAds360Link(name); + * BatchCreateAccessBindingsRequest request = + * BatchCreateAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .addAllRequests(new ArrayList()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.batchCreateAccessBindingsCallable().futureCall(request); + * // Do something. + * BatchCreateAccessBindingsResponse response = future.get(); * } * } - * - * @param name Required. The name of the SearchAds360Link to delete. Example format: - * properties/1234/SearchAds360Links/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSearchAds360Link(String name) { - DeleteSearchAds360LinkRequest request = - DeleteSearchAds360LinkRequest.newBuilder().setName(name).build(); - deleteSearchAds360Link(request); + public final UnaryCallable + batchCreateAccessBindingsCallable() { + return stub.batchCreateAccessBindingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a SearchAds360Link on a property. + * Gets information about multiple access bindings to an account or property. * *

Sample code: * @@ -10759,24 +10941,27 @@ public final void deleteSearchAds360Link(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteSearchAds360LinkRequest request = - * DeleteSearchAds360LinkRequest.newBuilder() - * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + * BatchGetAccessBindingsRequest request = + * BatchGetAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .addAllNames(new ArrayList()) * .build(); - * analyticsAdminServiceClient.deleteSearchAds360Link(request); + * BatchGetAccessBindingsResponse response = + * analyticsAdminServiceClient.batchGetAccessBindings(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteSearchAds360Link(DeleteSearchAds360LinkRequest request) { - deleteSearchAds360LinkCallable().call(request); + public final BatchGetAccessBindingsResponse batchGetAccessBindings( + BatchGetAccessBindingsRequest request) { + return batchGetAccessBindingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a SearchAds360Link on a property. + * Gets information about multiple access bindings to an account or property. * *

Sample code: * @@ -10788,25 +10973,26 @@ public final void deleteSearchAds360Link(DeleteSearchAds360LinkRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteSearchAds360LinkRequest request = - * DeleteSearchAds360LinkRequest.newBuilder() - * .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + * BatchGetAccessBindingsRequest request = + * BatchGetAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .addAllNames(new ArrayList()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteSearchAds360LinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.batchGetAccessBindingsCallable().futureCall(request); * // Do something. - * future.get(); + * BatchGetAccessBindingsResponse response = future.get(); * } * } */ - public final UnaryCallable - deleteSearchAds360LinkCallable() { - return stub.deleteSearchAds360LinkCallable(); + public final UnaryCallable + batchGetAccessBindingsCallable() { + return stub.batchGetAccessBindingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a SearchAds360Link on a property. + * Updates information about multiple access bindings to an account or property. * *

Sample code: * @@ -10818,32 +11004,58 @@ public final void deleteSearchAds360Link(DeleteSearchAds360LinkRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * SearchAds360Link response = - * analyticsAdminServiceClient.updateSearchAds360Link(searchAds360Link, updateMask); + * BatchUpdateAccessBindingsRequest request = + * BatchUpdateAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .addAllRequests(new ArrayList()) + * .build(); + * BatchUpdateAccessBindingsResponse response = + * analyticsAdminServiceClient.batchUpdateAccessBindings(request); * } * } * - * @param searchAds360Link The SearchAds360Link to update - * @param updateMask Required. The list of fields to be updated. Omitted fields will not be - * updated. To replace the entire entity, use one path with the string "*" to match all - * fields. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link updateSearchAds360Link( - SearchAds360Link searchAds360Link, FieldMask updateMask) { - UpdateSearchAds360LinkRequest request = - UpdateSearchAds360LinkRequest.newBuilder() - .setSearchAds360Link(searchAds360Link) - .setUpdateMask(updateMask) - .build(); - return updateSearchAds360Link(request); + public final BatchUpdateAccessBindingsResponse batchUpdateAccessBindings( + BatchUpdateAccessBindingsRequest request) { + return batchUpdateAccessBindingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates information about multiple access bindings to an account or property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchUpdateAccessBindingsRequest request =
+   *       BatchUpdateAccessBindingsRequest.newBuilder()
+   *           .setParent(AccountName.of("[ACCOUNT]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.batchUpdateAccessBindingsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchUpdateAccessBindingsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchUpdateAccessBindingsCallable() { + return stub.batchUpdateAccessBindingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a SearchAds360Link on a property. + * Deletes information about multiple users' links to an account or property. * *

Sample code: * @@ -10855,25 +11067,25 @@ public final SearchAds360Link updateSearchAds360Link( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateSearchAds360LinkRequest request = - * UpdateSearchAds360LinkRequest.newBuilder() - * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * BatchDeleteAccessBindingsRequest request = + * BatchDeleteAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .addAllRequests(new ArrayList()) * .build(); - * SearchAds360Link response = analyticsAdminServiceClient.updateSearchAds360Link(request); + * analyticsAdminServiceClient.batchDeleteAccessBindings(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SearchAds360Link updateSearchAds360Link(UpdateSearchAds360LinkRequest request) { - return updateSearchAds360LinkCallable().call(request); + public final void batchDeleteAccessBindings(BatchDeleteAccessBindingsRequest request) { + batchDeleteAccessBindingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a SearchAds360Link on a property. + * Deletes information about multiple users' links to an account or property. * *

Sample code: * @@ -10885,26 +11097,26 @@ public final SearchAds360Link updateSearchAds360Link(UpdateSearchAds360LinkReque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateSearchAds360LinkRequest request = - * UpdateSearchAds360LinkRequest.newBuilder() - * .setSearchAds360Link(SearchAds360Link.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * BatchDeleteAccessBindingsRequest request = + * BatchDeleteAccessBindingsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .addAllRequests(new ArrayList()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateSearchAds360LinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.batchDeleteAccessBindingsCallable().futureCall(request); * // Do something. - * SearchAds360Link response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - updateSearchAds360LinkCallable() { - return stub.updateSearchAds360LinkCallable(); + public final UnaryCallable + batchDeleteAccessBindingsCallable() { + return stub.batchDeleteAccessBindingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a AttributionSettings singleton. + * Lookup for a single ExpandedDataSet. * *

Sample code: * @@ -10916,26 +11128,26 @@ public final SearchAds360Link updateSearchAds360Link(UpdateSearchAds360LinkReque * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); - * AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(name); + * ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + * ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(name); * } * } * - * @param name Required. The name of the attribution settings to retrieve. Format: - * properties/{property}/attributionSettings + * @param name Required. The name of the ExpandedDataSet to get. Example format: + * properties/1234/expandedDataSets/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AttributionSettings getAttributionSettings(AttributionSettingsName name) { - GetAttributionSettingsRequest request = - GetAttributionSettingsRequest.newBuilder() + public final ExpandedDataSet getExpandedDataSet(ExpandedDataSetName name) { + GetExpandedDataSetRequest request = + GetExpandedDataSetRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - return getAttributionSettings(request); + return getExpandedDataSet(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a AttributionSettings singleton. + * Lookup for a single ExpandedDataSet. * *

Sample code: * @@ -10947,24 +11159,24 @@ public final AttributionSettings getAttributionSettings(AttributionSettingsName * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = AttributionSettingsName.of("[PROPERTY]").toString(); - * AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(name); + * String name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString(); + * ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(name); * } * } * - * @param name Required. The name of the attribution settings to retrieve. Format: - * properties/{property}/attributionSettings + * @param name Required. The name of the ExpandedDataSet to get. Example format: + * properties/1234/expandedDataSets/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AttributionSettings getAttributionSettings(String name) { - GetAttributionSettingsRequest request = - GetAttributionSettingsRequest.newBuilder().setName(name).build(); - return getAttributionSettings(request); + public final ExpandedDataSet getExpandedDataSet(String name) { + GetExpandedDataSetRequest request = + GetExpandedDataSetRequest.newBuilder().setName(name).build(); + return getExpandedDataSet(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a AttributionSettings singleton. + * Lookup for a single ExpandedDataSet. * *

Sample code: * @@ -10976,24 +11188,24 @@ public final AttributionSettings getAttributionSettings(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAttributionSettingsRequest request = - * GetAttributionSettingsRequest.newBuilder() - * .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + * GetExpandedDataSetRequest request = + * GetExpandedDataSetRequest.newBuilder() + * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) * .build(); - * AttributionSettings response = analyticsAdminServiceClient.getAttributionSettings(request); + * ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AttributionSettings getAttributionSettings(GetAttributionSettingsRequest request) { - return getAttributionSettingsCallable().call(request); + public final ExpandedDataSet getExpandedDataSet(GetExpandedDataSetRequest request) { + return getExpandedDataSetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a AttributionSettings singleton. + * Lookup for a single ExpandedDataSet. * *

Sample code: * @@ -11005,25 +11217,25 @@ public final AttributionSettings getAttributionSettings(GetAttributionSettingsRe * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAttributionSettingsRequest request = - * GetAttributionSettingsRequest.newBuilder() - * .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + * GetExpandedDataSetRequest request = + * GetExpandedDataSetRequest.newBuilder() + * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getAttributionSettingsCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getExpandedDataSetCallable().futureCall(request); * // Do something. - * AttributionSettings response = future.get(); + * ExpandedDataSet response = future.get(); * } * } */ - public final UnaryCallable - getAttributionSettingsCallable() { - return stub.getAttributionSettingsCallable(); + public final UnaryCallable + getExpandedDataSetCallable() { + return stub.getExpandedDataSetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates attribution settings on a property. + * Lists ExpandedDataSets on a property. * *

Sample code: * @@ -11035,33 +11247,28 @@ public final AttributionSettings getAttributionSettings(GetAttributionSettingsRe * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AttributionSettings attributionSettings = AttributionSettings.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * AttributionSettings response = - * analyticsAdminServiceClient.updateAttributionSettings(attributionSettings, updateMask); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (ExpandedDataSet element : + * analyticsAdminServiceClient.listExpandedDataSets(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param attributionSettings Required. The attribution settings to update. The `name` field is - * used to identify the settings to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AttributionSettings updateAttributionSettings( - AttributionSettings attributionSettings, FieldMask updateMask) { - UpdateAttributionSettingsRequest request = - UpdateAttributionSettingsRequest.newBuilder() - .setAttributionSettings(attributionSettings) - .setUpdateMask(updateMask) + public final ListExpandedDataSetsPagedResponse listExpandedDataSets(PropertyName parent) { + ListExpandedDataSetsRequest request = + ListExpandedDataSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) .build(); - return updateAttributionSettings(request); + return listExpandedDataSets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates attribution settings on a property. + * Lists ExpandedDataSets on a property. * *

Sample code: * @@ -11073,67 +11280,26 @@ public final AttributionSettings updateAttributionSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateAttributionSettingsRequest request = - * UpdateAttributionSettingsRequest.newBuilder() - * .setAttributionSettings(AttributionSettings.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * AttributionSettings response = analyticsAdminServiceClient.updateAttributionSettings(request); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (ExpandedDataSet element : + * analyticsAdminServiceClient.listExpandedDataSets(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AttributionSettings updateAttributionSettings( - UpdateAttributionSettingsRequest request) { - return updateAttributionSettingsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates attribution settings on a property. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   UpdateAttributionSettingsRequest request =
-   *       UpdateAttributionSettingsRequest.newBuilder()
-   *           .setAttributionSettings(AttributionSettings.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsAdminServiceClient.updateAttributionSettingsCallable().futureCall(request);
-   *   // Do something.
-   *   AttributionSettings response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateAttributionSettingsCallable() { - return stub.updateAttributionSettingsCallable(); + public final ListExpandedDataSetsPagedResponse listExpandedDataSets(String parent) { + ListExpandedDataSetsRequest request = + ListExpandedDataSetsRequest.newBuilder().setParent(parent).build(); + return listExpandedDataSets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a customized report of data access records. The report provides records of each time a - * user reads Google Analytics reporting data. Access records are retained for up to 2 years. - * - *

Data Access Reports can be requested for a property. The property must be in Google - * Analytics 360. This method is only available to Administrators. - * - *

These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and - * other products like Firebase & Admob that can retrieve data from Google Analytics through a - * linkage. These records don't include property configuration changes like adding a stream or - * changing a property's time zone. For configuration change history, see - * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + * Lists ExpandedDataSets on a property. * *

Sample code: * @@ -11145,44 +11311,30 @@ public final AttributionSettings updateAttributionSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * RunAccessReportRequest request = - * RunAccessReportRequest.newBuilder() - * .setEntity("entity-1298275357") - * .addAllDimensions(new ArrayList()) - * .addAllMetrics(new ArrayList()) - * .addAllDateRanges(new ArrayList()) - * .setDimensionFilter(AccessFilterExpression.newBuilder().build()) - * .setMetricFilter(AccessFilterExpression.newBuilder().build()) - * .setOffset(-1019779949) - * .setLimit(102976443) - * .setTimeZone("timeZone-2077180903") - * .addAllOrderBys(new ArrayList()) - * .setReturnEntityQuota(true) + * ListExpandedDataSetsRequest request = + * ListExpandedDataSetsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * RunAccessReportResponse response = analyticsAdminServiceClient.runAccessReport(request); + * for (ExpandedDataSet element : + * analyticsAdminServiceClient.listExpandedDataSets(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final RunAccessReportResponse runAccessReport(RunAccessReportRequest request) { - return runAccessReportCallable().call(request); + public final ListExpandedDataSetsPagedResponse listExpandedDataSets( + ListExpandedDataSetsRequest request) { + return listExpandedDataSetsPagedCallable().call(request); } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a customized report of data access records. The report provides records of each time a - * user reads Google Analytics reporting data. Access records are retained for up to 2 years. - * - *

Data Access Reports can be requested for a property. The property must be in Google - * Analytics 360. This method is only available to Administrators. - * - *

These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and - * other products like Firebase & Admob that can retrieve data from Google Analytics through a - * linkage. These records don't include property configuration changes like adding a stream or - * changing a property's time zone. For configuration change history, see - * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ExpandedDataSets on a property. * *

Sample code: * @@ -11194,35 +11346,29 @@ public final RunAccessReportResponse runAccessReport(RunAccessReportRequest requ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * RunAccessReportRequest request = - * RunAccessReportRequest.newBuilder() - * .setEntity("entity-1298275357") - * .addAllDimensions(new ArrayList()) - * .addAllMetrics(new ArrayList()) - * .addAllDateRanges(new ArrayList()) - * .setDimensionFilter(AccessFilterExpression.newBuilder().build()) - * .setMetricFilter(AccessFilterExpression.newBuilder().build()) - * .setOffset(-1019779949) - * .setLimit(102976443) - * .setTimeZone("timeZone-2077180903") - * .addAllOrderBys(new ArrayList()) - * .setReturnEntityQuota(true) + * ListExpandedDataSetsRequest request = + * ListExpandedDataSetsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.runAccessReportCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.listExpandedDataSetsPagedCallable().futureCall(request); * // Do something. - * RunAccessReportResponse response = future.get(); + * for (ExpandedDataSet element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable - runAccessReportCallable() { - return stub.runAccessReportCallable(); + public final UnaryCallable + listExpandedDataSetsPagedCallable() { + return stub.listExpandedDataSetsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an access binding on an account or property. + * Lists ExpandedDataSets on a property. * *

Sample code: * @@ -11234,29 +11380,36 @@ public final RunAccessReportResponse runAccessReport(RunAccessReportRequest requ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AccountName parent = AccountName.of("[ACCOUNT]"); - * AccessBinding accessBinding = AccessBinding.newBuilder().build(); - * AccessBinding response = - * analyticsAdminServiceClient.createAccessBinding(parent, accessBinding); + * ListExpandedDataSetsRequest request = + * ListExpandedDataSetsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListExpandedDataSetsResponse response = + * analyticsAdminServiceClient.listExpandedDataSetsCallable().call(request); + * for (ExpandedDataSet element : response.getExpandedDataSetsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param parent Required. Formats: - accounts/{account} - properties/{property} - * @param accessBinding Required. The access binding to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding createAccessBinding(AccountName parent, AccessBinding accessBinding) { - CreateAccessBindingRequest request = - CreateAccessBindingRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setAccessBinding(accessBinding) - .build(); - return createAccessBinding(request); + public final UnaryCallable + listExpandedDataSetsCallable() { + return stub.listExpandedDataSetsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an access binding on an account or property. + * Creates a ExpandedDataSet. * *

Sample code: * @@ -11269,28 +11422,29 @@ public final AccessBinding createAccessBinding(AccountName parent, AccessBinding * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * PropertyName parent = PropertyName.of("[PROPERTY]"); - * AccessBinding accessBinding = AccessBinding.newBuilder().build(); - * AccessBinding response = - * analyticsAdminServiceClient.createAccessBinding(parent, accessBinding); + * ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + * ExpandedDataSet response = + * analyticsAdminServiceClient.createExpandedDataSet(parent, expandedDataSet); * } * } * - * @param parent Required. Formats: - accounts/{account} - properties/{property} - * @param accessBinding Required. The access binding to create. + * @param parent Required. Example format: properties/1234 + * @param expandedDataSet Required. The ExpandedDataSet to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding createAccessBinding(PropertyName parent, AccessBinding accessBinding) { - CreateAccessBindingRequest request = - CreateAccessBindingRequest.newBuilder() + public final ExpandedDataSet createExpandedDataSet( + PropertyName parent, ExpandedDataSet expandedDataSet) { + CreateExpandedDataSetRequest request = + CreateExpandedDataSetRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) - .setAccessBinding(accessBinding) + .setExpandedDataSet(expandedDataSet) .build(); - return createAccessBinding(request); + return createExpandedDataSet(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an access binding on an account or property. + * Creates a ExpandedDataSet. * *

Sample code: * @@ -11302,29 +11456,30 @@ public final AccessBinding createAccessBinding(PropertyName parent, AccessBindin * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = AccountName.of("[ACCOUNT]").toString(); - * AccessBinding accessBinding = AccessBinding.newBuilder().build(); - * AccessBinding response = - * analyticsAdminServiceClient.createAccessBinding(parent, accessBinding); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + * ExpandedDataSet response = + * analyticsAdminServiceClient.createExpandedDataSet(parent, expandedDataSet); * } * } * - * @param parent Required. Formats: - accounts/{account} - properties/{property} - * @param accessBinding Required. The access binding to create. + * @param parent Required. Example format: properties/1234 + * @param expandedDataSet Required. The ExpandedDataSet to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding createAccessBinding(String parent, AccessBinding accessBinding) { - CreateAccessBindingRequest request = - CreateAccessBindingRequest.newBuilder() + public final ExpandedDataSet createExpandedDataSet( + String parent, ExpandedDataSet expandedDataSet) { + CreateExpandedDataSetRequest request = + CreateExpandedDataSetRequest.newBuilder() .setParent(parent) - .setAccessBinding(accessBinding) + .setExpandedDataSet(expandedDataSet) .build(); - return createAccessBinding(request); + return createExpandedDataSet(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an access binding on an account or property. + * Creates a ExpandedDataSet. * *

Sample code: * @@ -11336,25 +11491,25 @@ public final AccessBinding createAccessBinding(String parent, AccessBinding acce * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateAccessBindingRequest request = - * CreateAccessBindingRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setAccessBinding(AccessBinding.newBuilder().build()) + * CreateExpandedDataSetRequest request = + * CreateExpandedDataSetRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) * .build(); - * AccessBinding response = analyticsAdminServiceClient.createAccessBinding(request); + * ExpandedDataSet response = analyticsAdminServiceClient.createExpandedDataSet(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding createAccessBinding(CreateAccessBindingRequest request) { - return createAccessBindingCallable().call(request); + public final ExpandedDataSet createExpandedDataSet(CreateExpandedDataSetRequest request) { + return createExpandedDataSetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an access binding on an account or property. + * Creates a ExpandedDataSet. * *

Sample code: * @@ -11366,57 +11521,26 @@ public final AccessBinding createAccessBinding(CreateAccessBindingRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateAccessBindingRequest request = - * CreateAccessBindingRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .setAccessBinding(AccessBinding.newBuilder().build()) + * CreateExpandedDataSetRequest request = + * CreateExpandedDataSetRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createAccessBindingCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createExpandedDataSetCallable().futureCall(request); * // Do something. - * AccessBinding response = future.get(); - * } - * } - */ - public final UnaryCallable - createAccessBindingCallable() { - return stub.createAccessBindingCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information about an access binding. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   AccessBindingName name =
-   *       AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]");
-   *   AccessBinding response = analyticsAdminServiceClient.getAccessBinding(name);
+   *   ExpandedDataSet response = future.get();
    * }
    * }
- * - * @param name Required. The name of the access binding to retrieve. Formats: - - * accounts/{account}/accessBindings/{accessBinding} - - * properties/{property}/accessBindings/{accessBinding} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding getAccessBinding(AccessBindingName name) { - GetAccessBindingRequest request = - GetAccessBindingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getAccessBinding(request); + public final UnaryCallable + createExpandedDataSetCallable() { + return stub.createExpandedDataSetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about an access binding. + * Updates a ExpandedDataSet on a property. * *

Sample code: * @@ -11428,25 +11552,33 @@ public final AccessBinding getAccessBinding(AccessBindingName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]").toString(); - * AccessBinding response = analyticsAdminServiceClient.getAccessBinding(name); + * ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * ExpandedDataSet response = + * analyticsAdminServiceClient.updateExpandedDataSet(expandedDataSet, updateMask); * } * } * - * @param name Required. The name of the access binding to retrieve. Formats: - - * accounts/{account}/accessBindings/{accessBinding} - - * properties/{property}/accessBindings/{accessBinding} + * @param expandedDataSet Required. The ExpandedDataSet to update. The resource's `name` field is + * used to identify the ExpandedDataSet to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding getAccessBinding(String name) { - GetAccessBindingRequest request = GetAccessBindingRequest.newBuilder().setName(name).build(); - return getAccessBinding(request); + public final ExpandedDataSet updateExpandedDataSet( + ExpandedDataSet expandedDataSet, FieldMask updateMask) { + UpdateExpandedDataSetRequest request = + UpdateExpandedDataSetRequest.newBuilder() + .setExpandedDataSet(expandedDataSet) + .setUpdateMask(updateMask) + .build(); + return updateExpandedDataSet(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about an access binding. + * Updates a ExpandedDataSet on a property. * *

Sample code: * @@ -11458,26 +11590,25 @@ public final AccessBinding getAccessBinding(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAccessBindingRequest request = - * GetAccessBindingRequest.newBuilder() - * .setName( - * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - * .toString()) + * UpdateExpandedDataSetRequest request = + * UpdateExpandedDataSetRequest.newBuilder() + * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * AccessBinding response = analyticsAdminServiceClient.getAccessBinding(request); + * ExpandedDataSet response = analyticsAdminServiceClient.updateExpandedDataSet(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding getAccessBinding(GetAccessBindingRequest request) { - return getAccessBindingCallable().call(request); + public final ExpandedDataSet updateExpandedDataSet(UpdateExpandedDataSetRequest request) { + return updateExpandedDataSetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about an access binding. + * Updates a ExpandedDataSet on a property. * *

Sample code: * @@ -11489,26 +11620,26 @@ public final AccessBinding getAccessBinding(GetAccessBindingRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAccessBindingRequest request = - * GetAccessBindingRequest.newBuilder() - * .setName( - * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - * .toString()) + * UpdateExpandedDataSetRequest request = + * UpdateExpandedDataSetRequest.newBuilder() + * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getAccessBindingCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateExpandedDataSetCallable().futureCall(request); * // Do something. - * AccessBinding response = future.get(); + * ExpandedDataSet response = future.get(); * } * } */ - public final UnaryCallable getAccessBindingCallable() { - return stub.getAccessBindingCallable(); + public final UnaryCallable + updateExpandedDataSetCallable() { + return stub.updateExpandedDataSetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an access binding on an account or property. + * Deletes a ExpandedDataSet on a property. * *

Sample code: * @@ -11520,23 +11651,25 @@ public final UnaryCallable getAccessBind * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AccessBinding accessBinding = AccessBinding.newBuilder().build(); - * AccessBinding response = analyticsAdminServiceClient.updateAccessBinding(accessBinding); + * ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + * analyticsAdminServiceClient.deleteExpandedDataSet(name); * } * } * - * @param accessBinding Required. The access binding to update. + * @param name Required. Example format: properties/1234/expandedDataSets/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding updateAccessBinding(AccessBinding accessBinding) { - UpdateAccessBindingRequest request = - UpdateAccessBindingRequest.newBuilder().setAccessBinding(accessBinding).build(); - return updateAccessBinding(request); + public final void deleteExpandedDataSet(ExpandedDataSetName name) { + DeleteExpandedDataSetRequest request = + DeleteExpandedDataSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteExpandedDataSet(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an access binding on an account or property. + * Deletes a ExpandedDataSet on a property. * *

Sample code: * @@ -11548,24 +11681,23 @@ public final AccessBinding updateAccessBinding(AccessBinding accessBinding) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateAccessBindingRequest request = - * UpdateAccessBindingRequest.newBuilder() - * .setAccessBinding(AccessBinding.newBuilder().build()) - * .build(); - * AccessBinding response = analyticsAdminServiceClient.updateAccessBinding(request); + * String name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString(); + * analyticsAdminServiceClient.deleteExpandedDataSet(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Example format: properties/1234/expandedDataSets/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AccessBinding updateAccessBinding(UpdateAccessBindingRequest request) { - return updateAccessBindingCallable().call(request); + public final void deleteExpandedDataSet(String name) { + DeleteExpandedDataSetRequest request = + DeleteExpandedDataSetRequest.newBuilder().setName(name).build(); + deleteExpandedDataSet(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an access binding on an account or property. + * Deletes a ExpandedDataSet on a property. * *

Sample code: * @@ -11577,25 +11709,24 @@ public final AccessBinding updateAccessBinding(UpdateAccessBindingRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateAccessBindingRequest request = - * UpdateAccessBindingRequest.newBuilder() - * .setAccessBinding(AccessBinding.newBuilder().build()) + * DeleteExpandedDataSetRequest request = + * DeleteExpandedDataSetRequest.newBuilder() + * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateAccessBindingCallable().futureCall(request); - * // Do something. - * AccessBinding response = future.get(); + * analyticsAdminServiceClient.deleteExpandedDataSet(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - updateAccessBindingCallable() { - return stub.updateAccessBindingCallable(); + public final void deleteExpandedDataSet(DeleteExpandedDataSetRequest request) { + deleteExpandedDataSetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an access binding on an account or property. + * Deletes a ExpandedDataSet on a property. * *

Sample code: * @@ -11607,27 +11738,24 @@ public final AccessBinding updateAccessBinding(UpdateAccessBindingRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AccessBindingName name = - * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - * analyticsAdminServiceClient.deleteAccessBinding(name); + * DeleteExpandedDataSetRequest request = + * DeleteExpandedDataSetRequest.newBuilder() + * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.deleteExpandedDataSetCallable().futureCall(request); + * // Do something. + * future.get(); * } * } - * - * @param name Required. Formats: - accounts/{account}/accessBindings/{accessBinding} - - * properties/{property}/accessBindings/{accessBinding} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteAccessBinding(AccessBindingName name) { - DeleteAccessBindingRequest request = - DeleteAccessBindingRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteAccessBinding(request); + public final UnaryCallable deleteExpandedDataSetCallable() { + return stub.deleteExpandedDataSetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an access binding on an account or property. + * Lookup for a single ChannelGroup. * *

Sample code: * @@ -11639,25 +11767,24 @@ public final void deleteAccessBinding(AccessBindingName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]").toString(); - * analyticsAdminServiceClient.deleteAccessBinding(name); + * ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + * ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(name); * } * } * - * @param name Required. Formats: - accounts/{account}/accessBindings/{accessBinding} - - * properties/{property}/accessBindings/{accessBinding} + * @param name Required. The ChannelGroup to get. Example format: + * properties/1234/channelGroups/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteAccessBinding(String name) { - DeleteAccessBindingRequest request = - DeleteAccessBindingRequest.newBuilder().setName(name).build(); - deleteAccessBinding(request); + public final ChannelGroup getChannelGroup(ChannelGroupName name) { + GetChannelGroupRequest request = + GetChannelGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getChannelGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an access binding on an account or property. + * Lookup for a single ChannelGroup. * *

Sample code: * @@ -11669,26 +11796,23 @@ public final void deleteAccessBinding(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteAccessBindingRequest request = - * DeleteAccessBindingRequest.newBuilder() - * .setName( - * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - * .toString()) - * .build(); - * analyticsAdminServiceClient.deleteAccessBinding(request); + * String name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString(); + * ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The ChannelGroup to get. Example format: + * properties/1234/channelGroups/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteAccessBinding(DeleteAccessBindingRequest request) { - deleteAccessBindingCallable().call(request); + public final ChannelGroup getChannelGroup(String name) { + GetChannelGroupRequest request = GetChannelGroupRequest.newBuilder().setName(name).build(); + return getChannelGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an access binding on an account or property. + * Lookup for a single ChannelGroup. * *

Sample code: * @@ -11700,26 +11824,24 @@ public final void deleteAccessBinding(DeleteAccessBindingRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteAccessBindingRequest request = - * DeleteAccessBindingRequest.newBuilder() - * .setName( - * AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - * .toString()) + * GetChannelGroupRequest request = + * GetChannelGroupRequest.newBuilder() + * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteAccessBindingCallable().futureCall(request); - * // Do something. - * future.get(); + * ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable deleteAccessBindingCallable() { - return stub.deleteAccessBindingCallable(); + public final ChannelGroup getChannelGroup(GetChannelGroupRequest request) { + return getChannelGroupCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all access bindings on an account or property. + * Lookup for a single ChannelGroup. * *

Sample code: * @@ -11731,28 +11853,24 @@ public final UnaryCallable deleteAccessBindin * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AccountName parent = AccountName.of("[ACCOUNT]"); - * for (AccessBinding element : - * analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) { - * // doThingsWith(element); - * } + * GetChannelGroupRequest request = + * GetChannelGroupRequest.newBuilder() + * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.getChannelGroupCallable().futureCall(request); + * // Do something. + * ChannelGroup response = future.get(); * } * } - * - * @param parent Required. Formats: - accounts/{account} - properties/{property} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAccessBindingsPagedResponse listAccessBindings(AccountName parent) { - ListAccessBindingsRequest request = - ListAccessBindingsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listAccessBindings(request); + public final UnaryCallable getChannelGroupCallable() { + return stub.getChannelGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all access bindings on an account or property. + * Lists ChannelGroups on a property. * *

Sample code: * @@ -11765,27 +11883,28 @@ public final ListAccessBindingsPagedResponse listAccessBindings(AccountName pare * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (AccessBinding element : - * analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) { + * for (ChannelGroup element : + * analyticsAdminServiceClient.listChannelGroups(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Formats: - accounts/{account} - properties/{property} + * @param parent Required. The property for which to list ChannelGroups. Example format: + * properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAccessBindingsPagedResponse listAccessBindings(PropertyName parent) { - ListAccessBindingsRequest request = - ListAccessBindingsRequest.newBuilder() + public final ListChannelGroupsPagedResponse listChannelGroups(PropertyName parent) { + ListChannelGroupsRequest request = + ListChannelGroupsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); - return listAccessBindings(request); + return listChannelGroups(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all access bindings on an account or property. + * Lists ChannelGroups on a property. * *

Sample code: * @@ -11797,26 +11916,27 @@ public final ListAccessBindingsPagedResponse listAccessBindings(PropertyName par * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = AccountName.of("[ACCOUNT]").toString(); - * for (AccessBinding element : - * analyticsAdminServiceClient.listAccessBindings(parent).iterateAll()) { + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (ChannelGroup element : + * analyticsAdminServiceClient.listChannelGroups(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Formats: - accounts/{account} - properties/{property} + * @param parent Required. The property for which to list ChannelGroups. Example format: + * properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAccessBindingsPagedResponse listAccessBindings(String parent) { - ListAccessBindingsRequest request = - ListAccessBindingsRequest.newBuilder().setParent(parent).build(); - return listAccessBindings(request); + public final ListChannelGroupsPagedResponse listChannelGroups(String parent) { + ListChannelGroupsRequest request = + ListChannelGroupsRequest.newBuilder().setParent(parent).build(); + return listChannelGroups(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all access bindings on an account or property. + * Lists ChannelGroups on a property. * *

Sample code: * @@ -11828,14 +11948,14 @@ public final ListAccessBindingsPagedResponse listAccessBindings(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAccessBindingsRequest request = - * ListAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) + * ListChannelGroupsRequest request = + * ListChannelGroupsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * for (AccessBinding element : - * analyticsAdminServiceClient.listAccessBindings(request).iterateAll()) { + * for (ChannelGroup element : + * analyticsAdminServiceClient.listChannelGroups(request).iterateAll()) { * // doThingsWith(element); * } * } @@ -11844,14 +11964,13 @@ public final ListAccessBindingsPagedResponse listAccessBindings(String parent) { * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAccessBindingsPagedResponse listAccessBindings( - ListAccessBindingsRequest request) { - return listAccessBindingsPagedCallable().call(request); + public final ListChannelGroupsPagedResponse listChannelGroups(ListChannelGroupsRequest request) { + return listChannelGroupsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all access bindings on an account or property. + * Lists ChannelGroups on a property. * *

Sample code: * @@ -11863,29 +11982,29 @@ public final ListAccessBindingsPagedResponse listAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAccessBindingsRequest request = - * ListAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) + * ListChannelGroupsRequest request = + * ListChannelGroupsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listAccessBindingsPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.listChannelGroupsPagedCallable().futureCall(request); * // Do something. - * for (AccessBinding element : future.get().iterateAll()) { + * for (ChannelGroup element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ - public final UnaryCallable - listAccessBindingsPagedCallable() { - return stub.listAccessBindingsPagedCallable(); + public final UnaryCallable + listChannelGroupsPagedCallable() { + return stub.listChannelGroupsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists all access bindings on an account or property. + * Lists ChannelGroups on a property. * *

Sample code: * @@ -11897,16 +12016,16 @@ public final ListAccessBindingsPagedResponse listAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAccessBindingsRequest request = - * ListAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) + * ListChannelGroupsRequest request = + * ListChannelGroupsRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListAccessBindingsResponse response = - * analyticsAdminServiceClient.listAccessBindingsCallable().call(request); - * for (AccessBinding element : response.getAccessBindingsList()) { + * .build(); + * while (true) { + * ListChannelGroupsResponse response = + * analyticsAdminServiceClient.listChannelGroupsCallable().call(request); + * for (ChannelGroup element : response.getChannelGroupsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -11919,17 +12038,14 @@ public final ListAccessBindingsPagedResponse listAccessBindings( * } * } */ - public final UnaryCallable - listAccessBindingsCallable() { - return stub.listAccessBindingsCallable(); + public final UnaryCallable + listChannelGroupsCallable() { + return stub.listChannelGroupsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates information about multiple access bindings to an account or property. - * - *

This method is transactional. If any AccessBinding cannot be created, none of the - * AccessBindings will be created. + * Creates a ChannelGroup. * *

Sample code: * @@ -11941,30 +12057,29 @@ public final ListAccessBindingsPagedResponse listAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchCreateAccessBindingsRequest request = - * BatchCreateAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) - * .build(); - * BatchCreateAccessBindingsResponse response = - * analyticsAdminServiceClient.batchCreateAccessBindings(request); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + * ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(parent, channelGroup); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The property for which to create a ChannelGroup. Example format: + * properties/1234 + * @param channelGroup Required. The ChannelGroup to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BatchCreateAccessBindingsResponse batchCreateAccessBindings( - BatchCreateAccessBindingsRequest request) { - return batchCreateAccessBindingsCallable().call(request); + public final ChannelGroup createChannelGroup(PropertyName parent, ChannelGroup channelGroup) { + CreateChannelGroupRequest request = + CreateChannelGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setChannelGroup(channelGroup) + .build(); + return createChannelGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates information about multiple access bindings to an account or property. - * - *

This method is transactional. If any AccessBinding cannot be created, none of the - * AccessBindings will be created. + * Creates a ChannelGroup. * *

Sample code: * @@ -11976,26 +12091,29 @@ public final BatchCreateAccessBindingsResponse batchCreateAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchCreateAccessBindingsRequest request = - * BatchCreateAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.batchCreateAccessBindingsCallable().futureCall(request); - * // Do something. - * BatchCreateAccessBindingsResponse response = future.get(); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + * ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(parent, channelGroup); * } * } + * + * @param parent Required. The property for which to create a ChannelGroup. Example format: + * properties/1234 + * @param channelGroup Required. The ChannelGroup to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - batchCreateAccessBindingsCallable() { - return stub.batchCreateAccessBindingsCallable(); + public final ChannelGroup createChannelGroup(String parent, ChannelGroup channelGroup) { + CreateChannelGroupRequest request = + CreateChannelGroupRequest.newBuilder() + .setParent(parent) + .setChannelGroup(channelGroup) + .build(); + return createChannelGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about multiple access bindings to an account or property. + * Creates a ChannelGroup. * *

Sample code: * @@ -12007,27 +12125,25 @@ public final BatchCreateAccessBindingsResponse batchCreateAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchGetAccessBindingsRequest request = - * BatchGetAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllNames(new ArrayList()) + * CreateChannelGroupRequest request = + * CreateChannelGroupRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setChannelGroup(ChannelGroup.newBuilder().build()) * .build(); - * BatchGetAccessBindingsResponse response = - * analyticsAdminServiceClient.batchGetAccessBindings(request); + * ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BatchGetAccessBindingsResponse batchGetAccessBindings( - BatchGetAccessBindingsRequest request) { - return batchGetAccessBindingsCallable().call(request); + public final ChannelGroup createChannelGroup(CreateChannelGroupRequest request) { + return createChannelGroupCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about multiple access bindings to an account or property. + * Creates a ChannelGroup. * *

Sample code: * @@ -12039,26 +12155,25 @@ public final BatchGetAccessBindingsResponse batchGetAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchGetAccessBindingsRequest request = - * BatchGetAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllNames(new ArrayList()) + * CreateChannelGroupRequest request = + * CreateChannelGroupRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setChannelGroup(ChannelGroup.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.batchGetAccessBindingsCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createChannelGroupCallable().futureCall(request); * // Do something. - * BatchGetAccessBindingsResponse response = future.get(); + * ChannelGroup response = future.get(); * } * } */ - public final UnaryCallable - batchGetAccessBindingsCallable() { - return stub.batchGetAccessBindingsCallable(); + public final UnaryCallable createChannelGroupCallable() { + return stub.createChannelGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates information about multiple access bindings to an account or property. + * Updates a ChannelGroup. * *

Sample code: * @@ -12070,58 +12185,32 @@ public final BatchGetAccessBindingsResponse batchGetAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchUpdateAccessBindingsRequest request = - * BatchUpdateAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) - * .build(); - * BatchUpdateAccessBindingsResponse response = - * analyticsAdminServiceClient.batchUpdateAccessBindings(request); + * ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * ChannelGroup response = + * analyticsAdminServiceClient.updateChannelGroup(channelGroup, updateMask); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param channelGroup Required. The ChannelGroup to update. The resource's `name` field is used + * to identify the ChannelGroup to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BatchUpdateAccessBindingsResponse batchUpdateAccessBindings( - BatchUpdateAccessBindingsRequest request) { - return batchUpdateAccessBindingsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates information about multiple access bindings to an account or property. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   BatchUpdateAccessBindingsRequest request =
-   *       BatchUpdateAccessBindingsRequest.newBuilder()
-   *           .setParent(AccountName.of("[ACCOUNT]").toString())
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       analyticsAdminServiceClient.batchUpdateAccessBindingsCallable().futureCall(request);
-   *   // Do something.
-   *   BatchUpdateAccessBindingsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchUpdateAccessBindingsCallable() { - return stub.batchUpdateAccessBindingsCallable(); + public final ChannelGroup updateChannelGroup(ChannelGroup channelGroup, FieldMask updateMask) { + UpdateChannelGroupRequest request = + UpdateChannelGroupRequest.newBuilder() + .setChannelGroup(channelGroup) + .setUpdateMask(updateMask) + .build(); + return updateChannelGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes information about multiple users' links to an account or property. + * Updates a ChannelGroup. * *

Sample code: * @@ -12133,25 +12222,25 @@ public final BatchUpdateAccessBindingsResponse batchUpdateAccessBindings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchDeleteAccessBindingsRequest request = - * BatchDeleteAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) + * UpdateChannelGroupRequest request = + * UpdateChannelGroupRequest.newBuilder() + * .setChannelGroup(ChannelGroup.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * analyticsAdminServiceClient.batchDeleteAccessBindings(request); + * ChannelGroup response = analyticsAdminServiceClient.updateChannelGroup(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void batchDeleteAccessBindings(BatchDeleteAccessBindingsRequest request) { - batchDeleteAccessBindingsCallable().call(request); + public final ChannelGroup updateChannelGroup(UpdateChannelGroupRequest request) { + return updateChannelGroupCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes information about multiple users' links to an account or property. + * Updates a ChannelGroup. * *

Sample code: * @@ -12163,26 +12252,25 @@ public final void batchDeleteAccessBindings(BatchDeleteAccessBindingsRequest req * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BatchDeleteAccessBindingsRequest request = - * BatchDeleteAccessBindingsRequest.newBuilder() - * .setParent(AccountName.of("[ACCOUNT]").toString()) - * .addAllRequests(new ArrayList()) + * UpdateChannelGroupRequest request = + * UpdateChannelGroupRequest.newBuilder() + * .setChannelGroup(ChannelGroup.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.batchDeleteAccessBindingsCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateChannelGroupCallable().futureCall(request); * // Do something. - * future.get(); + * ChannelGroup response = future.get(); * } * } */ - public final UnaryCallable - batchDeleteAccessBindingsCallable() { - return stub.batchDeleteAccessBindingsCallable(); + public final UnaryCallable updateChannelGroupCallable() { + return stub.updateChannelGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ExpandedDataSet. + * Deletes a ChannelGroup on a property. * *

Sample code: * @@ -12194,26 +12282,26 @@ public final void batchDeleteAccessBindings(BatchDeleteAccessBindingsRequest req * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - * ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(name); + * ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + * analyticsAdminServiceClient.deleteChannelGroup(name); * } * } * - * @param name Required. The name of the ExpandedDataSet to get. Example format: - * properties/1234/expandedDataSets/5678 + * @param name Required. The ChannelGroup to delete. Example format: + * properties/1234/channelGroups/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet getExpandedDataSet(ExpandedDataSetName name) { - GetExpandedDataSetRequest request = - GetExpandedDataSetRequest.newBuilder() + public final void deleteChannelGroup(ChannelGroupName name) { + DeleteChannelGroupRequest request = + DeleteChannelGroupRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - return getExpandedDataSet(request); + deleteChannelGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ExpandedDataSet. + * Deletes a ChannelGroup on a property. * *

Sample code: * @@ -12225,24 +12313,24 @@ public final ExpandedDataSet getExpandedDataSet(ExpandedDataSetName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString(); - * ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(name); + * String name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString(); + * analyticsAdminServiceClient.deleteChannelGroup(name); * } * } * - * @param name Required. The name of the ExpandedDataSet to get. Example format: - * properties/1234/expandedDataSets/5678 + * @param name Required. The ChannelGroup to delete. Example format: + * properties/1234/channelGroups/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet getExpandedDataSet(String name) { - GetExpandedDataSetRequest request = - GetExpandedDataSetRequest.newBuilder().setName(name).build(); - return getExpandedDataSet(request); + public final void deleteChannelGroup(String name) { + DeleteChannelGroupRequest request = + DeleteChannelGroupRequest.newBuilder().setName(name).build(); + deleteChannelGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ExpandedDataSet. + * Deletes a ChannelGroup on a property. * *

Sample code: * @@ -12254,24 +12342,24 @@ public final ExpandedDataSet getExpandedDataSet(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetExpandedDataSetRequest request = - * GetExpandedDataSetRequest.newBuilder() - * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + * DeleteChannelGroupRequest request = + * DeleteChannelGroupRequest.newBuilder() + * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) * .build(); - * ExpandedDataSet response = analyticsAdminServiceClient.getExpandedDataSet(request); + * analyticsAdminServiceClient.deleteChannelGroup(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet getExpandedDataSet(GetExpandedDataSetRequest request) { - return getExpandedDataSetCallable().call(request); + public final void deleteChannelGroup(DeleteChannelGroupRequest request) { + deleteChannelGroupCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ExpandedDataSet. + * Deletes a ChannelGroup on a property. * *

Sample code: * @@ -12283,25 +12371,25 @@ public final ExpandedDataSet getExpandedDataSet(GetExpandedDataSetRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetExpandedDataSetRequest request = - * GetExpandedDataSetRequest.newBuilder() - * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + * DeleteChannelGroupRequest request = + * DeleteChannelGroupRequest.newBuilder() + * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getExpandedDataSetCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteChannelGroupCallable().futureCall(request); * // Do something. - * ExpandedDataSet response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - getExpandedDataSetCallable() { - return stub.getExpandedDataSetCallable(); + public final UnaryCallable deleteChannelGroupCallable() { + return stub.deleteChannelGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ExpandedDataSets on a property. + * Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has + * no effect on GA4 property. * *

Sample code: * @@ -12313,28 +12401,28 @@ public final ExpandedDataSet getExpandedDataSet(GetExpandedDataSetRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (ExpandedDataSet element : - * analyticsAdminServiceClient.listExpandedDataSets(parent).iterateAll()) { - * // doThingsWith(element); - * } + * SetAutomatedGa4ConfigurationOptOutRequest request = + * SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() + * .setProperty("property-993141291") + * .setOptOut(true) + * .build(); + * SetAutomatedGa4ConfigurationOptOutResponse response = + * analyticsAdminServiceClient.setAutomatedGa4ConfigurationOptOut(request); * } * } * - * @param parent Required. Example format: properties/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListExpandedDataSetsPagedResponse listExpandedDataSets(PropertyName parent) { - ListExpandedDataSetsRequest request = - ListExpandedDataSetsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listExpandedDataSets(request); + public final SetAutomatedGa4ConfigurationOptOutResponse setAutomatedGa4ConfigurationOptOut( + SetAutomatedGa4ConfigurationOptOutRequest request) { + return setAutomatedGa4ConfigurationOptOutCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ExpandedDataSets on a property. + * Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has + * no effect on GA4 property. * *

Sample code: * @@ -12346,26 +12434,30 @@ public final ListExpandedDataSetsPagedResponse listExpandedDataSets(PropertyName * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (ExpandedDataSet element : - * analyticsAdminServiceClient.listExpandedDataSets(parent).iterateAll()) { - * // doThingsWith(element); - * } + * SetAutomatedGa4ConfigurationOptOutRequest request = + * SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() + * .setProperty("property-993141291") + * .setOptOut(true) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient + * .setAutomatedGa4ConfigurationOptOutCallable() + * .futureCall(request); + * // Do something. + * SetAutomatedGa4ConfigurationOptOutResponse response = future.get(); * } * } - * - * @param parent Required. Example format: properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListExpandedDataSetsPagedResponse listExpandedDataSets(String parent) { - ListExpandedDataSetsRequest request = - ListExpandedDataSetsRequest.newBuilder().setParent(parent).build(); - return listExpandedDataSets(request); + public final UnaryCallable< + SetAutomatedGa4ConfigurationOptOutRequest, SetAutomatedGa4ConfigurationOptOutResponse> + setAutomatedGa4ConfigurationOptOutCallable() { + return stub.setAutomatedGa4ConfigurationOptOutCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ExpandedDataSets on a property. + * Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this + * has no effect on GA4 property. * *

Sample code: * @@ -12377,30 +12469,27 @@ public final ListExpandedDataSetsPagedResponse listExpandedDataSets(String paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListExpandedDataSetsRequest request = - * ListExpandedDataSetsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * FetchAutomatedGa4ConfigurationOptOutRequest request = + * FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() + * .setProperty("property-993141291") * .build(); - * for (ExpandedDataSet element : - * analyticsAdminServiceClient.listExpandedDataSets(request).iterateAll()) { - * // doThingsWith(element); - * } + * FetchAutomatedGa4ConfigurationOptOutResponse response = + * analyticsAdminServiceClient.fetchAutomatedGa4ConfigurationOptOut(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListExpandedDataSetsPagedResponse listExpandedDataSets( - ListExpandedDataSetsRequest request) { - return listExpandedDataSetsPagedCallable().call(request); + public final FetchAutomatedGa4ConfigurationOptOutResponse fetchAutomatedGa4ConfigurationOptOut( + FetchAutomatedGa4ConfigurationOptOutRequest request) { + return fetchAutomatedGa4ConfigurationOptOutCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ExpandedDataSets on a property. + * Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this + * has no effect on GA4 property. * *

Sample code: * @@ -12412,29 +12501,28 @@ public final ListExpandedDataSetsPagedResponse listExpandedDataSets( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListExpandedDataSetsRequest request = - * ListExpandedDataSetsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * FetchAutomatedGa4ConfigurationOptOutRequest request = + * FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() + * .setProperty("property-993141291") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listExpandedDataSetsPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .fetchAutomatedGa4ConfigurationOptOutCallable() + * .futureCall(request); * // Do something. - * for (ExpandedDataSet element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * FetchAutomatedGa4ConfigurationOptOutResponse response = future.get(); * } * } */ - public final UnaryCallable - listExpandedDataSetsPagedCallable() { - return stub.listExpandedDataSetsPagedCallable(); + public final UnaryCallable< + FetchAutomatedGa4ConfigurationOptOutRequest, FetchAutomatedGa4ConfigurationOptOutResponse> + fetchAutomatedGa4ConfigurationOptOutCallable() { + return stub.fetchAutomatedGa4ConfigurationOptOutCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ExpandedDataSets on a property. + * Lookup for a single BigQuery Link. * *

Sample code: * @@ -12446,36 +12534,25 @@ public final ListExpandedDataSetsPagedResponse listExpandedDataSets( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListExpandedDataSetsRequest request = - * ListExpandedDataSetsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListExpandedDataSetsResponse response = - * analyticsAdminServiceClient.listExpandedDataSetsCallable().call(request); - * for (ExpandedDataSet element : response.getExpandedDataSetsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); + * BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(name); * } * } + * + * @param name Required. The name of the BigQuery link to lookup. Format: + * properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: + * properties/123/bigQueryLinks/456 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listExpandedDataSetsCallable() { - return stub.listExpandedDataSetsCallable(); + public final BigQueryLink getBigQueryLink(BigQueryLinkName name) { + GetBigQueryLinkRequest request = + GetBigQueryLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBigQueryLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ExpandedDataSet. + * Lookup for a single BigQuery Link. * *

Sample code: * @@ -12487,30 +12564,24 @@ public final ListExpandedDataSetsPagedResponse listExpandedDataSets( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - * ExpandedDataSet response = - * analyticsAdminServiceClient.createExpandedDataSet(parent, expandedDataSet); + * String name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString(); + * BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(name); * } * } * - * @param parent Required. Example format: properties/1234 - * @param expandedDataSet Required. The ExpandedDataSet to create. + * @param name Required. The name of the BigQuery link to lookup. Format: + * properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: + * properties/123/bigQueryLinks/456 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet createExpandedDataSet( - PropertyName parent, ExpandedDataSet expandedDataSet) { - CreateExpandedDataSetRequest request = - CreateExpandedDataSetRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setExpandedDataSet(expandedDataSet) - .build(); - return createExpandedDataSet(request); + public final BigQueryLink getBigQueryLink(String name) { + GetBigQueryLinkRequest request = GetBigQueryLinkRequest.newBuilder().setName(name).build(); + return getBigQueryLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ExpandedDataSet. + * Lookup for a single BigQuery Link. * *

Sample code: * @@ -12522,30 +12593,24 @@ public final ExpandedDataSet createExpandedDataSet( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - * ExpandedDataSet response = - * analyticsAdminServiceClient.createExpandedDataSet(parent, expandedDataSet); + * GetBigQueryLinkRequest request = + * GetBigQueryLinkRequest.newBuilder() + * .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) + * .build(); + * BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(request); * } * } * - * @param parent Required. Example format: properties/1234 - * @param expandedDataSet Required. The ExpandedDataSet to create. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet createExpandedDataSet( - String parent, ExpandedDataSet expandedDataSet) { - CreateExpandedDataSetRequest request = - CreateExpandedDataSetRequest.newBuilder() - .setParent(parent) - .setExpandedDataSet(expandedDataSet) - .build(); - return createExpandedDataSet(request); + public final BigQueryLink getBigQueryLink(GetBigQueryLinkRequest request) { + return getBigQueryLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ExpandedDataSet. + * Lookup for a single BigQuery Link. * *

Sample code: * @@ -12557,25 +12622,24 @@ public final ExpandedDataSet createExpandedDataSet( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateExpandedDataSetRequest request = - * CreateExpandedDataSetRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) + * GetBigQueryLinkRequest request = + * GetBigQueryLinkRequest.newBuilder() + * .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) * .build(); - * ExpandedDataSet response = analyticsAdminServiceClient.createExpandedDataSet(request); + * ApiFuture future = + * analyticsAdminServiceClient.getBigQueryLinkCallable().futureCall(request); + * // Do something. + * BigQueryLink response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet createExpandedDataSet(CreateExpandedDataSetRequest request) { - return createExpandedDataSetCallable().call(request); + public final UnaryCallable getBigQueryLinkCallable() { + return stub.getBigQueryLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ExpandedDataSet. + * Lists BigQuery Links on a property. * *

Sample code: * @@ -12587,26 +12651,29 @@ public final ExpandedDataSet createExpandedDataSet(CreateExpandedDataSetRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateExpandedDataSetRequest request = - * CreateExpandedDataSetRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createExpandedDataSetCallable().futureCall(request); - * // Do something. - * ExpandedDataSet response = future.get(); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * for (BigQueryLink element : + * analyticsAdminServiceClient.listBigQueryLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } - */ - public final UnaryCallable - createExpandedDataSetCallable() { - return stub.createExpandedDataSetCallable(); + * + * @param parent Required. The name of the property to list BigQuery links under. Format: + * properties/{property_id} Example: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBigQueryLinksPagedResponse listBigQueryLinks(PropertyName parent) { + ListBigQueryLinksRequest request = + ListBigQueryLinksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBigQueryLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a ExpandedDataSet on a property. + * Lists BigQuery Links on a property. * *

Sample code: * @@ -12618,33 +12685,27 @@ public final ExpandedDataSet createExpandedDataSet(CreateExpandedDataSetRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * ExpandedDataSet response = - * analyticsAdminServiceClient.updateExpandedDataSet(expandedDataSet, updateMask); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (BigQueryLink element : + * analyticsAdminServiceClient.listBigQueryLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param expandedDataSet Required. The ExpandedDataSet to update. The resource's `name` field is - * used to identify the ExpandedDataSet to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param parent Required. The name of the property to list BigQuery links under. Format: + * properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet updateExpandedDataSet( - ExpandedDataSet expandedDataSet, FieldMask updateMask) { - UpdateExpandedDataSetRequest request = - UpdateExpandedDataSetRequest.newBuilder() - .setExpandedDataSet(expandedDataSet) - .setUpdateMask(updateMask) - .build(); - return updateExpandedDataSet(request); + public final ListBigQueryLinksPagedResponse listBigQueryLinks(String parent) { + ListBigQueryLinksRequest request = + ListBigQueryLinksRequest.newBuilder().setParent(parent).build(); + return listBigQueryLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a ExpandedDataSet on a property. + * Lists BigQuery Links on a property. * *

Sample code: * @@ -12656,25 +12717,29 @@ public final ExpandedDataSet updateExpandedDataSet( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateExpandedDataSetRequest request = - * UpdateExpandedDataSetRequest.newBuilder() - * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * ListBigQueryLinksRequest request = + * ListBigQueryLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ExpandedDataSet response = analyticsAdminServiceClient.updateExpandedDataSet(request); + * for (BigQueryLink element : + * analyticsAdminServiceClient.listBigQueryLinks(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ExpandedDataSet updateExpandedDataSet(UpdateExpandedDataSetRequest request) { - return updateExpandedDataSetCallable().call(request); + public final ListBigQueryLinksPagedResponse listBigQueryLinks(ListBigQueryLinksRequest request) { + return listBigQueryLinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a ExpandedDataSet on a property. + * Lists BigQuery Links on a property. * *

Sample code: * @@ -12686,26 +12751,29 @@ public final ExpandedDataSet updateExpandedDataSet(UpdateExpandedDataSetRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateExpandedDataSetRequest request = - * UpdateExpandedDataSetRequest.newBuilder() - * .setExpandedDataSet(ExpandedDataSet.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * ListBigQueryLinksRequest request = + * ListBigQueryLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateExpandedDataSetCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.listBigQueryLinksPagedCallable().futureCall(request); * // Do something. - * ExpandedDataSet response = future.get(); + * for (BigQueryLink element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } */ - public final UnaryCallable - updateExpandedDataSetCallable() { - return stub.updateExpandedDataSetCallable(); + public final UnaryCallable + listBigQueryLinksPagedCallable() { + return stub.listBigQueryLinksPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ExpandedDataSet on a property. + * Lists BigQuery Links on a property. * *

Sample code: * @@ -12717,25 +12785,37 @@ public final ExpandedDataSet updateExpandedDataSet(UpdateExpandedDataSetRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - * analyticsAdminServiceClient.deleteExpandedDataSet(name); + * ListBigQueryLinksRequest request = + * ListBigQueryLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListBigQueryLinksResponse response = + * analyticsAdminServiceClient.listBigQueryLinksCallable().call(request); + * for (BigQueryLink element : response.getBigqueryLinksList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } - * - * @param name Required. Example format: properties/1234/expandedDataSets/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteExpandedDataSet(ExpandedDataSetName name) { - DeleteExpandedDataSetRequest request = - DeleteExpandedDataSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteExpandedDataSet(request); + public final UnaryCallable + listBigQueryLinksCallable() { + return stub.listBigQueryLinksCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ExpandedDataSet on a property. + * Returns the enhanced measurement settings for this data stream. Note that the stream must + * enable enhanced measurement for these settings to take effect. * *

Sample code: * @@ -12747,23 +12827,31 @@ public final void deleteExpandedDataSet(ExpandedDataSetName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString(); - * analyticsAdminServiceClient.deleteExpandedDataSet(name); + * EnhancedMeasurementSettingsName name = + * EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.getEnhancedMeasurementSettings(name); * } * } * - * @param name Required. Example format: properties/1234/expandedDataSets/5678 + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: + * "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteExpandedDataSet(String name) { - DeleteExpandedDataSetRequest request = - DeleteExpandedDataSetRequest.newBuilder().setName(name).build(); - deleteExpandedDataSet(request); + public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( + EnhancedMeasurementSettingsName name) { + GetEnhancedMeasurementSettingsRequest request = + GetEnhancedMeasurementSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getEnhancedMeasurementSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ExpandedDataSet on a property. + * Returns the enhanced measurement settings for this data stream. Note that the stream must + * enable enhanced measurement for these settings to take effect. * *

Sample code: * @@ -12775,24 +12863,27 @@ public final void deleteExpandedDataSet(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteExpandedDataSetRequest request = - * DeleteExpandedDataSetRequest.newBuilder() - * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - * .build(); - * analyticsAdminServiceClient.deleteExpandedDataSet(request); + * String name = EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.getEnhancedMeasurementSettings(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: + * "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteExpandedDataSet(DeleteExpandedDataSetRequest request) { - deleteExpandedDataSetCallable().call(request); + public final EnhancedMeasurementSettings getEnhancedMeasurementSettings(String name) { + GetEnhancedMeasurementSettingsRequest request = + GetEnhancedMeasurementSettingsRequest.newBuilder().setName(name).build(); + return getEnhancedMeasurementSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ExpandedDataSet on a property. + * Returns the enhanced measurement settings for this data stream. Note that the stream must + * enable enhanced measurement for these settings to take effect. * *

Sample code: * @@ -12804,24 +12895,27 @@ public final void deleteExpandedDataSet(DeleteExpandedDataSetRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteExpandedDataSetRequest request = - * DeleteExpandedDataSetRequest.newBuilder() - * .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + * GetEnhancedMeasurementSettingsRequest request = + * GetEnhancedMeasurementSettingsRequest.newBuilder() + * .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteExpandedDataSetCallable().futureCall(request); - * // Do something. - * future.get(); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.getEnhancedMeasurementSettings(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable deleteExpandedDataSetCallable() { - return stub.deleteExpandedDataSetCallable(); + public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( + GetEnhancedMeasurementSettingsRequest request) { + return getEnhancedMeasurementSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ChannelGroup. + * Returns the enhanced measurement settings for this data stream. Note that the stream must + * enable enhanced measurement for these settings to take effect. * *

Sample code: * @@ -12833,24 +12927,26 @@ public final UnaryCallable deleteExpandedDa * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - * ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(name); + * GetEnhancedMeasurementSettingsRequest request = + * GetEnhancedMeasurementSettingsRequest.newBuilder() + * .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.getEnhancedMeasurementSettingsCallable().futureCall(request); + * // Do something. + * EnhancedMeasurementSettings response = future.get(); * } * } - * - * @param name Required. The ChannelGroup to get. Example format: - * properties/1234/channelGroups/5678 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup getChannelGroup(ChannelGroupName name) { - GetChannelGroupRequest request = - GetChannelGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getChannelGroup(request); + public final UnaryCallable + getEnhancedMeasurementSettingsCallable() { + return stub.getEnhancedMeasurementSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ChannelGroup. + * Updates the enhanced measurement settings for this data stream. Note that the stream must + * enable enhanced measurement for these settings to take effect. * *

Sample code: * @@ -12862,23 +12958,36 @@ public final ChannelGroup getChannelGroup(ChannelGroupName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString(); - * ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(name); + * EnhancedMeasurementSettings enhancedMeasurementSettings = + * EnhancedMeasurementSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.updateEnhancedMeasurementSettings( + * enhancedMeasurementSettings, updateMask); * } * } * - * @param name Required. The ChannelGroup to get. Example format: - * properties/1234/channelGroups/5678 + * @param enhancedMeasurementSettings Required. The settings to update. The `name` field is used + * to identify the settings to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup getChannelGroup(String name) { - GetChannelGroupRequest request = GetChannelGroupRequest.newBuilder().setName(name).build(); - return getChannelGroup(request); + public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( + EnhancedMeasurementSettings enhancedMeasurementSettings, FieldMask updateMask) { + UpdateEnhancedMeasurementSettingsRequest request = + UpdateEnhancedMeasurementSettingsRequest.newBuilder() + .setEnhancedMeasurementSettings(enhancedMeasurementSettings) + .setUpdateMask(updateMask) + .build(); + return updateEnhancedMeasurementSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ChannelGroup. + * Updates the enhanced measurement settings for this data stream. Note that the stream must + * enable enhanced measurement for these settings to take effect. * *

Sample code: * @@ -12890,24 +12999,28 @@ public final ChannelGroup getChannelGroup(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetChannelGroupRequest request = - * GetChannelGroupRequest.newBuilder() - * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + * UpdateEnhancedMeasurementSettingsRequest request = + * UpdateEnhancedMeasurementSettingsRequest.newBuilder() + * .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ChannelGroup response = analyticsAdminServiceClient.getChannelGroup(request); + * EnhancedMeasurementSettings response = + * analyticsAdminServiceClient.updateEnhancedMeasurementSettings(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup getChannelGroup(GetChannelGroupRequest request) { - return getChannelGroupCallable().call(request); + public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( + UpdateEnhancedMeasurementSettingsRequest request) { + return updateEnhancedMeasurementSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single ChannelGroup. + * Updates the enhanced measurement settings for this data stream. Note that the stream must + * enable enhanced measurement for these settings to take effect. * *

Sample code: * @@ -12919,24 +13032,29 @@ public final ChannelGroup getChannelGroup(GetChannelGroupRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetChannelGroupRequest request = - * GetChannelGroupRequest.newBuilder() - * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + * UpdateEnhancedMeasurementSettingsRequest request = + * UpdateEnhancedMeasurementSettingsRequest.newBuilder() + * .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getChannelGroupCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .updateEnhancedMeasurementSettingsCallable() + * .futureCall(request); * // Do something. - * ChannelGroup response = future.get(); + * EnhancedMeasurementSettings response = future.get(); * } * } */ - public final UnaryCallable getChannelGroupCallable() { - return stub.getChannelGroupCallable(); + public final UnaryCallable + updateEnhancedMeasurementSettingsCallable() { + return stub.updateEnhancedMeasurementSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ChannelGroups on a property. + * Creates a connected site tag for a Universal Analytics property. You can create a maximum of 20 + * connected site tags per property. Note: This API cannot be used on GA4 properties. * *

Sample code: * @@ -12948,29 +13066,28 @@ public final UnaryCallable getChannelGroup * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (ChannelGroup element : - * analyticsAdminServiceClient.listChannelGroups(parent).iterateAll()) { - * // doThingsWith(element); - * } + * CreateConnectedSiteTagRequest request = + * CreateConnectedSiteTagRequest.newBuilder() + * .setProperty("property-993141291") + * .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) + * .build(); + * CreateConnectedSiteTagResponse response = + * analyticsAdminServiceClient.createConnectedSiteTag(request); * } * } * - * @param parent Required. The property for which to list ChannelGroups. Example format: - * properties/1234 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListChannelGroupsPagedResponse listChannelGroups(PropertyName parent) { - ListChannelGroupsRequest request = - ListChannelGroupsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listChannelGroups(request); + public final CreateConnectedSiteTagResponse createConnectedSiteTag( + CreateConnectedSiteTagRequest request) { + return createConnectedSiteTagCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ChannelGroups on a property. + * Creates a connected site tag for a Universal Analytics property. You can create a maximum of 20 + * connected site tags per property. Note: This API cannot be used on GA4 properties. * *

Sample code: * @@ -12982,27 +13099,27 @@ public final ListChannelGroupsPagedResponse listChannelGroups(PropertyName paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (ChannelGroup element : - * analyticsAdminServiceClient.listChannelGroups(parent).iterateAll()) { - * // doThingsWith(element); - * } + * CreateConnectedSiteTagRequest request = + * CreateConnectedSiteTagRequest.newBuilder() + * .setProperty("property-993141291") + * .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) + * .build(); + * ApiFuture future = + * analyticsAdminServiceClient.createConnectedSiteTagCallable().futureCall(request); + * // Do something. + * CreateConnectedSiteTagResponse response = future.get(); * } * } - * - * @param parent Required. The property for which to list ChannelGroups. Example format: - * properties/1234 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListChannelGroupsPagedResponse listChannelGroups(String parent) { - ListChannelGroupsRequest request = - ListChannelGroupsRequest.newBuilder().setParent(parent).build(); - return listChannelGroups(request); + public final UnaryCallable + createConnectedSiteTagCallable() { + return stub.createConnectedSiteTagCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ChannelGroups on a property. + * Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on + * GA4 properties. * *

Sample code: * @@ -13014,29 +13131,26 @@ public final ListChannelGroupsPagedResponse listChannelGroups(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListChannelGroupsRequest request = - * ListChannelGroupsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * DeleteConnectedSiteTagRequest request = + * DeleteConnectedSiteTagRequest.newBuilder() + * .setProperty("property-993141291") + * .setTagId("tagId110119509") * .build(); - * for (ChannelGroup element : - * analyticsAdminServiceClient.listChannelGroups(request).iterateAll()) { - * // doThingsWith(element); - * } + * analyticsAdminServiceClient.deleteConnectedSiteTag(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListChannelGroupsPagedResponse listChannelGroups(ListChannelGroupsRequest request) { - return listChannelGroupsPagedCallable().call(request); + public final void deleteConnectedSiteTag(DeleteConnectedSiteTagRequest request) { + deleteConnectedSiteTagCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ChannelGroups on a property. + * Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on + * GA4 properties. * *

Sample code: * @@ -13048,29 +13162,27 @@ public final ListChannelGroupsPagedResponse listChannelGroups(ListChannelGroupsR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListChannelGroupsRequest request = - * ListChannelGroupsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * DeleteConnectedSiteTagRequest request = + * DeleteConnectedSiteTagRequest.newBuilder() + * .setProperty("property-993141291") + * .setTagId("tagId110119509") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listChannelGroupsPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteConnectedSiteTagCallable().futureCall(request); * // Do something. - * for (ChannelGroup element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * future.get(); * } * } */ - public final UnaryCallable - listChannelGroupsPagedCallable() { - return stub.listChannelGroupsPagedCallable(); + public final UnaryCallable + deleteConnectedSiteTagCallable() { + return stub.deleteConnectedSiteTagCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists ChannelGroups on a property. + * Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected + * site tags will be returned. Note: this has no effect on GA4 property. * *

Sample code: * @@ -13082,36 +13194,25 @@ public final ListChannelGroupsPagedResponse listChannelGroups(ListChannelGroupsR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListChannelGroupsRequest request = - * ListChannelGroupsRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListChannelGroupsResponse response = - * analyticsAdminServiceClient.listChannelGroupsCallable().call(request); - * for (ChannelGroup element : response.getChannelGroupsList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } + * ListConnectedSiteTagsRequest request = + * ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); + * ListConnectedSiteTagsResponse response = + * analyticsAdminServiceClient.listConnectedSiteTags(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listChannelGroupsCallable() { - return stub.listChannelGroupsCallable(); + public final ListConnectedSiteTagsResponse listConnectedSiteTags( + ListConnectedSiteTagsRequest request) { + return listConnectedSiteTagsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ChannelGroup. + * Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected + * site tags will be returned. Note: this has no effect on GA4 property. * *

Sample code: * @@ -13123,29 +13224,24 @@ public final ListChannelGroupsPagedResponse listChannelGroups(ListChannelGroupsR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - * ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(parent, channelGroup); + * ListConnectedSiteTagsRequest request = + * ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); + * ApiFuture future = + * analyticsAdminServiceClient.listConnectedSiteTagsCallable().futureCall(request); + * // Do something. + * ListConnectedSiteTagsResponse response = future.get(); * } * } - * - * @param parent Required. The property for which to create a ChannelGroup. Example format: - * properties/1234 - * @param channelGroup Required. The ChannelGroup to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup createChannelGroup(PropertyName parent, ChannelGroup channelGroup) { - CreateChannelGroupRequest request = - CreateChannelGroupRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setChannelGroup(channelGroup) - .build(); - return createChannelGroup(request); + public final UnaryCallable + listConnectedSiteTagsCallable() { + return stub.listConnectedSiteTagsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ChannelGroup. + * Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be + * used with GA4 properties. * *

Sample code: * @@ -13157,29 +13253,27 @@ public final ChannelGroup createChannelGroup(PropertyName parent, ChannelGroup c * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - * ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(parent, channelGroup); + * FetchConnectedGa4PropertyRequest request = + * FetchConnectedGa4PropertyRequest.newBuilder() + * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * .build(); + * FetchConnectedGa4PropertyResponse response = + * analyticsAdminServiceClient.fetchConnectedGa4Property(request); * } * } * - * @param parent Required. The property for which to create a ChannelGroup. Example format: - * properties/1234 - * @param channelGroup Required. The ChannelGroup to create. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup createChannelGroup(String parent, ChannelGroup channelGroup) { - CreateChannelGroupRequest request = - CreateChannelGroupRequest.newBuilder() - .setParent(parent) - .setChannelGroup(channelGroup) - .build(); - return createChannelGroup(request); + public final FetchConnectedGa4PropertyResponse fetchConnectedGa4Property( + FetchConnectedGa4PropertyRequest request) { + return fetchConnectedGa4PropertyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ChannelGroup. + * Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be + * used with GA4 properties. * *

Sample code: * @@ -13191,25 +13285,25 @@ public final ChannelGroup createChannelGroup(String parent, ChannelGroup channel * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateChannelGroupRequest request = - * CreateChannelGroupRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setChannelGroup(ChannelGroup.newBuilder().build()) + * FetchConnectedGa4PropertyRequest request = + * FetchConnectedGa4PropertyRequest.newBuilder() + * .setProperty(PropertyName.of("[PROPERTY]").toString()) * .build(); - * ChannelGroup response = analyticsAdminServiceClient.createChannelGroup(request); + * ApiFuture future = + * analyticsAdminServiceClient.fetchConnectedGa4PropertyCallable().futureCall(request); + * // Do something. + * FetchConnectedGa4PropertyResponse response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup createChannelGroup(CreateChannelGroupRequest request) { - return createChannelGroupCallable().call(request); + public final UnaryCallable + fetchConnectedGa4PropertyCallable() { + return stub.fetchConnectedGa4PropertyCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a ChannelGroup. + * Looks up a single AdSenseLink. * *

Sample code: * @@ -13221,25 +13315,24 @@ public final ChannelGroup createChannelGroup(CreateChannelGroupRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateChannelGroupRequest request = - * CreateChannelGroupRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setChannelGroup(ChannelGroup.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createChannelGroupCallable().futureCall(request); - * // Do something. - * ChannelGroup response = future.get(); + * AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + * AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(name); * } * } - */ - public final UnaryCallable createChannelGroupCallable() { - return stub.createChannelGroupCallable(); + * + * @param name Required. Unique identifier for the AdSense Link requested. Format: + * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AdSenseLink getAdSenseLink(AdSenseLinkName name) { + GetAdSenseLinkRequest request = + GetAdSenseLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAdSenseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a ChannelGroup. + * Looks up a single AdSenseLink. * *

Sample code: * @@ -13251,32 +13344,23 @@ public final UnaryCallable createChanne * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * ChannelGroup response = - * analyticsAdminServiceClient.updateChannelGroup(channelGroup, updateMask); + * String name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString(); + * AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(name); * } * } * - * @param channelGroup Required. The ChannelGroup to update. The resource's `name` field is used - * to identify the ChannelGroup to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param name Required. Unique identifier for the AdSense Link requested. Format: + * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup updateChannelGroup(ChannelGroup channelGroup, FieldMask updateMask) { - UpdateChannelGroupRequest request = - UpdateChannelGroupRequest.newBuilder() - .setChannelGroup(channelGroup) - .setUpdateMask(updateMask) - .build(); - return updateChannelGroup(request); + public final AdSenseLink getAdSenseLink(String name) { + GetAdSenseLinkRequest request = GetAdSenseLinkRequest.newBuilder().setName(name).build(); + return getAdSenseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a ChannelGroup. + * Looks up a single AdSenseLink. * *

Sample code: * @@ -13288,25 +13372,24 @@ public final ChannelGroup updateChannelGroup(ChannelGroup channelGroup, FieldMas * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateChannelGroupRequest request = - * UpdateChannelGroupRequest.newBuilder() - * .setChannelGroup(ChannelGroup.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * GetAdSenseLinkRequest request = + * GetAdSenseLinkRequest.newBuilder() + * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) * .build(); - * ChannelGroup response = analyticsAdminServiceClient.updateChannelGroup(request); + * AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ChannelGroup updateChannelGroup(UpdateChannelGroupRequest request) { - return updateChannelGroupCallable().call(request); + public final AdSenseLink getAdSenseLink(GetAdSenseLinkRequest request) { + return getAdSenseLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a ChannelGroup. + * Looks up a single AdSenseLink. * *

Sample code: * @@ -13318,25 +13401,24 @@ public final ChannelGroup updateChannelGroup(UpdateChannelGroupRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateChannelGroupRequest request = - * UpdateChannelGroupRequest.newBuilder() - * .setChannelGroup(ChannelGroup.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * GetAdSenseLinkRequest request = + * GetAdSenseLinkRequest.newBuilder() + * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateChannelGroupCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getAdSenseLinkCallable().futureCall(request); * // Do something. - * ChannelGroup response = future.get(); + * AdSenseLink response = future.get(); * } * } */ - public final UnaryCallable updateChannelGroupCallable() { - return stub.updateChannelGroupCallable(); + public final UnaryCallable getAdSenseLinkCallable() { + return stub.getAdSenseLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ChannelGroup on a property. + * Creates an AdSenseLink. * *

Sample code: * @@ -13348,26 +13430,29 @@ public final UnaryCallable updateChanne * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - * analyticsAdminServiceClient.deleteChannelGroup(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + * AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(parent, adsenseLink); * } * } * - * @param name Required. The ChannelGroup to delete. Example format: - * properties/1234/channelGroups/5678 + * @param parent Required. The property for which to create an AdSense Link. Format: + * properties/{propertyId} Example: properties/1234 + * @param adsenseLink Required. The AdSense Link to create * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteChannelGroup(ChannelGroupName name) { - DeleteChannelGroupRequest request = - DeleteChannelGroupRequest.newBuilder() - .setName(name == null ? null : name.toString()) + public final AdSenseLink createAdSenseLink(PropertyName parent, AdSenseLink adsenseLink) { + CreateAdSenseLinkRequest request = + CreateAdSenseLinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAdsenseLink(adsenseLink) .build(); - deleteChannelGroup(request); + return createAdSenseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ChannelGroup on a property. + * Creates an AdSenseLink. * *

Sample code: * @@ -13379,24 +13464,26 @@ public final void deleteChannelGroup(ChannelGroupName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString(); - * analyticsAdminServiceClient.deleteChannelGroup(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + * AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(parent, adsenseLink); * } * } * - * @param name Required. The ChannelGroup to delete. Example format: - * properties/1234/channelGroups/5678 + * @param parent Required. The property for which to create an AdSense Link. Format: + * properties/{propertyId} Example: properties/1234 + * @param adsenseLink Required. The AdSense Link to create * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteChannelGroup(String name) { - DeleteChannelGroupRequest request = - DeleteChannelGroupRequest.newBuilder().setName(name).build(); - deleteChannelGroup(request); + public final AdSenseLink createAdSenseLink(String parent, AdSenseLink adsenseLink) { + CreateAdSenseLinkRequest request = + CreateAdSenseLinkRequest.newBuilder().setParent(parent).setAdsenseLink(adsenseLink).build(); + return createAdSenseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ChannelGroup on a property. + * Creates an AdSenseLink. * *

Sample code: * @@ -13408,24 +13495,25 @@ public final void deleteChannelGroup(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteChannelGroupRequest request = - * DeleteChannelGroupRequest.newBuilder() - * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + * CreateAdSenseLinkRequest request = + * CreateAdSenseLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setAdsenseLink(AdSenseLink.newBuilder().build()) * .build(); - * analyticsAdminServiceClient.deleteChannelGroup(request); + * AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteChannelGroup(DeleteChannelGroupRequest request) { - deleteChannelGroupCallable().call(request); + public final AdSenseLink createAdSenseLink(CreateAdSenseLinkRequest request) { + return createAdSenseLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a ChannelGroup on a property. + * Creates an AdSenseLink. * *

Sample code: * @@ -13437,25 +13525,25 @@ public final void deleteChannelGroup(DeleteChannelGroupRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteChannelGroupRequest request = - * DeleteChannelGroupRequest.newBuilder() - * .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + * CreateAdSenseLinkRequest request = + * CreateAdSenseLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setAdsenseLink(AdSenseLink.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteChannelGroupCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createAdSenseLinkCallable().futureCall(request); * // Do something. - * future.get(); + * AdSenseLink response = future.get(); * } * } */ - public final UnaryCallable deleteChannelGroupCallable() { - return stub.deleteChannelGroupCallable(); + public final UnaryCallable createAdSenseLinkCallable() { + return stub.createAdSenseLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has - * no effect on GA4 property. + * Deletes an AdSenseLink. * *

Sample code: * @@ -13467,28 +13555,26 @@ public final UnaryCallable deleteChannelGroupC * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SetAutomatedGa4ConfigurationOptOutRequest request = - * SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() - * .setProperty("property-993141291") - * .setOptOut(true) - * .build(); - * SetAutomatedGa4ConfigurationOptOutResponse response = - * analyticsAdminServiceClient.setAutomatedGa4ConfigurationOptOut(request); + * AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + * analyticsAdminServiceClient.deleteAdSenseLink(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Unique identifier for the AdSense Link to be deleted. Format: + * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SetAutomatedGa4ConfigurationOptOutResponse setAutomatedGa4ConfigurationOptOut( - SetAutomatedGa4ConfigurationOptOutRequest request) { - return setAutomatedGa4ConfigurationOptOutCallable().call(request); + public final void deleteAdSenseLink(AdSenseLinkName name) { + DeleteAdSenseLinkRequest request = + DeleteAdSenseLinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteAdSenseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has - * no effect on GA4 property. + * Deletes an AdSenseLink. * *

Sample code: * @@ -13500,30 +13586,23 @@ public final SetAutomatedGa4ConfigurationOptOutResponse setAutomatedGa4Configura * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * SetAutomatedGa4ConfigurationOptOutRequest request = - * SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() - * .setProperty("property-993141291") - * .setOptOut(true) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .setAutomatedGa4ConfigurationOptOutCallable() - * .futureCall(request); - * // Do something. - * SetAutomatedGa4ConfigurationOptOutResponse response = future.get(); + * String name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString(); + * analyticsAdminServiceClient.deleteAdSenseLink(name); * } * } + * + * @param name Required. Unique identifier for the AdSense Link to be deleted. Format: + * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - SetAutomatedGa4ConfigurationOptOutRequest, SetAutomatedGa4ConfigurationOptOutResponse> - setAutomatedGa4ConfigurationOptOutCallable() { - return stub.setAutomatedGa4ConfigurationOptOutCallable(); + public final void deleteAdSenseLink(String name) { + DeleteAdSenseLinkRequest request = DeleteAdSenseLinkRequest.newBuilder().setName(name).build(); + deleteAdSenseLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this - * has no effect on GA4 property. + * Deletes an AdSenseLink. * *

Sample code: * @@ -13535,27 +13614,24 @@ public final SetAutomatedGa4ConfigurationOptOutResponse setAutomatedGa4Configura * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * FetchAutomatedGa4ConfigurationOptOutRequest request = - * FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() - * .setProperty("property-993141291") + * DeleteAdSenseLinkRequest request = + * DeleteAdSenseLinkRequest.newBuilder() + * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) * .build(); - * FetchAutomatedGa4ConfigurationOptOutResponse response = - * analyticsAdminServiceClient.fetchAutomatedGa4ConfigurationOptOut(request); + * analyticsAdminServiceClient.deleteAdSenseLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final FetchAutomatedGa4ConfigurationOptOutResponse fetchAutomatedGa4ConfigurationOptOut( - FetchAutomatedGa4ConfigurationOptOutRequest request) { - return fetchAutomatedGa4ConfigurationOptOutCallable().call(request); + public final void deleteAdSenseLink(DeleteAdSenseLinkRequest request) { + deleteAdSenseLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this - * has no effect on GA4 property. + * Deletes an AdSenseLink. * *

Sample code: * @@ -13567,28 +13643,58 @@ public final FetchAutomatedGa4ConfigurationOptOutResponse fetchAutomatedGa4Confi * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * FetchAutomatedGa4ConfigurationOptOutRequest request = - * FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() - * .setProperty("property-993141291") + * DeleteAdSenseLinkRequest request = + * DeleteAdSenseLinkRequest.newBuilder() + * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .fetchAutomatedGa4ConfigurationOptOutCallable() - * .futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteAdSenseLinkCallable().futureCall(request); * // Do something. - * FetchAutomatedGa4ConfigurationOptOutResponse response = future.get(); + * future.get(); + * } + * } + */ + public final UnaryCallable deleteAdSenseLinkCallable() { + return stub.deleteAdSenseLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AdSenseLinks on a property. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (AdSenseLink element :
+   *       analyticsAdminServiceClient.listAdSenseLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * }
+ * + * @param parent Required. Resource name of the parent property. Format: properties/{propertyId} + * Example: properties/1234 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable< - FetchAutomatedGa4ConfigurationOptOutRequest, FetchAutomatedGa4ConfigurationOptOutResponse> - fetchAutomatedGa4ConfigurationOptOutCallable() { - return stub.fetchAutomatedGa4ConfigurationOptOutCallable(); + public final ListAdSenseLinksPagedResponse listAdSenseLinks(PropertyName parent) { + ListAdSenseLinksRequest request = + ListAdSenseLinksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAdSenseLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single BigQuery Link. + * Lists AdSenseLinks on a property. * *

Sample code: * @@ -13600,25 +13706,27 @@ public final FetchAutomatedGa4ConfigurationOptOutResponse fetchAutomatedGa4Confi * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); - * BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * for (AdSenseLink element : + * analyticsAdminServiceClient.listAdSenseLinks(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. The name of the BigQuery link to lookup. Format: - * properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: - * properties/123/bigQueryLinks/456 + * @param parent Required. Resource name of the parent property. Format: properties/{propertyId} + * Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BigQueryLink getBigQueryLink(BigQueryLinkName name) { - GetBigQueryLinkRequest request = - GetBigQueryLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getBigQueryLink(request); + public final ListAdSenseLinksPagedResponse listAdSenseLinks(String parent) { + ListAdSenseLinksRequest request = + ListAdSenseLinksRequest.newBuilder().setParent(parent).build(); + return listAdSenseLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single BigQuery Link. + * Lists AdSenseLinks on a property. * *

Sample code: * @@ -13630,24 +13738,29 @@ public final BigQueryLink getBigQueryLink(BigQueryLinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString(); - * BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(name); + * ListAdSenseLinksRequest request = + * ListAdSenseLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (AdSenseLink element : + * analyticsAdminServiceClient.listAdSenseLinks(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. The name of the BigQuery link to lookup. Format: - * properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: - * properties/123/bigQueryLinks/456 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BigQueryLink getBigQueryLink(String name) { - GetBigQueryLinkRequest request = GetBigQueryLinkRequest.newBuilder().setName(name).build(); - return getBigQueryLink(request); + public final ListAdSenseLinksPagedResponse listAdSenseLinks(ListAdSenseLinksRequest request) { + return listAdSenseLinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single BigQuery Link. + * Lists AdSenseLinks on a property. * *

Sample code: * @@ -13659,24 +13772,29 @@ public final BigQueryLink getBigQueryLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetBigQueryLinkRequest request = - * GetBigQueryLinkRequest.newBuilder() - * .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) + * ListAdSenseLinksRequest request = + * ListAdSenseLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * BigQueryLink response = analyticsAdminServiceClient.getBigQueryLink(request); + * ApiFuture future = + * analyticsAdminServiceClient.listAdSenseLinksPagedCallable().futureCall(request); + * // Do something. + * for (AdSenseLink element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BigQueryLink getBigQueryLink(GetBigQueryLinkRequest request) { - return getBigQueryLinkCallable().call(request); + public final UnaryCallable + listAdSenseLinksPagedCallable() { + return stub.listAdSenseLinksPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single BigQuery Link. + * Lists AdSenseLinks on a property. * *

Sample code: * @@ -13688,24 +13806,36 @@ public final BigQueryLink getBigQueryLink(GetBigQueryLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetBigQueryLinkRequest request = - * GetBigQueryLinkRequest.newBuilder() - * .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) + * ListAdSenseLinksRequest request = + * ListAdSenseLinksRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getBigQueryLinkCallable().futureCall(request); - * // Do something. - * BigQueryLink response = future.get(); + * while (true) { + * ListAdSenseLinksResponse response = + * analyticsAdminServiceClient.listAdSenseLinksCallable().call(request); + * for (AdSenseLink element : response.getAdsenseLinksList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } */ - public final UnaryCallable getBigQueryLinkCallable() { - return stub.getBigQueryLinkCallable(); + public final UnaryCallable + listAdSenseLinksCallable() { + return stub.listAdSenseLinksCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists BigQuery Links on a property. + * Lookup for a single EventCreateRule. * *

Sample code: * @@ -13717,29 +13847,27 @@ public final UnaryCallable getBigQueryLink * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (BigQueryLink element : - * analyticsAdminServiceClient.listBigQueryLinks(parent).iterateAll()) { - * // doThingsWith(element); - * } + * EventCreateRuleName name = + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + * EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(name); * } * } * - * @param parent Required. The name of the property to list BigQuery links under. Format: - * properties/{property_id} Example: properties/1234 + * @param name Required. The name of the EventCreateRule to get. Example format: + * properties/123/dataStreams/456/eventCreateRules/789 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListBigQueryLinksPagedResponse listBigQueryLinks(PropertyName parent) { - ListBigQueryLinksRequest request = - ListBigQueryLinksRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) + public final EventCreateRule getEventCreateRule(EventCreateRuleName name) { + GetEventCreateRuleRequest request = + GetEventCreateRuleRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return listBigQueryLinks(request); + return getEventCreateRule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists BigQuery Links on a property. + * Lookup for a single EventCreateRule. * *

Sample code: * @@ -13751,27 +13879,25 @@ public final ListBigQueryLinksPagedResponse listBigQueryLinks(PropertyName paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (BigQueryLink element : - * analyticsAdminServiceClient.listBigQueryLinks(parent).iterateAll()) { - * // doThingsWith(element); - * } + * String name = + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]").toString(); + * EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(name); * } * } * - * @param parent Required. The name of the property to list BigQuery links under. Format: - * properties/{property_id} Example: properties/1234 + * @param name Required. The name of the EventCreateRule to get. Example format: + * properties/123/dataStreams/456/eventCreateRules/789 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListBigQueryLinksPagedResponse listBigQueryLinks(String parent) { - ListBigQueryLinksRequest request = - ListBigQueryLinksRequest.newBuilder().setParent(parent).build(); - return listBigQueryLinks(request); + public final EventCreateRule getEventCreateRule(String name) { + GetEventCreateRuleRequest request = + GetEventCreateRuleRequest.newBuilder().setName(name).build(); + return getEventCreateRule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists BigQuery Links on a property. + * Lookup for a single EventCreateRule. * *

Sample code: * @@ -13783,29 +13909,26 @@ public final ListBigQueryLinksPagedResponse listBigQueryLinks(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListBigQueryLinksRequest request = - * ListBigQueryLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * GetEventCreateRuleRequest request = + * GetEventCreateRuleRequest.newBuilder() + * .setName( + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + * .toString()) * .build(); - * for (BigQueryLink element : - * analyticsAdminServiceClient.listBigQueryLinks(request).iterateAll()) { - * // doThingsWith(element); - * } + * EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListBigQueryLinksPagedResponse listBigQueryLinks(ListBigQueryLinksRequest request) { - return listBigQueryLinksPagedCallable().call(request); + public final EventCreateRule getEventCreateRule(GetEventCreateRuleRequest request) { + return getEventCreateRuleCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists BigQuery Links on a property. + * Lookup for a single EventCreateRule. * *

Sample code: * @@ -13817,29 +13940,27 @@ public final ListBigQueryLinksPagedResponse listBigQueryLinks(ListBigQueryLinksR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListBigQueryLinksRequest request = - * ListBigQueryLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * GetEventCreateRuleRequest request = + * GetEventCreateRuleRequest.newBuilder() + * .setName( + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listBigQueryLinksPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getEventCreateRuleCallable().futureCall(request); * // Do something. - * for (BigQueryLink element : future.get().iterateAll()) { - * // doThingsWith(element); - * } + * EventCreateRule response = future.get(); * } * } */ - public final UnaryCallable - listBigQueryLinksPagedCallable() { - return stub.listBigQueryLinksPagedCallable(); + public final UnaryCallable + getEventCreateRuleCallable() { + return stub.getEventCreateRuleCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists BigQuery Links on a property. + * Lists EventCreateRules on a web data stream. * *

Sample code: * @@ -13851,37 +13972,28 @@ public final ListBigQueryLinksPagedResponse listBigQueryLinks(ListBigQueryLinksR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListBigQueryLinksRequest request = - * ListBigQueryLinksRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .build(); - * while (true) { - * ListBigQueryLinksResponse response = - * analyticsAdminServiceClient.listBigQueryLinksCallable().call(request); - * for (BigQueryLink element : response.getBigqueryLinksList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } + * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + * for (EventCreateRule element : + * analyticsAdminServiceClient.listEventCreateRules(parent).iterateAll()) { + * // doThingsWith(element); * } * } * } + * + * @param parent Required. Example format: properties/123/dataStreams/456 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listBigQueryLinksCallable() { - return stub.listBigQueryLinksCallable(); + public final ListEventCreateRulesPagedResponse listEventCreateRules(DataStreamName parent) { + ListEventCreateRulesRequest request = + ListEventCreateRulesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listEventCreateRules(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the enhanced measurement settings for this data stream. Note that the stream must - * enable enhanced measurement for these settings to take effect. + * Lists EventCreateRules on a web data stream. * *

Sample code: * @@ -13893,31 +14005,26 @@ public final ListBigQueryLinksPagedResponse listBigQueryLinks(ListBigQueryLinksR * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * EnhancedMeasurementSettingsName name = - * EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); - * EnhancedMeasurementSettings response = - * analyticsAdminServiceClient.getEnhancedMeasurementSettings(name); + * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * for (EventCreateRule element : + * analyticsAdminServiceClient.listEventCreateRules(parent).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. The name of the settings to lookup. Format: - * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: - * "properties/1000/dataStreams/2000/enhancedMeasurementSettings" + * @param parent Required. Example format: properties/123/dataStreams/456 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( - EnhancedMeasurementSettingsName name) { - GetEnhancedMeasurementSettingsRequest request = - GetEnhancedMeasurementSettingsRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getEnhancedMeasurementSettings(request); + public final ListEventCreateRulesPagedResponse listEventCreateRules(String parent) { + ListEventCreateRulesRequest request = + ListEventCreateRulesRequest.newBuilder().setParent(parent).build(); + return listEventCreateRules(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the enhanced measurement settings for this data stream. Note that the stream must - * enable enhanced measurement for these settings to take effect. + * Lists EventCreateRules on a web data stream. * *

Sample code: * @@ -13929,27 +14036,30 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * EnhancedMeasurementSettings response = - * analyticsAdminServiceClient.getEnhancedMeasurementSettings(name); + * ListEventCreateRulesRequest request = + * ListEventCreateRulesRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (EventCreateRule element : + * analyticsAdminServiceClient.listEventCreateRules(request).iterateAll()) { + * // doThingsWith(element); + * } * } * } * - * @param name Required. The name of the settings to lookup. Format: - * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: - * "properties/1000/dataStreams/2000/enhancedMeasurementSettings" + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EnhancedMeasurementSettings getEnhancedMeasurementSettings(String name) { - GetEnhancedMeasurementSettingsRequest request = - GetEnhancedMeasurementSettingsRequest.newBuilder().setName(name).build(); - return getEnhancedMeasurementSettings(request); + public final ListEventCreateRulesPagedResponse listEventCreateRules( + ListEventCreateRulesRequest request) { + return listEventCreateRulesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the enhanced measurement settings for this data stream. Note that the stream must - * enable enhanced measurement for these settings to take effect. + * Lists EventCreateRules on a web data stream. * *

Sample code: * @@ -13961,27 +14071,29 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings(String n * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetEnhancedMeasurementSettingsRequest request = - * GetEnhancedMeasurementSettingsRequest.newBuilder() - * .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * ListEventCreateRulesRequest request = + * ListEventCreateRulesRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * EnhancedMeasurementSettings response = - * analyticsAdminServiceClient.getEnhancedMeasurementSettings(request); + * ApiFuture future = + * analyticsAdminServiceClient.listEventCreateRulesPagedCallable().futureCall(request); + * // Do something. + * for (EventCreateRule element : future.get().iterateAll()) { + * // doThingsWith(element); + * } * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( - GetEnhancedMeasurementSettingsRequest request) { - return getEnhancedMeasurementSettingsCallable().call(request); + public final UnaryCallable + listEventCreateRulesPagedCallable() { + return stub.listEventCreateRulesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the enhanced measurement settings for this data stream. Note that the stream must - * enable enhanced measurement for these settings to take effect. + * Lists EventCreateRules on a web data stream. * *

Sample code: * @@ -13993,26 +14105,36 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetEnhancedMeasurementSettingsRequest request = - * GetEnhancedMeasurementSettingsRequest.newBuilder() - * .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * ListEventCreateRulesRequest request = + * ListEventCreateRulesRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getEnhancedMeasurementSettingsCallable().futureCall(request); - * // Do something. - * EnhancedMeasurementSettings response = future.get(); + * while (true) { + * ListEventCreateRulesResponse response = + * analyticsAdminServiceClient.listEventCreateRulesCallable().call(request); + * for (EventCreateRule element : response.getEventCreateRulesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } * } * } */ - public final UnaryCallable - getEnhancedMeasurementSettingsCallable() { - return stub.getEnhancedMeasurementSettingsCallable(); + public final UnaryCallable + listEventCreateRulesCallable() { + return stub.listEventCreateRulesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the enhanced measurement settings for this data stream. Note that the stream must - * enable enhanced measurement for these settings to take effect. + * Creates an EventCreateRule. * *

Sample code: * @@ -14024,36 +14146,30 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * EnhancedMeasurementSettings enhancedMeasurementSettings = - * EnhancedMeasurementSettings.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * EnhancedMeasurementSettings response = - * analyticsAdminServiceClient.updateEnhancedMeasurementSettings( - * enhancedMeasurementSettings, updateMask); + * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + * EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + * EventCreateRule response = + * analyticsAdminServiceClient.createEventCreateRule(parent, eventCreateRule); * } * } * - * @param enhancedMeasurementSettings Required. The settings to update. The `name` field is used - * to identify the settings to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param parent Required. Example format: properties/123/dataStreams/456 + * @param eventCreateRule Required. The EventCreateRule to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( - EnhancedMeasurementSettings enhancedMeasurementSettings, FieldMask updateMask) { - UpdateEnhancedMeasurementSettingsRequest request = - UpdateEnhancedMeasurementSettingsRequest.newBuilder() - .setEnhancedMeasurementSettings(enhancedMeasurementSettings) - .setUpdateMask(updateMask) + public final EventCreateRule createEventCreateRule( + DataStreamName parent, EventCreateRule eventCreateRule) { + CreateEventCreateRuleRequest request = + CreateEventCreateRuleRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEventCreateRule(eventCreateRule) .build(); - return updateEnhancedMeasurementSettings(request); + return createEventCreateRule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the enhanced measurement settings for this data stream. Note that the stream must - * enable enhanced measurement for these settings to take effect. + * Creates an EventCreateRule. * *

Sample code: * @@ -14065,28 +14181,30 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateEnhancedMeasurementSettingsRequest request = - * UpdateEnhancedMeasurementSettingsRequest.newBuilder() - * .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) - * .build(); - * EnhancedMeasurementSettings response = - * analyticsAdminServiceClient.updateEnhancedMeasurementSettings(request); + * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + * EventCreateRule response = + * analyticsAdminServiceClient.createEventCreateRule(parent, eventCreateRule); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. Example format: properties/123/dataStreams/456 + * @param eventCreateRule Required. The EventCreateRule to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( - UpdateEnhancedMeasurementSettingsRequest request) { - return updateEnhancedMeasurementSettingsCallable().call(request); + public final EventCreateRule createEventCreateRule( + String parent, EventCreateRule eventCreateRule) { + CreateEventCreateRuleRequest request = + CreateEventCreateRuleRequest.newBuilder() + .setParent(parent) + .setEventCreateRule(eventCreateRule) + .build(); + return createEventCreateRule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the enhanced measurement settings for this data stream. Note that the stream must - * enable enhanced measurement for these settings to take effect. + * Creates an EventCreateRule. * *

Sample code: * @@ -14098,29 +14216,25 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateEnhancedMeasurementSettingsRequest request = - * UpdateEnhancedMeasurementSettingsRequest.newBuilder() - * .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * CreateEventCreateRuleRequest request = + * CreateEventCreateRuleRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setEventCreateRule(EventCreateRule.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient - * .updateEnhancedMeasurementSettingsCallable() - * .futureCall(request); - * // Do something. - * EnhancedMeasurementSettings response = future.get(); + * EventCreateRule response = analyticsAdminServiceClient.createEventCreateRule(request); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - updateEnhancedMeasurementSettingsCallable() { - return stub.updateEnhancedMeasurementSettingsCallable(); + public final EventCreateRule createEventCreateRule(CreateEventCreateRuleRequest request) { + return createEventCreateRuleCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a connected site tag for a Universal Analytics property. You can create a maximum of 20 - * connected site tags per property. Note: This API cannot be used on GA4 properties. + * Creates an EventCreateRule. * *

Sample code: * @@ -14132,28 +14246,26 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateConnectedSiteTagRequest request = - * CreateConnectedSiteTagRequest.newBuilder() - * .setProperty("property-993141291") - * .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) + * CreateEventCreateRuleRequest request = + * CreateEventCreateRuleRequest.newBuilder() + * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .setEventCreateRule(EventCreateRule.newBuilder().build()) * .build(); - * CreateConnectedSiteTagResponse response = - * analyticsAdminServiceClient.createConnectedSiteTag(request); + * ApiFuture future = + * analyticsAdminServiceClient.createEventCreateRuleCallable().futureCall(request); + * // Do something. + * EventCreateRule response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CreateConnectedSiteTagResponse createConnectedSiteTag( - CreateConnectedSiteTagRequest request) { - return createConnectedSiteTagCallable().call(request); + public final UnaryCallable + createEventCreateRuleCallable() { + return stub.createEventCreateRuleCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a connected site tag for a Universal Analytics property. You can create a maximum of 20 - * connected site tags per property. Note: This API cannot be used on GA4 properties. + * Updates an EventCreateRule. * *

Sample code: * @@ -14165,27 +14277,33 @@ public final CreateConnectedSiteTagResponse createConnectedSiteTag( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateConnectedSiteTagRequest request = - * CreateConnectedSiteTagRequest.newBuilder() - * .setProperty("property-993141291") - * .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createConnectedSiteTagCallable().futureCall(request); - * // Do something. - * CreateConnectedSiteTagResponse response = future.get(); + * EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * EventCreateRule response = + * analyticsAdminServiceClient.updateEventCreateRule(eventCreateRule, updateMask); * } * } + * + * @param eventCreateRule Required. The EventCreateRule to update. The resource's `name` field is + * used to identify the EventCreateRule to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - createConnectedSiteTagCallable() { - return stub.createConnectedSiteTagCallable(); + public final EventCreateRule updateEventCreateRule( + EventCreateRule eventCreateRule, FieldMask updateMask) { + UpdateEventCreateRuleRequest request = + UpdateEventCreateRuleRequest.newBuilder() + .setEventCreateRule(eventCreateRule) + .setUpdateMask(updateMask) + .build(); + return updateEventCreateRule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on - * GA4 properties. + * Updates an EventCreateRule. * *

Sample code: * @@ -14197,26 +14315,25 @@ public final CreateConnectedSiteTagResponse createConnectedSiteTag( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteConnectedSiteTagRequest request = - * DeleteConnectedSiteTagRequest.newBuilder() - * .setProperty("property-993141291") - * .setTagId("tagId110119509") + * UpdateEventCreateRuleRequest request = + * UpdateEventCreateRuleRequest.newBuilder() + * .setEventCreateRule(EventCreateRule.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * analyticsAdminServiceClient.deleteConnectedSiteTag(request); + * EventCreateRule response = analyticsAdminServiceClient.updateEventCreateRule(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteConnectedSiteTag(DeleteConnectedSiteTagRequest request) { - deleteConnectedSiteTagCallable().call(request); + public final EventCreateRule updateEventCreateRule(UpdateEventCreateRuleRequest request) { + return updateEventCreateRuleCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on - * GA4 properties. + * Updates an EventCreateRule. * *

Sample code: * @@ -14228,27 +14345,26 @@ public final void deleteConnectedSiteTag(DeleteConnectedSiteTagRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteConnectedSiteTagRequest request = - * DeleteConnectedSiteTagRequest.newBuilder() - * .setProperty("property-993141291") - * .setTagId("tagId110119509") + * UpdateEventCreateRuleRequest request = + * UpdateEventCreateRuleRequest.newBuilder() + * .setEventCreateRule(EventCreateRule.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteConnectedSiteTagCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateEventCreateRuleCallable().futureCall(request); * // Do something. - * future.get(); + * EventCreateRule response = future.get(); * } * } */ - public final UnaryCallable - deleteConnectedSiteTagCallable() { - return stub.deleteConnectedSiteTagCallable(); + public final UnaryCallable + updateEventCreateRuleCallable() { + return stub.updateEventCreateRuleCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected - * site tags will be returned. Note: this has no effect on GA4 property. + * Deletes an EventCreateRule. * *

Sample code: * @@ -14260,25 +14376,26 @@ public final void deleteConnectedSiteTag(DeleteConnectedSiteTagRequest request) * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListConnectedSiteTagsRequest request = - * ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); - * ListConnectedSiteTagsResponse response = - * analyticsAdminServiceClient.listConnectedSiteTags(request); + * EventCreateRuleName name = + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + * analyticsAdminServiceClient.deleteEventCreateRule(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Example format: properties/123/dataStreams/456/eventCreateRules/789 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListConnectedSiteTagsResponse listConnectedSiteTags( - ListConnectedSiteTagsRequest request) { - return listConnectedSiteTagsCallable().call(request); + public final void deleteEventCreateRule(EventCreateRuleName name) { + DeleteEventCreateRuleRequest request = + DeleteEventCreateRuleRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteEventCreateRule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected - * site tags will be returned. Note: this has no effect on GA4 property. + * Deletes an EventCreateRule. * *

Sample code: * @@ -14290,24 +14407,24 @@ public final ListConnectedSiteTagsResponse listConnectedSiteTags( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListConnectedSiteTagsRequest request = - * ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); - * ApiFuture future = - * analyticsAdminServiceClient.listConnectedSiteTagsCallable().futureCall(request); - * // Do something. - * ListConnectedSiteTagsResponse response = future.get(); + * String name = + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]").toString(); + * analyticsAdminServiceClient.deleteEventCreateRule(name); * } * } + * + * @param name Required. Example format: properties/123/dataStreams/456/eventCreateRules/789 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listConnectedSiteTagsCallable() { - return stub.listConnectedSiteTagsCallable(); + public final void deleteEventCreateRule(String name) { + DeleteEventCreateRuleRequest request = + DeleteEventCreateRuleRequest.newBuilder().setName(name).build(); + deleteEventCreateRule(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be - * used with GA4 properties. + * Deletes an EventCreateRule. * *

Sample code: * @@ -14319,27 +14436,26 @@ public final ListConnectedSiteTagsResponse listConnectedSiteTags( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * FetchConnectedGa4PropertyRequest request = - * FetchConnectedGa4PropertyRequest.newBuilder() - * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * DeleteEventCreateRuleRequest request = + * DeleteEventCreateRuleRequest.newBuilder() + * .setName( + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + * .toString()) * .build(); - * FetchConnectedGa4PropertyResponse response = - * analyticsAdminServiceClient.fetchConnectedGa4Property(request); + * analyticsAdminServiceClient.deleteEventCreateRule(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final FetchConnectedGa4PropertyResponse fetchConnectedGa4Property( - FetchConnectedGa4PropertyRequest request) { - return fetchConnectedGa4PropertyCallable().call(request); + public final void deleteEventCreateRule(DeleteEventCreateRuleRequest request) { + deleteEventCreateRuleCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be - * used with GA4 properties. + * Deletes an EventCreateRule. * *

Sample code: * @@ -14351,25 +14467,26 @@ public final FetchConnectedGa4PropertyResponse fetchConnectedGa4Property( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * FetchConnectedGa4PropertyRequest request = - * FetchConnectedGa4PropertyRequest.newBuilder() - * .setProperty(PropertyName.of("[PROPERTY]").toString()) + * DeleteEventCreateRuleRequest request = + * DeleteEventCreateRuleRequest.newBuilder() + * .setName( + * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.fetchConnectedGa4PropertyCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteEventCreateRuleCallable().futureCall(request); * // Do something. - * FetchConnectedGa4PropertyResponse response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - fetchConnectedGa4PropertyCallable() { - return stub.fetchConnectedGa4PropertyCallable(); + public final UnaryCallable deleteEventCreateRuleCallable() { + return stub.deleteEventCreateRuleCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single AdSenseLink. + * Updates a DataRedactionSettings on a property. * *

Sample code: * @@ -14381,24 +14498,34 @@ public final FetchConnectedGa4PropertyResponse fetchConnectedGa4Property( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - * AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(name); + * DataRedactionSettings dataRedactionSettings = DataRedactionSettings.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * DataRedactionSettings response = + * analyticsAdminServiceClient.updateDataRedactionSettings( + * dataRedactionSettings, updateMask); * } * } * - * @param name Required. Unique identifier for the AdSense Link requested. Format: - * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 + * @param dataRedactionSettings Required. The settings to update. The `name` field is used to + * identify the settings to be updated. + * @param updateMask Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire + * entity, use one path with the string "*" to match all fields. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AdSenseLink getAdSenseLink(AdSenseLinkName name) { - GetAdSenseLinkRequest request = - GetAdSenseLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getAdSenseLink(request); + public final DataRedactionSettings updateDataRedactionSettings( + DataRedactionSettings dataRedactionSettings, FieldMask updateMask) { + UpdateDataRedactionSettingsRequest request = + UpdateDataRedactionSettingsRequest.newBuilder() + .setDataRedactionSettings(dataRedactionSettings) + .setUpdateMask(updateMask) + .build(); + return updateDataRedactionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single AdSenseLink. + * Updates a DataRedactionSettings on a property. * *

Sample code: * @@ -14410,23 +14537,27 @@ public final AdSenseLink getAdSenseLink(AdSenseLinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString(); - * AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(name); + * UpdateDataRedactionSettingsRequest request = + * UpdateDataRedactionSettingsRequest.newBuilder() + * .setDataRedactionSettings(DataRedactionSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * DataRedactionSettings response = + * analyticsAdminServiceClient.updateDataRedactionSettings(request); * } * } * - * @param name Required. Unique identifier for the AdSense Link requested. Format: - * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AdSenseLink getAdSenseLink(String name) { - GetAdSenseLinkRequest request = GetAdSenseLinkRequest.newBuilder().setName(name).build(); - return getAdSenseLink(request); + public final DataRedactionSettings updateDataRedactionSettings( + UpdateDataRedactionSettingsRequest request) { + return updateDataRedactionSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single AdSenseLink. + * Updates a DataRedactionSettings on a property. * *

Sample code: * @@ -14438,24 +14569,26 @@ public final AdSenseLink getAdSenseLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAdSenseLinkRequest request = - * GetAdSenseLinkRequest.newBuilder() - * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + * UpdateDataRedactionSettingsRequest request = + * UpdateDataRedactionSettingsRequest.newBuilder() + * .setDataRedactionSettings(DataRedactionSettings.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); - * AdSenseLink response = analyticsAdminServiceClient.getAdSenseLink(request); + * ApiFuture future = + * analyticsAdminServiceClient.updateDataRedactionSettingsCallable().futureCall(request); + * // Do something. + * DataRedactionSettings response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AdSenseLink getAdSenseLink(GetAdSenseLinkRequest request) { - return getAdSenseLinkCallable().call(request); + public final UnaryCallable + updateDataRedactionSettingsCallable() { + return stub.updateDataRedactionSettingsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Looks up a single AdSenseLink. + * Lookup for a single DataRedactionSettings. * *

Sample code: * @@ -14467,24 +14600,27 @@ public final AdSenseLink getAdSenseLink(GetAdSenseLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetAdSenseLinkRequest request = - * GetAdSenseLinkRequest.newBuilder() - * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getAdSenseLinkCallable().futureCall(request); - * // Do something. - * AdSenseLink response = future.get(); + * DataRedactionSettingsName name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + * DataRedactionSettings response = analyticsAdminServiceClient.getDataRedactionSettings(name); * } * } + * + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings Example: + * "properties/1000/dataStreams/2000/dataRedactionSettings" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getAdSenseLinkCallable() { - return stub.getAdSenseLinkCallable(); + public final DataRedactionSettings getDataRedactionSettings(DataRedactionSettingsName name) { + GetDataRedactionSettingsRequest request = + GetDataRedactionSettingsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDataRedactionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an AdSenseLink. + * Lookup for a single DataRedactionSettings. * *

Sample code: * @@ -14496,29 +14632,25 @@ public final UnaryCallable getAdSenseLinkCal * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * PropertyName parent = PropertyName.of("[PROPERTY]"); - * AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - * AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(parent, adsenseLink); + * String name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + * DataRedactionSettings response = analyticsAdminServiceClient.getDataRedactionSettings(name); * } * } * - * @param parent Required. The property for which to create an AdSense Link. Format: - * properties/{propertyId} Example: properties/1234 - * @param adsenseLink Required. The AdSense Link to create + * @param name Required. The name of the settings to lookup. Format: + * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings Example: + * "properties/1000/dataStreams/2000/dataRedactionSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AdSenseLink createAdSenseLink(PropertyName parent, AdSenseLink adsenseLink) { - CreateAdSenseLinkRequest request = - CreateAdSenseLinkRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setAdsenseLink(adsenseLink) - .build(); - return createAdSenseLink(request); + public final DataRedactionSettings getDataRedactionSettings(String name) { + GetDataRedactionSettingsRequest request = + GetDataRedactionSettingsRequest.newBuilder().setName(name).build(); + return getDataRedactionSettings(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an AdSenseLink. + * Lookup for a single DataRedactionSettings. * *

Sample code: * @@ -14530,26 +14662,26 @@ public final AdSenseLink createAdSenseLink(PropertyName parent, AdSenseLink adse * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = PropertyName.of("[PROPERTY]").toString(); - * AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - * AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(parent, adsenseLink); + * GetDataRedactionSettingsRequest request = + * GetDataRedactionSettingsRequest.newBuilder() + * .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + * .build(); + * DataRedactionSettings response = + * analyticsAdminServiceClient.getDataRedactionSettings(request); * } * } * - * @param parent Required. The property for which to create an AdSense Link. Format: - * properties/{propertyId} Example: properties/1234 - * @param adsenseLink Required. The AdSense Link to create + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AdSenseLink createAdSenseLink(String parent, AdSenseLink adsenseLink) { - CreateAdSenseLinkRequest request = - CreateAdSenseLinkRequest.newBuilder().setParent(parent).setAdsenseLink(adsenseLink).build(); - return createAdSenseLink(request); + public final DataRedactionSettings getDataRedactionSettings( + GetDataRedactionSettingsRequest request) { + return getDataRedactionSettingsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an AdSenseLink. + * Lookup for a single DataRedactionSettings. * *

Sample code: * @@ -14561,25 +14693,57 @@ public final AdSenseLink createAdSenseLink(String parent, AdSenseLink adsenseLin * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateAdSenseLinkRequest request = - * CreateAdSenseLinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setAdsenseLink(AdSenseLink.newBuilder().build()) + * GetDataRedactionSettingsRequest request = + * GetDataRedactionSettingsRequest.newBuilder() + * .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) * .build(); - * AdSenseLink response = analyticsAdminServiceClient.createAdSenseLink(request); + * ApiFuture future = + * analyticsAdminServiceClient.getDataRedactionSettingsCallable().futureCall(request); + * // Do something. + * DataRedactionSettings response = future.get(); + * } + * } + */ + public final UnaryCallable + getDataRedactionSettingsCallable() { + return stub.getDataRedactionSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a roll-up property and all roll-up property source links. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateRollupPropertyRequest request =
+   *       CreateRollupPropertyRequest.newBuilder()
+   *           .setRollupProperty(Property.newBuilder().build())
+   *           .addAllSourceProperties(new ArrayList())
+   *           .build();
+   *   CreateRollupPropertyResponse response =
+   *       analyticsAdminServiceClient.createRollupProperty(request);
    * }
    * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AdSenseLink createAdSenseLink(CreateAdSenseLinkRequest request) { - return createAdSenseLinkCallable().call(request); + public final CreateRollupPropertyResponse createRollupProperty( + CreateRollupPropertyRequest request) { + return createRollupPropertyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an AdSenseLink. + * Create a roll-up property and all roll-up property source links. * *

Sample code: * @@ -14591,25 +14755,27 @@ public final AdSenseLink createAdSenseLink(CreateAdSenseLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateAdSenseLinkRequest request = - * CreateAdSenseLinkRequest.newBuilder() - * .setParent(PropertyName.of("[PROPERTY]").toString()) - * .setAdsenseLink(AdSenseLink.newBuilder().build()) + * CreateRollupPropertyRequest request = + * CreateRollupPropertyRequest.newBuilder() + * .setRollupProperty(Property.newBuilder().build()) + * .addAllSourceProperties(new ArrayList()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createAdSenseLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createRollupPropertyCallable().futureCall(request); * // Do something. - * AdSenseLink response = future.get(); + * CreateRollupPropertyResponse response = future.get(); * } * } */ - public final UnaryCallable createAdSenseLinkCallable() { - return stub.createAdSenseLinkCallable(); + public final UnaryCallable + createRollupPropertyCallable() { + return stub.createRollupPropertyCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an AdSenseLink. + * Lookup for a single roll-up property source Link. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14621,26 +14787,31 @@ public final UnaryCallable createAdSenseL * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - * analyticsAdminServiceClient.deleteAdSenseLink(name); + * RollupPropertySourceLinkName name = + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + * RollupPropertySourceLink response = + * analyticsAdminServiceClient.getRollupPropertySourceLink(name); * } * } * - * @param name Required. Unique identifier for the AdSense Link to be deleted. Format: - * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 + * @param name Required. The name of the roll-up property source link to lookup. Format: + * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} + * Example: properties/123/rollupPropertySourceLinks/456 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteAdSenseLink(AdSenseLinkName name) { - DeleteAdSenseLinkRequest request = - DeleteAdSenseLinkRequest.newBuilder() + public final RollupPropertySourceLink getRollupPropertySourceLink( + RollupPropertySourceLinkName name) { + GetRollupPropertySourceLinkRequest request = + GetRollupPropertySourceLinkRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); - deleteAdSenseLink(request); + return getRollupPropertySourceLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an AdSenseLink. + * Lookup for a single roll-up property source Link. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14652,23 +14823,28 @@ public final void deleteAdSenseLink(AdSenseLinkName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString(); - * analyticsAdminServiceClient.deleteAdSenseLink(name); + * String name = + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]").toString(); + * RollupPropertySourceLink response = + * analyticsAdminServiceClient.getRollupPropertySourceLink(name); * } * } * - * @param name Required. Unique identifier for the AdSense Link to be deleted. Format: - * properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678 + * @param name Required. The name of the roll-up property source link to lookup. Format: + * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} + * Example: properties/123/rollupPropertySourceLinks/456 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteAdSenseLink(String name) { - DeleteAdSenseLinkRequest request = DeleteAdSenseLinkRequest.newBuilder().setName(name).build(); - deleteAdSenseLink(request); + public final RollupPropertySourceLink getRollupPropertySourceLink(String name) { + GetRollupPropertySourceLinkRequest request = + GetRollupPropertySourceLinkRequest.newBuilder().setName(name).build(); + return getRollupPropertySourceLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an AdSenseLink. + * Lookup for a single roll-up property source Link. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14680,24 +14856,29 @@ public final void deleteAdSenseLink(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteAdSenseLinkRequest request = - * DeleteAdSenseLinkRequest.newBuilder() - * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + * GetRollupPropertySourceLinkRequest request = + * GetRollupPropertySourceLinkRequest.newBuilder() + * .setName( + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + * .toString()) * .build(); - * analyticsAdminServiceClient.deleteAdSenseLink(request); + * RollupPropertySourceLink response = + * analyticsAdminServiceClient.getRollupPropertySourceLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteAdSenseLink(DeleteAdSenseLinkRequest request) { - deleteAdSenseLinkCallable().call(request); + public final RollupPropertySourceLink getRollupPropertySourceLink( + GetRollupPropertySourceLinkRequest request) { + return getRollupPropertySourceLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an AdSenseLink. + * Lookup for a single roll-up property source Link. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14709,24 +14890,28 @@ public final void deleteAdSenseLink(DeleteAdSenseLinkRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteAdSenseLinkRequest request = - * DeleteAdSenseLinkRequest.newBuilder() - * .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + * GetRollupPropertySourceLinkRequest request = + * GetRollupPropertySourceLinkRequest.newBuilder() + * .setName( + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteAdSenseLinkCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.getRollupPropertySourceLinkCallable().futureCall(request); * // Do something. - * future.get(); + * RollupPropertySourceLink response = future.get(); * } * } */ - public final UnaryCallable deleteAdSenseLinkCallable() { - return stub.deleteAdSenseLinkCallable(); + public final UnaryCallable + getRollupPropertySourceLinkCallable() { + return stub.getRollupPropertySourceLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists AdSenseLinks on a property. + * Lists roll-up property source Links on a property. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14739,28 +14924,30 @@ public final UnaryCallable deleteAdSenseLinkCal * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * PropertyName parent = PropertyName.of("[PROPERTY]"); - * for (AdSenseLink element : - * analyticsAdminServiceClient.listAdSenseLinks(parent).iterateAll()) { + * for (RollupPropertySourceLink element : + * analyticsAdminServiceClient.listRollupPropertySourceLinks(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Resource name of the parent property. Format: properties/{propertyId} - * Example: properties/1234 + * @param parent Required. The name of the roll-up property to list roll-up property source links + * under. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAdSenseLinksPagedResponse listAdSenseLinks(PropertyName parent) { - ListAdSenseLinksRequest request = - ListAdSenseLinksRequest.newBuilder() + public final ListRollupPropertySourceLinksPagedResponse listRollupPropertySourceLinks( + PropertyName parent) { + ListRollupPropertySourceLinksRequest request = + ListRollupPropertySourceLinksRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); - return listAdSenseLinks(request); + return listRollupPropertySourceLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists AdSenseLinks on a property. + * Lists roll-up property source Links on a property. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14773,26 +14960,28 @@ public final ListAdSenseLinksPagedResponse listAdSenseLinks(PropertyName parent) * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { * String parent = PropertyName.of("[PROPERTY]").toString(); - * for (AdSenseLink element : - * analyticsAdminServiceClient.listAdSenseLinks(parent).iterateAll()) { + * for (RollupPropertySourceLink element : + * analyticsAdminServiceClient.listRollupPropertySourceLinks(parent).iterateAll()) { * // doThingsWith(element); * } * } * } * - * @param parent Required. Resource name of the parent property. Format: properties/{propertyId} - * Example: properties/1234 + * @param parent Required. The name of the roll-up property to list roll-up property source links + * under. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAdSenseLinksPagedResponse listAdSenseLinks(String parent) { - ListAdSenseLinksRequest request = - ListAdSenseLinksRequest.newBuilder().setParent(parent).build(); - return listAdSenseLinks(request); + public final ListRollupPropertySourceLinksPagedResponse listRollupPropertySourceLinks( + String parent) { + ListRollupPropertySourceLinksRequest request = + ListRollupPropertySourceLinksRequest.newBuilder().setParent(parent).build(); + return listRollupPropertySourceLinks(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists AdSenseLinks on a property. + * Lists roll-up property source Links on a property. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14804,14 +14993,14 @@ public final ListAdSenseLinksPagedResponse listAdSenseLinks(String parent) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAdSenseLinksRequest request = - * ListAdSenseLinksRequest.newBuilder() + * ListRollupPropertySourceLinksRequest request = + * ListRollupPropertySourceLinksRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * for (AdSenseLink element : - * analyticsAdminServiceClient.listAdSenseLinks(request).iterateAll()) { + * for (RollupPropertySourceLink element : + * analyticsAdminServiceClient.listRollupPropertySourceLinks(request).iterateAll()) { * // doThingsWith(element); * } * } @@ -14820,13 +15009,15 @@ public final ListAdSenseLinksPagedResponse listAdSenseLinks(String parent) { * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListAdSenseLinksPagedResponse listAdSenseLinks(ListAdSenseLinksRequest request) { - return listAdSenseLinksPagedCallable().call(request); + public final ListRollupPropertySourceLinksPagedResponse listRollupPropertySourceLinks( + ListRollupPropertySourceLinksRequest request) { + return listRollupPropertySourceLinksPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists AdSenseLinks on a property. + * Lists roll-up property source Links on a property. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14838,29 +15029,33 @@ public final ListAdSenseLinksPagedResponse listAdSenseLinks(ListAdSenseLinksRequ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAdSenseLinksRequest request = - * ListAdSenseLinksRequest.newBuilder() + * ListRollupPropertySourceLinksRequest request = + * ListRollupPropertySourceLinksRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listAdSenseLinksPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient + * .listRollupPropertySourceLinksPagedCallable() + * .futureCall(request); * // Do something. - * for (AdSenseLink element : future.get().iterateAll()) { + * for (RollupPropertySourceLink element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * } */ - public final UnaryCallable - listAdSenseLinksPagedCallable() { - return stub.listAdSenseLinksPagedCallable(); + public final UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksPagedCallable() { + return stub.listRollupPropertySourceLinksPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists AdSenseLinks on a property. + * Lists roll-up property source Links on a property. Only roll-up properties can have source + * links, so this method will throw an error if used on other types of properties. * *

Sample code: * @@ -14872,16 +15067,16 @@ public final ListAdSenseLinksPagedResponse listAdSenseLinks(ListAdSenseLinksRequ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListAdSenseLinksRequest request = - * ListAdSenseLinksRequest.newBuilder() + * ListRollupPropertySourceLinksRequest request = + * ListRollupPropertySourceLinksRequest.newBuilder() * .setParent(PropertyName.of("[PROPERTY]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); * while (true) { - * ListAdSenseLinksResponse response = - * analyticsAdminServiceClient.listAdSenseLinksCallable().call(request); - * for (AdSenseLink element : response.getAdsenseLinksList()) { + * ListRollupPropertySourceLinksResponse response = + * analyticsAdminServiceClient.listRollupPropertySourceLinksCallable().call(request); + * for (RollupPropertySourceLink element : response.getRollupPropertySourceLinksList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -14894,14 +15089,16 @@ public final ListAdSenseLinksPagedResponse listAdSenseLinks(ListAdSenseLinksRequ * } * } */ - public final UnaryCallable - listAdSenseLinksCallable() { - return stub.listAdSenseLinksCallable(); + public final UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksResponse> + listRollupPropertySourceLinksCallable() { + return stub.listRollupPropertySourceLinksCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single EventCreateRule. + * Creates a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -14913,27 +15110,33 @@ public final ListAdSenseLinksPagedResponse listAdSenseLinks(ListAdSenseLinksRequ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * EventCreateRuleName name = - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - * EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * RollupPropertySourceLink rollupPropertySourceLink = + * RollupPropertySourceLink.newBuilder().build(); + * RollupPropertySourceLink response = + * analyticsAdminServiceClient.createRollupPropertySourceLink( + * parent, rollupPropertySourceLink); * } * } * - * @param name Required. The name of the EventCreateRule to get. Example format: - * properties/123/dataStreams/456/eventCreateRules/789 + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param rollupPropertySourceLink Required. The roll-up property source link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EventCreateRule getEventCreateRule(EventCreateRuleName name) { - GetEventCreateRuleRequest request = - GetEventCreateRuleRequest.newBuilder() - .setName(name == null ? null : name.toString()) + public final RollupPropertySourceLink createRollupPropertySourceLink( + PropertyName parent, RollupPropertySourceLink rollupPropertySourceLink) { + CreateRollupPropertySourceLinkRequest request = + CreateRollupPropertySourceLinkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRollupPropertySourceLink(rollupPropertySourceLink) .build(); - return getEventCreateRule(request); + return createRollupPropertySourceLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single EventCreateRule. + * Creates a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -14945,25 +15148,33 @@ public final EventCreateRule getEventCreateRule(EventCreateRuleName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]").toString(); - * EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * RollupPropertySourceLink rollupPropertySourceLink = + * RollupPropertySourceLink.newBuilder().build(); + * RollupPropertySourceLink response = + * analyticsAdminServiceClient.createRollupPropertySourceLink( + * parent, rollupPropertySourceLink); * } * } * - * @param name Required. The name of the EventCreateRule to get. Example format: - * properties/123/dataStreams/456/eventCreateRules/789 + * @param parent Required. Format: properties/{property_id} Example: properties/1234 + * @param rollupPropertySourceLink Required. The roll-up property source link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EventCreateRule getEventCreateRule(String name) { - GetEventCreateRuleRequest request = - GetEventCreateRuleRequest.newBuilder().setName(name).build(); - return getEventCreateRule(request); + public final RollupPropertySourceLink createRollupPropertySourceLink( + String parent, RollupPropertySourceLink rollupPropertySourceLink) { + CreateRollupPropertySourceLinkRequest request = + CreateRollupPropertySourceLinkRequest.newBuilder() + .setParent(parent) + .setRollupPropertySourceLink(rollupPropertySourceLink) + .build(); + return createRollupPropertySourceLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single EventCreateRule. + * Creates a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -14975,26 +15186,28 @@ public final EventCreateRule getEventCreateRule(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetEventCreateRuleRequest request = - * GetEventCreateRuleRequest.newBuilder() - * .setName( - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - * .toString()) + * CreateRollupPropertySourceLinkRequest request = + * CreateRollupPropertySourceLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setRollupPropertySourceLink(RollupPropertySourceLink.newBuilder().build()) * .build(); - * EventCreateRule response = analyticsAdminServiceClient.getEventCreateRule(request); + * RollupPropertySourceLink response = + * analyticsAdminServiceClient.createRollupPropertySourceLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EventCreateRule getEventCreateRule(GetEventCreateRuleRequest request) { - return getEventCreateRuleCallable().call(request); + public final RollupPropertySourceLink createRollupPropertySourceLink( + CreateRollupPropertySourceLinkRequest request) { + return createRollupPropertySourceLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lookup for a single EventCreateRule. + * Creates a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -15006,27 +15219,27 @@ public final EventCreateRule getEventCreateRule(GetEventCreateRuleRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * GetEventCreateRuleRequest request = - * GetEventCreateRuleRequest.newBuilder() - * .setName( - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - * .toString()) + * CreateRollupPropertySourceLinkRequest request = + * CreateRollupPropertySourceLinkRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setRollupPropertySourceLink(RollupPropertySourceLink.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.getEventCreateRuleCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createRollupPropertySourceLinkCallable().futureCall(request); * // Do something. - * EventCreateRule response = future.get(); + * RollupPropertySourceLink response = future.get(); * } * } */ - public final UnaryCallable - getEventCreateRuleCallable() { - return stub.getEventCreateRuleCallable(); + public final UnaryCallable + createRollupPropertySourceLinkCallable() { + return stub.createRollupPropertySourceLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists EventCreateRules on a web data stream. + * Deletes a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -15038,28 +15251,29 @@ public final EventCreateRule getEventCreateRule(GetEventCreateRuleRequest reques * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - * for (EventCreateRule element : - * analyticsAdminServiceClient.listEventCreateRules(parent).iterateAll()) { - * // doThingsWith(element); - * } + * RollupPropertySourceLinkName name = + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + * analyticsAdminServiceClient.deleteRollupPropertySourceLink(name); * } * } * - * @param parent Required. Example format: properties/123/dataStreams/456 + * @param name Required. Format: + * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} + * Example: properties/1234/rollupPropertySourceLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListEventCreateRulesPagedResponse listEventCreateRules(DataStreamName parent) { - ListEventCreateRulesRequest request = - ListEventCreateRulesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) + public final void deleteRollupPropertySourceLink(RollupPropertySourceLinkName name) { + DeleteRollupPropertySourceLinkRequest request = + DeleteRollupPropertySourceLinkRequest.newBuilder() + .setName(name == null ? null : name.toString()) .build(); - return listEventCreateRules(request); + deleteRollupPropertySourceLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists EventCreateRules on a web data stream. + * Deletes a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -15071,26 +15285,27 @@ public final ListEventCreateRulesPagedResponse listEventCreateRules(DataStreamNa * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * for (EventCreateRule element : - * analyticsAdminServiceClient.listEventCreateRules(parent).iterateAll()) { - * // doThingsWith(element); - * } + * String name = + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]").toString(); + * analyticsAdminServiceClient.deleteRollupPropertySourceLink(name); * } * } * - * @param parent Required. Example format: properties/123/dataStreams/456 + * @param name Required. Format: + * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} + * Example: properties/1234/rollupPropertySourceLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListEventCreateRulesPagedResponse listEventCreateRules(String parent) { - ListEventCreateRulesRequest request = - ListEventCreateRulesRequest.newBuilder().setParent(parent).build(); - return listEventCreateRules(request); + public final void deleteRollupPropertySourceLink(String name) { + DeleteRollupPropertySourceLinkRequest request = + DeleteRollupPropertySourceLinkRequest.newBuilder().setName(name).build(); + deleteRollupPropertySourceLink(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists EventCreateRules on a web data stream. + * Deletes a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -15102,30 +15317,27 @@ public final ListEventCreateRulesPagedResponse listEventCreateRules(String paren * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListEventCreateRulesRequest request = - * ListEventCreateRulesRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * DeleteRollupPropertySourceLinkRequest request = + * DeleteRollupPropertySourceLinkRequest.newBuilder() + * .setName( + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + * .toString()) * .build(); - * for (EventCreateRule element : - * analyticsAdminServiceClient.listEventCreateRules(request).iterateAll()) { - * // doThingsWith(element); - * } + * analyticsAdminServiceClient.deleteRollupPropertySourceLink(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListEventCreateRulesPagedResponse listEventCreateRules( - ListEventCreateRulesRequest request) { - return listEventCreateRulesPagedCallable().call(request); + public final void deleteRollupPropertySourceLink(DeleteRollupPropertySourceLinkRequest request) { + deleteRollupPropertySourceLinkCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists EventCreateRules on a web data stream. + * Deletes a roll-up property source link. Only roll-up properties can have source links, so this + * method will throw an error if used on other types of properties. * *

Sample code: * @@ -15137,105 +15349,27 @@ public final ListEventCreateRulesPagedResponse listEventCreateRules( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * ListEventCreateRulesRequest request = - * ListEventCreateRulesRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") + * DeleteRollupPropertySourceLinkRequest request = + * DeleteRollupPropertySourceLinkRequest.newBuilder() + * .setName( + * RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.listEventCreateRulesPagedCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteRollupPropertySourceLinkCallable().futureCall(request); * // Do something. - * for (EventCreateRule element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * } - */ - public final UnaryCallable - listEventCreateRulesPagedCallable() { - return stub.listEventCreateRulesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists EventCreateRules on a web data stream. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   ListEventCreateRulesRequest request =
-   *       ListEventCreateRulesRequest.newBuilder()
-   *           .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListEventCreateRulesResponse response =
-   *         analyticsAdminServiceClient.listEventCreateRulesCallable().call(request);
-   *     for (EventCreateRule element : response.getEventCreateRulesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listEventCreateRulesCallable() { - return stub.listEventCreateRulesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an EventCreateRule. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
-   *     AnalyticsAdminServiceClient.create()) {
-   *   DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]");
-   *   EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build();
-   *   EventCreateRule response =
-   *       analyticsAdminServiceClient.createEventCreateRule(parent, eventCreateRule);
-   * }
-   * }
- * - * @param parent Required. Example format: properties/123/dataStreams/456 - * @param eventCreateRule Required. The EventCreateRule to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final EventCreateRule createEventCreateRule( - DataStreamName parent, EventCreateRule eventCreateRule) { - CreateEventCreateRuleRequest request = - CreateEventCreateRuleRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setEventCreateRule(eventCreateRule) - .build(); - return createEventCreateRule(request); + * future.get(); + * } + * } + */ + public final UnaryCallable + deleteRollupPropertySourceLinkCallable() { + return stub.deleteRollupPropertySourceLinkCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an EventCreateRule. + * Create a subproperty and a subproperty event filter that applies to the created subproperty. * *

Sample code: * @@ -15247,30 +15381,26 @@ public final EventCreateRule createEventCreateRule( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString(); - * EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - * EventCreateRule response = - * analyticsAdminServiceClient.createEventCreateRule(parent, eventCreateRule); + * CreateSubpropertyRequest request = + * CreateSubpropertyRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setSubproperty(Property.newBuilder().build()) + * .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + * .build(); + * CreateSubpropertyResponse response = analyticsAdminServiceClient.createSubproperty(request); * } * } * - * @param parent Required. Example format: properties/123/dataStreams/456 - * @param eventCreateRule Required. The EventCreateRule to create. + * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EventCreateRule createEventCreateRule( - String parent, EventCreateRule eventCreateRule) { - CreateEventCreateRuleRequest request = - CreateEventCreateRuleRequest.newBuilder() - .setParent(parent) - .setEventCreateRule(eventCreateRule) - .build(); - return createEventCreateRule(request); + public final CreateSubpropertyResponse createSubproperty(CreateSubpropertyRequest request) { + return createSubpropertyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an EventCreateRule. + * Create a subproperty and a subproperty event filter that applies to the created subproperty. * *

Sample code: * @@ -15282,25 +15412,27 @@ public final EventCreateRule createEventCreateRule( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateEventCreateRuleRequest request = - * CreateEventCreateRuleRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setEventCreateRule(EventCreateRule.newBuilder().build()) + * CreateSubpropertyRequest request = + * CreateSubpropertyRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setSubproperty(Property.newBuilder().build()) + * .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) * .build(); - * EventCreateRule response = analyticsAdminServiceClient.createEventCreateRule(request); + * ApiFuture future = + * analyticsAdminServiceClient.createSubpropertyCallable().futureCall(request); + * // Do something. + * CreateSubpropertyResponse response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EventCreateRule createEventCreateRule(CreateEventCreateRuleRequest request) { - return createEventCreateRuleCallable().call(request); + public final UnaryCallable + createSubpropertyCallable() { + return stub.createSubpropertyCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an EventCreateRule. + * Deletes a subproperty event filter. * *

Sample code: * @@ -15312,26 +15444,28 @@ public final EventCreateRule createEventCreateRule(CreateEventCreateRuleRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * CreateEventCreateRuleRequest request = - * CreateEventCreateRuleRequest.newBuilder() - * .setParent(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - * .setEventCreateRule(EventCreateRule.newBuilder().build()) - * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.createEventCreateRuleCallable().futureCall(request); - * // Do something. - * EventCreateRule response = future.get(); + * SubpropertyEventFilterName name = + * SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]"); + * analyticsAdminServiceClient.deleteSubpropertyEventFilter(name); * } * } + * + * @param name Required. Resource name of the subproperty event filter to delete. Format: + * properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: + * properties/123/subpropertyEventFilters/456 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - createEventCreateRuleCallable() { - return stub.createEventCreateRuleCallable(); + public final void deleteSubpropertyEventFilter(SubpropertyEventFilterName name) { + DeleteSubpropertyEventFilterRequest request = + DeleteSubpropertyEventFilterRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteSubpropertyEventFilter(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an EventCreateRule. + * Deletes a subproperty event filter. * *

Sample code: * @@ -15343,33 +15477,26 @@ public final EventCreateRule createEventCreateRule(CreateEventCreateRuleRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); - * EventCreateRule response = - * analyticsAdminServiceClient.updateEventCreateRule(eventCreateRule, updateMask); + * String name = + * SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]").toString(); + * analyticsAdminServiceClient.deleteSubpropertyEventFilter(name); * } * } * - * @param eventCreateRule Required. The EventCreateRule to update. The resource's `name` field is - * used to identify the EventCreateRule to be updated. - * @param updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire - * entity, use one path with the string "*" to match all fields. + * @param name Required. Resource name of the subproperty event filter to delete. Format: + * properties/property_id/subpropertyEventFilters/subproperty_event_filter Example: + * properties/123/subpropertyEventFilters/456 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EventCreateRule updateEventCreateRule( - EventCreateRule eventCreateRule, FieldMask updateMask) { - UpdateEventCreateRuleRequest request = - UpdateEventCreateRuleRequest.newBuilder() - .setEventCreateRule(eventCreateRule) - .setUpdateMask(updateMask) - .build(); - return updateEventCreateRule(request); + public final void deleteSubpropertyEventFilter(String name) { + DeleteSubpropertyEventFilterRequest request = + DeleteSubpropertyEventFilterRequest.newBuilder().setName(name).build(); + deleteSubpropertyEventFilter(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an EventCreateRule. + * Deletes a subproperty event filter. * *

Sample code: * @@ -15381,25 +15508,26 @@ public final EventCreateRule updateEventCreateRule( * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateEventCreateRuleRequest request = - * UpdateEventCreateRuleRequest.newBuilder() - * .setEventCreateRule(EventCreateRule.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * DeleteSubpropertyEventFilterRequest request = + * DeleteSubpropertyEventFilterRequest.newBuilder() + * .setName( + * SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + * .toString()) * .build(); - * EventCreateRule response = analyticsAdminServiceClient.updateEventCreateRule(request); + * analyticsAdminServiceClient.deleteSubpropertyEventFilter(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EventCreateRule updateEventCreateRule(UpdateEventCreateRuleRequest request) { - return updateEventCreateRuleCallable().call(request); + public final void deleteSubpropertyEventFilter(DeleteSubpropertyEventFilterRequest request) { + deleteSubpropertyEventFilterCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates an EventCreateRule. + * Deletes a subproperty event filter. * *

Sample code: * @@ -15411,26 +15539,27 @@ public final EventCreateRule updateEventCreateRule(UpdateEventCreateRuleRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * UpdateEventCreateRuleRequest request = - * UpdateEventCreateRuleRequest.newBuilder() - * .setEventCreateRule(EventCreateRule.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * DeleteSubpropertyEventFilterRequest request = + * DeleteSubpropertyEventFilterRequest.newBuilder() + * .setName( + * SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + * .toString()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.updateEventCreateRuleCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.deleteSubpropertyEventFilterCallable().futureCall(request); * // Do something. - * EventCreateRule response = future.get(); + * future.get(); * } * } */ - public final UnaryCallable - updateEventCreateRuleCallable() { - return stub.updateEventCreateRuleCallable(); + public final UnaryCallable + deleteSubpropertyEventFilterCallable() { + return stub.deleteSubpropertyEventFilterCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an EventCreateRule. + * Creates a subproperty Event Filter. * *

Sample code: * @@ -15442,26 +15571,31 @@ public final EventCreateRule updateEventCreateRule(UpdateEventCreateRuleRequest * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * EventCreateRuleName name = - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - * analyticsAdminServiceClient.deleteEventCreateRule(name); + * PropertyName parent = PropertyName.of("[PROPERTY]"); + * SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + * SubpropertyEventFilter response = + * analyticsAdminServiceClient.createSubpropertyEventFilter(parent, subpropertyEventFilter); * } * } * - * @param name Required. Example format: properties/123/dataStreams/456/eventCreateRules/789 + * @param parent Required. The ordinary property for which to create a subproperty event filter. + * Format: properties/property_id Example: properties/123 + * @param subpropertyEventFilter Required. The subproperty event filter to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteEventCreateRule(EventCreateRuleName name) { - DeleteEventCreateRuleRequest request = - DeleteEventCreateRuleRequest.newBuilder() - .setName(name == null ? null : name.toString()) + public final SubpropertyEventFilter createSubpropertyEventFilter( + PropertyName parent, SubpropertyEventFilter subpropertyEventFilter) { + CreateSubpropertyEventFilterRequest request = + CreateSubpropertyEventFilterRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSubpropertyEventFilter(subpropertyEventFilter) .build(); - deleteEventCreateRule(request); + return createSubpropertyEventFilter(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an EventCreateRule. + * Creates a subproperty Event Filter. * *

Sample code: * @@ -15473,24 +15607,31 @@ public final void deleteEventCreateRule(EventCreateRuleName name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * String name = - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]").toString(); - * analyticsAdminServiceClient.deleteEventCreateRule(name); + * String parent = PropertyName.of("[PROPERTY]").toString(); + * SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + * SubpropertyEventFilter response = + * analyticsAdminServiceClient.createSubpropertyEventFilter(parent, subpropertyEventFilter); * } * } * - * @param name Required. Example format: properties/123/dataStreams/456/eventCreateRules/789 + * @param parent Required. The ordinary property for which to create a subproperty event filter. + * Format: properties/property_id Example: properties/123 + * @param subpropertyEventFilter Required. The subproperty event filter to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteEventCreateRule(String name) { - DeleteEventCreateRuleRequest request = - DeleteEventCreateRuleRequest.newBuilder().setName(name).build(); - deleteEventCreateRule(request); + public final SubpropertyEventFilter createSubpropertyEventFilter( + String parent, SubpropertyEventFilter subpropertyEventFilter) { + CreateSubpropertyEventFilterRequest request = + CreateSubpropertyEventFilterRequest.newBuilder() + .setParent(parent) + .setSubpropertyEventFilter(subpropertyEventFilter) + .build(); + return createSubpropertyEventFilter(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an EventCreateRule. + * Creates a subproperty Event Filter. * *

Sample code: * @@ -15502,26 +15643,27 @@ public final void deleteEventCreateRule(String name) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteEventCreateRuleRequest request = - * DeleteEventCreateRuleRequest.newBuilder() - * .setName( - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - * .toString()) + * CreateSubpropertyEventFilterRequest request = + * CreateSubpropertyEventFilterRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) * .build(); - * analyticsAdminServiceClient.deleteEventCreateRule(request); + * SubpropertyEventFilter response = + * analyticsAdminServiceClient.createSubpropertyEventFilter(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteEventCreateRule(DeleteEventCreateRuleRequest request) { - deleteEventCreateRuleCallable().call(request); + public final SubpropertyEventFilter createSubpropertyEventFilter( + CreateSubpropertyEventFilterRequest request) { + return createSubpropertyEventFilterCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes an EventCreateRule. + * Creates a subproperty Event Filter. * *

Sample code: * @@ -15533,21 +15675,21 @@ public final void deleteEventCreateRule(DeleteEventCreateRuleRequest request) { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = * AnalyticsAdminServiceClient.create()) { - * DeleteEventCreateRuleRequest request = - * DeleteEventCreateRuleRequest.newBuilder() - * .setName( - * EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - * .toString()) + * CreateSubpropertyEventFilterRequest request = + * CreateSubpropertyEventFilterRequest.newBuilder() + * .setParent(PropertyName.of("[PROPERTY]").toString()) + * .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) * .build(); - * ApiFuture future = - * analyticsAdminServiceClient.deleteEventCreateRuleCallable().futureCall(request); + * ApiFuture future = + * analyticsAdminServiceClient.createSubpropertyEventFilterCallable().futureCall(request); * // Do something. - * future.get(); + * SubpropertyEventFilter response = future.get(); * } * } */ - public final UnaryCallable deleteEventCreateRuleCallable() { - return stub.deleteEventCreateRuleCallable(); + public final UnaryCallable + createSubpropertyEventFilterCallable() { + return stub.createSubpropertyEventFilterCallable(); } @Override @@ -15815,158 +15957,6 @@ protected ListPropertiesFixedSizeCollection createCollection( } } - public static class ListUserLinksPagedResponse - extends AbstractPagedListResponse< - ListUserLinksRequest, - ListUserLinksResponse, - UserLink, - ListUserLinksPage, - ListUserLinksFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListUserLinksPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListUserLinksPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListUserLinksPagedResponse(ListUserLinksPage page) { - super(page, ListUserLinksFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListUserLinksPage - extends AbstractPage< - ListUserLinksRequest, ListUserLinksResponse, UserLink, ListUserLinksPage> { - - private ListUserLinksPage( - PageContext context, - ListUserLinksResponse response) { - super(context, response); - } - - private static ListUserLinksPage createEmptyPage() { - return new ListUserLinksPage(null, null); - } - - @Override - protected ListUserLinksPage createPage( - PageContext context, - ListUserLinksResponse response) { - return new ListUserLinksPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListUserLinksFixedSizeCollection - extends AbstractFixedSizeCollection< - ListUserLinksRequest, - ListUserLinksResponse, - UserLink, - ListUserLinksPage, - ListUserLinksFixedSizeCollection> { - - private ListUserLinksFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListUserLinksFixedSizeCollection createEmptyCollection() { - return new ListUserLinksFixedSizeCollection(null, 0); - } - - @Override - protected ListUserLinksFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListUserLinksFixedSizeCollection(pages, collectionSize); - } - } - - public static class AuditUserLinksPagedResponse - extends AbstractPagedListResponse< - AuditUserLinksRequest, - AuditUserLinksResponse, - AuditUserLink, - AuditUserLinksPage, - AuditUserLinksFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - AuditUserLinksPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new AuditUserLinksPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private AuditUserLinksPagedResponse(AuditUserLinksPage page) { - super(page, AuditUserLinksFixedSizeCollection.createEmptyCollection()); - } - } - - public static class AuditUserLinksPage - extends AbstractPage< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLink, AuditUserLinksPage> { - - private AuditUserLinksPage( - PageContext context, - AuditUserLinksResponse response) { - super(context, response); - } - - private static AuditUserLinksPage createEmptyPage() { - return new AuditUserLinksPage(null, null); - } - - @Override - protected AuditUserLinksPage createPage( - PageContext context, - AuditUserLinksResponse response) { - return new AuditUserLinksPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class AuditUserLinksFixedSizeCollection - extends AbstractFixedSizeCollection< - AuditUserLinksRequest, - AuditUserLinksResponse, - AuditUserLink, - AuditUserLinksPage, - AuditUserLinksFixedSizeCollection> { - - private AuditUserLinksFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static AuditUserLinksFixedSizeCollection createEmptyCollection() { - return new AuditUserLinksFixedSizeCollection(null, 0); - } - - @Override - protected AuditUserLinksFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new AuditUserLinksFixedSizeCollection(pages, collectionSize); - } - } - public static class ListFirebaseLinksPagedResponse extends AbstractPagedListResponse< ListFirebaseLinksRequest, @@ -17588,4 +17578,101 @@ protected ListEventCreateRulesFixedSizeCollection createCollection( return new ListEventCreateRulesFixedSizeCollection(pages, collectionSize); } } + + public static class ListRollupPropertySourceLinksPagedResponse + extends AbstractPagedListResponse< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink, + ListRollupPropertySourceLinksPage, + ListRollupPropertySourceLinksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRollupPropertySourceLinksPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRollupPropertySourceLinksPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRollupPropertySourceLinksPagedResponse(ListRollupPropertySourceLinksPage page) { + super(page, ListRollupPropertySourceLinksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRollupPropertySourceLinksPage + extends AbstractPage< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink, + ListRollupPropertySourceLinksPage> { + + private ListRollupPropertySourceLinksPage( + PageContext< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink> + context, + ListRollupPropertySourceLinksResponse response) { + super(context, response); + } + + private static ListRollupPropertySourceLinksPage createEmptyPage() { + return new ListRollupPropertySourceLinksPage(null, null); + } + + @Override + protected ListRollupPropertySourceLinksPage createPage( + PageContext< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink> + context, + ListRollupPropertySourceLinksResponse response) { + return new ListRollupPropertySourceLinksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRollupPropertySourceLinksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink, + ListRollupPropertySourceLinksPage, + ListRollupPropertySourceLinksFixedSizeCollection> { + + private ListRollupPropertySourceLinksFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRollupPropertySourceLinksFixedSizeCollection createEmptyCollection() { + return new ListRollupPropertySourceLinksFixedSizeCollection(null, 0); + } + + @Override + protected ListRollupPropertySourceLinksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRollupPropertySourceLinksFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java index d8055d771515..d75b918b3cda 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java @@ -16,7 +16,6 @@ package com.google.analytics.admin.v1alpha; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; @@ -36,9 +35,9 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; import com.google.analytics.admin.v1alpha.stub.AnalyticsAdminServiceStubSettings; @@ -165,62 +164,6 @@ public UnaryCallSettings updatePropertySettings return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updatePropertySettings(); } - /** Returns the object with the settings used for calls to getUserLink. */ - public UnaryCallSettings getUserLinkSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getUserLinkSettings(); - } - - /** Returns the object with the settings used for calls to batchGetUserLinks. */ - public UnaryCallSettings - batchGetUserLinksSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).batchGetUserLinksSettings(); - } - - /** Returns the object with the settings used for calls to listUserLinks. */ - public PagedCallSettings - listUserLinksSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listUserLinksSettings(); - } - - /** Returns the object with the settings used for calls to auditUserLinks. */ - public PagedCallSettings< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - auditUserLinksSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).auditUserLinksSettings(); - } - - /** Returns the object with the settings used for calls to createUserLink. */ - public UnaryCallSettings createUserLinkSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createUserLinkSettings(); - } - - /** Returns the object with the settings used for calls to batchCreateUserLinks. */ - public UnaryCallSettings - batchCreateUserLinksSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).batchCreateUserLinksSettings(); - } - - /** Returns the object with the settings used for calls to updateUserLink. */ - public UnaryCallSettings updateUserLinkSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).updateUserLinkSettings(); - } - - /** Returns the object with the settings used for calls to batchUpdateUserLinks. */ - public UnaryCallSettings - batchUpdateUserLinksSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).batchUpdateUserLinksSettings(); - } - - /** Returns the object with the settings used for calls to deleteUserLink. */ - public UnaryCallSettings deleteUserLinkSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deleteUserLinkSettings(); - } - - /** Returns the object with the settings used for calls to batchDeleteUserLinks. */ - public UnaryCallSettings batchDeleteUserLinksSettings() { - return ((AnalyticsAdminServiceStubSettings) getStubSettings()).batchDeleteUserLinksSettings(); - } - /** Returns the object with the settings used for calls to createFirebaseLink. */ public UnaryCallSettings createFirebaseLinkSettings() { return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createFirebaseLinkSettings(); @@ -946,6 +889,77 @@ public UnaryCallSettings deleteEventCreateR return ((AnalyticsAdminServiceStubSettings) getStubSettings()).deleteEventCreateRuleSettings(); } + /** Returns the object with the settings used for calls to updateDataRedactionSettings. */ + public UnaryCallSettings + updateDataRedactionSettingsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .updateDataRedactionSettingsSettings(); + } + + /** Returns the object with the settings used for calls to getDataRedactionSettings. */ + public UnaryCallSettings + getDataRedactionSettingsSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .getDataRedactionSettingsSettings(); + } + + /** Returns the object with the settings used for calls to createRollupProperty. */ + public UnaryCallSettings + createRollupPropertySettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createRollupPropertySettings(); + } + + /** Returns the object with the settings used for calls to getRollupPropertySourceLink. */ + public UnaryCallSettings + getRollupPropertySourceLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .getRollupPropertySourceLinkSettings(); + } + + /** Returns the object with the settings used for calls to listRollupPropertySourceLinks. */ + public PagedCallSettings< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .listRollupPropertySourceLinksSettings(); + } + + /** Returns the object with the settings used for calls to createRollupPropertySourceLink. */ + public UnaryCallSettings + createRollupPropertySourceLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .createRollupPropertySourceLinkSettings(); + } + + /** Returns the object with the settings used for calls to deleteRollupPropertySourceLink. */ + public UnaryCallSettings + deleteRollupPropertySourceLinkSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .deleteRollupPropertySourceLinkSettings(); + } + + /** Returns the object with the settings used for calls to createSubproperty. */ + public UnaryCallSettings + createSubpropertySettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).createSubpropertySettings(); + } + + /** Returns the object with the settings used for calls to deleteSubpropertyEventFilter. */ + public UnaryCallSettings + deleteSubpropertyEventFilterSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .deleteSubpropertyEventFilterSettings(); + } + + /** Returns the object with the settings used for calls to createSubpropertyEventFilter. */ + public UnaryCallSettings + createSubpropertyEventFilterSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()) + .createSubpropertyEventFilterSettings(); + } + public static final AnalyticsAdminServiceSettings create(AnalyticsAdminServiceStubSettings stub) throws IOException { return new AnalyticsAdminServiceSettings.Builder(stub.toBuilder()).build(); @@ -1126,64 +1140,6 @@ public UnaryCallSettings.Builder updateProperty return getStubSettingsBuilder().updatePropertySettings(); } - /** Returns the builder for the settings used for calls to getUserLink. */ - public UnaryCallSettings.Builder getUserLinkSettings() { - return getStubSettingsBuilder().getUserLinkSettings(); - } - - /** Returns the builder for the settings used for calls to batchGetUserLinks. */ - public UnaryCallSettings.Builder - batchGetUserLinksSettings() { - return getStubSettingsBuilder().batchGetUserLinksSettings(); - } - - /** Returns the builder for the settings used for calls to listUserLinks. */ - public PagedCallSettings.Builder< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse> - listUserLinksSettings() { - return getStubSettingsBuilder().listUserLinksSettings(); - } - - /** Returns the builder for the settings used for calls to auditUserLinks. */ - public PagedCallSettings.Builder< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - auditUserLinksSettings() { - return getStubSettingsBuilder().auditUserLinksSettings(); - } - - /** Returns the builder for the settings used for calls to createUserLink. */ - public UnaryCallSettings.Builder createUserLinkSettings() { - return getStubSettingsBuilder().createUserLinkSettings(); - } - - /** Returns the builder for the settings used for calls to batchCreateUserLinks. */ - public UnaryCallSettings.Builder - batchCreateUserLinksSettings() { - return getStubSettingsBuilder().batchCreateUserLinksSettings(); - } - - /** Returns the builder for the settings used for calls to updateUserLink. */ - public UnaryCallSettings.Builder updateUserLinkSettings() { - return getStubSettingsBuilder().updateUserLinkSettings(); - } - - /** Returns the builder for the settings used for calls to batchUpdateUserLinks. */ - public UnaryCallSettings.Builder - batchUpdateUserLinksSettings() { - return getStubSettingsBuilder().batchUpdateUserLinksSettings(); - } - - /** Returns the builder for the settings used for calls to deleteUserLink. */ - public UnaryCallSettings.Builder deleteUserLinkSettings() { - return getStubSettingsBuilder().deleteUserLinkSettings(); - } - - /** Returns the builder for the settings used for calls to batchDeleteUserLinks. */ - public UnaryCallSettings.Builder - batchDeleteUserLinksSettings() { - return getStubSettingsBuilder().batchDeleteUserLinksSettings(); - } - /** Returns the builder for the settings used for calls to createFirebaseLink. */ public UnaryCallSettings.Builder createFirebaseLinkSettings() { @@ -1924,6 +1880,70 @@ public UnaryCallSettings.Builder deleteAdSenseL return getStubSettingsBuilder().deleteEventCreateRuleSettings(); } + /** Returns the builder for the settings used for calls to updateDataRedactionSettings. */ + public UnaryCallSettings.Builder + updateDataRedactionSettingsSettings() { + return getStubSettingsBuilder().updateDataRedactionSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to getDataRedactionSettings. */ + public UnaryCallSettings.Builder + getDataRedactionSettingsSettings() { + return getStubSettingsBuilder().getDataRedactionSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to createRollupProperty. */ + public UnaryCallSettings.Builder + createRollupPropertySettings() { + return getStubSettingsBuilder().createRollupPropertySettings(); + } + + /** Returns the builder for the settings used for calls to getRollupPropertySourceLink. */ + public UnaryCallSettings.Builder + getRollupPropertySourceLinkSettings() { + return getStubSettingsBuilder().getRollupPropertySourceLinkSettings(); + } + + /** Returns the builder for the settings used for calls to listRollupPropertySourceLinks. */ + public PagedCallSettings.Builder< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksSettings() { + return getStubSettingsBuilder().listRollupPropertySourceLinksSettings(); + } + + /** Returns the builder for the settings used for calls to createRollupPropertySourceLink. */ + public UnaryCallSettings.Builder< + CreateRollupPropertySourceLinkRequest, RollupPropertySourceLink> + createRollupPropertySourceLinkSettings() { + return getStubSettingsBuilder().createRollupPropertySourceLinkSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRollupPropertySourceLink. */ + public UnaryCallSettings.Builder + deleteRollupPropertySourceLinkSettings() { + return getStubSettingsBuilder().deleteRollupPropertySourceLinkSettings(); + } + + /** Returns the builder for the settings used for calls to createSubproperty. */ + public UnaryCallSettings.Builder + createSubpropertySettings() { + return getStubSettingsBuilder().createSubpropertySettings(); + } + + /** Returns the builder for the settings used for calls to deleteSubpropertyEventFilter. */ + public UnaryCallSettings.Builder + deleteSubpropertyEventFilterSettings() { + return getStubSettingsBuilder().deleteSubpropertyEventFilterSettings(); + } + + /** Returns the builder for the settings used for calls to createSubpropertyEventFilter. */ + public UnaryCallSettings.Builder + createSubpropertyEventFilterSettings() { + return getStubSettingsBuilder().createSubpropertyEventFilterSettings(); + } + @Override public AnalyticsAdminServiceSettings build() throws IOException { return new AnalyticsAdminServiceSettings(this); diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json index 3dc1bc598837..53363c71c7e4 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json @@ -25,33 +25,18 @@ "ArchiveCustomMetric": { "methods": ["archiveCustomMetric", "archiveCustomMetric", "archiveCustomMetric", "archiveCustomMetricCallable"] }, - "AuditUserLinks": { - "methods": ["auditUserLinks", "auditUserLinksPagedCallable", "auditUserLinksCallable"] - }, "BatchCreateAccessBindings": { "methods": ["batchCreateAccessBindings", "batchCreateAccessBindingsCallable"] }, - "BatchCreateUserLinks": { - "methods": ["batchCreateUserLinks", "batchCreateUserLinksCallable"] - }, "BatchDeleteAccessBindings": { "methods": ["batchDeleteAccessBindings", "batchDeleteAccessBindingsCallable"] }, - "BatchDeleteUserLinks": { - "methods": ["batchDeleteUserLinks", "batchDeleteUserLinksCallable"] - }, "BatchGetAccessBindings": { "methods": ["batchGetAccessBindings", "batchGetAccessBindingsCallable"] }, - "BatchGetUserLinks": { - "methods": ["batchGetUserLinks", "batchGetUserLinksCallable"] - }, "BatchUpdateAccessBindings": { "methods": ["batchUpdateAccessBindings", "batchUpdateAccessBindingsCallable"] }, - "BatchUpdateUserLinks": { - "methods": ["batchUpdateUserLinks", "batchUpdateUserLinksCallable"] - }, "CancelDisplayVideo360AdvertiserLinkProposal": { "methods": ["cancelDisplayVideo360AdvertiserLinkProposal", "cancelDisplayVideo360AdvertiserLinkProposalCallable"] }, @@ -106,14 +91,23 @@ "CreateProperty": { "methods": ["createProperty", "createProperty", "createPropertyCallable"] }, + "CreateRollupProperty": { + "methods": ["createRollupProperty", "createRollupPropertyCallable"] + }, + "CreateRollupPropertySourceLink": { + "methods": ["createRollupPropertySourceLink", "createRollupPropertySourceLink", "createRollupPropertySourceLink", "createRollupPropertySourceLinkCallable"] + }, "CreateSKAdNetworkConversionValueSchema": { "methods": ["createSKAdNetworkConversionValueSchema", "createSKAdNetworkConversionValueSchema", "createSKAdNetworkConversionValueSchema", "createSKAdNetworkConversionValueSchemaCallable"] }, "CreateSearchAds360Link": { "methods": ["createSearchAds360Link", "createSearchAds360Link", "createSearchAds360Link", "createSearchAds360LinkCallable"] }, - "CreateUserLink": { - "methods": ["createUserLink", "createUserLink", "createUserLink", "createUserLink", "createUserLinkCallable"] + "CreateSubproperty": { + "methods": ["createSubproperty", "createSubpropertyCallable"] + }, + "CreateSubpropertyEventFilter": { + "methods": ["createSubpropertyEventFilter", "createSubpropertyEventFilter", "createSubpropertyEventFilter", "createSubpropertyEventFilterCallable"] }, "DeleteAccessBinding": { "methods": ["deleteAccessBinding", "deleteAccessBinding", "deleteAccessBinding", "deleteAccessBindingCallable"] @@ -160,14 +154,17 @@ "DeleteProperty": { "methods": ["deleteProperty", "deleteProperty", "deleteProperty", "deletePropertyCallable"] }, + "DeleteRollupPropertySourceLink": { + "methods": ["deleteRollupPropertySourceLink", "deleteRollupPropertySourceLink", "deleteRollupPropertySourceLink", "deleteRollupPropertySourceLinkCallable"] + }, "DeleteSKAdNetworkConversionValueSchema": { "methods": ["deleteSKAdNetworkConversionValueSchema", "deleteSKAdNetworkConversionValueSchema", "deleteSKAdNetworkConversionValueSchema", "deleteSKAdNetworkConversionValueSchemaCallable"] }, "DeleteSearchAds360Link": { "methods": ["deleteSearchAds360Link", "deleteSearchAds360Link", "deleteSearchAds360Link", "deleteSearchAds360LinkCallable"] }, - "DeleteUserLink": { - "methods": ["deleteUserLink", "deleteUserLink", "deleteUserLink", "deleteUserLinkCallable"] + "DeleteSubpropertyEventFilter": { + "methods": ["deleteSubpropertyEventFilter", "deleteSubpropertyEventFilter", "deleteSubpropertyEventFilter", "deleteSubpropertyEventFilterCallable"] }, "FetchAutomatedGa4ConfigurationOptOut": { "methods": ["fetchAutomatedGa4ConfigurationOptOut", "fetchAutomatedGa4ConfigurationOptOutCallable"] @@ -205,6 +202,9 @@ "GetCustomMetric": { "methods": ["getCustomMetric", "getCustomMetric", "getCustomMetric", "getCustomMetricCallable"] }, + "GetDataRedactionSettings": { + "methods": ["getDataRedactionSettings", "getDataRedactionSettings", "getDataRedactionSettings", "getDataRedactionSettingsCallable"] + }, "GetDataRetentionSettings": { "methods": ["getDataRetentionSettings", "getDataRetentionSettings", "getDataRetentionSettings", "getDataRetentionSettingsCallable"] }, @@ -241,15 +241,15 @@ "GetProperty": { "methods": ["getProperty", "getProperty", "getProperty", "getPropertyCallable"] }, + "GetRollupPropertySourceLink": { + "methods": ["getRollupPropertySourceLink", "getRollupPropertySourceLink", "getRollupPropertySourceLink", "getRollupPropertySourceLinkCallable"] + }, "GetSKAdNetworkConversionValueSchema": { "methods": ["getSKAdNetworkConversionValueSchema", "getSKAdNetworkConversionValueSchema", "getSKAdNetworkConversionValueSchema", "getSKAdNetworkConversionValueSchemaCallable"] }, "GetSearchAds360Link": { "methods": ["getSearchAds360Link", "getSearchAds360Link", "getSearchAds360Link", "getSearchAds360LinkCallable"] }, - "GetUserLink": { - "methods": ["getUserLink", "getUserLink", "getUserLink", "getUserLinkCallable"] - }, "ListAccessBindings": { "methods": ["listAccessBindings", "listAccessBindings", "listAccessBindings", "listAccessBindings", "listAccessBindingsPagedCallable", "listAccessBindingsCallable"] }, @@ -310,15 +310,15 @@ "ListProperties": { "methods": ["listProperties", "listPropertiesPagedCallable", "listPropertiesCallable"] }, + "ListRollupPropertySourceLinks": { + "methods": ["listRollupPropertySourceLinks", "listRollupPropertySourceLinks", "listRollupPropertySourceLinks", "listRollupPropertySourceLinksPagedCallable", "listRollupPropertySourceLinksCallable"] + }, "ListSKAdNetworkConversionValueSchemas": { "methods": ["listSKAdNetworkConversionValueSchemas", "listSKAdNetworkConversionValueSchemas", "listSKAdNetworkConversionValueSchemas", "listSKAdNetworkConversionValueSchemasPagedCallable", "listSKAdNetworkConversionValueSchemasCallable"] }, "ListSearchAds360Links": { "methods": ["listSearchAds360Links", "listSearchAds360Links", "listSearchAds360Links", "listSearchAds360LinksPagedCallable", "listSearchAds360LinksCallable"] }, - "ListUserLinks": { - "methods": ["listUserLinks", "listUserLinks", "listUserLinks", "listUserLinks", "listUserLinksPagedCallable", "listUserLinksCallable"] - }, "ProvisionAccountTicket": { "methods": ["provisionAccountTicket", "provisionAccountTicketCallable"] }, @@ -355,6 +355,9 @@ "UpdateCustomMetric": { "methods": ["updateCustomMetric", "updateCustomMetric", "updateCustomMetricCallable"] }, + "UpdateDataRedactionSettings": { + "methods": ["updateDataRedactionSettings", "updateDataRedactionSettings", "updateDataRedactionSettingsCallable"] + }, "UpdateDataRetentionSettings": { "methods": ["updateDataRetentionSettings", "updateDataRetentionSettings", "updateDataRetentionSettingsCallable"] }, @@ -390,9 +393,6 @@ }, "UpdateSearchAds360Link": { "methods": ["updateSearchAds360Link", "updateSearchAds360Link", "updateSearchAds360LinkCallable"] - }, - "UpdateUserLink": { - "methods": ["updateUserLink", "updateUserLink", "updateUserLinkCallable"] } } } diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java index 5cb4a953f4db..ed6045831b70 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java @@ -16,7 +16,6 @@ package com.google.analytics.admin.v1alpha.stub; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; @@ -36,9 +35,9 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; import com.google.analytics.admin.v1alpha.AccessBinding; @@ -53,22 +52,13 @@ import com.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; import com.google.analytics.admin.v1alpha.AttributionSettings; import com.google.analytics.admin.v1alpha.Audience; -import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; -import com.google.analytics.admin.v1alpha.AuditUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; -import com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; import com.google.analytics.admin.v1alpha.BigQueryLink; import com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; import com.google.analytics.admin.v1alpha.ChannelGroup; @@ -91,11 +81,17 @@ import com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.CreatePropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse; +import com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyResponse; import com.google.analytics.admin.v1alpha.CustomDimension; import com.google.analytics.admin.v1alpha.CustomMetric; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; import com.google.analytics.admin.v1alpha.DataRetentionSettings; import com.google.analytics.admin.v1alpha.DataSharingSettings; import com.google.analytics.admin.v1alpha.DataStream; @@ -114,9 +110,10 @@ import com.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.DeletePropertyRequest; +import com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; +import com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; import com.google.analytics.admin.v1alpha.EnhancedMeasurementSettings; @@ -137,6 +134,7 @@ import com.google.analytics.admin.v1alpha.GetConversionEventRequest; import com.google.analytics.admin.v1alpha.GetCustomDimensionRequest; import com.google.analytics.admin.v1alpha.GetCustomMetricRequest; +import com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataStreamRequest; @@ -149,9 +147,9 @@ import com.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; import com.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.GetPropertyRequest; +import com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.GetUserLinkRequest; import com.google.analytics.admin.v1alpha.GlobalSiteTag; import com.google.analytics.admin.v1alpha.GoogleAdsLink; import com.google.analytics.admin.v1alpha.GoogleSignalsSettings; @@ -195,16 +193,17 @@ import com.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; import com.google.analytics.admin.v1alpha.ListPropertiesRequest; import com.google.analytics.admin.v1alpha.ListPropertiesResponse; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasResponse; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksResponse; -import com.google.analytics.admin.v1alpha.ListUserLinksRequest; -import com.google.analytics.admin.v1alpha.ListUserLinksResponse; import com.google.analytics.admin.v1alpha.MeasurementProtocolSecret; import com.google.analytics.admin.v1alpha.Property; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; import com.google.analytics.admin.v1alpha.RunAccessReportRequest; import com.google.analytics.admin.v1alpha.RunAccessReportResponse; import com.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema; @@ -213,6 +212,7 @@ import com.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; import com.google.analytics.admin.v1alpha.UpdateAccessBindingRequest; import com.google.analytics.admin.v1alpha.UpdateAccountRequest; import com.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; @@ -221,6 +221,7 @@ import com.google.analytics.admin.v1alpha.UpdateConversionEventRequest; import com.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; import com.google.analytics.admin.v1alpha.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataStreamRequest; import com.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; @@ -233,8 +234,6 @@ import com.google.analytics.admin.v1alpha.UpdatePropertyRequest; import com.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; @@ -311,59 +310,6 @@ public UnaryCallable updatePropertyCallable() { throw new UnsupportedOperationException("Not implemented: updatePropertyCallable()"); } - public UnaryCallable getUserLinkCallable() { - throw new UnsupportedOperationException("Not implemented: getUserLinkCallable()"); - } - - public UnaryCallable - batchGetUserLinksCallable() { - throw new UnsupportedOperationException("Not implemented: batchGetUserLinksCallable()"); - } - - public UnaryCallable - listUserLinksPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listUserLinksPagedCallable()"); - } - - public UnaryCallable listUserLinksCallable() { - throw new UnsupportedOperationException("Not implemented: listUserLinksCallable()"); - } - - public UnaryCallable - auditUserLinksPagedCallable() { - throw new UnsupportedOperationException("Not implemented: auditUserLinksPagedCallable()"); - } - - public UnaryCallable auditUserLinksCallable() { - throw new UnsupportedOperationException("Not implemented: auditUserLinksCallable()"); - } - - public UnaryCallable createUserLinkCallable() { - throw new UnsupportedOperationException("Not implemented: createUserLinkCallable()"); - } - - public UnaryCallable - batchCreateUserLinksCallable() { - throw new UnsupportedOperationException("Not implemented: batchCreateUserLinksCallable()"); - } - - public UnaryCallable updateUserLinkCallable() { - throw new UnsupportedOperationException("Not implemented: updateUserLinkCallable()"); - } - - public UnaryCallable - batchUpdateUserLinksCallable() { - throw new UnsupportedOperationException("Not implemented: batchUpdateUserLinksCallable()"); - } - - public UnaryCallable deleteUserLinkCallable() { - throw new UnsupportedOperationException("Not implemented: deleteUserLinkCallable()"); - } - - public UnaryCallable batchDeleteUserLinksCallable() { - throw new UnsupportedOperationException("Not implemented: batchDeleteUserLinksCallable()"); - } - public UnaryCallable createFirebaseLinkCallable() { throw new UnsupportedOperationException("Not implemented: createFirebaseLinkCallable()"); } @@ -1006,6 +952,70 @@ public UnaryCallable deleteEventCreateRuleC throw new UnsupportedOperationException("Not implemented: deleteEventCreateRuleCallable()"); } + public UnaryCallable + updateDataRedactionSettingsCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDataRedactionSettingsCallable()"); + } + + public UnaryCallable + getDataRedactionSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getDataRedactionSettingsCallable()"); + } + + public UnaryCallable + createRollupPropertyCallable() { + throw new UnsupportedOperationException("Not implemented: createRollupPropertyCallable()"); + } + + public UnaryCallable + getRollupPropertySourceLinkCallable() { + throw new UnsupportedOperationException( + "Not implemented: getRollupPropertySourceLinkCallable()"); + } + + public UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listRollupPropertySourceLinksPagedCallable()"); + } + + public UnaryCallable + listRollupPropertySourceLinksCallable() { + throw new UnsupportedOperationException( + "Not implemented: listRollupPropertySourceLinksCallable()"); + } + + public UnaryCallable + createRollupPropertySourceLinkCallable() { + throw new UnsupportedOperationException( + "Not implemented: createRollupPropertySourceLinkCallable()"); + } + + public UnaryCallable + deleteRollupPropertySourceLinkCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteRollupPropertySourceLinkCallable()"); + } + + public UnaryCallable + createSubpropertyCallable() { + throw new UnsupportedOperationException("Not implemented: createSubpropertyCallable()"); + } + + public UnaryCallable + deleteSubpropertyEventFilterCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteSubpropertyEventFilterCallable()"); + } + + public UnaryCallable + createSubpropertyEventFilterCallable() { + throw new UnsupportedOperationException( + "Not implemented: createSubpropertyEventFilterCallable()"); + } + @Override public abstract void close(); } diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java index bcd1c037d9ee..bb2c83b04d03 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java @@ -16,7 +16,6 @@ package com.google.analytics.admin.v1alpha.stub; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; @@ -36,9 +35,9 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; import com.google.analytics.admin.v1alpha.AccessBinding; @@ -54,23 +53,13 @@ import com.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; import com.google.analytics.admin.v1alpha.AttributionSettings; import com.google.analytics.admin.v1alpha.Audience; -import com.google.analytics.admin.v1alpha.AuditUserLink; -import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; -import com.google.analytics.admin.v1alpha.AuditUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; -import com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; import com.google.analytics.admin.v1alpha.BigQueryLink; import com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; import com.google.analytics.admin.v1alpha.ChangeHistoryEvent; @@ -94,11 +83,17 @@ import com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.CreatePropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse; +import com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyResponse; import com.google.analytics.admin.v1alpha.CustomDimension; import com.google.analytics.admin.v1alpha.CustomMetric; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; import com.google.analytics.admin.v1alpha.DataRetentionSettings; import com.google.analytics.admin.v1alpha.DataSharingSettings; import com.google.analytics.admin.v1alpha.DataStream; @@ -117,9 +112,10 @@ import com.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.DeletePropertyRequest; +import com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; +import com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; import com.google.analytics.admin.v1alpha.EnhancedMeasurementSettings; @@ -140,6 +136,7 @@ import com.google.analytics.admin.v1alpha.GetConversionEventRequest; import com.google.analytics.admin.v1alpha.GetCustomDimensionRequest; import com.google.analytics.admin.v1alpha.GetCustomMetricRequest; +import com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataStreamRequest; @@ -152,9 +149,9 @@ import com.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; import com.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.GetPropertyRequest; +import com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.GetUserLinkRequest; import com.google.analytics.admin.v1alpha.GlobalSiteTag; import com.google.analytics.admin.v1alpha.GoogleAdsLink; import com.google.analytics.admin.v1alpha.GoogleSignalsSettings; @@ -198,16 +195,17 @@ import com.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; import com.google.analytics.admin.v1alpha.ListPropertiesRequest; import com.google.analytics.admin.v1alpha.ListPropertiesResponse; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasResponse; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksResponse; -import com.google.analytics.admin.v1alpha.ListUserLinksRequest; -import com.google.analytics.admin.v1alpha.ListUserLinksResponse; import com.google.analytics.admin.v1alpha.MeasurementProtocolSecret; import com.google.analytics.admin.v1alpha.Property; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; import com.google.analytics.admin.v1alpha.RunAccessReportRequest; import com.google.analytics.admin.v1alpha.RunAccessReportResponse; import com.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema; @@ -216,6 +214,7 @@ import com.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; import com.google.analytics.admin.v1alpha.UpdateAccessBindingRequest; import com.google.analytics.admin.v1alpha.UpdateAccountRequest; import com.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; @@ -224,6 +223,7 @@ import com.google.analytics.admin.v1alpha.UpdateConversionEventRequest; import com.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; import com.google.analytics.admin.v1alpha.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataStreamRequest; import com.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; @@ -236,8 +236,6 @@ import com.google.analytics.admin.v1alpha.UpdatePropertyRequest; import com.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; @@ -345,23 +343,6 @@ public class AnalyticsAdminServiceStubSettings private final UnaryCallSettings createPropertySettings; private final UnaryCallSettings deletePropertySettings; private final UnaryCallSettings updatePropertySettings; - private final UnaryCallSettings getUserLinkSettings; - private final UnaryCallSettings - batchGetUserLinksSettings; - private final PagedCallSettings< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse> - listUserLinksSettings; - private final PagedCallSettings< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - auditUserLinksSettings; - private final UnaryCallSettings createUserLinkSettings; - private final UnaryCallSettings - batchCreateUserLinksSettings; - private final UnaryCallSettings updateUserLinkSettings; - private final UnaryCallSettings - batchUpdateUserLinksSettings; - private final UnaryCallSettings deleteUserLinkSettings; - private final UnaryCallSettings batchDeleteUserLinksSettings; private final UnaryCallSettings createFirebaseLinkSettings; private final UnaryCallSettings deleteFirebaseLinkSettings; @@ -613,6 +594,29 @@ public class AnalyticsAdminServiceStubSettings updateEventCreateRuleSettings; private final UnaryCallSettings deleteEventCreateRuleSettings; + private final UnaryCallSettings + updateDataRedactionSettingsSettings; + private final UnaryCallSettings + getDataRedactionSettingsSettings; + private final UnaryCallSettings + createRollupPropertySettings; + private final UnaryCallSettings + getRollupPropertySourceLinkSettings; + private final PagedCallSettings< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksSettings; + private final UnaryCallSettings + createRollupPropertySourceLinkSettings; + private final UnaryCallSettings + deleteRollupPropertySourceLinkSettings; + private final UnaryCallSettings + createSubpropertySettings; + private final UnaryCallSettings + deleteSubpropertyEventFilterSettings; + private final UnaryCallSettings + createSubpropertyEventFilterSettings; private static final PagedListDescriptor LIST_ACCOUNTS_PAGE_STR_DESC = @@ -727,80 +731,6 @@ public Iterable extractResources(ListPropertiesResponse payload) { } }; - private static final PagedListDescriptor - LIST_USER_LINKS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListUserLinksRequest injectToken(ListUserLinksRequest payload, String token) { - return ListUserLinksRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListUserLinksRequest injectPageSize(ListUserLinksRequest payload, int pageSize) { - return ListUserLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListUserLinksRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListUserLinksResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListUserLinksResponse payload) { - return payload.getUserLinksList() == null - ? ImmutableList.of() - : payload.getUserLinksList(); - } - }; - - private static final PagedListDescriptor< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLink> - AUDIT_USER_LINKS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public AuditUserLinksRequest injectToken(AuditUserLinksRequest payload, String token) { - return AuditUserLinksRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public AuditUserLinksRequest injectPageSize( - AuditUserLinksRequest payload, int pageSize) { - return AuditUserLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(AuditUserLinksRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(AuditUserLinksResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(AuditUserLinksResponse payload) { - return payload.getUserLinksList() == null - ? ImmutableList.of() - : payload.getUserLinksList(); - } - }; - private static final PagedListDescriptor< ListFirebaseLinksRequest, ListFirebaseLinksResponse, FirebaseLink> LIST_FIREBASE_LINKS_PAGE_STR_DESC = @@ -1606,6 +1536,55 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink> + LIST_ROLLUP_PROPERTY_SOURCE_LINKS_PAGE_STR_DESC = + new PagedListDescriptor< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRollupPropertySourceLinksRequest injectToken( + ListRollupPropertySourceLinksRequest payload, String token) { + return ListRollupPropertySourceLinksRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListRollupPropertySourceLinksRequest injectPageSize( + ListRollupPropertySourceLinksRequest payload, int pageSize) { + return ListRollupPropertySourceLinksRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListRollupPropertySourceLinksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRollupPropertySourceLinksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListRollupPropertySourceLinksResponse payload) { + return payload.getRollupPropertySourceLinksList() == null + ? ImmutableList.of() + : payload.getRollupPropertySourceLinksList(); + } + }; + private static final PagedListResponseFactory< ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> LIST_ACCOUNTS_PAGE_STR_FACT = @@ -1663,42 +1642,6 @@ public ApiFuture getFuturePagedResponse( } }; - private static final PagedListResponseFactory< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse> - LIST_USER_LINKS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListUserLinksRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_USER_LINKS_PAGE_STR_DESC, request, context); - return ListUserLinksPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - AUDIT_USER_LINKS_PAGE_STR_FACT = - new PagedListResponseFactory< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - AuditUserLinksRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, AUDIT_USER_LINKS_PAGE_STR_DESC, request, context); - return AuditUserLinksPagedResponse.createAsync(pageContext, futureResponse); - } - }; - private static final PagedListResponseFactory< ListFirebaseLinksRequest, ListFirebaseLinksResponse, ListFirebaseLinksPagedResponse> LIST_FIREBASE_LINKS_PAGE_STR_FACT = @@ -2161,6 +2104,38 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse> + LIST_ROLLUP_PROPERTY_SOURCE_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksResponse> + callable, + ListRollupPropertySourceLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + RollupPropertySourceLink> + pageContext = + PageContext.create( + callable, + LIST_ROLLUP_PROPERTY_SOURCE_LINKS_PAGE_STR_DESC, + request, + context); + return ListRollupPropertySourceLinksPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to getAccount. */ public UnaryCallSettings getAccountSettings() { return getAccountSettings; @@ -2224,62 +2199,6 @@ public UnaryCallSettings updatePropertySettings return updatePropertySettings; } - /** Returns the object with the settings used for calls to getUserLink. */ - public UnaryCallSettings getUserLinkSettings() { - return getUserLinkSettings; - } - - /** Returns the object with the settings used for calls to batchGetUserLinks. */ - public UnaryCallSettings - batchGetUserLinksSettings() { - return batchGetUserLinksSettings; - } - - /** Returns the object with the settings used for calls to listUserLinks. */ - public PagedCallSettings - listUserLinksSettings() { - return listUserLinksSettings; - } - - /** Returns the object with the settings used for calls to auditUserLinks. */ - public PagedCallSettings< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - auditUserLinksSettings() { - return auditUserLinksSettings; - } - - /** Returns the object with the settings used for calls to createUserLink. */ - public UnaryCallSettings createUserLinkSettings() { - return createUserLinkSettings; - } - - /** Returns the object with the settings used for calls to batchCreateUserLinks. */ - public UnaryCallSettings - batchCreateUserLinksSettings() { - return batchCreateUserLinksSettings; - } - - /** Returns the object with the settings used for calls to updateUserLink. */ - public UnaryCallSettings updateUserLinkSettings() { - return updateUserLinkSettings; - } - - /** Returns the object with the settings used for calls to batchUpdateUserLinks. */ - public UnaryCallSettings - batchUpdateUserLinksSettings() { - return batchUpdateUserLinksSettings; - } - - /** Returns the object with the settings used for calls to deleteUserLink. */ - public UnaryCallSettings deleteUserLinkSettings() { - return deleteUserLinkSettings; - } - - /** Returns the object with the settings used for calls to batchDeleteUserLinks. */ - public UnaryCallSettings batchDeleteUserLinksSettings() { - return batchDeleteUserLinksSettings; - } - /** Returns the object with the settings used for calls to createFirebaseLink. */ public UnaryCallSettings createFirebaseLinkSettings() { return createFirebaseLinkSettings; @@ -2969,6 +2888,69 @@ public UnaryCallSettings deleteEventCreateR return deleteEventCreateRuleSettings; } + /** Returns the object with the settings used for calls to updateDataRedactionSettings. */ + public UnaryCallSettings + updateDataRedactionSettingsSettings() { + return updateDataRedactionSettingsSettings; + } + + /** Returns the object with the settings used for calls to getDataRedactionSettings. */ + public UnaryCallSettings + getDataRedactionSettingsSettings() { + return getDataRedactionSettingsSettings; + } + + /** Returns the object with the settings used for calls to createRollupProperty. */ + public UnaryCallSettings + createRollupPropertySettings() { + return createRollupPropertySettings; + } + + /** Returns the object with the settings used for calls to getRollupPropertySourceLink. */ + public UnaryCallSettings + getRollupPropertySourceLinkSettings() { + return getRollupPropertySourceLinkSettings; + } + + /** Returns the object with the settings used for calls to listRollupPropertySourceLinks. */ + public PagedCallSettings< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksSettings() { + return listRollupPropertySourceLinksSettings; + } + + /** Returns the object with the settings used for calls to createRollupPropertySourceLink. */ + public UnaryCallSettings + createRollupPropertySourceLinkSettings() { + return createRollupPropertySourceLinkSettings; + } + + /** Returns the object with the settings used for calls to deleteRollupPropertySourceLink. */ + public UnaryCallSettings + deleteRollupPropertySourceLinkSettings() { + return deleteRollupPropertySourceLinkSettings; + } + + /** Returns the object with the settings used for calls to createSubproperty. */ + public UnaryCallSettings + createSubpropertySettings() { + return createSubpropertySettings; + } + + /** Returns the object with the settings used for calls to deleteSubpropertyEventFilter. */ + public UnaryCallSettings + deleteSubpropertyEventFilterSettings() { + return deleteSubpropertyEventFilterSettings; + } + + /** Returns the object with the settings used for calls to createSubpropertyEventFilter. */ + public UnaryCallSettings + createSubpropertyEventFilterSettings() { + return createSubpropertyEventFilterSettings; + } + public AnalyticsAdminServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -3086,16 +3068,6 @@ protected AnalyticsAdminServiceStubSettings(Builder settingsBuilder) throws IOEx createPropertySettings = settingsBuilder.createPropertySettings().build(); deletePropertySettings = settingsBuilder.deletePropertySettings().build(); updatePropertySettings = settingsBuilder.updatePropertySettings().build(); - getUserLinkSettings = settingsBuilder.getUserLinkSettings().build(); - batchGetUserLinksSettings = settingsBuilder.batchGetUserLinksSettings().build(); - listUserLinksSettings = settingsBuilder.listUserLinksSettings().build(); - auditUserLinksSettings = settingsBuilder.auditUserLinksSettings().build(); - createUserLinkSettings = settingsBuilder.createUserLinkSettings().build(); - batchCreateUserLinksSettings = settingsBuilder.batchCreateUserLinksSettings().build(); - updateUserLinkSettings = settingsBuilder.updateUserLinkSettings().build(); - batchUpdateUserLinksSettings = settingsBuilder.batchUpdateUserLinksSettings().build(); - deleteUserLinkSettings = settingsBuilder.deleteUserLinkSettings().build(); - batchDeleteUserLinksSettings = settingsBuilder.batchDeleteUserLinksSettings().build(); createFirebaseLinkSettings = settingsBuilder.createFirebaseLinkSettings().build(); deleteFirebaseLinkSettings = settingsBuilder.deleteFirebaseLinkSettings().build(); listFirebaseLinksSettings = settingsBuilder.listFirebaseLinksSettings().build(); @@ -3231,6 +3203,23 @@ protected AnalyticsAdminServiceStubSettings(Builder settingsBuilder) throws IOEx createEventCreateRuleSettings = settingsBuilder.createEventCreateRuleSettings().build(); updateEventCreateRuleSettings = settingsBuilder.updateEventCreateRuleSettings().build(); deleteEventCreateRuleSettings = settingsBuilder.deleteEventCreateRuleSettings().build(); + updateDataRedactionSettingsSettings = + settingsBuilder.updateDataRedactionSettingsSettings().build(); + getDataRedactionSettingsSettings = settingsBuilder.getDataRedactionSettingsSettings().build(); + createRollupPropertySettings = settingsBuilder.createRollupPropertySettings().build(); + getRollupPropertySourceLinkSettings = + settingsBuilder.getRollupPropertySourceLinkSettings().build(); + listRollupPropertySourceLinksSettings = + settingsBuilder.listRollupPropertySourceLinksSettings().build(); + createRollupPropertySourceLinkSettings = + settingsBuilder.createRollupPropertySourceLinkSettings().build(); + deleteRollupPropertySourceLinkSettings = + settingsBuilder.deleteRollupPropertySourceLinkSettings().build(); + createSubpropertySettings = settingsBuilder.createSubpropertySettings().build(); + deleteSubpropertyEventFilterSettings = + settingsBuilder.deleteSubpropertyEventFilterSettings().build(); + createSubpropertyEventFilterSettings = + settingsBuilder.createSubpropertyEventFilterSettings().build(); } /** Builder for AnalyticsAdminServiceStubSettings. */ @@ -3258,26 +3247,6 @@ public static class Builder private final UnaryCallSettings.Builder createPropertySettings; private final UnaryCallSettings.Builder deletePropertySettings; private final UnaryCallSettings.Builder updatePropertySettings; - private final UnaryCallSettings.Builder getUserLinkSettings; - private final UnaryCallSettings.Builder - batchGetUserLinksSettings; - private final PagedCallSettings.Builder< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse> - listUserLinksSettings; - private final PagedCallSettings.Builder< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - auditUserLinksSettings; - private final UnaryCallSettings.Builder createUserLinkSettings; - private final UnaryCallSettings.Builder< - BatchCreateUserLinksRequest, BatchCreateUserLinksResponse> - batchCreateUserLinksSettings; - private final UnaryCallSettings.Builder updateUserLinkSettings; - private final UnaryCallSettings.Builder< - BatchUpdateUserLinksRequest, BatchUpdateUserLinksResponse> - batchUpdateUserLinksSettings; - private final UnaryCallSettings.Builder deleteUserLinkSettings; - private final UnaryCallSettings.Builder - batchDeleteUserLinksSettings; private final UnaryCallSettings.Builder createFirebaseLinkSettings; private final UnaryCallSettings.Builder @@ -3557,6 +3526,34 @@ public static class Builder updateEventCreateRuleSettings; private final UnaryCallSettings.Builder deleteEventCreateRuleSettings; + private final UnaryCallSettings.Builder< + UpdateDataRedactionSettingsRequest, DataRedactionSettings> + updateDataRedactionSettingsSettings; + private final UnaryCallSettings.Builder + getDataRedactionSettingsSettings; + private final UnaryCallSettings.Builder< + CreateRollupPropertyRequest, CreateRollupPropertyResponse> + createRollupPropertySettings; + private final UnaryCallSettings.Builder< + GetRollupPropertySourceLinkRequest, RollupPropertySourceLink> + getRollupPropertySourceLinkSettings; + private final PagedCallSettings.Builder< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksSettings; + private final UnaryCallSettings.Builder< + CreateRollupPropertySourceLinkRequest, RollupPropertySourceLink> + createRollupPropertySourceLinkSettings; + private final UnaryCallSettings.Builder + deleteRollupPropertySourceLinkSettings; + private final UnaryCallSettings.Builder + createSubpropertySettings; + private final UnaryCallSettings.Builder + deleteSubpropertyEventFilterSettings; + private final UnaryCallSettings.Builder< + CreateSubpropertyEventFilterRequest, SubpropertyEventFilter> + createSubpropertyEventFilterSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -3619,16 +3616,6 @@ protected Builder(ClientContext clientContext) { createPropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deletePropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updatePropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchGetUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listUserLinksSettings = PagedCallSettings.newBuilder(LIST_USER_LINKS_PAGE_STR_FACT); - auditUserLinksSettings = PagedCallSettings.newBuilder(AUDIT_USER_LINKS_PAGE_STR_FACT); - createUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchCreateUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchUpdateUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchDeleteUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createFirebaseLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteFirebaseLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listFirebaseLinksSettings = PagedCallSettings.newBuilder(LIST_FIREBASE_LINKS_PAGE_STR_FACT); @@ -3757,6 +3744,17 @@ protected Builder(ClientContext clientContext) { createEventCreateRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateEventCreateRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteEventCreateRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataRedactionSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getDataRedactionSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRollupPropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getRollupPropertySourceLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRollupPropertySourceLinksSettings = + PagedCallSettings.newBuilder(LIST_ROLLUP_PROPERTY_SOURCE_LINKS_PAGE_STR_FACT); + createRollupPropertySourceLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRollupPropertySourceLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSubpropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSubpropertyEventFilterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSubpropertyEventFilterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -3771,16 +3769,6 @@ protected Builder(ClientContext clientContext) { createPropertySettings, deletePropertySettings, updatePropertySettings, - getUserLinkSettings, - batchGetUserLinksSettings, - listUserLinksSettings, - auditUserLinksSettings, - createUserLinkSettings, - batchCreateUserLinksSettings, - updateUserLinkSettings, - batchUpdateUserLinksSettings, - deleteUserLinkSettings, - batchDeleteUserLinksSettings, createFirebaseLinkSettings, deleteFirebaseLinkSettings, listFirebaseLinksSettings, @@ -3887,7 +3875,17 @@ protected Builder(ClientContext clientContext) { listEventCreateRulesSettings, createEventCreateRuleSettings, updateEventCreateRuleSettings, - deleteEventCreateRuleSettings); + deleteEventCreateRuleSettings, + updateDataRedactionSettingsSettings, + getDataRedactionSettingsSettings, + createRollupPropertySettings, + getRollupPropertySourceLinkSettings, + listRollupPropertySourceLinksSettings, + createRollupPropertySourceLinkSettings, + deleteRollupPropertySourceLinkSettings, + createSubpropertySettings, + deleteSubpropertyEventFilterSettings, + createSubpropertyEventFilterSettings); initDefaults(this); } @@ -3905,16 +3903,6 @@ protected Builder(AnalyticsAdminServiceStubSettings settings) { createPropertySettings = settings.createPropertySettings.toBuilder(); deletePropertySettings = settings.deletePropertySettings.toBuilder(); updatePropertySettings = settings.updatePropertySettings.toBuilder(); - getUserLinkSettings = settings.getUserLinkSettings.toBuilder(); - batchGetUserLinksSettings = settings.batchGetUserLinksSettings.toBuilder(); - listUserLinksSettings = settings.listUserLinksSettings.toBuilder(); - auditUserLinksSettings = settings.auditUserLinksSettings.toBuilder(); - createUserLinkSettings = settings.createUserLinkSettings.toBuilder(); - batchCreateUserLinksSettings = settings.batchCreateUserLinksSettings.toBuilder(); - updateUserLinkSettings = settings.updateUserLinkSettings.toBuilder(); - batchUpdateUserLinksSettings = settings.batchUpdateUserLinksSettings.toBuilder(); - deleteUserLinkSettings = settings.deleteUserLinkSettings.toBuilder(); - batchDeleteUserLinksSettings = settings.batchDeleteUserLinksSettings.toBuilder(); createFirebaseLinkSettings = settings.createFirebaseLinkSettings.toBuilder(); deleteFirebaseLinkSettings = settings.deleteFirebaseLinkSettings.toBuilder(); listFirebaseLinksSettings = settings.listFirebaseLinksSettings.toBuilder(); @@ -4050,6 +4038,23 @@ protected Builder(AnalyticsAdminServiceStubSettings settings) { createEventCreateRuleSettings = settings.createEventCreateRuleSettings.toBuilder(); updateEventCreateRuleSettings = settings.updateEventCreateRuleSettings.toBuilder(); deleteEventCreateRuleSettings = settings.deleteEventCreateRuleSettings.toBuilder(); + updateDataRedactionSettingsSettings = + settings.updateDataRedactionSettingsSettings.toBuilder(); + getDataRedactionSettingsSettings = settings.getDataRedactionSettingsSettings.toBuilder(); + createRollupPropertySettings = settings.createRollupPropertySettings.toBuilder(); + getRollupPropertySourceLinkSettings = + settings.getRollupPropertySourceLinkSettings.toBuilder(); + listRollupPropertySourceLinksSettings = + settings.listRollupPropertySourceLinksSettings.toBuilder(); + createRollupPropertySourceLinkSettings = + settings.createRollupPropertySourceLinkSettings.toBuilder(); + deleteRollupPropertySourceLinkSettings = + settings.deleteRollupPropertySourceLinkSettings.toBuilder(); + createSubpropertySettings = settings.createSubpropertySettings.toBuilder(); + deleteSubpropertyEventFilterSettings = + settings.deleteSubpropertyEventFilterSettings.toBuilder(); + createSubpropertyEventFilterSettings = + settings.createSubpropertyEventFilterSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -4064,16 +4069,6 @@ protected Builder(AnalyticsAdminServiceStubSettings settings) { createPropertySettings, deletePropertySettings, updatePropertySettings, - getUserLinkSettings, - batchGetUserLinksSettings, - listUserLinksSettings, - auditUserLinksSettings, - createUserLinkSettings, - batchCreateUserLinksSettings, - updateUserLinkSettings, - batchUpdateUserLinksSettings, - deleteUserLinkSettings, - batchDeleteUserLinksSettings, createFirebaseLinkSettings, deleteFirebaseLinkSettings, listFirebaseLinksSettings, @@ -4180,7 +4175,17 @@ protected Builder(AnalyticsAdminServiceStubSettings settings) { listEventCreateRulesSettings, createEventCreateRuleSettings, updateEventCreateRuleSettings, - deleteEventCreateRuleSettings); + deleteEventCreateRuleSettings, + updateDataRedactionSettingsSettings, + getDataRedactionSettingsSettings, + createRollupPropertySettings, + getRollupPropertySourceLinkSettings, + listRollupPropertySourceLinksSettings, + createRollupPropertySourceLinkSettings, + deleteRollupPropertySourceLinkSettings, + createSubpropertySettings, + deleteSubpropertyEventFilterSettings, + createSubpropertyEventFilterSettings); } private static Builder createDefault() { @@ -4265,56 +4270,6 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - builder - .getUserLinkSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchGetUserLinksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listUserLinksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .auditUserLinksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .createUserLinkSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchCreateUserLinksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateUserLinkSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchUpdateUserLinksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .deleteUserLinkSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .batchDeleteUserLinksSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - builder .createFirebaseLinkSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -4850,6 +4805,56 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .updateDataRedactionSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDataRedactionSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createRollupPropertySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRollupPropertySourceLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listRollupPropertySourceLinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createRollupPropertySourceLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteRollupPropertySourceLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createSubpropertySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteSubpropertyEventFilterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createSubpropertyEventFilterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + return builder; } @@ -4932,64 +4937,6 @@ public UnaryCallSettings.Builder updateProperty return updatePropertySettings; } - /** Returns the builder for the settings used for calls to getUserLink. */ - public UnaryCallSettings.Builder getUserLinkSettings() { - return getUserLinkSettings; - } - - /** Returns the builder for the settings used for calls to batchGetUserLinks. */ - public UnaryCallSettings.Builder - batchGetUserLinksSettings() { - return batchGetUserLinksSettings; - } - - /** Returns the builder for the settings used for calls to listUserLinks. */ - public PagedCallSettings.Builder< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse> - listUserLinksSettings() { - return listUserLinksSettings; - } - - /** Returns the builder for the settings used for calls to auditUserLinks. */ - public PagedCallSettings.Builder< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - auditUserLinksSettings() { - return auditUserLinksSettings; - } - - /** Returns the builder for the settings used for calls to createUserLink. */ - public UnaryCallSettings.Builder createUserLinkSettings() { - return createUserLinkSettings; - } - - /** Returns the builder for the settings used for calls to batchCreateUserLinks. */ - public UnaryCallSettings.Builder - batchCreateUserLinksSettings() { - return batchCreateUserLinksSettings; - } - - /** Returns the builder for the settings used for calls to updateUserLink. */ - public UnaryCallSettings.Builder updateUserLinkSettings() { - return updateUserLinkSettings; - } - - /** Returns the builder for the settings used for calls to batchUpdateUserLinks. */ - public UnaryCallSettings.Builder - batchUpdateUserLinksSettings() { - return batchUpdateUserLinksSettings; - } - - /** Returns the builder for the settings used for calls to deleteUserLink. */ - public UnaryCallSettings.Builder deleteUserLinkSettings() { - return deleteUserLinkSettings; - } - - /** Returns the builder for the settings used for calls to batchDeleteUserLinks. */ - public UnaryCallSettings.Builder - batchDeleteUserLinksSettings() { - return batchDeleteUserLinksSettings; - } - /** Returns the builder for the settings used for calls to createFirebaseLink. */ public UnaryCallSettings.Builder createFirebaseLinkSettings() { @@ -5730,6 +5677,70 @@ public UnaryCallSettings.Builder deleteAdSenseL return deleteEventCreateRuleSettings; } + /** Returns the builder for the settings used for calls to updateDataRedactionSettings. */ + public UnaryCallSettings.Builder + updateDataRedactionSettingsSettings() { + return updateDataRedactionSettingsSettings; + } + + /** Returns the builder for the settings used for calls to getDataRedactionSettings. */ + public UnaryCallSettings.Builder + getDataRedactionSettingsSettings() { + return getDataRedactionSettingsSettings; + } + + /** Returns the builder for the settings used for calls to createRollupProperty. */ + public UnaryCallSettings.Builder + createRollupPropertySettings() { + return createRollupPropertySettings; + } + + /** Returns the builder for the settings used for calls to getRollupPropertySourceLink. */ + public UnaryCallSettings.Builder + getRollupPropertySourceLinkSettings() { + return getRollupPropertySourceLinkSettings; + } + + /** Returns the builder for the settings used for calls to listRollupPropertySourceLinks. */ + public PagedCallSettings.Builder< + ListRollupPropertySourceLinksRequest, + ListRollupPropertySourceLinksResponse, + ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksSettings() { + return listRollupPropertySourceLinksSettings; + } + + /** Returns the builder for the settings used for calls to createRollupPropertySourceLink. */ + public UnaryCallSettings.Builder< + CreateRollupPropertySourceLinkRequest, RollupPropertySourceLink> + createRollupPropertySourceLinkSettings() { + return createRollupPropertySourceLinkSettings; + } + + /** Returns the builder for the settings used for calls to deleteRollupPropertySourceLink. */ + public UnaryCallSettings.Builder + deleteRollupPropertySourceLinkSettings() { + return deleteRollupPropertySourceLinkSettings; + } + + /** Returns the builder for the settings used for calls to createSubproperty. */ + public UnaryCallSettings.Builder + createSubpropertySettings() { + return createSubpropertySettings; + } + + /** Returns the builder for the settings used for calls to deleteSubpropertyEventFilter. */ + public UnaryCallSettings.Builder + deleteSubpropertyEventFilterSettings() { + return deleteSubpropertyEventFilterSettings; + } + + /** Returns the builder for the settings used for calls to createSubpropertyEventFilter. */ + public UnaryCallSettings.Builder + createSubpropertyEventFilterSettings() { + return createSubpropertyEventFilterSettings; + } + @Override public AnalyticsAdminServiceStubSettings build() throws IOException { return new AnalyticsAdminServiceStubSettings(this); diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java index f9b5cddb044c..e455c375570f 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java @@ -16,7 +16,6 @@ package com.google.analytics.admin.v1alpha.stub; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; @@ -36,9 +35,9 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; import com.google.analytics.admin.v1alpha.AccessBinding; @@ -53,22 +52,13 @@ import com.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; import com.google.analytics.admin.v1alpha.AttributionSettings; import com.google.analytics.admin.v1alpha.Audience; -import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; -import com.google.analytics.admin.v1alpha.AuditUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; -import com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; import com.google.analytics.admin.v1alpha.BigQueryLink; import com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; import com.google.analytics.admin.v1alpha.ChannelGroup; @@ -91,11 +81,17 @@ import com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.CreatePropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse; +import com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyResponse; import com.google.analytics.admin.v1alpha.CustomDimension; import com.google.analytics.admin.v1alpha.CustomMetric; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; import com.google.analytics.admin.v1alpha.DataRetentionSettings; import com.google.analytics.admin.v1alpha.DataSharingSettings; import com.google.analytics.admin.v1alpha.DataStream; @@ -114,9 +110,10 @@ import com.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.DeletePropertyRequest; +import com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; +import com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; import com.google.analytics.admin.v1alpha.EnhancedMeasurementSettings; @@ -137,6 +134,7 @@ import com.google.analytics.admin.v1alpha.GetConversionEventRequest; import com.google.analytics.admin.v1alpha.GetCustomDimensionRequest; import com.google.analytics.admin.v1alpha.GetCustomMetricRequest; +import com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataStreamRequest; @@ -149,9 +147,9 @@ import com.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; import com.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.GetPropertyRequest; +import com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.GetUserLinkRequest; import com.google.analytics.admin.v1alpha.GlobalSiteTag; import com.google.analytics.admin.v1alpha.GoogleAdsLink; import com.google.analytics.admin.v1alpha.GoogleSignalsSettings; @@ -195,16 +193,17 @@ import com.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; import com.google.analytics.admin.v1alpha.ListPropertiesRequest; import com.google.analytics.admin.v1alpha.ListPropertiesResponse; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasResponse; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksResponse; -import com.google.analytics.admin.v1alpha.ListUserLinksRequest; -import com.google.analytics.admin.v1alpha.ListUserLinksResponse; import com.google.analytics.admin.v1alpha.MeasurementProtocolSecret; import com.google.analytics.admin.v1alpha.Property; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; import com.google.analytics.admin.v1alpha.RunAccessReportRequest; import com.google.analytics.admin.v1alpha.RunAccessReportResponse; import com.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema; @@ -213,6 +212,7 @@ import com.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; import com.google.analytics.admin.v1alpha.UpdateAccessBindingRequest; import com.google.analytics.admin.v1alpha.UpdateAccountRequest; import com.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; @@ -221,6 +221,7 @@ import com.google.analytics.admin.v1alpha.UpdateConversionEventRequest; import com.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; import com.google.analytics.admin.v1alpha.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataStreamRequest; import com.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; @@ -233,8 +234,6 @@ import com.google.analytics.admin.v1alpha.UpdatePropertyRequest; import com.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -377,118 +376,6 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) .build(); - private static final MethodDescriptor getUserLinkMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.analytics.admin.v1alpha.AnalyticsAdminService/GetUserLink") - .setRequestMarshaller(ProtoUtils.marshaller(GetUserLinkRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(UserLink.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchGetUserLinksMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetUserLinks") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchGetUserLinksRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchGetUserLinksResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listUserLinksMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListUserLinks") - .setRequestMarshaller( - ProtoUtils.marshaller(ListUserLinksRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListUserLinksResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - auditUserLinksMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/AuditUserLinks") - .setRequestMarshaller( - ProtoUtils.marshaller(AuditUserLinksRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(AuditUserLinksResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createUserLinkMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateUserLink") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateUserLinkRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(UserLink.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchCreateUserLinksMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateUserLinks") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchCreateUserLinksRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchCreateUserLinksResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateUserLinkMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateUserLink") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateUserLinkRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(UserLink.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchUpdateUserLinksMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateUserLinks") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchUpdateUserLinksRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchUpdateUserLinksResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteUserLinkMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteUserLink") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteUserLinkRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchDeleteUserLinksMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteUserLinks") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchDeleteUserLinksRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - private static final MethodDescriptor createFirebaseLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -1827,6 +1714,131 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + updateDataRedactionSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRedactionSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataRedactionSettingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DataRedactionSettings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataRedactionSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRedactionSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataRedactionSettingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DataRedactionSettings.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createRollupPropertyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupProperty") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateRollupPropertyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CreateRollupPropertyResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GetRollupPropertySourceLinkRequest, RollupPropertySourceLink> + getRollupPropertySourceLinkMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetRollupPropertySourceLink") + .setRequestMarshaller( + ProtoUtils.marshaller(GetRollupPropertySourceLinkRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RollupPropertySourceLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksResponse> + listRollupPropertySourceLinksMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListRollupPropertySourceLinks") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRollupPropertySourceLinksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRollupPropertySourceLinksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + CreateRollupPropertySourceLinkRequest, RollupPropertySourceLink> + createRollupPropertySourceLinkMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupPropertySourceLink") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateRollupPropertySourceLinkRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RollupPropertySourceLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteRollupPropertySourceLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteRollupPropertySourceLink") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteRollupPropertySourceLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSubpropertyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSubproperty") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSubpropertyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CreateSubpropertyResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSubpropertyEventFilterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSubpropertyEventFilter") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteSubpropertyEventFilterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSubpropertyEventFilterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSubpropertyEventFilter") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSubpropertyEventFilterRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SubpropertyEventFilter.getDefaultInstance())) + .build(); + private final UnaryCallable getAccountCallable; private final UnaryCallable listAccountsCallable; private final UnaryCallable @@ -1846,23 +1858,6 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { private final UnaryCallable createPropertyCallable; private final UnaryCallable deletePropertyCallable; private final UnaryCallable updatePropertyCallable; - private final UnaryCallable getUserLinkCallable; - private final UnaryCallable - batchGetUserLinksCallable; - private final UnaryCallable listUserLinksCallable; - private final UnaryCallable - listUserLinksPagedCallable; - private final UnaryCallable auditUserLinksCallable; - private final UnaryCallable - auditUserLinksPagedCallable; - private final UnaryCallable createUserLinkCallable; - private final UnaryCallable - batchCreateUserLinksCallable; - private final UnaryCallable updateUserLinkCallable; - private final UnaryCallable - batchUpdateUserLinksCallable; - private final UnaryCallable deleteUserLinkCallable; - private final UnaryCallable batchDeleteUserLinksCallable; private final UnaryCallable createFirebaseLinkCallable; private final UnaryCallable deleteFirebaseLinkCallable; private final UnaryCallable @@ -2110,6 +2105,30 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { private final UnaryCallable updateEventCreateRuleCallable; private final UnaryCallable deleteEventCreateRuleCallable; + private final UnaryCallable + updateDataRedactionSettingsCallable; + private final UnaryCallable + getDataRedactionSettingsCallable; + private final UnaryCallable + createRollupPropertyCallable; + private final UnaryCallable + getRollupPropertySourceLinkCallable; + private final UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksResponse> + listRollupPropertySourceLinksCallable; + private final UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksPagedCallable; + private final UnaryCallable + createRollupPropertySourceLinkCallable; + private final UnaryCallable + deleteRollupPropertySourceLinkCallable; + private final UnaryCallable + createSubpropertyCallable; + private final UnaryCallable + deleteSubpropertyEventFilterCallable; + private final UnaryCallable + createSubpropertyEventFilterCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -2239,110 +2258,6 @@ protected GrpcAnalyticsAdminServiceStub( return builder.build(); }) .build(); - GrpcCallSettings getUserLinkTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getUserLinkMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - GrpcCallSettings - batchGetUserLinksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchGetUserLinksMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings listUserLinksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listUserLinksMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings - auditUserLinksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(auditUserLinksMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings createUserLinkTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createUserLinkMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings - batchCreateUserLinksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchCreateUserLinksMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings updateUserLinkTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateUserLinkMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("user_link.name", String.valueOf(request.getUserLink().getName())); - return builder.build(); - }) - .build(); - GrpcCallSettings - batchUpdateUserLinksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchUpdateUserLinksMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - GrpcCallSettings deleteUserLinkTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteUserLinkMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - GrpcCallSettings batchDeleteUserLinksTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchDeleteUserLinksMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); GrpcCallSettings createFirebaseLinkTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createFirebaseLinkMethodDescriptor) @@ -3555,6 +3470,111 @@ protected GrpcAnalyticsAdminServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + updateDataRedactionSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataRedactionSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_redaction_settings.name", + String.valueOf(request.getDataRedactionSettings().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getDataRedactionSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataRedactionSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createRollupPropertyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRollupPropertyMethodDescriptor) + .build(); + GrpcCallSettings + getRollupPropertySourceLinkTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getRollupPropertySourceLinkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listRollupPropertySourceLinksTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listRollupPropertySourceLinksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createRollupPropertySourceLinkTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(createRollupPropertySourceLinkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteRollupPropertySourceLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRollupPropertySourceLinkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createSubpropertyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSubpropertyMethodDescriptor) + .build(); + GrpcCallSettings + deleteSubpropertyEventFilterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSubpropertyEventFilterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createSubpropertyEventFilterTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(createSubpropertyEventFilterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); this.getAccountCallable = callableFactory.createUnaryCallable( @@ -3604,50 +3624,6 @@ protected GrpcAnalyticsAdminServiceStub( this.updatePropertyCallable = callableFactory.createUnaryCallable( updatePropertyTransportSettings, settings.updatePropertySettings(), clientContext); - this.getUserLinkCallable = - callableFactory.createUnaryCallable( - getUserLinkTransportSettings, settings.getUserLinkSettings(), clientContext); - this.batchGetUserLinksCallable = - callableFactory.createUnaryCallable( - batchGetUserLinksTransportSettings, - settings.batchGetUserLinksSettings(), - clientContext); - this.listUserLinksCallable = - callableFactory.createUnaryCallable( - listUserLinksTransportSettings, settings.listUserLinksSettings(), clientContext); - this.listUserLinksPagedCallable = - callableFactory.createPagedCallable( - listUserLinksTransportSettings, settings.listUserLinksSettings(), clientContext); - this.auditUserLinksCallable = - callableFactory.createUnaryCallable( - auditUserLinksTransportSettings, settings.auditUserLinksSettings(), clientContext); - this.auditUserLinksPagedCallable = - callableFactory.createPagedCallable( - auditUserLinksTransportSettings, settings.auditUserLinksSettings(), clientContext); - this.createUserLinkCallable = - callableFactory.createUnaryCallable( - createUserLinkTransportSettings, settings.createUserLinkSettings(), clientContext); - this.batchCreateUserLinksCallable = - callableFactory.createUnaryCallable( - batchCreateUserLinksTransportSettings, - settings.batchCreateUserLinksSettings(), - clientContext); - this.updateUserLinkCallable = - callableFactory.createUnaryCallable( - updateUserLinkTransportSettings, settings.updateUserLinkSettings(), clientContext); - this.batchUpdateUserLinksCallable = - callableFactory.createUnaryCallable( - batchUpdateUserLinksTransportSettings, - settings.batchUpdateUserLinksSettings(), - clientContext); - this.deleteUserLinkCallable = - callableFactory.createUnaryCallable( - deleteUserLinkTransportSettings, settings.deleteUserLinkSettings(), clientContext); - this.batchDeleteUserLinksCallable = - callableFactory.createUnaryCallable( - batchDeleteUserLinksTransportSettings, - settings.batchDeleteUserLinksSettings(), - clientContext); this.createFirebaseLinkCallable = callableFactory.createUnaryCallable( createFirebaseLinkTransportSettings, @@ -4236,6 +4212,61 @@ protected GrpcAnalyticsAdminServiceStub( deleteEventCreateRuleTransportSettings, settings.deleteEventCreateRuleSettings(), clientContext); + this.updateDataRedactionSettingsCallable = + callableFactory.createUnaryCallable( + updateDataRedactionSettingsTransportSettings, + settings.updateDataRedactionSettingsSettings(), + clientContext); + this.getDataRedactionSettingsCallable = + callableFactory.createUnaryCallable( + getDataRedactionSettingsTransportSettings, + settings.getDataRedactionSettingsSettings(), + clientContext); + this.createRollupPropertyCallable = + callableFactory.createUnaryCallable( + createRollupPropertyTransportSettings, + settings.createRollupPropertySettings(), + clientContext); + this.getRollupPropertySourceLinkCallable = + callableFactory.createUnaryCallable( + getRollupPropertySourceLinkTransportSettings, + settings.getRollupPropertySourceLinkSettings(), + clientContext); + this.listRollupPropertySourceLinksCallable = + callableFactory.createUnaryCallable( + listRollupPropertySourceLinksTransportSettings, + settings.listRollupPropertySourceLinksSettings(), + clientContext); + this.listRollupPropertySourceLinksPagedCallable = + callableFactory.createPagedCallable( + listRollupPropertySourceLinksTransportSettings, + settings.listRollupPropertySourceLinksSettings(), + clientContext); + this.createRollupPropertySourceLinkCallable = + callableFactory.createUnaryCallable( + createRollupPropertySourceLinkTransportSettings, + settings.createRollupPropertySourceLinkSettings(), + clientContext); + this.deleteRollupPropertySourceLinkCallable = + callableFactory.createUnaryCallable( + deleteRollupPropertySourceLinkTransportSettings, + settings.deleteRollupPropertySourceLinkSettings(), + clientContext); + this.createSubpropertyCallable = + callableFactory.createUnaryCallable( + createSubpropertyTransportSettings, + settings.createSubpropertySettings(), + clientContext); + this.deleteSubpropertyEventFilterCallable = + callableFactory.createUnaryCallable( + deleteSubpropertyEventFilterTransportSettings, + settings.deleteSubpropertyEventFilterSettings(), + clientContext); + this.createSubpropertyEventFilterCallable = + callableFactory.createUnaryCallable( + createSubpropertyEventFilterTransportSettings, + settings.createSubpropertyEventFilterSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -4319,71 +4350,6 @@ public UnaryCallable updatePropertyCallable() { return updatePropertyCallable; } - @Override - public UnaryCallable getUserLinkCallable() { - return getUserLinkCallable; - } - - @Override - public UnaryCallable - batchGetUserLinksCallable() { - return batchGetUserLinksCallable; - } - - @Override - public UnaryCallable listUserLinksCallable() { - return listUserLinksCallable; - } - - @Override - public UnaryCallable - listUserLinksPagedCallable() { - return listUserLinksPagedCallable; - } - - @Override - public UnaryCallable auditUserLinksCallable() { - return auditUserLinksCallable; - } - - @Override - public UnaryCallable - auditUserLinksPagedCallable() { - return auditUserLinksPagedCallable; - } - - @Override - public UnaryCallable createUserLinkCallable() { - return createUserLinkCallable; - } - - @Override - public UnaryCallable - batchCreateUserLinksCallable() { - return batchCreateUserLinksCallable; - } - - @Override - public UnaryCallable updateUserLinkCallable() { - return updateUserLinkCallable; - } - - @Override - public UnaryCallable - batchUpdateUserLinksCallable() { - return batchUpdateUserLinksCallable; - } - - @Override - public UnaryCallable deleteUserLinkCallable() { - return deleteUserLinkCallable; - } - - @Override - public UnaryCallable batchDeleteUserLinksCallable() { - return batchDeleteUserLinksCallable; - } - @Override public UnaryCallable createFirebaseLinkCallable() { return createFirebaseLinkCallable; @@ -5118,6 +5084,73 @@ public UnaryCallable deleteEventCreateRuleC return deleteEventCreateRuleCallable; } + @Override + public UnaryCallable + updateDataRedactionSettingsCallable() { + return updateDataRedactionSettingsCallable; + } + + @Override + public UnaryCallable + getDataRedactionSettingsCallable() { + return getDataRedactionSettingsCallable; + } + + @Override + public UnaryCallable + createRollupPropertyCallable() { + return createRollupPropertyCallable; + } + + @Override + public UnaryCallable + getRollupPropertySourceLinkCallable() { + return getRollupPropertySourceLinkCallable; + } + + @Override + public UnaryCallable + listRollupPropertySourceLinksCallable() { + return listRollupPropertySourceLinksCallable; + } + + @Override + public UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksPagedCallable() { + return listRollupPropertySourceLinksPagedCallable; + } + + @Override + public UnaryCallable + createRollupPropertySourceLinkCallable() { + return createRollupPropertySourceLinkCallable; + } + + @Override + public UnaryCallable + deleteRollupPropertySourceLinkCallable() { + return deleteRollupPropertySourceLinkCallable; + } + + @Override + public UnaryCallable + createSubpropertyCallable() { + return createSubpropertyCallable; + } + + @Override + public UnaryCallable + deleteSubpropertyEventFilterCallable() { + return deleteSubpropertyEventFilterCallable; + } + + @Override + public UnaryCallable + createSubpropertyEventFilterCallable() { + return createSubpropertyEventFilterCallable; + } + @Override public final void close() { try { diff --git a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/HttpJsonAnalyticsAdminServiceStub.java b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/HttpJsonAnalyticsAdminServiceStub.java index 36bb1fef084e..e2b1140a9032 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/HttpJsonAnalyticsAdminServiceStub.java +++ b/java-analytics-admin/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/HttpJsonAnalyticsAdminServiceStub.java @@ -16,7 +16,6 @@ package com.google.analytics.admin.v1alpha.stub; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; @@ -36,9 +35,9 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; import com.google.analytics.admin.v1alpha.AccessBinding; @@ -53,22 +52,13 @@ import com.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; import com.google.analytics.admin.v1alpha.AttributionSettings; import com.google.analytics.admin.v1alpha.Audience; -import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; -import com.google.analytics.admin.v1alpha.AuditUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest; -import com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest; import com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; import com.google.analytics.admin.v1alpha.BigQueryLink; import com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; import com.google.analytics.admin.v1alpha.ChannelGroup; @@ -91,11 +81,17 @@ import com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.CreatePropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse; +import com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyResponse; import com.google.analytics.admin.v1alpha.CustomDimension; import com.google.analytics.admin.v1alpha.CustomMetric; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; import com.google.analytics.admin.v1alpha.DataRetentionSettings; import com.google.analytics.admin.v1alpha.DataSharingSettings; import com.google.analytics.admin.v1alpha.DataStream; @@ -114,9 +110,10 @@ import com.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; import com.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.DeletePropertyRequest; +import com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; +import com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; import com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; import com.google.analytics.admin.v1alpha.EnhancedMeasurementSettings; @@ -137,6 +134,7 @@ import com.google.analytics.admin.v1alpha.GetConversionEventRequest; import com.google.analytics.admin.v1alpha.GetCustomDimensionRequest; import com.google.analytics.admin.v1alpha.GetCustomMetricRequest; +import com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; import com.google.analytics.admin.v1alpha.GetDataStreamRequest; @@ -149,9 +147,9 @@ import com.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; import com.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; import com.google.analytics.admin.v1alpha.GetPropertyRequest; +import com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest; import com.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.GetSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.GetUserLinkRequest; import com.google.analytics.admin.v1alpha.GlobalSiteTag; import com.google.analytics.admin.v1alpha.GoogleAdsLink; import com.google.analytics.admin.v1alpha.GoogleSignalsSettings; @@ -195,16 +193,17 @@ import com.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; import com.google.analytics.admin.v1alpha.ListPropertiesRequest; import com.google.analytics.admin.v1alpha.ListPropertiesResponse; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest; import com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasResponse; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest; import com.google.analytics.admin.v1alpha.ListSearchAds360LinksResponse; -import com.google.analytics.admin.v1alpha.ListUserLinksRequest; -import com.google.analytics.admin.v1alpha.ListUserLinksResponse; import com.google.analytics.admin.v1alpha.MeasurementProtocolSecret; import com.google.analytics.admin.v1alpha.Property; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; import com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; import com.google.analytics.admin.v1alpha.RunAccessReportRequest; import com.google.analytics.admin.v1alpha.RunAccessReportResponse; import com.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema; @@ -213,6 +212,7 @@ import com.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; import com.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; import com.google.analytics.admin.v1alpha.UpdateAccessBindingRequest; import com.google.analytics.admin.v1alpha.UpdateAccountRequest; import com.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; @@ -221,6 +221,7 @@ import com.google.analytics.admin.v1alpha.UpdateConversionEventRequest; import com.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; import com.google.analytics.admin.v1alpha.UpdateCustomMetricRequest; +import com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; import com.google.analytics.admin.v1alpha.UpdateDataStreamRequest; import com.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; @@ -233,8 +234,6 @@ import com.google.analytics.admin.v1alpha.UpdatePropertyRequest; import com.google.analytics.admin.v1alpha.UpdateSKAdNetworkConversionValueSchemaRequest; import com.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; @@ -677,101 +676,101 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build()) .build(); - private static final ApiMethodDescriptor - getUserLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.analytics.admin.v1alpha.AnalyticsAdminService/GetUserLink") - .setHttpMethod("GET") + private static final ApiMethodDescriptor + createFirebaseLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateFirebaseLink") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=accounts/*/userLinks/*}", + "/v1alpha/{parent=properties/*}/firebaseLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{name=properties/*/userLinks/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("firebaseLink", request.getFirebaseLink(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(UserLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FirebaseLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - batchGetUserLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteFirebaseLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetUserLinks") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteFirebaseLink") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/userLinks:batchGet", + "/v1alpha/{name=properties/*/firebaseLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/userLinks:batchGet") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "names", request.getNamesList()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchGetUserLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - listUserLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + listFirebaseLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListUserLinks") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListFirebaseLinks") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/userLinks", + "/v1alpha/{parent=properties/*}/firebaseLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/userLinks") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); @@ -781,237 +780,256 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListUserLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFirebaseLinksResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - auditUserLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getGlobalSiteTagMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/AuditUserLinks") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetGlobalSiteTag") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/userLinks:audit", + "/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/userLinks:audit") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AuditUserLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GlobalSiteTag.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createUserLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + createGoogleAdsLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateUserLink") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateGoogleAdsLink") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/userLinks", + "/v1alpha/{parent=properties/*}/googleAdsLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/userLinks") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "notifyNewUser", request.getNotifyNewUser()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("userLink", request.getUserLink(), true)) + .toBody("googleAdsLink", request.getGoogleAdsLink(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(UserLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GoogleAdsLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - BatchCreateUserLinksRequest, BatchCreateUserLinksResponse> - batchCreateUserLinksMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + updateGoogleAdsLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateUserLinks") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleAdsLink") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/userLinks:batchCreate", + "/v1alpha/{googleAdsLink.name=properties/*/googleAdsLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam( + fields, "googleAdsLink.name", request.getGoogleAdsLink().getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/userLinks:batchCreate") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .toBody("googleAdsLink", request.getGoogleAdsLink(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchCreateUserLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GoogleAdsLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateUserLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteGoogleAdsLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateUserLink") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteGoogleAdsLink") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{userLink.name=accounts/*/userLinks/*}", + "/v1alpha/{name=properties/*/googleAdsLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "userLink.name", request.getUserLink().getName()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{userLink.name=properties/*/userLinks/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("userLink", request.getUserLink(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(UserLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - BatchUpdateUserLinksRequest, BatchUpdateUserLinksResponse> - batchUpdateUserLinksMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + listGoogleAdsLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateUserLinks") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListGoogleAdsLinks") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/userLinks:batchUpdate", + "/v1alpha/{parent=properties/*}/googleAdsLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/userLinks:batchUpdate") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListGoogleAdsLinksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataSharingSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=accounts/*/dataSharingSettings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchUpdateUserLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataSharingSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteUserLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + GetMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + getMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteUserLink") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=accounts/*/userLinks/*}", + "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{name=properties/*/userLinks/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -1019,65 +1037,69 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - batchDeleteUserLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> + listMeasurementProtocolSecretsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteUserLinks") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/userLinks:batchDelete", + "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/userLinks:batchDelete") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + ListMeasurementProtocolSecretsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createFirebaseLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + CreateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + createMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateFirebaseLink") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/firebaseLinks", + "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; @@ -1085,7 +1107,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -1093,29 +1115,32 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("firebaseLink", request.getFirebaseLink(), true)) + .toBody( + "measurementProtocolSecret", + request.getMeasurementProtocolSecret(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(FirebaseLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteFirebaseLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteFirebaseLink") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/firebaseLinks/*}", + "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -1123,7 +1148,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -1137,179 +1162,203 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build()) .build(); - private static final ApiMethodDescriptor - listFirebaseLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + UpdateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> + updateMeasurementProtocolSecretMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListFirebaseLinks") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/firebaseLinks", + "/v1alpha/{measurementProtocolSecret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam( + fields, + "measurementProtocolSecret.name", + request.getMeasurementProtocolSecret().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "measurementProtocolSecret", + request.getMeasurementProtocolSecret(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListFirebaseLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getGlobalSiteTagMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> + acknowledgeUserDataCollectionMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetGlobalSiteTag") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}", + "/v1alpha/{property=properties/*}:acknowledgeUserDataCollection", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "property", request.getProperty()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GlobalSiteTag.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + AcknowledgeUserDataCollectionResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createGoogleAdsLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + GetSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> + getSKAdNetworkConversionValueSchemaMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateGoogleAdsLink") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetSKAdNetworkConversionValueSchema") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/googleAdsLinks", + "/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("googleAdsLink", request.getGoogleAdsLink(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoogleAdsLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SKAdNetworkConversionValueSchema.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateGoogleAdsLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + CreateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> + createSKAdNetworkConversionValueSchemaMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleAdsLink") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSKAdNetworkConversionValueSchema") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{googleAdsLink.name=properties/*/googleAdsLinks/*}", + "/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "googleAdsLink.name", request.getGoogleAdsLink().getName()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("googleAdsLink", request.getGoogleAdsLink(), true)) + .toBody( + "skadnetworkConversionValueSchema", + request.getSkadnetworkConversionValueSchema(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoogleAdsLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SKAdNetworkConversionValueSchema.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteGoogleAdsLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteSKAdNetworkConversionValueSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteGoogleAdsLink") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSKAdNetworkConversionValueSchema") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=properties/*/googleAdsLinks/*}", + "/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -1322,181 +1371,204 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build()) .build(); - private static final ApiMethodDescriptor - listGoogleAdsLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + UpdateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> + updateSKAdNetworkConversionValueSchemaMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListGoogleAdsLinks") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSKAdNetworkConversionValueSchema") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/googleAdsLinks", + "/v1alpha/{skadnetworkConversionValueSchema.name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "skadnetworkConversionValueSchema.name", + request.getSkadnetworkConversionValueSchema().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "skadnetworkConversionValueSchema", + request.getSkadnetworkConversionValueSchema(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListGoogleAdsLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SKAdNetworkConversionValueSchema.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getDataSharingSettingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListSKAdNetworkConversionValueSchemasRequest, + ListSKAdNetworkConversionValueSchemasResponse> + listSKAdNetworkConversionValueSchemasMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListSKAdNetworkConversionValueSchemas") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=accounts/*/dataSharingSettings}", + "/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataSharingSettings.getDefaultInstance()) + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + ListSKAdNetworkConversionValueSchemasResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - GetMeasurementProtocolSecretRequest, MeasurementProtocolSecret> - getMeasurementProtocolSecretMethodDescriptor = + SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsResponse> + searchChangeHistoryEventsMethodDescriptor = ApiMethodDescriptor - .newBuilder() + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "/v1alpha/{account=accounts/*}:searchChangeHistoryEvents", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "account", request.getAccount()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearAccount().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchChangeHistoryEventsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ListMeasurementProtocolSecretsRequest, ListMeasurementProtocolSecretsResponse> - listMeasurementProtocolSecretsMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + getGoogleSignalsSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "/v1alpha/{name=properties/*/googleSignalsSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance( - ListMeasurementProtocolSecretsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GoogleSignalsSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - CreateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> - createMeasurementProtocolSecretMethodDescriptor = + UpdateGoogleSignalsSettingsRequest, GoogleSignalsSettings> + updateGoogleSignalsSettingsMethodDescriptor = ApiMethodDescriptor - .newBuilder() + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "/v1alpha/{googleSignalsSettings.name=properties/*/googleSignalsSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam( + fields, + "googleSignalsSettings.name", + request.getGoogleSignalsSettings().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -1504,79 +1576,80 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub request -> ProtoRestSerializer.create() .toBody( - "measurementProtocolSecret", - request.getMeasurementProtocolSecret(), + "googleSignalsSettings", + request.getGoogleSignalsSettings(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GoogleSignalsSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteMeasurementProtocolSecretMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + createConversionEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "/v1alpha/{parent=properties/*}/conversionEvents", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("conversionEvent", request.getConversionEvent(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ConversionEvent.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - UpdateMeasurementProtocolSecretRequest, MeasurementProtocolSecret> - updateMeasurementProtocolSecretMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + updateConversionEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateConversionEvent") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{measurementProtocolSecret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "/v1alpha/{conversionEvent.name=properties/*/conversionEvents/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, - "measurementProtocolSecret.name", - request.getMeasurementProtocolSecret().getName()); + "conversionEvent.name", + request.getConversionEvent().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); @@ -1585,159 +1658,140 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody( - "measurementProtocolSecret", - request.getMeasurementProtocolSecret(), - true)) + .toBody("conversionEvent", request.getConversionEvent(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(MeasurementProtocolSecret.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ConversionEvent.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - AcknowledgeUserDataCollectionRequest, AcknowledgeUserDataCollectionResponse> - acknowledgeUserDataCollectionMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + getConversionEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetConversionEvent") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{property=properties/*}:acknowledgeUserDataCollection", + "/v1alpha/{name=properties/*/conversionEvents/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "property", request.getProperty()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearProperty().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance( - AcknowledgeUserDataCollectionResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ConversionEvent.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - GetSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> - getSKAdNetworkConversionValueSchemaMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + deleteConversionEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetSKAdNetworkConversionValueSchema") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}", + "/v1alpha/{name=properties/*/conversionEvents/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SKAdNetworkConversionValueSchema.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - CreateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> - createSKAdNetworkConversionValueSchemaMethodDescriptor = + ListConversionEventsRequest, ListConversionEventsResponse> + listConversionEventsMethodDescriptor = ApiMethodDescriptor - . - newBuilder() + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSKAdNetworkConversionValueSchema") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema", + "/v1alpha/{parent=properties/*}/conversionEvents", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody( - "skadnetworkConversionValueSchema", - request.getSkadnetworkConversionValueSchema(), - true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SKAdNetworkConversionValueSchema.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListConversionEventsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteSKAdNetworkConversionValueSchemaMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + GetDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> + getDisplayVideo360AdvertiserLinkMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSKAdNetworkConversionValueSchema") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}", + "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -1745,7 +1799,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -1753,81 +1807,31 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - UpdateSKAdNetworkConversionValueSchemaRequest, SKAdNetworkConversionValueSchema> - updateSKAdNetworkConversionValueSchemaMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSKAdNetworkConversionValueSchema") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() - .setPath( - "/v1alpha/{skadnetworkConversionValueSchema.name=properties/*/dataStreams/*/sKAdNetworkConversionValueSchema/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "skadnetworkConversionValueSchema.name", - request.getSkadnetworkConversionValueSchema().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody( - "skadnetworkConversionValueSchema", - request.getSkadnetworkConversionValueSchema(), - true)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SKAdNetworkConversionValueSchema.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DisplayVideo360AdvertiserLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - ListSKAdNetworkConversionValueSchemasRequest, - ListSKAdNetworkConversionValueSchemasResponse> - listSKAdNetworkConversionValueSchemasMethodDescriptor = + ListDisplayVideo360AdvertiserLinksRequest, ListDisplayVideo360AdvertiserLinksResponse> + listDisplayVideo360AdvertiserLinksMethodDescriptor = ApiMethodDescriptor - . + . newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListSKAdNetworkConversionValueSchemas") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter - .newBuilder() + .newBuilder() .setPath( - "/v1alpha/{parent=properties/*/dataStreams/*}/sKAdNetworkConversionValueSchema", + "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; @@ -1835,7 +1839,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); @@ -1846,116 +1850,124 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build()) .setResponseParser( ProtoMessageResponseParser - .newBuilder() + .newBuilder() .setDefaultInstance( - ListSKAdNetworkConversionValueSchemasResponse.getDefaultInstance()) + ListDisplayVideo360AdvertiserLinksResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - SearchChangeHistoryEventsRequest, SearchChangeHistoryEventsResponse> - searchChangeHistoryEventsMethodDescriptor = + CreateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> + createDisplayVideo360AdvertiserLinkMethodDescriptor = ApiMethodDescriptor - .newBuilder() + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{account=accounts/*}:searchChangeHistoryEvents", + "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "account", request.getAccount()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearAccount().build(), true)) + .toBody( + "displayVideo360AdvertiserLink", + request.getDisplayVideo360AdvertiserLink(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchChangeHistoryEventsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DisplayVideo360AdvertiserLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getGoogleSignalsSettingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteDisplayVideo360AdvertiserLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=properties/*/googleSignalsSettings}", + "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoogleSignalsSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - UpdateGoogleSignalsSettingsRequest, GoogleSignalsSettings> - updateGoogleSignalsSettingsMethodDescriptor = + UpdateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> + updateDisplayVideo360AdvertiserLinkMethodDescriptor = ApiMethodDescriptor - .newBuilder() + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{googleSignalsSettings.name=properties/*/googleSignalsSettings}", + "/v1alpha/{displayVideo360AdvertiserLink.name=properties/*/displayVideo360AdvertiserLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, - "googleSignalsSettings.name", - request.getGoogleSignalsSettings().getName()); + "displayVideo360AdvertiserLink.name", + request.getDisplayVideo360AdvertiserLink().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -1964,155 +1976,176 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub request -> ProtoRestSerializer.create() .toBody( - "googleSignalsSettings", - request.getGoogleSignalsSettings(), + "displayVideo360AdvertiserLink", + request.getDisplayVideo360AdvertiserLink(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoogleSignalsSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DisplayVideo360AdvertiserLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createConversionEventMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + GetDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> + getDisplayVideo360AdvertiserLinkProposalMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/conversionEvents", + "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("conversionEvent", request.getConversionEvent(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ConversionEvent.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + DisplayVideo360AdvertiserLinkProposal.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateConversionEventMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListDisplayVideo360AdvertiserLinkProposalsRequest, + ListDisplayVideo360AdvertiserLinkProposalsResponse> + listDisplayVideo360AdvertiserLinkProposalsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateConversionEvent") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{conversionEvent.name=properties/*/conversionEvents/*}", + "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "conversionEvent.name", - request.getConversionEvent().getName()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("conversionEvent", request.getConversionEvent(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ConversionEvent.getDefaultInstance()) + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + ListDisplayVideo360AdvertiserLinkProposalsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getConversionEventMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + CreateDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> + createDisplayVideo360AdvertiserLinkProposalMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetConversionEvent") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=properties/*/conversionEvents/*}", + "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "displayVideo360AdvertiserLinkProposal", + request.getDisplayVideo360AdvertiserLinkProposal(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ConversionEvent.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + DisplayVideo360AdvertiserLinkProposal.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteConversionEventMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + DeleteDisplayVideo360AdvertiserLinkProposalRequest, Empty> + deleteDisplayVideo360AdvertiserLinkProposalMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=properties/*/conversionEvents/*}", + "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -2126,60 +2159,70 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build(); private static final ApiMethodDescriptor< - ListConversionEventsRequest, ListConversionEventsResponse> - listConversionEventsMethodDescriptor = + ApproveDisplayVideo360AdvertiserLinkProposalRequest, + ApproveDisplayVideo360AdvertiserLinkProposalResponse> + approveDisplayVideo360AdvertiserLinkProposalMethodDescriptor = ApiMethodDescriptor - .newBuilder() + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/conversionEvents", + "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:approve", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListConversionEventsResponse.getDefaultInstance()) + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + ApproveDisplayVideo360AdvertiserLinkProposalResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - GetDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> - getDisplayVideo360AdvertiserLinkMethodDescriptor = + CancelDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> + cancelDisplayVideo360AdvertiserLinkProposalMethodDescriptor = ApiMethodDescriptor - .newBuilder() + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}", + "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:cancel", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -2187,394 +2230,354 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DisplayVideo360AdvertiserLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + DisplayVideo360AdvertiserLinkProposal.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ListDisplayVideo360AdvertiserLinksRequest, ListDisplayVideo360AdvertiserLinksResponse> - listDisplayVideo360AdvertiserLinksMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + createCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks", + "/v1alpha/{parent=properties/*}/customDimensions", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customDimension", request.getCustomDimension(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser - .newBuilder() - .setDefaultInstance( - ListDisplayVideo360AdvertiserLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomDimension.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - CreateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> - createDisplayVideo360AdvertiserLinkMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + updateCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks", + "/v1alpha/{customDimension.name=properties/*/customDimensions/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "customDimension.name", + request.getCustomDimension().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody( - "displayVideo360AdvertiserLink", - request.getDisplayVideo360AdvertiserLink(), - true)) + .toBody("customDimension", request.getCustomDimension(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DisplayVideo360AdvertiserLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomDimension.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteDisplayVideo360AdvertiserLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListCustomDimensionsRequest, ListCustomDimensionsResponse> + listCustomDimensionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}", + "/v1alpha/{parent=properties/*}/customDimensions", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCustomDimensionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - UpdateDisplayVideo360AdvertiserLinkRequest, DisplayVideo360AdvertiserLink> - updateDisplayVideo360AdvertiserLinkMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + archiveCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{displayVideo360AdvertiserLink.name=properties/*/displayVideo360AdvertiserLinks/*}", + "/v1alpha/{name=properties/*/customDimensions/*}:archive", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "displayVideo360AdvertiserLink.name", - request.getDisplayVideo360AdvertiserLink().getName()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody( - "displayVideo360AdvertiserLink", - request.getDisplayVideo360AdvertiserLink(), - true)) + .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DisplayVideo360AdvertiserLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - GetDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> - getDisplayVideo360AdvertiserLinkProposalMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + getCustomDimensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomDimension") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}", + "/v1alpha/{name=properties/*/customDimensions/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance( - DisplayVideo360AdvertiserLinkProposal.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomDimension.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ListDisplayVideo360AdvertiserLinkProposalsRequest, - ListDisplayVideo360AdvertiserLinkProposalsResponse> - listDisplayVideo360AdvertiserLinkProposalsMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + createCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomMetric") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals", + "/v1alpha/{parent=properties/*}/customMetrics", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customMetric", request.getCustomMetric(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser - .newBuilder() - .setDefaultInstance( - ListDisplayVideo360AdvertiserLinkProposalsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomMetric.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - CreateDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> - createDisplayVideo360AdvertiserLinkProposalMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + updateCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomMetric") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals", + "/v1alpha/{customMetric.name=properties/*/customMetrics/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "customMetric.name", request.getCustomMetric().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody( - "displayVideo360AdvertiserLinkProposal", - request.getDisplayVideo360AdvertiserLinkProposal(), - true)) + .toBody("customMetric", request.getCustomMetric(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance( - DisplayVideo360AdvertiserLinkProposal.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomMetric.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - DeleteDisplayVideo360AdvertiserLinkProposalRequest, Empty> - deleteDisplayVideo360AdvertiserLinkProposalMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + listCustomMetricsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomMetrics") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}", + "/v1alpha/{parent=properties/*}/customMetrics", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCustomMetricsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ApproveDisplayVideo360AdvertiserLinkProposalRequest, - ApproveDisplayVideo360AdvertiserLinkProposalResponse> - approveDisplayVideo360AdvertiserLinkProposalMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + archiveCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomMetric") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:approve", + "/v1alpha/{name=properties/*/customMetrics/*}:archive", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -2584,121 +2587,109 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser - .newBuilder() - .setDefaultInstance( - ApproveDisplayVideo360AdvertiserLinkProposalResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - CancelDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> - cancelDisplayVideo360AdvertiserLinkProposalMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + getCustomMetricMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomMetric") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:cancel", + "/v1alpha/{name=properties/*/customMetrics/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), true)) + return fields; + }) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance( - DisplayVideo360AdvertiserLinkProposal.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomMetric.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createCustomDimensionMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getDataRetentionSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/customDimensions", + "/v1alpha/{name=properties/*/dataRetentionSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("customDimension", request.getCustomDimension(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CustomDimension.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataRetentionSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateCustomDimensionMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + UpdateDataRetentionSettingsRequest, DataRetentionSettings> + updateDataRetentionSettingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{customDimension.name=properties/*/customDimensions/*}", + "/v1alpha/{dataRetentionSettings.name=properties/*/dataRetentionSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, - "customDimension.name", - request.getCustomDimension().getName()); + "dataRetentionSettings.name", + request.getDataRetentionSettings().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); @@ -2707,31 +2698,32 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("customDimension", request.getCustomDimension(), true)) + .toBody( + "dataRetentionSettings", + request.getDataRetentionSettings(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CustomDimension.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataRetentionSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ListCustomDimensionsRequest, ListCustomDimensionsResponse> - listCustomDimensionsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + createDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDataStream") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/customDimensions", + "/v1alpha/{parent=properties/*}/dataStreams", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; @@ -2739,36 +2731,37 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataStream", request.getDataStream(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListCustomDimensionsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataStream.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - archiveCustomDimensionMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDataStream") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/customDimensions/*}:archive", + "/v1alpha/{name=properties/*/dataStreams/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -2776,15 +2769,12 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -2793,55 +2783,60 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build()) .build(); - private static final ApiMethodDescriptor - getCustomDimensionMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + updateDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomDimension") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataStream") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/customDimensions/*}", + "/v1alpha/{dataStream.name=properties/*/dataStreams/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam( + fields, "dataStream.name", request.getDataStream().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataStream", request.getDataStream(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CustomDimension.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataStream.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createCustomMetricMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + listDataStreamsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomMetric") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListDataStreams") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/customMetrics", + "/v1alpha/{parent=properties/*}/dataStreams", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; @@ -2849,453 +2844,447 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("customMetric", request.getCustomMetric(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CustomMetric.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDataStreamsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateCustomMetricMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getDataStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomMetric") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataStream") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{customMetric.name=properties/*/customMetrics/*}", + "/v1alpha/{name=properties/*/dataStreams/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "customMetric.name", request.getCustomMetric().getName()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("customMetric", request.getCustomMetric(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CustomMetric.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataStream.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - listCustomMetricsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomMetrics") + private static final ApiMethodDescriptor + getAudienceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.admin.v1alpha.AnalyticsAdminService/GetAudience") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/customMetrics", + "/v1alpha/{name=properties/*/audiences/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListCustomMetricsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Audience.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - archiveCustomMetricMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + listAudiencesMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomMetric") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListAudiences") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/customMetrics/*}:archive", + "/v1alpha/{parent=properties/*}/audiences", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAudiencesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getCustomMetricMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + createAudienceMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomMetric") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAudience") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/customMetrics/*}", + "/v1alpha/{parent=properties/*}/audiences", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("audience", request.getAudience(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CustomMetric.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Audience.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getDataRetentionSettingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + updateAudienceMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAudience") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataRetentionSettings}", + "/v1alpha/{audience.name=properties/*/audiences/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam( + fields, "audience.name", request.getAudience().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("audience", request.getAudience(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataRetentionSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Audience.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - UpdateDataRetentionSettingsRequest, DataRetentionSettings> - updateDataRetentionSettingsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + archiveAudienceMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveAudience") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{dataRetentionSettings.name=properties/*/dataRetentionSettings}", + "/v1alpha/{name=properties/*/audiences/*}:archive", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "dataRetentionSettings.name", - request.getDataRetentionSettings().getName()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody( - "dataRetentionSettings", - request.getDataRetentionSettings(), - true)) + .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataRetentionSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createDataStreamMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getSearchAds360LinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDataStream") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetSearchAds360Link") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/dataStreams", + "/v1alpha/{name=properties/*/searchAds360Links/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("dataStream", request.getDataStream(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataStream.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAds360Link.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteDataStreamMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListSearchAds360LinksRequest, ListSearchAds360LinksResponse> + listSearchAds360LinksMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDataStream") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListSearchAds360Links") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*}", + "/v1alpha/{parent=properties/*}/searchAds360Links", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSearchAds360LinksResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateDataStreamMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + createSearchAds360LinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataStream") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSearchAds360Link") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{dataStream.name=properties/*/dataStreams/*}", + "/v1alpha/{parent=properties/*}/searchAds360Links", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "dataStream.name", request.getDataStream().getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("dataStream", request.getDataStream(), true)) + .toBody("searchAds360Link", request.getSearchAds360Link(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataStream.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAds360Link.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - listDataStreamsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteSearchAds360LinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListDataStreams") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSearchAds360Link") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/dataStreams", + "/v1alpha/{name=properties/*/searchAds360Links/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListDataStreamsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getDataStreamMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + updateSearchAds360LinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataStream") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSearchAds360Link") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*}", + "/v1alpha/{searchAds360Link.name=properties/*/searchAds360Links/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam( + fields, + "searchAds360Link.name", + request.getSearchAds360Link().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("searchAds360Link", request.getSearchAds360Link(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DataStream.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAds360Link.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getAudienceMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.analytics.admin.v1alpha.AnalyticsAdminService/GetAudience") + private static final ApiMethodDescriptor + getAttributionSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/audiences/*}", + "/v1alpha/{name=properties/*/attributionSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -3303,7 +3292,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -3311,71 +3300,80 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Audience.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AttributionSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - listAudiencesMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + updateAttributionSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListAudiences") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/audiences", + "/v1alpha/{attributionSettings.name=properties/*/attributionSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam( + fields, + "attributionSettings.name", + request.getAttributionSettings().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "attributionSettings", + request.getAttributionSettings(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListAudiencesResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AttributionSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createAudienceMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + runAccessReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAudience") + "google.analytics.admin.v1alpha.AnalyticsAdminService/RunAccessReport") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/audiences", + "/v1alpha/{entity=properties/*}:runAccessReport", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "entity", request.getEntity()); return fields; }) + .setAdditionalPaths("/v1alpha/{entity=accounts/*}:runAccessReport") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -3383,540 +3381,544 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("audience", request.getAudience(), true)) + .toBody("*", request.toBuilder().clearEntity().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Audience.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RunAccessReportResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateAudienceMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + createAccessBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAudience") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAccessBinding") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{audience.name=properties/*/audiences/*}", + "/v1alpha/{parent=accounts/*}/accessBindings", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "audience.name", request.getAudience().getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths("/v1alpha/{parent=properties/*}/accessBindings") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("audience", request.getAudience(), true)) + .toBody("accessBinding", request.getAccessBinding(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Audience.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AccessBinding.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - archiveAudienceMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getAccessBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveAudience") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccessBinding") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/audiences/*}:archive", + "/v1alpha/{name=accounts/*/accessBindings/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) + .setAdditionalPaths("/v1alpha/{name=properties/*/accessBindings/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AccessBinding.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getSearchAds360LinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + updateAccessBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetSearchAds360Link") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccessBinding") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/searchAds360Links/*}", + "/v1alpha/{accessBinding.name=accounts/*/accessBindings/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam( + fields, "accessBinding.name", request.getAccessBinding().getName()); return fields; }) + .setAdditionalPaths( + "/v1alpha/{accessBinding.name=properties/*/accessBindings/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("accessBinding", request.getAccessBinding(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchAds360Link.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AccessBinding.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ListSearchAds360LinksRequest, ListSearchAds360LinksResponse> - listSearchAds360LinksMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + deleteAccessBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListSearchAds360Links") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccessBinding") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/searchAds360Links", + "/v1alpha/{name=accounts/*/accessBindings/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) + .setAdditionalPaths("/v1alpha/{name=properties/*/accessBindings/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListSearchAds360LinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createSearchAds360LinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + listAccessBindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSearchAds360Link") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccessBindings") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/searchAds360Links", + "/v1alpha/{parent=accounts/*}/accessBindings", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths("/v1alpha/{parent=properties/*}/accessBindings") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("searchAds360Link", request.getSearchAds360Link(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchAds360Link.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAccessBindingsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteSearchAds360LinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + BatchCreateAccessBindingsRequest, BatchCreateAccessBindingsResponse> + batchCreateAccessBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSearchAds360Link") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateAccessBindings") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/searchAds360Links/*}", + "/v1alpha/{parent=accounts/*}/accessBindings:batchCreate", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v1alpha/{parent=properties/*}/accessBindings:batchCreate") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchCreateAccessBindingsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateSearchAds360LinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + BatchGetAccessBindingsRequest, BatchGetAccessBindingsResponse> + batchGetAccessBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateSearchAds360Link") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetAccessBindings") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{searchAds360Link.name=properties/*/searchAds360Links/*}", + "/v1alpha/{parent=accounts/*}/accessBindings:batchGet", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "searchAds360Link.name", - request.getSearchAds360Link().getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths("/v1alpha/{parent=properties/*}/accessBindings:batchGet") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "names", request.getNamesList()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("searchAds360Link", request.getSearchAds360Link(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchAds360Link.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchGetAccessBindingsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getAttributionSettingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + BatchUpdateAccessBindingsRequest, BatchUpdateAccessBindingsResponse> + batchUpdateAccessBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateAccessBindings") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/attributionSettings}", + "/v1alpha/{parent=accounts/*}/accessBindings:batchUpdate", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v1alpha/{parent=properties/*}/accessBindings:batchUpdate") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AttributionSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchUpdateAccessBindingsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateAttributionSettingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + batchDeleteAccessBindingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteAccessBindings") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{attributionSettings.name=properties/*/attributionSettings}", + "/v1alpha/{parent=accounts/*}/accessBindings:batchDelete", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "attributionSettings.name", - request.getAttributionSettings().getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v1alpha/{parent=properties/*}/accessBindings:batchDelete") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody( - "attributionSettings", - request.getAttributionSettings(), - true)) + .toBody("*", request.toBuilder().clearParent().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AttributionSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - runAccessReportMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getExpandedDataSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/RunAccessReport") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetExpandedDataSet") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{entity=properties/*}:runAccessReport", + "/v1alpha/{name=properties/*/expandedDataSets/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "entity", request.getEntity()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{entity=accounts/*}:runAccessReport") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearEntity().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(RunAccessReportResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExpandedDataSet.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createAccessBindingMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListExpandedDataSetsRequest, ListExpandedDataSetsResponse> + listExpandedDataSetsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAccessBinding") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListExpandedDataSets") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/accessBindings", + "/v1alpha/{parent=properties/*}/expandedDataSets", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/accessBindings") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("accessBinding", request.getAccessBinding(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AccessBinding.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListExpandedDataSetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getAccessBindingMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + createExpandedDataSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccessBinding") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateExpandedDataSet") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=accounts/*/accessBindings/*}", + "/v1alpha/{parent=properties/*}/expandedDataSets", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{name=properties/*/accessBindings/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("expandedDataSet", request.getExpandedDataSet(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AccessBinding.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExpandedDataSet.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateAccessBindingMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + updateExpandedDataSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccessBinding") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateExpandedDataSet") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{accessBinding.name=accounts/*/accessBindings/*}", + "/v1alpha/{expandedDataSet.name=properties/*/expandedDataSets/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( - fields, "accessBinding.name", request.getAccessBinding().getName()); + fields, + "expandedDataSet.name", + request.getExpandedDataSet().getName()); return fields; }) - .setAdditionalPaths( - "/v1alpha/{accessBinding.name=properties/*/accessBindings/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("accessBinding", request.getAccessBinding(), true)) + .toBody("expandedDataSet", request.getExpandedDataSet(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AccessBinding.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExpandedDataSet.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteAccessBindingMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteExpandedDataSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccessBinding") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteExpandedDataSet") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=accounts/*/accessBindings/*}", + "/v1alpha/{name=properties/*/expandedDataSets/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{name=properties/*/accessBindings/*}") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -3930,199 +3932,183 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build()) .build(); - private static final ApiMethodDescriptor - listAccessBindingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getChannelGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccessBindings") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetChannelGroup") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/accessBindings", + "/v1alpha/{name=properties/*/channelGroups/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/accessBindings") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListAccessBindingsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ChannelGroup.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - BatchCreateAccessBindingsRequest, BatchCreateAccessBindingsResponse> - batchCreateAccessBindingsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + listChannelGroupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateAccessBindings") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListChannelGroups") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/accessBindings:batchCreate", + "/v1alpha/{parent=properties/*}/channelGroups", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths( - "/v1alpha/{parent=properties/*}/accessBindings:batchCreate") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchCreateAccessBindingsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListChannelGroupsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - BatchGetAccessBindingsRequest, BatchGetAccessBindingsResponse> - batchGetAccessBindingsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + createChannelGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetAccessBindings") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateChannelGroup") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/accessBindings:batchGet", + "/v1alpha/{parent=properties/*}/channelGroups", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) - .setAdditionalPaths("/v1alpha/{parent=properties/*}/accessBindings:batchGet") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "names", request.getNamesList()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("channelGroup", request.getChannelGroup(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchGetAccessBindingsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ChannelGroup.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - BatchUpdateAccessBindingsRequest, BatchUpdateAccessBindingsResponse> - batchUpdateAccessBindingsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + updateChannelGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateAccessBindings") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateChannelGroup") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/accessBindings:batchUpdate", + "/v1alpha/{channelGroup.name=properties/*/channelGroups/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam( + fields, "channelGroup.name", request.getChannelGroup().getName()); return fields; }) - .setAdditionalPaths( - "/v1alpha/{parent=properties/*}/accessBindings:batchUpdate") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .toBody("channelGroup", request.getChannelGroup(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchUpdateAccessBindingsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ChannelGroup.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - batchDeleteAccessBindingsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteChannelGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteAccessBindings") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteChannelGroup") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=accounts/*}/accessBindings:batchDelete", + "/v1alpha/{name=properties/*/channelGroups/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) - .setAdditionalPaths( - "/v1alpha/{parent=properties/*}/accessBindings:batchDelete") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -4131,174 +4117,182 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .build()) .build(); - private static final ApiMethodDescriptor - getExpandedDataSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + SetAutomatedGa4ConfigurationOptOutRequest, SetAutomatedGa4ConfigurationOptOutResponse> + setAutomatedGa4ConfigurationOptOutMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetExpandedDataSet") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/SetAutomatedGa4ConfigurationOptOut") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=properties/*/expandedDataSets/*}", + "/v1alpha/properties:setAutomatedGa4ConfigurationOptOut", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ExpandedDataSet.getDefaultInstance()) + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + SetAutomatedGa4ConfigurationOptOutResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - ListExpandedDataSetsRequest, ListExpandedDataSetsResponse> - listExpandedDataSetsMethodDescriptor = + FetchAutomatedGa4ConfigurationOptOutRequest, FetchAutomatedGa4ConfigurationOptOutResponse> + fetchAutomatedGa4ConfigurationOptOutMethodDescriptor = ApiMethodDescriptor - .newBuilder() + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListExpandedDataSets") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/FetchAutomatedGa4ConfigurationOptOut") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/expandedDataSets", + "/v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListExpandedDataSetsResponse.getDefaultInstance()) + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + FetchAutomatedGa4ConfigurationOptOutResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createExpandedDataSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getBigQueryLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateExpandedDataSet") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetBigQueryLink") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/expandedDataSets", + "/v1alpha/{name=properties/*/bigQueryLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("expandedDataSet", request.getExpandedDataSet(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ExpandedDataSet.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BigQueryLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateExpandedDataSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + listBigQueryLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateExpandedDataSet") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListBigQueryLinks") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{expandedDataSet.name=properties/*/expandedDataSets/*}", + "/v1alpha/{parent=properties/*}/bigQueryLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "expandedDataSet.name", - request.getExpandedDataSet().getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("expandedDataSet", request.getExpandedDataSet(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ExpandedDataSet.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBigQueryLinksResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteExpandedDataSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + GetEnhancedMeasurementSettingsRequest, EnhancedMeasurementSettings> + getEnhancedMeasurementSettingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteExpandedDataSet") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/expandedDataSets/*}", + "/v1alpha/{name=properties/*/dataStreams/*/enhancedMeasurementSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -4306,7 +4300,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -4314,106 +4308,120 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(EnhancedMeasurementSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getChannelGroupMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + UpdateEnhancedMeasurementSettingsRequest, EnhancedMeasurementSettings> + updateEnhancedMeasurementSettingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetChannelGroup") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter + .newBuilder() .setPath( - "/v1alpha/{name=properties/*/channelGroups/*}", + "/v1alpha/{enhancedMeasurementSettings.name=properties/*/dataStreams/*/enhancedMeasurementSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "enhancedMeasurementSettings.name", + request.getEnhancedMeasurementSettings().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "enhancedMeasurementSettings", + request.getEnhancedMeasurementSettings(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ChannelGroup.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(EnhancedMeasurementSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - listChannelGroupsMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + CreateConnectedSiteTagRequest, CreateConnectedSiteTagResponse> + createConnectedSiteTagMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListChannelGroups") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/channelGroups", + "/v1alpha/properties:createConnectedSiteTag", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListChannelGroupsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CreateConnectedSiteTagResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createChannelGroupMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteConnectedSiteTagMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateChannelGroup") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/channelGroups", + "/v1alpha/properties:deleteConnectedSiteTag", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -4421,192 +4429,178 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("channelGroup", request.getChannelGroup(), true)) + .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ChannelGroup.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateChannelGroupMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListConnectedSiteTagsRequest, ListConnectedSiteTagsResponse> + listConnectedSiteTagsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateChannelGroup") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{channelGroup.name=properties/*/channelGroups/*}", + "/v1alpha/properties:listConnectedSiteTags", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "channelGroup.name", request.getChannelGroup().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("channelGroup", request.getChannelGroup(), true)) + .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ChannelGroup.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListConnectedSiteTagsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteChannelGroupMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + FetchConnectedGa4PropertyRequest, FetchConnectedGa4PropertyResponse> + fetchConnectedGa4PropertyMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteChannelGroup") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/FetchConnectedGa4Property") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/channelGroups/*}", + "/v1alpha/properties:fetchConnectedGa4Property", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "property", request.getProperty()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FetchConnectedGa4PropertyResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - SetAutomatedGa4ConfigurationOptOutRequest, SetAutomatedGa4ConfigurationOptOutResponse> - setAutomatedGa4ConfigurationOptOutMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + getAdSenseLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/SetAutomatedGa4ConfigurationOptOut") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetAdSenseLink") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/properties:setAutomatedGa4ConfigurationOptOut", + "/v1alpha/{name=properties/*/adSenseLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser - .newBuilder() - .setDefaultInstance( - SetAutomatedGa4ConfigurationOptOutResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AdSenseLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - FetchAutomatedGa4ConfigurationOptOutRequest, FetchAutomatedGa4ConfigurationOptOutResponse> - fetchAutomatedGa4ConfigurationOptOutMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() + private static final ApiMethodDescriptor + createAdSenseLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/FetchAutomatedGa4ConfigurationOptOut") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAdSenseLink") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/properties:fetchAutomatedGa4ConfigurationOptOut", + "/v1alpha/{parent=properties/*}/adSenseLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), true)) + .toBody("adsenseLink", request.getAdsenseLink(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser - .newBuilder() - .setDefaultInstance( - FetchAutomatedGa4ConfigurationOptOutResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AdSenseLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getBigQueryLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteAdSenseLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetBigQueryLink") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAdSenseLink") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/bigQueryLinks/*}", + "/v1alpha/{name=properties/*/adSenseLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -4614,7 +4608,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -4622,26 +4616,26 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BigQueryLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - listBigQueryLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + listAdSenseLinksMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListBigQueryLinks") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListAdSenseLinks") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/bigQueryLinks", + "/v1alpha/{parent=properties/*}/adSenseLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; @@ -4649,7 +4643,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); @@ -4659,28 +4653,26 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListBigQueryLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAdSenseLinksResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - GetEnhancedMeasurementSettingsRequest, EnhancedMeasurementSettings> - getEnhancedMeasurementSettingsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + getEventCreateRuleMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetEventCreateRule") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/enhancedMeasurementSettings}", + "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -4688,7 +4680,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -4696,83 +4688,73 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(EnhancedMeasurementSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(EventCreateRule.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - UpdateEnhancedMeasurementSettingsRequest, EnhancedMeasurementSettings> - updateEnhancedMeasurementSettingsMethodDescriptor = + ListEventCreateRulesRequest, ListEventCreateRulesResponse> + listEventCreateRulesMethodDescriptor = ApiMethodDescriptor - .newBuilder() + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListEventCreateRules") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{enhancedMeasurementSettings.name=properties/*/dataStreams/*/enhancedMeasurementSettings}", + "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "enhancedMeasurementSettings.name", - request.getEnhancedMeasurementSettings().getName()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody( - "enhancedMeasurementSettings", - request.getEnhancedMeasurementSettings(), - true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(EnhancedMeasurementSettings.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEventCreateRulesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - CreateConnectedSiteTagRequest, CreateConnectedSiteTagResponse> - createConnectedSiteTagMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + createEventCreateRuleMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateEventCreateRule") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/properties:createConnectedSiteTag", + "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -4780,142 +4762,153 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), true)) + .toBody("eventCreateRule", request.getEventCreateRule(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(CreateConnectedSiteTagResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(EventCreateRule.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteConnectedSiteTagMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + updateEventCreateRuleMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEventCreateRule") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/properties:deleteConnectedSiteTag", + "/v1alpha/{eventCreateRule.name=properties/*/dataStreams/*/eventCreateRules/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "eventCreateRule.name", + request.getEventCreateRule().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), true)) + .toBody("eventCreateRule", request.getEventCreateRule(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(EventCreateRule.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ListConnectedSiteTagsRequest, ListConnectedSiteTagsResponse> - listConnectedSiteTagsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + deleteEventCreateRuleMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags") - .setHttpMethod("POST") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteEventCreateRule") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/properties:listConnectedSiteTags", + "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListConnectedSiteTagsResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< - FetchConnectedGa4PropertyRequest, FetchConnectedGa4PropertyResponse> - fetchConnectedGa4PropertyMethodDescriptor = + UpdateDataRedactionSettingsRequest, DataRedactionSettings> + updateDataRedactionSettingsMethodDescriptor = ApiMethodDescriptor - .newBuilder() + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/FetchConnectedGa4Property") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRedactionSettings") + .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/properties:fetchConnectedGa4Property", + "/v1alpha/{dataRedactionSettings.name=properties/*/dataStreams/*/dataRedactionSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "dataRedactionSettings.name", + request.getDataRedactionSettings().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "property", request.getProperty()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "dataRedactionSettings", + request.getDataRedactionSettings(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(FetchConnectedGa4PropertyResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataRedactionSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getAdSenseLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + getDataRedactionSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetAdSenseLink") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRedactionSettings") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/adSenseLinks/*}", + "/v1alpha/{name=properties/*/dataStreams/*/dataRedactionSettings}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -4923,7 +4916,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -4931,34 +4924,35 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AdSenseLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataRedactionSettings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createAdSenseLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + CreateRollupPropertyRequest, CreateRollupPropertyResponse> + createRollupPropertyMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAdSenseLink") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupProperty") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/adSenseLinks", + "/v1alpha/properties:createRollupProperty", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -4966,29 +4960,31 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("adsenseLink", request.getAdsenseLink(), true)) + .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AdSenseLink.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CreateRollupPropertyResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteAdSenseLinkMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + GetRollupPropertySourceLinkRequest, RollupPropertySourceLink> + getRollupPropertySourceLinkMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAdSenseLink") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/GetRollupPropertySourceLink") + .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/adSenseLinks/*}", + "/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; @@ -4996,7 +4992,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -5004,26 +5000,29 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RollupPropertySourceLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - listAdSenseLinksMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksResponse> + listRollupPropertySourceLinksMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListAdSenseLinks") + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListRollupPropertySourceLinks") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*}/adSenseLinks", + "/v1alpha/{parent=properties/*}/rollupPropertySourceLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; @@ -5031,7 +5030,7 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); @@ -5041,108 +5040,112 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListAdSenseLinksResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + ListRollupPropertySourceLinksResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - getEventCreateRuleMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + CreateRollupPropertySourceLinkRequest, RollupPropertySourceLink> + createRollupPropertySourceLinkMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/GetEventCreateRule") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateRollupPropertySourceLink") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}", + "/v1alpha/{parent=properties/*}/rollupPropertySourceLinks", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "rollupPropertySourceLink", + request.getRollupPropertySourceLink(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(EventCreateRule.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RollupPropertySourceLink.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor< - ListEventCreateRulesRequest, ListEventCreateRulesResponse> - listEventCreateRulesMethodDescriptor = - ApiMethodDescriptor - .newBuilder() + private static final ApiMethodDescriptor + deleteRollupPropertySourceLinkMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/ListEventCreateRules") - .setHttpMethod("GET") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteRollupPropertySourceLink") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules", + "/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListEventCreateRulesResponse.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - createEventCreateRuleMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + createSubpropertyMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateEventCreateRule") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSubproperty") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules", + "/v1alpha/properties:createSubproperty", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; @@ -5150,88 +5153,89 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("eventCreateRule", request.getEventCreateRule(), true)) + .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(EventCreateRule.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CreateSubpropertyResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - updateEventCreateRuleMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor + deleteSubpropertyEventFilterMethodDescriptor = + ApiMethodDescriptor.newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEventCreateRule") - .setHttpMethod("PATCH") + "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteSubpropertyEventFilter") + .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{eventCreateRule.name=properties/*/dataStreams/*/eventCreateRules/*}", + "/v1alpha/{name=properties/*/subpropertyEventFilters/*}", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "eventCreateRule.name", - request.getEventCreateRule().getName()); + serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("eventCreateRule", request.getEventCreateRule(), true)) + .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(EventCreateRule.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); - private static final ApiMethodDescriptor - deleteEventCreateRuleMethodDescriptor = - ApiMethodDescriptor.newBuilder() + private static final ApiMethodDescriptor< + CreateSubpropertyEventFilterRequest, SubpropertyEventFilter> + createSubpropertyEventFilterMethodDescriptor = + ApiMethodDescriptor + .newBuilder() .setFullMethodName( - "google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteEventCreateRule") - .setHttpMethod("DELETE") + "google.analytics.admin.v1alpha.AnalyticsAdminService/CreateSubpropertyEventFilter") + .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() + ProtoMessageRequestFormatter.newBuilder() .setPath( - "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}", + "/v1alpha/{parent=properties/*}/subpropertyEventFilters", request -> { Map fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); + serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = + ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) - .setRequestBodyExtractor(request -> null) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "subpropertyEventFilter", + request.getSubpropertyEventFilter(), + true)) .build()) .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SubpropertyEventFilter.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); @@ -5255,23 +5259,6 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub private final UnaryCallable createPropertyCallable; private final UnaryCallable deletePropertyCallable; private final UnaryCallable updatePropertyCallable; - private final UnaryCallable getUserLinkCallable; - private final UnaryCallable - batchGetUserLinksCallable; - private final UnaryCallable listUserLinksCallable; - private final UnaryCallable - listUserLinksPagedCallable; - private final UnaryCallable auditUserLinksCallable; - private final UnaryCallable - auditUserLinksPagedCallable; - private final UnaryCallable createUserLinkCallable; - private final UnaryCallable - batchCreateUserLinksCallable; - private final UnaryCallable updateUserLinkCallable; - private final UnaryCallable - batchUpdateUserLinksCallable; - private final UnaryCallable deleteUserLinkCallable; - private final UnaryCallable batchDeleteUserLinksCallable; private final UnaryCallable createFirebaseLinkCallable; private final UnaryCallable deleteFirebaseLinkCallable; private final UnaryCallable @@ -5519,6 +5506,30 @@ public class HttpJsonAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub private final UnaryCallable updateEventCreateRuleCallable; private final UnaryCallable deleteEventCreateRuleCallable; + private final UnaryCallable + updateDataRedactionSettingsCallable; + private final UnaryCallable + getDataRedactionSettingsCallable; + private final UnaryCallable + createRollupPropertyCallable; + private final UnaryCallable + getRollupPropertySourceLinkCallable; + private final UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksResponse> + listRollupPropertySourceLinksCallable; + private final UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksPagedCallable; + private final UnaryCallable + createRollupPropertySourceLinkCallable; + private final UnaryCallable + deleteRollupPropertySourceLinkCallable; + private final UnaryCallable + createSubpropertyCallable; + private final UnaryCallable + deleteSubpropertyEventFilterCallable; + private final UnaryCallable + createSubpropertyEventFilterCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -5570,194 +5581,77 @@ protected HttpJsonAnalyticsAdminServiceStub( .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings listAccountsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listAccountsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteAccountTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteAccountMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings updateAccountTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateAccountMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("account.name", String.valueOf(request.getAccount().getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - provisionAccountTicketTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(provisionAccountTicketMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listAccountSummariesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listAccountSummariesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getPropertyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getPropertyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - listPropertiesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listPropertiesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createPropertyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createPropertyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deletePropertyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deletePropertyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings updatePropertyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updatePropertyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("property.name", String.valueOf(request.getProperty().getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings getUserLinkTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getUserLinkMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - batchGetUserLinksTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(batchGetUserLinksMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - listUserLinksTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listUserLinksMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings - auditUserLinksTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(auditUserLinksMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) - .build(); - HttpJsonCallSettings createUserLinkTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createUserLinkMethodDescriptor) + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listAccountsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAccountsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteAccountTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAccountMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateAccountTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAccountMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("account.name", String.valueOf(request.getAccount().getName())); return builder.build(); }) .build(); - HttpJsonCallSettings - batchCreateUserLinksTransportSettings = + HttpJsonCallSettings + provisionAccountTicketTransportSettings = HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchCreateUserLinksMethodDescriptor) + .newBuilder() + .setMethodDescriptor(provisionAccountTicketMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listAccountSummariesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAccountSummariesMethodDescriptor) .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) .build(); - HttpJsonCallSettings updateUserLinkTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateUserLinkMethodDescriptor) + HttpJsonCallSettings getPropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPropertyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("user_link.name", String.valueOf(request.getUserLink().getName())); + builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); - HttpJsonCallSettings - batchUpdateUserLinksTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchUpdateUserLinksMethodDescriptor) + HttpJsonCallSettings + listPropertiesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPropertiesMethodDescriptor) .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); - return builder.build(); - }) .build(); - HttpJsonCallSettings deleteUserLinkTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteUserLinkMethodDescriptor) + HttpJsonCallSettings createPropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPropertyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deletePropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePropertyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { @@ -5766,14 +5660,14 @@ protected HttpJsonAnalyticsAdminServiceStub( return builder.build(); }) .build(); - HttpJsonCallSettings batchDeleteUserLinksTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(batchDeleteUserLinksMethodDescriptor) + HttpJsonCallSettings updatePropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePropertyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("parent", String.valueOf(request.getParent())); + builder.add("property.name", String.valueOf(request.getProperty().getName())); return builder.build(); }) .build(); @@ -7122,6 +7016,125 @@ protected HttpJsonAnalyticsAdminServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings + updateDataRedactionSettingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(updateDataRedactionSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_redaction_settings.name", + String.valueOf(request.getDataRedactionSettings().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getDataRedactionSettingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getDataRedactionSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createRollupPropertyTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(createRollupPropertyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getRollupPropertySourceLinkTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getRollupPropertySourceLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksResponse> + listRollupPropertySourceLinksTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listRollupPropertySourceLinksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createRollupPropertySourceLinkTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(createRollupPropertySourceLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteRollupPropertySourceLinkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteRollupPropertySourceLinkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createSubpropertyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSubpropertyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteSubpropertyEventFilterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSubpropertyEventFilterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createSubpropertyEventFilterTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(createSubpropertyEventFilterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); this.getAccountCallable = callableFactory.createUnaryCallable( @@ -7171,50 +7184,6 @@ protected HttpJsonAnalyticsAdminServiceStub( this.updatePropertyCallable = callableFactory.createUnaryCallable( updatePropertyTransportSettings, settings.updatePropertySettings(), clientContext); - this.getUserLinkCallable = - callableFactory.createUnaryCallable( - getUserLinkTransportSettings, settings.getUserLinkSettings(), clientContext); - this.batchGetUserLinksCallable = - callableFactory.createUnaryCallable( - batchGetUserLinksTransportSettings, - settings.batchGetUserLinksSettings(), - clientContext); - this.listUserLinksCallable = - callableFactory.createUnaryCallable( - listUserLinksTransportSettings, settings.listUserLinksSettings(), clientContext); - this.listUserLinksPagedCallable = - callableFactory.createPagedCallable( - listUserLinksTransportSettings, settings.listUserLinksSettings(), clientContext); - this.auditUserLinksCallable = - callableFactory.createUnaryCallable( - auditUserLinksTransportSettings, settings.auditUserLinksSettings(), clientContext); - this.auditUserLinksPagedCallable = - callableFactory.createPagedCallable( - auditUserLinksTransportSettings, settings.auditUserLinksSettings(), clientContext); - this.createUserLinkCallable = - callableFactory.createUnaryCallable( - createUserLinkTransportSettings, settings.createUserLinkSettings(), clientContext); - this.batchCreateUserLinksCallable = - callableFactory.createUnaryCallable( - batchCreateUserLinksTransportSettings, - settings.batchCreateUserLinksSettings(), - clientContext); - this.updateUserLinkCallable = - callableFactory.createUnaryCallable( - updateUserLinkTransportSettings, settings.updateUserLinkSettings(), clientContext); - this.batchUpdateUserLinksCallable = - callableFactory.createUnaryCallable( - batchUpdateUserLinksTransportSettings, - settings.batchUpdateUserLinksSettings(), - clientContext); - this.deleteUserLinkCallable = - callableFactory.createUnaryCallable( - deleteUserLinkTransportSettings, settings.deleteUserLinkSettings(), clientContext); - this.batchDeleteUserLinksCallable = - callableFactory.createUnaryCallable( - batchDeleteUserLinksTransportSettings, - settings.batchDeleteUserLinksSettings(), - clientContext); this.createFirebaseLinkCallable = callableFactory.createUnaryCallable( createFirebaseLinkTransportSettings, @@ -7803,6 +7772,61 @@ protected HttpJsonAnalyticsAdminServiceStub( deleteEventCreateRuleTransportSettings, settings.deleteEventCreateRuleSettings(), clientContext); + this.updateDataRedactionSettingsCallable = + callableFactory.createUnaryCallable( + updateDataRedactionSettingsTransportSettings, + settings.updateDataRedactionSettingsSettings(), + clientContext); + this.getDataRedactionSettingsCallable = + callableFactory.createUnaryCallable( + getDataRedactionSettingsTransportSettings, + settings.getDataRedactionSettingsSettings(), + clientContext); + this.createRollupPropertyCallable = + callableFactory.createUnaryCallable( + createRollupPropertyTransportSettings, + settings.createRollupPropertySettings(), + clientContext); + this.getRollupPropertySourceLinkCallable = + callableFactory.createUnaryCallable( + getRollupPropertySourceLinkTransportSettings, + settings.getRollupPropertySourceLinkSettings(), + clientContext); + this.listRollupPropertySourceLinksCallable = + callableFactory.createUnaryCallable( + listRollupPropertySourceLinksTransportSettings, + settings.listRollupPropertySourceLinksSettings(), + clientContext); + this.listRollupPropertySourceLinksPagedCallable = + callableFactory.createPagedCallable( + listRollupPropertySourceLinksTransportSettings, + settings.listRollupPropertySourceLinksSettings(), + clientContext); + this.createRollupPropertySourceLinkCallable = + callableFactory.createUnaryCallable( + createRollupPropertySourceLinkTransportSettings, + settings.createRollupPropertySourceLinkSettings(), + clientContext); + this.deleteRollupPropertySourceLinkCallable = + callableFactory.createUnaryCallable( + deleteRollupPropertySourceLinkTransportSettings, + settings.deleteRollupPropertySourceLinkSettings(), + clientContext); + this.createSubpropertyCallable = + callableFactory.createUnaryCallable( + createSubpropertyTransportSettings, + settings.createSubpropertySettings(), + clientContext); + this.deleteSubpropertyEventFilterCallable = + callableFactory.createUnaryCallable( + deleteSubpropertyEventFilterTransportSettings, + settings.deleteSubpropertyEventFilterSettings(), + clientContext); + this.createSubpropertyEventFilterCallable = + callableFactory.createUnaryCallable( + createSubpropertyEventFilterTransportSettings, + settings.createSubpropertyEventFilterSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -7822,16 +7846,6 @@ public static List getMethodDescriptors() { methodDescriptors.add(createPropertyMethodDescriptor); methodDescriptors.add(deletePropertyMethodDescriptor); methodDescriptors.add(updatePropertyMethodDescriptor); - methodDescriptors.add(getUserLinkMethodDescriptor); - methodDescriptors.add(batchGetUserLinksMethodDescriptor); - methodDescriptors.add(listUserLinksMethodDescriptor); - methodDescriptors.add(auditUserLinksMethodDescriptor); - methodDescriptors.add(createUserLinkMethodDescriptor); - methodDescriptors.add(batchCreateUserLinksMethodDescriptor); - methodDescriptors.add(updateUserLinkMethodDescriptor); - methodDescriptors.add(batchUpdateUserLinksMethodDescriptor); - methodDescriptors.add(deleteUserLinkMethodDescriptor); - methodDescriptors.add(batchDeleteUserLinksMethodDescriptor); methodDescriptors.add(createFirebaseLinkMethodDescriptor); methodDescriptors.add(deleteFirebaseLinkMethodDescriptor); methodDescriptors.add(listFirebaseLinksMethodDescriptor); @@ -7939,6 +7953,16 @@ public static List getMethodDescriptors() { methodDescriptors.add(createEventCreateRuleMethodDescriptor); methodDescriptors.add(updateEventCreateRuleMethodDescriptor); methodDescriptors.add(deleteEventCreateRuleMethodDescriptor); + methodDescriptors.add(updateDataRedactionSettingsMethodDescriptor); + methodDescriptors.add(getDataRedactionSettingsMethodDescriptor); + methodDescriptors.add(createRollupPropertyMethodDescriptor); + methodDescriptors.add(getRollupPropertySourceLinkMethodDescriptor); + methodDescriptors.add(listRollupPropertySourceLinksMethodDescriptor); + methodDescriptors.add(createRollupPropertySourceLinkMethodDescriptor); + methodDescriptors.add(deleteRollupPropertySourceLinkMethodDescriptor); + methodDescriptors.add(createSubpropertyMethodDescriptor); + methodDescriptors.add(deleteSubpropertyEventFilterMethodDescriptor); + methodDescriptors.add(createSubpropertyEventFilterMethodDescriptor); return methodDescriptors; } @@ -8016,71 +8040,6 @@ public UnaryCallable updatePropertyCallable() { return updatePropertyCallable; } - @Override - public UnaryCallable getUserLinkCallable() { - return getUserLinkCallable; - } - - @Override - public UnaryCallable - batchGetUserLinksCallable() { - return batchGetUserLinksCallable; - } - - @Override - public UnaryCallable listUserLinksCallable() { - return listUserLinksCallable; - } - - @Override - public UnaryCallable - listUserLinksPagedCallable() { - return listUserLinksPagedCallable; - } - - @Override - public UnaryCallable auditUserLinksCallable() { - return auditUserLinksCallable; - } - - @Override - public UnaryCallable - auditUserLinksPagedCallable() { - return auditUserLinksPagedCallable; - } - - @Override - public UnaryCallable createUserLinkCallable() { - return createUserLinkCallable; - } - - @Override - public UnaryCallable - batchCreateUserLinksCallable() { - return batchCreateUserLinksCallable; - } - - @Override - public UnaryCallable updateUserLinkCallable() { - return updateUserLinkCallable; - } - - @Override - public UnaryCallable - batchUpdateUserLinksCallable() { - return batchUpdateUserLinksCallable; - } - - @Override - public UnaryCallable deleteUserLinkCallable() { - return deleteUserLinkCallable; - } - - @Override - public UnaryCallable batchDeleteUserLinksCallable() { - return batchDeleteUserLinksCallable; - } - @Override public UnaryCallable createFirebaseLinkCallable() { return createFirebaseLinkCallable; @@ -8815,6 +8774,73 @@ public UnaryCallable deleteEventCreateRuleC return deleteEventCreateRuleCallable; } + @Override + public UnaryCallable + updateDataRedactionSettingsCallable() { + return updateDataRedactionSettingsCallable; + } + + @Override + public UnaryCallable + getDataRedactionSettingsCallable() { + return getDataRedactionSettingsCallable; + } + + @Override + public UnaryCallable + createRollupPropertyCallable() { + return createRollupPropertyCallable; + } + + @Override + public UnaryCallable + getRollupPropertySourceLinkCallable() { + return getRollupPropertySourceLinkCallable; + } + + @Override + public UnaryCallable + listRollupPropertySourceLinksCallable() { + return listRollupPropertySourceLinksCallable; + } + + @Override + public UnaryCallable< + ListRollupPropertySourceLinksRequest, ListRollupPropertySourceLinksPagedResponse> + listRollupPropertySourceLinksPagedCallable() { + return listRollupPropertySourceLinksPagedCallable; + } + + @Override + public UnaryCallable + createRollupPropertySourceLinkCallable() { + return createRollupPropertySourceLinkCallable; + } + + @Override + public UnaryCallable + deleteRollupPropertySourceLinkCallable() { + return deleteRollupPropertySourceLinkCallable; + } + + @Override + public UnaryCallable + createSubpropertyCallable() { + return createSubpropertyCallable; + } + + @Override + public UnaryCallable + deleteSubpropertyEventFilterCallable() { + return deleteSubpropertyEventFilterCallable; + } + + @Override + public UnaryCallable + createSubpropertyEventFilterCallable() { + return createSubpropertyEventFilterCallable; + } + @Override public final void close() { try { diff --git a/java-analytics-admin/google-analytics-admin/src/main/resources/META-INF/native-image/com.google.analytics.admin.v1alpha/reflect-config.json b/java-analytics-admin/google-analytics-admin/src/main/resources/META-INF/native-image/com.google.analytics.admin.v1alpha/reflect-config.json index f3ba06dba21d..7cc46dc11d77 100644 --- a/java-analytics-admin/google-analytics-admin/src/main/resources/META-INF/native-image/com.google.analytics.admin.v1alpha/reflect-config.json +++ b/java-analytics-admin/google-analytics-admin/src/main/resources/META-INF/native-image/com.google.analytics.admin.v1alpha/reflect-config.json @@ -980,60 +980,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.analytics.admin.v1alpha.AuditUserLink", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.AuditUserLink$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.AuditUserLinksRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.AuditUserLinksRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.AuditUserLinksResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.AuditUserLinksResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.analytics.admin.v1alpha.BatchCreateAccessBindingsRequest", "queryAllDeclaredConstructors": true, @@ -1071,25 +1017,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse", + "name": "com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1026,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse$Builder", + "name": "com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1035,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest", + "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchDeleteAccessBindingsRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest", + "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest", + "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse", + "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetAccessBindingsResponse$Builder", + "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest", + "name": "com.google.analytics.admin.v1alpha.BigQueryLink", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.BigQueryLink$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse", + "name": "com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse$Builder", + "name": "com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest", + "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse", + "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange$ChangeHistoryResource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateAccessBindingsResponse$Builder", + "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange$ChangeHistoryResource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest", + "name": "com.google.analytics.admin.v1alpha.ChangeHistoryEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.ChangeHistoryEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse", + "name": "com.google.analytics.admin.v1alpha.ChangeHistoryResourceType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse$Builder", + "name": "com.google.analytics.admin.v1alpha.ChannelGroup", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BigQueryLink", + "name": "com.google.analytics.admin.v1alpha.ChannelGroup$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.BigQueryLink$Builder", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$InListFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$InListFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange$Builder", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$StringFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange$ChangeHistoryResource", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$StringFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChangeHistoryChange$ChangeHistoryResource$Builder", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$StringFilter$MatchType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChangeHistoryEvent", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpression", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChangeHistoryEvent$Builder", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpression$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChangeHistoryResourceType", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroup", + "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroup$Builder", + "name": "com.google.analytics.admin.v1alpha.CoarseValue", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter", + "name": "com.google.analytics.admin.v1alpha.ConnectedSiteTag", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$Builder", + "name": "com.google.analytics.admin.v1alpha.ConnectedSiteTag$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$InListFilter", + "name": "com.google.analytics.admin.v1alpha.ConversionEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1431,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$InListFilter$Builder", + "name": "com.google.analytics.admin.v1alpha.ConversionEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$StringFilter", + "name": "com.google.analytics.admin.v1alpha.ConversionEvent$ConversionCountingMethod", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1449,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$StringFilter$Builder", + "name": "com.google.analytics.admin.v1alpha.ConversionValues", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilter$StringFilter$MatchType", + "name": "com.google.analytics.admin.v1alpha.ConversionValues$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1467,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpression", + "name": "com.google.analytics.admin.v1alpha.CreateAccessBindingRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpression$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateAccessBindingRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1485,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList", + "name": "com.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1503,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CoarseValue", + "name": "com.google.analytics.admin.v1alpha.CreateAudienceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ConnectedSiteTag", + "name": "com.google.analytics.admin.v1alpha.CreateAudienceRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1521,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ConnectedSiteTag$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateChannelGroupRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ConversionEvent", + "name": "com.google.analytics.admin.v1alpha.CreateChannelGroupRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ConversionEvent$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ConversionEvent$ConversionCountingMethod", + "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ConversionValues", + "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +1494,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ConversionValues$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateAccessBindingRequest", + "name": "com.google.analytics.admin.v1alpha.CreateConversionEventRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +1512,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateAccessBindingRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateConversionEventRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest", + "name": "com.google.analytics.admin.v1alpha.CreateCustomDimensionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +1530,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateCustomDimensionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateAudienceRequest", + "name": "com.google.analytics.admin.v1alpha.CreateCustomMetricRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +1548,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateAudienceRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateCustomMetricRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateChannelGroupRequest", + "name": "com.google.analytics.admin.v1alpha.CreateDataStreamRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +1566,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateChannelGroupRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateDataStreamRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest", + "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +1584,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse", + "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateConversionEventRequest", + "name": "com.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +1620,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateConversionEventRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1701,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateCustomDimensionRequest", + "name": "com.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +1638,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateCustomDimensionRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1719,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateCustomMetricRequest", + "name": "com.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +1656,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateCustomMetricRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1737,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateDataStreamRequest", + "name": "com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +1674,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateDataStreamRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest", + "name": "com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +1692,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest", + "name": "com.google.analytics.admin.v1alpha.CreatePropertyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +1710,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreatePropertyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest", + "name": "com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +1728,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest", + "name": "com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +1746,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateExpandedDataSetRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest", + "name": "com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +1764,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest", + "name": "com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +1782,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest", + "name": "com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +1800,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreatePropertyRequest", + "name": "com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreatePropertyRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest", + "name": "com.google.analytics.admin.v1alpha.CreateSubpropertyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateSKAdNetworkConversionValueSchemaRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateSubpropertyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest", + "name": "com.google.analytics.admin.v1alpha.CreateSubpropertyResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateSearchAds360LinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CreateSubpropertyResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateUserLinkRequest", + "name": "com.google.analytics.admin.v1alpha.CustomDimension", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CreateUserLinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.CustomDimension$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +1881,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomDimension", + "name": "com.google.analytics.admin.v1alpha.CustomDimension$DimensionScope", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +1890,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomDimension$Builder", + "name": "com.google.analytics.admin.v1alpha.CustomMetric", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +1899,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomDimension$DimensionScope", + "name": "com.google.analytics.admin.v1alpha.CustomMetric$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +1908,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomMetric", + "name": "com.google.analytics.admin.v1alpha.CustomMetric$MeasurementUnit", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1989,7 +1917,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomMetric$Builder", + "name": "com.google.analytics.admin.v1alpha.CustomMetric$MetricScope", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1998,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomMetric$MeasurementUnit", + "name": "com.google.analytics.admin.v1alpha.CustomMetric$RestrictedMetricType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomMetric$MetricScope", + "name": "com.google.analytics.admin.v1alpha.DataRedactionSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.CustomMetric$RestrictedMetricType", + "name": "com.google.analytics.admin.v1alpha.DataRedactionSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2420,6 +2348,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.admin.v1alpha.DeleteSKAdNetworkConversionValueSchemaRequest", "queryAllDeclaredConstructors": true, @@ -2457,7 +2403,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.DeleteUserLinkRequest", + "name": "com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2466,7 +2412,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.DeleteUserLinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2951,6 +2897,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest", "queryAllDeclaredConstructors": true, @@ -3167,6 +3131,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.admin.v1alpha.GetSKAdNetworkConversionValueSchemaRequest", "queryAllDeclaredConstructors": true, @@ -3204,7 +3186,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.GetUserLinkRequest", + "name": "com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3213,7 +3195,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.GetUserLinkRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4076,6 +4058,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.admin.v1alpha.ListSKAdNetworkConversionValueSchemasRequest", "queryAllDeclaredConstructors": true, @@ -4149,7 +4167,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ListUserLinksRequest", + "name": "com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4158,7 +4176,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ListUserLinksRequest$Builder", + "name": "com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4167,7 +4185,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ListUserLinksResponse", + "name": "com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4176,7 +4194,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.ListUserLinksResponse$Builder", + "name": "com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4364,6 +4382,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.admin.v1alpha.RollupPropertySourceLink", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.RollupPropertySourceLink$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.admin.v1alpha.RunAccessReportRequest", "queryAllDeclaredConstructors": true, @@ -4517,6 +4553,132 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause$FilterClauseType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition$StringFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition$StringFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition$StringFilter$MatchType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.admin.v1alpha.UpdateAccessBindingRequest", "queryAllDeclaredConstructors": true, @@ -4661,6 +4823,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest", "queryAllDeclaredConstructors": true, @@ -4878,25 +5058,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.UpdateUserLinkRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.UpdateUserLinkRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.analytics.admin.v1alpha.UserLink", + "name": "com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4905,7 +5067,7 @@ "allPublicClasses": true }, { - "name": "com.google.analytics.admin.v1alpha.UserLink$Builder", + "name": "com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, diff --git a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientHttpJsonTest.java b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientHttpJsonTest.java index ffd241701e81..00bb0dd5ccf2 100644 --- a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientHttpJsonTest.java +++ b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientHttpJsonTest.java @@ -16,7 +16,6 @@ package com.google.analytics.admin.v1alpha; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; @@ -36,9 +35,9 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; import com.google.analytics.admin.v1alpha.stub.HttpJsonAnalyticsAdminServiceStub; @@ -949,18 +948,19 @@ public void updatePropertyExceptionTest() throws Exception { } @Test - public void getUserLinkTest() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createFirebaseLinkTest() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - UserLink actualResponse = client.getUserLink(name); + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -979,15 +979,16 @@ public void getUserLinkTest() throws Exception { } @Test - public void getUserLinkExceptionTest() throws Exception { + public void createFirebaseLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - client.getUserLink(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -995,18 +996,19 @@ public void getUserLinkExceptionTest() throws Exception { } @Test - public void getUserLinkTest2() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createFirebaseLinkTest2() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String name = "accounts/account-2326/userLinks/userLink-2326"; + String parent = "properties/propertie-2024"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - UserLink actualResponse = client.getUserLink(name); + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -1025,15 +1027,16 @@ public void getUserLinkTest2() throws Exception { } @Test - public void getUserLinkExceptionTest2() throws Exception { + public void createFirebaseLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "accounts/account-2326/userLinks/userLink-2326"; - client.getUserLink(name); + String parent = "properties/propertie-2024"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1041,19 +1044,13 @@ public void getUserLinkExceptionTest2() throws Exception { } @Test - public void batchGetUserLinksTest() throws Exception { - BatchGetUserLinksResponse expectedResponse = - BatchGetUserLinksResponse.newBuilder().addAllUserLinks(new ArrayList()).build(); + public void deleteFirebaseLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - BatchGetUserLinksRequest request = - BatchGetUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); - BatchGetUserLinksResponse actualResponse = client.batchGetUserLinks(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteFirebaseLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1071,19 +1068,15 @@ public void batchGetUserLinksTest() throws Exception { } @Test - public void batchGetUserLinksExceptionTest() throws Exception { + public void deleteFirebaseLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchGetUserLinksRequest request = - BatchGetUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); - client.batchGetUserLinks(request); + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + client.deleteFirebaseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1091,23 +1084,13 @@ public void batchGetUserLinksExceptionTest() throws Exception { } @Test - public void listUserLinksTest() throws Exception { - UserLink responsesElement = UserLink.newBuilder().build(); - ListUserLinksResponse expectedResponse = - ListUserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) - .build(); + public void deleteFirebaseLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - - ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "properties/propertie-2649/firebaseLinks/firebaseLink-2649"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + client.deleteFirebaseLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1125,15 +1108,15 @@ public void listUserLinksTest() throws Exception { } @Test - public void listUserLinksExceptionTest() throws Exception { + public void deleteFirebaseLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - client.listUserLinks(parent); + String name = "properties/propertie-2649/firebaseLinks/firebaseLink-2649"; + client.deleteFirebaseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1141,23 +1124,23 @@ public void listUserLinksExceptionTest() throws Exception { } @Test - public void listUserLinksTest2() throws Exception { - UserLink responsesElement = UserLink.newBuilder().build(); - ListUserLinksResponse expectedResponse = - ListUserLinksResponse.newBuilder() + public void listFirebaseLinksTest() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) + .addAllFirebaseLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1175,7 +1158,7 @@ public void listUserLinksTest2() throws Exception { } @Test - public void listUserLinksExceptionTest2() throws Exception { + public void listFirebaseLinksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -1183,7 +1166,7 @@ public void listUserLinksExceptionTest2() throws Exception { try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listUserLinks(parent); + client.listFirebaseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1191,23 +1174,23 @@ public void listUserLinksExceptionTest2() throws Exception { } @Test - public void listUserLinksTest3() throws Exception { - UserLink responsesElement = UserLink.newBuilder().build(); - ListUserLinksResponse expectedResponse = - ListUserLinksResponse.newBuilder() + public void listFirebaseLinksTest2() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) + .addAllFirebaseLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "accounts/account-4811"; + String parent = "properties/propertie-2024"; - ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1225,15 +1208,15 @@ public void listUserLinksTest3() throws Exception { } @Test - public void listUserLinksExceptionTest3() throws Exception { + public void listFirebaseLinksExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "accounts/account-4811"; - client.listUserLinks(parent); + String parent = "properties/propertie-2024"; + client.listFirebaseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1241,28 +1224,18 @@ public void listUserLinksExceptionTest3() throws Exception { } @Test - public void auditUserLinksTest() throws Exception { - AuditUserLink responsesElement = AuditUserLink.newBuilder().build(); - AuditUserLinksResponse expectedResponse = - AuditUserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) + public void getGlobalSiteTagTest() throws Exception { + GlobalSiteTag expectedResponse = + GlobalSiteTag.newBuilder() + .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setSnippet("snippet-2061635299") .build(); mockService.addResponse(expectedResponse); - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - AuditUserLinksPagedResponse pagedListResponse = client.auditUserLinks(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1280,20 +1253,15 @@ public void auditUserLinksTest() throws Exception { } @Test - public void auditUserLinksExceptionTest() throws Exception { + public void getGlobalSiteTagExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.auditUserLinks(request); + GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getGlobalSiteTag(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1301,19 +1269,17 @@ public void auditUserLinksExceptionTest() throws Exception { } @Test - public void createUserLinkTest() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void getGlobalSiteTagTest2() throws Exception { + GlobalSiteTag expectedResponse = + GlobalSiteTag.newBuilder() + .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setSnippet("snippet-2061635299") .build(); mockService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - UserLink userLink = UserLink.newBuilder().build(); + String name = "properties/propertie-1615/dataStreams/dataStream-1615/globalSiteTag"; - UserLink actualResponse = client.createUserLink(parent, userLink); + GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -1332,16 +1298,15 @@ public void createUserLinkTest() throws Exception { } @Test - public void createUserLinkExceptionTest() throws Exception { + public void getGlobalSiteTagExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - UserLink userLink = UserLink.newBuilder().build(); - client.createUserLink(parent, userLink); + String name = "properties/propertie-1615/dataStreams/dataStream-1615/globalSiteTag"; + client.getGlobalSiteTag(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1349,19 +1314,23 @@ public void createUserLinkExceptionTest() throws Exception { } @Test - public void createUserLinkTest2() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); mockService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - UserLink userLink = UserLink.newBuilder().build(); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - UserLink actualResponse = client.createUserLink(parent, userLink); + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -1380,7 +1349,7 @@ public void createUserLinkTest2() throws Exception { } @Test - public void createUserLinkExceptionTest2() throws Exception { + public void createGoogleAdsLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -1388,8 +1357,8 @@ public void createUserLinkExceptionTest2() throws Exception { try { PropertyName parent = PropertyName.of("[PROPERTY]"); - UserLink userLink = UserLink.newBuilder().build(); - client.createUserLink(parent, userLink); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1397,19 +1366,23 @@ public void createUserLinkExceptionTest2() throws Exception { } @Test - public void createUserLinkTest3() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createGoogleAdsLinkTest2() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); mockService.addResponse(expectedResponse); - String parent = "accounts/account-4811"; - UserLink userLink = UserLink.newBuilder().build(); + String parent = "properties/propertie-2024"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - UserLink actualResponse = client.createUserLink(parent, userLink); + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -1428,16 +1401,16 @@ public void createUserLinkTest3() throws Exception { } @Test - public void createUserLinkExceptionTest3() throws Exception { + public void createGoogleAdsLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "accounts/account-4811"; - UserLink userLink = UserLink.newBuilder().build(); - client.createUserLink(parent, userLink); + String parent = "properties/propertie-2024"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1445,21 +1418,32 @@ public void createUserLinkExceptionTest3() throws Exception { } @Test - public void batchCreateUserLinksTest() throws Exception { - BatchCreateUserLinksResponse expectedResponse = - BatchCreateUserLinksResponse.newBuilder() - .addAllUserLinks(new ArrayList()) + public void updateGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); mockService.addResponse(expectedResponse); - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUsers(true) - .addAllRequests(new ArrayList()) + GoogleAdsLink googleAdsLink = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - BatchCreateUserLinksResponse actualResponse = client.batchCreateUserLinks(request); + GoogleAdsLink actualResponse = client.updateGoogleAdsLink(googleAdsLink, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -1478,20 +1462,25 @@ public void batchCreateUserLinksTest() throws Exception { } @Test - public void batchCreateUserLinksExceptionTest() throws Exception { + public void updateGoogleAdsLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUsers(true) - .addAllRequests(new ArrayList()) + GoogleAdsLink googleAdsLink = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); - client.batchCreateUserLinks(request); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGoogleAdsLink(googleAdsLink, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1499,24 +1488,13 @@ public void batchCreateUserLinksExceptionTest() throws Exception { } @Test - public void updateUserLinkTest() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) - .build(); + public void deleteGoogleAdsLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - UserLink userLink = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) - .build(); + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); - UserLink actualResponse = client.updateUserLink(userLink); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteGoogleAdsLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1534,20 +1512,15 @@ public void updateUserLinkTest() throws Exception { } @Test - public void updateUserLinkExceptionTest() throws Exception { + public void deleteGoogleAdsLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - UserLink userLink = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) - .build(); - client.updateUserLink(userLink); + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + client.deleteGoogleAdsLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1555,21 +1528,13 @@ public void updateUserLinkExceptionTest() throws Exception { } @Test - public void batchUpdateUserLinksTest() throws Exception { - BatchUpdateUserLinksResponse expectedResponse = - BatchUpdateUserLinksResponse.newBuilder() - .addAllUserLinks(new ArrayList()) - .build(); + public void deleteGoogleAdsLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - BatchUpdateUserLinksRequest request = - BatchUpdateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + String name = "properties/propertie-1267/googleAdsLinks/googleAdsLink-1267"; - BatchUpdateUserLinksResponse actualResponse = client.batchUpdateUserLinks(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteGoogleAdsLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1587,19 +1552,15 @@ public void batchUpdateUserLinksTest() throws Exception { } @Test - public void batchUpdateUserLinksExceptionTest() throws Exception { + public void deleteGoogleAdsLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchUpdateUserLinksRequest request = - BatchUpdateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchUpdateUserLinks(request); + String name = "properties/propertie-1267/googleAdsLinks/googleAdsLink-1267"; + client.deleteGoogleAdsLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1607,13 +1568,23 @@ public void batchUpdateUserLinksExceptionTest() throws Exception { } @Test - public void deleteUserLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listGoogleAdsLinksTest() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - client.deleteUserLink(name); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1631,15 +1602,15 @@ public void deleteUserLinkTest() throws Exception { } @Test - public void deleteUserLinkExceptionTest() throws Exception { + public void listGoogleAdsLinksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - client.deleteUserLink(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listGoogleAdsLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1647,13 +1618,23 @@ public void deleteUserLinkExceptionTest() throws Exception { } @Test - public void deleteUserLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listGoogleAdsLinksTest2() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - String name = "accounts/account-2326/userLinks/userLink-2326"; + String parent = "properties/propertie-2024"; + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - client.deleteUserLink(name); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1671,15 +1652,15 @@ public void deleteUserLinkTest2() throws Exception { } @Test - public void deleteUserLinkExceptionTest2() throws Exception { + public void listGoogleAdsLinksExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "accounts/account-2326/userLinks/userLink-2326"; - client.deleteUserLink(name); + String parent = "properties/propertie-2024"; + client.listGoogleAdsLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1687,17 +1668,22 @@ public void deleteUserLinkExceptionTest2() throws Exception { } @Test - public void batchDeleteUserLinksTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getDataSharingSettingsTest() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) + .build(); mockService.addResponse(expectedResponse); - BatchDeleteUserLinksRequest request = - BatchDeleteUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); - client.batchDeleteUserLinks(request); + DataSharingSettings actualResponse = client.getDataSharingSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1715,19 +1701,15 @@ public void batchDeleteUserLinksTest() throws Exception { } @Test - public void batchDeleteUserLinksExceptionTest() throws Exception { + public void getDataSharingSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchDeleteUserLinksRequest request = - BatchDeleteUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchDeleteUserLinks(request); + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + client.getDataSharingSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1735,19 +1717,21 @@ public void batchDeleteUserLinksExceptionTest() throws Exception { } @Test - public void createFirebaseLinkTest() throws Exception { - FirebaseLink expectedResponse = - FirebaseLink.newBuilder() - .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) + public void getDataSharingSettingsTest2() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + String name = "accounts/account-7122/dataSharingSettings"; - FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + DataSharingSettings actualResponse = client.getDataSharingSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -1766,16 +1750,15 @@ public void createFirebaseLinkTest() throws Exception { } @Test - public void createFirebaseLinkExceptionTest() throws Exception { + public void getDataSharingSettingsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - client.createFirebaseLink(parent, firebaseLink); + String name = "accounts/account-7122/dataSharingSettings"; + client.getDataSharingSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1783,19 +1766,23 @@ public void createFirebaseLinkExceptionTest() throws Exception { } @Test - public void createFirebaseLinkTest2() throws Exception { - FirebaseLink expectedResponse = - FirebaseLink.newBuilder() - .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) + public void getMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -1814,16 +1801,17 @@ public void createFirebaseLinkTest2() throws Exception { } @Test - public void createFirebaseLinkExceptionTest2() throws Exception { + public void getMeasurementProtocolSecretExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - client.createFirebaseLink(parent, firebaseLink); + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.getMeasurementProtocolSecret(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1831,13 +1819,23 @@ public void createFirebaseLinkExceptionTest2() throws Exception { } @Test - public void deleteFirebaseLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); mockService.addResponse(expectedResponse); - FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; - client.deleteFirebaseLink(name); + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1855,15 +1853,16 @@ public void deleteFirebaseLinkTest() throws Exception { } @Test - public void deleteFirebaseLinkExceptionTest() throws Exception { + public void getMeasurementProtocolSecretExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); - client.deleteFirebaseLink(name); + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + client.getMeasurementProtocolSecret(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1871,13 +1870,25 @@ public void deleteFirebaseLinkExceptionTest() throws Exception { } @Test - public void deleteFirebaseLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listMeasurementProtocolSecretsTest() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() + .setNextPageToken("") + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-2649/firebaseLinks/firebaseLink-2649"; + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.deleteFirebaseLink(name); + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1895,15 +1906,15 @@ public void deleteFirebaseLinkTest2() throws Exception { } @Test - public void deleteFirebaseLinkExceptionTest2() throws Exception { + public void listMeasurementProtocolSecretsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-2649/firebaseLinks/firebaseLink-2649"; - client.deleteFirebaseLink(name); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.listMeasurementProtocolSecrets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1911,23 +1922,25 @@ public void deleteFirebaseLinkExceptionTest2() throws Exception { } @Test - public void listFirebaseLinksTest() throws Exception { - FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); - ListFirebaseLinksResponse expectedResponse = - ListFirebaseLinksResponse.newBuilder() + public void listMeasurementProtocolSecretsTest2() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() .setNextPageToken("") - .addAllFirebaseLinks(Arrays.asList(responsesElement)) + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1945,15 +1958,15 @@ public void listFirebaseLinksTest() throws Exception { } @Test - public void listFirebaseLinksExceptionTest() throws Exception { + public void listMeasurementProtocolSecretsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listFirebaseLinks(parent); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + client.listMeasurementProtocolSecrets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1961,23 +1974,25 @@ public void listFirebaseLinksExceptionTest() throws Exception { } @Test - public void listFirebaseLinksTest2() throws Exception { - FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); - ListFirebaseLinksResponse expectedResponse = - ListFirebaseLinksResponse.newBuilder() - .setNextPageToken("") - .addAllFirebaseLinks(Arrays.asList(responsesElement)) + public void createMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -1995,15 +2010,17 @@ public void listFirebaseLinksTest2() throws Exception { } @Test - public void listFirebaseLinksExceptionTest2() throws Exception { + public void createMeasurementProtocolSecretExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listFirebaseLinks(parent); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2011,17 +2028,24 @@ public void listFirebaseLinksExceptionTest2() throws Exception { } @Test - public void getGlobalSiteTagTest() throws Exception { - GlobalSiteTag expectedResponse = - GlobalSiteTag.newBuilder() - .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setSnippet("snippet-2061635299") + public void createMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") .build(); mockService.addResponse(expectedResponse); - GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); - GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -2040,15 +2064,17 @@ public void getGlobalSiteTagTest() throws Exception { } @Test - public void getGlobalSiteTagExceptionTest() throws Exception { + public void createMeasurementProtocolSecretExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); - client.getGlobalSiteTag(name); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2056,18 +2082,15 @@ public void getGlobalSiteTagExceptionTest() throws Exception { } @Test - public void getGlobalSiteTagTest2() throws Exception { - GlobalSiteTag expectedResponse = - GlobalSiteTag.newBuilder() - .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setSnippet("snippet-2061635299") - .build(); + public void deleteMeasurementProtocolSecretTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-1615/dataStreams/dataStream-1615/globalSiteTag"; + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteMeasurementProtocolSecret(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2085,15 +2108,17 @@ public void getGlobalSiteTagTest2() throws Exception { } @Test - public void getGlobalSiteTagExceptionTest2() throws Exception { + public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-1615/dataStreams/dataStream-1615/globalSiteTag"; - client.getGlobalSiteTag(name); + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.deleteMeasurementProtocolSecret(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2101,24 +2126,14 @@ public void getGlobalSiteTagExceptionTest2() throws Exception { } @Test - public void createGoogleAdsLinkTest() throws Exception { - GoogleAdsLink expectedResponse = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") - .build(); + public void deleteMeasurementProtocolSecretTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; - GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteMeasurementProtocolSecret(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2136,40 +2151,48 @@ public void createGoogleAdsLinkTest() throws Exception { } @Test - public void createGoogleAdsLinkExceptionTest() throws Exception { + public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - client.createGoogleAdsLink(parent, googleAdsLink); - Assert.fail("No exception raised"); + String name = + "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + client.deleteMeasurementProtocolSecret(name); + Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } @Test - public void createGoogleAdsLinkTest2() throws Exception { - GoogleAdsLink expectedResponse = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") + public void updateMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); + MeasurementProtocolSecret actualResponse = + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -2188,16 +2211,24 @@ public void createGoogleAdsLinkTest2() throws Exception { } @Test - public void createGoogleAdsLinkExceptionTest2() throws Exception { + public void updateMeasurementProtocolSecretExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - client.createGoogleAdsLink(parent, googleAdsLink); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2205,32 +2236,19 @@ public void createGoogleAdsLinkExceptionTest2() throws Exception { } @Test - public void updateGoogleAdsLinkTest() throws Exception { - GoogleAdsLink expectedResponse = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") - .build(); + public void acknowledgeUserDataCollectionTest() throws Exception { + AcknowledgeUserDataCollectionResponse expectedResponse = + AcknowledgeUserDataCollectionResponse.newBuilder().build(); mockService.addResponse(expectedResponse); - GoogleAdsLink googleAdsLink = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - GoogleAdsLink actualResponse = client.updateGoogleAdsLink(googleAdsLink, updateMask); + AcknowledgeUserDataCollectionResponse actualResponse = + client.acknowledgeUserDataCollection(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -2249,25 +2267,19 @@ public void updateGoogleAdsLinkTest() throws Exception { } @Test - public void updateGoogleAdsLinkExceptionTest() throws Exception { + public void acknowledgeUserDataCollectionExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - GoogleAdsLink googleAdsLink = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateGoogleAdsLink(googleAdsLink, updateMask); + client.acknowledgeUserDataCollection(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2275,13 +2287,27 @@ public void updateGoogleAdsLinkExceptionTest() throws Exception { } @Test - public void deleteGoogleAdsLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getSKAdNetworkConversionValueSchemaTest() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) + .build(); mockService.addResponse(expectedResponse); - GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - client.deleteGoogleAdsLink(name); + SKAdNetworkConversionValueSchema actualResponse = + client.getSKAdNetworkConversionValueSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2299,15 +2325,17 @@ public void deleteGoogleAdsLinkTest() throws Exception { } @Test - public void deleteGoogleAdsLinkExceptionTest() throws Exception { + public void getSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); - client.deleteGoogleAdsLink(name); + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + client.getSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2315,13 +2343,26 @@ public void deleteGoogleAdsLinkExceptionTest() throws Exception { } @Test - public void deleteGoogleAdsLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getSKAdNetworkConversionValueSchemaTest2() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-1267/googleAdsLinks/googleAdsLink-1267"; + String name = + "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; - client.deleteGoogleAdsLink(name); + SKAdNetworkConversionValueSchema actualResponse = + client.getSKAdNetworkConversionValueSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2339,15 +2380,16 @@ public void deleteGoogleAdsLinkTest2() throws Exception { } @Test - public void deleteGoogleAdsLinkExceptionTest2() throws Exception { + public void getSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-1267/googleAdsLinks/googleAdsLink-1267"; - client.deleteGoogleAdsLink(name); + String name = + "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; + client.getSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2355,23 +2397,27 @@ public void deleteGoogleAdsLinkExceptionTest2() throws Exception { } @Test - public void listGoogleAdsLinksTest() throws Exception { - GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); - ListGoogleAdsLinksResponse expectedResponse = - ListGoogleAdsLinksResponse.newBuilder() - .setNextPageToken("") - .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + public void createSKAdNetworkConversionValueSchemaTest() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); + SKAdNetworkConversionValueSchema actualResponse = + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2389,15 +2435,17 @@ public void listGoogleAdsLinksTest() throws Exception { } @Test - public void listGoogleAdsLinksExceptionTest() throws Exception { + public void createSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listGoogleAdsLinks(parent); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2405,23 +2453,27 @@ public void listGoogleAdsLinksExceptionTest() throws Exception { } @Test - public void listGoogleAdsLinksTest2() throws Exception { - GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); - ListGoogleAdsLinksResponse expectedResponse = - ListGoogleAdsLinksResponse.newBuilder() - .setNextPageToken("") - .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + public void createSKAdNetworkConversionValueSchemaTest2() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); + SKAdNetworkConversionValueSchema actualResponse = + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2439,15 +2491,17 @@ public void listGoogleAdsLinksTest2() throws Exception { } @Test - public void listGoogleAdsLinksExceptionTest2() throws Exception { + public void createSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listGoogleAdsLinks(parent); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2455,22 +2509,15 @@ public void listGoogleAdsLinksExceptionTest2() throws Exception { } @Test - public void getDataSharingSettingsTest() throws Exception { - DataSharingSettings expectedResponse = - DataSharingSettings.newBuilder() - .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) - .setSharingWithGoogleSupportEnabled(true) - .setSharingWithGoogleAssignedSalesEnabled(true) - .setSharingWithGoogleAnySalesEnabled(true) - .setSharingWithGoogleProductsEnabled(true) - .setSharingWithOthersEnabled(true) - .build(); + public void deleteSKAdNetworkConversionValueSchemaTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - DataSharingSettings actualResponse = client.getDataSharingSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSKAdNetworkConversionValueSchema(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2488,15 +2535,17 @@ public void getDataSharingSettingsTest() throws Exception { } @Test - public void getDataSharingSettingsExceptionTest() throws Exception { + public void deleteSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); - client.getDataSharingSettings(name); + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + client.deleteSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2504,22 +2553,14 @@ public void getDataSharingSettingsExceptionTest() throws Exception { } @Test - public void getDataSharingSettingsTest2() throws Exception { - DataSharingSettings expectedResponse = - DataSharingSettings.newBuilder() - .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) - .setSharingWithGoogleSupportEnabled(true) - .setSharingWithGoogleAssignedSalesEnabled(true) - .setSharingWithGoogleAnySalesEnabled(true) - .setSharingWithGoogleProductsEnabled(true) - .setSharingWithOthersEnabled(true) - .build(); + public void deleteSKAdNetworkConversionValueSchemaTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = "accounts/account-7122/dataSharingSettings"; + String name = + "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; - DataSharingSettings actualResponse = client.getDataSharingSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSKAdNetworkConversionValueSchema(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2537,15 +2578,16 @@ public void getDataSharingSettingsTest2() throws Exception { } @Test - public void getDataSharingSettingsExceptionTest2() throws Exception { + public void deleteSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "accounts/account-7122/dataSharingSettings"; - client.getDataSharingSettings(name); + String name = + "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; + client.deleteSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2553,23 +2595,35 @@ public void getDataSharingSettingsExceptionTest2() throws Exception { } @Test - public void getMeasurementProtocolSecretTest() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() + public void updateSKAdNetworkConversionValueSchemaTest() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) .build(); mockService.addResponse(expectedResponse); - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); + SKAdNetworkConversionValueSchema actualResponse = + client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -2588,17 +2642,26 @@ public void getMeasurementProtocolSecretTest() throws Exception { } @Test - public void getMeasurementProtocolSecretExceptionTest() throws Exception { + public void updateSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - client.getMeasurementProtocolSecret(name); + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2606,23 +2669,27 @@ public void getMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void getMeasurementProtocolSecretTest2() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + public void listSKAdNetworkConversionValueSchemasTest() throws Exception { + SKAdNetworkConversionValueSchema responsesElement = + SKAdNetworkConversionValueSchema.newBuilder().build(); + ListSKAdNetworkConversionValueSchemasResponse expectedResponse = + ListSKAdNetworkConversionValueSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = + client.listSKAdNetworkConversionValueSchemas(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2640,16 +2707,15 @@ public void getMeasurementProtocolSecretTest2() throws Exception { } @Test - public void getMeasurementProtocolSecretExceptionTest2() throws Exception { + public void listSKAdNetworkConversionValueSchemasExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; - client.getMeasurementProtocolSecret(name); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.listSKAdNetworkConversionValueSchemas(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2657,25 +2723,27 @@ public void getMeasurementProtocolSecretExceptionTest2() throws Exception { } @Test - public void listMeasurementProtocolSecretsTest() throws Exception { - MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); - ListMeasurementProtocolSecretsResponse expectedResponse = - ListMeasurementProtocolSecretsResponse.newBuilder() + public void listSKAdNetworkConversionValueSchemasTest2() throws Exception { + SKAdNetworkConversionValueSchema responsesElement = + SKAdNetworkConversionValueSchema.newBuilder().build(); + ListSKAdNetworkConversionValueSchemasResponse expectedResponse = + ListSKAdNetworkConversionValueSchemasResponse.newBuilder() .setNextPageToken("") - .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - ListMeasurementProtocolSecretsPagedResponse pagedListResponse = - client.listMeasurementProtocolSecrets(parent); + ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = + client.listSKAdNetworkConversionValueSchemas(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals( - expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); + expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2693,15 +2761,88 @@ public void listMeasurementProtocolSecretsTest() throws Exception { } @Test - public void listMeasurementProtocolSecretsExceptionTest() throws Exception { + public void listSKAdNetworkConversionValueSchemasExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.listMeasurementProtocolSecrets(parent); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + client.listSKAdNetworkConversionValueSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchChangeHistoryEventsTest() throws Exception { + ChangeHistoryEvent responsesElement = ChangeHistoryEvent.newBuilder().build(); + SearchChangeHistoryEventsResponse expectedResponse = + SearchChangeHistoryEventsResponse.newBuilder() + .setNextPageToken("") + .addAllChangeHistoryEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + SearchChangeHistoryEventsPagedResponse pagedListResponse = + client.searchChangeHistoryEvents(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeHistoryEventsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchChangeHistoryEventsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchChangeHistoryEvents(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2709,25 +2850,19 @@ public void listMeasurementProtocolSecretsExceptionTest() throws Exception { } @Test - public void listMeasurementProtocolSecretsTest2() throws Exception { - MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); - ListMeasurementProtocolSecretsResponse expectedResponse = - ListMeasurementProtocolSecretsResponse.newBuilder() - .setNextPageToken("") - .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + public void getGoogleSignalsSettingsTest() throws Exception { + GoogleSignalsSettings expectedResponse = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - - ListMeasurementProtocolSecretsPagedResponse pagedListResponse = - client.listMeasurementProtocolSecrets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); + GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2745,15 +2880,15 @@ public void listMeasurementProtocolSecretsTest2() throws Exception { } @Test - public void listMeasurementProtocolSecretsExceptionTest2() throws Exception { + public void getGoogleSignalsSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - client.listMeasurementProtocolSecrets(parent); + GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); + client.getGoogleSignalsSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2761,24 +2896,18 @@ public void listMeasurementProtocolSecretsExceptionTest2() throws Exception { } @Test - public void createMeasurementProtocolSecretTest() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + public void getGoogleSignalsSettingsTest2() throws Exception { + GoogleSignalsSettings expectedResponse = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) .build(); mockService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); + String name = "properties/propertie-7279/googleSignalsSettings"; - MeasurementProtocolSecret actualResponse = - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -2797,17 +2926,15 @@ public void createMeasurementProtocolSecretTest() throws Exception { } @Test - public void createMeasurementProtocolSecretExceptionTest() throws Exception { + public void getGoogleSignalsSettingsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + String name = "properties/propertie-7279/googleSignalsSettings"; + client.getGoogleSignalsSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2815,24 +2942,25 @@ public void createMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void createMeasurementProtocolSecretTest2() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + public void updateGoogleSignalsSettingsTest() throws Exception { + GoogleSignalsSettings expectedResponse = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); + GoogleSignalsSettings googleSignalsSettings = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - MeasurementProtocolSecret actualResponse = - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + GoogleSignalsSettings actualResponse = + client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -2851,17 +2979,21 @@ public void createMeasurementProtocolSecretTest2() throws Exception { } @Test - public void createMeasurementProtocolSecretExceptionTest2() throws Exception { + public void updateGoogleSignalsSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + GoogleSignalsSettings googleSignalsSettings = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2869,15 +3001,22 @@ public void createMeasurementProtocolSecretExceptionTest2() throws Exception { } @Test - public void deleteMeasurementProtocolSecretTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); mockService.addResponse(expectedResponse); - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - client.deleteMeasurementProtocolSecret(name); + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2895,17 +3034,16 @@ public void deleteMeasurementProtocolSecretTest() throws Exception { } @Test - public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { + public void createConversionEventExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - client.deleteMeasurementProtocolSecret(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2913,14 +3051,22 @@ public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void deleteMeasurementProtocolSecretTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; + String parent = "properties/propertie-2024"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - client.deleteMeasurementProtocolSecret(name); + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -2938,16 +3084,16 @@ public void deleteMeasurementProtocolSecretTest2() throws Exception { } @Test - public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { + public void createConversionEventExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-6357/dataStreams/dataStream-6357/measurementProtocolSecrets/measurementProtocolSecret-6357"; - client.deleteMeasurementProtocolSecret(name); + String parent = "properties/propertie-2024"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2955,31 +3101,28 @@ public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { } @Test - public void updateMeasurementProtocolSecretTest() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + public void updateConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); mockService.addResponse(expectedResponse); - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + ConversionEvent conversionEvent = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); - MeasurementProtocolSecret actualResponse = - client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + ConversionEvent actualResponse = client.updateConversionEvent(conversionEvent, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -2998,24 +3141,23 @@ public void updateMeasurementProtocolSecretTest() throws Exception { } @Test - public void updateMeasurementProtocolSecretExceptionTest() throws Exception { + public void updateConversionEventExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + ConversionEvent conversionEvent = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + client.updateConversionEvent(conversionEvent, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3023,19 +3165,20 @@ public void updateMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void acknowledgeUserDataCollectionTest() throws Exception { - AcknowledgeUserDataCollectionResponse expectedResponse = - AcknowledgeUserDataCollectionResponse.newBuilder().build(); + public void getConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); mockService.addResponse(expectedResponse); - AcknowledgeUserDataCollectionRequest request = - AcknowledgeUserDataCollectionRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .setAcknowledgement("acknowledgement1769490938") - .build(); + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - AcknowledgeUserDataCollectionResponse actualResponse = - client.acknowledgeUserDataCollection(request); + ConversionEvent actualResponse = client.getConversionEvent(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -3054,19 +3197,15 @@ public void acknowledgeUserDataCollectionTest() throws Exception { } @Test - public void acknowledgeUserDataCollectionExceptionTest() throws Exception { + public void getConversionEventExceptionTest() throws Exception { ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AcknowledgeUserDataCollectionRequest request = - AcknowledgeUserDataCollectionRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .setAcknowledgement("acknowledgement1769490938") - .build(); - client.acknowledgeUserDataCollection(request); + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.getConversionEvent(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3074,26 +3213,20 @@ public void acknowledgeUserDataCollectionExceptionTest() throws Exception { } @Test - public void getSKAdNetworkConversionValueSchemaTest() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + public void getConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); mockService.addResponse(expectedResponse); - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; - SKAdNetworkConversionValueSchema actualResponse = - client.getSKAdNetworkConversionValueSchema(name); + ConversionEvent actualResponse = client.getConversionEvent(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -3112,17 +3245,15 @@ public void getSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void getSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void getConversionEventExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - client.getSKAdNetworkConversionValueSchema(name); + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + client.getConversionEvent(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3130,26 +3261,13 @@ public void getSKAdNetworkConversionValueSchemaExceptionTest() throws Exception } @Test - public void getSKAdNetworkConversionValueSchemaTest2() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) - .build(); + public void deleteConversionEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - SKAdNetworkConversionValueSchema actualResponse = - client.getSKAdNetworkConversionValueSchema(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteConversionEvent(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3167,16 +3285,15 @@ public void getSKAdNetworkConversionValueSchemaTest2() throws Exception { } @Test - public void getSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { + public void deleteConversionEventExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; - client.getSKAdNetworkConversionValueSchema(name); + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.deleteConversionEvent(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3184,27 +3301,13 @@ public void getSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception } @Test - public void createSKAdNetworkConversionValueSchemaTest() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) - .build(); + public void deleteConversionEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; - SKAdNetworkConversionValueSchema actualResponse = - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteConversionEvent(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3222,17 +3325,15 @@ public void createSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void createSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void deleteConversionEventExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); + String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + client.deleteConversionEvent(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3240,27 +3341,23 @@ public void createSKAdNetworkConversionValueSchemaExceptionTest() throws Excepti } @Test - public void createSKAdNetworkConversionValueSchemaTest2() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + public void listConversionEventsTest() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - SKAdNetworkConversionValueSchema actualResponse = - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); - Assert.assertEquals(expectedResponse, actualResponse); + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3278,17 +3375,15 @@ public void createSKAdNetworkConversionValueSchemaTest2() throws Exception { } @Test - public void createSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { + public void listConversionEventsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listConversionEvents(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3296,15 +3391,23 @@ public void createSKAdNetworkConversionValueSchemaExceptionTest2() throws Except } @Test - public void deleteSKAdNetworkConversionValueSchemaTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listConversionEventsTest2() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + String parent = "properties/propertie-2024"; - client.deleteSKAdNetworkConversionValueSchema(name); + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3322,17 +3425,15 @@ public void deleteSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void deleteSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void listConversionEventsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - client.deleteSKAdNetworkConversionValueSchema(name); + String parent = "properties/propertie-2024"; + client.listConversionEvents(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3340,14 +3441,26 @@ public void deleteSKAdNetworkConversionValueSchemaExceptionTest() throws Excepti } @Test - public void deleteSKAdNetworkConversionValueSchemaTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getDisplayVideo360AdvertiserLinkTest() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - client.deleteSKAdNetworkConversionValueSchema(name); + DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3365,16 +3478,16 @@ public void deleteSKAdNetworkConversionValueSchemaTest2() throws Exception { } @Test - public void deleteSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { + public void getDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-7099/dataStreams/dataStream-7099/sKAdNetworkConversionValueSchema/sKAdNetworkConversionValueSchem-7099"; - client.deleteSKAdNetworkConversionValueSchema(name); + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + client.getDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3382,35 +3495,25 @@ public void deleteSKAdNetworkConversionValueSchemaExceptionTest2() throws Except } @Test - public void updateSKAdNetworkConversionValueSchemaTest() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() + public void getDisplayVideo360AdvertiserLinkTest2() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = + "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; - SKAdNetworkConversionValueSchema actualResponse = - client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); + DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -3429,54 +3532,44 @@ public void updateSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void updateSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void getDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); + String name = + "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; + client.getDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } - - @Test - public void listSKAdNetworkConversionValueSchemasTest() throws Exception { - SKAdNetworkConversionValueSchema responsesElement = - SKAdNetworkConversionValueSchema.newBuilder().build(); - ListSKAdNetworkConversionValueSchemasResponse expectedResponse = - ListSKAdNetworkConversionValueSchemasResponse.newBuilder() + + @Test + public void listDisplayVideo360AdvertiserLinksTest() throws Exception { + DisplayVideo360AdvertiserLink responsesElement = + DisplayVideo360AdvertiserLink.newBuilder().build(); + ListDisplayVideo360AdvertiserLinksResponse expectedResponse = + ListDisplayVideo360AdvertiserLinksResponse.newBuilder() .setNextPageToken("") - .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) + .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); - ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = - client.listSKAdNetworkConversionValueSchemas(parent); + ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinks(parent); - List resources = + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals( - expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); + expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3494,15 +3587,15 @@ public void listSKAdNetworkConversionValueSchemasTest() throws Exception { } @Test - public void listSKAdNetworkConversionValueSchemasExceptionTest() throws Exception { + public void listDisplayVideo360AdvertiserLinksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.listSKAdNetworkConversionValueSchemas(parent); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listDisplayVideo360AdvertiserLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3510,27 +3603,27 @@ public void listSKAdNetworkConversionValueSchemasExceptionTest() throws Exceptio } @Test - public void listSKAdNetworkConversionValueSchemasTest2() throws Exception { - SKAdNetworkConversionValueSchema responsesElement = - SKAdNetworkConversionValueSchema.newBuilder().build(); - ListSKAdNetworkConversionValueSchemasResponse expectedResponse = - ListSKAdNetworkConversionValueSchemasResponse.newBuilder() + public void listDisplayVideo360AdvertiserLinksTest2() throws Exception { + DisplayVideo360AdvertiserLink responsesElement = + DisplayVideo360AdvertiserLink.newBuilder().build(); + ListDisplayVideo360AdvertiserLinksResponse expectedResponse = + ListDisplayVideo360AdvertiserLinksResponse.newBuilder() .setNextPageToken("") - .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) + .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + String parent = "properties/propertie-2024"; - ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = - client.listSKAdNetworkConversionValueSchemas(parent); + ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinks(parent); - List resources = + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals( - expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); + expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3548,15 +3641,15 @@ public void listSKAdNetworkConversionValueSchemasTest2() throws Exception { } @Test - public void listSKAdNetworkConversionValueSchemasExceptionTest2() throws Exception { + public void listDisplayVideo360AdvertiserLinksExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - client.listSKAdNetworkConversionValueSchemas(parent); + String parent = "properties/propertie-2024"; + client.listDisplayVideo360AdvertiserLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3564,35 +3657,28 @@ public void listSKAdNetworkConversionValueSchemasExceptionTest2() throws Excepti } @Test - public void searchChangeHistoryEventsTest() throws Exception { - ChangeHistoryEvent responsesElement = ChangeHistoryEvent.newBuilder().build(); - SearchChangeHistoryEventsResponse expectedResponse = - SearchChangeHistoryEventsResponse.newBuilder() - .setNextPageToken("") - .addAllChangeHistoryEvents(Arrays.asList(responsesElement)) + public void createDisplayVideo360AdvertiserLinkTest() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - SearchChangeHistoryEventsRequest request = - SearchChangeHistoryEventsRequest.newBuilder() - .setAccount(AccountName.of("[ACCOUNT]").toString()) - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .addAllResourceType(new ArrayList()) - .addAllAction(new ArrayList()) - .addAllActorEmail(new ArrayList()) - .setEarliestChangeTime(Timestamp.newBuilder().build()) - .setLatestChangeTime(Timestamp.newBuilder().build()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - SearchChangeHistoryEventsPagedResponse pagedListResponse = - client.searchChangeHistoryEvents(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getChangeHistoryEventsList().get(0), resources.get(0)); + DisplayVideo360AdvertiserLink actualResponse = + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3610,26 +3696,17 @@ public void searchChangeHistoryEventsTest() throws Exception { } @Test - public void searchChangeHistoryEventsExceptionTest() throws Exception { + public void createDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SearchChangeHistoryEventsRequest request = - SearchChangeHistoryEventsRequest.newBuilder() - .setAccount(AccountName.of("[ACCOUNT]").toString()) - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .addAllResourceType(new ArrayList()) - .addAllAction(new ArrayList()) - .addAllActorEmail(new ArrayList()) - .setEarliestChangeTime(Timestamp.newBuilder().build()) - .setLatestChangeTime(Timestamp.newBuilder().build()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.searchChangeHistoryEvents(request); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3637,18 +3714,27 @@ public void searchChangeHistoryEventsExceptionTest() throws Exception { } @Test - public void getGoogleSignalsSettingsTest() throws Exception { - GoogleSignalsSettings expectedResponse = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) + public void createDisplayVideo360AdvertiserLinkTest2() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); + String parent = "properties/propertie-2024"; + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); - GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); + DisplayVideo360AdvertiserLink actualResponse = + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -3667,15 +3753,17 @@ public void getGoogleSignalsSettingsTest() throws Exception { } @Test - public void getGoogleSignalsSettingsExceptionTest() throws Exception { + public void createDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); - client.getGoogleSignalsSettings(name); + String parent = "properties/propertie-2024"; + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3683,19 +3771,14 @@ public void getGoogleSignalsSettingsExceptionTest() throws Exception { } @Test - public void getGoogleSignalsSettingsTest2() throws Exception { - GoogleSignalsSettings expectedResponse = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) - .build(); + public void deleteDisplayVideo360AdvertiserLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-7279/googleSignalsSettings"; + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteDisplayVideo360AdvertiserLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3713,15 +3796,16 @@ public void getGoogleSignalsSettingsTest2() throws Exception { } @Test - public void getGoogleSignalsSettingsExceptionTest2() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-7279/googleSignalsSettings"; - client.getGoogleSignalsSettings(name); + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + client.deleteDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3729,26 +3813,14 @@ public void getGoogleSignalsSettingsExceptionTest2() throws Exception { } @Test - public void updateGoogleSignalsSettingsTest() throws Exception { - GoogleSignalsSettings expectedResponse = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) - .build(); + public void deleteDisplayVideo360AdvertiserLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - GoogleSignalsSettings googleSignalsSettings = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = + "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; - GoogleSignalsSettings actualResponse = - client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteDisplayVideo360AdvertiserLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3766,21 +3838,16 @@ public void updateGoogleSignalsSettingsTest() throws Exception { } @Test - public void updateGoogleSignalsSettingsExceptionTest() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - GoogleSignalsSettings googleSignalsSettings = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); + String name = + "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; + client.deleteDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3788,21 +3855,37 @@ public void updateGoogleSignalsSettingsExceptionTest() throws Exception { } @Test - public void createConversionEventTest() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void updateDisplayVideo360AdvertiserLinkTest() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + DisplayVideo360AdvertiserLink actualResponse = + client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -3821,16 +3904,27 @@ public void createConversionEventTest() throws Exception { } @Test - public void createConversionEventExceptionTest() throws Exception { + public void updateDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - client.createConversionEvent(parent, conversionEvent); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3838,21 +3932,29 @@ public void createConversionEventExceptionTest() throws Exception { } @Test - public void createConversionEventTest2() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void getDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -3871,16 +3973,17 @@ public void createConversionEventTest2() throws Exception { } @Test - public void createConversionEventExceptionTest2() throws Exception { + public void getDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - client.createConversionEvent(parent, conversionEvent); + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3888,28 +3991,28 @@ public void createConversionEventExceptionTest2() throws Exception { } @Test - public void updateConversionEventTest() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void getDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - ConversionEvent conversionEvent = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = + "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; - ConversionEvent actualResponse = client.updateConversionEvent(conversionEvent, updateMask); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -3928,23 +4031,16 @@ public void updateConversionEventTest() throws Exception { } @Test - public void updateConversionEventExceptionTest() throws Exception { + public void getDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ConversionEvent conversionEvent = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateConversionEvent(conversionEvent, updateMask); + String name = + "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3952,21 +4048,27 @@ public void updateConversionEventExceptionTest() throws Exception { } @Test - public void getConversionEventTest() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void listDisplayVideo360AdvertiserLinkProposalsTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal responsesElement = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = + ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() + .setNextPageToken("") + .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); - ConversionEvent actualResponse = client.getConversionEvent(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinkProposals(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -3984,15 +4086,15 @@ public void getConversionEventTest() throws Exception { } @Test - public void getConversionEventExceptionTest() throws Exception { + public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - client.getConversionEvent(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listDisplayVideo360AdvertiserLinkProposals(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4000,21 +4102,27 @@ public void getConversionEventExceptionTest() throws Exception { } @Test - public void getConversionEventTest2() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void listDisplayVideo360AdvertiserLinkProposalsTest2() throws Exception { + DisplayVideo360AdvertiserLinkProposal responsesElement = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = + ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() + .setNextPageToken("") + .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + String parent = "properties/propertie-2024"; - ConversionEvent actualResponse = client.getConversionEvent(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinkProposals(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4032,15 +4140,15 @@ public void getConversionEventTest2() throws Exception { } @Test - public void getConversionEventExceptionTest2() throws Exception { + public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; - client.getConversionEvent(name); + String parent = "properties/propertie-2024"; + client.listDisplayVideo360AdvertiserLinkProposals(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4048,13 +4156,31 @@ public void getConversionEventExceptionTest2() throws Exception { } @Test - public void deleteConversionEventTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); mockService.addResponse(expectedResponse); - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - client.deleteConversionEvent(name); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4072,15 +4198,18 @@ public void deleteConversionEventTest() throws Exception { } @Test - public void deleteConversionEventExceptionTest() throws Exception { + public void createDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - client.deleteConversionEvent(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4088,13 +4217,31 @@ public void deleteConversionEventExceptionTest() throws Exception { } @Test - public void deleteConversionEventTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; + String parent = "properties/propertie-2024"; + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - client.deleteConversionEvent(name); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4112,15 +4259,18 @@ public void deleteConversionEventTest2() throws Exception { } @Test - public void deleteConversionEventExceptionTest2() throws Exception { + public void createDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-4144/conversionEvents/conversionEvent-4144"; - client.deleteConversionEvent(name); + String parent = "properties/propertie-2024"; + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4128,23 +4278,15 @@ public void deleteConversionEventExceptionTest2() throws Exception { } @Test - public void listConversionEventsTest() throws Exception { - ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); - ListConversionEventsResponse expectedResponse = - ListConversionEventsResponse.newBuilder() - .setNextPageToken("") - .addAllConversionEvents(Arrays.asList(responsesElement)) - .build(); + public void deleteDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); + client.deleteDisplayVideo360AdvertiserLinkProposal(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4162,15 +4304,17 @@ public void listConversionEventsTest() throws Exception { } @Test - public void listConversionEventsExceptionTest() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listConversionEvents(parent); + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + client.deleteDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4178,23 +4322,14 @@ public void listConversionEventsExceptionTest() throws Exception { } @Test - public void listConversionEventsTest2() throws Exception { - ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); - ListConversionEventsResponse expectedResponse = - ListConversionEventsResponse.newBuilder() - .setNextPageToken("") - .addAllConversionEvents(Arrays.asList(responsesElement)) - .build(); + public void deleteDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = + "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); + client.deleteDisplayVideo360AdvertiserLinkProposal(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4212,15 +4347,16 @@ public void listConversionEventsTest2() throws Exception { } @Test - public void listConversionEventsExceptionTest2() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listConversionEvents(parent); + String name = + "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; + client.deleteDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4228,25 +4364,23 @@ public void listConversionEventsExceptionTest2() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkTest() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void approveDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + ApproveDisplayVideo360AdvertiserLinkProposalResponse expectedResponse = + ApproveDisplayVideo360AdvertiserLinkProposalResponse.newBuilder() + .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + ApproveDisplayVideo360AdvertiserLinkProposalRequest request = + ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); - DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); + ApproveDisplayVideo360AdvertiserLinkProposalResponse actualResponse = + client.approveDisplayVideo360AdvertiserLinkProposal(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -4265,16 +4399,21 @@ public void getDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void approveDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - client.getDisplayVideo360AdvertiserLink(name); + ApproveDisplayVideo360AdvertiserLinkProposalRequest request = + ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); + client.approveDisplayVideo360AdvertiserLinkProposal(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4282,25 +4421,33 @@ public void getDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkTest2() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() + public void cancelDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") .toString()) .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; + CancelDisplayVideo360AdvertiserLinkProposalRequest request = + CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); - DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.cancelDisplayVideo360AdvertiserLinkProposal(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -4319,16 +4466,21 @@ public void getDisplayVideo360AdvertiserLinkTest2() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { + public void cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; - client.getDisplayVideo360AdvertiserLink(name); + CancelDisplayVideo360AdvertiserLinkProposalRequest request = + CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); + client.cancelDisplayVideo360AdvertiserLinkProposal(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4336,27 +4488,22 @@ public void getDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksTest() throws Exception { - DisplayVideo360AdvertiserLink responsesElement = - DisplayVideo360AdvertiserLink.newBuilder().build(); - ListDisplayVideo360AdvertiserLinksResponse expectedResponse = - ListDisplayVideo360AdvertiserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) + public void createCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomDimension customDimension = CustomDimension.newBuilder().build(); - ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinks(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4374,7 +4521,7 @@ public void listDisplayVideo360AdvertiserLinksTest() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksExceptionTest() throws Exception { + public void createCustomDimensionExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -4382,7 +4529,8 @@ public void listDisplayVideo360AdvertiserLinksExceptionTest() throws Exception { try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listDisplayVideo360AdvertiserLinks(parent); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4390,27 +4538,22 @@ public void listDisplayVideo360AdvertiserLinksExceptionTest() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksTest2() throws Exception { - DisplayVideo360AdvertiserLink responsesElement = - DisplayVideo360AdvertiserLink.newBuilder().build(); - ListDisplayVideo360AdvertiserLinksResponse expectedResponse = - ListDisplayVideo360AdvertiserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) + public void createCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockService.addResponse(expectedResponse); String parent = "properties/propertie-2024"; + CustomDimension customDimension = CustomDimension.newBuilder().build(); - ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinks(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4428,7 +4571,7 @@ public void listDisplayVideo360AdvertiserLinksTest2() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksExceptionTest2() throws Exception { + public void createCustomDimensionExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -4436,7 +4579,8 @@ public void listDisplayVideo360AdvertiserLinksExceptionTest2() throws Exception try { String parent = "properties/propertie-2024"; - client.listDisplayVideo360AdvertiserLinks(parent); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4444,27 +4588,28 @@ public void listDisplayVideo360AdvertiserLinksExceptionTest2() throws Exception } @Test - public void createDisplayVideo360AdvertiserLinkTest() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void updateCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); + CustomDimension customDimension = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - DisplayVideo360AdvertiserLink actualResponse = - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + CustomDimension actualResponse = client.updateCustomDimension(customDimension, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -4483,17 +4628,23 @@ public void createDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void createDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void updateCustomDimensionExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + CustomDimension customDimension = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomDimension(customDimension, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4501,28 +4652,23 @@ public void createDisplayVideo360AdvertiserLinkExceptionTest() throws Exception } @Test - public void createDisplayVideo360AdvertiserLinkTest2() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void listCustomDimensionsTest() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLink actualResponse = - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); - Assert.assertEquals(expectedResponse, actualResponse); + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4540,17 +4686,15 @@ public void createDisplayVideo360AdvertiserLinkTest2() throws Exception { } @Test - public void createDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { + public void listCustomDimensionsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listCustomDimensions(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4558,14 +4702,23 @@ public void createDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception } @Test - public void deleteDisplayVideo360AdvertiserLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listCustomDimensionsTest2() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + String parent = "properties/propertie-2024"; - client.deleteDisplayVideo360AdvertiserLink(name); + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4583,16 +4736,15 @@ public void deleteDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void deleteDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void listCustomDimensionsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - client.deleteDisplayVideo360AdvertiserLink(name); + String parent = "properties/propertie-2024"; + client.listCustomDimensions(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4600,14 +4752,13 @@ public void deleteDisplayVideo360AdvertiserLinkExceptionTest() throws Exception } @Test - public void deleteDisplayVideo360AdvertiserLinkTest2() throws Exception { + public void archiveCustomDimensionTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - client.deleteDisplayVideo360AdvertiserLink(name); + client.archiveCustomDimension(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4625,16 +4776,15 @@ public void deleteDisplayVideo360AdvertiserLinkTest2() throws Exception { } @Test - public void deleteDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { + public void archiveCustomDimensionExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-7275/displayVideo360AdvertiserLinks/displayVideo360AdvertiserLink-7275"; - client.deleteDisplayVideo360AdvertiserLink(name); + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.archiveCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4642,38 +4792,13 @@ public void deleteDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception } @Test - public void updateDisplayVideo360AdvertiserLinkTest() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .build(); + public void archiveCustomDimensionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = "properties/propertie-447/customDimensions/customDimension-447"; - DisplayVideo360AdvertiserLink actualResponse = - client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + client.archiveCustomDimension(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4691,27 +4816,15 @@ public void updateDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void updateDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void archiveCustomDimensionExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); + String name = "properties/propertie-447/customDimensions/customDimension-447"; + client.archiveCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4719,29 +4832,20 @@ public void updateDisplayVideo360AdvertiserLinkExceptionTest() throws Exception } @Test - public void getDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void getCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.getDisplayVideo360AdvertiserLinkProposal(name); + CustomDimension actualResponse = client.getCustomDimension(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -4760,17 +4864,15 @@ public void getDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void getCustomDimensionExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - client.getDisplayVideo360AdvertiserLinkProposal(name); + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.getCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4778,28 +4880,20 @@ public void getDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Excep } @Test - public void getDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void getCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; + String name = "properties/propertie-447/customDimensions/customDimension-447"; - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.getDisplayVideo360AdvertiserLinkProposal(name); + CustomDimension actualResponse = client.getCustomDimension(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -4818,16 +4912,15 @@ public void getDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { + public void getCustomDimensionExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; - client.getDisplayVideo360AdvertiserLinkProposal(name); + String name = "properties/propertie-447/customDimensions/customDimension-447"; + client.getCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4835,27 +4928,22 @@ public void getDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exce } @Test - public void listDisplayVideo360AdvertiserLinkProposalsTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal responsesElement = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = - ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) + public void createCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomMetric customMetric = CustomMetric.newBuilder().build(); - ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinkProposals(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4873,7 +4961,7 @@ public void listDisplayVideo360AdvertiserLinkProposalsTest() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest() throws Exception { + public void createCustomMetricExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -4881,7 +4969,8 @@ public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest() throws Exc try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listDisplayVideo360AdvertiserLinkProposals(parent); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4889,27 +4978,22 @@ public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest() throws Exc } @Test - public void listDisplayVideo360AdvertiserLinkProposalsTest2() throws Exception { - DisplayVideo360AdvertiserLinkProposal responsesElement = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = - ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) + public void createCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockService.addResponse(expectedResponse); String parent = "properties/propertie-2024"; + CustomMetric customMetric = CustomMetric.newBuilder().build(); - ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinkProposals(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -4927,7 +5011,7 @@ public void listDisplayVideo360AdvertiserLinkProposalsTest2() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest2() throws Exception { + public void createCustomMetricExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -4935,7 +5019,8 @@ public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest2() throws Ex try { String parent = "properties/propertie-2024"; - client.listDisplayVideo360AdvertiserLinkProposals(parent); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4943,30 +5028,28 @@ public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest2() throws Ex } @Test - public void createDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void updateCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + CustomMetric customMetric = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); + CustomMetric actualResponse = client.updateCustomMetric(customMetric, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -4985,18 +5068,23 @@ public void createDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void createDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void updateCustomMetricExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); + CustomMetric customMetric = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomMetric(customMetric, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5004,31 +5092,23 @@ public void createDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Ex } @Test - public void createDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void listCustomMetricsTest() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); - Assert.assertEquals(expectedResponse, actualResponse); + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5046,18 +5126,15 @@ public void createDisplayVideo360AdvertiserLinkProposalTest2() throws Exception } @Test - public void createDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { + public void listCustomMetricsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listCustomMetrics(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5065,15 +5142,23 @@ public void createDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws E } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listCustomMetricsTest2() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + String parent = "properties/propertie-2024"; - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5091,17 +5176,15 @@ public void deleteDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void listCustomMetricsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + String parent = "properties/propertie-2024"; + client.listCustomMetrics(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5109,14 +5192,13 @@ public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Ex } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + public void archiveCustomMetricTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + client.archiveCustomMetric(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5134,16 +5216,15 @@ public void deleteDisplayVideo360AdvertiserLinkProposalTest2() throws Exception } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { + public void archiveCustomMetricExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-8473/displayVideo360AdvertiserLinkProposals/displayVideo360AdvertiserLinkProposal-8473"; - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.archiveCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5151,24 +5232,13 @@ public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws E } @Test - public void approveDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - ApproveDisplayVideo360AdvertiserLinkProposalResponse expectedResponse = - ApproveDisplayVideo360AdvertiserLinkProposalResponse.newBuilder() - .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) - .build(); + public void archiveCustomMetricTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - ApproveDisplayVideo360AdvertiserLinkProposalRequest request = - ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; - ApproveDisplayVideo360AdvertiserLinkProposalResponse actualResponse = - client.approveDisplayVideo360AdvertiserLinkProposal(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.archiveCustomMetric(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5186,21 +5256,15 @@ public void approveDisplayVideo360AdvertiserLinkProposalTest() throws Exception } @Test - public void approveDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void archiveCustomMetricExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ApproveDisplayVideo360AdvertiserLinkProposalRequest request = - ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); - client.approveDisplayVideo360AdvertiserLinkProposal(request); + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + client.archiveCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5208,33 +5272,20 @@ public void approveDisplayVideo360AdvertiserLinkProposalExceptionTest() throws E } @Test - public void cancelDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void getCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - CancelDisplayVideo360AdvertiserLinkProposalRequest request = - CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.cancelDisplayVideo360AdvertiserLinkProposal(request); + CustomMetric actualResponse = client.getCustomMetric(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -5253,21 +5304,15 @@ public void cancelDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void getCustomMetricExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CancelDisplayVideo360AdvertiserLinkProposalRequest request = - CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); - client.cancelDisplayVideo360AdvertiserLinkProposal(request); + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.getCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5275,21 +5320,20 @@ public void cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Ex } @Test - public void createCustomDimensionTest() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + public void getCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) .setParameterName("parameterName-379607596") .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + .addAllRestrictedMetricType(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomDimension customDimension = CustomDimension.newBuilder().build(); + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; - CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + CustomMetric actualResponse = client.getCustomMetric(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -5308,16 +5352,15 @@ public void createCustomDimensionTest() throws Exception { } @Test - public void createCustomDimensionExceptionTest() throws Exception { + public void getCustomMetricExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomDimension customDimension = CustomDimension.newBuilder().build(); - client.createCustomDimension(parent, customDimension); + String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + client.getCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5325,21 +5368,17 @@ public void createCustomDimensionExceptionTest() throws Exception { } @Test - public void createCustomDimensionTest2() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + public void getDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - CustomDimension customDimension = CustomDimension.newBuilder().build(); + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); - CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -5358,45 +5397,33 @@ public void createCustomDimensionTest2() throws Exception { } @Test - public void createCustomDimensionExceptionTest2() throws Exception { + public void getDataRetentionSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - CustomDimension customDimension = CustomDimension.newBuilder().build(); - client.createCustomDimension(parent, customDimension); + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + client.getDataRetentionSettings(name); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateCustomDimensionTest() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataRetentionSettingsTest2() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) .build(); mockService.addResponse(expectedResponse); - CustomDimension customDimension = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = "properties/propertie-2463/dataRetentionSettings"; - CustomDimension actualResponse = client.updateCustomDimension(customDimension, updateMask); + DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -5415,23 +5442,15 @@ public void updateCustomDimensionTest() throws Exception { } @Test - public void updateCustomDimensionExceptionTest() throws Exception { + public void getDataRetentionSettingsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CustomDimension customDimension = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateCustomDimension(customDimension, updateMask); + String name = "properties/propertie-2463/dataRetentionSettings"; + client.getDataRetentionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5439,23 +5458,24 @@ public void updateCustomDimensionExceptionTest() throws Exception { } @Test - public void listCustomDimensionsTest() throws Exception { - CustomDimension responsesElement = CustomDimension.newBuilder().build(); - ListCustomDimensionsResponse expectedResponse = - ListCustomDimensionsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomDimensions(Arrays.asList(responsesElement)) + public void updateDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + DataRetentionSettings dataRetentionSettings = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); + DataRetentionSettings actualResponse = + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5473,15 +5493,20 @@ public void listCustomDimensionsTest() throws Exception { } @Test - public void listCustomDimensionsExceptionTest() throws Exception { + public void updateDataRetentionSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listCustomDimensions(parent); + DataRetentionSettings dataRetentionSettings = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5489,23 +5514,21 @@ public void listCustomDimensionsExceptionTest() throws Exception { } @Test - public void listCustomDimensionsTest2() throws Exception { - CustomDimension responsesElement = CustomDimension.newBuilder().build(); - ListCustomDimensionsResponse expectedResponse = - ListCustomDimensionsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomDimensions(Arrays.asList(responsesElement)) + public void createDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStream dataStream = DataStream.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); + DataStream actualResponse = client.createDataStream(parent, dataStream); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5523,15 +5546,16 @@ public void listCustomDimensionsTest2() throws Exception { } @Test - public void listCustomDimensionsExceptionTest2() throws Exception { + public void createDataStreamExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listCustomDimensions(parent); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5539,13 +5563,21 @@ public void listCustomDimensionsExceptionTest2() throws Exception { } @Test - public void archiveCustomDimensionTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); mockService.addResponse(expectedResponse); - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + String parent = "properties/propertie-2024"; + DataStream dataStream = DataStream.newBuilder().build(); - client.archiveCustomDimension(name); + DataStream actualResponse = client.createDataStream(parent, dataStream); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5563,15 +5595,16 @@ public void archiveCustomDimensionTest() throws Exception { } @Test - public void archiveCustomDimensionExceptionTest() throws Exception { + public void createDataStreamExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - client.archiveCustomDimension(name); + String parent = "properties/propertie-2024"; + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5579,13 +5612,13 @@ public void archiveCustomDimensionExceptionTest() throws Exception { } @Test - public void archiveCustomDimensionTest2() throws Exception { + public void deleteDataStreamTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-447/customDimensions/customDimension-447"; + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.archiveCustomDimension(name); + client.deleteDataStream(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5603,15 +5636,15 @@ public void archiveCustomDimensionTest2() throws Exception { } @Test - public void archiveCustomDimensionExceptionTest2() throws Exception { + public void deleteDataStreamExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-447/customDimensions/customDimension-447"; - client.archiveCustomDimension(name); + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.deleteDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5619,21 +5652,13 @@ public void archiveCustomDimensionExceptionTest2() throws Exception { } @Test - public void getCustomDimensionTest() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) - .build(); + public void deleteDataStreamTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; - CustomDimension actualResponse = client.getCustomDimension(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteDataStream(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5651,15 +5676,15 @@ public void getCustomDimensionTest() throws Exception { } @Test - public void getCustomDimensionExceptionTest() throws Exception { + public void deleteDataStreamExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - client.getCustomDimension(name); + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + client.deleteDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5667,20 +5692,26 @@ public void getCustomDimensionExceptionTest() throws Exception { } @Test - public void getCustomDimensionTest2() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") + public void updateDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-447/customDimensions/customDimension-447"; + DataStream dataStream = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - CustomDimension actualResponse = client.getCustomDimension(name); + DataStream actualResponse = client.updateDataStream(dataStream, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -5699,15 +5730,22 @@ public void getCustomDimensionTest2() throws Exception { } @Test - public void getCustomDimensionExceptionTest2() throws Exception { + public void updateDataStreamExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-447/customDimensions/customDimension-447"; - client.getCustomDimension(name); + DataStream dataStream = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataStream(dataStream, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5715,22 +5753,23 @@ public void getCustomDimensionExceptionTest2() throws Exception { } @Test - public void createCustomMetricTest() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + public void listDataStreamsTest() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomMetric customMetric = CustomMetric.newBuilder().build(); - CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); - Assert.assertEquals(expectedResponse, actualResponse); + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5748,7 +5787,7 @@ public void createCustomMetricTest() throws Exception { } @Test - public void createCustomMetricExceptionTest() throws Exception { + public void listDataStreamsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -5756,8 +5795,7 @@ public void createCustomMetricExceptionTest() throws Exception { try { PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomMetric customMetric = CustomMetric.newBuilder().build(); - client.createCustomMetric(parent, customMetric); + client.listDataStreams(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5765,22 +5803,23 @@ public void createCustomMetricExceptionTest() throws Exception { } @Test - public void createCustomMetricTest2() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + public void listDataStreamsTest2() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); String parent = "properties/propertie-2024"; - CustomMetric customMetric = CustomMetric.newBuilder().build(); - CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); - Assert.assertEquals(expectedResponse, actualResponse); + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5798,16 +5837,15 @@ public void createCustomMetricTest2() throws Exception { } @Test - public void createCustomMetricExceptionTest2() throws Exception { + public void listDataStreamsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - CustomMetric customMetric = CustomMetric.newBuilder().build(); - client.createCustomMetric(parent, customMetric); + String parent = "properties/propertie-2024"; + client.listDataStreams(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5815,28 +5853,19 @@ public void createCustomMetricExceptionTest2() throws Exception { } @Test - public void updateCustomMetricTest() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") + public void getDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - CustomMetric customMetric = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - CustomMetric actualResponse = client.updateCustomMetric(customMetric, updateMask); + DataStream actualResponse = client.getDataStream(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -5855,23 +5884,15 @@ public void updateCustomMetricTest() throws Exception { } @Test - public void updateCustomMetricExceptionTest() throws Exception { + public void getDataStreamExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CustomMetric customMetric = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateCustomMetric(customMetric, updateMask); + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5879,23 +5900,20 @@ public void updateCustomMetricExceptionTest() throws Exception { } @Test - public void listCustomMetricsTest() throws Exception { - CustomMetric responsesElement = CustomMetric.newBuilder().build(); - ListCustomMetricsResponse expectedResponse = - ListCustomMetricsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomMetrics(Arrays.asList(responsesElement)) + public void getDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); + DataStream actualResponse = client.getDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5913,15 +5931,15 @@ public void listCustomMetricsTest() throws Exception { } @Test - public void listCustomMetricsExceptionTest() throws Exception { + public void getDataStreamExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listCustomMetrics(parent); + String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + client.getDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5929,23 +5947,23 @@ public void listCustomMetricsExceptionTest() throws Exception { } @Test - public void listCustomMetricsTest2() throws Exception { - CustomMetric responsesElement = CustomMetric.newBuilder().build(); - ListCustomMetricsResponse expectedResponse = - ListCustomMetricsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomMetrics(Arrays.asList(responsesElement)) + public void getAudienceTest() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); + Audience actualResponse = client.getAudience(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -5963,15 +5981,15 @@ public void listCustomMetricsTest2() throws Exception { } @Test - public void listCustomMetricsExceptionTest2() throws Exception { + public void getAudienceExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listCustomMetrics(parent); + AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); + client.getAudience(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5979,13 +5997,23 @@ public void listCustomMetricsExceptionTest2() throws Exception { } @Test - public void archiveCustomMetricTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getAudienceTest2() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) + .build(); mockService.addResponse(expectedResponse); - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + String name = "properties/propertie-2172/audiences/audience-2172"; - client.archiveCustomMetric(name); + Audience actualResponse = client.getAudience(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6003,15 +6031,15 @@ public void archiveCustomMetricTest() throws Exception { } @Test - public void archiveCustomMetricExceptionTest() throws Exception { + public void getAudienceExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - client.archiveCustomMetric(name); + String name = "properties/propertie-2172/audiences/audience-2172"; + client.getAudience(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6019,13 +6047,23 @@ public void archiveCustomMetricExceptionTest() throws Exception { } @Test - public void archiveCustomMetricTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listAudiencesTest() throws Exception { + Audience responsesElement = Audience.newBuilder().build(); + ListAudiencesResponse expectedResponse = + ListAudiencesResponse.newBuilder() + .setNextPageToken("") + .addAllAudiences(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + PropertyName parent = PropertyName.of("[PROPERTY]"); - client.archiveCustomMetric(name); + ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6043,15 +6081,15 @@ public void archiveCustomMetricTest2() throws Exception { } @Test - public void archiveCustomMetricExceptionTest2() throws Exception { + public void listAudiencesExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-2999/customMetrics/customMetric-2999"; - client.archiveCustomMetric(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listAudiences(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6059,21 +6097,23 @@ public void archiveCustomMetricExceptionTest2() throws Exception { } @Test - public void getCustomMetricTest() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + public void listAudiencesTest2() throws Exception { + Audience responsesElement = Audience.newBuilder().build(); + ListAudiencesResponse expectedResponse = + ListAudiencesResponse.newBuilder() + .setNextPageToken("") + .addAllAudiences(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + String parent = "properties/propertie-2024"; - CustomMetric actualResponse = client.getCustomMetric(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6091,15 +6131,15 @@ public void getCustomMetricTest() throws Exception { } @Test - public void getCustomMetricExceptionTest() throws Exception { + public void listAudiencesExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - client.getCustomMetric(name); + String parent = "properties/propertie-2024"; + client.listAudiences(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6107,20 +6147,23 @@ public void getCustomMetricExceptionTest() throws Exception { } @Test - public void getCustomMetricTest2() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") + public void createAudienceTest() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-2999/customMetrics/customMetric-2999"; + PropertyName parent = PropertyName.of("[PROPERTY]"); + Audience audience = Audience.newBuilder().build(); - CustomMetric actualResponse = client.getCustomMetric(name); + Audience actualResponse = client.createAudience(parent, audience); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6139,15 +6182,16 @@ public void getCustomMetricTest2() throws Exception { } @Test - public void getCustomMetricExceptionTest2() throws Exception { + public void createAudienceExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-2999/customMetrics/customMetric-2999"; - client.getCustomMetric(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + Audience audience = Audience.newBuilder().build(); + client.createAudience(parent, audience); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6155,17 +6199,23 @@ public void getCustomMetricExceptionTest2() throws Exception { } @Test - public void getDataRetentionSettingsTest() throws Exception { - DataRetentionSettings expectedResponse = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) + public void createAudienceTest2() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + String parent = "properties/propertie-2024"; + Audience audience = Audience.newBuilder().build(); - DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); + Audience actualResponse = client.createAudience(parent, audience); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6184,15 +6234,16 @@ public void getDataRetentionSettingsTest() throws Exception { } @Test - public void getDataRetentionSettingsExceptionTest() throws Exception { + public void createAudienceExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); - client.getDataRetentionSettings(name); + String parent = "properties/propertie-2024"; + Audience audience = Audience.newBuilder().build(); + client.createAudience(parent, audience); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6200,17 +6251,32 @@ public void getDataRetentionSettingsExceptionTest() throws Exception { } @Test - public void getDataRetentionSettingsTest2() throws Exception { - DataRetentionSettings expectedResponse = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) + public void updateAudienceTest() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Audience audience = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); - mockService.addResponse(expectedResponse); - - String name = "properties/propertie-2463/dataRetentionSettings"; + FieldMask updateMask = FieldMask.newBuilder().build(); - DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); + Audience actualResponse = client.updateAudience(audience, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6229,15 +6295,25 @@ public void getDataRetentionSettingsTest2() throws Exception { } @Test - public void getDataRetentionSettingsExceptionTest2() throws Exception { + public void updateAudienceExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-2463/dataRetentionSettings"; - client.getDataRetentionSettings(name); + Audience audience = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAudience(audience, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6245,24 +6321,16 @@ public void getDataRetentionSettingsExceptionTest2() throws Exception { } @Test - public void updateDataRetentionSettingsTest() throws Exception { - DataRetentionSettings expectedResponse = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) - .build(); + public void archiveAudienceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - DataRetentionSettings dataRetentionSettings = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) + ArchiveAudienceRequest request = + ArchiveAudienceRequest.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - DataRetentionSettings actualResponse = - client.updateDataRetentionSettings(dataRetentionSettings, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + client.archiveAudience(request); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6280,20 +6348,18 @@ public void updateDataRetentionSettingsTest() throws Exception { } @Test - public void updateDataRetentionSettingsExceptionTest() throws Exception { + public void archiveAudienceExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataRetentionSettings dataRetentionSettings = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) + ArchiveAudienceRequest request = + ArchiveAudienceRequest.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDataRetentionSettings(dataRetentionSettings, updateMask); + client.archiveAudience(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6301,20 +6367,22 @@ public void updateDataRetentionSettingsExceptionTest() throws Exception { } @Test - public void createDataStreamTest() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void getSearchAds360LinkTest() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - DataStream dataStream = DataStream.newBuilder().build(); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - DataStream actualResponse = client.createDataStream(parent, dataStream); + SearchAds360Link actualResponse = client.getSearchAds360Link(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6333,16 +6401,15 @@ public void createDataStreamTest() throws Exception { } @Test - public void createDataStreamExceptionTest() throws Exception { + public void getSearchAds360LinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - DataStream dataStream = DataStream.newBuilder().build(); - client.createDataStream(parent, dataStream); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + client.getSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6350,20 +6417,22 @@ public void createDataStreamExceptionTest() throws Exception { } @Test - public void createDataStreamTest2() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void getSearchAds360LinkTest2() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - DataStream dataStream = DataStream.newBuilder().build(); + String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; - DataStream actualResponse = client.createDataStream(parent, dataStream); + SearchAds360Link actualResponse = client.getSearchAds360Link(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6382,16 +6451,15 @@ public void createDataStreamTest2() throws Exception { } @Test - public void createDataStreamExceptionTest2() throws Exception { + public void getSearchAds360LinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - DataStream dataStream = DataStream.newBuilder().build(); - client.createDataStream(parent, dataStream); + String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; + client.getSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6399,13 +6467,23 @@ public void createDataStreamExceptionTest2() throws Exception { } @Test - public void deleteDataStreamTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listSearchAds360LinksTest() throws Exception { + SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); + ListSearchAds360LinksResponse expectedResponse = + ListSearchAds360LinksResponse.newBuilder() + .setNextPageToken("") + .addAllSearchAds360Links(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); - client.deleteDataStream(name); + ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6423,15 +6501,15 @@ public void deleteDataStreamTest() throws Exception { } @Test - public void deleteDataStreamExceptionTest() throws Exception { + public void listSearchAds360LinksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.deleteDataStream(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listSearchAds360Links(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6439,13 +6517,23 @@ public void deleteDataStreamExceptionTest() throws Exception { } @Test - public void deleteDataStreamTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listSearchAds360LinksTest2() throws Exception { + SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); + ListSearchAds360LinksResponse expectedResponse = + ListSearchAds360LinksResponse.newBuilder() + .setNextPageToken("") + .addAllSearchAds360Links(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + String parent = "properties/propertie-2024"; - client.deleteDataStream(name); + ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6463,15 +6551,15 @@ public void deleteDataStreamTest2() throws Exception { } @Test - public void deleteDataStreamExceptionTest2() throws Exception { + public void listSearchAds360LinksExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-9806/dataStreams/dataStream-9806"; - client.deleteDataStream(name); + String parent = "properties/propertie-2024"; + client.listSearchAds360Links(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6479,26 +6567,23 @@ public void deleteDataStreamExceptionTest2() throws Exception { } @Test - public void updateDataStreamTest() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void createSearchAds360LinkTest() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - DataStream dataStream = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - DataStream actualResponse = client.updateDataStream(dataStream, updateMask); + SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6517,22 +6602,16 @@ public void updateDataStreamTest() throws Exception { } @Test - public void updateDataStreamExceptionTest() throws Exception { + public void createSearchAds360LinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStream dataStream = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDataStream(dataStream, updateMask); + PropertyName parent = PropertyName.of("[PROPERTY]"); + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + client.createSearchAds360Link(parent, searchAds360Link); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6540,23 +6619,24 @@ public void updateDataStreamExceptionTest() throws Exception { } @Test - public void listDataStreamsTest() throws Exception { - DataStream responsesElement = DataStream.newBuilder().build(); - ListDataStreamsResponse expectedResponse = - ListDataStreamsResponse.newBuilder() - .setNextPageToken("") - .addAllDataStreams(Arrays.asList(responsesElement)) + public void createSearchAds360LinkTest2() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String parent = "properties/propertie-2024"; + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); + SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6574,39 +6654,30 @@ public void listDataStreamsTest() throws Exception { } @Test - public void listDataStreamsExceptionTest() throws Exception { + public void createSearchAds360LinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listDataStreams(parent); + String parent = "properties/propertie-2024"; + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + client.createSearchAds360Link(parent, searchAds360Link); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDataStreamsTest2() throws Exception { - DataStream responsesElement = DataStream.newBuilder().build(); - ListDataStreamsResponse expectedResponse = - ListDataStreamsResponse.newBuilder() - .setNextPageToken("") - .addAllDataStreams(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "properties/propertie-2024"; + // Expected exception. + } + } - ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + @Test + public void deleteSearchAds360LinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); + client.deleteSearchAds360Link(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6624,15 +6695,15 @@ public void listDataStreamsTest2() throws Exception { } @Test - public void listDataStreamsExceptionTest2() throws Exception { + public void deleteSearchAds360LinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listDataStreams(parent); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + client.deleteSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6640,20 +6711,13 @@ public void listDataStreamsExceptionTest2() throws Exception { } @Test - public void getDataStreamTest() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); + public void deleteSearchAds360LinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; - DataStream actualResponse = client.getDataStream(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSearchAds360Link(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6671,15 +6735,15 @@ public void getDataStreamTest() throws Exception { } @Test - public void getDataStreamExceptionTest() throws Exception { + public void deleteSearchAds360LinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.getDataStream(name); + String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; + client.deleteSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6687,19 +6751,32 @@ public void getDataStreamExceptionTest() throws Exception { } @Test - public void getDataStreamTest2() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void updateSearchAds360LinkTest() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-9806/dataStreams/dataStream-9806"; + SearchAds360Link searchAds360Link = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - DataStream actualResponse = client.getDataStream(name); + SearchAds360Link actualResponse = client.updateSearchAds360Link(searchAds360Link, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6718,15 +6795,25 @@ public void getDataStreamTest2() throws Exception { } @Test - public void getDataStreamExceptionTest2() throws Exception { + public void updateSearchAds360LinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-9806/dataStreams/dataStream-9806"; - client.getDataStream(name); + SearchAds360Link searchAds360Link = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSearchAds360Link(searchAds360Link, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6734,22 +6821,16 @@ public void getDataStreamExceptionTest2() throws Exception { } @Test - public void getAudienceTest() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void getAttributionSettingsTest() throws Exception { + AttributionSettings expectedResponse = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) .build(); mockService.addResponse(expectedResponse); - AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); + AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); - Audience actualResponse = client.getAudience(name); + AttributionSettings actualResponse = client.getAttributionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6768,15 +6849,15 @@ public void getAudienceTest() throws Exception { } @Test - public void getAudienceExceptionTest() throws Exception { + public void getAttributionSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); - client.getAudience(name); + AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); + client.getAttributionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6784,22 +6865,16 @@ public void getAudienceExceptionTest() throws Exception { } @Test - public void getAudienceTest2() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void getAttributionSettingsTest2() throws Exception { + AttributionSettings expectedResponse = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-2172/audiences/audience-2172"; + String name = "properties/propertie-492/attributionSettings"; - Audience actualResponse = client.getAudience(name); + AttributionSettings actualResponse = client.getAttributionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6818,15 +6893,15 @@ public void getAudienceTest2() throws Exception { } @Test - public void getAudienceExceptionTest2() throws Exception { + public void getAttributionSettingsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-2172/audiences/audience-2172"; - client.getAudience(name); + String name = "properties/propertie-492/attributionSettings"; + client.getAttributionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6834,23 +6909,22 @@ public void getAudienceExceptionTest2() throws Exception { } @Test - public void listAudiencesTest() throws Exception { - Audience responsesElement = Audience.newBuilder().build(); - ListAudiencesResponse expectedResponse = - ListAudiencesResponse.newBuilder() - .setNextPageToken("") - .addAllAudiences(Arrays.asList(responsesElement)) + public void updateAttributionSettingsTest() throws Exception { + AttributionSettings expectedResponse = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + AttributionSettings attributionSettings = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); + AttributionSettings actualResponse = + client.updateAttributionSettings(attributionSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6868,15 +6942,19 @@ public void listAudiencesTest() throws Exception { } @Test - public void listAudiencesExceptionTest() throws Exception { + public void updateAttributionSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listAudiences(parent); + AttributionSettings attributionSettings = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAttributionSettings(attributionSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6884,23 +6962,36 @@ public void listAudiencesExceptionTest() throws Exception { } @Test - public void listAudiencesTest2() throws Exception { - Audience responsesElement = Audience.newBuilder().build(); - ListAudiencesResponse expectedResponse = - ListAudiencesResponse.newBuilder() - .setNextPageToken("") - .addAllAudiences(Arrays.asList(responsesElement)) + public void runAccessReportTest() throws Exception { + RunAccessReportResponse expectedResponse = + RunAccessReportResponse.newBuilder() + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .setRowCount(1340416618) + .setQuota(AccessQuota.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + RunAccessReportRequest request = + RunAccessReportRequest.newBuilder() + .setEntity("properties/propertie-4993") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(AccessFilterExpression.newBuilder().build()) + .setMetricFilter(AccessFilterExpression.newBuilder().build()) + .setOffset(-1019779949) + .setLimit(102976443) + .setTimeZone("timeZone-2077180903") + .addAllOrderBys(new ArrayList()) + .setReturnEntityQuota(true) + .setIncludeAllUsers(true) + .setExpandGroups(true) + .build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); + RunAccessReportResponse actualResponse = client.runAccessReport(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -6918,15 +7009,30 @@ public void listAudiencesTest2() throws Exception { } @Test - public void listAudiencesExceptionTest2() throws Exception { + public void runAccessReportExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listAudiences(parent); + RunAccessReportRequest request = + RunAccessReportRequest.newBuilder() + .setEntity("properties/propertie-4993") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(AccessFilterExpression.newBuilder().build()) + .setMetricFilter(AccessFilterExpression.newBuilder().build()) + .setOffset(-1019779949) + .setLimit(102976443) + .setTimeZone("timeZone-2077180903") + .addAllOrderBys(new ArrayList()) + .setReturnEntityQuota(true) + .setIncludeAllUsers(true) + .setExpandGroups(true) + .build(); + client.runAccessReport(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6934,23 +7040,20 @@ public void listAudiencesExceptionTest2() throws Exception { } @Test - public void createAudienceTest() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void createAccessBindingTest() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - Audience audience = Audience.newBuilder().build(); + AccountName parent = AccountName.of("[ACCOUNT]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); - Audience actualResponse = client.createAudience(parent, audience); + AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -6969,16 +7072,16 @@ public void createAudienceTest() throws Exception { } @Test - public void createAudienceExceptionTest() throws Exception { + public void createAccessBindingExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); - - try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - Audience audience = Audience.newBuilder().build(); - client.createAudience(parent, audience); + + try { + AccountName parent = AccountName.of("[ACCOUNT]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); + client.createAccessBinding(parent, accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6986,23 +7089,20 @@ public void createAudienceExceptionTest() throws Exception { } @Test - public void createAudienceTest2() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void createAccessBindingTest2() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - Audience audience = Audience.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); - Audience actualResponse = client.createAudience(parent, audience); + AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7021,16 +7121,16 @@ public void createAudienceTest2() throws Exception { } @Test - public void createAudienceExceptionTest2() throws Exception { + public void createAccessBindingExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - Audience audience = Audience.newBuilder().build(); - client.createAudience(parent, audience); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); + client.createAccessBinding(parent, accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7038,32 +7138,20 @@ public void createAudienceExceptionTest2() throws Exception { } @Test - public void updateAudienceTest() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void createAccessBindingTest3() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - Audience audience = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String parent = "accounts/account-4811"; + AccessBinding accessBinding = AccessBinding.newBuilder().build(); - Audience actualResponse = client.updateAudience(audience, updateMask); + AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7082,25 +7170,16 @@ public void updateAudienceTest() throws Exception { } @Test - public void updateAudienceExceptionTest() throws Exception { + public void createAccessBindingExceptionTest3() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - Audience audience = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateAudience(audience, updateMask); + String parent = "accounts/account-4811"; + AccessBinding accessBinding = AccessBinding.newBuilder().build(); + client.createAccessBinding(parent, accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7108,16 +7187,21 @@ public void updateAudienceExceptionTest() throws Exception { } @Test - public void archiveAudienceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getAccessBindingTest() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) + .build(); mockService.addResponse(expectedResponse); - ArchiveAudienceRequest request = - ArchiveAudienceRequest.newBuilder() - .setName(PropertyName.of("[PROPERTY]").toString()) - .build(); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - client.archiveAudience(request); + AccessBinding actualResponse = client.getAccessBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7135,18 +7219,16 @@ public void archiveAudienceTest() throws Exception { } @Test - public void archiveAudienceExceptionTest() throws Exception { + public void getAccessBindingExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ArchiveAudienceRequest request = - ArchiveAudienceRequest.newBuilder() - .setName(PropertyName.of("[PROPERTY]").toString()) - .build(); - client.archiveAudience(request); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + client.getAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7154,22 +7236,19 @@ public void archiveAudienceExceptionTest() throws Exception { } @Test - public void getSearchAds360LinkTest() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void getAccessBindingTest2() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + String name = "accounts/account-3488/accessBindings/accessBinding-3488"; - SearchAds360Link actualResponse = client.getSearchAds360Link(name); + AccessBinding actualResponse = client.getAccessBinding(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7188,15 +7267,15 @@ public void getSearchAds360LinkTest() throws Exception { } @Test - public void getSearchAds360LinkExceptionTest() throws Exception { + public void getAccessBindingExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - client.getSearchAds360Link(name); + String name = "accounts/account-3488/accessBindings/accessBinding-3488"; + client.getAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7204,22 +7283,25 @@ public void getSearchAds360LinkExceptionTest() throws Exception { } @Test - public void getSearchAds360LinkTest2() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void updateAccessBindingTest() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; + AccessBinding accessBinding = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) + .build(); - SearchAds360Link actualResponse = client.getSearchAds360Link(name); + AccessBinding actualResponse = client.updateAccessBinding(accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7238,15 +7320,21 @@ public void getSearchAds360LinkTest2() throws Exception { } @Test - public void getSearchAds360LinkExceptionTest2() throws Exception { + public void updateAccessBindingExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; - client.getSearchAds360Link(name); + AccessBinding accessBinding = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) + .build(); + client.updateAccessBinding(accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7254,23 +7342,14 @@ public void getSearchAds360LinkExceptionTest2() throws Exception { } @Test - public void listSearchAds360LinksTest() throws Exception { - SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); - ListSearchAds360LinksResponse expectedResponse = - ListSearchAds360LinksResponse.newBuilder() - .setNextPageToken("") - .addAllSearchAds360Links(Arrays.asList(responsesElement)) - .build(); + public void deleteAccessBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); + client.deleteAccessBinding(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7288,15 +7367,16 @@ public void listSearchAds360LinksTest() throws Exception { } @Test - public void listSearchAds360LinksExceptionTest() throws Exception { + public void deleteAccessBindingExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listSearchAds360Links(parent); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + client.deleteAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7304,23 +7384,13 @@ public void listSearchAds360LinksExceptionTest() throws Exception { } @Test - public void listSearchAds360LinksTest2() throws Exception { - SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); - ListSearchAds360LinksResponse expectedResponse = - ListSearchAds360LinksResponse.newBuilder() - .setNextPageToken("") - .addAllSearchAds360Links(Arrays.asList(responsesElement)) - .build(); + public void deleteAccessBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "accounts/account-3488/accessBindings/accessBinding-3488"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); + client.deleteAccessBinding(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7338,15 +7408,15 @@ public void listSearchAds360LinksTest2() throws Exception { } @Test - public void listSearchAds360LinksExceptionTest2() throws Exception { + public void deleteAccessBindingExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listSearchAds360Links(parent); + String name = "accounts/account-3488/accessBindings/accessBinding-3488"; + client.deleteAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7354,24 +7424,23 @@ public void listSearchAds360LinksExceptionTest2() throws Exception { } @Test - public void createSearchAds360LinkTest() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void listAccessBindingsTest() throws Exception { + AccessBinding responsesElement = AccessBinding.newBuilder().build(); + ListAccessBindingsResponse expectedResponse = + ListAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAccessBindings(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + AccountName parent = AccountName.of("[ACCOUNT]"); - SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); - Assert.assertEquals(expectedResponse, actualResponse); + ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7389,16 +7458,15 @@ public void createSearchAds360LinkTest() throws Exception { } @Test - public void createSearchAds360LinkExceptionTest() throws Exception { + public void listAccessBindingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - client.createSearchAds360Link(parent, searchAds360Link); + AccountName parent = AccountName.of("[ACCOUNT]"); + client.listAccessBindings(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7406,24 +7474,23 @@ public void createSearchAds360LinkExceptionTest() throws Exception { } @Test - public void createSearchAds360LinkTest2() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void listAccessBindingsTest2() throws Exception { + AccessBinding responsesElement = AccessBinding.newBuilder().build(); + ListAccessBindingsResponse expectedResponse = + ListAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAccessBindings(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); - Assert.assertEquals(expectedResponse, actualResponse); + ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7441,16 +7508,15 @@ public void createSearchAds360LinkTest2() throws Exception { } @Test - public void createSearchAds360LinkExceptionTest2() throws Exception { + public void listAccessBindingsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - client.createSearchAds360Link(parent, searchAds360Link); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listAccessBindings(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7458,13 +7524,23 @@ public void createSearchAds360LinkExceptionTest2() throws Exception { } @Test - public void deleteSearchAds360LinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listAccessBindingsTest3() throws Exception { + AccessBinding responsesElement = AccessBinding.newBuilder().build(); + ListAccessBindingsResponse expectedResponse = + ListAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAccessBindings(Arrays.asList(responsesElement)) + .build(); mockService.addResponse(expectedResponse); - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + String parent = "accounts/account-4811"; - client.deleteSearchAds360Link(name); + ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7482,15 +7558,15 @@ public void deleteSearchAds360LinkTest() throws Exception { } @Test - public void deleteSearchAds360LinkExceptionTest() throws Exception { + public void listAccessBindingsExceptionTest3() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - client.deleteSearchAds360Link(name); + String parent = "accounts/account-4811"; + client.listAccessBindings(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7498,13 +7574,21 @@ public void deleteSearchAds360LinkExceptionTest() throws Exception { } @Test - public void deleteSearchAds360LinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void batchCreateAccessBindingsTest() throws Exception { + BatchCreateAccessBindingsResponse expectedResponse = + BatchCreateAccessBindingsResponse.newBuilder() + .addAllAccessBindings(new ArrayList()) + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; + BatchCreateAccessBindingsRequest request = + BatchCreateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); - client.deleteSearchAds360Link(name); + BatchCreateAccessBindingsResponse actualResponse = client.batchCreateAccessBindings(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7522,15 +7606,19 @@ public void deleteSearchAds360LinkTest2() throws Exception { } @Test - public void deleteSearchAds360LinkExceptionTest2() throws Exception { + public void batchCreateAccessBindingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-3689/searchAds360Links/searchAds360Link-3689"; - client.deleteSearchAds360Link(name); + BatchCreateAccessBindingsRequest request = + BatchCreateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchCreateAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7538,32 +7626,20 @@ public void deleteSearchAds360LinkExceptionTest2() throws Exception { } @Test - public void updateSearchAds360LinkTest() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void batchGetAccessBindingsTest() throws Exception { + BatchGetAccessBindingsResponse expectedResponse = + BatchGetAccessBindingsResponse.newBuilder() + .addAllAccessBindings(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - SearchAds360Link searchAds360Link = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + BatchGetAccessBindingsRequest request = + BatchGetAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllNames(new ArrayList()) .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - SearchAds360Link actualResponse = client.updateSearchAds360Link(searchAds360Link, updateMask); + BatchGetAccessBindingsResponse actualResponse = client.batchGetAccessBindings(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7582,25 +7658,19 @@ public void updateSearchAds360LinkTest() throws Exception { } @Test - public void updateSearchAds360LinkExceptionTest() throws Exception { + public void batchGetAccessBindingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SearchAds360Link searchAds360Link = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + BatchGetAccessBindingsRequest request = + BatchGetAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllNames(new ArrayList()) .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSearchAds360Link(searchAds360Link, updateMask); + client.batchGetAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7608,16 +7678,20 @@ public void updateSearchAds360LinkExceptionTest() throws Exception { } @Test - public void getAttributionSettingsTest() throws Exception { - AttributionSettings expectedResponse = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + public void batchUpdateAccessBindingsTest() throws Exception { + BatchUpdateAccessBindingsResponse expectedResponse = + BatchUpdateAccessBindingsResponse.newBuilder() + .addAllAccessBindings(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); + BatchUpdateAccessBindingsRequest request = + BatchUpdateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); - AttributionSettings actualResponse = client.getAttributionSettings(name); + BatchUpdateAccessBindingsResponse actualResponse = client.batchUpdateAccessBindings(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7636,15 +7710,19 @@ public void getAttributionSettingsTest() throws Exception { } @Test - public void getAttributionSettingsExceptionTest() throws Exception { + public void batchUpdateAccessBindingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); - client.getAttributionSettings(name); + BatchUpdateAccessBindingsRequest request = + BatchUpdateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchUpdateAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7652,17 +7730,17 @@ public void getAttributionSettingsExceptionTest() throws Exception { } @Test - public void getAttributionSettingsTest2() throws Exception { - AttributionSettings expectedResponse = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) - .build(); + public void batchDeleteAccessBindingsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-492/attributionSettings"; + BatchDeleteAccessBindingsRequest request = + BatchDeleteAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); - AttributionSettings actualResponse = client.getAttributionSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.batchDeleteAccessBindings(request); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7680,15 +7758,19 @@ public void getAttributionSettingsTest2() throws Exception { } @Test - public void getAttributionSettingsExceptionTest2() throws Exception { + public void batchDeleteAccessBindingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-492/attributionSettings"; - client.getAttributionSettings(name); + BatchDeleteAccessBindingsRequest request = + BatchDeleteAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchDeleteAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7696,21 +7778,22 @@ public void getAttributionSettingsExceptionTest2() throws Exception { } @Test - public void updateAttributionSettingsTest() throws Exception { - AttributionSettings expectedResponse = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + public void getExpandedDataSetTest() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - AttributionSettings attributionSettings = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - AttributionSettings actualResponse = - client.updateAttributionSettings(attributionSettings, updateMask); + ExpandedDataSet actualResponse = client.getExpandedDataSet(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7729,19 +7812,15 @@ public void updateAttributionSettingsTest() throws Exception { } @Test - public void updateAttributionSettingsExceptionTest() throws Exception { + public void getExpandedDataSetExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AttributionSettings attributionSettings = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateAttributionSettings(attributionSettings, updateMask); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + client.getExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7749,33 +7828,22 @@ public void updateAttributionSettingsExceptionTest() throws Exception { } @Test - public void runAccessReportTest() throws Exception { - RunAccessReportResponse expectedResponse = - RunAccessReportResponse.newBuilder() - .addAllDimensionHeaders(new ArrayList()) - .addAllMetricHeaders(new ArrayList()) - .addAllRows(new ArrayList()) - .setRowCount(1340416618) - .setQuota(AccessQuota.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - RunAccessReportRequest request = - RunAccessReportRequest.newBuilder() - .setEntity("properties/propertie-4993") - .addAllDimensions(new ArrayList()) - .addAllMetrics(new ArrayList()) - .addAllDateRanges(new ArrayList()) - .setDimensionFilter(AccessFilterExpression.newBuilder().build()) - .setMetricFilter(AccessFilterExpression.newBuilder().build()) - .setOffset(-1019779949) - .setLimit(102976443) - .setTimeZone("timeZone-2077180903") - .addAllOrderBys(new ArrayList()) - .setReturnEntityQuota(true) + public void getExpandedDataSetTest2() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); + mockService.addResponse(expectedResponse); - RunAccessReportResponse actualResponse = client.runAccessReport(request); + String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; + + ExpandedDataSet actualResponse = client.getExpandedDataSet(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7794,28 +7862,15 @@ public void runAccessReportTest() throws Exception { } @Test - public void runAccessReportExceptionTest() throws Exception { + public void getExpandedDataSetExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - RunAccessReportRequest request = - RunAccessReportRequest.newBuilder() - .setEntity("properties/propertie-4993") - .addAllDimensions(new ArrayList()) - .addAllMetrics(new ArrayList()) - .addAllDateRanges(new ArrayList()) - .setDimensionFilter(AccessFilterExpression.newBuilder().build()) - .setMetricFilter(AccessFilterExpression.newBuilder().build()) - .setOffset(-1019779949) - .setLimit(102976443) - .setTimeZone("timeZone-2077180903") - .addAllOrderBys(new ArrayList()) - .setReturnEntityQuota(true) - .build(); - client.runAccessReport(request); + String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; + client.getExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7823,21 +7878,23 @@ public void runAccessReportExceptionTest() throws Exception { } @Test - public void createAccessBindingTest() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void listExpandedDataSetsTest() throws Exception { + ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); + ListExpandedDataSetsResponse expectedResponse = + ListExpandedDataSetsResponse.newBuilder() + .setNextPageToken("") + .addAllExpandedDataSets(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); - Assert.assertEquals(expectedResponse, actualResponse); + ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7855,16 +7912,15 @@ public void createAccessBindingTest() throws Exception { } @Test - public void createAccessBindingExceptionTest() throws Exception { + public void listExpandedDataSetsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); - client.createAccessBinding(parent, accessBinding); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listExpandedDataSets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7872,21 +7928,23 @@ public void createAccessBindingExceptionTest() throws Exception { } @Test - public void createAccessBindingTest2() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void listExpandedDataSetsTest2() throws Exception { + ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); + ListExpandedDataSetsResponse expectedResponse = + ListExpandedDataSetsResponse.newBuilder() + .setNextPageToken("") + .addAllExpandedDataSets(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); + String parent = "properties/propertie-2024"; - AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); - Assert.assertEquals(expectedResponse, actualResponse); + ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -7904,16 +7962,15 @@ public void createAccessBindingTest2() throws Exception { } @Test - public void createAccessBindingExceptionTest2() throws Exception { + public void listExpandedDataSetsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); - client.createAccessBinding(parent, accessBinding); + String parent = "properties/propertie-2024"; + client.listExpandedDataSets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7921,20 +7978,23 @@ public void createAccessBindingExceptionTest2() throws Exception { } @Test - public void createAccessBindingTest3() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void createExpandedDataSetTest() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String parent = "accounts/account-4811"; - AccessBinding accessBinding = AccessBinding.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); + ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -7953,16 +8013,16 @@ public void createAccessBindingTest3() throws Exception { } @Test - public void createAccessBindingExceptionTest3() throws Exception { + public void createExpandedDataSetExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "accounts/account-4811"; - AccessBinding accessBinding = AccessBinding.newBuilder().build(); - client.createAccessBinding(parent, accessBinding); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + client.createExpandedDataSet(parent, expandedDataSet); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7970,20 +8030,23 @@ public void createAccessBindingExceptionTest3() throws Exception { } @Test - public void getAccessBindingTest() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void createExpandedDataSetTest2() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + String parent = "properties/propertie-2024"; + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - AccessBinding actualResponse = client.getAccessBinding(name); + ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -8002,16 +8065,16 @@ public void getAccessBindingTest() throws Exception { } @Test - public void getAccessBindingExceptionTest() throws Exception { + public void createExpandedDataSetExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - client.getAccessBinding(name); + String parent = "properties/propertie-2024"; + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + client.createExpandedDataSet(parent, expandedDataSet); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8019,19 +8082,32 @@ public void getAccessBindingExceptionTest() throws Exception { } @Test - public void getAccessBindingTest2() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void updateExpandedDataSetTest() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - String name = "accounts/account-3488/accessBindings/accessBinding-3488"; + ExpandedDataSet expandedDataSet = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - AccessBinding actualResponse = client.getAccessBinding(name); + ExpandedDataSet actualResponse = client.updateExpandedDataSet(expandedDataSet, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -8050,15 +8126,25 @@ public void getAccessBindingTest2() throws Exception { } @Test - public void getAccessBindingExceptionTest2() throws Exception { + public void updateExpandedDataSetExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "accounts/account-3488/accessBindings/accessBinding-3488"; - client.getAccessBinding(name); + ExpandedDataSet expandedDataSet = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExpandedDataSet(expandedDataSet, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8066,26 +8152,13 @@ public void getAccessBindingExceptionTest2() throws Exception { } @Test - public void updateAccessBindingTest() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) - .build(); + public void deleteExpandedDataSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - AccessBinding accessBinding = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) - .build(); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - AccessBinding actualResponse = client.updateAccessBinding(accessBinding); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteExpandedDataSet(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8103,21 +8176,15 @@ public void updateAccessBindingTest() throws Exception { } @Test - public void updateAccessBindingExceptionTest() throws Exception { + public void deleteExpandedDataSetExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AccessBinding accessBinding = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) - .build(); - client.updateAccessBinding(accessBinding); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + client.deleteExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8125,14 +8192,13 @@ public void updateAccessBindingExceptionTest() throws Exception { } @Test - public void deleteAccessBindingTest() throws Exception { + public void deleteExpandedDataSetTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; - client.deleteAccessBinding(name); + client.deleteExpandedDataSet(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8150,16 +8216,15 @@ public void deleteAccessBindingTest() throws Exception { } @Test - public void deleteAccessBindingExceptionTest() throws Exception { + public void deleteExpandedDataSetExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - client.deleteAccessBinding(name); + String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; + client.deleteExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8167,13 +8232,21 @@ public void deleteAccessBindingExceptionTest() throws Exception { } @Test - public void deleteAccessBindingTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getChannelGroupTest() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) + .build(); mockService.addResponse(expectedResponse); - String name = "accounts/account-3488/accessBindings/accessBinding-3488"; + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.deleteAccessBinding(name); + ChannelGroup actualResponse = client.getChannelGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8191,15 +8264,15 @@ public void deleteAccessBindingTest2() throws Exception { } @Test - public void deleteAccessBindingExceptionTest2() throws Exception { + public void getChannelGroupExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "accounts/account-3488/accessBindings/accessBinding-3488"; - client.deleteAccessBinding(name); + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + client.getChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8207,23 +8280,21 @@ public void deleteAccessBindingExceptionTest2() throws Exception { } @Test - public void listAccessBindingsTest() throws Exception { - AccessBinding responsesElement = AccessBinding.newBuilder().build(); - ListAccessBindingsResponse expectedResponse = - ListAccessBindingsResponse.newBuilder() - .setNextPageToken("") - .addAllAccessBindings(Arrays.asList(responsesElement)) + public void getChannelGroupTest2() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - - ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "properties/propertie-836/channelGroups/channelGroup-836"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); + ChannelGroup actualResponse = client.getChannelGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8241,15 +8312,15 @@ public void listAccessBindingsTest() throws Exception { } @Test - public void listAccessBindingsExceptionTest() throws Exception { + public void getChannelGroupExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - client.listAccessBindings(parent); + String name = "properties/propertie-836/channelGroups/channelGroup-836"; + client.getChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8257,23 +8328,23 @@ public void listAccessBindingsExceptionTest() throws Exception { } @Test - public void listAccessBindingsTest2() throws Exception { - AccessBinding responsesElement = AccessBinding.newBuilder().build(); - ListAccessBindingsResponse expectedResponse = - ListAccessBindingsResponse.newBuilder() + public void listChannelGroupsTest() throws Exception { + ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); + ListChannelGroupsResponse expectedResponse = + ListChannelGroupsResponse.newBuilder() .setNextPageToken("") - .addAllAccessBindings(Arrays.asList(responsesElement)) + .addAllChannelGroups(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8291,7 +8362,7 @@ public void listAccessBindingsTest2() throws Exception { } @Test - public void listAccessBindingsExceptionTest2() throws Exception { + public void listChannelGroupsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -8299,7 +8370,7 @@ public void listAccessBindingsExceptionTest2() throws Exception { try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listAccessBindings(parent); + client.listChannelGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8307,23 +8378,23 @@ public void listAccessBindingsExceptionTest2() throws Exception { } @Test - public void listAccessBindingsTest3() throws Exception { - AccessBinding responsesElement = AccessBinding.newBuilder().build(); - ListAccessBindingsResponse expectedResponse = - ListAccessBindingsResponse.newBuilder() + public void listChannelGroupsTest2() throws Exception { + ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); + ListChannelGroupsResponse expectedResponse = + ListChannelGroupsResponse.newBuilder() .setNextPageToken("") - .addAllAccessBindings(Arrays.asList(responsesElement)) + .addAllChannelGroups(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "accounts/account-4811"; + String parent = "properties/propertie-2024"; - ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8341,15 +8412,15 @@ public void listAccessBindingsTest3() throws Exception { } @Test - public void listAccessBindingsExceptionTest3() throws Exception { + public void listChannelGroupsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "accounts/account-4811"; - client.listAccessBindings(parent); + String parent = "properties/propertie-2024"; + client.listChannelGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8357,20 +8428,21 @@ public void listAccessBindingsExceptionTest3() throws Exception { } @Test - public void batchCreateAccessBindingsTest() throws Exception { - BatchCreateAccessBindingsResponse expectedResponse = - BatchCreateAccessBindingsResponse.newBuilder() - .addAllAccessBindings(new ArrayList()) + public void createChannelGroupTest() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockService.addResponse(expectedResponse); - BatchCreateAccessBindingsRequest request = - BatchCreateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - BatchCreateAccessBindingsResponse actualResponse = client.batchCreateAccessBindings(request); + ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -8389,19 +8461,16 @@ public void batchCreateAccessBindingsTest() throws Exception { } @Test - public void batchCreateAccessBindingsExceptionTest() throws Exception { + public void createChannelGroupExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchCreateAccessBindingsRequest request = - BatchCreateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchCreateAccessBindings(request); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + client.createChannelGroup(parent, channelGroup); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8409,20 +8478,21 @@ public void batchCreateAccessBindingsExceptionTest() throws Exception { } @Test - public void batchGetAccessBindingsTest() throws Exception { - BatchGetAccessBindingsResponse expectedResponse = - BatchGetAccessBindingsResponse.newBuilder() - .addAllAccessBindings(new ArrayList()) + public void createChannelGroupTest2() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockService.addResponse(expectedResponse); - BatchGetAccessBindingsRequest request = - BatchGetAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); + String parent = "properties/propertie-2024"; + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - BatchGetAccessBindingsResponse actualResponse = client.batchGetAccessBindings(request); + ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -8441,19 +8511,16 @@ public void batchGetAccessBindingsTest() throws Exception { } @Test - public void batchGetAccessBindingsExceptionTest() throws Exception { + public void createChannelGroupExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchGetAccessBindingsRequest request = - BatchGetAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); - client.batchGetAccessBindings(request); + String parent = "properties/propertie-2024"; + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + client.createChannelGroup(parent, channelGroup); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8461,20 +8528,28 @@ public void batchGetAccessBindingsExceptionTest() throws Exception { } @Test - public void batchUpdateAccessBindingsTest() throws Exception { - BatchUpdateAccessBindingsResponse expectedResponse = - BatchUpdateAccessBindingsResponse.newBuilder() - .addAllAccessBindings(new ArrayList()) + public void updateChannelGroupTest() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockService.addResponse(expectedResponse); - BatchUpdateAccessBindingsRequest request = - BatchUpdateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) + ChannelGroup channelGroup = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - BatchUpdateAccessBindingsResponse actualResponse = client.batchUpdateAccessBindings(request); + ChannelGroup actualResponse = client.updateChannelGroup(channelGroup, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -8493,19 +8568,23 @@ public void batchUpdateAccessBindingsTest() throws Exception { } @Test - public void batchUpdateAccessBindingsExceptionTest() throws Exception { + public void updateChannelGroupExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchUpdateAccessBindingsRequest request = - BatchUpdateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) + ChannelGroup channelGroup = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); - client.batchUpdateAccessBindings(request); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateChannelGroup(channelGroup, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8513,17 +8592,13 @@ public void batchUpdateAccessBindingsExceptionTest() throws Exception { } @Test - public void batchDeleteAccessBindingsTest() throws Exception { + public void deleteChannelGroupTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - BatchDeleteAccessBindingsRequest request = - BatchDeleteAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.batchDeleteAccessBindings(request); + client.deleteChannelGroup(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8541,19 +8616,15 @@ public void batchDeleteAccessBindingsTest() throws Exception { } @Test - public void batchDeleteAccessBindingsExceptionTest() throws Exception { + public void deleteChannelGroupExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BatchDeleteAccessBindingsRequest request = - BatchDeleteAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchDeleteAccessBindings(request); + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + client.deleteChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8561,23 +8632,13 @@ public void batchDeleteAccessBindingsExceptionTest() throws Exception { } @Test - public void getExpandedDataSetTest() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) - .build(); + public void deleteChannelGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + String name = "properties/propertie-836/channelGroups/channelGroup-836"; - ExpandedDataSet actualResponse = client.getExpandedDataSet(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteChannelGroup(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8595,15 +8656,15 @@ public void getExpandedDataSetTest() throws Exception { } @Test - public void getExpandedDataSetExceptionTest() throws Exception { + public void deleteChannelGroupExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - client.getExpandedDataSet(name); + String name = "properties/propertie-836/channelGroups/channelGroup-836"; + client.deleteChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8611,22 +8672,19 @@ public void getExpandedDataSetExceptionTest() throws Exception { } @Test - public void getExpandedDataSetTest2() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) - .build(); + public void setAutomatedGa4ConfigurationOptOutTest() throws Exception { + SetAutomatedGa4ConfigurationOptOutResponse expectedResponse = + SetAutomatedGa4ConfigurationOptOutResponse.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; + SetAutomatedGa4ConfigurationOptOutRequest request = + SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .setOptOut(true) + .build(); - ExpandedDataSet actualResponse = client.getExpandedDataSet(name); + SetAutomatedGa4ConfigurationOptOutResponse actualResponse = + client.setAutomatedGa4ConfigurationOptOut(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -8645,15 +8703,19 @@ public void getExpandedDataSetTest2() throws Exception { } @Test - public void getExpandedDataSetExceptionTest2() throws Exception { + public void setAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; - client.getExpandedDataSet(name); + SetAutomatedGa4ConfigurationOptOutRequest request = + SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .setOptOut(true) + .build(); + client.setAutomatedGa4ConfigurationOptOut(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8661,23 +8723,19 @@ public void getExpandedDataSetExceptionTest2() throws Exception { } @Test - public void listExpandedDataSetsTest() throws Exception { - ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); - ListExpandedDataSetsResponse expectedResponse = - ListExpandedDataSetsResponse.newBuilder() - .setNextPageToken("") - .addAllExpandedDataSets(Arrays.asList(responsesElement)) - .build(); + public void fetchAutomatedGa4ConfigurationOptOutTest() throws Exception { + FetchAutomatedGa4ConfigurationOptOutResponse expectedResponse = + FetchAutomatedGa4ConfigurationOptOutResponse.newBuilder().setOptOut(true).build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + FetchAutomatedGa4ConfigurationOptOutRequest request = + FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); + FetchAutomatedGa4ConfigurationOptOutResponse actualResponse = + client.fetchAutomatedGa4ConfigurationOptOut(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8695,15 +8753,18 @@ public void listExpandedDataSetsTest() throws Exception { } @Test - public void listExpandedDataSetsExceptionTest() throws Exception { + public void fetchAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listExpandedDataSets(parent); + FetchAutomatedGa4ConfigurationOptOutRequest request = + FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .build(); + client.fetchAutomatedGa4ConfigurationOptOut(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8711,23 +8772,25 @@ public void listExpandedDataSetsExceptionTest() throws Exception { } @Test - public void listExpandedDataSetsTest2() throws Exception { - ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); - ListExpandedDataSetsResponse expectedResponse = - ListExpandedDataSetsResponse.newBuilder() - .setNextPageToken("") - .addAllExpandedDataSets(Arrays.asList(responsesElement)) + public void getBigQueryLinkTest() throws Exception { + BigQueryLink expectedResponse = + BigQueryLink.newBuilder() + .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .setDailyExportEnabled(true) + .setStreamingExportEnabled(true) + .setFreshDailyExportEnabled(true) + .setIncludeAdvertisingId(true) + .addAllExportStreams(new ArrayList()) + .addAllExcludedEvents(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); + BigQueryLink actualResponse = client.getBigQueryLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8745,15 +8808,15 @@ public void listExpandedDataSetsTest2() throws Exception { } @Test - public void listExpandedDataSetsExceptionTest2() throws Exception { + public void getBigQueryLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listExpandedDataSets(parent); + BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); + client.getBigQueryLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8761,23 +8824,24 @@ public void listExpandedDataSetsExceptionTest2() throws Exception { } @Test - public void createExpandedDataSetTest() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) + public void getBigQueryLinkTest2() throws Exception { + BigQueryLink expectedResponse = + BigQueryLink.newBuilder() + .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .setDailyExportEnabled(true) + .setStreamingExportEnabled(true) + .setFreshDailyExportEnabled(true) + .setIncludeAdvertisingId(true) + .addAllExportStreams(new ArrayList()) + .addAllExcludedEvents(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + String name = "properties/propertie-7430/bigQueryLinks/bigQueryLink-7430"; - ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); + BigQueryLink actualResponse = client.getBigQueryLink(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -8796,16 +8860,15 @@ public void createExpandedDataSetTest() throws Exception { } @Test - public void createExpandedDataSetExceptionTest() throws Exception { + public void getBigQueryLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - client.createExpandedDataSet(parent, expandedDataSet); + String name = "properties/propertie-7430/bigQueryLinks/bigQueryLink-7430"; + client.getBigQueryLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8813,24 +8876,23 @@ public void createExpandedDataSetExceptionTest() throws Exception { } @Test - public void createExpandedDataSetTest2() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) + public void listBigQueryLinksTest() throws Exception { + BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); + ListBigQueryLinksResponse expectedResponse = + ListBigQueryLinksResponse.newBuilder() + .setNextPageToken("") + .addAllBigqueryLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); - Assert.assertEquals(expectedResponse, actualResponse); + ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8848,16 +8910,15 @@ public void createExpandedDataSetTest2() throws Exception { } @Test - public void createExpandedDataSetExceptionTest2() throws Exception { + public void listBigQueryLinksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - client.createExpandedDataSet(parent, expandedDataSet); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listBigQueryLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8865,33 +8926,23 @@ public void createExpandedDataSetExceptionTest2() throws Exception { } @Test - public void updateExpandedDataSetTest() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) + public void listBigQueryLinksTest2() throws Exception { + BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); + ListBigQueryLinksResponse expectedResponse = + ListBigQueryLinksResponse.newBuilder() + .setNextPageToken("") + .addAllBigqueryLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - ExpandedDataSet expandedDataSet = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String parent = "properties/propertie-2024"; - ExpandedDataSet actualResponse = client.updateExpandedDataSet(expandedDataSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8909,25 +8960,15 @@ public void updateExpandedDataSetTest() throws Exception { } @Test - public void updateExpandedDataSetExceptionTest() throws Exception { + public void listBigQueryLinksExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ExpandedDataSet expandedDataSet = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateExpandedDataSet(expandedDataSet, updateMask); + String parent = "properties/propertie-2024"; + client.listBigQueryLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8935,13 +8976,28 @@ public void updateExpandedDataSetExceptionTest() throws Exception { } @Test - public void deleteExpandedDataSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getEnhancedMeasurementSettingsTest() throws Exception { + EnhancedMeasurementSettings expectedResponse = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") + .build(); mockService.addResponse(expectedResponse); - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + EnhancedMeasurementSettingsName name = + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); - client.deleteExpandedDataSet(name); + EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8959,15 +9015,16 @@ public void deleteExpandedDataSetTest() throws Exception { } @Test - public void deleteExpandedDataSetExceptionTest() throws Exception { + public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - client.deleteExpandedDataSet(name); + EnhancedMeasurementSettingsName name = + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getEnhancedMeasurementSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8975,13 +9032,28 @@ public void deleteExpandedDataSetExceptionTest() throws Exception { } @Test - public void deleteExpandedDataSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getEnhancedMeasurementSettingsTest2() throws Exception { + EnhancedMeasurementSettings expectedResponse = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; + String name = + "properties/propertie-5816/dataStreams/dataStream-5816/enhancedMeasurementSettings"; - client.deleteExpandedDataSet(name); + EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -8999,15 +9071,16 @@ public void deleteExpandedDataSetTest2() throws Exception { } @Test - public void deleteExpandedDataSetExceptionTest2() throws Exception { + public void getEnhancedMeasurementSettingsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-4725/expandedDataSets/expandedDataSet-4725"; - client.deleteExpandedDataSet(name); + String name = + "properties/propertie-5816/dataStreams/dataStream-5816/enhancedMeasurementSettings"; + client.getEnhancedMeasurementSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9015,20 +9088,41 @@ public void deleteExpandedDataSetExceptionTest2() throws Exception { } @Test - public void getChannelGroupTest() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void updateEnhancedMeasurementSettingsTest() throws Exception { + EnhancedMeasurementSettings expectedResponse = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") .build(); mockService.addResponse(expectedResponse); - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + EnhancedMeasurementSettings enhancedMeasurementSettings = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - ChannelGroup actualResponse = client.getChannelGroup(name); + EnhancedMeasurementSettings actualResponse = + client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -9047,15 +9141,29 @@ public void getChannelGroupTest() throws Exception { } @Test - public void getChannelGroupExceptionTest() throws Exception { + public void updateEnhancedMeasurementSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.getChannelGroup(name); + EnhancedMeasurementSettings enhancedMeasurementSettings = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9063,20 +9171,18 @@ public void getChannelGroupExceptionTest() throws Exception { } @Test - public void getChannelGroupTest2() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) - .build(); + public void createConnectedSiteTagTest() throws Exception { + CreateConnectedSiteTagResponse expectedResponse = + CreateConnectedSiteTagResponse.newBuilder().build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-836/channelGroups/channelGroup-836"; + CreateConnectedSiteTagRequest request = + CreateConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) + .build(); - ChannelGroup actualResponse = client.getChannelGroup(name); + CreateConnectedSiteTagResponse actualResponse = client.createConnectedSiteTag(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -9095,15 +9201,19 @@ public void getChannelGroupTest2() throws Exception { } @Test - public void getChannelGroupExceptionTest2() throws Exception { + public void createConnectedSiteTagExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-836/channelGroups/channelGroup-836"; - client.getChannelGroup(name); + CreateConnectedSiteTagRequest request = + CreateConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) + .build(); + client.createConnectedSiteTag(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9111,23 +9221,17 @@ public void getChannelGroupExceptionTest2() throws Exception { } @Test - public void listChannelGroupsTest() throws Exception { - ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); - ListChannelGroupsResponse expectedResponse = - ListChannelGroupsResponse.newBuilder() - .setNextPageToken("") - .addAllChannelGroups(Arrays.asList(responsesElement)) - .build(); + public void deleteConnectedSiteTagTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + DeleteConnectedSiteTagRequest request = + DeleteConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setTagId("tagId110119509") + .build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); + client.deleteConnectedSiteTag(request); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9145,15 +9249,19 @@ public void listChannelGroupsTest() throws Exception { } @Test - public void listChannelGroupsExceptionTest() throws Exception { + public void deleteConnectedSiteTagExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listChannelGroups(parent); + DeleteConnectedSiteTagRequest request = + DeleteConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setTagId("tagId110119509") + .build(); + client.deleteConnectedSiteTag(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9161,23 +9269,18 @@ public void listChannelGroupsExceptionTest() throws Exception { } @Test - public void listChannelGroupsTest2() throws Exception { - ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); - ListChannelGroupsResponse expectedResponse = - ListChannelGroupsResponse.newBuilder() - .setNextPageToken("") - .addAllChannelGroups(Arrays.asList(responsesElement)) + public void listConnectedSiteTagsTest() throws Exception { + ListConnectedSiteTagsResponse expectedResponse = + ListConnectedSiteTagsResponse.newBuilder() + .addAllConnectedSiteTags(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + ListConnectedSiteTagsRequest request = + ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); + ListConnectedSiteTagsResponse actualResponse = client.listConnectedSiteTags(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9195,15 +9298,16 @@ public void listChannelGroupsTest2() throws Exception { } @Test - public void listChannelGroupsExceptionTest2() throws Exception { + public void listConnectedSiteTagsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listChannelGroups(parent); + ListConnectedSiteTagsRequest request = + ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); + client.listConnectedSiteTags(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9211,21 +9315,19 @@ public void listChannelGroupsExceptionTest2() throws Exception { } @Test - public void createChannelGroupTest() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void fetchConnectedGa4PropertyTest() throws Exception { + FetchConnectedGa4PropertyResponse expectedResponse = + FetchConnectedGa4PropertyResponse.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + FetchConnectedGa4PropertyRequest request = + FetchConnectedGa4PropertyRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .build(); - ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); + FetchConnectedGa4PropertyResponse actualResponse = client.fetchConnectedGa4Property(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -9244,16 +9346,18 @@ public void createChannelGroupTest() throws Exception { } @Test - public void createChannelGroupExceptionTest() throws Exception { + public void fetchConnectedGa4PropertyExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - client.createChannelGroup(parent, channelGroup); + FetchConnectedGa4PropertyRequest request = + FetchConnectedGa4PropertyRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .build(); + client.fetchConnectedGa4Property(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9261,21 +9365,17 @@ public void createChannelGroupExceptionTest() throws Exception { } @Test - public void createChannelGroupTest2() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void getAdSenseLinkTest() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); + AdSenseLink actualResponse = client.getAdSenseLink(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -9294,16 +9394,15 @@ public void createChannelGroupTest2() throws Exception { } @Test - public void createChannelGroupExceptionTest2() throws Exception { + public void getAdSenseLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - client.createChannelGroup(parent, channelGroup); + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + client.getAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9311,28 +9410,17 @@ public void createChannelGroupExceptionTest2() throws Exception { } @Test - public void updateChannelGroupTest() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void getAdSenseLinkTest2() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") .build(); mockService.addResponse(expectedResponse); - ChannelGroup channelGroup = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; - ChannelGroup actualResponse = client.updateChannelGroup(channelGroup, updateMask); + AdSenseLink actualResponse = client.getAdSenseLink(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -9351,23 +9439,15 @@ public void updateChannelGroupTest() throws Exception { } @Test - public void updateChannelGroupExceptionTest() throws Exception { + public void getAdSenseLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ChannelGroup channelGroup = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateChannelGroup(channelGroup, updateMask); + String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; + client.getAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9375,13 +9455,19 @@ public void updateChannelGroupExceptionTest() throws Exception { } @Test - public void deleteChannelGroupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createAdSenseLinkTest() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") + .build(); mockService.addResponse(expectedResponse); - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.deleteChannelGroup(name); + AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9399,15 +9485,16 @@ public void deleteChannelGroupTest() throws Exception { } @Test - public void deleteChannelGroupExceptionTest() throws Exception { + public void createAdSenseLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.deleteChannelGroup(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + client.createAdSenseLink(parent, adsenseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9415,13 +9502,19 @@ public void deleteChannelGroupExceptionTest() throws Exception { } @Test - public void deleteChannelGroupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createAdSenseLinkTest2() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-836/channelGroups/channelGroup-836"; + String parent = "properties/propertie-2024"; + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.deleteChannelGroup(name); + AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9439,15 +9532,16 @@ public void deleteChannelGroupTest2() throws Exception { } @Test - public void deleteChannelGroupExceptionTest2() throws Exception { + public void createAdSenseLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-836/channelGroups/channelGroup-836"; - client.deleteChannelGroup(name); + String parent = "properties/propertie-2024"; + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + client.createAdSenseLink(parent, adsenseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9455,20 +9549,13 @@ public void deleteChannelGroupExceptionTest2() throws Exception { } @Test - public void setAutomatedGa4ConfigurationOptOutTest() throws Exception { - SetAutomatedGa4ConfigurationOptOutResponse expectedResponse = - SetAutomatedGa4ConfigurationOptOutResponse.newBuilder().build(); + public void deleteAdSenseLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - SetAutomatedGa4ConfigurationOptOutRequest request = - SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .setOptOut(true) - .build(); + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - SetAutomatedGa4ConfigurationOptOutResponse actualResponse = - client.setAutomatedGa4ConfigurationOptOut(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteAdSenseLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9486,19 +9573,15 @@ public void setAutomatedGa4ConfigurationOptOutTest() throws Exception { } @Test - public void setAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { + public void deleteAdSenseLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - SetAutomatedGa4ConfigurationOptOutRequest request = - SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .setOptOut(true) - .build(); - client.setAutomatedGa4ConfigurationOptOut(request); + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + client.deleteAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9506,19 +9589,13 @@ public void setAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { } @Test - public void fetchAutomatedGa4ConfigurationOptOutTest() throws Exception { - FetchAutomatedGa4ConfigurationOptOutResponse expectedResponse = - FetchAutomatedGa4ConfigurationOptOutResponse.newBuilder().setOptOut(true).build(); + public void deleteAdSenseLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - FetchAutomatedGa4ConfigurationOptOutRequest request = - FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .build(); + String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; - FetchAutomatedGa4ConfigurationOptOutResponse actualResponse = - client.fetchAutomatedGa4ConfigurationOptOut(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteAdSenseLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9536,18 +9613,15 @@ public void fetchAutomatedGa4ConfigurationOptOutTest() throws Exception { } @Test - public void fetchAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { + public void deleteAdSenseLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - FetchAutomatedGa4ConfigurationOptOutRequest request = - FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .build(); - client.fetchAutomatedGa4ConfigurationOptOut(request); + String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; + client.deleteAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9555,25 +9629,23 @@ public void fetchAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception } @Test - public void getBigQueryLinkTest() throws Exception { - BigQueryLink expectedResponse = - BigQueryLink.newBuilder() - .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) - .setDailyExportEnabled(true) - .setStreamingExportEnabled(true) - .setFreshDailyExportEnabled(true) - .setIncludeAdvertisingId(true) - .addAllExportStreams(new ArrayList()) - .addAllExcludedEvents(new ArrayList()) + public void listAdSenseLinksTest() throws Exception { + AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); + ListAdSenseLinksResponse expectedResponse = + ListAdSenseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllAdsenseLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); - BigQueryLink actualResponse = client.getBigQueryLink(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9591,15 +9663,15 @@ public void getBigQueryLinkTest() throws Exception { } @Test - public void getBigQueryLinkExceptionTest() throws Exception { + public void listAdSenseLinksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); - client.getBigQueryLink(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listAdSenseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9607,25 +9679,23 @@ public void getBigQueryLinkExceptionTest() throws Exception { } @Test - public void getBigQueryLinkTest2() throws Exception { - BigQueryLink expectedResponse = - BigQueryLink.newBuilder() - .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) - .setDailyExportEnabled(true) - .setStreamingExportEnabled(true) - .setFreshDailyExportEnabled(true) - .setIncludeAdvertisingId(true) - .addAllExportStreams(new ArrayList()) - .addAllExcludedEvents(new ArrayList()) + public void listAdSenseLinksTest2() throws Exception { + AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); + ListAdSenseLinksResponse expectedResponse = + ListAdSenseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllAdsenseLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-7430/bigQueryLinks/bigQueryLink-7430"; + String parent = "properties/propertie-2024"; - BigQueryLink actualResponse = client.getBigQueryLink(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9643,15 +9713,15 @@ public void getBigQueryLinkTest2() throws Exception { } @Test - public void getBigQueryLinkExceptionTest2() throws Exception { + public void listAdSenseLinksExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-7430/bigQueryLinks/bigQueryLink-7430"; - client.getBigQueryLink(name); + String parent = "properties/propertie-2024"; + client.listAdSenseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9659,23 +9729,24 @@ public void getBigQueryLinkExceptionTest2() throws Exception { } @Test - public void listBigQueryLinksTest() throws Exception { - BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); - ListBigQueryLinksResponse expectedResponse = - ListBigQueryLinksResponse.newBuilder() - .setNextPageToken("") - .addAllBigqueryLinks(Arrays.asList(responsesElement)) + public void getEventCreateRuleTest() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); + EventCreateRule actualResponse = client.getEventCreateRule(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9693,15 +9764,16 @@ public void listBigQueryLinksTest() throws Exception { } @Test - public void listBigQueryLinksExceptionTest() throws Exception { + public void getEventCreateRuleExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listBigQueryLinks(parent); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + client.getEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9709,23 +9781,24 @@ public void listBigQueryLinksExceptionTest() throws Exception { } @Test - public void listBigQueryLinksTest2() throws Exception { - BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); - ListBigQueryLinksResponse expectedResponse = - ListBigQueryLinksResponse.newBuilder() - .setNextPageToken("") - .addAllBigqueryLinks(Arrays.asList(responsesElement)) + public void getEventCreateRuleTest2() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - - ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = + "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); + EventCreateRule actualResponse = client.getEventCreateRule(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9743,15 +9816,16 @@ public void listBigQueryLinksTest2() throws Exception { } @Test - public void listBigQueryLinksExceptionTest2() throws Exception { + public void getEventCreateRuleExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - client.listBigQueryLinks(parent); + String name = + "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; + client.getEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9759,28 +9833,23 @@ public void listBigQueryLinksExceptionTest2() throws Exception { } @Test - public void getEnhancedMeasurementSettingsTest() throws Exception { - EnhancedMeasurementSettings expectedResponse = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") + public void listEventCreateRulesTest() throws Exception { + EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); + ListEventCreateRulesResponse expectedResponse = + ListEventCreateRulesResponse.newBuilder() + .setNextPageToken("") + .addAllEventCreateRules(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - EnhancedMeasurementSettingsName name = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9798,16 +9867,15 @@ public void getEnhancedMeasurementSettingsTest() throws Exception { } @Test - public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { + public void listEventCreateRulesExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); - - try { - EnhancedMeasurementSettingsName name = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); - client.getEnhancedMeasurementSettings(name); + + try { + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.listEventCreateRules(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9815,28 +9883,23 @@ public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { } @Test - public void getEnhancedMeasurementSettingsTest2() throws Exception { - EnhancedMeasurementSettings expectedResponse = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") + public void listEventCreateRulesTest2() throws Exception { + EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); + ListEventCreateRulesResponse expectedResponse = + ListEventCreateRulesResponse.newBuilder() + .setNextPageToken("") + .addAllEventCreateRules(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-5816/dataStreams/dataStream-5816/enhancedMeasurementSettings"; + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -9854,16 +9917,15 @@ public void getEnhancedMeasurementSettingsTest2() throws Exception { } @Test - public void getEnhancedMeasurementSettingsExceptionTest2() throws Exception { + public void listEventCreateRulesExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-5816/dataStreams/dataStream-5816/enhancedMeasurementSettings"; - client.getEnhancedMeasurementSettings(name); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + client.listEventCreateRules(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9871,41 +9933,23 @@ public void getEnhancedMeasurementSettingsExceptionTest2() throws Exception { } @Test - public void updateEnhancedMeasurementSettingsTest() throws Exception { - EnhancedMeasurementSettings expectedResponse = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") + public void createEventCreateRuleTest() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - EnhancedMeasurementSettings enhancedMeasurementSettings = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - EnhancedMeasurementSettings actualResponse = - client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); + EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -9924,29 +9968,16 @@ public void updateEnhancedMeasurementSettingsTest() throws Exception { } @Test - public void updateEnhancedMeasurementSettingsExceptionTest() throws Exception { + public void createEventCreateRuleExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - EnhancedMeasurementSettings enhancedMeasurementSettings = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + client.createEventCreateRule(parent, eventCreateRule); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9954,18 +9985,23 @@ public void updateEnhancedMeasurementSettingsExceptionTest() throws Exception { } @Test - public void createConnectedSiteTagTest() throws Exception { - CreateConnectedSiteTagResponse expectedResponse = - CreateConnectedSiteTagResponse.newBuilder().build(); + public void createEventCreateRuleTest2() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) + .build(); mockService.addResponse(expectedResponse); - CreateConnectedSiteTagRequest request = - CreateConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) - .build(); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - CreateConnectedSiteTagResponse actualResponse = client.createConnectedSiteTag(request); + EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -9984,19 +10020,16 @@ public void createConnectedSiteTagTest() throws Exception { } @Test - public void createConnectedSiteTagExceptionTest() throws Exception { + public void createEventCreateRuleExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - CreateConnectedSiteTagRequest request = - CreateConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) - .build(); - client.createConnectedSiteTag(request); + String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + client.createEventCreateRule(parent, eventCreateRule); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10004,17 +10037,33 @@ public void createConnectedSiteTagExceptionTest() throws Exception { } @Test - public void deleteConnectedSiteTagTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void updateEventCreateRuleTest() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) + .build(); mockService.addResponse(expectedResponse); - DeleteConnectedSiteTagRequest request = - DeleteConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setTagId("tagId110119509") + EventCreateRule eventCreateRule = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - client.deleteConnectedSiteTag(request); + EventCreateRule actualResponse = client.updateEventCreateRule(eventCreateRule, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10032,19 +10081,25 @@ public void deleteConnectedSiteTagTest() throws Exception { } @Test - public void deleteConnectedSiteTagExceptionTest() throws Exception { + public void updateEventCreateRuleExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DeleteConnectedSiteTagRequest request = - DeleteConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setTagId("tagId110119509") + EventCreateRule eventCreateRule = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); - client.deleteConnectedSiteTag(request); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEventCreateRule(eventCreateRule, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10052,18 +10107,14 @@ public void deleteConnectedSiteTagExceptionTest() throws Exception { } @Test - public void listConnectedSiteTagsTest() throws Exception { - ListConnectedSiteTagsResponse expectedResponse = - ListConnectedSiteTagsResponse.newBuilder() - .addAllConnectedSiteTags(new ArrayList()) - .build(); + public void deleteEventCreateRuleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - ListConnectedSiteTagsRequest request = - ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - ListConnectedSiteTagsResponse actualResponse = client.listConnectedSiteTags(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteEventCreateRule(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10081,16 +10132,16 @@ public void listConnectedSiteTagsTest() throws Exception { } @Test - public void listConnectedSiteTagsExceptionTest() throws Exception { + public void deleteEventCreateRuleExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - ListConnectedSiteTagsRequest request = - ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); - client.listConnectedSiteTags(request); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + client.deleteEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10098,20 +10149,14 @@ public void listConnectedSiteTagsExceptionTest() throws Exception { } @Test - public void fetchConnectedGa4PropertyTest() throws Exception { - FetchConnectedGa4PropertyResponse expectedResponse = - FetchConnectedGa4PropertyResponse.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .build(); + public void deleteEventCreateRuleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - FetchConnectedGa4PropertyRequest request = - FetchConnectedGa4PropertyRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .build(); + String name = + "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; - FetchConnectedGa4PropertyResponse actualResponse = client.fetchConnectedGa4Property(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteEventCreateRule(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10129,18 +10174,16 @@ public void fetchConnectedGa4PropertyTest() throws Exception { } @Test - public void fetchConnectedGa4PropertyExceptionTest() throws Exception { + public void deleteEventCreateRuleExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - FetchConnectedGa4PropertyRequest request = - FetchConnectedGa4PropertyRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .build(); - client.fetchConnectedGa4Property(request); + String name = + "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; + client.deleteEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10148,17 +10191,27 @@ public void fetchConnectedGa4PropertyExceptionTest() throws Exception { } @Test - public void getAdSenseLinkTest() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + public void updateDataRedactionSettingsTest() throws Exception { + DataRedactionSettings expectedResponse = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + DataRedactionSettings dataRedactionSettings = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - AdSenseLink actualResponse = client.getAdSenseLink(name); + DataRedactionSettings actualResponse = + client.updateDataRedactionSettings(dataRedactionSettings, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -10177,15 +10230,22 @@ public void getAdSenseLinkTest() throws Exception { } @Test - public void getAdSenseLinkExceptionTest() throws Exception { + public void updateDataRedactionSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - client.getAdSenseLink(name); + DataRedactionSettings dataRedactionSettings = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataRedactionSettings(dataRedactionSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10193,17 +10253,19 @@ public void getAdSenseLinkExceptionTest() throws Exception { } @Test - public void getAdSenseLinkTest2() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + public void getDataRedactionSettingsTest() throws Exception { + DataRedactionSettings expectedResponse = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; + DataRedactionSettingsName name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); - AdSenseLink actualResponse = client.getAdSenseLink(name); + DataRedactionSettings actualResponse = client.getDataRedactionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -10222,15 +10284,15 @@ public void getAdSenseLinkTest2() throws Exception { } @Test - public void getAdSenseLinkExceptionTest2() throws Exception { + public void getDataRedactionSettingsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; - client.getAdSenseLink(name); + DataRedactionSettingsName name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getDataRedactionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10238,18 +10300,19 @@ public void getAdSenseLinkExceptionTest2() throws Exception { } @Test - public void createAdSenseLinkTest() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + public void getDataRedactionSettingsTest2() throws Exception { + DataRedactionSettings expectedResponse = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + String name = "properties/propertie-6817/dataStreams/dataStream-6817/dataRedactionSettings"; - AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + DataRedactionSettings actualResponse = client.getDataRedactionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -10268,16 +10331,15 @@ public void createAdSenseLinkTest() throws Exception { } @Test - public void createAdSenseLinkExceptionTest() throws Exception { + public void getDataRedactionSettingsExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.createAdSenseLink(parent, adsenseLink); + String name = "properties/propertie-6817/dataStreams/dataStream-6817/dataRedactionSettings"; + client.getDataRedactionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10285,18 +10347,21 @@ public void createAdSenseLinkExceptionTest() throws Exception { } @Test - public void createAdSenseLinkTest2() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + public void createRollupPropertyTest() throws Exception { + CreateRollupPropertyResponse expectedResponse = + CreateRollupPropertyResponse.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllRollupPropertySourceLinks(new ArrayList()) .build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-2024"; - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + CreateRollupPropertyRequest request = + CreateRollupPropertyRequest.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllSourceProperties(new ArrayList()) + .build(); - AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + CreateRollupPropertyResponse actualResponse = client.createRollupProperty(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -10315,16 +10380,19 @@ public void createAdSenseLinkTest2() throws Exception { } @Test - public void createAdSenseLinkExceptionTest2() throws Exception { + public void createRollupPropertyExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-2024"; - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.createAdSenseLink(parent, adsenseLink); + CreateRollupPropertyRequest request = + CreateRollupPropertyRequest.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllSourceProperties(new ArrayList()) + .build(); + client.createRollupProperty(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10332,13 +10400,21 @@ public void createAdSenseLinkExceptionTest2() throws Exception { } @Test - public void deleteAdSenseLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getRollupPropertySourceLinkTest() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) + .setSourceProperty("sourceProperty1938317072") + .build(); mockService.addResponse(expectedResponse); - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); - client.deleteAdSenseLink(name); + RollupPropertySourceLink actualResponse = client.getRollupPropertySourceLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10356,15 +10432,16 @@ public void deleteAdSenseLinkTest() throws Exception { } @Test - public void deleteAdSenseLinkExceptionTest() throws Exception { + public void getRollupPropertySourceLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - client.deleteAdSenseLink(name); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + client.getRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10372,13 +10449,21 @@ public void deleteAdSenseLinkExceptionTest() throws Exception { } @Test - public void deleteAdSenseLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getRollupPropertySourceLinkTest2() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) + .setSourceProperty("sourceProperty1938317072") + .build(); mockService.addResponse(expectedResponse); - String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; + String name = + "properties/propertie-3766/rollupPropertySourceLinks/rollupPropertySourceLink-3766"; - client.deleteAdSenseLink(name); + RollupPropertySourceLink actualResponse = client.getRollupPropertySourceLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10396,15 +10481,16 @@ public void deleteAdSenseLinkTest2() throws Exception { } @Test - public void deleteAdSenseLinkExceptionTest2() throws Exception { + public void getRollupPropertySourceLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = "properties/propertie-9633/adSenseLinks/adSenseLink-9633"; - client.deleteAdSenseLink(name); + String name = + "properties/propertie-3766/rollupPropertySourceLinks/rollupPropertySourceLink-3766"; + client.getRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10412,23 +10498,25 @@ public void deleteAdSenseLinkExceptionTest2() throws Exception { } @Test - public void listAdSenseLinksTest() throws Exception { - AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); - ListAdSenseLinksResponse expectedResponse = - ListAdSenseLinksResponse.newBuilder() + public void listRollupPropertySourceLinksTest() throws Exception { + RollupPropertySourceLink responsesElement = RollupPropertySourceLink.newBuilder().build(); + ListRollupPropertySourceLinksResponse expectedResponse = + ListRollupPropertySourceLinksResponse.newBuilder() .setNextPageToken("") - .addAllAdsenseLinks(Arrays.asList(responsesElement)) + .addAllRollupPropertySourceLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + ListRollupPropertySourceLinksPagedResponse pagedListResponse = + client.listRollupPropertySourceLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); + Assert.assertEquals( + expectedResponse.getRollupPropertySourceLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10446,7 +10534,7 @@ public void listAdSenseLinksTest() throws Exception { } @Test - public void listAdSenseLinksExceptionTest() throws Exception { + public void listRollupPropertySourceLinksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -10454,7 +10542,7 @@ public void listAdSenseLinksExceptionTest() throws Exception { try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listAdSenseLinks(parent); + client.listRollupPropertySourceLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10462,23 +10550,25 @@ public void listAdSenseLinksExceptionTest() throws Exception { } @Test - public void listAdSenseLinksTest2() throws Exception { - AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); - ListAdSenseLinksResponse expectedResponse = - ListAdSenseLinksResponse.newBuilder() + public void listRollupPropertySourceLinksTest2() throws Exception { + RollupPropertySourceLink responsesElement = RollupPropertySourceLink.newBuilder().build(); + ListRollupPropertySourceLinksResponse expectedResponse = + ListRollupPropertySourceLinksResponse.newBuilder() .setNextPageToken("") - .addAllAdsenseLinks(Arrays.asList(responsesElement)) + .addAllRollupPropertySourceLinks(Arrays.asList(responsesElement)) .build(); mockService.addResponse(expectedResponse); String parent = "properties/propertie-2024"; - ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + ListRollupPropertySourceLinksPagedResponse pagedListResponse = + client.listRollupPropertySourceLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); + Assert.assertEquals( + expectedResponse.getRollupPropertySourceLinksList().get(0), resources.get(0)); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10496,7 +10586,7 @@ public void listAdSenseLinksTest2() throws Exception { } @Test - public void listAdSenseLinksExceptionTest2() throws Exception { + public void listRollupPropertySourceLinksExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); @@ -10504,7 +10594,7 @@ public void listAdSenseLinksExceptionTest2() throws Exception { try { String parent = "properties/propertie-2024"; - client.listAdSenseLinks(parent); + client.listRollupPropertySourceLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10512,23 +10602,22 @@ public void listAdSenseLinksExceptionTest2() throws Exception { } @Test - public void getEventCreateRuleTest() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() + public void createRollupPropertySourceLinkTest() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) + .setSourceProperty("sourceProperty1938317072") .build(); mockService.addResponse(expectedResponse); - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); - EventCreateRule actualResponse = client.getEventCreateRule(name); + RollupPropertySourceLink actualResponse = + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -10547,16 +10636,17 @@ public void getEventCreateRuleTest() throws Exception { } @Test - public void getEventCreateRuleExceptionTest() throws Exception { + public void createRollupPropertySourceLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - client.getEventCreateRule(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10564,23 +10654,22 @@ public void getEventCreateRuleExceptionTest() throws Exception { } @Test - public void getEventCreateRuleTest2() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() + public void createRollupPropertySourceLinkTest2() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) + .setSourceProperty("sourceProperty1938317072") .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; + String parent = "properties/propertie-2024"; + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); - EventCreateRule actualResponse = client.getEventCreateRule(name); + RollupPropertySourceLink actualResponse = + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -10599,16 +10688,17 @@ public void getEventCreateRuleTest2() throws Exception { } @Test - public void getEventCreateRuleExceptionTest2() throws Exception { + public void createRollupPropertySourceLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; - client.getEventCreateRule(name); + String parent = "properties/propertie-2024"; + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10616,23 +10706,14 @@ public void getEventCreateRuleExceptionTest2() throws Exception { } @Test - public void listEventCreateRulesTest() throws Exception { - EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); - ListEventCreateRulesResponse expectedResponse = - ListEventCreateRulesResponse.newBuilder() - .setNextPageToken("") - .addAllEventCreateRules(Arrays.asList(responsesElement)) - .build(); + public void deleteRollupPropertySourceLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - - ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); + client.deleteRollupPropertySourceLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10650,15 +10731,16 @@ public void listEventCreateRulesTest() throws Exception { } @Test - public void listEventCreateRulesExceptionTest() throws Exception { + public void deleteRollupPropertySourceLinkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.listEventCreateRules(parent); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + client.deleteRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10666,23 +10748,14 @@ public void listEventCreateRulesExceptionTest() throws Exception { } @Test - public void listEventCreateRulesTest2() throws Exception { - EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); - ListEventCreateRulesResponse expectedResponse = - ListEventCreateRulesResponse.newBuilder() - .setNextPageToken("") - .addAllEventCreateRules(Arrays.asList(responsesElement)) - .build(); + public void deleteRollupPropertySourceLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - - ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = + "properties/propertie-3766/rollupPropertySourceLinks/rollupPropertySourceLink-3766"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); + client.deleteRollupPropertySourceLink(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10700,15 +10773,16 @@ public void listEventCreateRulesTest2() throws Exception { } @Test - public void listEventCreateRulesExceptionTest2() throws Exception { + public void deleteRollupPropertySourceLinkExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - client.listEventCreateRules(parent); + String name = + "properties/propertie-3766/rollupPropertySourceLinks/rollupPropertySourceLink-3766"; + client.deleteRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10716,23 +10790,22 @@ public void listEventCreateRulesExceptionTest2() throws Exception { } @Test - public void createEventCreateRuleTest() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) + public void createSubpropertyTest() throws Exception { + CreateSubpropertyResponse expectedResponse = + CreateSubpropertyResponse.newBuilder() + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + CreateSubpropertyRequest request = + CreateSubpropertyRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); - EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); + CreateSubpropertyResponse actualResponse = client.createSubproperty(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -10751,16 +10824,20 @@ public void createEventCreateRuleTest() throws Exception { } @Test - public void createEventCreateRuleExceptionTest() throws Exception { + public void createSubpropertyExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - client.createEventCreateRule(parent, eventCreateRule); + CreateSubpropertyRequest request = + CreateSubpropertyRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); + client.createSubproperty(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10768,24 +10845,14 @@ public void createEventCreateRuleExceptionTest() throws Exception { } @Test - public void createEventCreateRuleTest2() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) - .build(); + public void deleteSubpropertyEventFilterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + SubpropertyEventFilterName name = + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]"); - EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSubpropertyEventFilter(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10803,16 +10870,16 @@ public void createEventCreateRuleTest2() throws Exception { } @Test - public void createEventCreateRuleExceptionTest2() throws Exception { + public void deleteSubpropertyEventFilterExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String parent = "properties/propertie-9651/dataStreams/dataStream-9651"; - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - client.createEventCreateRule(parent, eventCreateRule); + SubpropertyEventFilterName name = + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]"); + client.deleteSubpropertyEventFilter(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10820,33 +10887,13 @@ public void createEventCreateRuleExceptionTest2() throws Exception { } @Test - public void updateEventCreateRuleTest() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) - .build(); + public void deleteSubpropertyEventFilterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockService.addResponse(expectedResponse); - EventCreateRule eventCreateRule = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = "properties/propertie-6725/subpropertyEventFilters/subpropertyEventFilter-6725"; - EventCreateRule actualResponse = client.updateEventCreateRule(eventCreateRule, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSubpropertyEventFilter(name); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10864,25 +10911,15 @@ public void updateEventCreateRuleTest() throws Exception { } @Test - public void updateEventCreateRuleExceptionTest() throws Exception { + public void deleteSubpropertyEventFilterExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - EventCreateRule eventCreateRule = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEventCreateRule(eventCreateRule, updateMask); + String name = "properties/propertie-6725/subpropertyEventFilters/subpropertyEventFilter-6725"; + client.deleteSubpropertyEventFilter(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10890,14 +10927,23 @@ public void updateEventCreateRuleExceptionTest() throws Exception { } @Test - public void deleteEventCreateRuleTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createSubpropertyEventFilterTest() throws Exception { + SubpropertyEventFilter expectedResponse = + SubpropertyEventFilter.newBuilder() + .setName( + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + .toString()) + .setApplyToProperty("applyToProperty267785086") + .addAllFilterClauses(new ArrayList()) + .build(); mockService.addResponse(expectedResponse); - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); - client.deleteEventCreateRule(name); + SubpropertyEventFilter actualResponse = + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10915,16 +10961,16 @@ public void deleteEventCreateRuleTest() throws Exception { } @Test - public void deleteEventCreateRuleExceptionTest() throws Exception { + public void createSubpropertyEventFilterExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - client.deleteEventCreateRule(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -10932,14 +10978,23 @@ public void deleteEventCreateRuleExceptionTest() throws Exception { } @Test - public void deleteEventCreateRuleTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createSubpropertyEventFilterTest2() throws Exception { + SubpropertyEventFilter expectedResponse = + SubpropertyEventFilter.newBuilder() + .setName( + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + .toString()) + .setApplyToProperty("applyToProperty267785086") + .addAllFilterClauses(new ArrayList()) + .build(); mockService.addResponse(expectedResponse); - String name = - "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; + String parent = "properties/propertie-2024"; + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); - client.deleteEventCreateRule(name); + SubpropertyEventFilter actualResponse = + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); Assert.assertEquals(1, actualRequests.size()); @@ -10957,16 +11012,16 @@ public void deleteEventCreateRuleTest2() throws Exception { } @Test - public void deleteEventCreateRuleExceptionTest2() throws Exception { + public void createSubpropertyEventFilterExceptionTest2() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { - String name = - "properties/propertie-8819/dataStreams/dataStream-8819/eventCreateRules/eventCreateRule-8819"; - client.deleteEventCreateRule(name); + String parent = "properties/propertie-2024"; + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. diff --git a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java index 3629c686be81..a0ac148b36a6 100644 --- a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java +++ b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java @@ -16,7 +16,6 @@ package com.google.analytics.admin.v1alpha; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccessBindingsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; @@ -36,9 +35,9 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListMeasurementProtocolSecretsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListPropertiesPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListRollupPropertySourceLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSKAdNetworkConversionValueSchemasPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListSearchAds360LinksPagedResponse; -import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListUserLinksPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.SearchChangeHistoryEventsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -828,25 +827,27 @@ public void updatePropertyExceptionTest() throws Exception { } @Test - public void getUserLinkTest() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createFirebaseLinkTest() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - UserLink actualResponse = client.getUserLink(name); + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetUserLinkRequest actualRequest = ((GetUserLinkRequest) actualRequests.get(0)); + CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -854,13 +855,14 @@ public void getUserLinkTest() throws Exception { } @Test - public void getUserLinkExceptionTest() throws Exception { + public void createFirebaseLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - client.getUserLink(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -868,25 +870,27 @@ public void getUserLinkExceptionTest() throws Exception { } @Test - public void getUserLinkTest2() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createFirebaseLinkTest2() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - UserLink actualResponse = client.getUserLink(name); + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetUserLinkRequest actualRequest = ((GetUserLinkRequest) actualRequests.get(0)); + CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -894,13 +898,14 @@ public void getUserLinkTest2() throws Exception { } @Test - public void getUserLinkExceptionTest2() throws Exception { + public void createFirebaseLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getUserLink(name); + String parent = "parent-995424086"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -908,26 +913,19 @@ public void getUserLinkExceptionTest2() throws Exception { } @Test - public void batchGetUserLinksTest() throws Exception { - BatchGetUserLinksResponse expectedResponse = - BatchGetUserLinksResponse.newBuilder().addAllUserLinks(new ArrayList()).build(); + public void deleteFirebaseLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BatchGetUserLinksRequest request = - BatchGetUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); - BatchGetUserLinksResponse actualResponse = client.batchGetUserLinks(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteFirebaseLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchGetUserLinksRequest actualRequest = ((BatchGetUserLinksRequest) actualRequests.get(0)); + DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getNamesList(), actualRequest.getNamesList()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -935,17 +933,13 @@ public void batchGetUserLinksTest() throws Exception { } @Test - public void batchGetUserLinksExceptionTest() throws Exception { + public void deleteFirebaseLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BatchGetUserLinksRequest request = - BatchGetUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); - client.batchGetUserLinks(request); + FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + client.deleteFirebaseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -953,29 +947,19 @@ public void batchGetUserLinksExceptionTest() throws Exception { } @Test - public void listUserLinksTest() throws Exception { - UserLink responsesElement = UserLink.newBuilder().build(); - ListUserLinksResponse expectedResponse = - ListUserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) - .build(); + public void deleteFirebaseLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - - ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + client.deleteFirebaseLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListUserLinksRequest actualRequest = ((ListUserLinksRequest) actualRequests.get(0)); + DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -983,13 +967,13 @@ public void listUserLinksTest() throws Exception { } @Test - public void listUserLinksExceptionTest() throws Exception { + public void deleteFirebaseLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - client.listUserLinks(parent); + String name = "name3373707"; + client.deleteFirebaseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -997,27 +981,27 @@ public void listUserLinksExceptionTest() throws Exception { } @Test - public void listUserLinksTest2() throws Exception { - UserLink responsesElement = UserLink.newBuilder().build(); - ListUserLinksResponse expectedResponse = - ListUserLinksResponse.newBuilder() + public void listFirebaseLinksTest() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) + .addAllFirebaseLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListUserLinksRequest actualRequest = ((ListUserLinksRequest) actualRequests.get(0)); + ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -1027,13 +1011,13 @@ public void listUserLinksTest2() throws Exception { } @Test - public void listUserLinksExceptionTest2() throws Exception { + public void listFirebaseLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listUserLinks(parent); + client.listFirebaseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1041,27 +1025,27 @@ public void listUserLinksExceptionTest2() throws Exception { } @Test - public void listUserLinksTest3() throws Exception { - UserLink responsesElement = UserLink.newBuilder().build(); - ListUserLinksResponse expectedResponse = - ListUserLinksResponse.newBuilder() + public void listFirebaseLinksTest2() throws Exception { + FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) + .addAllFirebaseLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); + ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListUserLinksRequest actualRequest = ((ListUserLinksRequest) actualRequests.get(0)); + ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -1071,13 +1055,13 @@ public void listUserLinksTest3() throws Exception { } @Test - public void listUserLinksExceptionTest3() throws Exception { + public void listFirebaseLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - client.listUserLinks(parent); + client.listFirebaseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1085,36 +1069,24 @@ public void listUserLinksExceptionTest3() throws Exception { } @Test - public void auditUserLinksTest() throws Exception { - AuditUserLink responsesElement = AuditUserLink.newBuilder().build(); - AuditUserLinksResponse expectedResponse = - AuditUserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllUserLinks(Arrays.asList(responsesElement)) + public void getGlobalSiteTagTest() throws Exception { + GlobalSiteTag expectedResponse = + GlobalSiteTag.newBuilder() + .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setSnippet("snippet-2061635299") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - AuditUserLinksPagedResponse pagedListResponse = client.auditUserLinks(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); + GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - AuditUserLinksRequest actualRequest = ((AuditUserLinksRequest) actualRequests.get(0)); + GetGlobalSiteTagRequest actualRequest = ((GetGlobalSiteTagRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1122,18 +1094,13 @@ public void auditUserLinksTest() throws Exception { } @Test - public void auditUserLinksExceptionTest() throws Exception { + public void getGlobalSiteTagExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.auditUserLinks(request); + GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getGlobalSiteTag(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1141,27 +1108,24 @@ public void auditUserLinksExceptionTest() throws Exception { } @Test - public void createUserLinkTest() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void getGlobalSiteTagTest2() throws Exception { + GlobalSiteTag expectedResponse = + GlobalSiteTag.newBuilder() + .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setSnippet("snippet-2061635299") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - UserLink userLink = UserLink.newBuilder().build(); + String name = "name3373707"; - UserLink actualResponse = client.createUserLink(parent, userLink); + GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateUserLinkRequest actualRequest = ((CreateUserLinkRequest) actualRequests.get(0)); + GetGlobalSiteTagRequest actualRequest = ((GetGlobalSiteTagRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(userLink, actualRequest.getUserLink()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1169,14 +1133,13 @@ public void createUserLinkTest() throws Exception { } @Test - public void createUserLinkExceptionTest() throws Exception { + public void getGlobalSiteTagExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - UserLink userLink = UserLink.newBuilder().build(); - client.createUserLink(parent, userLink); + String name = "name3373707"; + client.getGlobalSiteTag(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1184,27 +1147,31 @@ public void createUserLinkExceptionTest() throws Exception { } @Test - public void createUserLinkTest2() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - UserLink userLink = UserLink.newBuilder().build(); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - UserLink actualResponse = client.createUserLink(parent, userLink); + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateUserLinkRequest actualRequest = ((CreateUserLinkRequest) actualRequests.get(0)); + CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(userLink, actualRequest.getUserLink()); + Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1212,14 +1179,14 @@ public void createUserLinkTest2() throws Exception { } @Test - public void createUserLinkExceptionTest2() throws Exception { + public void createGoogleAdsLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - UserLink userLink = UserLink.newBuilder().build(); - client.createUserLink(parent, userLink); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1227,27 +1194,31 @@ public void createUserLinkExceptionTest2() throws Exception { } @Test - public void createUserLinkTest3() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) + public void createGoogleAdsLinkTest2() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - UserLink userLink = UserLink.newBuilder().build(); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - UserLink actualResponse = client.createUserLink(parent, userLink); + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateUserLinkRequest actualRequest = ((CreateUserLinkRequest) actualRequests.get(0)); + CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(userLink, actualRequest.getUserLink()); + Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1255,14 +1226,14 @@ public void createUserLinkTest3() throws Exception { } @Test - public void createUserLinkExceptionTest3() throws Exception { + public void createGoogleAdsLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - UserLink userLink = UserLink.newBuilder().build(); - client.createUserLink(parent, userLink); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1270,31 +1241,31 @@ public void createUserLinkExceptionTest3() throws Exception { } @Test - public void batchCreateUserLinksTest() throws Exception { - BatchCreateUserLinksResponse expectedResponse = - BatchCreateUserLinksResponse.newBuilder() - .addAllUserLinks(new ArrayList()) + public void updateGoogleAdsLinkTest() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCreatorEmailAddress("creatorEmailAddress67752708") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUsers(true) - .addAllRequests(new ArrayList()) - .build(); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - BatchCreateUserLinksResponse actualResponse = client.batchCreateUserLinks(request); + GoogleAdsLink actualResponse = client.updateGoogleAdsLink(googleAdsLink, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchCreateUserLinksRequest actualRequest = - ((BatchCreateUserLinksRequest) actualRequests.get(0)); + UpdateGoogleAdsLinkRequest actualRequest = ((UpdateGoogleAdsLinkRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getNotifyNewUsers(), actualRequest.getNotifyNewUsers()); - Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1302,18 +1273,14 @@ public void batchCreateUserLinksTest() throws Exception { } @Test - public void batchCreateUserLinksExceptionTest() throws Exception { + public void updateGoogleAdsLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUsers(true) - .addAllRequests(new ArrayList()) - .build(); - client.batchCreateUserLinks(request); + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGoogleAdsLink(googleAdsLink, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1321,25 +1288,19 @@ public void batchCreateUserLinksExceptionTest() throws Exception { } @Test - public void updateUserLinkTest() throws Exception { - UserLink expectedResponse = - UserLink.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .setEmailAddress("emailAddress-1070931784") - .addAllDirectRoles(new ArrayList()) - .build(); + public void deleteGoogleAdsLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - UserLink userLink = UserLink.newBuilder().build(); + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); - UserLink actualResponse = client.updateUserLink(userLink); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteGoogleAdsLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateUserLinkRequest actualRequest = ((UpdateUserLinkRequest) actualRequests.get(0)); + DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); - Assert.assertEquals(userLink, actualRequest.getUserLink()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1347,13 +1308,13 @@ public void updateUserLinkTest() throws Exception { } @Test - public void updateUserLinkExceptionTest() throws Exception { + public void deleteGoogleAdsLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - UserLink userLink = UserLink.newBuilder().build(); - client.updateUserLink(userLink); + GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + client.deleteGoogleAdsLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1361,29 +1322,19 @@ public void updateUserLinkExceptionTest() throws Exception { } @Test - public void batchUpdateUserLinksTest() throws Exception { - BatchUpdateUserLinksResponse expectedResponse = - BatchUpdateUserLinksResponse.newBuilder() - .addAllUserLinks(new ArrayList()) - .build(); + public void deleteGoogleAdsLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BatchUpdateUserLinksRequest request = - BatchUpdateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + String name = "name3373707"; - BatchUpdateUserLinksResponse actualResponse = client.batchUpdateUserLinks(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteGoogleAdsLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchUpdateUserLinksRequest actualRequest = - ((BatchUpdateUserLinksRequest) actualRequests.get(0)); + DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1391,17 +1342,13 @@ public void batchUpdateUserLinksTest() throws Exception { } @Test - public void batchUpdateUserLinksExceptionTest() throws Exception { + public void deleteGoogleAdsLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BatchUpdateUserLinksRequest request = - BatchUpdateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchUpdateUserLinks(request); + String name = "name3373707"; + client.deleteGoogleAdsLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1409,19 +1356,29 @@ public void batchUpdateUserLinksExceptionTest() throws Exception { } @Test - public void deleteUserLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listGoogleAdsLinksTest() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - client.deleteUserLink(name); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteUserLinkRequest actualRequest = ((DeleteUserLinkRequest) actualRequests.get(0)); + ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1429,13 +1386,13 @@ public void deleteUserLinkTest() throws Exception { } @Test - public void deleteUserLinkExceptionTest() throws Exception { + public void listGoogleAdsLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - client.deleteUserLink(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listGoogleAdsLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1443,59 +1400,29 @@ public void deleteUserLinkExceptionTest() throws Exception { } @Test - public void deleteUserLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listGoogleAdsLinksTest2() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; - client.deleteUserLink(name); + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); - List actualRequests = mockAnalyticsAdminService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteUserLinkRequest actualRequest = ((DeleteUserLinkRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteUserLinkExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsAdminService.addException(exception); - - try { - String name = "name3373707"; - client.deleteUserLink(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchDeleteUserLinksTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAnalyticsAdminService.addResponse(expectedResponse); - - BatchDeleteUserLinksRequest request = - BatchDeleteUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - client.batchDeleteUserLinks(request); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchDeleteUserLinksRequest actualRequest = - ((BatchDeleteUserLinksRequest) actualRequests.get(0)); + ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1503,17 +1430,13 @@ public void batchDeleteUserLinksTest() throws Exception { } @Test - public void batchDeleteUserLinksExceptionTest() throws Exception { + public void listGoogleAdsLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BatchDeleteUserLinksRequest request = - BatchDeleteUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchDeleteUserLinks(request); + String parent = "parent-995424086"; + client.listGoogleAdsLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1521,27 +1444,29 @@ public void batchDeleteUserLinksExceptionTest() throws Exception { } @Test - public void createFirebaseLinkTest() throws Exception { - FirebaseLink expectedResponse = - FirebaseLink.newBuilder() - .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) + public void getDataSharingSettingsTest() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); - FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + DataSharingSettings actualResponse = client.getDataSharingSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); + GetDataSharingSettingsRequest actualRequest = + ((GetDataSharingSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1549,14 +1474,13 @@ public void createFirebaseLinkTest() throws Exception { } @Test - public void createFirebaseLinkExceptionTest() throws Exception { + public void getDataSharingSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - client.createFirebaseLink(parent, firebaseLink); + DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + client.getDataSharingSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1564,27 +1488,29 @@ public void createFirebaseLinkExceptionTest() throws Exception { } @Test - public void createFirebaseLinkTest2() throws Exception { - FirebaseLink expectedResponse = - FirebaseLink.newBuilder() - .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) + public void getDataSharingSettingsTest2() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + String name = "name3373707"; - FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + DataSharingSettings actualResponse = client.getDataSharingSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); + GetDataSharingSettingsRequest actualRequest = + ((GetDataSharingSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1592,14 +1518,13 @@ public void createFirebaseLinkTest2() throws Exception { } @Test - public void createFirebaseLinkExceptionTest2() throws Exception { + public void getDataSharingSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); - client.createFirebaseLink(parent, firebaseLink); + String name = "name3373707"; + client.getDataSharingSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1607,17 +1532,29 @@ public void createFirebaseLinkExceptionTest2() throws Exception { } @Test - public void deleteFirebaseLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - client.deleteFirebaseLink(name); + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); + GetMeasurementProtocolSecretRequest actualRequest = + ((GetMeasurementProtocolSecretRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -1627,13 +1564,15 @@ public void deleteFirebaseLinkTest() throws Exception { } @Test - public void deleteFirebaseLinkExceptionTest() throws Exception { + public void getMeasurementProtocolSecretExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); - client.deleteFirebaseLink(name); + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.getMeasurementProtocolSecret(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1641,17 +1580,27 @@ public void deleteFirebaseLinkExceptionTest() throws Exception { } @Test - public void deleteFirebaseLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - client.deleteFirebaseLink(name); + MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); + GetMeasurementProtocolSecretRequest actualRequest = + ((GetMeasurementProtocolSecretRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -1661,13 +1610,13 @@ public void deleteFirebaseLinkTest2() throws Exception { } @Test - public void deleteFirebaseLinkExceptionTest2() throws Exception { + public void getMeasurementProtocolSecretExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.deleteFirebaseLink(name); + client.getMeasurementProtocolSecret(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1675,27 +1624,30 @@ public void deleteFirebaseLinkExceptionTest2() throws Exception { } @Test - public void listFirebaseLinksTest() throws Exception { - FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); - ListFirebaseLinksResponse expectedResponse = - ListFirebaseLinksResponse.newBuilder() + public void listMeasurementProtocolSecretsTest() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() .setNextPageToken("") - .addAllFirebaseLinks(Arrays.asList(responsesElement)) + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); + ListMeasurementProtocolSecretsRequest actualRequest = + ((ListMeasurementProtocolSecretsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -1705,13 +1657,13 @@ public void listFirebaseLinksTest() throws Exception { } @Test - public void listFirebaseLinksExceptionTest() throws Exception { + public void listMeasurementProtocolSecretsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listFirebaseLinks(parent); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.listMeasurementProtocolSecrets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1719,27 +1671,30 @@ public void listFirebaseLinksExceptionTest() throws Exception { } @Test - public void listFirebaseLinksTest2() throws Exception { - FirebaseLink responsesElement = FirebaseLink.newBuilder().build(); - ListFirebaseLinksResponse expectedResponse = - ListFirebaseLinksResponse.newBuilder() + public void listMeasurementProtocolSecretsTest2() throws Exception { + MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); + ListMeasurementProtocolSecretsResponse expectedResponse = + ListMeasurementProtocolSecretsResponse.newBuilder() .setNextPageToken("") - .addAllFirebaseLinks(Arrays.asList(responsesElement)) + .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - ListFirebaseLinksPagedResponse pagedListResponse = client.listFirebaseLinks(parent); + ListMeasurementProtocolSecretsPagedResponse pagedListResponse = + client.listMeasurementProtocolSecrets(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getFirebaseLinksList().get(0), resources.get(0)); + Assert.assertEquals( + expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); + ListMeasurementProtocolSecretsRequest actualRequest = + ((ListMeasurementProtocolSecretsRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -1749,13 +1704,13 @@ public void listFirebaseLinksTest2() throws Exception { } @Test - public void listFirebaseLinksExceptionTest2() throws Exception { + public void listMeasurementProtocolSecretsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - client.listFirebaseLinks(parent); + client.listMeasurementProtocolSecrets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1763,24 +1718,33 @@ public void listFirebaseLinksExceptionTest2() throws Exception { } @Test - public void getGlobalSiteTagTest() throws Exception { - GlobalSiteTag expectedResponse = - GlobalSiteTag.newBuilder() - .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setSnippet("snippet-2061635299") + public void createMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); - GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetGlobalSiteTagRequest actualRequest = ((GetGlobalSiteTagRequest) actualRequests.get(0)); + CreateMeasurementProtocolSecretRequest actualRequest = + ((CreateMeasurementProtocolSecretRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1788,13 +1752,15 @@ public void getGlobalSiteTagTest() throws Exception { } @Test - public void getGlobalSiteTagExceptionTest() throws Exception { + public void createMeasurementProtocolSecretExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]"); - client.getGlobalSiteTag(name); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1802,24 +1768,33 @@ public void getGlobalSiteTagExceptionTest() throws Exception { } @Test - public void getGlobalSiteTagTest2() throws Exception { - GlobalSiteTag expectedResponse = - GlobalSiteTag.newBuilder() - .setName(GlobalSiteTagName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setSnippet("snippet-2061635299") - .build(); - mockAnalyticsAdminService.addResponse(expectedResponse); - - String name = "name3373707"; + public void createMeasurementProtocolSecretTest2() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); - GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); + String parent = "parent-995424086"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + + MeasurementProtocolSecret actualResponse = + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetGlobalSiteTagRequest actualRequest = ((GetGlobalSiteTagRequest) actualRequests.get(0)); + CreateMeasurementProtocolSecretRequest actualRequest = + ((CreateMeasurementProtocolSecretRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1827,13 +1802,15 @@ public void getGlobalSiteTagTest2() throws Exception { } @Test - public void getGlobalSiteTagExceptionTest2() throws Exception { + public void createMeasurementProtocolSecretExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getGlobalSiteTag(name); + String parent = "parent-995424086"; + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); + client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1841,31 +1818,22 @@ public void getGlobalSiteTagExceptionTest2() throws Exception { } @Test - public void createGoogleAdsLinkTest() throws Exception { - GoogleAdsLink expectedResponse = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") - .build(); + public void deleteMeasurementProtocolSecretTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteMeasurementProtocolSecret(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); + DeleteMeasurementProtocolSecretRequest actualRequest = + ((DeleteMeasurementProtocolSecretRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1873,14 +1841,15 @@ public void createGoogleAdsLinkTest() throws Exception { } @Test - public void createGoogleAdsLinkExceptionTest() throws Exception { + public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - client.createGoogleAdsLink(parent, googleAdsLink); + MeasurementProtocolSecretName name = + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + client.deleteMeasurementProtocolSecret(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1888,31 +1857,20 @@ public void createGoogleAdsLinkExceptionTest() throws Exception { } @Test - public void createGoogleAdsLinkTest2() throws Exception { - GoogleAdsLink expectedResponse = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") - .build(); + public void deleteMeasurementProtocolSecretTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + String name = "name3373707"; - GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteMeasurementProtocolSecret(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); + DeleteMeasurementProtocolSecretRequest actualRequest = + ((DeleteMeasurementProtocolSecretRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1920,14 +1878,13 @@ public void createGoogleAdsLinkTest2() throws Exception { } @Test - public void createGoogleAdsLinkExceptionTest2() throws Exception { + public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - client.createGoogleAdsLink(parent, googleAdsLink); + String name = "name3373707"; + client.deleteMeasurementProtocolSecret(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1935,30 +1892,32 @@ public void createGoogleAdsLinkExceptionTest2() throws Exception { } @Test - public void updateGoogleAdsLinkTest() throws Exception { - GoogleAdsLink expectedResponse = - GoogleAdsLink.newBuilder() - .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) - .setCustomerId("customerId-1581184615") - .setCanManageClients(true) - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setCreatorEmailAddress("creatorEmailAddress67752708") + public void updateMeasurementProtocolSecretTest() throws Exception { + MeasurementProtocolSecret expectedResponse = + MeasurementProtocolSecret.newBuilder() + .setName( + MeasurementProtocolSecretName.of( + "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + .toString()) + .setDisplayName("displayName1714148973") + .setSecretValue("secretValue-2044460895") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - GoogleAdsLink actualResponse = client.updateGoogleAdsLink(googleAdsLink, updateMask); + MeasurementProtocolSecret actualResponse = + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateGoogleAdsLinkRequest actualRequest = ((UpdateGoogleAdsLinkRequest) actualRequests.get(0)); + UpdateMeasurementProtocolSecretRequest actualRequest = + ((UpdateMeasurementProtocolSecretRequest) actualRequests.get(0)); - Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -1967,14 +1926,15 @@ public void updateGoogleAdsLinkTest() throws Exception { } @Test - public void updateGoogleAdsLinkExceptionTest() throws Exception { + public void updateMeasurementProtocolSecretExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + MeasurementProtocolSecret measurementProtocolSecret = + MeasurementProtocolSecret.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateGoogleAdsLink(googleAdsLink, updateMask); + client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -1982,19 +1942,28 @@ public void updateGoogleAdsLinkExceptionTest() throws Exception { } @Test - public void deleteGoogleAdsLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void acknowledgeUserDataCollectionTest() throws Exception { + AcknowledgeUserDataCollectionResponse expectedResponse = + AcknowledgeUserDataCollectionResponse.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") + .build(); - client.deleteGoogleAdsLink(name); + AcknowledgeUserDataCollectionResponse actualResponse = + client.acknowledgeUserDataCollection(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); + AcknowledgeUserDataCollectionRequest actualRequest = + ((AcknowledgeUserDataCollectionRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getAcknowledgement(), actualRequest.getAcknowledgement()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2002,13 +1971,17 @@ public void deleteGoogleAdsLinkTest() throws Exception { } @Test - public void deleteGoogleAdsLinkExceptionTest() throws Exception { + public void acknowledgeUserDataCollectionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); - client.deleteGoogleAdsLink(name); + AcknowledgeUserDataCollectionRequest request = + AcknowledgeUserDataCollectionRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .setAcknowledgement("acknowledgement1769490938") + .build(); + client.acknowledgeUserDataCollection(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2016,19 +1989,34 @@ public void deleteGoogleAdsLinkExceptionTest() throws Exception { } @Test - public void deleteGoogleAdsLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getSKAdNetworkConversionValueSchemaTest() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - client.deleteGoogleAdsLink(name); + SKAdNetworkConversionValueSchema actualResponse = + client.getSKAdNetworkConversionValueSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); + GetSKAdNetworkConversionValueSchemaRequest actualRequest = + ((GetSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2036,13 +2024,15 @@ public void deleteGoogleAdsLinkTest2() throws Exception { } @Test - public void deleteGoogleAdsLinkExceptionTest2() throws Exception { + public void getSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteGoogleAdsLink(name); + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + client.getSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2050,29 +2040,32 @@ public void deleteGoogleAdsLinkExceptionTest2() throws Exception { } @Test - public void listGoogleAdsLinksTest() throws Exception { - GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); - ListGoogleAdsLinksResponse expectedResponse = - ListGoogleAdsLinksResponse.newBuilder() - .setNextPageToken("") - .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + public void getSKAdNetworkConversionValueSchemaTest2() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); + SKAdNetworkConversionValueSchema actualResponse = + client.getSKAdNetworkConversionValueSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); + GetSKAdNetworkConversionValueSchemaRequest actualRequest = + ((GetSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2080,13 +2073,13 @@ public void listGoogleAdsLinksTest() throws Exception { } @Test - public void listGoogleAdsLinksExceptionTest() throws Exception { + public void getSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listGoogleAdsLinks(parent); + String name = "name3373707"; + client.getSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2094,29 +2087,36 @@ public void listGoogleAdsLinksExceptionTest() throws Exception { } @Test - public void listGoogleAdsLinksTest2() throws Exception { - GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); - ListGoogleAdsLinksResponse expectedResponse = - ListGoogleAdsLinksResponse.newBuilder() - .setNextPageToken("") - .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) - .build(); - mockAnalyticsAdminService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + public void createSKAdNetworkConversionValueSchemaTest() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); + + SKAdNetworkConversionValueSchema actualResponse = + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); + CreateSKAdNetworkConversionValueSchemaRequest actualRequest = + ((CreateSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + skadnetworkConversionValueSchema, actualRequest.getSkadnetworkConversionValueSchema()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2124,13 +2124,15 @@ public void listGoogleAdsLinksTest2() throws Exception { } @Test - public void listGoogleAdsLinksExceptionTest2() throws Exception { + public void createSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listGoogleAdsLinks(parent); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2138,29 +2140,36 @@ public void listGoogleAdsLinksExceptionTest2() throws Exception { } @Test - public void getDataSharingSettingsTest() throws Exception { - DataSharingSettings expectedResponse = - DataSharingSettings.newBuilder() - .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) - .setSharingWithGoogleSupportEnabled(true) - .setSharingWithGoogleAssignedSalesEnabled(true) - .setSharingWithGoogleAnySalesEnabled(true) - .setSharingWithGoogleProductsEnabled(true) - .setSharingWithOthersEnabled(true) + public void createSKAdNetworkConversionValueSchemaTest2() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() + .setName( + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") + .toString()) + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + String parent = "parent-995424086"; + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); - DataSharingSettings actualResponse = client.getDataSharingSettings(name); + SKAdNetworkConversionValueSchema actualResponse = + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDataSharingSettingsRequest actualRequest = - ((GetDataSharingSettingsRequest) actualRequests.get(0)); + CreateSKAdNetworkConversionValueSchemaRequest actualRequest = + ((CreateSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + skadnetworkConversionValueSchema, actualRequest.getSkadnetworkConversionValueSchema()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2168,13 +2177,15 @@ public void getDataSharingSettingsTest() throws Exception { } @Test - public void getDataSharingSettingsExceptionTest() throws Exception { + public void createSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); - client.getDataSharingSettings(name); + String parent = "parent-995424086"; + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); + client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2182,29 +2193,22 @@ public void getDataSharingSettingsExceptionTest() throws Exception { } @Test - public void getDataSharingSettingsTest2() throws Exception { - DataSharingSettings expectedResponse = - DataSharingSettings.newBuilder() - .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) - .setSharingWithGoogleSupportEnabled(true) - .setSharingWithGoogleAssignedSalesEnabled(true) - .setSharingWithGoogleAnySalesEnabled(true) - .setSharingWithGoogleProductsEnabled(true) - .setSharingWithOthersEnabled(true) - .build(); + public void deleteSKAdNetworkConversionValueSchemaTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - DataSharingSettings actualResponse = client.getDataSharingSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSKAdNetworkConversionValueSchema(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDataSharingSettingsRequest actualRequest = - ((GetDataSharingSettingsRequest) actualRequests.get(0)); + DeleteSKAdNetworkConversionValueSchemaRequest actualRequest = + ((DeleteSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2212,13 +2216,15 @@ public void getDataSharingSettingsTest2() throws Exception { } @Test - public void getDataSharingSettingsExceptionTest2() throws Exception { + public void deleteSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getDataSharingSettings(name); + SKAdNetworkConversionValueSchemaName name = + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + client.deleteSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2226,31 +2232,20 @@ public void getDataSharingSettingsExceptionTest2() throws Exception { } @Test - public void getMeasurementProtocolSecretTest() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") - .build(); + public void deleteSKAdNetworkConversionValueSchemaTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + String name = "name3373707"; - MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSKAdNetworkConversionValueSchema(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetMeasurementProtocolSecretRequest actualRequest = - ((GetMeasurementProtocolSecretRequest) actualRequests.get(0)); + DeleteSKAdNetworkConversionValueSchemaRequest actualRequest = + ((DeleteSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2258,15 +2253,13 @@ public void getMeasurementProtocolSecretTest() throws Exception { } @Test - public void getMeasurementProtocolSecretExceptionTest() throws Exception { + public void deleteSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - client.getMeasurementProtocolSecret(name); + String name = "name3373707"; + client.deleteSKAdNetworkConversionValueSchema(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2274,29 +2267,36 @@ public void getMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void getMeasurementProtocolSecretTest2() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() + public void updateSKAdNetworkConversionValueSchemaTest() throws Exception { + SKAdNetworkConversionValueSchema expectedResponse = + SKAdNetworkConversionValueSchema.newBuilder() .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") + SKAdNetworkConversionValueSchemaName.of( + "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + .setPostbackWindowOne(PostbackWindow.newBuilder().build()) + .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) + .setPostbackWindowThree(PostbackWindow.newBuilder().build()) + .setApplyConversionValues(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - MeasurementProtocolSecret actualResponse = client.getMeasurementProtocolSecret(name); + SKAdNetworkConversionValueSchema actualResponse = + client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetMeasurementProtocolSecretRequest actualRequest = - ((GetMeasurementProtocolSecretRequest) actualRequests.get(0)); + UpdateSKAdNetworkConversionValueSchemaRequest actualRequest = + ((UpdateSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals( + skadnetworkConversionValueSchema, actualRequest.getSkadnetworkConversionValueSchema()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2304,13 +2304,15 @@ public void getMeasurementProtocolSecretTest2() throws Exception { } @Test - public void getMeasurementProtocolSecretExceptionTest2() throws Exception { + public void updateSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getMeasurementProtocolSecret(name); + SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = + SKAdNetworkConversionValueSchema.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2318,30 +2320,32 @@ public void getMeasurementProtocolSecretExceptionTest2() throws Exception { } @Test - public void listMeasurementProtocolSecretsTest() throws Exception { - MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); - ListMeasurementProtocolSecretsResponse expectedResponse = - ListMeasurementProtocolSecretsResponse.newBuilder() + public void listSKAdNetworkConversionValueSchemasTest() throws Exception { + SKAdNetworkConversionValueSchema responsesElement = + SKAdNetworkConversionValueSchema.newBuilder().build(); + ListSKAdNetworkConversionValueSchemasResponse expectedResponse = + ListSKAdNetworkConversionValueSchemasResponse.newBuilder() .setNextPageToken("") - .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - ListMeasurementProtocolSecretsPagedResponse pagedListResponse = - client.listMeasurementProtocolSecrets(parent); + ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = + client.listSKAdNetworkConversionValueSchemas(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals( - expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); + expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListMeasurementProtocolSecretsRequest actualRequest = - ((ListMeasurementProtocolSecretsRequest) actualRequests.get(0)); + ListSKAdNetworkConversionValueSchemasRequest actualRequest = + ((ListSKAdNetworkConversionValueSchemasRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -2351,13 +2355,13 @@ public void listMeasurementProtocolSecretsTest() throws Exception { } @Test - public void listMeasurementProtocolSecretsExceptionTest() throws Exception { + public void listSKAdNetworkConversionValueSchemasExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.listMeasurementProtocolSecrets(parent); + client.listSKAdNetworkConversionValueSchemas(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2365,30 +2369,32 @@ public void listMeasurementProtocolSecretsExceptionTest() throws Exception { } @Test - public void listMeasurementProtocolSecretsTest2() throws Exception { - MeasurementProtocolSecret responsesElement = MeasurementProtocolSecret.newBuilder().build(); - ListMeasurementProtocolSecretsResponse expectedResponse = - ListMeasurementProtocolSecretsResponse.newBuilder() + public void listSKAdNetworkConversionValueSchemasTest2() throws Exception { + SKAdNetworkConversionValueSchema responsesElement = + SKAdNetworkConversionValueSchema.newBuilder().build(); + ListSKAdNetworkConversionValueSchemasResponse expectedResponse = + ListSKAdNetworkConversionValueSchemasResponse.newBuilder() .setNextPageToken("") - .addAllMeasurementProtocolSecrets(Arrays.asList(responsesElement)) + .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - ListMeasurementProtocolSecretsPagedResponse pagedListResponse = - client.listMeasurementProtocolSecrets(parent); + ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = + client.listSKAdNetworkConversionValueSchemas(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals( - expectedResponse.getMeasurementProtocolSecretsList().get(0), resources.get(0)); + expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListMeasurementProtocolSecretsRequest actualRequest = - ((ListMeasurementProtocolSecretsRequest) actualRequests.get(0)); + ListSKAdNetworkConversionValueSchemasRequest actualRequest = + ((ListSKAdNetworkConversionValueSchemasRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -2398,13 +2404,13 @@ public void listMeasurementProtocolSecretsTest2() throws Exception { } @Test - public void listMeasurementProtocolSecretsExceptionTest2() throws Exception { + public void listSKAdNetworkConversionValueSchemasExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - client.listMeasurementProtocolSecrets(parent); + client.listSKAdNetworkConversionValueSchemas(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2412,33 +2418,50 @@ public void listMeasurementProtocolSecretsExceptionTest2() throws Exception { } @Test - public void createMeasurementProtocolSecretTest() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + public void searchChangeHistoryEventsTest() throws Exception { + ChangeHistoryEvent responsesElement = ChangeHistoryEvent.newBuilder().build(); + SearchChangeHistoryEventsResponse expectedResponse = + SearchChangeHistoryEventsResponse.newBuilder() + .setNextPageToken("") + .addAllChangeHistoryEvents(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); - MeasurementProtocolSecret actualResponse = - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); - Assert.assertEquals(expectedResponse, actualResponse); + SearchChangeHistoryEventsPagedResponse pagedListResponse = + client.searchChangeHistoryEvents(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeHistoryEventsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateMeasurementProtocolSecretRequest actualRequest = - ((CreateMeasurementProtocolSecretRequest) actualRequests.get(0)); + SearchChangeHistoryEventsRequest actualRequest = + ((SearchChangeHistoryEventsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); + Assert.assertEquals(request.getAccount(), actualRequest.getAccount()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getResourceTypeList(), actualRequest.getResourceTypeList()); + Assert.assertEquals(request.getActionList(), actualRequest.getActionList()); + Assert.assertEquals(request.getActorEmailList(), actualRequest.getActorEmailList()); + Assert.assertEquals(request.getEarliestChangeTime(), actualRequest.getEarliestChangeTime()); + Assert.assertEquals(request.getLatestChangeTime(), actualRequest.getLatestChangeTime()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2446,15 +2469,24 @@ public void createMeasurementProtocolSecretTest() throws Exception { } @Test - public void createMeasurementProtocolSecretExceptionTest() throws Exception { + public void searchChangeHistoryEventsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + SearchChangeHistoryEventsRequest request = + SearchChangeHistoryEventsRequest.newBuilder() + .setAccount(AccountName.of("[ACCOUNT]").toString()) + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .addAllResourceType(new ArrayList()) + .addAllAction(new ArrayList()) + .addAllActorEmail(new ArrayList()) + .setEarliestChangeTime(Timestamp.newBuilder().build()) + .setLatestChangeTime(Timestamp.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchChangeHistoryEvents(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2462,33 +2494,26 @@ public void createMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void createMeasurementProtocolSecretTest2() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + public void getGoogleSignalsSettingsTest() throws Exception { + GoogleSignalsSettings expectedResponse = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); + GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); - MeasurementProtocolSecret actualResponse = - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateMeasurementProtocolSecretRequest actualRequest = - ((CreateMeasurementProtocolSecretRequest) actualRequests.get(0)); + GetGoogleSignalsSettingsRequest actualRequest = + ((GetGoogleSignalsSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2496,15 +2521,13 @@ public void createMeasurementProtocolSecretTest2() throws Exception { } @Test - public void createMeasurementProtocolSecretExceptionTest2() throws Exception { + public void getGoogleSignalsSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); - client.createMeasurementProtocolSecret(parent, measurementProtocolSecret); + GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); + client.getGoogleSignalsSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2512,22 +2535,26 @@ public void createMeasurementProtocolSecretExceptionTest2() throws Exception { } @Test - public void deleteMeasurementProtocolSecretTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getGoogleSignalsSettingsTest2() throws Exception { + GoogleSignalsSettings expectedResponse = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); + String name = "name3373707"; - client.deleteMeasurementProtocolSecret(name); + GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteMeasurementProtocolSecretRequest actualRequest = - ((DeleteMeasurementProtocolSecretRequest) actualRequests.get(0)); + GetGoogleSignalsSettingsRequest actualRequest = + ((GetGoogleSignalsSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2535,15 +2562,13 @@ public void deleteMeasurementProtocolSecretTest() throws Exception { } @Test - public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { + public void getGoogleSignalsSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - MeasurementProtocolSecretName name = - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]"); - client.deleteMeasurementProtocolSecret(name); + String name = "name3373707"; + client.getGoogleSignalsSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2551,20 +2576,29 @@ public void deleteMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void deleteMeasurementProtocolSecretTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void updateGoogleSignalsSettingsTest() throws Exception { + GoogleSignalsSettings expectedResponse = + GoogleSignalsSettings.newBuilder() + .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) + .setState(GoogleSignalsState.forNumber(0)) + .setConsent(GoogleSignalsConsent.forNumber(0)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + GoogleSignalsSettings googleSignalsSettings = GoogleSignalsSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - client.deleteMeasurementProtocolSecret(name); + GoogleSignalsSettings actualResponse = + client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteMeasurementProtocolSecretRequest actualRequest = - ((DeleteMeasurementProtocolSecretRequest) actualRequests.get(0)); + UpdateGoogleSignalsSettingsRequest actualRequest = + ((UpdateGoogleSignalsSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(googleSignalsSettings, actualRequest.getGoogleSignalsSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2572,13 +2606,14 @@ public void deleteMeasurementProtocolSecretTest2() throws Exception { } @Test - public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { + public void updateGoogleSignalsSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteMeasurementProtocolSecret(name); + GoogleSignalsSettings googleSignalsSettings = GoogleSignalsSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2586,33 +2621,30 @@ public void deleteMeasurementProtocolSecretExceptionTest2() throws Exception { } @Test - public void updateMeasurementProtocolSecretTest() throws Exception { - MeasurementProtocolSecret expectedResponse = - MeasurementProtocolSecret.newBuilder() - .setName( - MeasurementProtocolSecretName.of( - "[PROPERTY]", "[DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]") - .toString()) - .setDisplayName("displayName1714148973") - .setSecretValue("secretValue-2044460895") + public void createConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - MeasurementProtocolSecret actualResponse = - client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateMeasurementProtocolSecretRequest actualRequest = - ((UpdateMeasurementProtocolSecretRequest) actualRequests.get(0)); + CreateConversionEventRequest actualRequest = + ((CreateConversionEventRequest) actualRequests.get(0)); - Assert.assertEquals(measurementProtocolSecret, actualRequest.getMeasurementProtocolSecret()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2620,15 +2652,14 @@ public void updateMeasurementProtocolSecretTest() throws Exception { } @Test - public void updateMeasurementProtocolSecretExceptionTest() throws Exception { + public void createConversionEventExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - MeasurementProtocolSecret measurementProtocolSecret = - MeasurementProtocolSecret.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateMeasurementProtocolSecret(measurementProtocolSecret, updateMask); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2636,28 +2667,76 @@ public void updateMeasurementProtocolSecretExceptionTest() throws Exception { } @Test - public void acknowledgeUserDataCollectionTest() throws Exception { - AcknowledgeUserDataCollectionResponse expectedResponse = - AcknowledgeUserDataCollectionResponse.newBuilder().build(); + public void createConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AcknowledgeUserDataCollectionRequest request = - AcknowledgeUserDataCollectionRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .setAcknowledgement("acknowledgement1769490938") + String parent = "parent-995424086"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + + ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConversionEventRequest actualRequest = + ((CreateConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConversionEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + client.createConversionEvent(parent, conversionEvent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); - AcknowledgeUserDataCollectionResponse actualResponse = - client.acknowledgeUserDataCollection(request); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ConversionEvent actualResponse = client.updateConversionEvent(conversionEvent, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - AcknowledgeUserDataCollectionRequest actualRequest = - ((AcknowledgeUserDataCollectionRequest) actualRequests.get(0)); + UpdateConversionEventRequest actualRequest = + ((UpdateConversionEventRequest) actualRequests.get(0)); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); - Assert.assertEquals(request.getAcknowledgement(), actualRequest.getAcknowledgement()); + Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2665,17 +2744,14 @@ public void acknowledgeUserDataCollectionTest() throws Exception { } @Test - public void acknowledgeUserDataCollectionExceptionTest() throws Exception { + public void updateConversionEventExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AcknowledgeUserDataCollectionRequest request = - AcknowledgeUserDataCollectionRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .setAcknowledgement("acknowledgement1769490938") - .build(); - client.acknowledgeUserDataCollection(request); + ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateConversionEvent(conversionEvent, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2683,32 +2759,25 @@ public void acknowledgeUserDataCollectionExceptionTest() throws Exception { } @Test - public void getSKAdNetworkConversionValueSchemaTest() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + public void getConversionEventTest() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - SKAdNetworkConversionValueSchema actualResponse = - client.getSKAdNetworkConversionValueSchema(name); + ConversionEvent actualResponse = client.getConversionEvent(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetSKAdNetworkConversionValueSchemaRequest actualRequest = - ((GetSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); + GetConversionEventRequest actualRequest = ((GetConversionEventRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -2718,15 +2787,13 @@ public void getSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void getSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void getConversionEventExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - client.getSKAdNetworkConversionValueSchema(name); + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.getConversionEvent(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2734,30 +2801,25 @@ public void getSKAdNetworkConversionValueSchemaExceptionTest() throws Exception } @Test - public void getSKAdNetworkConversionValueSchemaTest2() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + public void getConversionEventTest2() throws Exception { + ConversionEvent expectedResponse = + ConversionEvent.newBuilder() + .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) + .setEventName("eventName31228997") + .setCreateTime(Timestamp.newBuilder().build()) + .setDeletable(true) + .setCustom(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - SKAdNetworkConversionValueSchema actualResponse = - client.getSKAdNetworkConversionValueSchema(name); + ConversionEvent actualResponse = client.getConversionEvent(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetSKAdNetworkConversionValueSchemaRequest actualRequest = - ((GetSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); + GetConversionEventRequest actualRequest = ((GetConversionEventRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -2767,13 +2829,13 @@ public void getSKAdNetworkConversionValueSchemaTest2() throws Exception { } @Test - public void getSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { + public void getConversionEventExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.getSKAdNetworkConversionValueSchema(name); + client.getConversionEvent(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2781,36 +2843,100 @@ public void getSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception } @Test - public void createSKAdNetworkConversionValueSchemaTest() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + public void deleteConversionEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + + client.deleteConversionEvent(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversionEventRequest actualRequest = + ((DeleteConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversionEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + client.deleteConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversionEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteConversionEvent(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversionEventRequest actualRequest = + ((DeleteConversionEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversionEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.deleteConversionEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversionEventsTest() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - SKAdNetworkConversionValueSchema actualResponse = - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); - Assert.assertEquals(expectedResponse, actualResponse); + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateSKAdNetworkConversionValueSchemaRequest actualRequest = - ((CreateSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); + ListConversionEventsRequest actualRequest = + ((ListConversionEventsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals( - skadnetworkConversionValueSchema, actualRequest.getSkadnetworkConversionValueSchema()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2818,15 +2944,13 @@ public void createSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void createSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void listConversionEventsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listConversionEvents(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2834,36 +2958,30 @@ public void createSKAdNetworkConversionValueSchemaExceptionTest() throws Excepti } @Test - public void createSKAdNetworkConversionValueSchemaTest2() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + public void listConversionEventsTest2() throws Exception { + ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); + ListConversionEventsResponse expectedResponse = + ListConversionEventsResponse.newBuilder() + .setNextPageToken("") + .addAllConversionEvents(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); - SKAdNetworkConversionValueSchema actualResponse = - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); - Assert.assertEquals(expectedResponse, actualResponse); + ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateSKAdNetworkConversionValueSchemaRequest actualRequest = - ((CreateSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); + ListConversionEventsRequest actualRequest = + ((ListConversionEventsRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals( - skadnetworkConversionValueSchema, actualRequest.getSkadnetworkConversionValueSchema()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2871,15 +2989,13 @@ public void createSKAdNetworkConversionValueSchemaTest2() throws Exception { } @Test - public void createSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { + public void listConversionEventsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); - client.createSKAdNetworkConversionValueSchema(parent, skadnetworkConversionValueSchema); + client.listConversionEvents(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2887,20 +3003,31 @@ public void createSKAdNetworkConversionValueSchemaExceptionTest2() throws Except } @Test - public void deleteSKAdNetworkConversionValueSchemaTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getDisplayVideo360AdvertiserLinkTest() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - client.deleteSKAdNetworkConversionValueSchema(name); + DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSKAdNetworkConversionValueSchemaRequest actualRequest = - ((DeleteSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); + GetDisplayVideo360AdvertiserLinkRequest actualRequest = + ((GetDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -2910,15 +3037,14 @@ public void deleteSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void deleteSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void getDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - SKAdNetworkConversionValueSchemaName name = - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]"); - client.deleteSKAdNetworkConversionValueSchema(name); + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + client.getDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2926,18 +3052,30 @@ public void deleteSKAdNetworkConversionValueSchemaExceptionTest() throws Excepti } @Test - public void deleteSKAdNetworkConversionValueSchemaTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getDisplayVideo360AdvertiserLinkTest2() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - client.deleteSKAdNetworkConversionValueSchema(name); + DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSKAdNetworkConversionValueSchemaRequest actualRequest = - ((DeleteSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); + GetDisplayVideo360AdvertiserLinkRequest actualRequest = + ((GetDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -2947,13 +3085,13 @@ public void deleteSKAdNetworkConversionValueSchemaTest2() throws Exception { } @Test - public void deleteSKAdNetworkConversionValueSchemaExceptionTest2() throws Exception { + public void getDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.deleteSKAdNetworkConversionValueSchema(name); + client.getDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -2961,36 +3099,34 @@ public void deleteSKAdNetworkConversionValueSchemaExceptionTest2() throws Except } @Test - public void updateSKAdNetworkConversionValueSchemaTest() throws Exception { - SKAdNetworkConversionValueSchema expectedResponse = - SKAdNetworkConversionValueSchema.newBuilder() - .setName( - SKAdNetworkConversionValueSchemaName.of( - "[PROPERTY]", "[DATA_STREAM]", "[SKADNETWORK_CONVERSION_VALUE_SCHEMA]") - .toString()) - .setPostbackWindowOne(PostbackWindow.newBuilder().build()) - .setPostbackWindowTwo(PostbackWindow.newBuilder().build()) - .setPostbackWindowThree(PostbackWindow.newBuilder().build()) - .setApplyConversionValues(true) + public void listDisplayVideo360AdvertiserLinksTest() throws Exception { + DisplayVideo360AdvertiserLink responsesElement = + DisplayVideo360AdvertiserLink.newBuilder().build(); + ListDisplayVideo360AdvertiserLinksResponse expectedResponse = + ListDisplayVideo360AdvertiserLinksResponse.newBuilder() + .setNextPageToken("") + .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - SKAdNetworkConversionValueSchema actualResponse = - client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinks(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateSKAdNetworkConversionValueSchemaRequest actualRequest = - ((UpdateSKAdNetworkConversionValueSchemaRequest) actualRequests.get(0)); + ListDisplayVideo360AdvertiserLinksRequest actualRequest = + ((ListDisplayVideo360AdvertiserLinksRequest) actualRequests.get(0)); - Assert.assertEquals( - skadnetworkConversionValueSchema, actualRequest.getSkadnetworkConversionValueSchema()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2998,15 +3134,13 @@ public void updateSKAdNetworkConversionValueSchemaTest() throws Exception { } @Test - public void updateSKAdNetworkConversionValueSchemaExceptionTest() throws Exception { + public void listDisplayVideo360AdvertiserLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - SKAdNetworkConversionValueSchema skadnetworkConversionValueSchema = - SKAdNetworkConversionValueSchema.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSKAdNetworkConversionValueSchema(skadnetworkConversionValueSchema, updateMask); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listDisplayVideo360AdvertiserLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3014,34 +3148,34 @@ public void updateSKAdNetworkConversionValueSchemaExceptionTest() throws Excepti } @Test - public void listSKAdNetworkConversionValueSchemasTest() throws Exception { - SKAdNetworkConversionValueSchema responsesElement = - SKAdNetworkConversionValueSchema.newBuilder().build(); - ListSKAdNetworkConversionValueSchemasResponse expectedResponse = - ListSKAdNetworkConversionValueSchemasResponse.newBuilder() + public void listDisplayVideo360AdvertiserLinksTest2() throws Exception { + DisplayVideo360AdvertiserLink responsesElement = + DisplayVideo360AdvertiserLink.newBuilder().build(); + ListDisplayVideo360AdvertiserLinksResponse expectedResponse = + ListDisplayVideo360AdvertiserLinksResponse.newBuilder() .setNextPageToken("") - .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) + .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + String parent = "parent-995424086"; - ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = - client.listSKAdNetworkConversionValueSchemas(parent); + ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinks(parent); - List resources = + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals( - expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); + expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListSKAdNetworkConversionValueSchemasRequest actualRequest = - ((ListSKAdNetworkConversionValueSchemasRequest) actualRequests.get(0)); + ListDisplayVideo360AdvertiserLinksRequest actualRequest = + ((ListDisplayVideo360AdvertiserLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3049,13 +3183,13 @@ public void listSKAdNetworkConversionValueSchemasTest() throws Exception { } @Test - public void listSKAdNetworkConversionValueSchemasExceptionTest() throws Exception { + public void listDisplayVideo360AdvertiserLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.listSKAdNetworkConversionValueSchemas(parent); + String parent = "parent-995424086"; + client.listDisplayVideo360AdvertiserLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3063,34 +3197,37 @@ public void listSKAdNetworkConversionValueSchemasExceptionTest() throws Exceptio } @Test - public void listSKAdNetworkConversionValueSchemasTest2() throws Exception { - SKAdNetworkConversionValueSchema responsesElement = - SKAdNetworkConversionValueSchema.newBuilder().build(); - ListSKAdNetworkConversionValueSchemasResponse expectedResponse = - ListSKAdNetworkConversionValueSchemasResponse.newBuilder() - .setNextPageToken("") - .addAllSkadnetworkConversionValueSchemas(Arrays.asList(responsesElement)) + public void createDisplayVideo360AdvertiserLinkTest() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListSKAdNetworkConversionValueSchemasPagedResponse pagedListResponse = - client.listSKAdNetworkConversionValueSchemas(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getSkadnetworkConversionValueSchemasList().get(0), resources.get(0)); + DisplayVideo360AdvertiserLink actualResponse = + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListSKAdNetworkConversionValueSchemasRequest actualRequest = - ((ListSKAdNetworkConversionValueSchemasRequest) actualRequests.get(0)); + CreateDisplayVideo360AdvertiserLinkRequest actualRequest = + ((CreateDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + displayVideo360AdvertiserLink, actualRequest.getDisplayVideo360AdvertiserLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3098,13 +3235,15 @@ public void listSKAdNetworkConversionValueSchemasTest2() throws Exception { } @Test - public void listSKAdNetworkConversionValueSchemasExceptionTest2() throws Exception { + public void createDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listSKAdNetworkConversionValueSchemas(parent); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3112,50 +3251,37 @@ public void listSKAdNetworkConversionValueSchemasExceptionTest2() throws Excepti } @Test - public void searchChangeHistoryEventsTest() throws Exception { - ChangeHistoryEvent responsesElement = ChangeHistoryEvent.newBuilder().build(); - SearchChangeHistoryEventsResponse expectedResponse = - SearchChangeHistoryEventsResponse.newBuilder() - .setNextPageToken("") - .addAllChangeHistoryEvents(Arrays.asList(responsesElement)) + public void createDisplayVideo360AdvertiserLinkTest2() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SearchChangeHistoryEventsRequest request = - SearchChangeHistoryEventsRequest.newBuilder() - .setAccount(AccountName.of("[ACCOUNT]").toString()) - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .addAllResourceType(new ArrayList()) - .addAllAction(new ArrayList()) - .addAllActorEmail(new ArrayList()) - .setEarliestChangeTime(Timestamp.newBuilder().build()) - .setLatestChangeTime(Timestamp.newBuilder().build()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - SearchChangeHistoryEventsPagedResponse pagedListResponse = - client.searchChangeHistoryEvents(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String parent = "parent-995424086"; + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getChangeHistoryEventsList().get(0), resources.get(0)); + DisplayVideo360AdvertiserLink actualResponse = + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - SearchChangeHistoryEventsRequest actualRequest = - ((SearchChangeHistoryEventsRequest) actualRequests.get(0)); + CreateDisplayVideo360AdvertiserLinkRequest actualRequest = + ((CreateDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); - Assert.assertEquals(request.getAccount(), actualRequest.getAccount()); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); - Assert.assertEquals(request.getResourceTypeList(), actualRequest.getResourceTypeList()); - Assert.assertEquals(request.getActionList(), actualRequest.getActionList()); - Assert.assertEquals(request.getActorEmailList(), actualRequest.getActorEmailList()); - Assert.assertEquals(request.getEarliestChangeTime(), actualRequest.getEarliestChangeTime()); - Assert.assertEquals(request.getLatestChangeTime(), actualRequest.getLatestChangeTime()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + displayVideo360AdvertiserLink, actualRequest.getDisplayVideo360AdvertiserLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3163,24 +3289,15 @@ public void searchChangeHistoryEventsTest() throws Exception { } @Test - public void searchChangeHistoryEventsExceptionTest() throws Exception { + public void createDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - SearchChangeHistoryEventsRequest request = - SearchChangeHistoryEventsRequest.newBuilder() - .setAccount(AccountName.of("[ACCOUNT]").toString()) - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .addAllResourceType(new ArrayList()) - .addAllAction(new ArrayList()) - .addAllActorEmail(new ArrayList()) - .setEarliestChangeTime(Timestamp.newBuilder().build()) - .setLatestChangeTime(Timestamp.newBuilder().build()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.searchChangeHistoryEvents(request); + String parent = "parent-995424086"; + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); + client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3188,24 +3305,19 @@ public void searchChangeHistoryEventsExceptionTest() throws Exception { } @Test - public void getGoogleSignalsSettingsTest() throws Exception { - GoogleSignalsSettings expectedResponse = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) - .build(); + public void deleteDisplayVideo360AdvertiserLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteDisplayVideo360AdvertiserLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetGoogleSignalsSettingsRequest actualRequest = - ((GetGoogleSignalsSettingsRequest) actualRequests.get(0)); + DeleteDisplayVideo360AdvertiserLinkRequest actualRequest = + ((DeleteDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -3215,13 +3327,14 @@ public void getGoogleSignalsSettingsTest() throws Exception { } @Test - public void getGoogleSignalsSettingsExceptionTest() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - GoogleSignalsSettingsName name = GoogleSignalsSettingsName.of("[PROPERTY]"); - client.getGoogleSignalsSettings(name); + DisplayVideo360AdvertiserLinkName name = + DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + client.deleteDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3229,24 +3342,18 @@ public void getGoogleSignalsSettingsExceptionTest() throws Exception { } @Test - public void getGoogleSignalsSettingsTest2() throws Exception { - GoogleSignalsSettings expectedResponse = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) - .build(); + public void deleteDisplayVideo360AdvertiserLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - GoogleSignalsSettings actualResponse = client.getGoogleSignalsSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteDisplayVideo360AdvertiserLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetGoogleSignalsSettingsRequest actualRequest = - ((GetGoogleSignalsSettingsRequest) actualRequests.get(0)); + DeleteDisplayVideo360AdvertiserLinkRequest actualRequest = + ((DeleteDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -3256,13 +3363,13 @@ public void getGoogleSignalsSettingsTest2() throws Exception { } @Test - public void getGoogleSignalsSettingsExceptionTest2() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.getGoogleSignalsSettings(name); + client.deleteDisplayVideo360AdvertiserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3270,28 +3377,36 @@ public void getGoogleSignalsSettingsExceptionTest2() throws Exception { } @Test - public void updateGoogleSignalsSettingsTest() throws Exception { - GoogleSignalsSettings expectedResponse = - GoogleSignalsSettings.newBuilder() - .setName(GoogleSignalsSettingsName.of("[PROPERTY]").toString()) - .setState(GoogleSignalsState.forNumber(0)) - .setConsent(GoogleSignalsConsent.forNumber(0)) + public void updateDisplayVideo360AdvertiserLinkTest() throws Exception { + DisplayVideo360AdvertiserLink expectedResponse = + DisplayVideo360AdvertiserLink.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - GoogleSignalsSettings googleSignalsSettings = GoogleSignalsSettings.newBuilder().build(); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - GoogleSignalsSettings actualResponse = - client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); + DisplayVideo360AdvertiserLink actualResponse = + client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateGoogleSignalsSettingsRequest actualRequest = - ((UpdateGoogleSignalsSettingsRequest) actualRequests.get(0)); + UpdateDisplayVideo360AdvertiserLinkRequest actualRequest = + ((UpdateDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); - Assert.assertEquals(googleSignalsSettings, actualRequest.getGoogleSignalsSettings()); + Assert.assertEquals( + displayVideo360AdvertiserLink, actualRequest.getDisplayVideo360AdvertiserLink()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -3300,14 +3415,15 @@ public void updateGoogleSignalsSettingsTest() throws Exception { } @Test - public void updateGoogleSignalsSettingsExceptionTest() throws Exception { + public void updateDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - GoogleSignalsSettings googleSignalsSettings = GoogleSignalsSettings.newBuilder().build(); + DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = + DisplayVideo360AdvertiserLink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateGoogleSignalsSettings(googleSignalsSettings, updateMask); + client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3315,30 +3431,37 @@ public void updateGoogleSignalsSettingsExceptionTest() throws Exception { } @Test - public void createConversionEventTest() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void getDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateConversionEventRequest actualRequest = - ((CreateConversionEventRequest) actualRequests.get(0)); + GetDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((GetDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3346,14 +3469,15 @@ public void createConversionEventTest() throws Exception { } @Test - public void createConversionEventExceptionTest() throws Exception { + public void getDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - client.createConversionEvent(parent, conversionEvent); + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3361,30 +3485,35 @@ public void createConversionEventExceptionTest() throws Exception { } @Test - public void createConversionEventTest2() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void getDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); + String name = "name3373707"; - ConversionEvent actualResponse = client.createConversionEvent(parent, conversionEvent); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateConversionEventRequest actualRequest = - ((CreateConversionEventRequest) actualRequests.get(0)); + GetDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((GetDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3392,14 +3521,13 @@ public void createConversionEventTest2() throws Exception { } @Test - public void createConversionEventExceptionTest2() throws Exception { + public void getDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - client.createConversionEvent(parent, conversionEvent); + String name = "name3373707"; + client.getDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3407,30 +3535,34 @@ public void createConversionEventExceptionTest2() throws Exception { } @Test - public void updateConversionEventTest() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void listDisplayVideo360AdvertiserLinkProposalsTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal responsesElement = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = + ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() + .setNextPageToken("") + .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - ConversionEvent actualResponse = client.updateConversionEvent(conversionEvent, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinkProposals(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateConversionEventRequest actualRequest = - ((UpdateConversionEventRequest) actualRequests.get(0)); + ListDisplayVideo360AdvertiserLinkProposalsRequest actualRequest = + ((ListDisplayVideo360AdvertiserLinkProposalsRequest) actualRequests.get(0)); - Assert.assertEquals(conversionEvent, actualRequest.getConversionEvent()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3438,14 +3570,13 @@ public void updateConversionEventTest() throws Exception { } @Test - public void updateConversionEventExceptionTest() throws Exception { + public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ConversionEvent conversionEvent = ConversionEvent.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateConversionEvent(conversionEvent, updateMask); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listDisplayVideo360AdvertiserLinkProposals(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3453,27 +3584,34 @@ public void updateConversionEventExceptionTest() throws Exception { } @Test - public void getConversionEventTest() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void listDisplayVideo360AdvertiserLinkProposalsTest2() throws Exception { + DisplayVideo360AdvertiserLinkProposal responsesElement = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = + ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() + .setNextPageToken("") + .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + String parent = "parent-995424086"; - ConversionEvent actualResponse = client.getConversionEvent(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = + client.listDisplayVideo360AdvertiserLinkProposals(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetConversionEventRequest actualRequest = ((GetConversionEventRequest) actualRequests.get(0)); + ListDisplayVideo360AdvertiserLinkProposalsRequest actualRequest = + ((ListDisplayVideo360AdvertiserLinkProposalsRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3481,13 +3619,13 @@ public void getConversionEventTest() throws Exception { } @Test - public void getConversionEventExceptionTest() throws Exception { + public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - client.getConversionEvent(name); + String parent = "parent-995424086"; + client.listDisplayVideo360AdvertiserLinkProposals(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3495,27 +3633,41 @@ public void getConversionEventExceptionTest() throws Exception { } @Test - public void getConversionEventTest2() throws Exception { - ConversionEvent expectedResponse = - ConversionEvent.newBuilder() - .setName(ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]").toString()) - .setEventName("eventName31228997") - .setCreateTime(Timestamp.newBuilder().build()) - .setDeletable(true) - .setCustom(true) + public void createDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - ConversionEvent actualResponse = client.getConversionEvent(name); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetConversionEventRequest actualRequest = ((GetConversionEventRequest) actualRequests.get(0)); + CreateDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((CreateDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + displayVideo360AdvertiserLinkProposal, + actualRequest.getDisplayVideo360AdvertiserLinkProposal()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3523,13 +3675,16 @@ public void getConversionEventTest2() throws Exception { } @Test - public void getConversionEventExceptionTest2() throws Exception { + public void createDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getConversionEvent(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3537,20 +3692,41 @@ public void getConversionEventExceptionTest2() throws Exception { } @Test - public void deleteConversionEventTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); + String parent = "parent-995424086"; + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - client.deleteConversionEvent(name); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteConversionEventRequest actualRequest = - ((DeleteConversionEventRequest) actualRequests.get(0)); + CreateDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((CreateDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + displayVideo360AdvertiserLinkProposal, + actualRequest.getDisplayVideo360AdvertiserLinkProposal()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3558,13 +3734,16 @@ public void deleteConversionEventTest() throws Exception { } @Test - public void deleteConversionEventExceptionTest() throws Exception { + public void createDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ConversionEventName name = ConversionEventName.of("[PROPERTY]", "[CONVERSION_EVENT]"); - client.deleteConversionEvent(name); + String parent = "parent-995424086"; + DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = + DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); + client.createDisplayVideo360AdvertiserLinkProposal( + parent, displayVideo360AdvertiserLinkProposal); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3572,20 +3751,22 @@ public void deleteConversionEventExceptionTest() throws Exception { } @Test - public void deleteConversionEventTest2() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkProposalTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - client.deleteConversionEvent(name); + client.deleteDisplayVideo360AdvertiserLinkProposal(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteConversionEventRequest actualRequest = - ((DeleteConversionEventRequest) actualRequests.get(0)); + DeleteDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((DeleteDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3593,13 +3774,15 @@ public void deleteConversionEventTest2() throws Exception { } @Test - public void deleteConversionEventExceptionTest2() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteConversionEvent(name); + DisplayVideo360AdvertiserLinkProposalName name = + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + client.deleteDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3607,30 +3790,20 @@ public void deleteConversionEventExceptionTest2() throws Exception { } @Test - public void listConversionEventsTest() throws Exception { - ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); - ListConversionEventsResponse expectedResponse = - ListConversionEventsResponse.newBuilder() - .setNextPageToken("") - .addAllConversionEvents(Arrays.asList(responsesElement)) - .build(); + public void deleteDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); + client.deleteDisplayVideo360AdvertiserLinkProposal(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListConversionEventsRequest actualRequest = - ((ListConversionEventsRequest) actualRequests.get(0)); + DeleteDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((DeleteDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3638,13 +3811,13 @@ public void listConversionEventsTest() throws Exception { } @Test - public void listConversionEventsExceptionTest() throws Exception { + public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listConversionEvents(parent); + String name = "name3373707"; + client.deleteDisplayVideo360AdvertiserLinkProposal(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3652,30 +3825,31 @@ public void listConversionEventsExceptionTest() throws Exception { } @Test - public void listConversionEventsTest2() throws Exception { - ConversionEvent responsesElement = ConversionEvent.newBuilder().build(); - ListConversionEventsResponse expectedResponse = - ListConversionEventsResponse.newBuilder() - .setNextPageToken("") - .addAllConversionEvents(Arrays.asList(responsesElement)) + public void approveDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + ApproveDisplayVideo360AdvertiserLinkProposalResponse expectedResponse = + ApproveDisplayVideo360AdvertiserLinkProposalResponse.newBuilder() + .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListConversionEventsPagedResponse pagedListResponse = client.listConversionEvents(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + ApproveDisplayVideo360AdvertiserLinkProposalRequest request = + ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getConversionEventsList().get(0), resources.get(0)); + ApproveDisplayVideo360AdvertiserLinkProposalResponse actualResponse = + client.approveDisplayVideo360AdvertiserLinkProposal(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListConversionEventsRequest actualRequest = - ((ListConversionEventsRequest) actualRequests.get(0)); + ApproveDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((ApproveDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(request.getName(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3683,13 +3857,19 @@ public void listConversionEventsTest2() throws Exception { } @Test - public void listConversionEventsExceptionTest2() throws Exception { + public void approveDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listConversionEvents(parent); + ApproveDisplayVideo360AdvertiserLinkProposalRequest request = + ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); + client.approveDisplayVideo360AdvertiserLinkProposal(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3697,33 +3877,41 @@ public void listConversionEventsExceptionTest2() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkTest() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() + public void cancelDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + DisplayVideo360AdvertiserLinkProposal expectedResponse = + DisplayVideo360AdvertiserLinkProposal.newBuilder() .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") .toString()) .setAdvertiserId("advertiserId550061990") + .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setValidationEmail("validationEmail-94407005") .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) .setCostDataSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + CancelDisplayVideo360AdvertiserLinkProposalRequest request = + CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); - DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); + DisplayVideo360AdvertiserLinkProposal actualResponse = + client.cancelDisplayVideo360AdvertiserLinkProposal(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDisplayVideo360AdvertiserLinkRequest actualRequest = - ((GetDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); + CancelDisplayVideo360AdvertiserLinkProposalRequest actualRequest = + ((CancelDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(request.getName(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3731,14 +3919,19 @@ public void getDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - client.getDisplayVideo360AdvertiserLink(name); + CancelDisplayVideo360AdvertiserLinkProposalRequest request = + CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() + .setName( + DisplayVideo360AdvertiserLinkProposalName.of( + "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") + .toString()) + .build(); + client.cancelDisplayVideo360AdvertiserLinkProposal(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3746,32 +3939,30 @@ public void getDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkTest2() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void createCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomDimension customDimension = CustomDimension.newBuilder().build(); - DisplayVideo360AdvertiserLink actualResponse = client.getDisplayVideo360AdvertiserLink(name); + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDisplayVideo360AdvertiserLinkRequest actualRequest = - ((GetDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); + CreateCustomDimensionRequest actualRequest = + ((CreateCustomDimensionRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3779,13 +3970,14 @@ public void getDisplayVideo360AdvertiserLinkTest2() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { + public void createCustomDimensionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getDisplayVideo360AdvertiserLink(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3793,34 +3985,30 @@ public void getDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksTest() throws Exception { - DisplayVideo360AdvertiserLink responsesElement = - DisplayVideo360AdvertiserLink.newBuilder().build(); - ListDisplayVideo360AdvertiserLinksResponse expectedResponse = - ListDisplayVideo360AdvertiserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) + public void createCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinks(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); + String parent = "parent-995424086"; + CustomDimension customDimension = CustomDimension.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); + CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDisplayVideo360AdvertiserLinksRequest actualRequest = - ((ListDisplayVideo360AdvertiserLinksRequest) actualRequests.get(0)); + CreateCustomDimensionRequest actualRequest = + ((CreateCustomDimensionRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3828,13 +4016,14 @@ public void listDisplayVideo360AdvertiserLinksTest() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksExceptionTest() throws Exception { + public void createCustomDimensionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listDisplayVideo360AdvertiserLinks(parent); + String parent = "parent-995424086"; + CustomDimension customDimension = CustomDimension.newBuilder().build(); + client.createCustomDimension(parent, customDimension); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3842,34 +4031,30 @@ public void listDisplayVideo360AdvertiserLinksExceptionTest() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksTest2() throws Exception { - DisplayVideo360AdvertiserLink responsesElement = - DisplayVideo360AdvertiserLink.newBuilder().build(); - ListDisplayVideo360AdvertiserLinksResponse expectedResponse = - ListDisplayVideo360AdvertiserLinksResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinks(Arrays.asList(responsesElement)) + public void updateCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListDisplayVideo360AdvertiserLinksPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinks(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinksList().get(0), resources.get(0)); + CustomDimension actualResponse = client.updateCustomDimension(customDimension, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDisplayVideo360AdvertiserLinksRequest actualRequest = - ((ListDisplayVideo360AdvertiserLinksRequest) actualRequests.get(0)); + UpdateCustomDimensionRequest actualRequest = + ((UpdateCustomDimensionRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3877,13 +4062,14 @@ public void listDisplayVideo360AdvertiserLinksTest2() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinksExceptionTest2() throws Exception { + public void updateCustomDimensionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listDisplayVideo360AdvertiserLinks(parent); + CustomDimension customDimension = CustomDimension.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomDimension(customDimension, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3891,37 +4077,30 @@ public void listDisplayVideo360AdvertiserLinksExceptionTest2() throws Exception } @Test - public void createDisplayVideo360AdvertiserLinkTest() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void listCustomDimensionsTest() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); - DisplayVideo360AdvertiserLink actualResponse = - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); - Assert.assertEquals(expectedResponse, actualResponse); + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDisplayVideo360AdvertiserLinkRequest actualRequest = - ((CreateDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); + ListCustomDimensionsRequest actualRequest = + ((ListCustomDimensionsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals( - displayVideo360AdvertiserLink, actualRequest.getDisplayVideo360AdvertiserLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3929,15 +4108,13 @@ public void createDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void createDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void listCustomDimensionsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + client.listCustomDimensions(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3945,37 +4122,30 @@ public void createDisplayVideo360AdvertiserLinkExceptionTest() throws Exception } @Test - public void createDisplayVideo360AdvertiserLinkTest2() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void listCustomDimensionsTest2() throws Exception { + CustomDimension responsesElement = CustomDimension.newBuilder().build(); + ListCustomDimensionsResponse expectedResponse = + ListCustomDimensionsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomDimensions(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); + String parent = "parent-995424086"; + + ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - DisplayVideo360AdvertiserLink actualResponse = - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); - Assert.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDisplayVideo360AdvertiserLinkRequest actualRequest = - ((CreateDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); + ListCustomDimensionsRequest actualRequest = + ((ListCustomDimensionsRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals( - displayVideo360AdvertiserLink, actualRequest.getDisplayVideo360AdvertiserLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -3983,15 +4153,13 @@ public void createDisplayVideo360AdvertiserLinkTest2() throws Exception { } @Test - public void createDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { + public void listCustomDimensionsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); - client.createDisplayVideo360AdvertiserLink(parent, displayVideo360AdvertiserLink); + client.listCustomDimensions(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -3999,19 +4167,18 @@ public void createDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception } @Test - public void deleteDisplayVideo360AdvertiserLinkTest() throws Exception { + public void archiveCustomDimensionTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - client.deleteDisplayVideo360AdvertiserLink(name); + client.archiveCustomDimension(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDisplayVideo360AdvertiserLinkRequest actualRequest = - ((DeleteDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); + ArchiveCustomDimensionRequest actualRequest = + ((ArchiveCustomDimensionRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -4021,14 +4188,13 @@ public void deleteDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void deleteDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void archiveCustomDimensionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DisplayVideo360AdvertiserLinkName name = - DisplayVideo360AdvertiserLinkName.of("[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]"); - client.deleteDisplayVideo360AdvertiserLink(name); + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.archiveCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4036,18 +4202,18 @@ public void deleteDisplayVideo360AdvertiserLinkExceptionTest() throws Exception } @Test - public void deleteDisplayVideo360AdvertiserLinkTest2() throws Exception { + public void archiveCustomDimensionTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - client.deleteDisplayVideo360AdvertiserLink(name); + client.archiveCustomDimension(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDisplayVideo360AdvertiserLinkRequest actualRequest = - ((DeleteDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); + ArchiveCustomDimensionRequest actualRequest = + ((ArchiveCustomDimensionRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -4057,13 +4223,13 @@ public void deleteDisplayVideo360AdvertiserLinkTest2() throws Exception { } @Test - public void deleteDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception { + public void archiveCustomDimensionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.deleteDisplayVideo360AdvertiserLink(name); + client.archiveCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4071,37 +4237,27 @@ public void deleteDisplayVideo360AdvertiserLinkExceptionTest2() throws Exception } @Test - public void updateDisplayVideo360AdvertiserLinkTest() throws Exception { - DisplayVideo360AdvertiserLink expectedResponse = - DisplayVideo360AdvertiserLink.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void getCustomDimensionTest() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - DisplayVideo360AdvertiserLink actualResponse = - client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); + CustomDimension actualResponse = client.getCustomDimension(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateDisplayVideo360AdvertiserLinkRequest actualRequest = - ((UpdateDisplayVideo360AdvertiserLinkRequest) actualRequests.get(0)); + GetCustomDimensionRequest actualRequest = ((GetCustomDimensionRequest) actualRequests.get(0)); - Assert.assertEquals( - displayVideo360AdvertiserLink, actualRequest.getDisplayVideo360AdvertiserLink()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4109,15 +4265,13 @@ public void updateDisplayVideo360AdvertiserLinkTest() throws Exception { } @Test - public void updateDisplayVideo360AdvertiserLinkExceptionTest() throws Exception { + public void getCustomDimensionExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DisplayVideo360AdvertiserLink displayVideo360AdvertiserLink = - DisplayVideo360AdvertiserLink.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDisplayVideo360AdvertiserLink(displayVideo360AdvertiserLink, updateMask); + CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + client.getCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4125,37 +4279,27 @@ public void updateDisplayVideo360AdvertiserLinkExceptionTest() throws Exception } @Test - public void getDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void getCustomDimensionTest2() throws Exception { + CustomDimension expectedResponse = + CustomDimension.newBuilder() + .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDisallowAdsPersonalization(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + String name = "name3373707"; - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.getDisplayVideo360AdvertiserLinkProposal(name); + CustomDimension actualResponse = client.getCustomDimension(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((GetDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + GetCustomDimensionRequest actualRequest = ((GetCustomDimensionRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4163,15 +4307,13 @@ public void getDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void getCustomDimensionExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - client.getDisplayVideo360AdvertiserLinkProposal(name); + String name = "name3373707"; + client.getCustomDimension(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4179,35 +4321,29 @@ public void getDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Excep } @Test - public void getDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void createCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomMetric customMetric = CustomMetric.newBuilder().build(); - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.getDisplayVideo360AdvertiserLinkProposal(name); + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((GetDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + CreateCustomMetricRequest actualRequest = ((CreateCustomMetricRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4215,13 +4351,14 @@ public void getDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { } @Test - public void getDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { + public void createCustomMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getDisplayVideo360AdvertiserLinkProposal(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4229,34 +4366,29 @@ public void getDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exce } @Test - public void listDisplayVideo360AdvertiserLinkProposalsTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal responsesElement = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = - ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) + public void createCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinkProposals(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); + String parent = "parent-995424086"; + CustomMetric customMetric = CustomMetric.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); + CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDisplayVideo360AdvertiserLinkProposalsRequest actualRequest = - ((ListDisplayVideo360AdvertiserLinkProposalsRequest) actualRequests.get(0)); + CreateCustomMetricRequest actualRequest = ((CreateCustomMetricRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4264,13 +4396,14 @@ public void listDisplayVideo360AdvertiserLinkProposalsTest() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest() throws Exception { + public void createCustomMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listDisplayVideo360AdvertiserLinkProposals(parent); + String parent = "parent-995424086"; + CustomMetric customMetric = CustomMetric.newBuilder().build(); + client.createCustomMetric(parent, customMetric); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4278,34 +4411,29 @@ public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest() throws Exc } @Test - public void listDisplayVideo360AdvertiserLinkProposalsTest2() throws Exception { - DisplayVideo360AdvertiserLinkProposal responsesElement = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - ListDisplayVideo360AdvertiserLinkProposalsResponse expectedResponse = - ListDisplayVideo360AdvertiserLinkProposalsResponse.newBuilder() - .setNextPageToken("") - .addAllDisplayVideo360AdvertiserLinkProposals(Arrays.asList(responsesElement)) + public void updateCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListDisplayVideo360AdvertiserLinkProposalsPagedResponse pagedListResponse = - client.listDisplayVideo360AdvertiserLinkProposals(parent); - - List resources = - Lists.newArrayList(pagedListResponse.iterateAll()); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals( - expectedResponse.getDisplayVideo360AdvertiserLinkProposalsList().get(0), resources.get(0)); + CustomMetric actualResponse = client.updateCustomMetric(customMetric, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDisplayVideo360AdvertiserLinkProposalsRequest actualRequest = - ((ListDisplayVideo360AdvertiserLinkProposalsRequest) actualRequests.get(0)); + UpdateCustomMetricRequest actualRequest = ((UpdateCustomMetricRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4313,13 +4441,14 @@ public void listDisplayVideo360AdvertiserLinkProposalsTest2() throws Exception { } @Test - public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest2() throws Exception { + public void updateCustomMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listDisplayVideo360AdvertiserLinkProposals(parent); + CustomMetric customMetric = CustomMetric.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomMetric(customMetric, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4327,41 +4456,29 @@ public void listDisplayVideo360AdvertiserLinkProposalsExceptionTest2() throws Ex } @Test - public void createDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void listCustomMetricsTest() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); - Assert.assertEquals(expectedResponse, actualResponse); + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((CreateDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + ListCustomMetricsRequest actualRequest = ((ListCustomMetricsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals( - displayVideo360AdvertiserLinkProposal, - actualRequest.getDisplayVideo360AdvertiserLinkProposal()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4369,16 +4486,13 @@ public void createDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void createDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void listCustomMetricsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); + client.listCustomMetrics(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4386,41 +4500,29 @@ public void createDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Ex } @Test - public void createDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void listCustomMetricsTest2() throws Exception { + CustomMetric responsesElement = CustomMetric.newBuilder().build(); + ListCustomMetricsResponse expectedResponse = + ListCustomMetricsResponse.newBuilder() + .setNextPageToken("") + .addAllCustomMetrics(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); - Assert.assertEquals(expectedResponse, actualResponse); + ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((CreateDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + ListCustomMetricsRequest actualRequest = ((ListCustomMetricsRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals( - displayVideo360AdvertiserLinkProposal, - actualRequest.getDisplayVideo360AdvertiserLinkProposal()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4428,16 +4530,13 @@ public void createDisplayVideo360AdvertiserLinkProposalTest2() throws Exception } @Test - public void createDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { + public void listCustomMetricsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - DisplayVideo360AdvertiserLinkProposal displayVideo360AdvertiserLinkProposal = - DisplayVideo360AdvertiserLinkProposal.newBuilder().build(); - client.createDisplayVideo360AdvertiserLinkProposal( - parent, displayVideo360AdvertiserLinkProposal); + client.listCustomMetrics(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4445,20 +4544,17 @@ public void createDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws E } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalTest() throws Exception { + public void archiveCustomMetricTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + client.archiveCustomMetric(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((DeleteDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + ArchiveCustomMetricRequest actualRequest = ((ArchiveCustomMetricRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -4468,15 +4564,13 @@ public void deleteDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void archiveCustomMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DisplayVideo360AdvertiserLinkProposalName name = - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]"); - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.archiveCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4484,18 +4578,17 @@ public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Ex } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalTest2() throws Exception { + public void archiveCustomMetricTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + client.archiveCustomMetric(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((DeleteDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + ArchiveCustomMetricRequest actualRequest = ((ArchiveCustomMetricRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -4505,13 +4598,13 @@ public void deleteDisplayVideo360AdvertiserLinkProposalTest2() throws Exception } @Test - public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws Exception { + public void archiveCustomMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.deleteDisplayVideo360AdvertiserLinkProposal(name); + client.archiveCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4519,31 +4612,27 @@ public void deleteDisplayVideo360AdvertiserLinkProposalExceptionTest2() throws E } @Test - public void approveDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - ApproveDisplayVideo360AdvertiserLinkProposalResponse expectedResponse = - ApproveDisplayVideo360AdvertiserLinkProposalResponse.newBuilder() - .setDisplayVideo360AdvertiserLink(DisplayVideo360AdvertiserLink.newBuilder().build()) + public void getCustomMetricTest() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ApproveDisplayVideo360AdvertiserLinkProposalRequest request = - ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - ApproveDisplayVideo360AdvertiserLinkProposalResponse actualResponse = - client.approveDisplayVideo360AdvertiserLinkProposal(request); + CustomMetric actualResponse = client.getCustomMetric(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ApproveDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((ApproveDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + GetCustomMetricRequest actualRequest = ((GetCustomMetricRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4551,19 +4640,13 @@ public void approveDisplayVideo360AdvertiserLinkProposalTest() throws Exception } @Test - public void approveDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void getCustomMetricExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ApproveDisplayVideo360AdvertiserLinkProposalRequest request = - ApproveDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); - client.approveDisplayVideo360AdvertiserLinkProposal(request); + CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + client.getCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4571,41 +4654,27 @@ public void approveDisplayVideo360AdvertiserLinkProposalExceptionTest() throws E } @Test - public void cancelDisplayVideo360AdvertiserLinkProposalTest() throws Exception { - DisplayVideo360AdvertiserLinkProposal expectedResponse = - DisplayVideo360AdvertiserLinkProposal.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .setAdvertiserId("advertiserId550061990") - .setLinkProposalStatusDetails(LinkProposalStatusDetails.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setValidationEmail("validationEmail-94407005") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + public void getCustomMetricTest2() throws Exception { + CustomMetric expectedResponse = + CustomMetric.newBuilder() + .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) + .setParameterName("parameterName-379607596") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllRestrictedMetricType(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CancelDisplayVideo360AdvertiserLinkProposalRequest request = - CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); + String name = "name3373707"; - DisplayVideo360AdvertiserLinkProposal actualResponse = - client.cancelDisplayVideo360AdvertiserLinkProposal(request); + CustomMetric actualResponse = client.getCustomMetric(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CancelDisplayVideo360AdvertiserLinkProposalRequest actualRequest = - ((CancelDisplayVideo360AdvertiserLinkProposalRequest) actualRequests.get(0)); + GetCustomMetricRequest actualRequest = ((GetCustomMetricRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4613,19 +4682,13 @@ public void cancelDisplayVideo360AdvertiserLinkProposalTest() throws Exception { } @Test - public void cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Exception { + public void getCustomMetricExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CancelDisplayVideo360AdvertiserLinkProposalRequest request = - CancelDisplayVideo360AdvertiserLinkProposalRequest.newBuilder() - .setName( - DisplayVideo360AdvertiserLinkProposalName.of( - "[PROPERTY]", "[DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL]") - .toString()) - .build(); - client.cancelDisplayVideo360AdvertiserLinkProposal(request); + String name = "name3373707"; + client.getCustomMetric(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4633,30 +4696,25 @@ public void cancelDisplayVideo360AdvertiserLinkProposalExceptionTest() throws Ex } @Test - public void createCustomDimensionTest() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + public void getDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomDimension customDimension = CustomDimension.newBuilder().build(); + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); - CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateCustomDimensionRequest actualRequest = - ((CreateCustomDimensionRequest) actualRequests.get(0)); + GetDataRetentionSettingsRequest actualRequest = + ((GetDataRetentionSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4664,14 +4722,13 @@ public void createCustomDimensionTest() throws Exception { } @Test - public void createCustomDimensionExceptionTest() throws Exception { + public void getDataRetentionSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomDimension customDimension = CustomDimension.newBuilder().build(); - client.createCustomDimension(parent, customDimension); + DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + client.getDataRetentionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4679,30 +4736,25 @@ public void createCustomDimensionExceptionTest() throws Exception { } @Test - public void createCustomDimensionTest2() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + public void getDataRetentionSettingsTest2() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - CustomDimension customDimension = CustomDimension.newBuilder().build(); + String name = "name3373707"; - CustomDimension actualResponse = client.createCustomDimension(parent, customDimension); + DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateCustomDimensionRequest actualRequest = - ((CreateCustomDimensionRequest) actualRequests.get(0)); + GetDataRetentionSettingsRequest actualRequest = + ((GetDataRetentionSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4710,14 +4762,13 @@ public void createCustomDimensionTest2() throws Exception { } @Test - public void createCustomDimensionExceptionTest2() throws Exception { + public void getDataRetentionSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - CustomDimension customDimension = CustomDimension.newBuilder().build(); - client.createCustomDimension(parent, customDimension); + String name = "name3373707"; + client.getDataRetentionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4725,29 +4776,27 @@ public void createCustomDimensionExceptionTest2() throws Exception { } @Test - public void updateCustomDimensionTest() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + public void updateDataRetentionSettingsTest() throws Exception { + DataRetentionSettings expectedResponse = + DataRetentionSettings.newBuilder() + .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) + .setResetUserDataOnNewActivity(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CustomDimension customDimension = CustomDimension.newBuilder().build(); + DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - CustomDimension actualResponse = client.updateCustomDimension(customDimension, updateMask); + DataRetentionSettings actualResponse = + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateCustomDimensionRequest actualRequest = - ((UpdateCustomDimensionRequest) actualRequests.get(0)); + UpdateDataRetentionSettingsRequest actualRequest = + ((UpdateDataRetentionSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(customDimension, actualRequest.getCustomDimension()); + Assert.assertEquals(dataRetentionSettings, actualRequest.getDataRetentionSettings()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -4756,14 +4805,14 @@ public void updateCustomDimensionTest() throws Exception { } @Test - public void updateCustomDimensionExceptionTest() throws Exception { + public void updateDataRetentionSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CustomDimension customDimension = CustomDimension.newBuilder().build(); + DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateCustomDimension(customDimension, updateMask); + client.updateDataRetentionSettings(dataRetentionSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4771,30 +4820,28 @@ public void updateCustomDimensionExceptionTest() throws Exception { } @Test - public void listCustomDimensionsTest() throws Exception { - CustomDimension responsesElement = CustomDimension.newBuilder().build(); - ListCustomDimensionsResponse expectedResponse = - ListCustomDimensionsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomDimensions(Arrays.asList(responsesElement)) + public void createDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); + DataStream dataStream = DataStream.newBuilder().build(); - ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); + DataStream actualResponse = client.createDataStream(parent, dataStream); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListCustomDimensionsRequest actualRequest = - ((ListCustomDimensionsRequest) actualRequests.get(0)); + CreateDataStreamRequest actualRequest = ((CreateDataStreamRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataStream, actualRequest.getDataStream()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4802,13 +4849,14 @@ public void listCustomDimensionsTest() throws Exception { } @Test - public void listCustomDimensionsExceptionTest() throws Exception { + public void createDataStreamExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listCustomDimensions(parent); + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4816,30 +4864,28 @@ public void listCustomDimensionsExceptionTest() throws Exception { } @Test - public void listCustomDimensionsTest2() throws Exception { - CustomDimension responsesElement = CustomDimension.newBuilder().build(); - ListCustomDimensionsResponse expectedResponse = - ListCustomDimensionsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomDimensions(Arrays.asList(responsesElement)) + public void createDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; + DataStream dataStream = DataStream.newBuilder().build(); - ListCustomDimensionsPagedResponse pagedListResponse = client.listCustomDimensions(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomDimensionsList().get(0), resources.get(0)); + DataStream actualResponse = client.createDataStream(parent, dataStream); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListCustomDimensionsRequest actualRequest = - ((ListCustomDimensionsRequest) actualRequests.get(0)); + CreateDataStreamRequest actualRequest = ((CreateDataStreamRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataStream, actualRequest.getDataStream()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4847,13 +4893,14 @@ public void listCustomDimensionsTest2() throws Exception { } @Test - public void listCustomDimensionsExceptionTest2() throws Exception { + public void createDataStreamExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - client.listCustomDimensions(parent); + DataStream dataStream = DataStream.newBuilder().build(); + client.createDataStream(parent, dataStream); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4861,18 +4908,17 @@ public void listCustomDimensionsExceptionTest2() throws Exception { } @Test - public void archiveCustomDimensionTest() throws Exception { + public void deleteDataStreamTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.archiveCustomDimension(name); + client.deleteDataStream(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ArchiveCustomDimensionRequest actualRequest = - ((ArchiveCustomDimensionRequest) actualRequests.get(0)); + DeleteDataStreamRequest actualRequest = ((DeleteDataStreamRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -4882,13 +4928,13 @@ public void archiveCustomDimensionTest() throws Exception { } @Test - public void archiveCustomDimensionExceptionTest() throws Exception { + public void deleteDataStreamExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - client.archiveCustomDimension(name); + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.deleteDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4896,18 +4942,17 @@ public void archiveCustomDimensionExceptionTest() throws Exception { } @Test - public void archiveCustomDimensionTest2() throws Exception { + public void deleteDataStreamTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - client.archiveCustomDimension(name); + client.deleteDataStream(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ArchiveCustomDimensionRequest actualRequest = - ((ArchiveCustomDimensionRequest) actualRequests.get(0)); + DeleteDataStreamRequest actualRequest = ((DeleteDataStreamRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -4917,13 +4962,13 @@ public void archiveCustomDimensionTest2() throws Exception { } @Test - public void archiveCustomDimensionExceptionTest2() throws Exception { + public void deleteDataStreamExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.archiveCustomDimension(name); + client.deleteDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4931,27 +4976,28 @@ public void archiveCustomDimensionExceptionTest2() throws Exception { } @Test - public void getCustomDimensionTest() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") + public void updateDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); + DataStream dataStream = DataStream.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - CustomDimension actualResponse = client.getCustomDimension(name); + DataStream actualResponse = client.updateDataStream(dataStream, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetCustomDimensionRequest actualRequest = ((GetCustomDimensionRequest) actualRequests.get(0)); + UpdateDataStreamRequest actualRequest = ((UpdateDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(dataStream, actualRequest.getDataStream()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -4959,13 +5005,14 @@ public void getCustomDimensionTest() throws Exception { } @Test - public void getCustomDimensionExceptionTest() throws Exception { + public void updateDataStreamExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CustomDimensionName name = CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]"); - client.getCustomDimension(name); + DataStream dataStream = DataStream.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataStream(dataStream, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -4973,71 +5020,29 @@ public void getCustomDimensionExceptionTest() throws Exception { } @Test - public void getCustomDimensionTest2() throws Exception { - CustomDimension expectedResponse = - CustomDimension.newBuilder() - .setName(CustomDimensionName.of("[PROPERTY]", "[CUSTOM_DIMENSION]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setDisallowAdsPersonalization(true) + public void listDataStreamsTest() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; - - CustomDimension actualResponse = client.getCustomDimension(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAnalyticsAdminService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetCustomDimensionRequest actualRequest = ((GetCustomDimensionRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getCustomDimensionExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsAdminService.addException(exception); - - try { - String name = "name3373707"; - client.getCustomDimension(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } + PropertyName parent = PropertyName.of("[PROPERTY]"); - @Test - public void createCustomMetricTest() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) - .build(); - mockAnalyticsAdminService.addResponse(expectedResponse); + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); - PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomMetric customMetric = CustomMetric.newBuilder().build(); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); - Assert.assertEquals(expectedResponse, actualResponse); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateCustomMetricRequest actualRequest = ((CreateCustomMetricRequest) actualRequests.get(0)); + ListDataStreamsRequest actualRequest = ((ListDataStreamsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5045,44 +5050,43 @@ public void createCustomMetricTest() throws Exception { } @Test - public void createCustomMetricExceptionTest() throws Exception { + public void listDataStreamsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - CustomMetric customMetric = CustomMetric.newBuilder().build(); - client.createCustomMetric(parent, customMetric); + client.listDataStreams(parent); Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createCustomMetricTest2() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataStreamsTest2() throws Exception { + DataStream responsesElement = DataStream.newBuilder().build(); + ListDataStreamsResponse expectedResponse = + ListDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllDataStreams(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - CustomMetric customMetric = CustomMetric.newBuilder().build(); - CustomMetric actualResponse = client.createCustomMetric(parent, customMetric); - Assert.assertEquals(expectedResponse, actualResponse); + ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateCustomMetricRequest actualRequest = ((CreateCustomMetricRequest) actualRequests.get(0)); + ListDataStreamsRequest actualRequest = ((ListDataStreamsRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5090,14 +5094,13 @@ public void createCustomMetricTest2() throws Exception { } @Test - public void createCustomMetricExceptionTest2() throws Exception { + public void listDataStreamsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - CustomMetric customMetric = CustomMetric.newBuilder().build(); - client.createCustomMetric(parent, customMetric); + client.listDataStreams(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5105,29 +5108,26 @@ public void createCustomMetricExceptionTest2() throws Exception { } @Test - public void updateCustomMetricTest() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") + public void getDataStreamTest() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CustomMetric customMetric = CustomMetric.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - CustomMetric actualResponse = client.updateCustomMetric(customMetric, updateMask); + DataStream actualResponse = client.getDataStream(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateCustomMetricRequest actualRequest = ((UpdateCustomMetricRequest) actualRequests.get(0)); + GetDataStreamRequest actualRequest = ((GetDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(customMetric, actualRequest.getCustomMetric()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5135,14 +5135,13 @@ public void updateCustomMetricTest() throws Exception { } @Test - public void updateCustomMetricExceptionTest() throws Exception { + public void getDataStreamExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CustomMetric customMetric = CustomMetric.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateCustomMetric(customMetric, updateMask); + DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5150,29 +5149,26 @@ public void updateCustomMetricExceptionTest() throws Exception { } @Test - public void listCustomMetricsTest() throws Exception { - CustomMetric responsesElement = CustomMetric.newBuilder().build(); - ListCustomMetricsResponse expectedResponse = - ListCustomMetricsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomMetrics(Arrays.asList(responsesElement)) + public void getDataStreamTest2() throws Exception { + DataStream expectedResponse = + DataStream.newBuilder() + .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); + DataStream actualResponse = client.getDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListCustomMetricsRequest actualRequest = ((ListCustomMetricsRequest) actualRequests.get(0)); + GetDataStreamRequest actualRequest = ((GetDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5180,13 +5176,13 @@ public void listCustomMetricsTest() throws Exception { } @Test - public void listCustomMetricsExceptionTest() throws Exception { + public void getDataStreamExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listCustomMetrics(parent); + String name = "name3373707"; + client.getDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5194,29 +5190,29 @@ public void listCustomMetricsExceptionTest() throws Exception { } @Test - public void listCustomMetricsTest2() throws Exception { - CustomMetric responsesElement = CustomMetric.newBuilder().build(); - ListCustomMetricsResponse expectedResponse = - ListCustomMetricsResponse.newBuilder() - .setNextPageToken("") - .addAllCustomMetrics(Arrays.asList(responsesElement)) + public void getAudienceTest() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListCustomMetricsPagedResponse pagedListResponse = client.listCustomMetrics(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getCustomMetricsList().get(0), resources.get(0)); + Audience actualResponse = client.getAudience(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListCustomMetricsRequest actualRequest = ((ListCustomMetricsRequest) actualRequests.get(0)); + GetAudienceRequest actualRequest = ((GetAudienceRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5224,13 +5220,13 @@ public void listCustomMetricsTest2() throws Exception { } @Test - public void listCustomMetricsExceptionTest2() throws Exception { + public void getAudienceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listCustomMetrics(parent); + AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); + client.getAudience(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5238,19 +5234,29 @@ public void listCustomMetricsExceptionTest2() throws Exception { } @Test - public void archiveCustomMetricTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getAudienceTest2() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + String name = "name3373707"; - client.archiveCustomMetric(name); + Audience actualResponse = client.getAudience(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ArchiveCustomMetricRequest actualRequest = ((ArchiveCustomMetricRequest) actualRequests.get(0)); + GetAudienceRequest actualRequest = ((GetAudienceRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5258,13 +5264,13 @@ public void archiveCustomMetricTest() throws Exception { } @Test - public void archiveCustomMetricExceptionTest() throws Exception { + public void getAudienceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - client.archiveCustomMetric(name); + String name = "name3373707"; + client.getAudience(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5272,19 +5278,29 @@ public void archiveCustomMetricExceptionTest() throws Exception { } @Test - public void archiveCustomMetricTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listAudiencesTest() throws Exception { + Audience responsesElement = Audience.newBuilder().build(); + ListAudiencesResponse expectedResponse = + ListAudiencesResponse.newBuilder() + .setNextPageToken("") + .addAllAudiences(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + PropertyName parent = PropertyName.of("[PROPERTY]"); - client.archiveCustomMetric(name); + ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ArchiveCustomMetricRequest actualRequest = ((ArchiveCustomMetricRequest) actualRequests.get(0)); + ListAudiencesRequest actualRequest = ((ListAudiencesRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5292,13 +5308,13 @@ public void archiveCustomMetricTest2() throws Exception { } @Test - public void archiveCustomMetricExceptionTest2() throws Exception { + public void listAudiencesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.archiveCustomMetric(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listAudiences(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5306,27 +5322,29 @@ public void archiveCustomMetricExceptionTest2() throws Exception { } @Test - public void getCustomMetricTest() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + public void listAudiencesTest2() throws Exception { + Audience responsesElement = Audience.newBuilder().build(); + ListAudiencesResponse expectedResponse = + ListAudiencesResponse.newBuilder() + .setNextPageToken("") + .addAllAudiences(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); + String parent = "parent-995424086"; - CustomMetric actualResponse = client.getCustomMetric(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetCustomMetricRequest actualRequest = ((GetCustomMetricRequest) actualRequests.get(0)); + ListAudiencesRequest actualRequest = ((ListAudiencesRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5334,13 +5352,13 @@ public void getCustomMetricTest() throws Exception { } @Test - public void getCustomMetricExceptionTest() throws Exception { + public void listAudiencesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CustomMetricName name = CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]"); - client.getCustomMetric(name); + String parent = "parent-995424086"; + client.listAudiences(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5348,27 +5366,31 @@ public void getCustomMetricExceptionTest() throws Exception { } @Test - public void getCustomMetricTest2() throws Exception { - CustomMetric expectedResponse = - CustomMetric.newBuilder() - .setName(CustomMetricName.of("[PROPERTY]", "[CUSTOM_METRIC]").toString()) - .setParameterName("parameterName-379607596") + public void createAudienceTest() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) .setDisplayName("displayName1714148973") .setDescription("description-1724546052") - .addAllRestrictedMetricType(new ArrayList()) + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + PropertyName parent = PropertyName.of("[PROPERTY]"); + Audience audience = Audience.newBuilder().build(); - CustomMetric actualResponse = client.getCustomMetric(name); + Audience actualResponse = client.createAudience(parent, audience); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetCustomMetricRequest actualRequest = ((GetCustomMetricRequest) actualRequests.get(0)); + CreateAudienceRequest actualRequest = ((CreateAudienceRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(audience, actualRequest.getAudience()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5376,13 +5398,14 @@ public void getCustomMetricTest2() throws Exception { } @Test - public void getCustomMetricExceptionTest2() throws Exception { + public void createAudienceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getCustomMetric(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + Audience audience = Audience.newBuilder().build(); + client.createAudience(parent, audience); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5390,25 +5413,31 @@ public void getCustomMetricExceptionTest2() throws Exception { } @Test - public void getDataRetentionSettingsTest() throws Exception { - DataRetentionSettings expectedResponse = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) + public void createAudienceTest2() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); + String parent = "parent-995424086"; + Audience audience = Audience.newBuilder().build(); - DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); + Audience actualResponse = client.createAudience(parent, audience); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDataRetentionSettingsRequest actualRequest = - ((GetDataRetentionSettingsRequest) actualRequests.get(0)); + CreateAudienceRequest actualRequest = ((CreateAudienceRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(audience, actualRequest.getAudience()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5416,13 +5445,14 @@ public void getDataRetentionSettingsTest() throws Exception { } @Test - public void getDataRetentionSettingsExceptionTest() throws Exception { + public void createAudienceExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataRetentionSettingsName name = DataRetentionSettingsName.of("[PROPERTY]"); - client.getDataRetentionSettings(name); + String parent = "parent-995424086"; + Audience audience = Audience.newBuilder().build(); + client.createAudience(parent, audience); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5430,25 +5460,31 @@ public void getDataRetentionSettingsExceptionTest() throws Exception { } @Test - public void getDataRetentionSettingsTest2() throws Exception { - DataRetentionSettings expectedResponse = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) + public void updateAudienceTest() throws Exception { + Audience expectedResponse = + Audience.newBuilder() + .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setMembershipDurationDays(1702404985) + .setAdsPersonalizationEnabled(true) + .setEventTrigger(AudienceEventTrigger.newBuilder().build()) + .addAllFilterClauses(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + Audience audience = Audience.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - DataRetentionSettings actualResponse = client.getDataRetentionSettings(name); + Audience actualResponse = client.updateAudience(audience, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDataRetentionSettingsRequest actualRequest = - ((GetDataRetentionSettingsRequest) actualRequests.get(0)); + UpdateAudienceRequest actualRequest = ((UpdateAudienceRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(audience, actualRequest.getAudience()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5456,13 +5492,14 @@ public void getDataRetentionSettingsTest2() throws Exception { } @Test - public void getDataRetentionSettingsExceptionTest2() throws Exception { + public void updateAudienceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getDataRetentionSettings(name); + Audience audience = Audience.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAudience(audience, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5470,28 +5507,22 @@ public void getDataRetentionSettingsExceptionTest2() throws Exception { } @Test - public void updateDataRetentionSettingsTest() throws Exception { - DataRetentionSettings expectedResponse = - DataRetentionSettings.newBuilder() - .setName(DataRetentionSettingsName.of("[PROPERTY]").toString()) - .setResetUserDataOnNewActivity(true) - .build(); + public void archiveAudienceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + ArchiveAudienceRequest request = + ArchiveAudienceRequest.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .build(); - DataRetentionSettings actualResponse = - client.updateDataRetentionSettings(dataRetentionSettings, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + client.archiveAudience(request); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateDataRetentionSettingsRequest actualRequest = - ((UpdateDataRetentionSettingsRequest) actualRequests.get(0)); + ArchiveAudienceRequest actualRequest = ((ArchiveAudienceRequest) actualRequests.get(0)); - Assert.assertEquals(dataRetentionSettings, actualRequest.getDataRetentionSettings()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(request.getName(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5499,14 +5530,16 @@ public void updateDataRetentionSettingsTest() throws Exception { } @Test - public void updateDataRetentionSettingsExceptionTest() throws Exception { + public void archiveAudienceExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataRetentionSettings dataRetentionSettings = DataRetentionSettings.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDataRetentionSettings(dataRetentionSettings, updateMask); + ArchiveAudienceRequest request = + ArchiveAudienceRequest.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .build(); + client.archiveAudience(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5514,28 +5547,29 @@ public void updateDataRetentionSettingsExceptionTest() throws Exception { } @Test - public void createDataStreamTest() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void getSearchAds360LinkTest() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - DataStream dataStream = DataStream.newBuilder().build(); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - DataStream actualResponse = client.createDataStream(parent, dataStream); + SearchAds360Link actualResponse = client.getSearchAds360Link(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDataStreamRequest actualRequest = ((CreateDataStreamRequest) actualRequests.get(0)); + GetSearchAds360LinkRequest actualRequest = ((GetSearchAds360LinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(dataStream, actualRequest.getDataStream()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5543,14 +5577,13 @@ public void createDataStreamTest() throws Exception { } @Test - public void createDataStreamExceptionTest() throws Exception { + public void getSearchAds360LinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - DataStream dataStream = DataStream.newBuilder().build(); - client.createDataStream(parent, dataStream); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + client.getSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5558,28 +5591,29 @@ public void createDataStreamExceptionTest() throws Exception { } @Test - public void createDataStreamTest2() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void getSearchAds360LinkTest2() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - DataStream dataStream = DataStream.newBuilder().build(); + String name = "name3373707"; - DataStream actualResponse = client.createDataStream(parent, dataStream); + SearchAds360Link actualResponse = client.getSearchAds360Link(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateDataStreamRequest actualRequest = ((CreateDataStreamRequest) actualRequests.get(0)); + GetSearchAds360LinkRequest actualRequest = ((GetSearchAds360LinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(dataStream, actualRequest.getDataStream()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5587,14 +5621,13 @@ public void createDataStreamTest2() throws Exception { } @Test - public void createDataStreamExceptionTest2() throws Exception { + public void getSearchAds360LinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - DataStream dataStream = DataStream.newBuilder().build(); - client.createDataStream(parent, dataStream); + String name = "name3373707"; + client.getSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5602,19 +5635,30 @@ public void createDataStreamExceptionTest2() throws Exception { } @Test - public void deleteDataStreamTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listSearchAds360LinksTest() throws Exception { + SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); + ListSearchAds360LinksResponse expectedResponse = + ListSearchAds360LinksResponse.newBuilder() + .setNextPageToken("") + .addAllSearchAds360Links(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); - client.deleteDataStream(name); + ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDataStreamRequest actualRequest = ((DeleteDataStreamRequest) actualRequests.get(0)); + ListSearchAds360LinksRequest actualRequest = + ((ListSearchAds360LinksRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5622,13 +5666,13 @@ public void deleteDataStreamTest() throws Exception { } @Test - public void deleteDataStreamExceptionTest() throws Exception { + public void listSearchAds360LinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.deleteDataStream(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listSearchAds360Links(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5636,19 +5680,30 @@ public void deleteDataStreamExceptionTest() throws Exception { } @Test - public void deleteDataStreamTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listSearchAds360LinksTest2() throws Exception { + SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); + ListSearchAds360LinksResponse expectedResponse = + ListSearchAds360LinksResponse.newBuilder() + .setNextPageToken("") + .addAllSearchAds360Links(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; - client.deleteDataStream(name); + ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteDataStreamRequest actualRequest = ((DeleteDataStreamRequest) actualRequests.get(0)); + ListSearchAds360LinksRequest actualRequest = + ((ListSearchAds360LinksRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5656,13 +5711,13 @@ public void deleteDataStreamTest2() throws Exception { } @Test - public void deleteDataStreamExceptionTest2() throws Exception { + public void listSearchAds360LinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteDataStream(name); + String parent = "parent-995424086"; + client.listSearchAds360Links(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5670,28 +5725,32 @@ public void deleteDataStreamExceptionTest2() throws Exception { } @Test - public void updateDataStreamTest() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void createSearchAds360LinkTest() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStream dataStream = DataStream.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - DataStream actualResponse = client.updateDataStream(dataStream, updateMask); + SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateDataStreamRequest actualRequest = ((UpdateDataStreamRequest) actualRequests.get(0)); + CreateSearchAds360LinkRequest actualRequest = + ((CreateSearchAds360LinkRequest) actualRequests.get(0)); - Assert.assertEquals(dataStream, actualRequest.getDataStream()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(searchAds360Link, actualRequest.getSearchAds360Link()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5699,14 +5758,14 @@ public void updateDataStreamTest() throws Exception { } @Test - public void updateDataStreamExceptionTest() throws Exception { + public void createSearchAds360LinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); - - try { - DataStream dataStream = DataStream.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDataStream(dataStream, updateMask); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + client.createSearchAds360Link(parent, searchAds360Link); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5714,29 +5773,32 @@ public void updateDataStreamExceptionTest() throws Exception { } @Test - public void listDataStreamsTest() throws Exception { - DataStream responsesElement = DataStream.newBuilder().build(); - ListDataStreamsResponse expectedResponse = - ListDataStreamsResponse.newBuilder() - .setNextPageToken("") - .addAllDataStreams(Arrays.asList(responsesElement)) + public void createSearchAds360LinkTest2() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String parent = "parent-995424086"; + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); + SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDataStreamsRequest actualRequest = ((ListDataStreamsRequest) actualRequests.get(0)); + CreateSearchAds360LinkRequest actualRequest = + ((CreateSearchAds360LinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(searchAds360Link, actualRequest.getSearchAds360Link()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5744,13 +5806,14 @@ public void listDataStreamsTest() throws Exception { } @Test - public void listDataStreamsExceptionTest() throws Exception { + public void createSearchAds360LinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listDataStreams(parent); + String parent = "parent-995424086"; + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + client.createSearchAds360Link(parent, searchAds360Link); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5758,29 +5821,20 @@ public void listDataStreamsExceptionTest() throws Exception { } @Test - public void listDataStreamsTest2() throws Exception { - DataStream responsesElement = DataStream.newBuilder().build(); - ListDataStreamsResponse expectedResponse = - ListDataStreamsResponse.newBuilder() - .setNextPageToken("") - .addAllDataStreams(Arrays.asList(responsesElement)) - .build(); + public void deleteSearchAds360LinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListDataStreamsPagedResponse pagedListResponse = client.listDataStreams(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDataStreamsList().get(0), resources.get(0)); + client.deleteSearchAds360Link(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListDataStreamsRequest actualRequest = ((ListDataStreamsRequest) actualRequests.get(0)); + DeleteSearchAds360LinkRequest actualRequest = + ((DeleteSearchAds360LinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5788,13 +5842,13 @@ public void listDataStreamsTest2() throws Exception { } @Test - public void listDataStreamsExceptionTest2() throws Exception { + public void deleteSearchAds360LinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listDataStreams(parent); + SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + client.deleteSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5802,26 +5856,20 @@ public void listDataStreamsExceptionTest2() throws Exception { } @Test - public void getDataStreamTest() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); + public void deleteSearchAds360LinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + String name = "name3373707"; - DataStream actualResponse = client.getDataStream(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSearchAds360Link(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDataStreamRequest actualRequest = ((GetDataStreamRequest) actualRequests.get(0)); + DeleteSearchAds360LinkRequest actualRequest = + ((DeleteSearchAds360LinkRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5829,13 +5877,13 @@ public void getDataStreamTest() throws Exception { } @Test - public void getDataStreamExceptionTest() throws Exception { + public void deleteSearchAds360LinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataStreamName name = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.getDataStream(name); + String name = "name3373707"; + client.deleteSearchAds360Link(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5843,26 +5891,32 @@ public void getDataStreamExceptionTest() throws Exception { } @Test - public void getDataStreamTest2() throws Exception { - DataStream expectedResponse = - DataStream.newBuilder() - .setName(DataStreamName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setDisplayName("displayName1714148973") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) + public void updateSearchAds360LinkTest() throws Exception { + SearchAds360Link expectedResponse = + SearchAds360Link.newBuilder() + .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) + .setAdvertiserId("advertiserId550061990") + .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) + .setCostDataSharingEnabled(BoolValue.newBuilder().build()) + .setAdvertiserDisplayName("advertiserDisplayName1594116162") + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - DataStream actualResponse = client.getDataStream(name); + SearchAds360Link actualResponse = client.updateSearchAds360Link(searchAds360Link, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetDataStreamRequest actualRequest = ((GetDataStreamRequest) actualRequests.get(0)); + UpdateSearchAds360LinkRequest actualRequest = + ((UpdateSearchAds360LinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(searchAds360Link, actualRequest.getSearchAds360Link()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -5870,13 +5924,14 @@ public void getDataStreamTest2() throws Exception { } @Test - public void getDataStreamExceptionTest2() throws Exception { + public void updateSearchAds360LinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getDataStream(name); + SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSearchAds360Link(searchAds360Link, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5884,27 +5939,22 @@ public void getDataStreamExceptionTest2() throws Exception { } @Test - public void getAudienceTest() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void getAttributionSettingsTest() throws Exception { + AttributionSettings expectedResponse = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); + AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); - Audience actualResponse = client.getAudience(name); + AttributionSettings actualResponse = client.getAttributionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAudienceRequest actualRequest = ((GetAudienceRequest) actualRequests.get(0)); + GetAttributionSettingsRequest actualRequest = + ((GetAttributionSettingsRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -5914,13 +5964,13 @@ public void getAudienceTest() throws Exception { } @Test - public void getAudienceExceptionTest() throws Exception { + public void getAttributionSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AudienceName name = AudienceName.of("[PROPERTY]", "[AUDIENCE]"); - client.getAudience(name); + AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); + client.getAttributionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5928,27 +5978,22 @@ public void getAudienceExceptionTest() throws Exception { } @Test - public void getAudienceTest2() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void getAttributionSettingsTest2() throws Exception { + AttributionSettings expectedResponse = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - Audience actualResponse = client.getAudience(name); + AttributionSettings actualResponse = client.getAttributionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAudienceRequest actualRequest = ((GetAudienceRequest) actualRequests.get(0)); + GetAttributionSettingsRequest actualRequest = + ((GetAttributionSettingsRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -5958,13 +6003,13 @@ public void getAudienceTest2() throws Exception { } @Test - public void getAudienceExceptionTest2() throws Exception { + public void getAttributionSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.getAudience(name); + client.getAttributionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -5972,29 +6017,27 @@ public void getAudienceExceptionTest2() throws Exception { } @Test - public void listAudiencesTest() throws Exception { - Audience responsesElement = Audience.newBuilder().build(); - ListAudiencesResponse expectedResponse = - ListAudiencesResponse.newBuilder() - .setNextPageToken("") - .addAllAudiences(Arrays.asList(responsesElement)) + public void updateAttributionSettingsTest() throws Exception { + AttributionSettings expectedResponse = + AttributionSettings.newBuilder() + .setName(AttributionSettingsName.of("[PROPERTY]").toString()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + AttributionSettings attributionSettings = AttributionSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); + AttributionSettings actualResponse = + client.updateAttributionSettings(attributionSettings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAudiencesRequest actualRequest = ((ListAudiencesRequest) actualRequests.get(0)); + UpdateAttributionSettingsRequest actualRequest = + ((UpdateAttributionSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(attributionSettings, actualRequest.getAttributionSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6002,13 +6045,14 @@ public void listAudiencesTest() throws Exception { } @Test - public void listAudiencesExceptionTest() throws Exception { + public void updateAttributionSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listAudiences(parent); + AttributionSettings attributionSettings = AttributionSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAttributionSettings(attributionSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6016,29 +6060,54 @@ public void listAudiencesExceptionTest() throws Exception { } @Test - public void listAudiencesTest2() throws Exception { - Audience responsesElement = Audience.newBuilder().build(); - ListAudiencesResponse expectedResponse = - ListAudiencesResponse.newBuilder() - .setNextPageToken("") - .addAllAudiences(Arrays.asList(responsesElement)) + public void runAccessReportTest() throws Exception { + RunAccessReportResponse expectedResponse = + RunAccessReportResponse.newBuilder() + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .setRowCount(1340416618) + .setQuota(AccessQuota.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListAudiencesPagedResponse pagedListResponse = client.listAudiences(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAudiencesList().get(0), resources.get(0)); + RunAccessReportRequest request = + RunAccessReportRequest.newBuilder() + .setEntity("entity-1298275357") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(AccessFilterExpression.newBuilder().build()) + .setMetricFilter(AccessFilterExpression.newBuilder().build()) + .setOffset(-1019779949) + .setLimit(102976443) + .setTimeZone("timeZone-2077180903") + .addAllOrderBys(new ArrayList()) + .setReturnEntityQuota(true) + .setIncludeAllUsers(true) + .setExpandGroups(true) + .build(); + + RunAccessReportResponse actualResponse = client.runAccessReport(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAudiencesRequest actualRequest = ((ListAudiencesRequest) actualRequests.get(0)); + RunAccessReportRequest actualRequest = ((RunAccessReportRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); + Assert.assertEquals(request.getDimensionsList(), actualRequest.getDimensionsList()); + Assert.assertEquals(request.getMetricsList(), actualRequest.getMetricsList()); + Assert.assertEquals(request.getDateRangesList(), actualRequest.getDateRangesList()); + Assert.assertEquals(request.getDimensionFilter(), actualRequest.getDimensionFilter()); + Assert.assertEquals(request.getMetricFilter(), actualRequest.getMetricFilter()); + Assert.assertEquals(request.getOffset(), actualRequest.getOffset()); + Assert.assertEquals(request.getLimit(), actualRequest.getLimit()); + Assert.assertEquals(request.getTimeZone(), actualRequest.getTimeZone()); + Assert.assertEquals(request.getOrderBysList(), actualRequest.getOrderBysList()); + Assert.assertEquals(request.getReturnEntityQuota(), actualRequest.getReturnEntityQuota()); + Assert.assertEquals(request.getIncludeAllUsers(), actualRequest.getIncludeAllUsers()); + Assert.assertEquals(request.getExpandGroups(), actualRequest.getExpandGroups()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6046,13 +6115,28 @@ public void listAudiencesTest2() throws Exception { } @Test - public void listAudiencesExceptionTest2() throws Exception { + public void runAccessReportExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listAudiences(parent); + RunAccessReportRequest request = + RunAccessReportRequest.newBuilder() + .setEntity("entity-1298275357") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(AccessFilterExpression.newBuilder().build()) + .setMetricFilter(AccessFilterExpression.newBuilder().build()) + .setOffset(-1019779949) + .setLimit(102976443) + .setTimeZone("timeZone-2077180903") + .addAllOrderBys(new ArrayList()) + .setReturnEntityQuota(true) + .setIncludeAllUsers(true) + .setExpandGroups(true) + .build(); + client.runAccessReport(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6060,31 +6144,28 @@ public void listAudiencesExceptionTest2() throws Exception { } @Test - public void createAudienceTest() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void createAccessBindingTest() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - Audience audience = Audience.newBuilder().build(); + AccountName parent = AccountName.of("[ACCOUNT]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); - Audience actualResponse = client.createAudience(parent, audience); + AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateAudienceRequest actualRequest = ((CreateAudienceRequest) actualRequests.get(0)); + CreateAccessBindingRequest actualRequest = ((CreateAccessBindingRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(audience, actualRequest.getAudience()); + Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6092,14 +6173,14 @@ public void createAudienceTest() throws Exception { } @Test - public void createAudienceExceptionTest() throws Exception { + public void createAccessBindingExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - Audience audience = Audience.newBuilder().build(); - client.createAudience(parent, audience); + AccountName parent = AccountName.of("[ACCOUNT]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); + client.createAccessBinding(parent, accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6107,31 +6188,28 @@ public void createAudienceExceptionTest() throws Exception { } @Test - public void createAudienceTest2() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void createAccessBindingTest2() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - Audience audience = Audience.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); - Audience actualResponse = client.createAudience(parent, audience); + AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateAudienceRequest actualRequest = ((CreateAudienceRequest) actualRequests.get(0)); + CreateAccessBindingRequest actualRequest = ((CreateAccessBindingRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(audience, actualRequest.getAudience()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6139,14 +6217,14 @@ public void createAudienceTest2() throws Exception { } @Test - public void createAudienceExceptionTest2() throws Exception { + public void createAccessBindingExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - Audience audience = Audience.newBuilder().build(); - client.createAudience(parent, audience); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); + client.createAccessBinding(parent, accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6154,31 +6232,28 @@ public void createAudienceExceptionTest2() throws Exception { } @Test - public void updateAudienceTest() throws Exception { - Audience expectedResponse = - Audience.newBuilder() - .setName(AudienceName.of("[PROPERTY]", "[AUDIENCE]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setMembershipDurationDays(1702404985) - .setAdsPersonalizationEnabled(true) - .setEventTrigger(AudienceEventTrigger.newBuilder().build()) - .addAllFilterClauses(new ArrayList()) + public void createAccessBindingTest3() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - Audience audience = Audience.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String parent = "parent-995424086"; + AccessBinding accessBinding = AccessBinding.newBuilder().build(); - Audience actualResponse = client.updateAudience(audience, updateMask); + AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateAudienceRequest actualRequest = ((UpdateAudienceRequest) actualRequests.get(0)); + CreateAccessBindingRequest actualRequest = ((CreateAccessBindingRequest) actualRequests.get(0)); - Assert.assertEquals(audience, actualRequest.getAudience()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6186,14 +6261,14 @@ public void updateAudienceTest() throws Exception { } @Test - public void updateAudienceExceptionTest() throws Exception { + public void createAccessBindingExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - Audience audience = Audience.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateAudience(audience, updateMask); + String parent = "parent-995424086"; + AccessBinding accessBinding = AccessBinding.newBuilder().build(); + client.createAccessBinding(parent, accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6201,22 +6276,27 @@ public void updateAudienceExceptionTest() throws Exception { } @Test - public void archiveAudienceTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getAccessBindingTest() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ArchiveAudienceRequest request = - ArchiveAudienceRequest.newBuilder() - .setName(PropertyName.of("[PROPERTY]").toString()) - .build(); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - client.archiveAudience(request); + AccessBinding actualResponse = client.getAccessBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ArchiveAudienceRequest actualRequest = ((ArchiveAudienceRequest) actualRequests.get(0)); + GetAccessBindingRequest actualRequest = ((GetAccessBindingRequest) actualRequests.get(0)); - Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6224,16 +6304,14 @@ public void archiveAudienceTest() throws Exception { } @Test - public void archiveAudienceExceptionTest() throws Exception { + public void getAccessBindingExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ArchiveAudienceRequest request = - ArchiveAudienceRequest.newBuilder() - .setName(PropertyName.of("[PROPERTY]").toString()) - .build(); - client.archiveAudience(request); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + client.getAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6241,29 +6319,26 @@ public void archiveAudienceExceptionTest() throws Exception { } @Test - public void getSearchAds360LinkTest() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void getAccessBindingTest2() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + String name = "name3373707"; - SearchAds360Link actualResponse = client.getSearchAds360Link(name); + AccessBinding actualResponse = client.getAccessBinding(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetSearchAds360LinkRequest actualRequest = ((GetSearchAds360LinkRequest) actualRequests.get(0)); + GetAccessBindingRequest actualRequest = ((GetAccessBindingRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6271,13 +6346,13 @@ public void getSearchAds360LinkTest() throws Exception { } @Test - public void getSearchAds360LinkExceptionTest() throws Exception { + public void getAccessBindingExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - client.getSearchAds360Link(name); + String name = "name3373707"; + client.getAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6285,29 +6360,26 @@ public void getSearchAds360LinkExceptionTest() throws Exception { } @Test - public void getSearchAds360LinkTest2() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void updateAccessBindingTest() throws Exception { + AccessBinding expectedResponse = + AccessBinding.newBuilder() + .setName( + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") + .toString()) + .addAllRoles(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + AccessBinding accessBinding = AccessBinding.newBuilder().build(); - SearchAds360Link actualResponse = client.getSearchAds360Link(name); + AccessBinding actualResponse = client.updateAccessBinding(accessBinding); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetSearchAds360LinkRequest actualRequest = ((GetSearchAds360LinkRequest) actualRequests.get(0)); + UpdateAccessBindingRequest actualRequest = ((UpdateAccessBindingRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6315,13 +6387,13 @@ public void getSearchAds360LinkTest2() throws Exception { } @Test - public void getSearchAds360LinkExceptionTest2() throws Exception { + public void updateAccessBindingExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getSearchAds360Link(name); + AccessBinding accessBinding = AccessBinding.newBuilder().build(); + client.updateAccessBinding(accessBinding); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6329,30 +6401,20 @@ public void getSearchAds360LinkExceptionTest2() throws Exception { } @Test - public void listSearchAds360LinksTest() throws Exception { - SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); - ListSearchAds360LinksResponse expectedResponse = - ListSearchAds360LinksResponse.newBuilder() - .setNextPageToken("") - .addAllSearchAds360Links(Arrays.asList(responsesElement)) - .build(); + public void deleteAccessBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); + client.deleteAccessBinding(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListSearchAds360LinksRequest actualRequest = - ((ListSearchAds360LinksRequest) actualRequests.get(0)); + DeleteAccessBindingRequest actualRequest = ((DeleteAccessBindingRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6360,13 +6422,14 @@ public void listSearchAds360LinksTest() throws Exception { } @Test - public void listSearchAds360LinksExceptionTest() throws Exception { + public void deleteAccessBindingExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listSearchAds360Links(parent); + AccessBindingName name = + AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + client.deleteAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6374,30 +6437,19 @@ public void listSearchAds360LinksExceptionTest() throws Exception { } @Test - public void listSearchAds360LinksTest2() throws Exception { - SearchAds360Link responsesElement = SearchAds360Link.newBuilder().build(); - ListSearchAds360LinksResponse expectedResponse = - ListSearchAds360LinksResponse.newBuilder() - .setNextPageToken("") - .addAllSearchAds360Links(Arrays.asList(responsesElement)) - .build(); + public void deleteAccessBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListSearchAds360LinksPagedResponse pagedListResponse = client.listSearchAds360Links(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSearchAds360LinksList().get(0), resources.get(0)); + client.deleteAccessBinding(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListSearchAds360LinksRequest actualRequest = - ((ListSearchAds360LinksRequest) actualRequests.get(0)); + DeleteAccessBindingRequest actualRequest = ((DeleteAccessBindingRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6405,13 +6457,13 @@ public void listSearchAds360LinksTest2() throws Exception { } @Test - public void listSearchAds360LinksExceptionTest2() throws Exception { + public void deleteAccessBindingExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listSearchAds360Links(parent); + String name = "name3373707"; + client.deleteAccessBinding(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6419,32 +6471,29 @@ public void listSearchAds360LinksExceptionTest2() throws Exception { } @Test - public void createSearchAds360LinkTest() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void listAccessBindingsTest() throws Exception { + AccessBinding responsesElement = AccessBinding.newBuilder().build(); + ListAccessBindingsResponse expectedResponse = + ListAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAccessBindings(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + AccountName parent = AccountName.of("[ACCOUNT]"); - SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); - Assert.assertEquals(expectedResponse, actualResponse); + ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateSearchAds360LinkRequest actualRequest = - ((CreateSearchAds360LinkRequest) actualRequests.get(0)); + ListAccessBindingsRequest actualRequest = ((ListAccessBindingsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(searchAds360Link, actualRequest.getSearchAds360Link()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6452,14 +6501,13 @@ public void createSearchAds360LinkTest() throws Exception { } @Test - public void createSearchAds360LinkExceptionTest() throws Exception { + public void listAccessBindingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - client.createSearchAds360Link(parent, searchAds360Link); + AccountName parent = AccountName.of("[ACCOUNT]"); + client.listAccessBindings(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6467,32 +6515,29 @@ public void createSearchAds360LinkExceptionTest() throws Exception { } @Test - public void createSearchAds360LinkTest2() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void listAccessBindingsTest2() throws Exception { + AccessBinding responsesElement = AccessBinding.newBuilder().build(); + ListAccessBindingsResponse expectedResponse = + ListAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAccessBindings(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - SearchAds360Link actualResponse = client.createSearchAds360Link(parent, searchAds360Link); - Assert.assertEquals(expectedResponse, actualResponse); + ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateSearchAds360LinkRequest actualRequest = - ((CreateSearchAds360LinkRequest) actualRequests.get(0)); + ListAccessBindingsRequest actualRequest = ((ListAccessBindingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(searchAds360Link, actualRequest.getSearchAds360Link()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6500,14 +6545,13 @@ public void createSearchAds360LinkTest2() throws Exception { } @Test - public void createSearchAds360LinkExceptionTest2() throws Exception { + public void listAccessBindingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - client.createSearchAds360Link(parent, searchAds360Link); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listAccessBindings(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6515,20 +6559,29 @@ public void createSearchAds360LinkExceptionTest2() throws Exception { } @Test - public void deleteSearchAds360LinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void listAccessBindingsTest3() throws Exception { + AccessBinding responsesElement = AccessBinding.newBuilder().build(); + ListAccessBindingsResponse expectedResponse = + ListAccessBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAccessBindings(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); + String parent = "parent-995424086"; - client.deleteSearchAds360Link(name); + ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSearchAds360LinkRequest actualRequest = - ((DeleteSearchAds360LinkRequest) actualRequests.get(0)); + ListAccessBindingsRequest actualRequest = ((ListAccessBindingsRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6536,13 +6589,13 @@ public void deleteSearchAds360LinkTest() throws Exception { } @Test - public void deleteSearchAds360LinkExceptionTest() throws Exception { + public void listAccessBindingsExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - SearchAds360LinkName name = SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]"); - client.deleteSearchAds360Link(name); + String parent = "parent-995424086"; + client.listAccessBindings(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6550,20 +6603,29 @@ public void deleteSearchAds360LinkExceptionTest() throws Exception { } @Test - public void deleteSearchAds360LinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void batchCreateAccessBindingsTest() throws Exception { + BatchCreateAccessBindingsResponse expectedResponse = + BatchCreateAccessBindingsResponse.newBuilder() + .addAllAccessBindings(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + BatchCreateAccessBindingsRequest request = + BatchCreateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); - client.deleteSearchAds360Link(name); + BatchCreateAccessBindingsResponse actualResponse = client.batchCreateAccessBindings(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSearchAds360LinkRequest actualRequest = - ((DeleteSearchAds360LinkRequest) actualRequests.get(0)); + BatchCreateAccessBindingsRequest actualRequest = + ((BatchCreateAccessBindingsRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6571,13 +6633,17 @@ public void deleteSearchAds360LinkTest2() throws Exception { } @Test - public void deleteSearchAds360LinkExceptionTest2() throws Exception { + public void batchCreateAccessBindingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteSearchAds360Link(name); + BatchCreateAccessBindingsRequest request = + BatchCreateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchCreateAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6585,32 +6651,29 @@ public void deleteSearchAds360LinkExceptionTest2() throws Exception { } @Test - public void updateSearchAds360LinkTest() throws Exception { - SearchAds360Link expectedResponse = - SearchAds360Link.newBuilder() - .setName(SearchAds360LinkName.of("[PROPERTY]", "[SEARCH_ADS_360_LINK]").toString()) - .setAdvertiserId("advertiserId550061990") - .setCampaignDataSharingEnabled(BoolValue.newBuilder().build()) - .setCostDataSharingEnabled(BoolValue.newBuilder().build()) - .setAdvertiserDisplayName("advertiserDisplayName1594116162") - .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) - .setSiteStatsSharingEnabled(BoolValue.newBuilder().build()) + public void batchGetAccessBindingsTest() throws Exception { + BatchGetAccessBindingsResponse expectedResponse = + BatchGetAccessBindingsResponse.newBuilder() + .addAllAccessBindings(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + BatchGetAccessBindingsRequest request = + BatchGetAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllNames(new ArrayList()) + .build(); - SearchAds360Link actualResponse = client.updateSearchAds360Link(searchAds360Link, updateMask); + BatchGetAccessBindingsResponse actualResponse = client.batchGetAccessBindings(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateSearchAds360LinkRequest actualRequest = - ((UpdateSearchAds360LinkRequest) actualRequests.get(0)); + BatchGetAccessBindingsRequest actualRequest = + ((BatchGetAccessBindingsRequest) actualRequests.get(0)); - Assert.assertEquals(searchAds360Link, actualRequest.getSearchAds360Link()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getNamesList(), actualRequest.getNamesList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6618,14 +6681,17 @@ public void updateSearchAds360LinkTest() throws Exception { } @Test - public void updateSearchAds360LinkExceptionTest() throws Exception { + public void batchGetAccessBindingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - SearchAds360Link searchAds360Link = SearchAds360Link.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSearchAds360Link(searchAds360Link, updateMask); + BatchGetAccessBindingsRequest request = + BatchGetAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllNames(new ArrayList()) + .build(); + client.batchGetAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6633,24 +6699,29 @@ public void updateSearchAds360LinkExceptionTest() throws Exception { } @Test - public void getAttributionSettingsTest() throws Exception { - AttributionSettings expectedResponse = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + public void batchUpdateAccessBindingsTest() throws Exception { + BatchUpdateAccessBindingsResponse expectedResponse = + BatchUpdateAccessBindingsResponse.newBuilder() + .addAllAccessBindings(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); + BatchUpdateAccessBindingsRequest request = + BatchUpdateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); - AttributionSettings actualResponse = client.getAttributionSettings(name); + BatchUpdateAccessBindingsResponse actualResponse = client.batchUpdateAccessBindings(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAttributionSettingsRequest actualRequest = - ((GetAttributionSettingsRequest) actualRequests.get(0)); + BatchUpdateAccessBindingsRequest actualRequest = + ((BatchUpdateAccessBindingsRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6658,13 +6729,17 @@ public void getAttributionSettingsTest() throws Exception { } @Test - public void getAttributionSettingsExceptionTest() throws Exception { + public void batchUpdateAccessBindingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AttributionSettingsName name = AttributionSettingsName.of("[PROPERTY]"); - client.getAttributionSettings(name); + BatchUpdateAccessBindingsRequest request = + BatchUpdateAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchUpdateAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6672,24 +6747,25 @@ public void getAttributionSettingsExceptionTest() throws Exception { } @Test - public void getAttributionSettingsTest2() throws Exception { - AttributionSettings expectedResponse = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) - .build(); + public void batchDeleteAccessBindingsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + BatchDeleteAccessBindingsRequest request = + BatchDeleteAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); - AttributionSettings actualResponse = client.getAttributionSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.batchDeleteAccessBindings(request); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAttributionSettingsRequest actualRequest = - ((GetAttributionSettingsRequest) actualRequests.get(0)); + BatchDeleteAccessBindingsRequest actualRequest = + ((BatchDeleteAccessBindingsRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6697,13 +6773,17 @@ public void getAttributionSettingsTest2() throws Exception { } @Test - public void getAttributionSettingsExceptionTest2() throws Exception { + public void batchDeleteAccessBindingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getAttributionSettings(name); + BatchDeleteAccessBindingsRequest request = + BatchDeleteAccessBindingsRequest.newBuilder() + .setParent(AccountName.of("[ACCOUNT]").toString()) + .addAllRequests(new ArrayList()) + .build(); + client.batchDeleteAccessBindings(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6711,27 +6791,29 @@ public void getAttributionSettingsExceptionTest2() throws Exception { } @Test - public void updateAttributionSettingsTest() throws Exception { - AttributionSettings expectedResponse = - AttributionSettings.newBuilder() - .setName(AttributionSettingsName.of("[PROPERTY]").toString()) + public void getExpandedDataSetTest() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AttributionSettings attributionSettings = AttributionSettings.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - AttributionSettings actualResponse = - client.updateAttributionSettings(attributionSettings, updateMask); + ExpandedDataSet actualResponse = client.getExpandedDataSet(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateAttributionSettingsRequest actualRequest = - ((UpdateAttributionSettingsRequest) actualRequests.get(0)); + GetExpandedDataSetRequest actualRequest = ((GetExpandedDataSetRequest) actualRequests.get(0)); - Assert.assertEquals(attributionSettings, actualRequest.getAttributionSettings()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6739,14 +6821,13 @@ public void updateAttributionSettingsTest() throws Exception { } @Test - public void updateAttributionSettingsExceptionTest() throws Exception { + public void getExpandedDataSetExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AttributionSettings attributionSettings = AttributionSettings.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateAttributionSettings(attributionSettings, updateMask); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + client.getExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6754,50 +6835,29 @@ public void updateAttributionSettingsExceptionTest() throws Exception { } @Test - public void runAccessReportTest() throws Exception { - RunAccessReportResponse expectedResponse = - RunAccessReportResponse.newBuilder() - .addAllDimensionHeaders(new ArrayList()) - .addAllMetricHeaders(new ArrayList()) - .addAllRows(new ArrayList()) - .setRowCount(1340416618) - .setQuota(AccessQuota.newBuilder().build()) + public void getExpandedDataSetTest2() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - RunAccessReportRequest request = - RunAccessReportRequest.newBuilder() - .setEntity("entity-1298275357") - .addAllDimensions(new ArrayList()) - .addAllMetrics(new ArrayList()) - .addAllDateRanges(new ArrayList()) - .setDimensionFilter(AccessFilterExpression.newBuilder().build()) - .setMetricFilter(AccessFilterExpression.newBuilder().build()) - .setOffset(-1019779949) - .setLimit(102976443) - .setTimeZone("timeZone-2077180903") - .addAllOrderBys(new ArrayList()) - .setReturnEntityQuota(true) - .build(); + String name = "name3373707"; - RunAccessReportResponse actualResponse = client.runAccessReport(request); + ExpandedDataSet actualResponse = client.getExpandedDataSet(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - RunAccessReportRequest actualRequest = ((RunAccessReportRequest) actualRequests.get(0)); + GetExpandedDataSetRequest actualRequest = ((GetExpandedDataSetRequest) actualRequests.get(0)); - Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); - Assert.assertEquals(request.getDimensionsList(), actualRequest.getDimensionsList()); - Assert.assertEquals(request.getMetricsList(), actualRequest.getMetricsList()); - Assert.assertEquals(request.getDateRangesList(), actualRequest.getDateRangesList()); - Assert.assertEquals(request.getDimensionFilter(), actualRequest.getDimensionFilter()); - Assert.assertEquals(request.getMetricFilter(), actualRequest.getMetricFilter()); - Assert.assertEquals(request.getOffset(), actualRequest.getOffset()); - Assert.assertEquals(request.getLimit(), actualRequest.getLimit()); - Assert.assertEquals(request.getTimeZone(), actualRequest.getTimeZone()); - Assert.assertEquals(request.getOrderBysList(), actualRequest.getOrderBysList()); - Assert.assertEquals(request.getReturnEntityQuota(), actualRequest.getReturnEntityQuota()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6805,26 +6865,13 @@ public void runAccessReportTest() throws Exception { } @Test - public void runAccessReportExceptionTest() throws Exception { + public void getExpandedDataSetExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - RunAccessReportRequest request = - RunAccessReportRequest.newBuilder() - .setEntity("entity-1298275357") - .addAllDimensions(new ArrayList()) - .addAllMetrics(new ArrayList()) - .addAllDateRanges(new ArrayList()) - .setDimensionFilter(AccessFilterExpression.newBuilder().build()) - .setMetricFilter(AccessFilterExpression.newBuilder().build()) - .setOffset(-1019779949) - .setLimit(102976443) - .setTimeZone("timeZone-2077180903") - .addAllOrderBys(new ArrayList()) - .setReturnEntityQuota(true) - .build(); - client.runAccessReport(request); + String name = "name3373707"; + client.getExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6832,28 +6879,30 @@ public void runAccessReportExceptionTest() throws Exception { } @Test - public void createAccessBindingTest() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void listExpandedDataSetsTest() throws Exception { + ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); + ListExpandedDataSetsResponse expectedResponse = + ListExpandedDataSetsResponse.newBuilder() + .setNextPageToken("") + .addAllExpandedDataSets(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); - Assert.assertEquals(expectedResponse, actualResponse); + ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateAccessBindingRequest actualRequest = ((CreateAccessBindingRequest) actualRequests.get(0)); + ListExpandedDataSetsRequest actualRequest = + ((ListExpandedDataSetsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6861,14 +6910,13 @@ public void createAccessBindingTest() throws Exception { } @Test - public void createAccessBindingExceptionTest() throws Exception { + public void listExpandedDataSetsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); - client.createAccessBinding(parent, accessBinding); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listExpandedDataSets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6876,28 +6924,30 @@ public void createAccessBindingExceptionTest() throws Exception { } @Test - public void createAccessBindingTest2() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void listExpandedDataSetsTest2() throws Exception { + ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); + ListExpandedDataSetsResponse expectedResponse = + ListExpandedDataSetsResponse.newBuilder() + .setNextPageToken("") + .addAllExpandedDataSets(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); + String parent = "parent-995424086"; - AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); - Assert.assertEquals(expectedResponse, actualResponse); + ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateAccessBindingRequest actualRequest = ((CreateAccessBindingRequest) actualRequests.get(0)); + ListExpandedDataSetsRequest actualRequest = + ((ListExpandedDataSetsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6905,14 +6955,13 @@ public void createAccessBindingTest2() throws Exception { } @Test - public void createAccessBindingExceptionTest2() throws Exception { + public void listExpandedDataSetsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); - client.createAccessBinding(parent, accessBinding); + String parent = "parent-995424086"; + client.listExpandedDataSets(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -6920,28 +6969,32 @@ public void createAccessBindingExceptionTest2() throws Exception { } @Test - public void createAccessBindingTest3() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void createExpandedDataSetTest() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - AccessBinding accessBinding = AccessBinding.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - AccessBinding actualResponse = client.createAccessBinding(parent, accessBinding); + ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateAccessBindingRequest actualRequest = ((CreateAccessBindingRequest) actualRequests.get(0)); + CreateExpandedDataSetRequest actualRequest = + ((CreateExpandedDataSetRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(expandedDataSet, actualRequest.getExpandedDataSet()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6949,42 +7002,47 @@ public void createAccessBindingTest3() throws Exception { } @Test - public void createAccessBindingExceptionTest3() throws Exception { + public void createExpandedDataSetExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - AccessBinding accessBinding = AccessBinding.newBuilder().build(); - client.createAccessBinding(parent, accessBinding); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + client.createExpandedDataSet(parent, expandedDataSet); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } - - @Test - public void getAccessBindingTest() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + + @Test + public void createExpandedDataSetTest2() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + String parent = "parent-995424086"; + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - AccessBinding actualResponse = client.getAccessBinding(name); + ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAccessBindingRequest actualRequest = ((GetAccessBindingRequest) actualRequests.get(0)); + CreateExpandedDataSetRequest actualRequest = + ((CreateExpandedDataSetRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(expandedDataSet, actualRequest.getExpandedDataSet()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -6992,14 +7050,14 @@ public void getAccessBindingTest() throws Exception { } @Test - public void getAccessBindingExceptionTest() throws Exception { + public void createExpandedDataSetExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - client.getAccessBinding(name); + String parent = "parent-995424086"; + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + client.createExpandedDataSet(parent, expandedDataSet); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7007,26 +7065,32 @@ public void getAccessBindingExceptionTest() throws Exception { } @Test - public void getAccessBindingTest2() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) + public void updateExpandedDataSetTest() throws Exception { + ExpandedDataSet expectedResponse = + ExpandedDataSet.newBuilder() + .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllDimensionNames(new ArrayList()) + .addAllMetricNames(new ArrayList()) + .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) + .setDataCollectionStartTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - AccessBinding actualResponse = client.getAccessBinding(name); + ExpandedDataSet actualResponse = client.updateExpandedDataSet(expandedDataSet, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAccessBindingRequest actualRequest = ((GetAccessBindingRequest) actualRequests.get(0)); + UpdateExpandedDataSetRequest actualRequest = + ((UpdateExpandedDataSetRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(expandedDataSet, actualRequest.getExpandedDataSet()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7034,13 +7098,14 @@ public void getAccessBindingTest2() throws Exception { } @Test - public void getAccessBindingExceptionTest2() throws Exception { + public void updateExpandedDataSetExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getAccessBinding(name); + ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExpandedDataSet(expandedDataSet, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7048,26 +7113,20 @@ public void getAccessBindingExceptionTest2() throws Exception { } @Test - public void updateAccessBindingTest() throws Exception { - AccessBinding expectedResponse = - AccessBinding.newBuilder() - .setName( - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]") - .toString()) - .addAllRoles(new ArrayList()) - .build(); + public void deleteExpandedDataSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccessBinding accessBinding = AccessBinding.newBuilder().build(); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - AccessBinding actualResponse = client.updateAccessBinding(accessBinding); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteExpandedDataSet(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateAccessBindingRequest actualRequest = ((UpdateAccessBindingRequest) actualRequests.get(0)); + DeleteExpandedDataSetRequest actualRequest = + ((DeleteExpandedDataSetRequest) actualRequests.get(0)); - Assert.assertEquals(accessBinding, actualRequest.getAccessBinding()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7075,13 +7134,13 @@ public void updateAccessBindingTest() throws Exception { } @Test - public void updateAccessBindingExceptionTest() throws Exception { + public void deleteExpandedDataSetExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccessBinding accessBinding = AccessBinding.newBuilder().build(); - client.updateAccessBinding(accessBinding); + ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + client.deleteExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7089,20 +7148,20 @@ public void updateAccessBindingExceptionTest() throws Exception { } @Test - public void deleteAccessBindingTest() throws Exception { + public void deleteExpandedDataSetTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); + String name = "name3373707"; - client.deleteAccessBinding(name); + client.deleteExpandedDataSet(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteAccessBindingRequest actualRequest = ((DeleteAccessBindingRequest) actualRequests.get(0)); + DeleteExpandedDataSetRequest actualRequest = + ((DeleteExpandedDataSetRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7110,14 +7169,13 @@ public void deleteAccessBindingTest() throws Exception { } @Test - public void deleteAccessBindingExceptionTest() throws Exception { + public void deleteExpandedDataSetExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccessBindingName name = - AccessBindingName.ofAccountAccessBindingName("[ACCOUNT]", "[ACCESS_BINDING]"); - client.deleteAccessBinding(name); + String name = "name3373707"; + client.deleteExpandedDataSet(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7125,19 +7183,27 @@ public void deleteAccessBindingExceptionTest() throws Exception { } @Test - public void deleteAccessBindingTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getChannelGroupTest() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.deleteAccessBinding(name); + ChannelGroup actualResponse = client.getChannelGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteAccessBindingRequest actualRequest = ((DeleteAccessBindingRequest) actualRequests.get(0)); + GetChannelGroupRequest actualRequest = ((GetChannelGroupRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7145,13 +7211,13 @@ public void deleteAccessBindingTest2() throws Exception { } @Test - public void deleteAccessBindingExceptionTest2() throws Exception { + public void getChannelGroupExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteAccessBinding(name); + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + client.getChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7159,29 +7225,27 @@ public void deleteAccessBindingExceptionTest2() throws Exception { } @Test - public void listAccessBindingsTest() throws Exception { - AccessBinding responsesElement = AccessBinding.newBuilder().build(); - ListAccessBindingsResponse expectedResponse = - ListAccessBindingsResponse.newBuilder() - .setNextPageToken("") - .addAllAccessBindings(Arrays.asList(responsesElement)) + public void getChannelGroupTest2() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - - ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); + ChannelGroup actualResponse = client.getChannelGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAccessBindingsRequest actualRequest = ((ListAccessBindingsRequest) actualRequests.get(0)); + GetChannelGroupRequest actualRequest = ((GetChannelGroupRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7189,13 +7253,13 @@ public void listAccessBindingsTest() throws Exception { } @Test - public void listAccessBindingsExceptionTest() throws Exception { + public void getChannelGroupExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - client.listAccessBindings(parent); + String name = "name3373707"; + client.getChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7203,27 +7267,27 @@ public void listAccessBindingsExceptionTest() throws Exception { } @Test - public void listAccessBindingsTest2() throws Exception { - AccessBinding responsesElement = AccessBinding.newBuilder().build(); - ListAccessBindingsResponse expectedResponse = - ListAccessBindingsResponse.newBuilder() + public void listChannelGroupsTest() throws Exception { + ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); + ListChannelGroupsResponse expectedResponse = + ListChannelGroupsResponse.newBuilder() .setNextPageToken("") - .addAllAccessBindings(Arrays.asList(responsesElement)) + .addAllChannelGroups(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAccessBindingsRequest actualRequest = ((ListAccessBindingsRequest) actualRequests.get(0)); + ListChannelGroupsRequest actualRequest = ((ListChannelGroupsRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -7233,13 +7297,13 @@ public void listAccessBindingsTest2() throws Exception { } @Test - public void listAccessBindingsExceptionTest2() throws Exception { + public void listChannelGroupsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listAccessBindings(parent); + client.listChannelGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7247,27 +7311,27 @@ public void listAccessBindingsExceptionTest2() throws Exception { } @Test - public void listAccessBindingsTest3() throws Exception { - AccessBinding responsesElement = AccessBinding.newBuilder().build(); - ListAccessBindingsResponse expectedResponse = - ListAccessBindingsResponse.newBuilder() + public void listChannelGroupsTest2() throws Exception { + ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); + ListChannelGroupsResponse expectedResponse = + ListChannelGroupsResponse.newBuilder() .setNextPageToken("") - .addAllAccessBindings(Arrays.asList(responsesElement)) + .addAllChannelGroups(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - ListAccessBindingsPagedResponse pagedListResponse = client.listAccessBindings(parent); + ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAccessBindingsList().get(0), resources.get(0)); + Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAccessBindingsRequest actualRequest = ((ListAccessBindingsRequest) actualRequests.get(0)); + ListChannelGroupsRequest actualRequest = ((ListChannelGroupsRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -7277,13 +7341,13 @@ public void listAccessBindingsTest3() throws Exception { } @Test - public void listAccessBindingsExceptionTest3() throws Exception { + public void listChannelGroupsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - client.listAccessBindings(parent); + client.listChannelGroups(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7291,29 +7355,29 @@ public void listAccessBindingsExceptionTest3() throws Exception { } @Test - public void batchCreateAccessBindingsTest() throws Exception { - BatchCreateAccessBindingsResponse expectedResponse = - BatchCreateAccessBindingsResponse.newBuilder() - .addAllAccessBindings(new ArrayList()) + public void createChannelGroupTest() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BatchCreateAccessBindingsRequest request = - BatchCreateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - BatchCreateAccessBindingsResponse actualResponse = client.batchCreateAccessBindings(request); + ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchCreateAccessBindingsRequest actualRequest = - ((BatchCreateAccessBindingsRequest) actualRequests.get(0)); + CreateChannelGroupRequest actualRequest = ((CreateChannelGroupRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(channelGroup, actualRequest.getChannelGroup()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7321,17 +7385,14 @@ public void batchCreateAccessBindingsTest() throws Exception { } @Test - public void batchCreateAccessBindingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAnalyticsAdminService.addException(exception); - - try { - BatchCreateAccessBindingsRequest request = - BatchCreateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchCreateAccessBindings(request); + public void createChannelGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + client.createChannelGroup(parent, channelGroup); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7339,29 +7400,29 @@ public void batchCreateAccessBindingsExceptionTest() throws Exception { } @Test - public void batchGetAccessBindingsTest() throws Exception { - BatchGetAccessBindingsResponse expectedResponse = - BatchGetAccessBindingsResponse.newBuilder() - .addAllAccessBindings(new ArrayList()) + public void createChannelGroupTest2() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BatchGetAccessBindingsRequest request = - BatchGetAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); + String parent = "parent-995424086"; + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - BatchGetAccessBindingsResponse actualResponse = client.batchGetAccessBindings(request); + ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchGetAccessBindingsRequest actualRequest = - ((BatchGetAccessBindingsRequest) actualRequests.get(0)); + CreateChannelGroupRequest actualRequest = ((CreateChannelGroupRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getNamesList(), actualRequest.getNamesList()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(channelGroup, actualRequest.getChannelGroup()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7369,17 +7430,14 @@ public void batchGetAccessBindingsTest() throws Exception { } @Test - public void batchGetAccessBindingsExceptionTest() throws Exception { + public void createChannelGroupExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BatchGetAccessBindingsRequest request = - BatchGetAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) - .build(); - client.batchGetAccessBindings(request); + String parent = "parent-995424086"; + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + client.createChannelGroup(parent, channelGroup); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7387,29 +7445,29 @@ public void batchGetAccessBindingsExceptionTest() throws Exception { } @Test - public void batchUpdateAccessBindingsTest() throws Exception { - BatchUpdateAccessBindingsResponse expectedResponse = - BatchUpdateAccessBindingsResponse.newBuilder() - .addAllAccessBindings(new ArrayList()) + public void updateChannelGroupTest() throws Exception { + ChannelGroup expectedResponse = + ChannelGroup.newBuilder() + .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllGroupingRule(new ArrayList()) + .setSystemDefined(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BatchUpdateAccessBindingsRequest request = - BatchUpdateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - BatchUpdateAccessBindingsResponse actualResponse = client.batchUpdateAccessBindings(request); + ChannelGroup actualResponse = client.updateChannelGroup(channelGroup, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchUpdateAccessBindingsRequest actualRequest = - ((BatchUpdateAccessBindingsRequest) actualRequests.get(0)); + UpdateChannelGroupRequest actualRequest = ((UpdateChannelGroupRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertEquals(channelGroup, actualRequest.getChannelGroup()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7417,17 +7475,14 @@ public void batchUpdateAccessBindingsTest() throws Exception { } @Test - public void batchUpdateAccessBindingsExceptionTest() throws Exception { + public void updateChannelGroupExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BatchUpdateAccessBindingsRequest request = - BatchUpdateAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchUpdateAccessBindings(request); + ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateChannelGroup(channelGroup, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7435,25 +7490,19 @@ public void batchUpdateAccessBindingsExceptionTest() throws Exception { } @Test - public void batchDeleteAccessBindingsTest() throws Exception { + public void deleteChannelGroupTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BatchDeleteAccessBindingsRequest request = - BatchDeleteAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.batchDeleteAccessBindings(request); + client.deleteChannelGroup(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchDeleteAccessBindingsRequest actualRequest = - ((BatchDeleteAccessBindingsRequest) actualRequests.get(0)); + DeleteChannelGroupRequest actualRequest = ((DeleteChannelGroupRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7461,17 +7510,13 @@ public void batchDeleteAccessBindingsTest() throws Exception { } @Test - public void batchDeleteAccessBindingsExceptionTest() throws Exception { + public void deleteChannelGroupExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BatchDeleteAccessBindingsRequest request = - BatchDeleteAccessBindingsRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - client.batchDeleteAccessBindings(request); + ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + client.deleteChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7479,29 +7524,19 @@ public void batchDeleteAccessBindingsExceptionTest() throws Exception { } @Test - public void getExpandedDataSetTest() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) - .build(); + public void deleteChannelGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + String name = "name3373707"; - ExpandedDataSet actualResponse = client.getExpandedDataSet(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteChannelGroup(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetExpandedDataSetRequest actualRequest = ((GetExpandedDataSetRequest) actualRequests.get(0)); + DeleteChannelGroupRequest actualRequest = ((DeleteChannelGroupRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7509,13 +7544,13 @@ public void getExpandedDataSetTest() throws Exception { } @Test - public void getExpandedDataSetExceptionTest() throws Exception { + public void deleteChannelGroupExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - client.getExpandedDataSet(name); + String name = "name3373707"; + client.deleteChannelGroup(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7523,29 +7558,28 @@ public void getExpandedDataSetExceptionTest() throws Exception { } @Test - public void getExpandedDataSetTest2() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) - .build(); + public void setAutomatedGa4ConfigurationOptOutTest() throws Exception { + SetAutomatedGa4ConfigurationOptOutResponse expectedResponse = + SetAutomatedGa4ConfigurationOptOutResponse.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + SetAutomatedGa4ConfigurationOptOutRequest request = + SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .setOptOut(true) + .build(); - ExpandedDataSet actualResponse = client.getExpandedDataSet(name); + SetAutomatedGa4ConfigurationOptOutResponse actualResponse = + client.setAutomatedGa4ConfigurationOptOut(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetExpandedDataSetRequest actualRequest = ((GetExpandedDataSetRequest) actualRequests.get(0)); + SetAutomatedGa4ConfigurationOptOutRequest actualRequest = + ((SetAutomatedGa4ConfigurationOptOutRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getOptOut(), actualRequest.getOptOut()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7553,13 +7587,17 @@ public void getExpandedDataSetTest2() throws Exception { } @Test - public void getExpandedDataSetExceptionTest2() throws Exception { + public void setAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getExpandedDataSet(name); + SetAutomatedGa4ConfigurationOptOutRequest request = + SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .setOptOut(true) + .build(); + client.setAutomatedGa4ConfigurationOptOut(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7567,30 +7605,26 @@ public void getExpandedDataSetExceptionTest2() throws Exception { } @Test - public void listExpandedDataSetsTest() throws Exception { - ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); - ListExpandedDataSetsResponse expectedResponse = - ListExpandedDataSetsResponse.newBuilder() - .setNextPageToken("") - .addAllExpandedDataSets(Arrays.asList(responsesElement)) - .build(); + public void fetchAutomatedGa4ConfigurationOptOutTest() throws Exception { + FetchAutomatedGa4ConfigurationOptOutResponse expectedResponse = + FetchAutomatedGa4ConfigurationOptOutResponse.newBuilder().setOptOut(true).build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + FetchAutomatedGa4ConfigurationOptOutRequest request = + FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); + FetchAutomatedGa4ConfigurationOptOutResponse actualResponse = + client.fetchAutomatedGa4ConfigurationOptOut(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListExpandedDataSetsRequest actualRequest = - ((ListExpandedDataSetsRequest) actualRequests.get(0)); + FetchAutomatedGa4ConfigurationOptOutRequest actualRequest = + ((FetchAutomatedGa4ConfigurationOptOutRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7598,13 +7632,16 @@ public void listExpandedDataSetsTest() throws Exception { } @Test - public void listExpandedDataSetsExceptionTest() throws Exception { + public void fetchAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listExpandedDataSets(parent); + FetchAutomatedGa4ConfigurationOptOutRequest request = + FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() + .setProperty("property-993141291") + .build(); + client.fetchAutomatedGa4ConfigurationOptOut(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7612,30 +7649,31 @@ public void listExpandedDataSetsExceptionTest() throws Exception { } @Test - public void listExpandedDataSetsTest2() throws Exception { - ExpandedDataSet responsesElement = ExpandedDataSet.newBuilder().build(); - ListExpandedDataSetsResponse expectedResponse = - ListExpandedDataSetsResponse.newBuilder() - .setNextPageToken("") - .addAllExpandedDataSets(Arrays.asList(responsesElement)) + public void getBigQueryLinkTest() throws Exception { + BigQueryLink expectedResponse = + BigQueryLink.newBuilder() + .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .setDailyExportEnabled(true) + .setStreamingExportEnabled(true) + .setFreshDailyExportEnabled(true) + .setIncludeAdvertisingId(true) + .addAllExportStreams(new ArrayList()) + .addAllExcludedEvents(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListExpandedDataSetsPagedResponse pagedListResponse = client.listExpandedDataSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getExpandedDataSetsList().get(0), resources.get(0)); + BigQueryLink actualResponse = client.getBigQueryLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListExpandedDataSetsRequest actualRequest = - ((ListExpandedDataSetsRequest) actualRequests.get(0)); + GetBigQueryLinkRequest actualRequest = ((GetBigQueryLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7643,13 +7681,13 @@ public void listExpandedDataSetsTest2() throws Exception { } @Test - public void listExpandedDataSetsExceptionTest2() throws Exception { + public void getBigQueryLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listExpandedDataSets(parent); + BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); + client.getBigQueryLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7657,32 +7695,31 @@ public void listExpandedDataSetsExceptionTest2() throws Exception { } @Test - public void createExpandedDataSetTest() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) + public void getBigQueryLinkTest2() throws Exception { + BigQueryLink expectedResponse = + BigQueryLink.newBuilder() + .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .setDailyExportEnabled(true) + .setStreamingExportEnabled(true) + .setFreshDailyExportEnabled(true) + .setIncludeAdvertisingId(true) + .addAllExportStreams(new ArrayList()) + .addAllExcludedEvents(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + String name = "name3373707"; - ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); + BigQueryLink actualResponse = client.getBigQueryLink(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateExpandedDataSetRequest actualRequest = - ((CreateExpandedDataSetRequest) actualRequests.get(0)); + GetBigQueryLinkRequest actualRequest = ((GetBigQueryLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(expandedDataSet, actualRequest.getExpandedDataSet()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7690,14 +7727,13 @@ public void createExpandedDataSetTest() throws Exception { } @Test - public void createExpandedDataSetExceptionTest() throws Exception { + public void getBigQueryLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - client.createExpandedDataSet(parent, expandedDataSet); + String name = "name3373707"; + client.getBigQueryLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7705,32 +7741,29 @@ public void createExpandedDataSetExceptionTest() throws Exception { } @Test - public void createExpandedDataSetTest2() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) + public void listBigQueryLinksTest() throws Exception { + BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); + ListBigQueryLinksResponse expectedResponse = + ListBigQueryLinksResponse.newBuilder() + .setNextPageToken("") + .addAllBigqueryLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - ExpandedDataSet actualResponse = client.createExpandedDataSet(parent, expandedDataSet); - Assert.assertEquals(expectedResponse, actualResponse); + ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateExpandedDataSetRequest actualRequest = - ((CreateExpandedDataSetRequest) actualRequests.get(0)); + ListBigQueryLinksRequest actualRequest = ((ListBigQueryLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(expandedDataSet, actualRequest.getExpandedDataSet()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7738,14 +7771,13 @@ public void createExpandedDataSetTest2() throws Exception { } @Test - public void createExpandedDataSetExceptionTest2() throws Exception { + public void listBigQueryLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - client.createExpandedDataSet(parent, expandedDataSet); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listBigQueryLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7753,32 +7785,29 @@ public void createExpandedDataSetExceptionTest2() throws Exception { } @Test - public void updateExpandedDataSetTest() throws Exception { - ExpandedDataSet expectedResponse = - ExpandedDataSet.newBuilder() - .setName(ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllDimensionNames(new ArrayList()) - .addAllMetricNames(new ArrayList()) - .setDimensionFilterExpression(ExpandedDataSetFilterExpression.newBuilder().build()) - .setDataCollectionStartTime(Timestamp.newBuilder().build()) + public void listBigQueryLinksTest2() throws Exception { + BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); + ListBigQueryLinksResponse expectedResponse = + ListBigQueryLinksResponse.newBuilder() + .setNextPageToken("") + .addAllBigqueryLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String parent = "parent-995424086"; - ExpandedDataSet actualResponse = client.updateExpandedDataSet(expandedDataSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateExpandedDataSetRequest actualRequest = - ((UpdateExpandedDataSetRequest) actualRequests.get(0)); + ListBigQueryLinksRequest actualRequest = ((ListBigQueryLinksRequest) actualRequests.get(0)); - Assert.assertEquals(expandedDataSet, actualRequest.getExpandedDataSet()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7786,14 +7815,13 @@ public void updateExpandedDataSetTest() throws Exception { } @Test - public void updateExpandedDataSetExceptionTest() throws Exception { + public void listBigQueryLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ExpandedDataSet expandedDataSet = ExpandedDataSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateExpandedDataSet(expandedDataSet, updateMask); + String parent = "parent-995424086"; + client.listBigQueryLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7801,18 +7829,33 @@ public void updateExpandedDataSetExceptionTest() throws Exception { } @Test - public void deleteExpandedDataSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getEnhancedMeasurementSettingsTest() throws Exception { + EnhancedMeasurementSettings expectedResponse = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); + EnhancedMeasurementSettingsName name = + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); - client.deleteExpandedDataSet(name); + EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteExpandedDataSetRequest actualRequest = - ((DeleteExpandedDataSetRequest) actualRequests.get(0)); + GetEnhancedMeasurementSettingsRequest actualRequest = + ((GetEnhancedMeasurementSettingsRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -7822,13 +7865,14 @@ public void deleteExpandedDataSetTest() throws Exception { } @Test - public void deleteExpandedDataSetExceptionTest() throws Exception { + public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ExpandedDataSetName name = ExpandedDataSetName.of("[PROPERTY]", "[EXPANDED_DATA_SET]"); - client.deleteExpandedDataSet(name); + EnhancedMeasurementSettingsName name = + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getEnhancedMeasurementSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7836,18 +7880,32 @@ public void deleteExpandedDataSetExceptionTest() throws Exception { } @Test - public void deleteExpandedDataSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getEnhancedMeasurementSettingsTest2() throws Exception { + EnhancedMeasurementSettings expectedResponse = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - client.deleteExpandedDataSet(name); + EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteExpandedDataSetRequest actualRequest = - ((DeleteExpandedDataSetRequest) actualRequests.get(0)); + GetEnhancedMeasurementSettingsRequest actualRequest = + ((GetEnhancedMeasurementSettingsRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -7857,13 +7915,13 @@ public void deleteExpandedDataSetTest2() throws Exception { } @Test - public void deleteExpandedDataSetExceptionTest2() throws Exception { + public void getEnhancedMeasurementSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.deleteExpandedDataSet(name); + client.getEnhancedMeasurementSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7871,27 +7929,39 @@ public void deleteExpandedDataSetExceptionTest2() throws Exception { } @Test - public void getChannelGroupTest() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void updateEnhancedMeasurementSettingsTest() throws Exception { + EnhancedMeasurementSettings expectedResponse = + EnhancedMeasurementSettings.newBuilder() + .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setSiteSearchEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setPageChangesEnabled(true) + .setFormInteractionsEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUriQueryParameter("uriQueryParameter1580843085") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + EnhancedMeasurementSettings enhancedMeasurementSettings = + EnhancedMeasurementSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - ChannelGroup actualResponse = client.getChannelGroup(name); + EnhancedMeasurementSettings actualResponse = + client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetChannelGroupRequest actualRequest = ((GetChannelGroupRequest) actualRequests.get(0)); + UpdateEnhancedMeasurementSettingsRequest actualRequest = + ((UpdateEnhancedMeasurementSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals( + enhancedMeasurementSettings, actualRequest.getEnhancedMeasurementSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7899,13 +7969,15 @@ public void getChannelGroupTest() throws Exception { } @Test - public void getChannelGroupExceptionTest() throws Exception { + public void updateEnhancedMeasurementSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.getChannelGroup(name); + EnhancedMeasurementSettings enhancedMeasurementSettings = + EnhancedMeasurementSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7913,27 +7985,27 @@ public void getChannelGroupExceptionTest() throws Exception { } @Test - public void getChannelGroupTest2() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) - .build(); + public void createConnectedSiteTagTest() throws Exception { + CreateConnectedSiteTagResponse expectedResponse = + CreateConnectedSiteTagResponse.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + CreateConnectedSiteTagRequest request = + CreateConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) + .build(); - ChannelGroup actualResponse = client.getChannelGroup(name); + CreateConnectedSiteTagResponse actualResponse = client.createConnectedSiteTag(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetChannelGroupRequest actualRequest = ((GetChannelGroupRequest) actualRequests.get(0)); + CreateConnectedSiteTagRequest actualRequest = + ((CreateConnectedSiteTagRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getConnectedSiteTag(), actualRequest.getConnectedSiteTag()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7941,13 +8013,17 @@ public void getChannelGroupTest2() throws Exception { } @Test - public void getChannelGroupExceptionTest2() throws Exception { + public void createConnectedSiteTagExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getChannelGroup(name); + CreateConnectedSiteTagRequest request = + CreateConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) + .build(); + client.createConnectedSiteTag(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7955,29 +8031,25 @@ public void getChannelGroupExceptionTest2() throws Exception { } @Test - public void listChannelGroupsTest() throws Exception { - ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); - ListChannelGroupsResponse expectedResponse = - ListChannelGroupsResponse.newBuilder() - .setNextPageToken("") - .addAllChannelGroups(Arrays.asList(responsesElement)) - .build(); + public void deleteConnectedSiteTagTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + DeleteConnectedSiteTagRequest request = + DeleteConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setTagId("tagId110119509") + .build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); + client.deleteConnectedSiteTag(request); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListChannelGroupsRequest actualRequest = ((ListChannelGroupsRequest) actualRequests.get(0)); + DeleteConnectedSiteTagRequest actualRequest = + ((DeleteConnectedSiteTagRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getTagId(), actualRequest.getTagId()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -7985,13 +8057,17 @@ public void listChannelGroupsTest() throws Exception { } @Test - public void listChannelGroupsExceptionTest() throws Exception { + public void deleteConnectedSiteTagExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listChannelGroups(parent); + DeleteConnectedSiteTagRequest request = + DeleteConnectedSiteTagRequest.newBuilder() + .setProperty("property-993141291") + .setTagId("tagId110119509") + .build(); + client.deleteConnectedSiteTag(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -7999,29 +8075,25 @@ public void listChannelGroupsExceptionTest() throws Exception { } @Test - public void listChannelGroupsTest2() throws Exception { - ChannelGroup responsesElement = ChannelGroup.newBuilder().build(); - ListChannelGroupsResponse expectedResponse = - ListChannelGroupsResponse.newBuilder() - .setNextPageToken("") - .addAllChannelGroups(Arrays.asList(responsesElement)) + public void listConnectedSiteTagsTest() throws Exception { + ListConnectedSiteTagsResponse expectedResponse = + ListConnectedSiteTagsResponse.newBuilder() + .addAllConnectedSiteTags(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListChannelGroupsPagedResponse pagedListResponse = client.listChannelGroups(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + ListConnectedSiteTagsRequest request = + ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getChannelGroupsList().get(0), resources.get(0)); + ListConnectedSiteTagsResponse actualResponse = client.listConnectedSiteTags(request); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListChannelGroupsRequest actualRequest = ((ListChannelGroupsRequest) actualRequests.get(0)); + ListConnectedSiteTagsRequest actualRequest = + ((ListConnectedSiteTagsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8029,13 +8101,14 @@ public void listChannelGroupsTest2() throws Exception { } @Test - public void listChannelGroupsExceptionTest2() throws Exception { + public void listConnectedSiteTagsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listChannelGroups(parent); + ListConnectedSiteTagsRequest request = + ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); + client.listConnectedSiteTags(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8043,29 +8116,27 @@ public void listChannelGroupsExceptionTest2() throws Exception { } @Test - public void createChannelGroupTest() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void fetchConnectedGa4PropertyTest() throws Exception { + FetchConnectedGa4PropertyResponse expectedResponse = + FetchConnectedGa4PropertyResponse.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + FetchConnectedGa4PropertyRequest request = + FetchConnectedGa4PropertyRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .build(); - ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); + FetchConnectedGa4PropertyResponse actualResponse = client.fetchConnectedGa4Property(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateChannelGroupRequest actualRequest = ((CreateChannelGroupRequest) actualRequests.get(0)); + FetchConnectedGa4PropertyRequest actualRequest = + ((FetchConnectedGa4PropertyRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(channelGroup, actualRequest.getChannelGroup()); + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8073,14 +8144,16 @@ public void createChannelGroupTest() throws Exception { } @Test - public void createChannelGroupExceptionTest() throws Exception { + public void fetchConnectedGa4PropertyExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - client.createChannelGroup(parent, channelGroup); + FetchConnectedGa4PropertyRequest request = + FetchConnectedGa4PropertyRequest.newBuilder() + .setProperty(PropertyName.of("[PROPERTY]").toString()) + .build(); + client.fetchConnectedGa4Property(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8088,29 +8161,24 @@ public void createChannelGroupExceptionTest() throws Exception { } @Test - public void createChannelGroupTest2() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void getAdSenseLinkTest() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - ChannelGroup actualResponse = client.createChannelGroup(parent, channelGroup); + AdSenseLink actualResponse = client.getAdSenseLink(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateChannelGroupRequest actualRequest = ((CreateChannelGroupRequest) actualRequests.get(0)); + GetAdSenseLinkRequest actualRequest = ((GetAdSenseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(channelGroup, actualRequest.getChannelGroup()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8118,14 +8186,13 @@ public void createChannelGroupTest2() throws Exception { } @Test - public void createChannelGroupExceptionTest2() throws Exception { + public void getAdSenseLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - client.createChannelGroup(parent, channelGroup); + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + client.getAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8133,29 +8200,24 @@ public void createChannelGroupExceptionTest2() throws Exception { } @Test - public void updateChannelGroupTest() throws Exception { - ChannelGroup expectedResponse = - ChannelGroup.newBuilder() - .setName(ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllGroupingRule(new ArrayList()) - .setSystemDefined(true) + public void getAdSenseLinkTest2() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = "name3373707"; - ChannelGroup actualResponse = client.updateChannelGroup(channelGroup, updateMask); + AdSenseLink actualResponse = client.getAdSenseLink(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateChannelGroupRequest actualRequest = ((UpdateChannelGroupRequest) actualRequests.get(0)); + GetAdSenseLinkRequest actualRequest = ((GetAdSenseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(channelGroup, actualRequest.getChannelGroup()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8163,14 +8225,13 @@ public void updateChannelGroupTest() throws Exception { } @Test - public void updateChannelGroupExceptionTest() throws Exception { + public void getAdSenseLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ChannelGroup channelGroup = ChannelGroup.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateChannelGroup(channelGroup, updateMask); + String name = "name3373707"; + client.getAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8178,19 +8239,26 @@ public void updateChannelGroupExceptionTest() throws Exception { } @Test - public void deleteChannelGroupTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createAdSenseLinkTest() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.deleteChannelGroup(name); + AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteChannelGroupRequest actualRequest = ((DeleteChannelGroupRequest) actualRequests.get(0)); + CreateAdSenseLinkRequest actualRequest = ((CreateAdSenseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(adsenseLink, actualRequest.getAdsenseLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8198,13 +8266,14 @@ public void deleteChannelGroupTest() throws Exception { } @Test - public void deleteChannelGroupExceptionTest() throws Exception { + public void createAdSenseLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ChannelGroupName name = ChannelGroupName.of("[PROPERTY]", "[CHANNEL_GROUP]"); - client.deleteChannelGroup(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + client.createAdSenseLink(parent, adsenseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8212,19 +8281,26 @@ public void deleteChannelGroupExceptionTest() throws Exception { } @Test - public void deleteChannelGroupTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createAdSenseLinkTest2() throws Exception { + AdSenseLink expectedResponse = + AdSenseLink.newBuilder() + .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) + .setAdClientCode("adClientCode-869953317") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.deleteChannelGroup(name); + AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteChannelGroupRequest actualRequest = ((DeleteChannelGroupRequest) actualRequests.get(0)); + CreateAdSenseLinkRequest actualRequest = ((CreateAdSenseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(adsenseLink, actualRequest.getAdsenseLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8232,13 +8308,14 @@ public void deleteChannelGroupTest2() throws Exception { } @Test - public void deleteChannelGroupExceptionTest2() throws Exception { + public void createAdSenseLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteChannelGroup(name); + String parent = "parent-995424086"; + AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + client.createAdSenseLink(parent, adsenseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8246,28 +8323,19 @@ public void deleteChannelGroupExceptionTest2() throws Exception { } @Test - public void setAutomatedGa4ConfigurationOptOutTest() throws Exception { - SetAutomatedGa4ConfigurationOptOutResponse expectedResponse = - SetAutomatedGa4ConfigurationOptOutResponse.newBuilder().build(); + public void deleteAdSenseLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - SetAutomatedGa4ConfigurationOptOutRequest request = - SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .setOptOut(true) - .build(); + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - SetAutomatedGa4ConfigurationOptOutResponse actualResponse = - client.setAutomatedGa4ConfigurationOptOut(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteAdSenseLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - SetAutomatedGa4ConfigurationOptOutRequest actualRequest = - ((SetAutomatedGa4ConfigurationOptOutRequest) actualRequests.get(0)); + DeleteAdSenseLinkRequest actualRequest = ((DeleteAdSenseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); - Assert.assertEquals(request.getOptOut(), actualRequest.getOptOut()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8275,17 +8343,13 @@ public void setAutomatedGa4ConfigurationOptOutTest() throws Exception { } @Test - public void setAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { + public void deleteAdSenseLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); - - try { - SetAutomatedGa4ConfigurationOptOutRequest request = - SetAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .setOptOut(true) - .build(); - client.setAutomatedGa4ConfigurationOptOut(request); + + try { + AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + client.deleteAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8293,26 +8357,19 @@ public void setAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { } @Test - public void fetchAutomatedGa4ConfigurationOptOutTest() throws Exception { - FetchAutomatedGa4ConfigurationOptOutResponse expectedResponse = - FetchAutomatedGa4ConfigurationOptOutResponse.newBuilder().setOptOut(true).build(); + public void deleteAdSenseLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - FetchAutomatedGa4ConfigurationOptOutRequest request = - FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .build(); + String name = "name3373707"; - FetchAutomatedGa4ConfigurationOptOutResponse actualResponse = - client.fetchAutomatedGa4ConfigurationOptOut(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteAdSenseLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - FetchAutomatedGa4ConfigurationOptOutRequest actualRequest = - ((FetchAutomatedGa4ConfigurationOptOutRequest) actualRequests.get(0)); + DeleteAdSenseLinkRequest actualRequest = ((DeleteAdSenseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8320,16 +8377,13 @@ public void fetchAutomatedGa4ConfigurationOptOutTest() throws Exception { } @Test - public void fetchAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception { + public void deleteAdSenseLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - FetchAutomatedGa4ConfigurationOptOutRequest request = - FetchAutomatedGa4ConfigurationOptOutRequest.newBuilder() - .setProperty("property-993141291") - .build(); - client.fetchAutomatedGa4ConfigurationOptOut(request); + String name = "name3373707"; + client.deleteAdSenseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8337,31 +8391,29 @@ public void fetchAutomatedGa4ConfigurationOptOutExceptionTest() throws Exception } @Test - public void getBigQueryLinkTest() throws Exception { - BigQueryLink expectedResponse = - BigQueryLink.newBuilder() - .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) - .setDailyExportEnabled(true) - .setStreamingExportEnabled(true) - .setFreshDailyExportEnabled(true) - .setIncludeAdvertisingId(true) - .addAllExportStreams(new ArrayList()) - .addAllExcludedEvents(new ArrayList()) + public void listAdSenseLinksTest() throws Exception { + AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); + ListAdSenseLinksResponse expectedResponse = + ListAdSenseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllAdsenseLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); - BigQueryLink actualResponse = client.getBigQueryLink(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetBigQueryLinkRequest actualRequest = ((GetBigQueryLinkRequest) actualRequests.get(0)); + ListAdSenseLinksRequest actualRequest = ((ListAdSenseLinksRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8369,13 +8421,13 @@ public void getBigQueryLinkTest() throws Exception { } @Test - public void getBigQueryLinkExceptionTest() throws Exception { + public void listAdSenseLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - BigQueryLinkName name = BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]"); - client.getBigQueryLink(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listAdSenseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8383,31 +8435,29 @@ public void getBigQueryLinkExceptionTest() throws Exception { } @Test - public void getBigQueryLinkTest2() throws Exception { - BigQueryLink expectedResponse = - BigQueryLink.newBuilder() - .setName(BigQueryLinkName.of("[PROPERTY]", "[BIGQUERY_LINK]").toString()) - .setProject("project-309310695") - .setCreateTime(Timestamp.newBuilder().build()) - .setDailyExportEnabled(true) - .setStreamingExportEnabled(true) - .setFreshDailyExportEnabled(true) - .setIncludeAdvertisingId(true) - .addAllExportStreams(new ArrayList()) - .addAllExcludedEvents(new ArrayList()) + public void listAdSenseLinksTest2() throws Exception { + AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); + ListAdSenseLinksResponse expectedResponse = + ListAdSenseLinksResponse.newBuilder() + .setNextPageToken("") + .addAllAdsenseLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; - BigQueryLink actualResponse = client.getBigQueryLink(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetBigQueryLinkRequest actualRequest = ((GetBigQueryLinkRequest) actualRequests.get(0)); + ListAdSenseLinksRequest actualRequest = ((ListAdSenseLinksRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8415,13 +8465,13 @@ public void getBigQueryLinkTest2() throws Exception { } @Test - public void getBigQueryLinkExceptionTest2() throws Exception { + public void listAdSenseLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getBigQueryLink(name); + String parent = "parent-995424086"; + client.listAdSenseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8429,29 +8479,30 @@ public void getBigQueryLinkExceptionTest2() throws Exception { } @Test - public void listBigQueryLinksTest() throws Exception { - BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); - ListBigQueryLinksResponse expectedResponse = - ListBigQueryLinksResponse.newBuilder() - .setNextPageToken("") - .addAllBigqueryLinks(Arrays.asList(responsesElement)) + public void getEventCreateRuleTest() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - - ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); + EventCreateRule actualResponse = client.getEventCreateRule(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListBigQueryLinksRequest actualRequest = ((ListBigQueryLinksRequest) actualRequests.get(0)); + GetEventCreateRuleRequest actualRequest = ((GetEventCreateRuleRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8459,13 +8510,14 @@ public void listBigQueryLinksTest() throws Exception { } @Test - public void listBigQueryLinksExceptionTest() throws Exception { + public void getEventCreateRuleExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listBigQueryLinks(parent); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + client.getEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8473,29 +8525,29 @@ public void listBigQueryLinksExceptionTest() throws Exception { } @Test - public void listBigQueryLinksTest2() throws Exception { - BigQueryLink responsesElement = BigQueryLink.newBuilder().build(); - ListBigQueryLinksResponse expectedResponse = - ListBigQueryLinksResponse.newBuilder() - .setNextPageToken("") - .addAllBigqueryLinks(Arrays.asList(responsesElement)) + public void getEventCreateRuleTest2() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListBigQueryLinksPagedResponse pagedListResponse = client.listBigQueryLinks(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBigqueryLinksList().get(0), resources.get(0)); + EventCreateRule actualResponse = client.getEventCreateRule(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListBigQueryLinksRequest actualRequest = ((ListBigQueryLinksRequest) actualRequests.get(0)); + GetEventCreateRuleRequest actualRequest = ((GetEventCreateRuleRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8503,13 +8555,13 @@ public void listBigQueryLinksTest2() throws Exception { } @Test - public void listBigQueryLinksExceptionTest2() throws Exception { + public void getEventCreateRuleExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listBigQueryLinks(parent); + String name = "name3373707"; + client.getEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8517,35 +8569,30 @@ public void listBigQueryLinksExceptionTest2() throws Exception { } @Test - public void getEnhancedMeasurementSettingsTest() throws Exception { - EnhancedMeasurementSettings expectedResponse = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") + public void listEventCreateRulesTest() throws Exception { + EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); + ListEventCreateRulesResponse expectedResponse = + ListEventCreateRulesResponse.newBuilder() + .setNextPageToken("") + .addAllEventCreateRules(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - EnhancedMeasurementSettingsName name = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetEnhancedMeasurementSettingsRequest actualRequest = - ((GetEnhancedMeasurementSettingsRequest) actualRequests.get(0)); + ListEventCreateRulesRequest actualRequest = + ((ListEventCreateRulesRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8553,14 +8600,13 @@ public void getEnhancedMeasurementSettingsTest() throws Exception { } @Test - public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { + public void listEventCreateRulesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - EnhancedMeasurementSettingsName name = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); - client.getEnhancedMeasurementSettings(name); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + client.listEventCreateRules(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8568,34 +8614,30 @@ public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { } @Test - public void getEnhancedMeasurementSettingsTest2() throws Exception { - EnhancedMeasurementSettings expectedResponse = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") + public void listEventCreateRulesTest2() throws Exception { + EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); + ListEventCreateRulesResponse expectedResponse = + ListEventCreateRulesResponse.newBuilder() + .setNextPageToken("") + .addAllEventCreateRules(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; - EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); - Assert.assertEquals(expectedResponse, actualResponse); + ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetEnhancedMeasurementSettingsRequest actualRequest = - ((GetEnhancedMeasurementSettingsRequest) actualRequests.get(0)); + ListEventCreateRulesRequest actualRequest = + ((ListEventCreateRulesRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8603,13 +8645,13 @@ public void getEnhancedMeasurementSettingsTest2() throws Exception { } @Test - public void getEnhancedMeasurementSettingsExceptionTest2() throws Exception { + public void listEventCreateRulesExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getEnhancedMeasurementSettings(name); + String parent = "parent-995424086"; + client.listEventCreateRules(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8617,39 +8659,32 @@ public void getEnhancedMeasurementSettingsExceptionTest2() throws Exception { } @Test - public void updateEnhancedMeasurementSettingsTest() throws Exception { - EnhancedMeasurementSettings expectedResponse = - EnhancedMeasurementSettings.newBuilder() - .setName(EnhancedMeasurementSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) - .setStreamEnabled(true) - .setScrollsEnabled(true) - .setOutboundClicksEnabled(true) - .setSiteSearchEnabled(true) - .setVideoEngagementEnabled(true) - .setFileDownloadsEnabled(true) - .setPageChangesEnabled(true) - .setFormInteractionsEnabled(true) - .setSearchQueryParameter("searchQueryParameter-2012788855") - .setUriQueryParameter("uriQueryParameter1580843085") + public void createEventCreateRuleTest() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - EnhancedMeasurementSettings enhancedMeasurementSettings = - EnhancedMeasurementSettings.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - EnhancedMeasurementSettings actualResponse = - client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); + EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateEnhancedMeasurementSettingsRequest actualRequest = - ((UpdateEnhancedMeasurementSettingsRequest) actualRequests.get(0)); + CreateEventCreateRuleRequest actualRequest = + ((CreateEventCreateRuleRequest) actualRequests.get(0)); - Assert.assertEquals( - enhancedMeasurementSettings, actualRequest.getEnhancedMeasurementSettings()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(eventCreateRule, actualRequest.getEventCreateRule()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8657,15 +8692,14 @@ public void updateEnhancedMeasurementSettingsTest() throws Exception { } @Test - public void updateEnhancedMeasurementSettingsExceptionTest() throws Exception { + public void createEventCreateRuleExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - EnhancedMeasurementSettings enhancedMeasurementSettings = - EnhancedMeasurementSettings.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); + DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + client.createEventCreateRule(parent, eventCreateRule); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8673,27 +8707,32 @@ public void updateEnhancedMeasurementSettingsExceptionTest() throws Exception { } @Test - public void createConnectedSiteTagTest() throws Exception { - CreateConnectedSiteTagResponse expectedResponse = - CreateConnectedSiteTagResponse.newBuilder().build(); + public void createEventCreateRuleTest2() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - CreateConnectedSiteTagRequest request = - CreateConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) - .build(); + String parent = "parent-995424086"; + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - CreateConnectedSiteTagResponse actualResponse = client.createConnectedSiteTag(request); + EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateConnectedSiteTagRequest actualRequest = - ((CreateConnectedSiteTagRequest) actualRequests.get(0)); + CreateEventCreateRuleRequest actualRequest = + ((CreateEventCreateRuleRequest) actualRequests.get(0)); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); - Assert.assertEquals(request.getConnectedSiteTag(), actualRequest.getConnectedSiteTag()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(eventCreateRule, actualRequest.getEventCreateRule()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8701,17 +8740,14 @@ public void createConnectedSiteTagTest() throws Exception { } @Test - public void createConnectedSiteTagExceptionTest() throws Exception { + public void createEventCreateRuleExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - CreateConnectedSiteTagRequest request = - CreateConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setConnectedSiteTag(ConnectedSiteTag.newBuilder().build()) - .build(); - client.createConnectedSiteTag(request); + String parent = "parent-995424086"; + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + client.createEventCreateRule(parent, eventCreateRule); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8719,25 +8755,32 @@ public void createConnectedSiteTagExceptionTest() throws Exception { } @Test - public void deleteConnectedSiteTagTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void updateEventCreateRuleTest() throws Exception { + EventCreateRule expectedResponse = + EventCreateRule.newBuilder() + .setName( + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + .toString()) + .setDestinationEvent("destinationEvent1181456172") + .addAllEventConditions(new ArrayList()) + .setSourceCopyParameters(true) + .addAllParameterMutations(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DeleteConnectedSiteTagRequest request = - DeleteConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setTagId("tagId110119509") - .build(); + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - client.deleteConnectedSiteTag(request); + EventCreateRule actualResponse = client.updateEventCreateRule(eventCreateRule, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteConnectedSiteTagRequest actualRequest = - ((DeleteConnectedSiteTagRequest) actualRequests.get(0)); + UpdateEventCreateRuleRequest actualRequest = + ((UpdateEventCreateRuleRequest) actualRequests.get(0)); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); - Assert.assertEquals(request.getTagId(), actualRequest.getTagId()); + Assert.assertEquals(eventCreateRule, actualRequest.getEventCreateRule()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8745,17 +8788,14 @@ public void deleteConnectedSiteTagTest() throws Exception { } @Test - public void deleteConnectedSiteTagExceptionTest() throws Exception { + public void updateEventCreateRuleExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DeleteConnectedSiteTagRequest request = - DeleteConnectedSiteTagRequest.newBuilder() - .setProperty("property-993141291") - .setTagId("tagId110119509") - .build(); - client.deleteConnectedSiteTag(request); + EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEventCreateRule(eventCreateRule, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8763,25 +8803,21 @@ public void deleteConnectedSiteTagExceptionTest() throws Exception { } @Test - public void listConnectedSiteTagsTest() throws Exception { - ListConnectedSiteTagsResponse expectedResponse = - ListConnectedSiteTagsResponse.newBuilder() - .addAllConnectedSiteTags(new ArrayList()) - .build(); + public void deleteEventCreateRuleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ListConnectedSiteTagsRequest request = - ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - ListConnectedSiteTagsResponse actualResponse = client.listConnectedSiteTags(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteEventCreateRule(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListConnectedSiteTagsRequest actualRequest = - ((ListConnectedSiteTagsRequest) actualRequests.get(0)); + DeleteEventCreateRuleRequest actualRequest = + ((DeleteEventCreateRuleRequest) actualRequests.get(0)); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8789,14 +8825,14 @@ public void listConnectedSiteTagsTest() throws Exception { } @Test - public void listConnectedSiteTagsExceptionTest() throws Exception { + public void deleteEventCreateRuleExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ListConnectedSiteTagsRequest request = - ListConnectedSiteTagsRequest.newBuilder().setProperty("property-993141291").build(); - client.listConnectedSiteTags(request); + EventCreateRuleName name = + EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + client.deleteEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8804,27 +8840,20 @@ public void listConnectedSiteTagsExceptionTest() throws Exception { } @Test - public void fetchConnectedGa4PropertyTest() throws Exception { - FetchConnectedGa4PropertyResponse expectedResponse = - FetchConnectedGa4PropertyResponse.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .build(); + public void deleteEventCreateRuleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - FetchConnectedGa4PropertyRequest request = - FetchConnectedGa4PropertyRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .build(); + String name = "name3373707"; - FetchConnectedGa4PropertyResponse actualResponse = client.fetchConnectedGa4Property(request); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteEventCreateRule(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - FetchConnectedGa4PropertyRequest actualRequest = - ((FetchConnectedGa4PropertyRequest) actualRequests.get(0)); + DeleteEventCreateRuleRequest actualRequest = + ((DeleteEventCreateRuleRequest) actualRequests.get(0)); - Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8832,16 +8861,13 @@ public void fetchConnectedGa4PropertyTest() throws Exception { } @Test - public void fetchConnectedGa4PropertyExceptionTest() throws Exception { + public void deleteEventCreateRuleExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - FetchConnectedGa4PropertyRequest request = - FetchConnectedGa4PropertyRequest.newBuilder() - .setProperty(PropertyName.of("[PROPERTY]").toString()) - .build(); - client.fetchConnectedGa4Property(request); + String name = "name3373707"; + client.deleteEventCreateRule(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8849,24 +8875,30 @@ public void fetchConnectedGa4PropertyExceptionTest() throws Exception { } @Test - public void getAdSenseLinkTest() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + public void updateDataRedactionSettingsTest() throws Exception { + DataRedactionSettings expectedResponse = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + DataRedactionSettings dataRedactionSettings = DataRedactionSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - AdSenseLink actualResponse = client.getAdSenseLink(name); + DataRedactionSettings actualResponse = + client.updateDataRedactionSettings(dataRedactionSettings, updateMask); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAdSenseLinkRequest actualRequest = ((GetAdSenseLinkRequest) actualRequests.get(0)); + UpdateDataRedactionSettingsRequest actualRequest = + ((UpdateDataRedactionSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(dataRedactionSettings, actualRequest.getDataRedactionSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8874,13 +8906,14 @@ public void getAdSenseLinkTest() throws Exception { } @Test - public void getAdSenseLinkExceptionTest() throws Exception { + public void updateDataRedactionSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - client.getAdSenseLink(name); + DataRedactionSettings dataRedactionSettings = DataRedactionSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataRedactionSettings(dataRedactionSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8888,24 +8921,27 @@ public void getAdSenseLinkExceptionTest() throws Exception { } @Test - public void getAdSenseLinkTest2() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + public void getDataRedactionSettingsTest() throws Exception { + DataRedactionSettings expectedResponse = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + DataRedactionSettingsName name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); - AdSenseLink actualResponse = client.getAdSenseLink(name); + DataRedactionSettings actualResponse = client.getDataRedactionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAdSenseLinkRequest actualRequest = ((GetAdSenseLinkRequest) actualRequests.get(0)); + GetDataRedactionSettingsRequest actualRequest = + ((GetDataRedactionSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8913,13 +8949,13 @@ public void getAdSenseLinkTest2() throws Exception { } @Test - public void getAdSenseLinkExceptionTest2() throws Exception { + public void getDataRedactionSettingsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getAdSenseLink(name); + DataRedactionSettingsName name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + client.getDataRedactionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -8927,26 +8963,27 @@ public void getAdSenseLinkExceptionTest2() throws Exception { } @Test - public void createAdSenseLinkTest() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + public void getDataRedactionSettingsTest2() throws Exception { + DataRedactionSettings expectedResponse = + DataRedactionSettings.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .setEmailRedactionEnabled(true) + .setQueryParameterRedactionEnabled(true) + .addAllQueryParameterKeys(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - PropertyName parent = PropertyName.of("[PROPERTY]"); - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + String name = "name3373707"; - AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + DataRedactionSettings actualResponse = client.getDataRedactionSettings(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateAdSenseLinkRequest actualRequest = ((CreateAdSenseLinkRequest) actualRequests.get(0)); + GetDataRedactionSettingsRequest actualRequest = + ((GetDataRedactionSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(adsenseLink, actualRequest.getAdsenseLink()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8954,41 +8991,44 @@ public void createAdSenseLinkTest() throws Exception { } @Test - public void createAdSenseLinkExceptionTest() throws Exception { + public void getDataRedactionSettingsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.createAdSenseLink(parent, adsenseLink); + String name = "name3373707"; + client.getDataRedactionSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. } } - @Test - public void createAdSenseLinkTest2() throws Exception { - AdSenseLink expectedResponse = - AdSenseLink.newBuilder() - .setName(AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]").toString()) - .setAdClientCode("adClientCode-869953317") + @Test + public void createRollupPropertyTest() throws Exception { + CreateRollupPropertyResponse expectedResponse = + CreateRollupPropertyResponse.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllRollupPropertySourceLinks(new ArrayList()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); + CreateRollupPropertyRequest request = + CreateRollupPropertyRequest.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllSourceProperties(new ArrayList()) + .build(); - AdSenseLink actualResponse = client.createAdSenseLink(parent, adsenseLink); + CreateRollupPropertyResponse actualResponse = client.createRollupProperty(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateAdSenseLinkRequest actualRequest = ((CreateAdSenseLinkRequest) actualRequests.get(0)); + CreateRollupPropertyRequest actualRequest = + ((CreateRollupPropertyRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(adsenseLink, actualRequest.getAdsenseLink()); + Assert.assertEquals(request.getRollupProperty(), actualRequest.getRollupProperty()); + Assert.assertEquals(request.getSourcePropertiesList(), actualRequest.getSourcePropertiesList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -8996,14 +9036,17 @@ public void createAdSenseLinkTest2() throws Exception { } @Test - public void createAdSenseLinkExceptionTest2() throws Exception { + public void createRollupPropertyExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - AdSenseLink adsenseLink = AdSenseLink.newBuilder().build(); - client.createAdSenseLink(parent, adsenseLink); + CreateRollupPropertyRequest request = + CreateRollupPropertyRequest.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllSourceProperties(new ArrayList()) + .build(); + client.createRollupProperty(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9011,17 +9054,26 @@ public void createAdSenseLinkExceptionTest2() throws Exception { } @Test - public void deleteAdSenseLinkTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getRollupPropertySourceLinkTest() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) + .setSourceProperty("sourceProperty1938317072") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); - client.deleteAdSenseLink(name); + RollupPropertySourceLink actualResponse = client.getRollupPropertySourceLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteAdSenseLinkRequest actualRequest = ((DeleteAdSenseLinkRequest) actualRequests.get(0)); + GetRollupPropertySourceLinkRequest actualRequest = + ((GetRollupPropertySourceLinkRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( @@ -9031,13 +9083,14 @@ public void deleteAdSenseLinkTest() throws Exception { } @Test - public void deleteAdSenseLinkExceptionTest() throws Exception { + public void getRollupPropertySourceLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AdSenseLinkName name = AdSenseLinkName.of("[PROPERTY]", "[ADSENSE_LINK]"); - client.deleteAdSenseLink(name); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + client.getRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9045,17 +9098,25 @@ public void deleteAdSenseLinkExceptionTest() throws Exception { } @Test - public void deleteAdSenseLinkTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void getRollupPropertySourceLinkTest2() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) + .setSourceProperty("sourceProperty1938317072") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String name = "name3373707"; - client.deleteAdSenseLink(name); + RollupPropertySourceLink actualResponse = client.getRollupPropertySourceLink(name); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteAdSenseLinkRequest actualRequest = ((DeleteAdSenseLinkRequest) actualRequests.get(0)); + GetRollupPropertySourceLinkRequest actualRequest = + ((GetRollupPropertySourceLinkRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( @@ -9065,13 +9126,13 @@ public void deleteAdSenseLinkTest2() throws Exception { } @Test - public void deleteAdSenseLinkExceptionTest2() throws Exception { + public void getRollupPropertySourceLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String name = "name3373707"; - client.deleteAdSenseLink(name); + client.getRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9079,27 +9140,30 @@ public void deleteAdSenseLinkExceptionTest2() throws Exception { } @Test - public void listAdSenseLinksTest() throws Exception { - AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); - ListAdSenseLinksResponse expectedResponse = - ListAdSenseLinksResponse.newBuilder() + public void listRollupPropertySourceLinksTest() throws Exception { + RollupPropertySourceLink responsesElement = RollupPropertySourceLink.newBuilder().build(); + ListRollupPropertySourceLinksResponse expectedResponse = + ListRollupPropertySourceLinksResponse.newBuilder() .setNextPageToken("") - .addAllAdsenseLinks(Arrays.asList(responsesElement)) + .addAllRollupPropertySourceLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); - ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + ListRollupPropertySourceLinksPagedResponse pagedListResponse = + client.listRollupPropertySourceLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); + Assert.assertEquals( + expectedResponse.getRollupPropertySourceLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAdSenseLinksRequest actualRequest = ((ListAdSenseLinksRequest) actualRequests.get(0)); + ListRollupPropertySourceLinksRequest actualRequest = + ((ListRollupPropertySourceLinksRequest) actualRequests.get(0)); Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( @@ -9109,13 +9173,13 @@ public void listAdSenseLinksTest() throws Exception { } @Test - public void listAdSenseLinksExceptionTest() throws Exception { + public void listRollupPropertySourceLinksExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); - client.listAdSenseLinks(parent); + client.listRollupPropertySourceLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9123,27 +9187,30 @@ public void listAdSenseLinksExceptionTest() throws Exception { } @Test - public void listAdSenseLinksTest2() throws Exception { - AdSenseLink responsesElement = AdSenseLink.newBuilder().build(); - ListAdSenseLinksResponse expectedResponse = - ListAdSenseLinksResponse.newBuilder() + public void listRollupPropertySourceLinksTest2() throws Exception { + RollupPropertySourceLink responsesElement = RollupPropertySourceLink.newBuilder().build(); + ListRollupPropertySourceLinksResponse expectedResponse = + ListRollupPropertySourceLinksResponse.newBuilder() .setNextPageToken("") - .addAllAdsenseLinks(Arrays.asList(responsesElement)) + .addAllRollupPropertySourceLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); String parent = "parent-995424086"; - ListAdSenseLinksPagedResponse pagedListResponse = client.listAdSenseLinks(parent); + ListRollupPropertySourceLinksPagedResponse pagedListResponse = + client.listRollupPropertySourceLinks(parent); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAdsenseLinksList().get(0), resources.get(0)); + Assert.assertEquals( + expectedResponse.getRollupPropertySourceLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAdSenseLinksRequest actualRequest = ((ListAdSenseLinksRequest) actualRequests.get(0)); + ListRollupPropertySourceLinksRequest actualRequest = + ((ListRollupPropertySourceLinksRequest) actualRequests.get(0)); Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( @@ -9153,13 +9220,13 @@ public void listAdSenseLinksTest2() throws Exception { } @Test - public void listAdSenseLinksExceptionTest2() throws Exception { + public void listRollupPropertySourceLinksExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { String parent = "parent-995424086"; - client.listAdSenseLinks(parent); + client.listRollupPropertySourceLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9167,30 +9234,31 @@ public void listAdSenseLinksExceptionTest2() throws Exception { } @Test - public void getEventCreateRuleTest() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() + public void createRollupPropertySourceLinkTest() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) + .setSourceProperty("sourceProperty1938317072") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); - EventCreateRule actualResponse = client.getEventCreateRule(name); + RollupPropertySourceLink actualResponse = + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetEventCreateRuleRequest actualRequest = ((GetEventCreateRuleRequest) actualRequests.get(0)); + CreateRollupPropertySourceLinkRequest actualRequest = + ((CreateRollupPropertySourceLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(rollupPropertySourceLink, actualRequest.getRollupPropertySourceLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9198,14 +9266,15 @@ public void getEventCreateRuleTest() throws Exception { } @Test - public void getEventCreateRuleExceptionTest() throws Exception { + public void createRollupPropertySourceLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - client.getEventCreateRule(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9213,29 +9282,31 @@ public void getEventCreateRuleExceptionTest() throws Exception { } @Test - public void getEventCreateRuleTest2() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() + public void createRollupPropertySourceLinkTest2() throws Exception { + RollupPropertySourceLink expectedResponse = + RollupPropertySourceLink.newBuilder() .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) + .setSourceProperty("sourceProperty1938317072") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); - EventCreateRule actualResponse = client.getEventCreateRule(name); + RollupPropertySourceLink actualResponse = + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetEventCreateRuleRequest actualRequest = ((GetEventCreateRuleRequest) actualRequests.get(0)); + CreateRollupPropertySourceLinkRequest actualRequest = + ((CreateRollupPropertySourceLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(rollupPropertySourceLink, actualRequest.getRollupPropertySourceLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9243,13 +9314,15 @@ public void getEventCreateRuleTest2() throws Exception { } @Test - public void getEventCreateRuleExceptionTest2() throws Exception { + public void createRollupPropertySourceLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.getEventCreateRule(name); + String parent = "parent-995424086"; + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); + client.createRollupPropertySourceLink(parent, rollupPropertySourceLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9257,30 +9330,21 @@ public void getEventCreateRuleExceptionTest2() throws Exception { } @Test - public void listEventCreateRulesTest() throws Exception { - EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); - ListEventCreateRulesResponse expectedResponse = - ListEventCreateRulesResponse.newBuilder() - .setNextPageToken("") - .addAllEventCreateRules(Arrays.asList(responsesElement)) - .build(); + public void deleteRollupPropertySourceLinkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - - ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); + client.deleteRollupPropertySourceLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListEventCreateRulesRequest actualRequest = - ((ListEventCreateRulesRequest) actualRequests.get(0)); + DeleteRollupPropertySourceLinkRequest actualRequest = + ((DeleteRollupPropertySourceLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9288,13 +9352,14 @@ public void listEventCreateRulesTest() throws Exception { } @Test - public void listEventCreateRulesExceptionTest() throws Exception { + public void deleteRollupPropertySourceLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - client.listEventCreateRules(parent); + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + client.deleteRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9302,30 +9367,20 @@ public void listEventCreateRulesExceptionTest() throws Exception { } @Test - public void listEventCreateRulesTest2() throws Exception { - EventCreateRule responsesElement = EventCreateRule.newBuilder().build(); - ListEventCreateRulesResponse expectedResponse = - ListEventCreateRulesResponse.newBuilder() - .setNextPageToken("") - .addAllEventCreateRules(Arrays.asList(responsesElement)) - .build(); + public void deleteRollupPropertySourceLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - - ListEventCreateRulesPagedResponse pagedListResponse = client.listEventCreateRules(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + String name = "name3373707"; - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getEventCreateRulesList().get(0), resources.get(0)); + client.deleteRollupPropertySourceLink(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListEventCreateRulesRequest actualRequest = - ((ListEventCreateRulesRequest) actualRequests.get(0)); + DeleteRollupPropertySourceLinkRequest actualRequest = + ((DeleteRollupPropertySourceLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9333,13 +9388,13 @@ public void listEventCreateRulesTest2() throws Exception { } @Test - public void listEventCreateRulesExceptionTest2() throws Exception { + public void deleteRollupPropertySourceLinkExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - client.listEventCreateRules(parent); + String name = "name3373707"; + client.deleteRollupPropertySourceLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9347,32 +9402,32 @@ public void listEventCreateRulesExceptionTest2() throws Exception { } @Test - public void createEventCreateRuleTest() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) + public void createSubpropertyTest() throws Exception { + CreateSubpropertyResponse expectedResponse = + CreateSubpropertyResponse.newBuilder() + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + CreateSubpropertyRequest request = + CreateSubpropertyRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); - EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); + CreateSubpropertyResponse actualResponse = client.createSubproperty(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateEventCreateRuleRequest actualRequest = - ((CreateEventCreateRuleRequest) actualRequests.get(0)); + CreateSubpropertyRequest actualRequest = ((CreateSubpropertyRequest) actualRequests.get(0)); - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(eventCreateRule, actualRequest.getEventCreateRule()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getSubproperty(), actualRequest.getSubproperty()); + Assert.assertEquals( + request.getSubpropertyEventFilter(), actualRequest.getSubpropertyEventFilter()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9380,14 +9435,18 @@ public void createEventCreateRuleTest() throws Exception { } @Test - public void createEventCreateRuleExceptionTest() throws Exception { + public void createSubpropertyExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - DataStreamName parent = DataStreamName.of("[PROPERTY]", "[DATA_STREAM]"); - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - client.createEventCreateRule(parent, eventCreateRule); + CreateSubpropertyRequest request = + CreateSubpropertyRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); + client.createSubproperty(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9395,32 +9454,21 @@ public void createEventCreateRuleExceptionTest() throws Exception { } @Test - public void createEventCreateRuleTest2() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) - .build(); + public void deleteSubpropertyEventFilterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String parent = "parent-995424086"; - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); + SubpropertyEventFilterName name = + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]"); - EventCreateRule actualResponse = client.createEventCreateRule(parent, eventCreateRule); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSubpropertyEventFilter(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateEventCreateRuleRequest actualRequest = - ((CreateEventCreateRuleRequest) actualRequests.get(0)); + DeleteSubpropertyEventFilterRequest actualRequest = + ((DeleteSubpropertyEventFilterRequest) actualRequests.get(0)); - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(eventCreateRule, actualRequest.getEventCreateRule()); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9428,14 +9476,14 @@ public void createEventCreateRuleTest2() throws Exception { } @Test - public void createEventCreateRuleExceptionTest2() throws Exception { + public void deleteSubpropertyEventFilterExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String parent = "parent-995424086"; - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - client.createEventCreateRule(parent, eventCreateRule); + SubpropertyEventFilterName name = + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]"); + client.deleteSubpropertyEventFilter(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9443,32 +9491,20 @@ public void createEventCreateRuleExceptionTest2() throws Exception { } @Test - public void updateEventCreateRuleTest() throws Exception { - EventCreateRule expectedResponse = - EventCreateRule.newBuilder() - .setName( - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]") - .toString()) - .setDestinationEvent("destinationEvent1181456172") - .addAllEventConditions(new ArrayList()) - .setSourceCopyParameters(true) - .addAllParameterMutations(new ArrayList()) - .build(); + public void deleteSubpropertyEventFilterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); + String name = "name3373707"; - EventCreateRule actualResponse = client.updateEventCreateRule(eventCreateRule, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteSubpropertyEventFilter(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateEventCreateRuleRequest actualRequest = - ((UpdateEventCreateRuleRequest) actualRequests.get(0)); + DeleteSubpropertyEventFilterRequest actualRequest = + ((DeleteSubpropertyEventFilterRequest) actualRequests.get(0)); - Assert.assertEquals(eventCreateRule, actualRequest.getEventCreateRule()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9476,14 +9512,13 @@ public void updateEventCreateRuleTest() throws Exception { } @Test - public void updateEventCreateRuleExceptionTest() throws Exception { + public void deleteSubpropertyEventFilterExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - EventCreateRule eventCreateRule = EventCreateRule.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEventCreateRule(eventCreateRule, updateMask); + String name = "name3373707"; + client.deleteSubpropertyEventFilter(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9491,21 +9526,31 @@ public void updateEventCreateRuleExceptionTest() throws Exception { } @Test - public void deleteEventCreateRuleTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createSubpropertyEventFilterTest() throws Exception { + SubpropertyEventFilter expectedResponse = + SubpropertyEventFilter.newBuilder() + .setName( + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + .toString()) + .setApplyToProperty("applyToProperty267785086") + .addAllFilterClauses(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); + PropertyName parent = PropertyName.of("[PROPERTY]"); + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); - client.deleteEventCreateRule(name); + SubpropertyEventFilter actualResponse = + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteEventCreateRuleRequest actualRequest = - ((DeleteEventCreateRuleRequest) actualRequests.get(0)); + CreateSubpropertyEventFilterRequest actualRequest = + ((CreateSubpropertyEventFilterRequest) actualRequests.get(0)); - Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(subpropertyEventFilter, actualRequest.getSubpropertyEventFilter()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9513,14 +9558,14 @@ public void deleteEventCreateRuleTest() throws Exception { } @Test - public void deleteEventCreateRuleExceptionTest() throws Exception { + public void createSubpropertyEventFilterExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - EventCreateRuleName name = - EventCreateRuleName.of("[PROPERTY]", "[DATA_STREAM]", "[EVENT_CREATE_RULE]"); - client.deleteEventCreateRule(name); + PropertyName parent = PropertyName.of("[PROPERTY]"); + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. @@ -9528,20 +9573,31 @@ public void deleteEventCreateRuleExceptionTest() throws Exception { } @Test - public void deleteEventCreateRuleTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void createSubpropertyEventFilterTest2() throws Exception { + SubpropertyEventFilter expectedResponse = + SubpropertyEventFilter.newBuilder() + .setName( + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + .toString()) + .setApplyToProperty("applyToProperty267785086") + .addAllFilterClauses(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String name = "name3373707"; + String parent = "parent-995424086"; + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); - client.deleteEventCreateRule(name); + SubpropertyEventFilter actualResponse = + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteEventCreateRuleRequest actualRequest = - ((DeleteEventCreateRuleRequest) actualRequests.get(0)); + CreateSubpropertyEventFilterRequest actualRequest = + ((CreateSubpropertyEventFilterRequest) actualRequests.get(0)); - Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(subpropertyEventFilter, actualRequest.getSubpropertyEventFilter()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -9549,13 +9605,14 @@ public void deleteEventCreateRuleTest2() throws Exception { } @Test - public void deleteEventCreateRuleExceptionTest2() throws Exception { + public void createSubpropertyEventFilterExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String name = "name3373707"; - client.deleteEventCreateRule(name); + String parent = "parent-995424086"; + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + client.createSubpropertyEventFilter(parent, subpropertyEventFilter); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception. diff --git a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java index 3e332bc26265..c1a5bd6c219f 100644 --- a/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java +++ b/java-analytics-admin/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java @@ -289,218 +289,6 @@ public void updateProperty( } } - @Override - public void getUserLink(GetUserLinkRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof UserLink) { - requests.add(request); - responseObserver.onNext(((UserLink) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetUserLink, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - UserLink.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchGetUserLinks( - BatchGetUserLinksRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchGetUserLinksResponse) { - requests.add(request); - responseObserver.onNext(((BatchGetUserLinksResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchGetUserLinks, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchGetUserLinksResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listUserLinks( - ListUserLinksRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListUserLinksResponse) { - requests.add(request); - responseObserver.onNext(((ListUserLinksResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListUserLinks, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListUserLinksResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void auditUserLinks( - AuditUserLinksRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof AuditUserLinksResponse) { - requests.add(request); - responseObserver.onNext(((AuditUserLinksResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AuditUserLinks, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - AuditUserLinksResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createUserLink( - CreateUserLinkRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof UserLink) { - requests.add(request); - responseObserver.onNext(((UserLink) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateUserLink, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - UserLink.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchCreateUserLinks( - BatchCreateUserLinksRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchCreateUserLinksResponse) { - requests.add(request); - responseObserver.onNext(((BatchCreateUserLinksResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchCreateUserLinks, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchCreateUserLinksResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateUserLink( - UpdateUserLinkRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof UserLink) { - requests.add(request); - responseObserver.onNext(((UserLink) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateUserLink, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - UserLink.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchUpdateUserLinks( - BatchUpdateUserLinksRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchUpdateUserLinksResponse) { - requests.add(request); - responseObserver.onNext(((BatchUpdateUserLinksResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchUpdateUserLinks, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchUpdateUserLinksResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteUserLink( - DeleteUserLinkRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteUserLink, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchDeleteUserLinks( - BatchDeleteUserLinksRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchDeleteUserLinks, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - @Override public void createFirebaseLink( CreateFirebaseLinkRequest request, StreamObserver responseObserver) { @@ -2793,4 +2581,222 @@ public void deleteEventCreateRule( Exception.class.getName()))); } } + + @Override + public void updateDataRedactionSettings( + UpdateDataRedactionSettingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataRedactionSettings) { + requests.add(request); + responseObserver.onNext(((DataRedactionSettings) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDataRedactionSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataRedactionSettings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataRedactionSettings( + GetDataRedactionSettingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataRedactionSettings) { + requests.add(request); + responseObserver.onNext(((DataRedactionSettings) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataRedactionSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataRedactionSettings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRollupProperty( + CreateRollupPropertyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CreateRollupPropertyResponse) { + requests.add(request); + responseObserver.onNext(((CreateRollupPropertyResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateRollupProperty, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CreateRollupPropertyResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRollupPropertySourceLink( + GetRollupPropertySourceLinkRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RollupPropertySourceLink) { + requests.add(request); + responseObserver.onNext(((RollupPropertySourceLink) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetRollupPropertySourceLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RollupPropertySourceLink.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRollupPropertySourceLinks( + ListRollupPropertySourceLinksRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRollupPropertySourceLinksResponse) { + requests.add(request); + responseObserver.onNext(((ListRollupPropertySourceLinksResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRollupPropertySourceLinks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRollupPropertySourceLinksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRollupPropertySourceLink( + CreateRollupPropertySourceLinkRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RollupPropertySourceLink) { + requests.add(request); + responseObserver.onNext(((RollupPropertySourceLink) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateRollupPropertySourceLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RollupPropertySourceLink.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRollupPropertySourceLink( + DeleteRollupPropertySourceLinkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteRollupPropertySourceLink, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSubproperty( + CreateSubpropertyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CreateSubpropertyResponse) { + requests.add(request); + responseObserver.onNext(((CreateSubpropertyResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSubproperty, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CreateSubpropertyResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSubpropertyEventFilter( + DeleteSubpropertyEventFilterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSubpropertyEventFilter, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSubpropertyEventFilter( + CreateSubpropertyEventFilterRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SubpropertyEventFilter) { + requests.add(request); + responseObserver.onNext(((SubpropertyEventFilter) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSubpropertyEventFilter, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SubpropertyEventFilter.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-analytics-admin/grpc-google-analytics-admin-v1alpha/pom.xml b/java-analytics-admin/grpc-google-analytics-admin-v1alpha/pom.xml index e3e5cbb9dd42..8319a5b0f71e 100644 --- a/java-analytics-admin/grpc-google-analytics-admin-v1alpha/pom.xml +++ b/java-analytics-admin/grpc-google-analytics-admin-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.38.0 + 0.39.0 grpc-google-analytics-admin-v1alpha GRPC library for grpc-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.38.0 + 0.39.0 diff --git a/java-analytics-admin/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java b/java-analytics-admin/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java index d9eab5e4f804..51a3b6b90303 100644 --- a/java-analytics-admin/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java +++ b/java-analytics-admin/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java @@ -553,480 +553,6 @@ private AnalyticsAdminServiceGrpc() {} return getUpdatePropertyMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.GetUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getGetUserLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetUserLink", - requestType = com.google.analytics.admin.v1alpha.GetUserLinkRequest.class, - responseType = com.google.analytics.admin.v1alpha.UserLink.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.GetUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getGetUserLinkMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.GetUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getGetUserLinkMethod; - if ((getGetUserLinkMethod = AnalyticsAdminServiceGrpc.getGetUserLinkMethod) == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getGetUserLinkMethod = AnalyticsAdminServiceGrpc.getGetUserLinkMethod) == null) { - AnalyticsAdminServiceGrpc.getGetUserLinkMethod = - getGetUserLinkMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUserLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.GetUserLinkRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("GetUserLink")) - .build(); - } - } - } - return getGetUserLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse> - getBatchGetUserLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchGetUserLinks", - requestType = com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.class, - responseType = com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse> - getBatchGetUserLinksMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse> - getBatchGetUserLinksMethod; - if ((getBatchGetUserLinksMethod = AnalyticsAdminServiceGrpc.getBatchGetUserLinksMethod) - == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getBatchGetUserLinksMethod = AnalyticsAdminServiceGrpc.getBatchGetUserLinksMethod) - == null) { - AnalyticsAdminServiceGrpc.getBatchGetUserLinksMethod = - getBatchGetUserLinksMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchGetUserLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("BatchGetUserLinks")) - .build(); - } - } - } - return getBatchGetUserLinksMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.ListUserLinksRequest, - com.google.analytics.admin.v1alpha.ListUserLinksResponse> - getListUserLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListUserLinks", - requestType = com.google.analytics.admin.v1alpha.ListUserLinksRequest.class, - responseType = com.google.analytics.admin.v1alpha.ListUserLinksResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.ListUserLinksRequest, - com.google.analytics.admin.v1alpha.ListUserLinksResponse> - getListUserLinksMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.ListUserLinksRequest, - com.google.analytics.admin.v1alpha.ListUserLinksResponse> - getListUserLinksMethod; - if ((getListUserLinksMethod = AnalyticsAdminServiceGrpc.getListUserLinksMethod) == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getListUserLinksMethod = AnalyticsAdminServiceGrpc.getListUserLinksMethod) == null) { - AnalyticsAdminServiceGrpc.getListUserLinksMethod = - getListUserLinksMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListUserLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.ListUserLinksRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.ListUserLinksResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("ListUserLinks")) - .build(); - } - } - } - return getListUserLinksMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.AuditUserLinksRequest, - com.google.analytics.admin.v1alpha.AuditUserLinksResponse> - getAuditUserLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AuditUserLinks", - requestType = com.google.analytics.admin.v1alpha.AuditUserLinksRequest.class, - responseType = com.google.analytics.admin.v1alpha.AuditUserLinksResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.AuditUserLinksRequest, - com.google.analytics.admin.v1alpha.AuditUserLinksResponse> - getAuditUserLinksMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.AuditUserLinksRequest, - com.google.analytics.admin.v1alpha.AuditUserLinksResponse> - getAuditUserLinksMethod; - if ((getAuditUserLinksMethod = AnalyticsAdminServiceGrpc.getAuditUserLinksMethod) == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getAuditUserLinksMethod = AnalyticsAdminServiceGrpc.getAuditUserLinksMethod) == null) { - AnalyticsAdminServiceGrpc.getAuditUserLinksMethod = - getAuditUserLinksMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AuditUserLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.AuditUserLinksRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.AuditUserLinksResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("AuditUserLinks")) - .build(); - } - } - } - return getAuditUserLinksMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.CreateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getCreateUserLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateUserLink", - requestType = com.google.analytics.admin.v1alpha.CreateUserLinkRequest.class, - responseType = com.google.analytics.admin.v1alpha.UserLink.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.CreateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getCreateUserLinkMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.CreateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getCreateUserLinkMethod; - if ((getCreateUserLinkMethod = AnalyticsAdminServiceGrpc.getCreateUserLinkMethod) == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getCreateUserLinkMethod = AnalyticsAdminServiceGrpc.getCreateUserLinkMethod) == null) { - AnalyticsAdminServiceGrpc.getCreateUserLinkMethod = - getCreateUserLinkMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateUserLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("CreateUserLink")) - .build(); - } - } - } - return getCreateUserLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse> - getBatchCreateUserLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchCreateUserLinks", - requestType = com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.class, - responseType = com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse> - getBatchCreateUserLinksMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse> - getBatchCreateUserLinksMethod; - if ((getBatchCreateUserLinksMethod = AnalyticsAdminServiceGrpc.getBatchCreateUserLinksMethod) - == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getBatchCreateUserLinksMethod = - AnalyticsAdminServiceGrpc.getBatchCreateUserLinksMethod) - == null) { - AnalyticsAdminServiceGrpc.getBatchCreateUserLinksMethod = - getBatchCreateUserLinksMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "BatchCreateUserLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("BatchCreateUserLinks")) - .build(); - } - } - } - return getBatchCreateUserLinksMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getUpdateUserLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateUserLink", - requestType = com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.class, - responseType = com.google.analytics.admin.v1alpha.UserLink.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getUpdateUserLinkMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink> - getUpdateUserLinkMethod; - if ((getUpdateUserLinkMethod = AnalyticsAdminServiceGrpc.getUpdateUserLinkMethod) == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getUpdateUserLinkMethod = AnalyticsAdminServiceGrpc.getUpdateUserLinkMethod) == null) { - AnalyticsAdminServiceGrpc.getUpdateUserLinkMethod = - getUpdateUserLinkMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateUserLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("UpdateUserLink")) - .build(); - } - } - } - return getUpdateUserLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse> - getBatchUpdateUserLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchUpdateUserLinks", - requestType = com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.class, - responseType = com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse> - getBatchUpdateUserLinksMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse> - getBatchUpdateUserLinksMethod; - if ((getBatchUpdateUserLinksMethod = AnalyticsAdminServiceGrpc.getBatchUpdateUserLinksMethod) - == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getBatchUpdateUserLinksMethod = - AnalyticsAdminServiceGrpc.getBatchUpdateUserLinksMethod) - == null) { - AnalyticsAdminServiceGrpc.getBatchUpdateUserLinksMethod = - getBatchUpdateUserLinksMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "BatchUpdateUserLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("BatchUpdateUserLinks")) - .build(); - } - } - } - return getBatchUpdateUserLinksMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest, com.google.protobuf.Empty> - getDeleteUserLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteUserLink", - requestType = com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest, com.google.protobuf.Empty> - getDeleteUserLinkMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest, com.google.protobuf.Empty> - getDeleteUserLinkMethod; - if ((getDeleteUserLinkMethod = AnalyticsAdminServiceGrpc.getDeleteUserLinkMethod) == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getDeleteUserLinkMethod = AnalyticsAdminServiceGrpc.getDeleteUserLinkMethod) == null) { - AnalyticsAdminServiceGrpc.getDeleteUserLinkMethod = - getDeleteUserLinkMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteUserLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("DeleteUserLink")) - .build(); - } - } - } - return getDeleteUserLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest, com.google.protobuf.Empty> - getBatchDeleteUserLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchDeleteUserLinks", - requestType = com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest, com.google.protobuf.Empty> - getBatchDeleteUserLinksMethod() { - io.grpc.MethodDescriptor< - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest, - com.google.protobuf.Empty> - getBatchDeleteUserLinksMethod; - if ((getBatchDeleteUserLinksMethod = AnalyticsAdminServiceGrpc.getBatchDeleteUserLinksMethod) - == null) { - synchronized (AnalyticsAdminServiceGrpc.class) { - if ((getBatchDeleteUserLinksMethod = - AnalyticsAdminServiceGrpc.getBatchDeleteUserLinksMethod) - == null) { - AnalyticsAdminServiceGrpc.getBatchDeleteUserLinksMethod = - getBatchDeleteUserLinksMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "BatchDeleteUserLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new AnalyticsAdminServiceMethodDescriptorSupplier("BatchDeleteUserLinks")) - .build(); - } - } - } - return getBatchDeleteUserLinksMethod; - } - private static volatile io.grpc.MethodDescriptor< com.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest, com.google.analytics.admin.v1alpha.FirebaseLink> @@ -6513,9 +6039,531 @@ private AnalyticsAdminServiceGrpc() {} return getDeleteEventCreateRuleMethod; } - /** Creates a new async stub that supports all call types for the service */ - public static AnalyticsAdminServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings> + getUpdateDataRedactionSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataRedactionSettings", + requestType = com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest.class, + responseType = com.google.analytics.admin.v1alpha.DataRedactionSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings> + getUpdateDataRedactionSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings> + getUpdateDataRedactionSettingsMethod; + if ((getUpdateDataRedactionSettingsMethod = + AnalyticsAdminServiceGrpc.getUpdateDataRedactionSettingsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getUpdateDataRedactionSettingsMethod = + AnalyticsAdminServiceGrpc.getUpdateDataRedactionSettingsMethod) + == null) { + AnalyticsAdminServiceGrpc.getUpdateDataRedactionSettingsMethod = + getUpdateDataRedactionSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDataRedactionSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.DataRedactionSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "UpdateDataRedactionSettings")) + .build(); + } + } + } + return getUpdateDataRedactionSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings> + getGetDataRedactionSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataRedactionSettings", + requestType = com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest.class, + responseType = com.google.analytics.admin.v1alpha.DataRedactionSettings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings> + getGetDataRedactionSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings> + getGetDataRedactionSettingsMethod; + if ((getGetDataRedactionSettingsMethod = + AnalyticsAdminServiceGrpc.getGetDataRedactionSettingsMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetDataRedactionSettingsMethod = + AnalyticsAdminServiceGrpc.getGetDataRedactionSettingsMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetDataRedactionSettingsMethod = + getGetDataRedactionSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDataRedactionSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.DataRedactionSettings + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "GetDataRedactionSettings")) + .build(); + } + } + } + return getGetDataRedactionSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest, + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse> + getCreateRollupPropertyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRollupProperty", + requestType = com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.class, + responseType = com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest, + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse> + getCreateRollupPropertyMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest, + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse> + getCreateRollupPropertyMethod; + if ((getCreateRollupPropertyMethod = AnalyticsAdminServiceGrpc.getCreateRollupPropertyMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateRollupPropertyMethod = + AnalyticsAdminServiceGrpc.getCreateRollupPropertyMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateRollupPropertyMethod = + getCreateRollupPropertyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateRollupProperty")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("CreateRollupProperty")) + .build(); + } + } + } + return getCreateRollupPropertyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + getGetRollupPropertySourceLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRollupPropertySourceLink", + requestType = com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest.class, + responseType = com.google.analytics.admin.v1alpha.RollupPropertySourceLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + getGetRollupPropertySourceLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + getGetRollupPropertySourceLinkMethod; + if ((getGetRollupPropertySourceLinkMethod = + AnalyticsAdminServiceGrpc.getGetRollupPropertySourceLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getGetRollupPropertySourceLinkMethod = + AnalyticsAdminServiceGrpc.getGetRollupPropertySourceLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getGetRollupPropertySourceLinkMethod = + getGetRollupPropertySourceLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetRollupPropertySourceLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "GetRollupPropertySourceLink")) + .build(); + } + } + } + return getGetRollupPropertySourceLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse> + getListRollupPropertySourceLinksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRollupPropertySourceLinks", + requestType = com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest.class, + responseType = com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse> + getListRollupPropertySourceLinksMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse> + getListRollupPropertySourceLinksMethod; + if ((getListRollupPropertySourceLinksMethod = + AnalyticsAdminServiceGrpc.getListRollupPropertySourceLinksMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListRollupPropertySourceLinksMethod = + AnalyticsAdminServiceGrpc.getListRollupPropertySourceLinksMethod) + == null) { + AnalyticsAdminServiceGrpc.getListRollupPropertySourceLinksMethod = + getListRollupPropertySourceLinksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListRollupPropertySourceLinks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha + .ListRollupPropertySourceLinksRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha + .ListRollupPropertySourceLinksResponse.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "ListRollupPropertySourceLinks")) + .build(); + } + } + } + return getListRollupPropertySourceLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + getCreateRollupPropertySourceLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRollupPropertySourceLink", + requestType = com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest.class, + responseType = com.google.analytics.admin.v1alpha.RollupPropertySourceLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + getCreateRollupPropertySourceLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + getCreateRollupPropertySourceLinkMethod; + if ((getCreateRollupPropertySourceLinkMethod = + AnalyticsAdminServiceGrpc.getCreateRollupPropertySourceLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateRollupPropertySourceLinkMethod = + AnalyticsAdminServiceGrpc.getCreateRollupPropertySourceLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateRollupPropertySourceLinkMethod = + getCreateRollupPropertySourceLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateRollupPropertySourceLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha + .CreateRollupPropertySourceLinkRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "CreateRollupPropertySourceLink")) + .build(); + } + } + } + return getCreateRollupPropertySourceLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest, + com.google.protobuf.Empty> + getDeleteRollupPropertySourceLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRollupPropertySourceLink", + requestType = com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest, + com.google.protobuf.Empty> + getDeleteRollupPropertySourceLinkMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest, + com.google.protobuf.Empty> + getDeleteRollupPropertySourceLinkMethod; + if ((getDeleteRollupPropertySourceLinkMethod = + AnalyticsAdminServiceGrpc.getDeleteRollupPropertySourceLinkMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteRollupPropertySourceLinkMethod = + AnalyticsAdminServiceGrpc.getDeleteRollupPropertySourceLinkMethod) + == null) { + AnalyticsAdminServiceGrpc.getDeleteRollupPropertySourceLinkMethod = + getDeleteRollupPropertySourceLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteRollupPropertySourceLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha + .DeleteRollupPropertySourceLinkRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "DeleteRollupPropertySourceLink")) + .build(); + } + } + } + return getDeleteRollupPropertySourceLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest, + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse> + getCreateSubpropertyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSubproperty", + requestType = com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.class, + responseType = com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest, + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse> + getCreateSubpropertyMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest, + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse> + getCreateSubpropertyMethod; + if ((getCreateSubpropertyMethod = AnalyticsAdminServiceGrpc.getCreateSubpropertyMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateSubpropertyMethod = AnalyticsAdminServiceGrpc.getCreateSubpropertyMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateSubpropertyMethod = + getCreateSubpropertyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubproperty")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("CreateSubproperty")) + .build(); + } + } + } + return getCreateSubpropertyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest, + com.google.protobuf.Empty> + getDeleteSubpropertyEventFilterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSubpropertyEventFilter", + requestType = com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest, + com.google.protobuf.Empty> + getDeleteSubpropertyEventFilterMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest, + com.google.protobuf.Empty> + getDeleteSubpropertyEventFilterMethod; + if ((getDeleteSubpropertyEventFilterMethod = + AnalyticsAdminServiceGrpc.getDeleteSubpropertyEventFilterMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getDeleteSubpropertyEventFilterMethod = + AnalyticsAdminServiceGrpc.getDeleteSubpropertyEventFilterMethod) + == null) { + AnalyticsAdminServiceGrpc.getDeleteSubpropertyEventFilterMethod = + getDeleteSubpropertyEventFilterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteSubpropertyEventFilter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "DeleteSubpropertyEventFilter")) + .build(); + } + } + } + return getDeleteSubpropertyEventFilterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter> + getCreateSubpropertyEventFilterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSubpropertyEventFilter", + requestType = com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest.class, + responseType = com.google.analytics.admin.v1alpha.SubpropertyEventFilter.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter> + getCreateSubpropertyEventFilterMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter> + getCreateSubpropertyEventFilterMethod; + if ((getCreateSubpropertyEventFilterMethod = + AnalyticsAdminServiceGrpc.getCreateSubpropertyEventFilterMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getCreateSubpropertyEventFilterMethod = + AnalyticsAdminServiceGrpc.getCreateSubpropertyEventFilterMethod) + == null) { + AnalyticsAdminServiceGrpc.getCreateSubpropertyEventFilterMethod = + getCreateSubpropertyEventFilterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateSubpropertyEventFilter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier( + "CreateSubpropertyEventFilter")) + .build(); + } + } + } + return getCreateSubpropertyEventFilterMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AnalyticsAdminServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public AnalyticsAdminServiceStub newStub( @@ -6603,7 +6651,7 @@ default void listAccounts( * However, they can be restored using the Trash Can UI. * If the accounts are not restored before the expiration time, the account * and all child resources (eg: Properties, GoogleAdsLinks, Streams, - * UserLinks) will be permanently purged. + * AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * Returns an error if the target is not found. * @@ -6715,7 +6763,7 @@ default void createProperty( * This API does not have a method to restore soft-deleted properties. * However, they can be restored using the Trash Can UI. * If the properties are not restored before the expiration time, the Property - * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + * and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) * will be permanently purged. * https://support.google.com/analytics/answer/6154772 * Returns an error if the target is not found, or is not a GA4 Property. @@ -6742,163 +6790,6 @@ default void updateProperty( getUpdatePropertyMethod(), responseObserver); } - /** - * - * - *

-     * Gets information about a user's link to an account or property.
-     * 
- */ - default void getUserLink( - com.google.analytics.admin.v1alpha.GetUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetUserLinkMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets information about multiple users' links to an account or property.
-     * 
- */ - default void batchGetUserLinks( - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getBatchGetUserLinksMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists all user links on an account or property.
-     * 
- */ - default void listUserLinks( - com.google.analytics.admin.v1alpha.ListUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListUserLinksMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists all user links on an account or property, including implicit ones
-     * that come from effective permissions granted by groups or organization
-     * admin roles.
-     * If a returned user link does not have direct permissions, they cannot
-     * be removed from the account or property directly with the DeleteUserLink
-     * command. They have to be removed from the group/etc that gives them
-     * permissions, which is currently only usable/discoverable in the GA or GMP
-     * UIs.
-     * 
- */ - default void auditUserLinks( - com.google.analytics.admin.v1alpha.AuditUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getAuditUserLinksMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a user link on an account or property.
-     * If the user with the specified email already has permissions on the
-     * account or property, then the user's existing permissions will be unioned
-     * with the permissions specified in the new UserLink.
-     * 
- */ - default void createUserLink( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateUserLinkMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates information about multiple users' links to an account or property.
-     * This method is transactional. If any UserLink cannot be created, none of
-     * the UserLinks will be created.
-     * 
- */ - default void batchCreateUserLinks( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getBatchCreateUserLinksMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a user link on an account or property.
-     * 
- */ - default void updateUserLink( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateUserLinkMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates information about multiple users' links to an account or property.
-     * 
- */ - default void batchUpdateUserLinks( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getBatchUpdateUserLinksMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a user link on an account or property.
-     * 
- */ - default void deleteUserLink( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteUserLinkMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes information about multiple users' links to an account or property.
-     * 
- */ - default void batchDeleteUserLinks( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getBatchDeleteUserLinksMethod(), responseObserver); - } - /** * * @@ -8565,7 +8456,165 @@ default void deleteEventCreateRule( com.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteEventCreateRuleMethod(), responseObserver); + getDeleteEventCreateRuleMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a DataRedactionSettings on a property.
+     * 
+ */ + default void updateDataRedactionSettings( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataRedactionSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single DataRedactionSettings.
+     * 
+ */ + default void getDataRedactionSettings( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataRedactionSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a roll-up property and all roll-up property source links.
+     * 
+ */ + default void createRollupProperty( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRollupPropertyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single roll-up property source Link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + default void getRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRollupPropertySourceLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists roll-up property source Links on a property.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + default void listRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRollupPropertySourceLinksMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + default void createRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRollupPropertySourceLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + default void deleteRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteRollupPropertySourceLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a subproperty and a subproperty event filter that applies to the
+     * created subproperty.
+     * 
+ */ + default void createSubproperty( + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSubpropertyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a subproperty event filter.
+     * 
+ */ + default void deleteSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSubpropertyEventFilterMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a subproperty Event Filter.
+     * 
+ */ + default void createSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSubpropertyEventFilterMethod(), responseObserver); } } @@ -8647,7 +8696,7 @@ public void listAccounts( * However, they can be restored using the Trash Can UI. * If the accounts are not restored before the expiration time, the account * and all child resources (eg: Properties, GoogleAdsLinks, Streams, - * UserLinks) will be permanently purged. + * AccessBindings) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * Returns an error if the target is not found. * @@ -8773,7 +8822,7 @@ public void createProperty( * This API does not have a method to restore soft-deleted properties. * However, they can be restored using the Trash Can UI. * If the properties are not restored before the expiration time, the Property - * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + * and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) * will be permanently purged. * https://support.google.com/analytics/answer/6154772 * Returns an error if the target is not found, or is not a GA4 Property. @@ -8804,183 +8853,6 @@ public void updateProperty( responseObserver); } - /** - * - * - *
-     * Gets information about a user's link to an account or property.
-     * 
- */ - public void getUserLink( - com.google.analytics.admin.v1alpha.GetUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetUserLinkMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets information about multiple users' links to an account or property.
-     * 
- */ - public void batchGetUserLinks( - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchGetUserLinksMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists all user links on an account or property.
-     * 
- */ - public void listUserLinks( - com.google.analytics.admin.v1alpha.ListUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListUserLinksMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists all user links on an account or property, including implicit ones
-     * that come from effective permissions granted by groups or organization
-     * admin roles.
-     * If a returned user link does not have direct permissions, they cannot
-     * be removed from the account or property directly with the DeleteUserLink
-     * command. They have to be removed from the group/etc that gives them
-     * permissions, which is currently only usable/discoverable in the GA or GMP
-     * UIs.
-     * 
- */ - public void auditUserLinks( - com.google.analytics.admin.v1alpha.AuditUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAuditUserLinksMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a user link on an account or property.
-     * If the user with the specified email already has permissions on the
-     * account or property, then the user's existing permissions will be unioned
-     * with the permissions specified in the new UserLink.
-     * 
- */ - public void createUserLink( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateUserLinkMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates information about multiple users' links to an account or property.
-     * This method is transactional. If any UserLink cannot be created, none of
-     * the UserLinks will be created.
-     * 
- */ - public void batchCreateUserLinks( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchCreateUserLinksMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a user link on an account or property.
-     * 
- */ - public void updateUserLink( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateUserLinkMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates information about multiple users' links to an account or property.
-     * 
- */ - public void batchUpdateUserLinks( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchUpdateUserLinksMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a user link on an account or property.
-     * 
- */ - public void deleteUserLink( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteUserLinkMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes information about multiple users' links to an account or property.
-     * 
- */ - public void batchDeleteUserLinks( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchDeleteUserLinksMethod(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -10869,332 +10741,368 @@ public void deleteEventCreateRule( request, responseObserver); } - } - - /** - * A stub to allow clients to do synchronous rpc calls to service AnalyticsAdminService. - * - *
-   * Service Interface for the Analytics Admin API (GA4).
-   * 
- */ - public static final class AnalyticsAdminServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AnalyticsAdminServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AnalyticsAdminServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsAdminServiceBlockingStub(channel, callOptions); - } /** * * *
-     * Lookup for a single Account.
+     * Updates a DataRedactionSettings on a property.
      * 
*/ - public com.google.analytics.admin.v1alpha.Account getAccount( - com.google.analytics.admin.v1alpha.GetAccountRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAccountMethod(), getCallOptions(), request); + public void updateDataRedactionSettings( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataRedactionSettingsMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Returns all accounts accessible by the caller.
-     * Note that these accounts might not currently have GA4 properties.
-     * Soft-deleted (ie: "trashed") accounts are excluded by default.
-     * Returns an empty list if no relevant accounts are found.
+     * Lookup for a single DataRedactionSettings.
      * 
*/ - public com.google.analytics.admin.v1alpha.ListAccountsResponse listAccounts( - com.google.analytics.admin.v1alpha.ListAccountsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAccountsMethod(), getCallOptions(), request); + public void getDataRedactionSettings( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataRedactionSettingsMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
-     * This API does not have a method to restore soft-deleted accounts.
-     * However, they can be restored using the Trash Can UI.
-     * If the accounts are not restored before the expiration time, the account
-     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
-     * UserLinks) will be permanently purged.
-     * https://support.google.com/analytics/answer/6154772
-     * Returns an error if the target is not found.
+     * Create a roll-up property and all roll-up property source links.
      * 
*/ - public com.google.protobuf.Empty deleteAccount( - com.google.analytics.admin.v1alpha.DeleteAccountRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAccountMethod(), getCallOptions(), request); + public void createRollupProperty( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRollupPropertyMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Updates an account.
+     * Lookup for a single roll-up property source Link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.analytics.admin.v1alpha.Account updateAccount( - com.google.analytics.admin.v1alpha.UpdateAccountRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateAccountMethod(), getCallOptions(), request); + public void getRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRollupPropertySourceLinkMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Requests a ticket for creating an account.
+     * Lists roll-up property source Links on a property.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse provisionAccountTicket( - com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getProvisionAccountTicketMethod(), getCallOptions(), request); + public void listRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest request, + io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRollupPropertySourceLinksMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Returns summaries of all accounts accessible by the caller.
+     * Creates a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.analytics.admin.v1alpha.ListAccountSummariesResponse listAccountSummaries( - com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAccountSummariesMethod(), getCallOptions(), request); + public void createRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRollupPropertySourceLinkMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Lookup for a single "GA4" Property.
+     * Deletes a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.analytics.admin.v1alpha.Property getProperty( - com.google.analytics.admin.v1alpha.GetPropertyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPropertyMethod(), getCallOptions(), request); + public void deleteRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRollupPropertySourceLinkMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Returns child Properties under the specified parent Account.
-     * Only "GA4" properties will be returned.
-     * Properties will be excluded if the caller does not have access.
-     * Soft-deleted (ie: "trashed") properties are excluded by default.
-     * Returns an empty list if no relevant properties are found.
+     * Create a subproperty and a subproperty event filter that applies to the
+     * created subproperty.
      * 
*/ - public com.google.analytics.admin.v1alpha.ListPropertiesResponse listProperties( - com.google.analytics.admin.v1alpha.ListPropertiesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListPropertiesMethod(), getCallOptions(), request); + public void createSubproperty( + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSubpropertyMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Creates an "GA4" property with the specified location and attributes.
+     * Deletes a subproperty event filter.
      * 
*/ - public com.google.analytics.admin.v1alpha.Property createProperty( - com.google.analytics.admin.v1alpha.CreatePropertyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreatePropertyMethod(), getCallOptions(), request); + public void deleteSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSubpropertyEventFilterMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
-     * This API does not have a method to restore soft-deleted properties.
-     * However, they can be restored using the Trash Can UI.
-     * If the properties are not restored before the expiration time, the Property
-     * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
-     * will be permanently purged.
-     * https://support.google.com/analytics/answer/6154772
-     * Returns an error if the target is not found, or is not a GA4 Property.
+     * Creates a subproperty Event Filter.
      * 
*/ - public com.google.analytics.admin.v1alpha.Property deleteProperty( - com.google.analytics.admin.v1alpha.DeletePropertyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeletePropertyMethod(), getCallOptions(), request); + public void createSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSubpropertyEventFilterMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AnalyticsAdminService. + * + *
+   * Service Interface for the Analytics Admin API (GA4).
+   * 
+ */ + public static final class AnalyticsAdminServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AnalyticsAdminServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AnalyticsAdminServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceBlockingStub(channel, callOptions); } /** * * *
-     * Updates a property.
+     * Lookup for a single Account.
      * 
*/ - public com.google.analytics.admin.v1alpha.Property updateProperty( - com.google.analytics.admin.v1alpha.UpdatePropertyRequest request) { + public com.google.analytics.admin.v1alpha.Account getAccount( + com.google.analytics.admin.v1alpha.GetAccountRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdatePropertyMethod(), getCallOptions(), request); + getChannel(), getGetAccountMethod(), getCallOptions(), request); } /** * * *
-     * Gets information about a user's link to an account or property.
+     * Returns all accounts accessible by the caller.
+     * Note that these accounts might not currently have GA4 properties.
+     * Soft-deleted (ie: "trashed") accounts are excluded by default.
+     * Returns an empty list if no relevant accounts are found.
      * 
*/ - public com.google.analytics.admin.v1alpha.UserLink getUserLink( - com.google.analytics.admin.v1alpha.GetUserLinkRequest request) { + public com.google.analytics.admin.v1alpha.ListAccountsResponse listAccounts( + com.google.analytics.admin.v1alpha.ListAccountsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetUserLinkMethod(), getCallOptions(), request); + getChannel(), getListAccountsMethod(), getCallOptions(), request); } /** * * *
-     * Gets information about multiple users' links to an account or property.
+     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted accounts.
+     * However, they can be restored using the Trash Can UI.
+     * If the accounts are not restored before the expiration time, the account
+     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
+     * AccessBindings) will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found.
      * 
*/ - public com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse batchGetUserLinks( - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest request) { + public com.google.protobuf.Empty deleteAccount( + com.google.analytics.admin.v1alpha.DeleteAccountRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchGetUserLinksMethod(), getCallOptions(), request); + getChannel(), getDeleteAccountMethod(), getCallOptions(), request); } /** * * *
-     * Lists all user links on an account or property.
+     * Updates an account.
      * 
*/ - public com.google.analytics.admin.v1alpha.ListUserLinksResponse listUserLinks( - com.google.analytics.admin.v1alpha.ListUserLinksRequest request) { + public com.google.analytics.admin.v1alpha.Account updateAccount( + com.google.analytics.admin.v1alpha.UpdateAccountRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListUserLinksMethod(), getCallOptions(), request); + getChannel(), getUpdateAccountMethod(), getCallOptions(), request); } /** * * *
-     * Lists all user links on an account or property, including implicit ones
-     * that come from effective permissions granted by groups or organization
-     * admin roles.
-     * If a returned user link does not have direct permissions, they cannot
-     * be removed from the account or property directly with the DeleteUserLink
-     * command. They have to be removed from the group/etc that gives them
-     * permissions, which is currently only usable/discoverable in the GA or GMP
-     * UIs.
+     * Requests a ticket for creating an account.
      * 
*/ - public com.google.analytics.admin.v1alpha.AuditUserLinksResponse auditUserLinks( - com.google.analytics.admin.v1alpha.AuditUserLinksRequest request) { + public com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse provisionAccountTicket( + com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAuditUserLinksMethod(), getCallOptions(), request); + getChannel(), getProvisionAccountTicketMethod(), getCallOptions(), request); } /** * * *
-     * Creates a user link on an account or property.
-     * If the user with the specified email already has permissions on the
-     * account or property, then the user's existing permissions will be unioned
-     * with the permissions specified in the new UserLink.
+     * Returns summaries of all accounts accessible by the caller.
      * 
*/ - public com.google.analytics.admin.v1alpha.UserLink createUserLink( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest request) { + public com.google.analytics.admin.v1alpha.ListAccountSummariesResponse listAccountSummaries( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateUserLinkMethod(), getCallOptions(), request); + getChannel(), getListAccountSummariesMethod(), getCallOptions(), request); } /** * * *
-     * Creates information about multiple users' links to an account or property.
-     * This method is transactional. If any UserLink cannot be created, none of
-     * the UserLinks will be created.
+     * Lookup for a single "GA4" Property.
      * 
*/ - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse batchCreateUserLinks( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest request) { + public com.google.analytics.admin.v1alpha.Property getProperty( + com.google.analytics.admin.v1alpha.GetPropertyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchCreateUserLinksMethod(), getCallOptions(), request); + getChannel(), getGetPropertyMethod(), getCallOptions(), request); } /** * * *
-     * Updates a user link on an account or property.
+     * Returns child Properties under the specified parent Account.
+     * Only "GA4" properties will be returned.
+     * Properties will be excluded if the caller does not have access.
+     * Soft-deleted (ie: "trashed") properties are excluded by default.
+     * Returns an empty list if no relevant properties are found.
      * 
*/ - public com.google.analytics.admin.v1alpha.UserLink updateUserLink( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest request) { + public com.google.analytics.admin.v1alpha.ListPropertiesResponse listProperties( + com.google.analytics.admin.v1alpha.ListPropertiesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateUserLinkMethod(), getCallOptions(), request); + getChannel(), getListPropertiesMethod(), getCallOptions(), request); } /** * * *
-     * Updates information about multiple users' links to an account or property.
+     * Creates an "GA4" property with the specified location and attributes.
      * 
*/ - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse batchUpdateUserLinks( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest request) { + public com.google.analytics.admin.v1alpha.Property createProperty( + com.google.analytics.admin.v1alpha.CreatePropertyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchUpdateUserLinksMethod(), getCallOptions(), request); + getChannel(), getCreatePropertyMethod(), getCallOptions(), request); } /** * * *
-     * Deletes a user link on an account or property.
+     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted properties.
+     * However, they can be restored using the Trash Can UI.
+     * If the properties are not restored before the expiration time, the Property
+     * and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings)
+     * will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found, or is not a GA4 Property.
      * 
*/ - public com.google.protobuf.Empty deleteUserLink( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest request) { + public com.google.analytics.admin.v1alpha.Property deleteProperty( + com.google.analytics.admin.v1alpha.DeletePropertyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteUserLinkMethod(), getCallOptions(), request); + getChannel(), getDeletePropertyMethod(), getCallOptions(), request); } /** * * *
-     * Deletes information about multiple users' links to an account or property.
+     * Updates a property.
      * 
*/ - public com.google.protobuf.Empty batchDeleteUserLinks( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest request) { + public com.google.analytics.admin.v1alpha.Property updateProperty( + com.google.analytics.admin.v1alpha.UpdatePropertyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchDeleteUserLinksMethod(), getCallOptions(), request); + getChannel(), getUpdatePropertyMethod(), getCallOptions(), request); } /** @@ -12707,356 +12615,344 @@ public com.google.protobuf.Empty deleteEventCreateRule( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteEventCreateRuleMethod(), getCallOptions(), request); } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service - * AnalyticsAdminService. - * - *
-   * Service Interface for the Analytics Admin API (GA4).
-   * 
- */ - public static final class AnalyticsAdminServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AnalyticsAdminServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AnalyticsAdminServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AnalyticsAdminServiceFutureStub(channel, callOptions); - } /** * * *
-     * Lookup for a single Account.
+     * Updates a DataRedactionSettings on a property.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.Account> - getAccount(com.google.analytics.admin.v1alpha.GetAccountRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAccountMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.DataRedactionSettings updateDataRedactionSettings( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataRedactionSettingsMethod(), getCallOptions(), request); } /** * * *
-     * Returns all accounts accessible by the caller.
-     * Note that these accounts might not currently have GA4 properties.
-     * Soft-deleted (ie: "trashed") accounts are excluded by default.
-     * Returns an empty list if no relevant accounts are found.
+     * Lookup for a single DataRedactionSettings.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.ListAccountsResponse> - listAccounts(com.google.analytics.admin.v1alpha.ListAccountsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAccountsMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.DataRedactionSettings getDataRedactionSettings( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataRedactionSettingsMethod(), getCallOptions(), request); } /** * * *
-     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
-     * This API does not have a method to restore soft-deleted accounts.
-     * However, they can be restored using the Trash Can UI.
-     * If the accounts are not restored before the expiration time, the account
-     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
-     * UserLinks) will be permanently purged.
-     * https://support.google.com/analytics/answer/6154772
-     * Returns an error if the target is not found.
+     * Create a roll-up property and all roll-up property source links.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture - deleteAccount(com.google.analytics.admin.v1alpha.DeleteAccountRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteAccountMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse createRollupProperty( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRollupPropertyMethod(), getCallOptions(), request); } /** * * *
-     * Updates an account.
+     * Lookup for a single roll-up property source Link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.Account> - updateAccount(com.google.analytics.admin.v1alpha.UpdateAccountRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateAccountMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRollupPropertySourceLinkMethod(), getCallOptions(), request); } /** * * *
-     * Requests a ticket for creating an account.
+     * Lists roll-up property source Links on a property.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse> - provisionAccountTicket( - com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getProvisionAccountTicketMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + listRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRollupPropertySourceLinksMethod(), getCallOptions(), request); } /** * * *
-     * Returns summaries of all accounts accessible by the caller.
+     * Creates a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.ListAccountSummariesResponse> - listAccountSummaries( - com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAccountSummariesMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink + createRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRollupPropertySourceLinkMethod(), getCallOptions(), request); } /** * * *
-     * Lookup for a single "GA4" Property.
+     * Deletes a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.Property> - getProperty(com.google.analytics.admin.v1alpha.GetPropertyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPropertyMethod(), getCallOptions()), request); + public com.google.protobuf.Empty deleteRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRollupPropertySourceLinkMethod(), getCallOptions(), request); } /** * * *
-     * Returns child Properties under the specified parent Account.
-     * Only "GA4" properties will be returned.
-     * Properties will be excluded if the caller does not have access.
-     * Soft-deleted (ie: "trashed") properties are excluded by default.
-     * Returns an empty list if no relevant properties are found.
+     * Create a subproperty and a subproperty event filter that applies to the
+     * created subproperty.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.ListPropertiesResponse> - listProperties(com.google.analytics.admin.v1alpha.ListPropertiesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListPropertiesMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.CreateSubpropertyResponse createSubproperty( + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSubpropertyMethod(), getCallOptions(), request); } /** * * *
-     * Creates an "GA4" property with the specified location and attributes.
+     * Deletes a subproperty event filter.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.Property> - createProperty(com.google.analytics.admin.v1alpha.CreatePropertyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreatePropertyMethod(), getCallOptions()), request); + public com.google.protobuf.Empty deleteSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSubpropertyEventFilterMethod(), getCallOptions(), request); } /** * * *
-     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
-     * This API does not have a method to restore soft-deleted properties.
-     * However, they can be restored using the Trash Can UI.
-     * If the properties are not restored before the expiration time, the Property
-     * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
-     * will be permanently purged.
-     * https://support.google.com/analytics/answer/6154772
-     * Returns an error if the target is not found, or is not a GA4 Property.
+     * Creates a subproperty Event Filter.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.Property> - deleteProperty(com.google.analytics.admin.v1alpha.DeletePropertyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeletePropertyMethod(), getCallOptions()), request); + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter createSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSubpropertyEventFilterMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * AnalyticsAdminService. + * + *
+   * Service Interface for the Analytics Admin API (GA4).
+   * 
+ */ + public static final class AnalyticsAdminServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AnalyticsAdminServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AnalyticsAdminServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AnalyticsAdminServiceFutureStub(channel, callOptions); } /** * * *
-     * Updates a property.
+     * Lookup for a single Account.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.Property> - updateProperty(com.google.analytics.admin.v1alpha.UpdatePropertyRequest request) { + com.google.analytics.admin.v1alpha.Account> + getAccount(com.google.analytics.admin.v1alpha.GetAccountRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdatePropertyMethod(), getCallOptions()), request); + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request); } /** * * *
-     * Gets information about a user's link to an account or property.
+     * Returns all accounts accessible by the caller.
+     * Note that these accounts might not currently have GA4 properties.
+     * Soft-deleted (ie: "trashed") accounts are excluded by default.
+     * Returns an empty list if no relevant accounts are found.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.UserLink> - getUserLink(com.google.analytics.admin.v1alpha.GetUserLinkRequest request) { + com.google.analytics.admin.v1alpha.ListAccountsResponse> + listAccounts(com.google.analytics.admin.v1alpha.ListAccountsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetUserLinkMethod(), getCallOptions()), request); + getChannel().newCall(getListAccountsMethod(), getCallOptions()), request); } /** * * *
-     * Gets information about multiple users' links to an account or property.
+     * Marks target Account as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted accounts.
+     * However, they can be restored using the Trash Can UI.
+     * If the accounts are not restored before the expiration time, the account
+     * and all child resources (eg: Properties, GoogleAdsLinks, Streams,
+     * AccessBindings) will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse> - batchGetUserLinks(com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest request) { + public com.google.common.util.concurrent.ListenableFuture + deleteAccount(com.google.analytics.admin.v1alpha.DeleteAccountRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchGetUserLinksMethod(), getCallOptions()), request); + getChannel().newCall(getDeleteAccountMethod(), getCallOptions()), request); } /** * * *
-     * Lists all user links on an account or property.
+     * Updates an account.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.ListUserLinksResponse> - listUserLinks(com.google.analytics.admin.v1alpha.ListUserLinksRequest request) { + com.google.analytics.admin.v1alpha.Account> + updateAccount(com.google.analytics.admin.v1alpha.UpdateAccountRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListUserLinksMethod(), getCallOptions()), request); + getChannel().newCall(getUpdateAccountMethod(), getCallOptions()), request); } /** * * *
-     * Lists all user links on an account or property, including implicit ones
-     * that come from effective permissions granted by groups or organization
-     * admin roles.
-     * If a returned user link does not have direct permissions, they cannot
-     * be removed from the account or property directly with the DeleteUserLink
-     * command. They have to be removed from the group/etc that gives them
-     * permissions, which is currently only usable/discoverable in the GA or GMP
-     * UIs.
+     * Requests a ticket for creating an account.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.AuditUserLinksResponse> - auditUserLinks(com.google.analytics.admin.v1alpha.AuditUserLinksRequest request) { + com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse> + provisionAccountTicket( + com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAuditUserLinksMethod(), getCallOptions()), request); + getChannel().newCall(getProvisionAccountTicketMethod(), getCallOptions()), request); } /** * * *
-     * Creates a user link on an account or property.
-     * If the user with the specified email already has permissions on the
-     * account or property, then the user's existing permissions will be unioned
-     * with the permissions specified in the new UserLink.
+     * Returns summaries of all accounts accessible by the caller.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.UserLink> - createUserLink(com.google.analytics.admin.v1alpha.CreateUserLinkRequest request) { + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse> + listAccountSummaries( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateUserLinkMethod(), getCallOptions()), request); + getChannel().newCall(getListAccountSummariesMethod(), getCallOptions()), request); } /** * * *
-     * Creates information about multiple users' links to an account or property.
-     * This method is transactional. If any UserLink cannot be created, none of
-     * the UserLinks will be created.
+     * Lookup for a single "GA4" Property.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse> - batchCreateUserLinks( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest request) { + com.google.analytics.admin.v1alpha.Property> + getProperty(com.google.analytics.admin.v1alpha.GetPropertyRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchCreateUserLinksMethod(), getCallOptions()), request); + getChannel().newCall(getGetPropertyMethod(), getCallOptions()), request); } /** * * *
-     * Updates a user link on an account or property.
+     * Returns child Properties under the specified parent Account.
+     * Only "GA4" properties will be returned.
+     * Properties will be excluded if the caller does not have access.
+     * Soft-deleted (ie: "trashed") properties are excluded by default.
+     * Returns an empty list if no relevant properties are found.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.UserLink> - updateUserLink(com.google.analytics.admin.v1alpha.UpdateUserLinkRequest request) { + com.google.analytics.admin.v1alpha.ListPropertiesResponse> + listProperties(com.google.analytics.admin.v1alpha.ListPropertiesRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateUserLinkMethod(), getCallOptions()), request); + getChannel().newCall(getListPropertiesMethod(), getCallOptions()), request); } /** * * *
-     * Updates information about multiple users' links to an account or property.
+     * Creates an "GA4" property with the specified location and attributes.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse> - batchUpdateUserLinks( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest request) { + com.google.analytics.admin.v1alpha.Property> + createProperty(com.google.analytics.admin.v1alpha.CreatePropertyRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchUpdateUserLinksMethod(), getCallOptions()), request); + getChannel().newCall(getCreatePropertyMethod(), getCallOptions()), request); } /** * * *
-     * Deletes a user link on an account or property.
+     * Marks target Property as soft-deleted (ie: "trashed") and returns it.
+     * This API does not have a method to restore soft-deleted properties.
+     * However, they can be restored using the Trash Can UI.
+     * If the properties are not restored before the expiration time, the Property
+     * and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings)
+     * will be permanently purged.
+     * https://support.google.com/analytics/answer/6154772
+     * Returns an error if the target is not found, or is not a GA4 Property.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture - deleteUserLink(com.google.analytics.admin.v1alpha.DeleteUserLinkRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.Property> + deleteProperty(com.google.analytics.admin.v1alpha.DeletePropertyRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteUserLinkMethod(), getCallOptions()), request); + getChannel().newCall(getDeletePropertyMethod(), getCallOptions()), request); } /** * * *
-     * Deletes information about multiple users' links to an account or property.
+     * Updates a property.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture - batchDeleteUserLinks( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.Property> + updateProperty(com.google.analytics.admin.v1alpha.UpdatePropertyRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchDeleteUserLinksMethod(), getCallOptions()), request); + getChannel().newCall(getUpdatePropertyMethod(), getCallOptions()), request); } /** @@ -14695,6 +14591,165 @@ protected AnalyticsAdminServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteEventCreateRuleMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Updates a DataRedactionSettings on a property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.DataRedactionSettings> + updateDataRedactionSettings( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataRedactionSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single DataRedactionSettings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.DataRedactionSettings> + getDataRedactionSettings( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataRedactionSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a roll-up property and all roll-up property source links.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse> + createRollupProperty( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRollupPropertyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single roll-up property source Link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + getRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRollupPropertySourceLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists roll-up property source Links on a property.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse> + listRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRollupPropertySourceLinksMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Creates a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink> + createRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRollupPropertySourceLinkMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes a roll-up property source link.
+     * Only roll-up properties can have source links, so this method will throw an
+     * error if used on other types of properties.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRollupPropertySourceLinkMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Create a subproperty and a subproperty event filter that applies to the
+     * created subproperty.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse> + createSubproperty(com.google.analytics.admin.v1alpha.CreateSubpropertyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSubpropertyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a subproperty event filter.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSubpropertyEventFilterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a subproperty Event Filter.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter> + createSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSubpropertyEventFilterMethod(), getCallOptions()), request); + } } private static final int METHODID_GET_ACCOUNT = 0; @@ -14708,123 +14763,123 @@ protected AnalyticsAdminServiceFutureStub build( private static final int METHODID_CREATE_PROPERTY = 8; private static final int METHODID_DELETE_PROPERTY = 9; private static final int METHODID_UPDATE_PROPERTY = 10; - private static final int METHODID_GET_USER_LINK = 11; - private static final int METHODID_BATCH_GET_USER_LINKS = 12; - private static final int METHODID_LIST_USER_LINKS = 13; - private static final int METHODID_AUDIT_USER_LINKS = 14; - private static final int METHODID_CREATE_USER_LINK = 15; - private static final int METHODID_BATCH_CREATE_USER_LINKS = 16; - private static final int METHODID_UPDATE_USER_LINK = 17; - private static final int METHODID_BATCH_UPDATE_USER_LINKS = 18; - private static final int METHODID_DELETE_USER_LINK = 19; - private static final int METHODID_BATCH_DELETE_USER_LINKS = 20; - private static final int METHODID_CREATE_FIREBASE_LINK = 21; - private static final int METHODID_DELETE_FIREBASE_LINK = 22; - private static final int METHODID_LIST_FIREBASE_LINKS = 23; - private static final int METHODID_GET_GLOBAL_SITE_TAG = 24; - private static final int METHODID_CREATE_GOOGLE_ADS_LINK = 25; - private static final int METHODID_UPDATE_GOOGLE_ADS_LINK = 26; - private static final int METHODID_DELETE_GOOGLE_ADS_LINK = 27; - private static final int METHODID_LIST_GOOGLE_ADS_LINKS = 28; - private static final int METHODID_GET_DATA_SHARING_SETTINGS = 29; - private static final int METHODID_GET_MEASUREMENT_PROTOCOL_SECRET = 30; - private static final int METHODID_LIST_MEASUREMENT_PROTOCOL_SECRETS = 31; - private static final int METHODID_CREATE_MEASUREMENT_PROTOCOL_SECRET = 32; - private static final int METHODID_DELETE_MEASUREMENT_PROTOCOL_SECRET = 33; - private static final int METHODID_UPDATE_MEASUREMENT_PROTOCOL_SECRET = 34; - private static final int METHODID_ACKNOWLEDGE_USER_DATA_COLLECTION = 35; - private static final int METHODID_GET_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 36; - private static final int METHODID_CREATE_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 37; - private static final int METHODID_DELETE_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 38; - private static final int METHODID_UPDATE_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 39; - private static final int METHODID_LIST_SKAD_NETWORK_CONVERSION_VALUE_SCHEMAS = 40; - private static final int METHODID_SEARCH_CHANGE_HISTORY_EVENTS = 41; - private static final int METHODID_GET_GOOGLE_SIGNALS_SETTINGS = 42; - private static final int METHODID_UPDATE_GOOGLE_SIGNALS_SETTINGS = 43; - private static final int METHODID_CREATE_CONVERSION_EVENT = 44; - private static final int METHODID_UPDATE_CONVERSION_EVENT = 45; - private static final int METHODID_GET_CONVERSION_EVENT = 46; - private static final int METHODID_DELETE_CONVERSION_EVENT = 47; - private static final int METHODID_LIST_CONVERSION_EVENTS = 48; - private static final int METHODID_GET_DISPLAY_VIDEO360ADVERTISER_LINK = 49; - private static final int METHODID_LIST_DISPLAY_VIDEO360ADVERTISER_LINKS = 50; - private static final int METHODID_CREATE_DISPLAY_VIDEO360ADVERTISER_LINK = 51; - private static final int METHODID_DELETE_DISPLAY_VIDEO360ADVERTISER_LINK = 52; - private static final int METHODID_UPDATE_DISPLAY_VIDEO360ADVERTISER_LINK = 53; - private static final int METHODID_GET_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 54; - private static final int METHODID_LIST_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSALS = 55; - private static final int METHODID_CREATE_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 56; - private static final int METHODID_DELETE_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 57; - private static final int METHODID_APPROVE_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 58; - private static final int METHODID_CANCEL_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 59; - private static final int METHODID_CREATE_CUSTOM_DIMENSION = 60; - private static final int METHODID_UPDATE_CUSTOM_DIMENSION = 61; - private static final int METHODID_LIST_CUSTOM_DIMENSIONS = 62; - private static final int METHODID_ARCHIVE_CUSTOM_DIMENSION = 63; - private static final int METHODID_GET_CUSTOM_DIMENSION = 64; - private static final int METHODID_CREATE_CUSTOM_METRIC = 65; - private static final int METHODID_UPDATE_CUSTOM_METRIC = 66; - private static final int METHODID_LIST_CUSTOM_METRICS = 67; - private static final int METHODID_ARCHIVE_CUSTOM_METRIC = 68; - private static final int METHODID_GET_CUSTOM_METRIC = 69; - private static final int METHODID_GET_DATA_RETENTION_SETTINGS = 70; - private static final int METHODID_UPDATE_DATA_RETENTION_SETTINGS = 71; - private static final int METHODID_CREATE_DATA_STREAM = 72; - private static final int METHODID_DELETE_DATA_STREAM = 73; - private static final int METHODID_UPDATE_DATA_STREAM = 74; - private static final int METHODID_LIST_DATA_STREAMS = 75; - private static final int METHODID_GET_DATA_STREAM = 76; - private static final int METHODID_GET_AUDIENCE = 77; - private static final int METHODID_LIST_AUDIENCES = 78; - private static final int METHODID_CREATE_AUDIENCE = 79; - private static final int METHODID_UPDATE_AUDIENCE = 80; - private static final int METHODID_ARCHIVE_AUDIENCE = 81; - private static final int METHODID_GET_SEARCH_ADS360LINK = 82; - private static final int METHODID_LIST_SEARCH_ADS360LINKS = 83; - private static final int METHODID_CREATE_SEARCH_ADS360LINK = 84; - private static final int METHODID_DELETE_SEARCH_ADS360LINK = 85; - private static final int METHODID_UPDATE_SEARCH_ADS360LINK = 86; - private static final int METHODID_GET_ATTRIBUTION_SETTINGS = 87; - private static final int METHODID_UPDATE_ATTRIBUTION_SETTINGS = 88; - private static final int METHODID_RUN_ACCESS_REPORT = 89; - private static final int METHODID_CREATE_ACCESS_BINDING = 90; - private static final int METHODID_GET_ACCESS_BINDING = 91; - private static final int METHODID_UPDATE_ACCESS_BINDING = 92; - private static final int METHODID_DELETE_ACCESS_BINDING = 93; - private static final int METHODID_LIST_ACCESS_BINDINGS = 94; - private static final int METHODID_BATCH_CREATE_ACCESS_BINDINGS = 95; - private static final int METHODID_BATCH_GET_ACCESS_BINDINGS = 96; - private static final int METHODID_BATCH_UPDATE_ACCESS_BINDINGS = 97; - private static final int METHODID_BATCH_DELETE_ACCESS_BINDINGS = 98; - private static final int METHODID_GET_EXPANDED_DATA_SET = 99; - private static final int METHODID_LIST_EXPANDED_DATA_SETS = 100; - private static final int METHODID_CREATE_EXPANDED_DATA_SET = 101; - private static final int METHODID_UPDATE_EXPANDED_DATA_SET = 102; - private static final int METHODID_DELETE_EXPANDED_DATA_SET = 103; - private static final int METHODID_GET_CHANNEL_GROUP = 104; - private static final int METHODID_LIST_CHANNEL_GROUPS = 105; - private static final int METHODID_CREATE_CHANNEL_GROUP = 106; - private static final int METHODID_UPDATE_CHANNEL_GROUP = 107; - private static final int METHODID_DELETE_CHANNEL_GROUP = 108; - private static final int METHODID_SET_AUTOMATED_GA4CONFIGURATION_OPT_OUT = 109; - private static final int METHODID_FETCH_AUTOMATED_GA4CONFIGURATION_OPT_OUT = 110; - private static final int METHODID_GET_BIG_QUERY_LINK = 111; - private static final int METHODID_LIST_BIG_QUERY_LINKS = 112; - private static final int METHODID_GET_ENHANCED_MEASUREMENT_SETTINGS = 113; - private static final int METHODID_UPDATE_ENHANCED_MEASUREMENT_SETTINGS = 114; - private static final int METHODID_CREATE_CONNECTED_SITE_TAG = 115; - private static final int METHODID_DELETE_CONNECTED_SITE_TAG = 116; - private static final int METHODID_LIST_CONNECTED_SITE_TAGS = 117; - private static final int METHODID_FETCH_CONNECTED_GA4PROPERTY = 118; - private static final int METHODID_GET_AD_SENSE_LINK = 119; - private static final int METHODID_CREATE_AD_SENSE_LINK = 120; - private static final int METHODID_DELETE_AD_SENSE_LINK = 121; - private static final int METHODID_LIST_AD_SENSE_LINKS = 122; - private static final int METHODID_GET_EVENT_CREATE_RULE = 123; - private static final int METHODID_LIST_EVENT_CREATE_RULES = 124; - private static final int METHODID_CREATE_EVENT_CREATE_RULE = 125; - private static final int METHODID_UPDATE_EVENT_CREATE_RULE = 126; - private static final int METHODID_DELETE_EVENT_CREATE_RULE = 127; + private static final int METHODID_CREATE_FIREBASE_LINK = 11; + private static final int METHODID_DELETE_FIREBASE_LINK = 12; + private static final int METHODID_LIST_FIREBASE_LINKS = 13; + private static final int METHODID_GET_GLOBAL_SITE_TAG = 14; + private static final int METHODID_CREATE_GOOGLE_ADS_LINK = 15; + private static final int METHODID_UPDATE_GOOGLE_ADS_LINK = 16; + private static final int METHODID_DELETE_GOOGLE_ADS_LINK = 17; + private static final int METHODID_LIST_GOOGLE_ADS_LINKS = 18; + private static final int METHODID_GET_DATA_SHARING_SETTINGS = 19; + private static final int METHODID_GET_MEASUREMENT_PROTOCOL_SECRET = 20; + private static final int METHODID_LIST_MEASUREMENT_PROTOCOL_SECRETS = 21; + private static final int METHODID_CREATE_MEASUREMENT_PROTOCOL_SECRET = 22; + private static final int METHODID_DELETE_MEASUREMENT_PROTOCOL_SECRET = 23; + private static final int METHODID_UPDATE_MEASUREMENT_PROTOCOL_SECRET = 24; + private static final int METHODID_ACKNOWLEDGE_USER_DATA_COLLECTION = 25; + private static final int METHODID_GET_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 26; + private static final int METHODID_CREATE_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 27; + private static final int METHODID_DELETE_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 28; + private static final int METHODID_UPDATE_SKAD_NETWORK_CONVERSION_VALUE_SCHEMA = 29; + private static final int METHODID_LIST_SKAD_NETWORK_CONVERSION_VALUE_SCHEMAS = 30; + private static final int METHODID_SEARCH_CHANGE_HISTORY_EVENTS = 31; + private static final int METHODID_GET_GOOGLE_SIGNALS_SETTINGS = 32; + private static final int METHODID_UPDATE_GOOGLE_SIGNALS_SETTINGS = 33; + private static final int METHODID_CREATE_CONVERSION_EVENT = 34; + private static final int METHODID_UPDATE_CONVERSION_EVENT = 35; + private static final int METHODID_GET_CONVERSION_EVENT = 36; + private static final int METHODID_DELETE_CONVERSION_EVENT = 37; + private static final int METHODID_LIST_CONVERSION_EVENTS = 38; + private static final int METHODID_GET_DISPLAY_VIDEO360ADVERTISER_LINK = 39; + private static final int METHODID_LIST_DISPLAY_VIDEO360ADVERTISER_LINKS = 40; + private static final int METHODID_CREATE_DISPLAY_VIDEO360ADVERTISER_LINK = 41; + private static final int METHODID_DELETE_DISPLAY_VIDEO360ADVERTISER_LINK = 42; + private static final int METHODID_UPDATE_DISPLAY_VIDEO360ADVERTISER_LINK = 43; + private static final int METHODID_GET_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 44; + private static final int METHODID_LIST_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSALS = 45; + private static final int METHODID_CREATE_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 46; + private static final int METHODID_DELETE_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 47; + private static final int METHODID_APPROVE_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 48; + private static final int METHODID_CANCEL_DISPLAY_VIDEO360ADVERTISER_LINK_PROPOSAL = 49; + private static final int METHODID_CREATE_CUSTOM_DIMENSION = 50; + private static final int METHODID_UPDATE_CUSTOM_DIMENSION = 51; + private static final int METHODID_LIST_CUSTOM_DIMENSIONS = 52; + private static final int METHODID_ARCHIVE_CUSTOM_DIMENSION = 53; + private static final int METHODID_GET_CUSTOM_DIMENSION = 54; + private static final int METHODID_CREATE_CUSTOM_METRIC = 55; + private static final int METHODID_UPDATE_CUSTOM_METRIC = 56; + private static final int METHODID_LIST_CUSTOM_METRICS = 57; + private static final int METHODID_ARCHIVE_CUSTOM_METRIC = 58; + private static final int METHODID_GET_CUSTOM_METRIC = 59; + private static final int METHODID_GET_DATA_RETENTION_SETTINGS = 60; + private static final int METHODID_UPDATE_DATA_RETENTION_SETTINGS = 61; + private static final int METHODID_CREATE_DATA_STREAM = 62; + private static final int METHODID_DELETE_DATA_STREAM = 63; + private static final int METHODID_UPDATE_DATA_STREAM = 64; + private static final int METHODID_LIST_DATA_STREAMS = 65; + private static final int METHODID_GET_DATA_STREAM = 66; + private static final int METHODID_GET_AUDIENCE = 67; + private static final int METHODID_LIST_AUDIENCES = 68; + private static final int METHODID_CREATE_AUDIENCE = 69; + private static final int METHODID_UPDATE_AUDIENCE = 70; + private static final int METHODID_ARCHIVE_AUDIENCE = 71; + private static final int METHODID_GET_SEARCH_ADS360LINK = 72; + private static final int METHODID_LIST_SEARCH_ADS360LINKS = 73; + private static final int METHODID_CREATE_SEARCH_ADS360LINK = 74; + private static final int METHODID_DELETE_SEARCH_ADS360LINK = 75; + private static final int METHODID_UPDATE_SEARCH_ADS360LINK = 76; + private static final int METHODID_GET_ATTRIBUTION_SETTINGS = 77; + private static final int METHODID_UPDATE_ATTRIBUTION_SETTINGS = 78; + private static final int METHODID_RUN_ACCESS_REPORT = 79; + private static final int METHODID_CREATE_ACCESS_BINDING = 80; + private static final int METHODID_GET_ACCESS_BINDING = 81; + private static final int METHODID_UPDATE_ACCESS_BINDING = 82; + private static final int METHODID_DELETE_ACCESS_BINDING = 83; + private static final int METHODID_LIST_ACCESS_BINDINGS = 84; + private static final int METHODID_BATCH_CREATE_ACCESS_BINDINGS = 85; + private static final int METHODID_BATCH_GET_ACCESS_BINDINGS = 86; + private static final int METHODID_BATCH_UPDATE_ACCESS_BINDINGS = 87; + private static final int METHODID_BATCH_DELETE_ACCESS_BINDINGS = 88; + private static final int METHODID_GET_EXPANDED_DATA_SET = 89; + private static final int METHODID_LIST_EXPANDED_DATA_SETS = 90; + private static final int METHODID_CREATE_EXPANDED_DATA_SET = 91; + private static final int METHODID_UPDATE_EXPANDED_DATA_SET = 92; + private static final int METHODID_DELETE_EXPANDED_DATA_SET = 93; + private static final int METHODID_GET_CHANNEL_GROUP = 94; + private static final int METHODID_LIST_CHANNEL_GROUPS = 95; + private static final int METHODID_CREATE_CHANNEL_GROUP = 96; + private static final int METHODID_UPDATE_CHANNEL_GROUP = 97; + private static final int METHODID_DELETE_CHANNEL_GROUP = 98; + private static final int METHODID_SET_AUTOMATED_GA4CONFIGURATION_OPT_OUT = 99; + private static final int METHODID_FETCH_AUTOMATED_GA4CONFIGURATION_OPT_OUT = 100; + private static final int METHODID_GET_BIG_QUERY_LINK = 101; + private static final int METHODID_LIST_BIG_QUERY_LINKS = 102; + private static final int METHODID_GET_ENHANCED_MEASUREMENT_SETTINGS = 103; + private static final int METHODID_UPDATE_ENHANCED_MEASUREMENT_SETTINGS = 104; + private static final int METHODID_CREATE_CONNECTED_SITE_TAG = 105; + private static final int METHODID_DELETE_CONNECTED_SITE_TAG = 106; + private static final int METHODID_LIST_CONNECTED_SITE_TAGS = 107; + private static final int METHODID_FETCH_CONNECTED_GA4PROPERTY = 108; + private static final int METHODID_GET_AD_SENSE_LINK = 109; + private static final int METHODID_CREATE_AD_SENSE_LINK = 110; + private static final int METHODID_DELETE_AD_SENSE_LINK = 111; + private static final int METHODID_LIST_AD_SENSE_LINKS = 112; + private static final int METHODID_GET_EVENT_CREATE_RULE = 113; + private static final int METHODID_LIST_EVENT_CREATE_RULES = 114; + private static final int METHODID_CREATE_EVENT_CREATE_RULE = 115; + private static final int METHODID_UPDATE_EVENT_CREATE_RULE = 116; + private static final int METHODID_DELETE_EVENT_CREATE_RULE = 117; + private static final int METHODID_UPDATE_DATA_REDACTION_SETTINGS = 118; + private static final int METHODID_GET_DATA_REDACTION_SETTINGS = 119; + private static final int METHODID_CREATE_ROLLUP_PROPERTY = 120; + private static final int METHODID_GET_ROLLUP_PROPERTY_SOURCE_LINK = 121; + private static final int METHODID_LIST_ROLLUP_PROPERTY_SOURCE_LINKS = 122; + private static final int METHODID_CREATE_ROLLUP_PROPERTY_SOURCE_LINK = 123; + private static final int METHODID_DELETE_ROLLUP_PROPERTY_SOURCE_LINK = 124; + private static final int METHODID_CREATE_SUBPROPERTY = 125; + private static final int METHODID_DELETE_SUBPROPERTY_EVENT_FILTER = 126; + private static final int METHODID_CREATE_SUBPROPERTY_EVENT_FILTER = 127; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -14911,69 +14966,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_GET_USER_LINK: - serviceImpl.getUserLink( - (com.google.analytics.admin.v1alpha.GetUserLinkRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_BATCH_GET_USER_LINKS: - serviceImpl.batchGetUserLinks( - (com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest) request, - (io.grpc.stub.StreamObserver< - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse>) - responseObserver); - break; - case METHODID_LIST_USER_LINKS: - serviceImpl.listUserLinks( - (com.google.analytics.admin.v1alpha.ListUserLinksRequest) request, - (io.grpc.stub.StreamObserver< - com.google.analytics.admin.v1alpha.ListUserLinksResponse>) - responseObserver); - break; - case METHODID_AUDIT_USER_LINKS: - serviceImpl.auditUserLinks( - (com.google.analytics.admin.v1alpha.AuditUserLinksRequest) request, - (io.grpc.stub.StreamObserver< - com.google.analytics.admin.v1alpha.AuditUserLinksResponse>) - responseObserver); - break; - case METHODID_CREATE_USER_LINK: - serviceImpl.createUserLink( - (com.google.analytics.admin.v1alpha.CreateUserLinkRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_BATCH_CREATE_USER_LINKS: - serviceImpl.batchCreateUserLinks( - (com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) request, - (io.grpc.stub.StreamObserver< - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse>) - responseObserver); - break; - case METHODID_UPDATE_USER_LINK: - serviceImpl.updateUserLink( - (com.google.analytics.admin.v1alpha.UpdateUserLinkRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_BATCH_UPDATE_USER_LINKS: - serviceImpl.batchUpdateUserLinks( - (com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) request, - (io.grpc.stub.StreamObserver< - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse>) - responseObserver); - break; - case METHODID_DELETE_USER_LINK: - serviceImpl.deleteUserLink( - (com.google.analytics.admin.v1alpha.DeleteUserLinkRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_DELETE_USER_LINKS: - serviceImpl.batchDeleteUserLinks( - (com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; case METHODID_CREATE_FIREBASE_LINK: serviceImpl.createFirebaseLink( (com.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest) request, @@ -15672,6 +15664,72 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_DATA_REDACTION_SETTINGS: + serviceImpl.updateDataRedactionSettings( + (com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.DataRedactionSettings>) + responseObserver); + break; + case METHODID_GET_DATA_REDACTION_SETTINGS: + serviceImpl.getDataRedactionSettings( + (com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.DataRedactionSettings>) + responseObserver); + break; + case METHODID_CREATE_ROLLUP_PROPERTY: + serviceImpl.createRollupProperty( + (com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse>) + responseObserver); + break; + case METHODID_GET_ROLLUP_PROPERTY_SOURCE_LINK: + serviceImpl.getRollupPropertySourceLink( + (com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink>) + responseObserver); + break; + case METHODID_LIST_ROLLUP_PROPERTY_SOURCE_LINKS: + serviceImpl.listRollupPropertySourceLinks( + (com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse>) + responseObserver); + break; + case METHODID_CREATE_ROLLUP_PROPERTY_SOURCE_LINK: + serviceImpl.createRollupPropertySourceLink( + (com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink>) + responseObserver); + break; + case METHODID_DELETE_ROLLUP_PROPERTY_SOURCE_LINK: + serviceImpl.deleteRollupPropertySourceLink( + (com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SUBPROPERTY: + serviceImpl.createSubproperty( + (com.google.analytics.admin.v1alpha.CreateSubpropertyRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse>) + responseObserver); + break; + case METHODID_DELETE_SUBPROPERTY_EVENT_FILTER: + serviceImpl.deleteSubpropertyEventFilter( + (com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SUBPROPERTY_EVENT_FILTER: + serviceImpl.createSubpropertyEventFilter( + (com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter>) + responseObserver); + break; default: throw new AssertionError(); } @@ -15763,73 +15821,6 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.analytics.admin.v1alpha.UpdatePropertyRequest, com.google.analytics.admin.v1alpha.Property>( service, METHODID_UPDATE_PROPERTY))) - .addMethod( - getGetUserLinkMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.GetUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink>(service, METHODID_GET_USER_LINK))) - .addMethod( - getBatchGetUserLinksMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse>( - service, METHODID_BATCH_GET_USER_LINKS))) - .addMethod( - getListUserLinksMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.ListUserLinksRequest, - com.google.analytics.admin.v1alpha.ListUserLinksResponse>( - service, METHODID_LIST_USER_LINKS))) - .addMethod( - getAuditUserLinksMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.AuditUserLinksRequest, - com.google.analytics.admin.v1alpha.AuditUserLinksResponse>( - service, METHODID_AUDIT_USER_LINKS))) - .addMethod( - getCreateUserLinkMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.CreateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink>( - service, METHODID_CREATE_USER_LINK))) - .addMethod( - getBatchCreateUserLinksMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse>( - service, METHODID_BATCH_CREATE_USER_LINKS))) - .addMethod( - getUpdateUserLinkMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest, - com.google.analytics.admin.v1alpha.UserLink>( - service, METHODID_UPDATE_USER_LINK))) - .addMethod( - getBatchUpdateUserLinksMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse>( - service, METHODID_BATCH_UPDATE_USER_LINKS))) - .addMethod( - getDeleteUserLinkMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest, - com.google.protobuf.Empty>(service, METHODID_DELETE_USER_LINK))) - .addMethod( - getBatchDeleteUserLinksMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest, - com.google.protobuf.Empty>(service, METHODID_BATCH_DELETE_USER_LINKS))) .addMethod( getCreateFirebaseLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -16576,6 +16567,75 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest, com.google.protobuf.Empty>(service, METHODID_DELETE_EVENT_CREATE_RULE))) + .addMethod( + getUpdateDataRedactionSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings>( + service, METHODID_UPDATE_DATA_REDACTION_SETTINGS))) + .addMethod( + getGetDataRedactionSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest, + com.google.analytics.admin.v1alpha.DataRedactionSettings>( + service, METHODID_GET_DATA_REDACTION_SETTINGS))) + .addMethod( + getCreateRollupPropertyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest, + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse>( + service, METHODID_CREATE_ROLLUP_PROPERTY))) + .addMethod( + getGetRollupPropertySourceLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink>( + service, METHODID_GET_ROLLUP_PROPERTY_SOURCE_LINK))) + .addMethod( + getListRollupPropertySourceLinksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse>( + service, METHODID_LIST_ROLLUP_PROPERTY_SOURCE_LINKS))) + .addMethod( + getCreateRollupPropertySourceLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink>( + service, METHODID_CREATE_ROLLUP_PROPERTY_SOURCE_LINK))) + .addMethod( + getDeleteRollupPropertySourceLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest, + com.google.protobuf.Empty>( + service, METHODID_DELETE_ROLLUP_PROPERTY_SOURCE_LINK))) + .addMethod( + getCreateSubpropertyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest, + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse>( + service, METHODID_CREATE_SUBPROPERTY))) + .addMethod( + getDeleteSubpropertyEventFilterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_SUBPROPERTY_EVENT_FILTER))) + .addMethod( + getCreateSubpropertyEventFilterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter>( + service, METHODID_CREATE_SUBPROPERTY_EVENT_FILTER))) .build(); } @@ -16638,16 +16698,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreatePropertyMethod()) .addMethod(getDeletePropertyMethod()) .addMethod(getUpdatePropertyMethod()) - .addMethod(getGetUserLinkMethod()) - .addMethod(getBatchGetUserLinksMethod()) - .addMethod(getListUserLinksMethod()) - .addMethod(getAuditUserLinksMethod()) - .addMethod(getCreateUserLinkMethod()) - .addMethod(getBatchCreateUserLinksMethod()) - .addMethod(getUpdateUserLinkMethod()) - .addMethod(getBatchUpdateUserLinksMethod()) - .addMethod(getDeleteUserLinkMethod()) - .addMethod(getBatchDeleteUserLinksMethod()) .addMethod(getCreateFirebaseLinkMethod()) .addMethod(getDeleteFirebaseLinkMethod()) .addMethod(getListFirebaseLinksMethod()) @@ -16755,6 +16805,16 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateEventCreateRuleMethod()) .addMethod(getUpdateEventCreateRuleMethod()) .addMethod(getDeleteEventCreateRuleMethod()) + .addMethod(getUpdateDataRedactionSettingsMethod()) + .addMethod(getGetDataRedactionSettingsMethod()) + .addMethod(getCreateRollupPropertyMethod()) + .addMethod(getGetRollupPropertySourceLinkMethod()) + .addMethod(getListRollupPropertySourceLinksMethod()) + .addMethod(getCreateRollupPropertySourceLinkMethod()) + .addMethod(getDeleteRollupPropertySourceLinkMethod()) + .addMethod(getCreateSubpropertyMethod()) + .addMethod(getDeleteSubpropertyEventFilterMethod()) + .addMethod(getCreateSubpropertyEventFilterMethod()) .build(); } } diff --git a/java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml b/java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml index 63ac8a7caf71..1eaa01ace604 100644 --- a/java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml +++ b/java-analytics-admin/grpc-google-analytics-admin-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-admin-v1beta - 0.38.0 + 0.39.0 grpc-google-analytics-admin-v1beta GRPC library for google-analytics-admin com.google.analytics google-analytics-admin-parent - 0.38.0 + 0.39.0 diff --git a/java-analytics-admin/pom.xml b/java-analytics-admin/pom.xml index 359cedc200fe..e3ee35b58b26 100644 --- a/java-analytics-admin/pom.xml +++ b/java-analytics-admin/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-admin-parent pom - 0.38.0 + 0.39.0 Google Analytics Admin Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.analytics google-analytics-admin - 0.38.0 + 0.39.0 com.google.api.grpc proto-google-analytics-admin-v1beta - 0.38.0 + 0.39.0 com.google.api.grpc grpc-google-analytics-admin-v1beta - 0.38.0 + 0.39.0 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.38.0 + 0.39.0 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.38.0 + 0.39.0 diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/pom.xml b/java-analytics-admin/proto-google-analytics-admin-v1alpha/pom.xml index c6c3363ece4d..add118d5e5f6 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/pom.xml +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.38.0 + 0.39.0 proto-google-analytics-admin-v1alpha PROTO library for proto-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.38.0 + 0.39.0 diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java index 7f21473715c0..134aee0742d9 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java @@ -87,66 +87,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_admin_v1alpha_DeletePropertyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_DeletePropertyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_admin_v1alpha_CreateFirebaseLinkRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -623,6 +563,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_admin_v1alpha_UpdateEnhancedMeasurementSettingsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_UpdateEnhancedMeasurementSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_admin_v1alpha_CreateConnectedSiteTagRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -695,6 +643,66 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -714,1343 +722,1368 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "te_and_edit.proto\0326google/analytics/admi" + "n/v1alpha/expanded_data_set.proto\032.googl" + "e/analytics/admin/v1alpha/resources.prot" - + "o\032\034google/api/annotations.proto\032\027google/" - + "api/client.proto\032\037google/api/field_behav" - + "ior.proto\032\031google/api/resource.proto\032\033go" - + "ogle/protobuf/empty.proto\032 google/protob" - + "uf/field_mask.proto\032\037google/protobuf/tim" - + "estamp.proto\"\244\004\n\026RunAccessReportRequest\022" - + "\016\n\006entity\030\001 \001(\t\022C\n\ndimensions\030\002 \003(\0132/.go" - + "ogle.analytics.admin.v1alpha.AccessDimen" - + "sion\022=\n\007metrics\030\003 \003(\0132,.google.analytics" - + ".admin.v1alpha.AccessMetric\022D\n\013date_rang" - + "es\030\004 \003(\0132/.google.analytics.admin.v1alph" - + "a.AccessDateRange\022P\n\020dimension_filter\030\005 " - + "\001(\01326.google.analytics.admin.v1alpha.Acc" - + "essFilterExpression\022M\n\rmetric_filter\030\006 \001" - + "(\01326.google.analytics.admin.v1alpha.Acce" - + "ssFilterExpression\022\016\n\006offset\030\007 \001(\003\022\r\n\005li" - + "mit\030\010 \001(\003\022\021\n\ttime_zone\030\t \001(\t\022@\n\torder_by" - + "s\030\n \003(\0132-.google.analytics.admin.v1alpha" - + ".AccessOrderBy\022\033\n\023return_entity_quota\030\013 " - + "\001(\010\"\277\002\n\027RunAccessReportResponse\022P\n\021dimen" - + "sion_headers\030\001 \003(\01325.google.analytics.ad" - + "min.v1alpha.AccessDimensionHeader\022J\n\016met" - + "ric_headers\030\002 \003(\01322.google.analytics.adm" - + "in.v1alpha.AccessMetricHeader\0227\n\004rows\030\003 " - + "\003(\0132).google.analytics.admin.v1alpha.Acc" - + "essRow\022\021\n\trow_count\030\004 \001(\005\022:\n\005quota\030\005 \001(\013" - + "2+.google.analytics.admin.v1alpha.Access" - + "Quota\"Q\n\021GetAccountRequest\022<\n\004name\030\001 \001(\t" - + "B.\342A\001\002\372A\'\n%analyticsadmin.googleapis.com" - + "/Account\"R\n\023ListAccountsRequest\022\021\n\tpage_" - + "size\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\022\024\n\014show_d" - + "eleted\030\003 \001(\010\"j\n\024ListAccountsResponse\0229\n\010" - + "accounts\030\001 \003(\0132\'.google.analytics.admin." - + "v1alpha.Account\022\027\n\017next_page_token\030\002 \001(\t" - + "\"T\n\024DeleteAccountRequest\022<\n\004name\030\001 \001(\tB." - + "\342A\001\002\372A\'\n%analyticsadmin.googleapis.com/A" - + "ccount\"\215\001\n\024UpdateAccountRequest\022>\n\007accou" - + "nt\030\001 \001(\0132\'.google.analytics.admin.v1alph" - + "a.AccountB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\004\342A\001\002\"o\n\035Provis" - + "ionAccountTicketRequest\0228\n\007account\030\001 \001(\013" - + "2\'.google.analytics.admin.v1alpha.Accoun" - + "t\022\024\n\014redirect_uri\030\002 \001(\t\";\n\036ProvisionAcco" - + "untTicketResponse\022\031\n\021account_ticket_id\030\001" - + " \001(\t\"S\n\022GetPropertyRequest\022=\n\004name\030\001 \001(\t" - + "B/\342A\001\002\372A(\n&analyticsadmin.googleapis.com" - + "/Property\"j\n\025ListPropertiesRequest\022\024\n\006fi" - + "lter\030\001 \001(\tB\004\342A\001\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\np" - + "age_token\030\003 \001(\t\022\024\n\014show_deleted\030\004 \001(\010\"o\n" - + "\026ListPropertiesResponse\022<\n\nproperties\030\001 " - + "\003(\0132(.google.analytics.admin.v1alpha.Pro" - + "perty\022\027\n\017next_page_token\030\002 \001(\t\"\220\001\n\025Updat" - + "ePropertyRequest\022@\n\010property\030\001 \001(\0132(.goo" - + "gle.analytics.admin.v1alpha.PropertyB\004\342A" - + "\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.protobu" - + "f.FieldMaskB\004\342A\001\002\"Y\n\025CreatePropertyReque" - + "st\022@\n\010property\030\001 \001(\0132(.google.analytics." - + "admin.v1alpha.PropertyB\004\342A\001\002\"V\n\025DeletePr" - + "opertyRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&an" - + "alyticsadmin.googleapis.com/Property\"S\n\022" - + "GetUserLinkRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A" - + "(\n&analyticsadmin.googleapis.com/UserLin" - + "k\"\233\001\n\030BatchGetUserLinksRequest\022?\n\006parent" - + "\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin.googleap" - + "is.com/UserLink\022>\n\005names\030\002 \003(\tB/\342A\001\002\372A(\n" - + "&analyticsadmin.googleapis.com/UserLink\"" - + "Y\n\031BatchGetUserLinksResponse\022<\n\nuser_lin" - + "ks\030\001 \003(\0132(.google.analytics.admin.v1alph" - + "a.UserLink\"~\n\024ListUserLinksRequest\022?\n\006pa" - + "rent\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin.goog" - + "leapis.com/UserLink\022\021\n\tpage_size\030\002 \001(\005\022\022" - + "\n\npage_token\030\003 \001(\t\"n\n\025ListUserLinksRespo" - + "nse\022<\n\nuser_links\030\001 \003(\0132(.google.analyti" - + "cs.admin.v1alpha.UserLink\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\"\177\n\025AuditUserLinksRequest\022?\n\006p" - + "arent\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin.goo" - + "gleapis.com/UserLink\022\021\n\tpage_size\030\002 \001(\005\022" - + "\022\n\npage_token\030\003 \001(\t\"t\n\026AuditUserLinksRes" - + "ponse\022A\n\nuser_links\030\001 \003(\0132-.google.analy" - + "tics.admin.v1alpha.AuditUserLink\022\027\n\017next" - + "_page_token\030\002 \001(\t\"\272\001\n\025CreateUserLinkRequ" - + "est\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsa" - + "dmin.googleapis.com/UserLink\022\035\n\017notify_n" - + "ew_user\030\002 \001(\010B\004\342A\001\001\022A\n\tuser_link\030\003 \001(\0132(" - + ".google.analytics.admin.v1alpha.UserLink" - + "B\004\342A\001\002\"\315\001\n\033BatchCreateUserLinksRequest\022?" - + "\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin." - + "googleapis.com/UserLink\022\036\n\020notify_new_us" - + "ers\030\002 \001(\010B\004\342A\001\001\022M\n\010requests\030\003 \003(\01325.goog" - + "le.analytics.admin.v1alpha.CreateUserLin" - + "kRequestB\004\342A\001\002\"\\\n\034BatchCreateUserLinksRe" - + "sponse\022<\n\nuser_links\030\001 \003(\0132(.google.anal" - + "ytics.admin.v1alpha.UserLink\"Z\n\025UpdateUs" - + "erLinkRequest\022A\n\tuser_link\030\001 \001(\0132(.googl" - + "e.analytics.admin.v1alpha.UserLinkB\004\342A\001\002" - + "\"\255\001\n\033BatchUpdateUserLinksRequest\022?\n\006pare" - + "nt\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin.google" - + "apis.com/UserLink\022M\n\010requests\030\002 \003(\01325.go" - + "ogle.analytics.admin.v1alpha.UpdateUserL" - + "inkRequestB\004\342A\001\002\"\\\n\034BatchUpdateUserLinks" - + "Response\022<\n\nuser_links\030\001 \003(\0132(.google.an" - + "alytics.admin.v1alpha.UserLink\"V\n\025Delete" - + "UserLinkRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&" - + "analyticsadmin.googleapis.com/UserLink\"\255" - + "\001\n\033BatchDeleteUserLinksRequest\022?\n\006parent" - + "\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin.googleap" - + "is.com/UserLink\022M\n\010requests\030\002 \003(\01325.goog" - + "le.analytics.admin.v1alpha.DeleteUserLin" - + "kRequestB\004\342A\001\002\"\253\001\n\031CreateFirebaseLinkReq" - + "uest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*analytics" - + "admin.googleapis.com/FirebaseLink\022I\n\rfir" - + "ebase_link\030\002 \001(\0132,.google.analytics.admi" - + "n.v1alpha.FirebaseLinkB\004\342A\001\002\"^\n\031DeleteFi" - + "rebaseLinkRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A," - + "\n*analyticsadmin.googleapis.com/Firebase" - + "Link\"\206\001\n\030ListFirebaseLinksRequest\022C\n\006par" - + "ent\030\001 \001(\tB3\342A\001\002\372A,\022*analyticsadmin.googl" - + "eapis.com/FirebaseLink\022\021\n\tpage_size\030\002 \001(" - + "\005\022\022\n\npage_token\030\003 \001(\t\"z\n\031ListFirebaseLin" - + "ksResponse\022D\n\016firebase_links\030\001 \003(\0132,.goo" - + "gle.analytics.admin.v1alpha.FirebaseLink" - + "\022\027\n\017next_page_token\030\002 \001(\t\"]\n\027GetGlobalSi" - + "teTagRequest\022B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+ana" - + "lyticsadmin.googleapis.com/GlobalSiteTag" - + "\"\260\001\n\032CreateGoogleAdsLinkRequest\022D\n\006paren" - + "t\030\001 \001(\tB4\342A\001\002\372A-\022+analyticsadmin.googlea" - + "pis.com/GoogleAdsLink\022L\n\017google_ads_link" - + "\030\002 \001(\0132-.google.analytics.admin.v1alpha." - + "GoogleAdsLinkB\004\342A\001\002\"\233\001\n\032UpdateGoogleAdsL" - + "inkRequest\022F\n\017google_ads_link\030\001 \001(\0132-.go" - + "ogle.analytics.admin.v1alpha.GoogleAdsLi" - + "nk\0225\n\013update_mask\030\002 \001(\0132\032.google.protobu" - + "f.FieldMaskB\004\342A\001\002\"`\n\032DeleteGoogleAdsLink" - + "Request\022B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+analytic" - + "sadmin.googleapis.com/GoogleAdsLink\"\210\001\n\031" - + "ListGoogleAdsLinksRequest\022D\n\006parent\030\001 \001(" - + "\tB4\342A\001\002\372A-\022+analyticsadmin.googleapis.co" - + "m/GoogleAdsLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" - + "ge_token\030\003 \001(\t\"~\n\032ListGoogleAdsLinksResp" - + "onse\022G\n\020google_ads_links\030\001 \003(\0132-.google." - + "analytics.admin.v1alpha.GoogleAdsLink\022\027\n" - + "\017next_page_token\030\002 \001(\t\"i\n\035GetDataSharing" - + "SettingsRequest\022H\n\004name\030\001 \001(\tB:\342A\001\002\372A3\n1" - + "analyticsadmin.googleapis.com/DataSharin" - + "gSettings\"D\n\033ListAccountSummariesRequest" - + "\022\021\n\tpage_size\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\"" - + "\202\001\n\034ListAccountSummariesResponse\022I\n\021acco" - + "unt_summaries\030\001 \003(\0132..google.analytics.a" - + "dmin.v1alpha.AccountSummary\022\027\n\017next_page" - + "_token\030\002 \001(\t\"\210\001\n$AcknowledgeUserDataColl" - + "ectionRequest\022A\n\010property\030\001 \001(\tB/\342A\001\002\372A(" - + "\n&analyticsadmin.googleapis.com/Property" - + "\022\035\n\017acknowledgement\030\002 \001(\tB\004\342A\001\002\"\'\n%Ackno" - + "wledgeUserDataCollectionResponse\"\214\004\n Sea" - + "rchChangeHistoryEventsRequest\022?\n\007account" - + "\030\001 \001(\tB.\342A\001\002\372A\'\n%analyticsadmin.googleap" - + "is.com/Account\022A\n\010property\030\002 \001(\tB/\342A\001\001\372A" + + "o\032=google/analytics/admin/v1alpha/subpro" + + "perty_event_filter.proto\032\034google/api/ann" + + "otations.proto\032\027google/api/client.proto\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\032\033google/protobuf/emp" + + "ty.proto\032 google/protobuf/field_mask.pro" + + "to\032\037google/protobuf/timestamp.proto\"\342\004\n\026" + + "RunAccessReportRequest\022\016\n\006entity\030\001 \001(\t\022C" + + "\n\ndimensions\030\002 \003(\0132/.google.analytics.ad" + + "min.v1alpha.AccessDimension\022=\n\007metrics\030\003" + + " \003(\0132,.google.analytics.admin.v1alpha.Ac" + + "cessMetric\022D\n\013date_ranges\030\004 \003(\0132/.google" + + ".analytics.admin.v1alpha.AccessDateRange" + + "\022P\n\020dimension_filter\030\005 \001(\01326.google.anal" + + "ytics.admin.v1alpha.AccessFilterExpressi" + + "on\022M\n\rmetric_filter\030\006 \001(\01326.google.analy" + + "tics.admin.v1alpha.AccessFilterExpressio" + + "n\022\016\n\006offset\030\007 \001(\003\022\r\n\005limit\030\010 \001(\003\022\021\n\ttime" + + "_zone\030\t \001(\t\022@\n\torder_bys\030\n \003(\0132-.google." + + "analytics.admin.v1alpha.AccessOrderBy\022\033\n" + + "\023return_entity_quota\030\013 \001(\010\022\037\n\021include_al" + + "l_users\030\014 \001(\010B\004\342A\001\001\022\033\n\rexpand_groups\030\r \001" + + "(\010B\004\342A\001\001\"\277\002\n\027RunAccessReportResponse\022P\n\021" + + "dimension_headers\030\001 \003(\01325.google.analyti" + + "cs.admin.v1alpha.AccessDimensionHeader\022J" + + "\n\016metric_headers\030\002 \003(\01322.google.analytic" + + "s.admin.v1alpha.AccessMetricHeader\0227\n\004ro" + + "ws\030\003 \003(\0132).google.analytics.admin.v1alph" + + "a.AccessRow\022\021\n\trow_count\030\004 \001(\005\022:\n\005quota\030" + + "\005 \001(\0132+.google.analytics.admin.v1alpha.A" + + "ccessQuota\"Q\n\021GetAccountRequest\022<\n\004name\030" + + "\001 \001(\tB.\342A\001\002\372A\'\n%analyticsadmin.googleapi" + + "s.com/Account\"R\n\023ListAccountsRequest\022\021\n\t" + + "page_size\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\022\024\n\014s" + + "how_deleted\030\003 \001(\010\"j\n\024ListAccountsRespons" + + "e\0229\n\010accounts\030\001 \003(\0132\'.google.analytics.a" + + "dmin.v1alpha.Account\022\027\n\017next_page_token\030" + + "\002 \001(\t\"T\n\024DeleteAccountRequest\022<\n\004name\030\001 " + + "\001(\tB.\342A\001\002\372A\'\n%analyticsadmin.googleapis." + + "com/Account\"\215\001\n\024UpdateAccountRequest\022>\n\007" + + "account\030\001 \001(\0132\'.google.analytics.admin.v" + + "1alpha.AccountB\004\342A\001\002\0225\n\013update_mask\030\002 \001(" + + "\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\"o\n\035P" + + "rovisionAccountTicketRequest\0228\n\007account\030" + + "\001 \001(\0132\'.google.analytics.admin.v1alpha.A" + + "ccount\022\024\n\014redirect_uri\030\002 \001(\t\";\n\036Provisio" + + "nAccountTicketResponse\022\031\n\021account_ticket" + + "_id\030\001 \001(\t\"S\n\022GetPropertyRequest\022=\n\004name\030" + + "\001 \001(\tB/\342A\001\002\372A(\n&analyticsadmin.googleapi" + + "s.com/Property\"j\n\025ListPropertiesRequest\022" + + "\024\n\006filter\030\001 \001(\tB\004\342A\001\002\022\021\n\tpage_size\030\002 \001(\005" + + "\022\022\n\npage_token\030\003 \001(\t\022\024\n\014show_deleted\030\004 \001" + + "(\010\"o\n\026ListPropertiesResponse\022<\n\nproperti" + + "es\030\001 \003(\0132(.google.analytics.admin.v1alph" + + "a.Property\022\027\n\017next_page_token\030\002 \001(\t\"\220\001\n\025" + + "UpdatePropertyRequest\022@\n\010property\030\001 \001(\0132" + + "(.google.analytics.admin.v1alpha.Propert" + + "yB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\004\342A\001\002\"Y\n\025CreateProperty" + + "Request\022@\n\010property\030\001 \001(\0132(.google.analy" + + "tics.admin.v1alpha.PropertyB\004\342A\001\002\"V\n\025Del" + + "etePropertyRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A" + "(\n&analyticsadmin.googleapis.com/Propert" - + "y\022V\n\rresource_type\030\003 \003(\01629.google.analyt" - + "ics.admin.v1alpha.ChangeHistoryResourceT" - + "ypeB\004\342A\001\001\022@\n\006action\030\004 \003(\0162*.google.analy" - + "tics.admin.v1alpha.ActionTypeB\004\342A\001\001\022\031\n\013a" - + "ctor_email\030\005 \003(\tB\004\342A\001\001\022>\n\024earliest_chang" - + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" - + "B\004\342A\001\001\022<\n\022latest_change_time\030\007 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\004\342A\001\001\022\027\n\tpage_siz" - + "e\030\010 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\t \001(\tB\004\342A\001\001\"" - + "\217\001\n!SearchChangeHistoryEventsResponse\022Q\n" - + "\025change_history_events\030\001 \003(\01322.google.an" - + "alytics.admin.v1alpha.ChangeHistoryEvent" - + "\022\027\n\017next_page_token\030\002 \001(\t\"u\n#GetMeasurem" - + "entProtocolSecretRequest\022N\n\004name\030\001 \001(\tB@" - + "\342A\001\002\372A9\n7analyticsadmin.googleapis.com/M" - + "easurementProtocolSecret\"\340\001\n&CreateMeasu" - + "rementProtocolSecretRequest\022P\n\006parent\030\001 " - + "\001(\tB@\342A\001\002\372A9\0227analyticsadmin.googleapis." - + "com/MeasurementProtocolSecret\022d\n\033measure" - + "ment_protocol_secret\030\002 \001(\01329.google.anal" - + "ytics.admin.v1alpha.MeasurementProtocolS" - + "ecretB\004\342A\001\002\"x\n&DeleteMeasurementProtocol" - + "SecretRequest\022N\n\004name\030\001 \001(\tB@\342A\001\002\372A9\n7an" - + "alyticsadmin.googleapis.com/MeasurementP" - + "rotocolSecret\"\305\001\n&UpdateMeasurementProto" - + "colSecretRequest\022d\n\033measurement_protocol" - + "_secret\030\001 \001(\01329.google.analytics.admin.v" - + "1alpha.MeasurementProtocolSecretB\004\342A\001\002\0225" - + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" - + "eldMaskB\004\342A\001\002\"\240\001\n%ListMeasurementProtoco" - + "lSecretsRequest\022P\n\006parent\030\001 \001(\tB@\342A\001\002\372A9" - + "\0227analyticsadmin.googleapis.com/Measurem" - + "entProtocolSecret\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n" - + "page_token\030\003 \001(\t\"\242\001\n&ListMeasurementProt" - + "ocolSecretsResponse\022_\n\034measurement_proto" - + "col_secrets\030\001 \003(\01329.google.analytics.adm" - + "in.v1alpha.MeasurementProtocolSecret\022\027\n\017" - + "next_page_token\030\002 \001(\t\"\203\001\n*GetSKAdNetwork" - + "ConversionValueSchemaRequest\022U\n\004name\030\001 \001" - + "(\tBG\342A\001\002\372A@\n>analyticsadmin.googleapis.c" - + "om/SKAdNetworkConversionValueSchema\"\375\001\n-" - + "CreateSKAdNetworkConversionValueSchemaRe" - + "quest\022W\n\006parent\030\001 \001(\tBG\342A\001\002\372A@\022>analytic" - + "sadmin.googleapis.com/SKAdNetworkConvers" - + "ionValueSchema\022s\n#skadnetwork_conversion" - + "_value_schema\030\002 \001(\0132@.google.analytics.a" - + "dmin.v1alpha.SKAdNetworkConversionValueS" - + "chemaB\004\342A\001\002\"\206\001\n-DeleteSKAdNetworkConvers" - + "ionValueSchemaRequest\022U\n\004name\030\001 \001(\tBG\342A\001" - + "\002\372A@\n>analyticsadmin.googleapis.com/SKAd" - + "NetworkConversionValueSchema\"\333\001\n-UpdateS" - + "KAdNetworkConversionValueSchemaRequest\022s" - + "\n#skadnetwork_conversion_value_schema\030\001 " - + "\001(\0132@.google.analytics.admin.v1alpha.SKA" - + "dNetworkConversionValueSchemaB\004\342A\001\002\0225\n\013u" - + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" - + "MaskB\004\342A\001\002\"\256\001\n,ListSKAdNetworkConversion" - + "ValueSchemasRequest\022W\n\006parent\030\001 \001(\tBG\342A\001" - + "\002\372A@\022>analyticsadmin.googleapis.com/SKAd" - + "NetworkConversionValueSchema\022\021\n\tpage_siz" - + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\270\001\n-ListSKAd" - + "NetworkConversionValueSchemasResponse\022n\n" - + "$skadnetwork_conversion_value_schemas\030\001 " - + "\003(\0132@.google.analytics.admin.v1alpha.SKA" - + "dNetworkConversionValueSchema\022\027\n\017next_pa" - + "ge_token\030\002 \001(\t\"m\n\037GetGoogleSignalsSettin" - + "gsRequest\022J\n\004name\030\001 \001(\tB<\342A\001\002\372A5\n3analyt" - + "icsadmin.googleapis.com/GoogleSignalsSet" - + "tings\"\271\001\n\"UpdateGoogleSignalsSettingsReq" - + "uest\022\\\n\027google_signals_settings\030\001 \001(\01325." - + "google.analytics.admin.v1alpha.GoogleSig" - + "nalsSettingsB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132" - + "\032.google.protobuf.FieldMaskB\004\342A\001\002\"\267\001\n\034Cr" - + "eateConversionEventRequest\022O\n\020conversion" - + "_event\030\001 \001(\0132/.google.analytics.admin.v1" - + "alpha.ConversionEventB\004\342A\001\002\022F\n\006parent\030\002 " - + "\001(\tB6\342A\001\002\372A/\022-analyticsadmin.googleapis." - + "com/ConversionEvent\"\246\001\n\034UpdateConversion" - + "EventRequest\022O\n\020conversion_event\030\001 \001(\0132/" - + ".google.analytics.admin.v1alpha.Conversi" - + "onEventB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\004\342A\001\002\"a\n\031GetConve" - + "rsionEventRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/" - + "\n-analyticsadmin.googleapis.com/Conversi" - + "onEvent\"d\n\034DeleteConversionEventRequest\022" - + "D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsadmin.g" - + "oogleapis.com/ConversionEvent\"\214\001\n\033ListCo" - + "nversionEventsRequest\022F\n\006parent\030\001 \001(\tB6\342" - + "A\001\002\372A/\022-analyticsadmin.googleapis.com/Co" - + "nversionEvent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" - + "_token\030\003 \001(\t\"\203\001\n\034ListConversionEventsRes" - + "ponse\022J\n\021conversion_events\030\001 \003(\0132/.googl" - + "e.analytics.admin.v1alpha.ConversionEven" - + "t\022\027\n\017next_page_token\030\002 \001(\t\"}\n\'GetDisplay" - + "Video360AdvertiserLinkRequest\022R\n\004name\030\001 " - + "\001(\tBD\342A\001\002\372A=\n;analyticsadmin.googleapis." - + "com/DisplayVideo360AdvertiserLink\"\250\001\n)Li" - + "stDisplayVideo360AdvertiserLinksRequest\022" - + "T\n\006parent\030\001 \001(\tBD\342A\001\002\372A=\022;analyticsadmin" - + ".googleapis.com/DisplayVideo360Advertise" - + "rLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\"\260\001\n*ListDisplayVideo360AdvertiserLi" - + "nksResponse\022i\n\"display_video_360_adverti" - + "ser_links\030\001 \003(\0132=.google.analytics.admin" - + ".v1alpha.DisplayVideo360AdvertiserLink\022\027" - + "\n\017next_page_token\030\002 \001(\t\"\362\001\n*CreateDispla" - + "yVideo360AdvertiserLinkRequest\022T\n\006parent" - + "\030\001 \001(\tBD\342A\001\002\372A=\022;analyticsadmin.googleap" - + "is.com/DisplayVideo360AdvertiserLink\022n\n!" - + "display_video_360_advertiser_link\030\002 \001(\0132" - + "=.google.analytics.admin.v1alpha.Display" - + "Video360AdvertiserLinkB\004\342A\001\002\"\200\001\n*DeleteD" - + "isplayVideo360AdvertiserLinkRequest\022R\n\004n" - + "ame\030\001 \001(\tBD\342A\001\002\372A=\n;analyticsadmin.googl" - + "eapis.com/DisplayVideo360AdvertiserLink\"" - + "\315\001\n*UpdateDisplayVideo360AdvertiserLinkR" - + "equest\022h\n!display_video_360_advertiser_l" - + "ink\030\001 \001(\0132=.google.analytics.admin.v1alp" - + "ha.DisplayVideo360AdvertiserLink\0225\n\013upda" - + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" - + "kB\004\342A\001\002\"\215\001\n/GetDisplayVideo360Advertiser" - + "LinkProposalRequest\022Z\n\004name\030\001 \001(\tBL\342A\001\002\372" - + "AE\nCanalyticsadmin.googleapis.com/Displa" - + "yVideo360AdvertiserLinkProposal\"\270\001\n1List" - + "DisplayVideo360AdvertiserLinkProposalsRe" - + "quest\022\\\n\006parent\030\001 \001(\tBL\342A\001\002\372AE\022Canalytic" - + "sadmin.googleapis.com/DisplayVideo360Adv" - + "ertiserLinkProposal\022\021\n\tpage_size\030\002 \001(\005\022\022" - + "\n\npage_token\030\003 \001(\t\"\311\001\n2ListDisplayVideo3" - + "60AdvertiserLinkProposalsResponse\022z\n+dis" - + "play_video_360_advertiser_link_proposals" - + "\030\001 \003(\0132E.google.analytics.admin.v1alpha." - + "DisplayVideo360AdvertiserLinkProposal\022\027\n" - + "\017next_page_token\030\002 \001(\t\"\223\002\n2CreateDisplay" - + "Video360AdvertiserLinkProposalRequest\022\\\n" - + "\006parent\030\001 \001(\tBL\342A\001\002\372AE\022Canalyticsadmin.g" - + "oogleapis.com/DisplayVideo360AdvertiserL" - + "inkProposal\022\177\n*display_video_360_adverti" - + "ser_link_proposal\030\002 \001(\0132E.google.analyti" - + "cs.admin.v1alpha.DisplayVideo360Advertis" - + "erLinkProposalB\004\342A\001\002\"\220\001\n2DeleteDisplayVi" - + "deo360AdvertiserLinkProposalRequest\022Z\n\004n" - + "ame\030\001 \001(\tBL\342A\001\002\372AE\nCanalyticsadmin.googl" - + "eapis.com/DisplayVideo360AdvertiserLinkP" - + "roposal\"\221\001\n3ApproveDisplayVideo360Advert" - + "iserLinkProposalRequest\022Z\n\004name\030\001 \001(\tBL\342" - + "A\001\002\372AE\nCanalyticsadmin.googleapis.com/Di" - + "splayVideo360AdvertiserLinkProposal\"\240\001\n4" - + "ApproveDisplayVideo360AdvertiserLinkProp" - + "osalResponse\022h\n!display_video_360_advert" - + "iser_link\030\001 \001(\0132=.google.analytics.admin" - + ".v1alpha.DisplayVideo360AdvertiserLink\"\220" - + "\001\n2CancelDisplayVideo360AdvertiserLinkPr" - + "oposalRequest\022Z\n\004name\030\001 \001(\tBL\342A\001\002\372AE\nCan" - + "alyticsadmin.googleapis.com/DisplayVideo" - + "360AdvertiserLinkProposal\"c\n\032GetSearchAd" - + "s360LinkRequest\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n." - + "analyticsadmin.googleapis.com/SearchAds3" - + "60Link\"\216\001\n\034ListSearchAds360LinksRequest\022" - + "G\n\006parent\030\001 \001(\tB7\342A\001\002\372A0\022.analyticsadmin" - + ".googleapis.com/SearchAds360Link\022\021\n\tpage" - + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\210\001\n\035List" - + "SearchAds360LinksResponse\022N\n\024search_ads_" - + "360_links\030\001 \003(\01320.google.analytics.admin" - + ".v1alpha.SearchAds360Link\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\"\275\001\n\035CreateSearchAds360LinkReq" - + "uest\022G\n\006parent\030\001 \001(\tB7\342A\001\002\372A0\022.analytics" - + "admin.googleapis.com/SearchAds360Link\022S\n" - + "\023search_ads_360_link\030\002 \001(\01320.google.anal" - + "ytics.admin.v1alpha.SearchAds360LinkB\004\342A" - + "\001\002\"f\n\035DeleteSearchAds360LinkRequest\022E\n\004n" - + "ame\030\001 \001(\tB7\342A\001\002\372A0\n.analyticsadmin.googl" - + "eapis.com/SearchAds360Link\"\245\001\n\035UpdateSea" - + "rchAds360LinkRequest\022M\n\023search_ads_360_l" - + "ink\030\001 \001(\01320.google.analytics.admin.v1alp" - + "ha.SearchAds360Link\0225\n\013update_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMaskB\004\342A\001\002\"\267\001\n\034C" - + "reateCustomDimensionRequest\022F\n\006parent\030\001 " - + "\001(\tB6\342A\001\002\372A/\022-analyticsadmin.googleapis." - + "com/CustomDimension\022O\n\020custom_dimension\030" - + "\002 \001(\0132/.google.analytics.admin.v1alpha.C" - + "ustomDimensionB\004\342A\001\002\"\240\001\n\034UpdateCustomDim" - + "ensionRequest\022I\n\020custom_dimension\030\001 \001(\0132" - + "/.google.analytics.admin.v1alpha.CustomD" - + "imension\0225\n\013update_mask\030\002 \001(\0132\032.google.p" - + "rotobuf.FieldMaskB\004\342A\001\002\"\214\001\n\033ListCustomDi" - + "mensionsRequest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/" - + "\022-analyticsadmin.googleapis.com/CustomDi" - + "mension\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" - + "\030\003 \001(\t\"\203\001\n\034ListCustomDimensionsResponse\022" - + "J\n\021custom_dimensions\030\001 \003(\0132/.google.anal" - + "ytics.admin.v1alpha.CustomDimension\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"e\n\035ArchiveCustomDim" - + "ensionRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-an" - + "alyticsadmin.googleapis.com/CustomDimens" - + "ion\"a\n\031GetCustomDimensionRequest\022D\n\004name" - + "\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsadmin.googleap" - + "is.com/CustomDimension\"\253\001\n\031CreateCustomM" - + "etricRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*a" - + "nalyticsadmin.googleapis.com/CustomMetri" - + "c\022I\n\rcustom_metric\030\002 \001(\0132,.google.analyt" - + "ics.admin.v1alpha.CustomMetricB\004\342A\001\002\"\227\001\n" - + "\031UpdateCustomMetricRequest\022C\n\rcustom_met" - + "ric\030\001 \001(\0132,.google.analytics.admin.v1alp" - + "ha.CustomMetric\0225\n\013update_mask\030\002 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\004\342A\001\002\"\206\001\n\030ListC" - + "ustomMetricsRequest\022C\n\006parent\030\001 \001(\tB3\342A\001" - + "\002\372A,\022*analyticsadmin.googleapis.com/Cust" - + "omMetric\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" - + "n\030\003 \001(\t\"z\n\031ListCustomMetricsResponse\022D\n\016" - + "custom_metrics\030\001 \003(\0132,.google.analytics." - + "admin.v1alpha.CustomMetric\022\027\n\017next_page_" - + "token\030\002 \001(\t\"_\n\032ArchiveCustomMetricReques" - + "t\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*analyticsadmin" - + ".googleapis.com/CustomMetric\"[\n\026GetCusto" - + "mMetricRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*a" - + "nalyticsadmin.googleapis.com/CustomMetri" - + "c\"m\n\037GetDataRetentionSettingsRequest\022J\n\004" + + "y\"\253\001\n\031CreateFirebaseLinkRequest\022C\n\006paren" + + "t\030\001 \001(\tB3\342A\001\002\372A,\022*analyticsadmin.googlea" + + "pis.com/FirebaseLink\022I\n\rfirebase_link\030\002 " + + "\001(\0132,.google.analytics.admin.v1alpha.Fir" + + "ebaseLinkB\004\342A\001\002\"^\n\031DeleteFirebaseLinkReq" + + "uest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*analyticsad" + + "min.googleapis.com/FirebaseLink\"\206\001\n\030List" + + "FirebaseLinksRequest\022C\n\006parent\030\001 \001(\tB3\342A" + + "\001\002\372A,\022*analyticsadmin.googleapis.com/Fir" + + "ebaseLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_tok" + + "en\030\003 \001(\t\"z\n\031ListFirebaseLinksResponse\022D\n" + + "\016firebase_links\030\001 \003(\0132,.google.analytics" + + ".admin.v1alpha.FirebaseLink\022\027\n\017next_page" + + "_token\030\002 \001(\t\"]\n\027GetGlobalSiteTagRequest\022" + + "B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+analyticsadmin.g" + + "oogleapis.com/GlobalSiteTag\"\260\001\n\032CreateGo" + + "ogleAdsLinkRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002" + + "\372A-\022+analyticsadmin.googleapis.com/Googl" + + "eAdsLink\022L\n\017google_ads_link\030\002 \001(\0132-.goog" + + "le.analytics.admin.v1alpha.GoogleAdsLink" + + "B\004\342A\001\002\"\233\001\n\032UpdateGoogleAdsLinkRequest\022F\n" + + "\017google_ads_link\030\001 \001(\0132-.google.analytic" + + "s.admin.v1alpha.GoogleAdsLink\0225\n\013update_" + + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\004" + + "\342A\001\002\"`\n\032DeleteGoogleAdsLinkRequest\022B\n\004na" + + "me\030\001 \001(\tB4\342A\001\002\372A-\n+analyticsadmin.google" + + "apis.com/GoogleAdsLink\"\210\001\n\031ListGoogleAds" + + "LinksRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\022+a" + + "nalyticsadmin.googleapis.com/GoogleAdsLi" + + "nk\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"~\n\032ListGoogleAdsLinksResponse\022G\n\020googl" + + "e_ads_links\030\001 \003(\0132-.google.analytics.adm" + + "in.v1alpha.GoogleAdsLink\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"i\n\035GetDataSharingSettingsReque" + + "st\022H\n\004name\030\001 \001(\tB:\342A\001\002\372A3\n1analyticsadmi" + + "n.googleapis.com/DataSharingSettings\"D\n\033" + + "ListAccountSummariesRequest\022\021\n\tpage_size" + + "\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\"\202\001\n\034ListAccou" + + "ntSummariesResponse\022I\n\021account_summaries" + + "\030\001 \003(\0132..google.analytics.admin.v1alpha." + + "AccountSummary\022\027\n\017next_page_token\030\002 \001(\t\"" + + "\210\001\n$AcknowledgeUserDataCollectionRequest" + + "\022A\n\010property\030\001 \001(\tB/\342A\001\002\372A(\n&analyticsad" + + "min.googleapis.com/Property\022\035\n\017acknowled" + + "gement\030\002 \001(\tB\004\342A\001\002\"\'\n%AcknowledgeUserDat" + + "aCollectionResponse\"\214\004\n SearchChangeHist" + + "oryEventsRequest\022?\n\007account\030\001 \001(\tB.\342A\001\002\372" + + "A\'\n%analyticsadmin.googleapis.com/Accoun" + + "t\022A\n\010property\030\002 \001(\tB/\342A\001\001\372A(\n&analyticsa" + + "dmin.googleapis.com/Property\022V\n\rresource" + + "_type\030\003 \003(\01629.google.analytics.admin.v1a" + + "lpha.ChangeHistoryResourceTypeB\004\342A\001\001\022@\n\006" + + "action\030\004 \003(\0162*.google.analytics.admin.v1" + + "alpha.ActionTypeB\004\342A\001\001\022\031\n\013actor_email\030\005 " + + "\003(\tB\004\342A\001\001\022>\n\024earliest_change_time\030\006 \001(\0132" + + "\032.google.protobuf.TimestampB\004\342A\001\001\022<\n\022lat" + + "est_change_time\030\007 \001(\0132\032.google.protobuf." + + "TimestampB\004\342A\001\001\022\027\n\tpage_size\030\010 \001(\005B\004\342A\001\001" + + "\022\030\n\npage_token\030\t \001(\tB\004\342A\001\001\"\217\001\n!SearchCha" + + "ngeHistoryEventsResponse\022Q\n\025change_histo" + + "ry_events\030\001 \003(\01322.google.analytics.admin" + + ".v1alpha.ChangeHistoryEvent\022\027\n\017next_page" + + "_token\030\002 \001(\t\"u\n#GetMeasurementProtocolSe" + + "cretRequest\022N\n\004name\030\001 \001(\tB@\342A\001\002\372A9\n7anal" + + "yticsadmin.googleapis.com/MeasurementPro" + + "tocolSecret\"\340\001\n&CreateMeasurementProtoco" + + "lSecretRequest\022P\n\006parent\030\001 \001(\tB@\342A\001\002\372A9\022" + + "7analyticsadmin.googleapis.com/Measureme" + + "ntProtocolSecret\022d\n\033measurement_protocol" + + "_secret\030\002 \001(\01329.google.analytics.admin.v" + + "1alpha.MeasurementProtocolSecretB\004\342A\001\002\"x" + + "\n&DeleteMeasurementProtocolSecretRequest" + + "\022N\n\004name\030\001 \001(\tB@\342A\001\002\372A9\n7analyticsadmin." + + "googleapis.com/MeasurementProtocolSecret" + + "\"\305\001\n&UpdateMeasurementProtocolSecretRequ" + + "est\022d\n\033measurement_protocol_secret\030\001 \001(\013" + + "29.google.analytics.admin.v1alpha.Measur" + + "ementProtocolSecretB\004\342A\001\002\0225\n\013update_mask" + + "\030\002 \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\002" + + "\"\240\001\n%ListMeasurementProtocolSecretsReque" + + "st\022P\n\006parent\030\001 \001(\tB@\342A\001\002\372A9\0227analyticsad" + + "min.googleapis.com/MeasurementProtocolSe" + + "cret\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"\242\001\n&ListMeasurementProtocolSecretsRe" + + "sponse\022_\n\034measurement_protocol_secrets\030\001" + + " \003(\01329.google.analytics.admin.v1alpha.Me" + + "asurementProtocolSecret\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"\203\001\n*GetSKAdNetworkConversionVal" + + "ueSchemaRequest\022U\n\004name\030\001 \001(\tBG\342A\001\002\372A@\n>" + + "analyticsadmin.googleapis.com/SKAdNetwor" + + "kConversionValueSchema\"\375\001\n-CreateSKAdNet" + + "workConversionValueSchemaRequest\022W\n\006pare" + + "nt\030\001 \001(\tBG\342A\001\002\372A@\022>analyticsadmin.google" + + "apis.com/SKAdNetworkConversionValueSchem" + + "a\022s\n#skadnetwork_conversion_value_schema" + + "\030\002 \001(\0132@.google.analytics.admin.v1alpha." + + "SKAdNetworkConversionValueSchemaB\004\342A\001\002\"\206" + + "\001\n-DeleteSKAdNetworkConversionValueSchem" + + "aRequest\022U\n\004name\030\001 \001(\tBG\342A\001\002\372A@\n>analyti" + + "csadmin.googleapis.com/SKAdNetworkConver" + + "sionValueSchema\"\333\001\n-UpdateSKAdNetworkCon" + + "versionValueSchemaRequest\022s\n#skadnetwork" + + "_conversion_value_schema\030\001 \001(\0132@.google." + + "analytics.admin.v1alpha.SKAdNetworkConve" + + "rsionValueSchemaB\004\342A\001\002\0225\n\013update_mask\030\002 " + + "\001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\"\256\001" + + "\n,ListSKAdNetworkConversionValueSchemasR" + + "equest\022W\n\006parent\030\001 \001(\tBG\342A\001\002\372A@\022>analyti" + + "csadmin.googleapis.com/SKAdNetworkConver" + + "sionValueSchema\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\"\270\001\n-ListSKAdNetworkConver" + + "sionValueSchemasResponse\022n\n$skadnetwork_" + + "conversion_value_schemas\030\001 \003(\0132@.google." + + "analytics.admin.v1alpha.SKAdNetworkConve" + + "rsionValueSchema\022\027\n\017next_page_token\030\002 \001(" + + "\t\"m\n\037GetGoogleSignalsSettingsRequest\022J\n\004" + "name\030\001 \001(\tB<\342A\001\002\372A5\n3analyticsadmin.goog" - + "leapis.com/DataRetentionSettings\"\271\001\n\"Upd" - + "ateDataRetentionSettingsRequest\022\\\n\027data_" - + "retention_settings\030\001 \001(\01325.google.analyt" - + "ics.admin.v1alpha.DataRetentionSettingsB" + + "leapis.com/GoogleSignalsSettings\"\271\001\n\"Upd" + + "ateGoogleSignalsSettingsRequest\022\\\n\027googl" + + "e_signals_settings\030\001 \001(\01325.google.analyt" + + "ics.admin.v1alpha.GoogleSignalsSettingsB" + "\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.prot" - + "obuf.FieldMaskB\004\342A\001\002\"\243\001\n\027CreateDataStrea" - + "mRequest\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\022(analy" - + "ticsadmin.googleapis.com/DataStream\022E\n\013d" - + "ata_stream\030\002 \001(\0132*.google.analytics.admi" - + "n.v1alpha.DataStreamB\004\342A\001\002\"Z\n\027DeleteData" - + "StreamRequest\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(an" - + "alyticsadmin.googleapis.com/DataStream\"\221" - + "\001\n\027UpdateDataStreamRequest\022?\n\013data_strea", - "m\030\001 \001(\0132*.google.analytics.admin.v1alpha" - + ".DataStream\0225\n\013update_mask\030\002 \001(\0132\032.googl" - + "e.protobuf.FieldMaskB\004\342A\001\002\"\202\001\n\026ListDataS" - + "treamsRequest\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\022(" - + "analyticsadmin.googleapis.com/DataStream" + + "obuf.FieldMaskB\004\342A\001\002\"\267\001\n\034CreateConversio" + + "nEventRequest\022O\n\020conversion_event\030\001 \001(\0132" + + "/.google.analytics.admin.v1alpha.Convers" + + "ionEventB\004\342A\001\002\022F\n\006parent\030\002 \001(\tB6\342A\001\002\372A/\022" + + "-analyticsadmin.googleapis.com/Conversio" + + "nEvent\"\246\001\n\034UpdateConversionEventRequest\022" + + "O\n\020conversion_event\030\001 \001(\0132/.google.analy" + + "tics.admin.v1alpha.ConversionEventB\004\342A\001\002" + + "\0225\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMaskB\004\342A\001\002\"a\n\031GetConversionEventReq" + + "uest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsad" + + "min.googleapis.com/ConversionEvent\"d\n\034De" + + "leteConversionEventRequest\022D\n\004name\030\001 \001(\t" + + "B6\342A\001\002\372A/\n-analyticsadmin.googleapis.com" + + "/ConversionEvent\"\214\001\n\033ListConversionEvent" + + "sRequest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analy" + + "ticsadmin.googleapis.com/ConversionEvent" + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"" - + "t\n\027ListDataStreamsResponse\022@\n\014data_strea" - + "ms\030\001 \003(\0132*.google.analytics.admin.v1alph" - + "a.DataStream\022\027\n\017next_page_token\030\002 \001(\t\"W\n" - + "\024GetDataStreamRequest\022?\n\004name\030\001 \001(\tB1\342A\001" - + "\002\372A*\n(analyticsadmin.googleapis.com/Data" - + "Stream\"S\n\022GetAudienceRequest\022=\n\004name\030\001 \001" - + "(\tB/\342A\001\002\372A(\n&analyticsadmin.googleapis.c" - + "om/Audience\"~\n\024ListAudiencesRequest\022?\n\006p" - + "arent\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin.goo" - + "gleapis.com/Audience\022\021\n\tpage_size\030\002 \001(\005\022" - + "\022\n\npage_token\030\003 \001(\t\"m\n\025ListAudiencesResp" - + "onse\022;\n\taudiences\030\001 \003(\0132(.google.analyti" - + "cs.admin.v1alpha.Audience\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\"\232\001\n\025CreateAudienceRequest\022?\n\006" - + "parent\030\001 \001(\tB/\342A\001\002\372A(\022&analyticsadmin.go" - + "ogleapis.com/Audience\022@\n\010audience\030\002 \001(\0132" - + "(.google.analytics.admin.v1alpha.Audienc" - + "eB\004\342A\001\002\"\220\001\n\025UpdateAudienceRequest\022@\n\010aud" - + "ience\030\001 \001(\0132(.google.analytics.admin.v1a" - + "lpha.AudienceB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMaskB\004\342A\001\002\"W\n\026Ar" - + "chiveAudienceRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002" - + "\372A(\022&analyticsadmin.googleapis.com/Audie" - + "nce\"i\n\035GetAttributionSettingsRequest\022H\n\004" - + "name\030\001 \001(\tB:\342A\001\002\372A3\n1analyticsadmin.goog" - + "leapis.com/AttributionSettings\"\262\001\n Updat" - + "eAttributionSettingsRequest\022W\n\024attributi" - + "on_settings\030\001 \001(\01323.google.analytics.adm" - + "in.v1alpha.AttributionSettingsB\004\342A\001\002\0225\n\013" - + "update_mask\030\002 \001(\0132\032.google.protobuf.Fiel" - + "dMaskB\004\342A\001\002\"]\n\027GetAccessBindingRequest\022B" - + "\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+analyticsadmin.go" - + "ogleapis.com/AccessBinding\"\252\001\n\035BatchGetA" + + "\203\001\n\034ListConversionEventsResponse\022J\n\021conv" + + "ersion_events\030\001 \003(\0132/.google.analytics.a" + + "dmin.v1alpha.ConversionEvent\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"}\n\'GetDisplayVideo360Adver" + + "tiserLinkRequest\022R\n\004name\030\001 \001(\tBD\342A\001\002\372A=\n" + + ";analyticsadmin.googleapis.com/DisplayVi" + + "deo360AdvertiserLink\"\250\001\n)ListDisplayVide" + + "o360AdvertiserLinksRequest\022T\n\006parent\030\001 \001" + + "(\tBD\342A\001\002\372A=\022;analyticsadmin.googleapis.c" + + "om/DisplayVideo360AdvertiserLink\022\021\n\tpage" + + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\260\001\n*List" + + "DisplayVideo360AdvertiserLinksResponse\022i" + + "\n\"display_video_360_advertiser_links\030\001 \003" + + "(\0132=.google.analytics.admin.v1alpha.Disp" + + "layVideo360AdvertiserLink\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"\362\001\n*CreateDisplayVideo360Adve" + + "rtiserLinkRequest\022T\n\006parent\030\001 \001(\tBD\342A\001\002\372" + + "A=\022;analyticsadmin.googleapis.com/Displa" + + "yVideo360AdvertiserLink\022n\n!display_video" + + "_360_advertiser_link\030\002 \001(\0132=.google.anal" + + "ytics.admin.v1alpha.DisplayVideo360Adver" + + "tiserLinkB\004\342A\001\002\"\200\001\n*DeleteDisplayVideo36" + + "0AdvertiserLinkRequest\022R\n\004name\030\001 \001(\tBD\342A" + + "\001\002\372A=\n;analyticsadmin.googleapis.com/Dis" + + "playVideo360AdvertiserLink\"\315\001\n*UpdateDis" + + "playVideo360AdvertiserLinkRequest\022h\n!dis" + + "play_video_360_advertiser_link\030\001 \001(\0132=.g" + + "oogle.analytics.admin.v1alpha.DisplayVid" + + "eo360AdvertiserLink\0225\n\013update_mask\030\002 \001(\013" + + "2\032.google.protobuf.FieldMaskB\004\342A\001\002\"\215\001\n/G" + + "etDisplayVideo360AdvertiserLinkProposalR" + + "equest\022Z\n\004name\030\001 \001(\tBL\342A\001\002\372AE\nCanalytics" + + "admin.googleapis.com/DisplayVideo360Adve" + + "rtiserLinkProposal\"\270\001\n1ListDisplayVideo3" + + "60AdvertiserLinkProposalsRequest\022\\\n\006pare" + + "nt\030\001 \001(\tBL\342A\001\002\372AE\022Canalyticsadmin.google" + + "apis.com/DisplayVideo360AdvertiserLinkPr" + + "oposal\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" + + "\003 \001(\t\"\311\001\n2ListDisplayVideo360AdvertiserL" + + "inkProposalsResponse\022z\n+display_video_36" + + "0_advertiser_link_proposals\030\001 \003(\0132E.goog" + + "le.analytics.admin.v1alpha.DisplayVideo3" + + "60AdvertiserLinkProposal\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"\223\002\n2CreateDisplayVideo360Adver" + + "tiserLinkProposalRequest\022\\\n\006parent\030\001 \001(\t" + + "BL\342A\001\002\372AE\022Canalyticsadmin.googleapis.com" + + "/DisplayVideo360AdvertiserLinkProposal\022\177" + + "\n*display_video_360_advertiser_link_prop" + + "osal\030\002 \001(\0132E.google.analytics.admin.v1al" + + "pha.DisplayVideo360AdvertiserLinkProposa" + + "lB\004\342A\001\002\"\220\001\n2DeleteDisplayVideo360Adverti" + + "serLinkProposalRequest\022Z\n\004name\030\001 \001(\tBL\342A" + + "\001\002\372AE\nCanalyticsadmin.googleapis.com/Dis" + + "playVideo360AdvertiserLinkProposal\"\221\001\n3A" + + "pproveDisplayVideo360AdvertiserLinkPropo" + + "salRequest\022Z\n\004name\030\001 \001(\tBL\342A\001\002\372AE\nCanaly" + + "ticsadmin.googleapis.com/DisplayVideo360" + + "AdvertiserLinkProposal\"\240\001\n4ApproveDispla" + + "yVideo360AdvertiserLinkProposalResponse\022" + + "h\n!display_video_360_advertiser_link\030\001 \001" + + "(\0132=.google.analytics.admin.v1alpha.Disp" + + "layVideo360AdvertiserLink\"\220\001\n2CancelDisp" + + "layVideo360AdvertiserLinkProposalRequest" + + "\022Z\n\004name\030\001 \001(\tBL\342A\001\002\372AE\nCanalyticsadmin." + + "googleapis.com/DisplayVideo360Advertiser" + + "LinkProposal\"c\n\032GetSearchAds360LinkReque" + + "st\022E\n\004name\030\001 \001(\tB7\342A\001\002\372A0\n.analyticsadmi" + + "n.googleapis.com/SearchAds360Link\"\216\001\n\034Li" + + "stSearchAds360LinksRequest\022G\n\006parent\030\001 \001" + + "(\tB7\342A\001\002\372A0\022.analyticsadmin.googleapis.c" + + "om/SearchAds360Link\022\021\n\tpage_size\030\002 \001(\005\022\022" + + "\n\npage_token\030\003 \001(\t\"\210\001\n\035ListSearchAds360L" + + "inksResponse\022N\n\024search_ads_360_links\030\001 \003" + + "(\01320.google.analytics.admin.v1alpha.Sear" + + "chAds360Link\022\027\n\017next_page_token\030\002 \001(\t\"\275\001" + + "\n\035CreateSearchAds360LinkRequest\022G\n\006paren" + + "t\030\001 \001(\tB7\342A\001\002\372A0\022.analyticsadmin.googlea" + + "pis.com/SearchAds360Link\022S\n\023search_ads_3" + + "60_link\030\002 \001(\01320.google.analytics.admin.v" + + "1alpha.SearchAds360LinkB\004\342A\001\002\"f\n\035DeleteS" + + "earchAds360LinkRequest\022E\n\004name\030\001 \001(\tB7\342A" + + "\001\002\372A0\n.analyticsadmin.googleapis.com/Sea" + + "rchAds360Link\"\245\001\n\035UpdateSearchAds360Link" + + "Request\022M\n\023search_ads_360_link\030\001 \001(\01320.g" + + "oogle.analytics.admin.v1alpha.SearchAds3" + + "60Link\0225\n\013update_mask\030\002 \001(\0132\032.google.pro" + + "tobuf.FieldMaskB\004\342A\001\002\"\267\001\n\034CreateCustomDi" + + "mensionRequest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022" + + "-analyticsadmin.googleapis.com/CustomDim" + + "ension\022O\n\020custom_dimension\030\002 \001(\0132/.googl" + + "e.analytics.admin.v1alpha.CustomDimensio" + + "nB\004\342A\001\002\"\240\001\n\034UpdateCustomDimensionRequest" + + "\022I\n\020custom_dimension\030\001 \001(\0132/.google.anal" + + "ytics.admin.v1alpha.CustomDimension\0225\n\013u" + + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" + + "MaskB\004\342A\001\002\"\214\001\n\033ListCustomDimensionsReque" + + "st\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analyticsad" + + "min.googleapis.com/CustomDimension\022\021\n\tpa" + + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\203\001\n\034Li" + + "stCustomDimensionsResponse\022J\n\021custom_dim" + + "ensions\030\001 \003(\0132/.google.analytics.admin.v" + + "1alpha.CustomDimension\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\"e\n\035ArchiveCustomDimensionRequest" + + "\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsadmin." + + "googleapis.com/CustomDimension\"a\n\031GetCus" + + "tomDimensionRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372" + + "A/\n-analyticsadmin.googleapis.com/Custom" + + "Dimension\"\253\001\n\031CreateCustomMetricRequest\022" + + "C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*analyticsadmin" + + ".googleapis.com/CustomMetric\022I\n\rcustom_m" + + "etric\030\002 \001(\0132,.google.analytics.admin.v1a" + + "lpha.CustomMetricB\004\342A\001\002\"\227\001\n\031UpdateCustom" + + "MetricRequest\022C\n\rcustom_metric\030\001 \001(\0132,.g" + + "oogle.analytics.admin.v1alpha.CustomMetr" + + "ic\0225\n\013update_mask\030\002 \001(\0132\032.google.protobu" + + "f.FieldMaskB\004\342A\001\002\"\206\001\n\030ListCustomMetricsR" + + "equest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*analyti" + + "csadmin.googleapis.com/CustomMetric\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"z\n\031Li" + + "stCustomMetricsResponse\022D\n\016custom_metric" + + "s\030\001 \003(\0132,.google.analytics.admin.v1alpha" + + ".CustomMetric\022\027\n\017next_page_token\030\002 \001(\t\"_" + + "\n\032ArchiveCustomMetricRequest\022A\n\004name\030\001 \001" + + "(\tB3\342A\001\002\372A,\n*analyticsadmin.googleapis.c" + + "om/CustomMetric\"[\n\026GetCustomMetricReques" + + "t\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*analyticsadmin" + + ".googleapis.com/CustomMetric\"m\n\037GetDataR" + + "etentionSettingsRequest\022J\n\004name\030\001 \001(\tB<\342" + + "A\001\002\372A5\n3analyticsadmin.googleapis.com/Da" + + "taRetentionSettings\"\271\001\n\"UpdateDataRetent" + + "ionSettingsRequest\022\\\n\027data_retention_set" + + "tings\030\001 \001(\01325.google.analytics.admin.v1a" + + "lpha.DataRetentionSettingsB\004\342A\001\002\0225\n\013upda" + + "te_mask\030\002 \001(\0132\032.google.protobuf.FieldMas" + + "kB\004\342A\001\002\"\243\001\n\027CreateDataStreamRequest\022A\n\006p" + + "arent\030\001 \001(\tB1\342A\001\002\372A*\022(analyticsadmin.goo" + + "gleapis.com/DataStream\022E\n\013data_stream\030\002 " + + "\001(\0132*.google.analytics.admin.v1alpha.Dat" + + "aStreamB\004\342A\001\002\"Z\n\027DeleteDataStreamRequest" + + "\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(analyticsadmin." + + "googleapis.com/DataStream\"\221\001\n\027UpdateData" + + "StreamRequest\022?\n\013data_stream\030\001 \001(\0132*.goo" + + "gle.analytics.admin.v1alpha.DataStream\0225" + + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + + "eldMaskB\004\342A\001\002\"\202\001\n\026ListDataStreamsRequest" + + "\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\022(analyticsadmi" + + "n.googleapis.com/DataStream\022\021\n\tpage_size" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"t\n\027ListDataSt" + + "reamsResponse\022@\n\014data_streams\030\001 \003(\0132*.go" + + "ogle.analytics.admin.v1alpha.DataStream\022" + + "\027\n\017next_page_token\030\002 \001(\t\"W\n\024GetDataStrea" + + "mRequest\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(analyti" + + "csadmin.googleapis.com/DataStream\"S\n\022Get" + + "AudienceRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&" + + "analyticsadmin.googleapis.com/Audience\"~" + + "\n\024ListAudiencesRequest\022?\n\006parent\030\001 \001(\tB/" + + "\342A\001\002\372A(\022&analyticsadmin.googleapis.com/A" + + "udience\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\"m\n\025ListAudiencesResponse\022;\n\taudie" + + "nces\030\001 \003(\0132(.google.analytics.admin.v1al" + + "pha.Audience\022\027\n\017next_page_token\030\002 \001(\t\"\232\001" + + "\n\025CreateAudienceRequest\022?\n\006parent\030\001 \001(\tB" + + "/\342A\001\002\372A(\022&analyticsadmin.googleapis.com/" + + "Audience\022@\n\010audience\030\002 \001(\0132(.google.anal" + + "ytics.admin.v1alpha.AudienceB\004\342A\001\002\"\220\001\n\025U" + + "pdateAudienceRequest\022@\n\010audience\030\001 \001(\0132(" + + ".google.analytics.admin.v1alpha.Audience" + + "B\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.pro" + + "tobuf.FieldMaskB\004\342A\001\002\"W\n\026ArchiveAudience" + + "Request\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\022&analytic" + + "sadmin.googleapis.com/Audience\"i\n\035GetAtt" + + "ributionSettingsRequest\022H\n\004name\030\001 \001(\tB:\342" + + "A\001\002\372A3\n1analyticsadmin.googleapis.com/At" + + "tributionSettings\"\262\001\n UpdateAttributionS" + + "ettingsRequest\022W\n\024attribution_settings\030\001" + + " \001(\01323.google.analytics.admin.v1alpha.At" + + "tributionSettingsB\004\342A\001\002\0225\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\"]" + + "\n\027GetAccessBindingRequest\022B\n\004name\030\001 \001(\tB" + + "4\342A\001\002\372A-\n+analyticsadmin.googleapis.com/" + + "AccessBinding\"\252\001\n\035BatchGetAccessBindings" + + "Request\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\022+analyt" + + "icsadmin.googleapis.com/AccessBinding\022C\n" + + "\005names\030\002 \003(\tB4\342A\001\002\372A-\n+analyticsadmin.go" + + "ogleapis.com/AccessBinding\"h\n\036BatchGetAc" + + "cessBindingsResponse\022F\n\017access_bindings\030" + + "\001 \003(\0132-.google.analytics.admin.v1alpha.A", + "ccessBinding\"\210\001\n\031ListAccessBindingsReque" + + "st\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\022+analyticsad" + + "min.googleapis.com/AccessBinding\022\021\n\tpage" + + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"}\n\032ListA" + + "ccessBindingsResponse\022F\n\017access_bindings" + + "\030\001 \003(\0132-.google.analytics.admin.v1alpha." + + "AccessBinding\022\027\n\017next_page_token\030\002 \001(\t\"\257" + + "\001\n\032CreateAccessBindingRequest\022D\n\006parent\030" + + "\001 \001(\tB4\342A\001\002\372A-\022+analyticsadmin.googleapi" + + "s.com/AccessBinding\022K\n\016access_binding\030\002 " + + "\001(\0132-.google.analytics.admin.v1alpha.Acc" + + "essBindingB\004\342A\001\002\"\274\001\n BatchCreateAccessBi" + + "ndingsRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\022+" + + "analyticsadmin.googleapis.com/AccessBind" + + "ing\022R\n\010requests\030\003 \003(\0132:.google.analytics" + + ".admin.v1alpha.CreateAccessBindingReques" + + "tB\004\342A\001\002\"k\n!BatchCreateAccessBindingsResp" + + "onse\022F\n\017access_bindings\030\001 \003(\0132-.google.a" + + "nalytics.admin.v1alpha.AccessBinding\"i\n\032" + + "UpdateAccessBindingRequest\022K\n\016access_bin" + + "ding\030\001 \001(\0132-.google.analytics.admin.v1al" + + "pha.AccessBindingB\004\342A\001\002\"\274\001\n BatchUpdateA" + "ccessBindingsRequest\022D\n\006parent\030\001 \001(\tB4\342A" + "\001\002\372A-\022+analyticsadmin.googleapis.com/Acc" - + "essBinding\022C\n\005names\030\002 \003(\tB4\342A\001\002\372A-\n+anal" - + "yticsadmin.googleapis.com/AccessBinding\"" - + "h\n\036BatchGetAccessBindingsResponse\022F\n\017acc" - + "ess_bindings\030\001 \003(\0132-.google.analytics.ad" - + "min.v1alpha.AccessBinding\"\210\001\n\031ListAccess" - + "BindingsRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-" - + "\022+analyticsadmin.googleapis.com/AccessBi" - + "nding\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\"}\n\032ListAccessBindingsResponse\022F\n\017ac" - + "cess_bindings\030\001 \003(\0132-.google.analytics.a" - + "dmin.v1alpha.AccessBinding\022\027\n\017next_page_" - + "token\030\002 \001(\t\"\257\001\n\032CreateAccessBindingReque" - + "st\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\022+analyticsad" - + "min.googleapis.com/AccessBinding\022K\n\016acce" - + "ss_binding\030\002 \001(\0132-.google.analytics.admi" - + "n.v1alpha.AccessBindingB\004\342A\001\002\"\274\001\n BatchC" - + "reateAccessBindingsRequest\022D\n\006parent\030\001 \001" - + "(\tB4\342A\001\002\372A-\022+analyticsadmin.googleapis.c" - + "om/AccessBinding\022R\n\010requests\030\003 \003(\0132:.goo" - + "gle.analytics.admin.v1alpha.CreateAccess" - + "BindingRequestB\004\342A\001\002\"k\n!BatchCreateAcces" - + "sBindingsResponse\022F\n\017access_bindings\030\001 \003" - + "(\0132-.google.analytics.admin.v1alpha.Acce" - + "ssBinding\"i\n\032UpdateAccessBindingRequest\022" - + "K\n\016access_binding\030\001 \001(\0132-.google.analyti" - + "cs.admin.v1alpha.AccessBindingB\004\342A\001\002\"\274\001\n" - + " BatchUpdateAccessBindingsRequest\022D\n\006par" - + "ent\030\001 \001(\tB4\342A\001\002\372A-\022+analyticsadmin.googl" - + "eapis.com/AccessBinding\022R\n\010requests\030\002 \003(" - + "\0132:.google.analytics.admin.v1alpha.Updat" - + "eAccessBindingRequestB\004\342A\001\002\"k\n!BatchUpda" - + "teAccessBindingsResponse\022F\n\017access_bindi" - + "ngs\030\001 \003(\0132-.google.analytics.admin.v1alp" - + "ha.AccessBinding\"`\n\032DeleteAccessBindingR" - + "equest\022B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+analytics" - + "admin.googleapis.com/AccessBinding\"\274\001\n B" - + "atchDeleteAccessBindingsRequest\022D\n\006paren" - + "t\030\001 \001(\tB4\342A\001\002\372A-\022+analyticsadmin.googlea" - + "pis.com/AccessBinding\022R\n\010requests\030\002 \003(\0132" - + ":.google.analytics.admin.v1alpha.DeleteA" - + "ccessBindingRequestB\004\342A\001\002\"\270\001\n\034CreateExpa" - + "ndedDataSetRequest\022F\n\006parent\030\001 \001(\tB6\342A\001\002" - + "\372A/\022-analyticsadmin.googleapis.com/Expan" - + "dedDataSet\022P\n\021expanded_data_set\030\002 \001(\0132/." - + "google.analytics.admin.v1alpha.ExpandedD" - + "ataSetB\004\342A\001\002\"\247\001\n\034UpdateExpandedDataSetRe" - + "quest\022P\n\021expanded_data_set\030\001 \001(\0132/.googl" - + "e.analytics.admin.v1alpha.ExpandedDataSe" - + "tB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.pr" - + "otobuf.FieldMaskB\004\342A\001\002\"d\n\034DeleteExpanded" - + "DataSetRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-a" - + "nalyticsadmin.googleapis.com/ExpandedDat" - + "aSet\"a\n\031GetExpandedDataSetRequest\022D\n\004nam" - + "e\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsadmin.googlea" - + "pis.com/ExpandedDataSet\"\214\001\n\033ListExpanded" - + "DataSetsRequest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/" - + "\022-analyticsadmin.googleapis.com/Expanded" - + "DataSet\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" - + "\030\003 \001(\t\"\204\001\n\034ListExpandedDataSetsResponse\022" - + "K\n\022expanded_data_sets\030\001 \003(\0132/.google.ana" - + "lytics.admin.v1alpha.ExpandedDataSet\022\027\n\017" - + "next_page_token\030\002 \001(\t\"\253\001\n\031CreateChannelG" - + "roupRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*an" - + "alyticsadmin.googleapis.com/ChannelGroup" - + "\022I\n\rchannel_group\030\002 \001(\0132,.google.analyti" - + "cs.admin.v1alpha.ChannelGroupB\004\342A\001\002\"\235\001\n\031" - + "UpdateChannelGroupRequest\022I\n\rchannel_gro" - + "up\030\001 \001(\0132,.google.analytics.admin.v1alph" - + "a.ChannelGroupB\004\342A\001\002\0225\n\013update_mask\030\002 \001(" - + "\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\"^\n\031D" - + "eleteChannelGroupRequest\022A\n\004name\030\001 \001(\tB3" + + "essBinding\022R\n\010requests\030\002 \003(\0132:.google.an" + + "alytics.admin.v1alpha.UpdateAccessBindin" + + "gRequestB\004\342A\001\002\"k\n!BatchUpdateAccessBindi" + + "ngsResponse\022F\n\017access_bindings\030\001 \003(\0132-.g" + + "oogle.analytics.admin.v1alpha.AccessBind" + + "ing\"`\n\032DeleteAccessBindingRequest\022B\n\004nam" + + "e\030\001 \001(\tB4\342A\001\002\372A-\n+analyticsadmin.googlea" + + "pis.com/AccessBinding\"\274\001\n BatchDeleteAcc" + + "essBindingsRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002" + + "\372A-\022+analyticsadmin.googleapis.com/Acces" + + "sBinding\022R\n\010requests\030\002 \003(\0132:.google.anal" + + "ytics.admin.v1alpha.DeleteAccessBindingR" + + "equestB\004\342A\001\002\"\270\001\n\034CreateExpandedDataSetRe" + + "quest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analytic" + + "sadmin.googleapis.com/ExpandedDataSet\022P\n" + + "\021expanded_data_set\030\002 \001(\0132/.google.analyt" + + "ics.admin.v1alpha.ExpandedDataSetB\004\342A\001\002\"" + + "\247\001\n\034UpdateExpandedDataSetRequest\022P\n\021expa" + + "nded_data_set\030\001 \001(\0132/.google.analytics.a" + + "dmin.v1alpha.ExpandedDataSetB\004\342A\001\002\0225\n\013up" + + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + + "askB\004\342A\001\002\"d\n\034DeleteExpandedDataSetReques" + + "t\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsadmin" + + ".googleapis.com/ExpandedDataSet\"a\n\031GetEx" + + "pandedDataSetRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002" + + "\372A/\n-analyticsadmin.googleapis.com/Expan" + + "dedDataSet\"\214\001\n\033ListExpandedDataSetsReque" + + "st\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analyticsad" + + "min.googleapis.com/ExpandedDataSet\022\021\n\tpa" + + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\204\001\n\034Li" + + "stExpandedDataSetsResponse\022K\n\022expanded_d" + + "ata_sets\030\001 \003(\0132/.google.analytics.admin." + + "v1alpha.ExpandedDataSet\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"\253\001\n\031CreateChannelGroupRequest\022C" + + "\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*analyticsadmin." + + "googleapis.com/ChannelGroup\022I\n\rchannel_g" + + "roup\030\002 \001(\0132,.google.analytics.admin.v1al" + + "pha.ChannelGroupB\004\342A\001\002\"\235\001\n\031UpdateChannel" + + "GroupRequest\022I\n\rchannel_group\030\001 \001(\0132,.go" + + "ogle.analytics.admin.v1alpha.ChannelGrou" + + "pB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\004\342A\001\002\"^\n\031DeleteChannelG" + + "roupRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*anal" + + "yticsadmin.googleapis.com/ChannelGroup\"[" + + "\n\026GetChannelGroupRequest\022A\n\004name\030\001 \001(\tB3" + "\342A\001\002\372A,\n*analyticsadmin.googleapis.com/C" - + "hannelGroup\"[\n\026GetChannelGroupRequest\022A\n" - + "\004name\030\001 \001(\tB3\342A\001\002\372A,\n*analyticsadmin.goo" - + "gleapis.com/ChannelGroup\"\206\001\n\030ListChannel" - + "GroupsRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*" - + "analyticsadmin.googleapis.com/ChannelGro" - + "up\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\"z\n\031ListChannelGroupsResponse\022D\n\016channe" - + "l_groups\030\001 \003(\0132,.google.analytics.admin." - + "v1alpha.ChannelGroup\022\027\n\017next_page_token\030" - + "\002 \001(\t\"T\n)SetAutomatedGa4ConfigurationOpt" - + "OutRequest\022\026\n\010property\030\001 \001(\tB\004\342A\001\002\022\017\n\007op" - + "t_out\030\002 \001(\010\",\n*SetAutomatedGa4Configurat" - + "ionOptOutResponse\"E\n+FetchAutomatedGa4Co" - + "nfigurationOptOutRequest\022\026\n\010property\030\001 \001" - + "(\tB\004\342A\001\002\"?\n,FetchAutomatedGa4Configurati" - + "onOptOutResponse\022\017\n\007opt_out\030\001 \001(\010\"[\n\026Get" - + "BigQueryLinkRequest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372" - + "A,\n*analyticsadmin.googleapis.com/BigQue" - + "ryLink\"\206\001\n\030ListBigQueryLinksRequest\022C\n\006p" - + "arent\030\001 \001(\tB3\342A\001\002\372A,\022*analyticsadmin.goo" - + "gleapis.com/BigQueryLink\022\021\n\tpage_size\030\002 " - + "\001(\005\022\022\n\npage_token\030\003 \001(\t\"z\n\031ListBigQueryL" - + "inksResponse\022D\n\016bigquery_links\030\001 \003(\0132,.g" - + "oogle.analytics.admin.v1alpha.BigQueryLi" - + "nk\022\027\n\017next_page_token\030\002 \001(\t\"y\n%GetEnhanc" - + "edMeasurementSettingsRequest\022P\n\004name\030\001 \001" - + "(\tBB\342A\001\002\372A;\n9analyticsadmin.googleapis.c" - + "om/EnhancedMeasurementSettings\"\313\001\n(Updat" - + "eEnhancedMeasurementSettingsRequest\022h\n\035e" - + "nhanced_measurement_settings\030\001 \001(\0132;.goo" - + "gle.analytics.admin.v1alpha.EnhancedMeas" - + "urementSettingsB\004\342A\001\002\0225\n\013update_mask\030\002 \001" - + "(\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\"\205\001\n" - + "\035CreateConnectedSiteTagRequest\022\020\n\010proper" - + "ty\030\001 \001(\t\022R\n\022connected_site_tag\030\002 \001(\01320.g" - + "oogle.analytics.admin.v1alpha.ConnectedS" - + "iteTagB\004\342A\001\002\" \n\036CreateConnectedSiteTagRe" - + "sponse\"A\n\035DeleteConnectedSiteTagRequest\022" - + "\020\n\010property\030\001 \001(\t\022\016\n\006tag_id\030\002 \001(\t\"0\n\034Lis" - + "tConnectedSiteTagsRequest\022\020\n\010property\030\001 " - + "\001(\t\"n\n\035ListConnectedSiteTagsResponse\022M\n\023" - + "connected_site_tags\030\001 \003(\01320.google.analy" - + "tics.admin.v1alpha.ConnectedSiteTag\"\247\001\n\030" - + "CreateAdSenseLinkRequest\022B\n\006parent\030\001 \001(\t" + + "hannelGroup\"\206\001\n\030ListChannelGroupsRequest" + + "\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\022*analyticsadmi" + + "n.googleapis.com/ChannelGroup\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"z\n\031ListChan" + + "nelGroupsResponse\022D\n\016channel_groups\030\001 \003(" + + "\0132,.google.analytics.admin.v1alpha.Chann" + + "elGroup\022\027\n\017next_page_token\030\002 \001(\t\"T\n)SetA" + + "utomatedGa4ConfigurationOptOutRequest\022\026\n" + + "\010property\030\001 \001(\tB\004\342A\001\002\022\017\n\007opt_out\030\002 \001(\010\"," + + "\n*SetAutomatedGa4ConfigurationOptOutResp" + + "onse\"E\n+FetchAutomatedGa4ConfigurationOp" + + "tOutRequest\022\026\n\010property\030\001 \001(\tB\004\342A\001\002\"?\n,F" + + "etchAutomatedGa4ConfigurationOptOutRespo" + + "nse\022\017\n\007opt_out\030\001 \001(\010\"[\n\026GetBigQueryLinkR" + + "equest\022A\n\004name\030\001 \001(\tB3\342A\001\002\372A,\n*analytics" + + "admin.googleapis.com/BigQueryLink\"\206\001\n\030Li" + + "stBigQueryLinksRequest\022C\n\006parent\030\001 \001(\tB3" + + "\342A\001\002\372A,\022*analyticsadmin.googleapis.com/B" + + "igQueryLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" + + "oken\030\003 \001(\t\"z\n\031ListBigQueryLinksResponse\022" + + "D\n\016bigquery_links\030\001 \003(\0132,.google.analyti" + + "cs.admin.v1alpha.BigQueryLink\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\"y\n%GetEnhancedMeasurement" + + "SettingsRequest\022P\n\004name\030\001 \001(\tBB\342A\001\002\372A;\n9" + + "analyticsadmin.googleapis.com/EnhancedMe" + + "asurementSettings\"\313\001\n(UpdateEnhancedMeas" + + "urementSettingsRequest\022h\n\035enhanced_measu" + + "rement_settings\030\001 \001(\0132;.google.analytics" + + ".admin.v1alpha.EnhancedMeasurementSettin" + + "gsB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google.p" + + "rotobuf.FieldMaskB\004\342A\001\002\"m\n\037GetDataRedact" + + "ionSettingsRequest\022J\n\004name\030\001 \001(\tB<\342A\001\002\372A" + + "5\n3analyticsadmin.googleapis.com/DataRed" + + "actionSettings\"\271\001\n\"UpdateDataRedactionSe" + + "ttingsRequest\022\\\n\027data_redaction_settings" + + "\030\001 \001(\01325.google.analytics.admin.v1alpha." + + "DataRedactionSettingsB\004\342A\001\002\0225\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMaskB\004\342A" + + "\001\002\"\205\001\n\035CreateConnectedSiteTagRequest\022\020\n\010" + + "property\030\001 \001(\t\022R\n\022connected_site_tag\030\002 \001" + + "(\01320.google.analytics.admin.v1alpha.Conn" + + "ectedSiteTagB\004\342A\001\002\" \n\036CreateConnectedSit" + + "eTagResponse\"A\n\035DeleteConnectedSiteTagRe" + + "quest\022\020\n\010property\030\001 \001(\t\022\016\n\006tag_id\030\002 \001(\t\"" + + "0\n\034ListConnectedSiteTagsRequest\022\020\n\010prope" + + "rty\030\001 \001(\t\"n\n\035ListConnectedSiteTagsRespon" + + "se\022M\n\023connected_site_tags\030\001 \003(\01320.google" + + ".analytics.admin.v1alpha.ConnectedSiteTa" + + "g\"\247\001\n\030CreateAdSenseLinkRequest\022B\n\006parent" + + "\030\001 \001(\tB2\342A\001\002\372A+\022)analyticsadmin.googleap" + + "is.com/AdSenseLink\022G\n\014adsense_link\030\002 \001(\013" + + "2+.google.analytics.admin.v1alpha.AdSens" + + "eLinkB\004\342A\001\002\"Y\n\025GetAdSenseLinkRequest\022@\n\004" + + "name\030\001 \001(\tB2\342A\001\002\372A+\n)analyticsadmin.goog" + + "leapis.com/AdSenseLink\"\\\n\030DeleteAdSenseL" + + "inkRequest\022@\n\004name\030\001 \001(\tB2\342A\001\002\372A+\n)analy" + + "ticsadmin.googleapis.com/AdSenseLink\"\204\001\n" + + "\027ListAdSenseLinksRequest\022B\n\006parent\030\001 \001(\t" + "B2\342A\001\002\372A+\022)analyticsadmin.googleapis.com" - + "/AdSenseLink\022G\n\014adsense_link\030\002 \001(\0132+.goo" - + "gle.analytics.admin.v1alpha.AdSenseLinkB" - + "\004\342A\001\002\"Y\n\025GetAdSenseLinkRequest\022@\n\004name\030\001" - + " \001(\tB2\342A\001\002\372A+\n)analyticsadmin.googleapis" - + ".com/AdSenseLink\"\\\n\030DeleteAdSenseLinkReq" - + "uest\022@\n\004name\030\001 \001(\tB2\342A\001\002\372A+\n)analyticsad" - + "min.googleapis.com/AdSenseLink\"\204\001\n\027ListA" - + "dSenseLinksRequest\022B\n\006parent\030\001 \001(\tB2\342A\001\002" - + "\372A+\022)analyticsadmin.googleapis.com/AdSen" - + "seLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" - + "\003 \001(\t\"w\n\030ListAdSenseLinksResponse\022B\n\rads" - + "ense_links\030\001 \003(\0132+.google.analytics.admi" - + "n.v1alpha.AdSenseLink\022\027\n\017next_page_token" - + "\030\002 \001(\t\"e\n FetchConnectedGa4PropertyReque" - + "st\022A\n\010property\030\001 \001(\tB/\342A\001\002\372A(\n&analytics" - + "admin.googleapis.com/Property\"b\n!FetchCo" - + "nnectedGa4PropertyResponse\022=\n\010property\030\001" - + " \001(\tB+\372A(\n&analyticsadmin.googleapis.com" - + "/Property\"\270\001\n\034CreateEventCreateRuleReque" - + "st\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analyticsad" - + "min.googleapis.com/EventCreateRule\022P\n\021ev" - + "ent_create_rule\030\002 \001(\0132/.google.analytics" - + ".admin.v1alpha.EventCreateRuleB\004\342A\001\002\"\247\001\n" - + "\034UpdateEventCreateRuleRequest\022P\n\021event_c" - + "reate_rule\030\001 \001(\0132/.google.analytics.admi" - + "n.v1alpha.EventCreateRuleB\004\342A\001\002\0225\n\013updat" - + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" - + "B\004\342A\001\002\"d\n\034DeleteEventCreateRuleRequest\022D" - + "\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsadmin.go" - + "ogleapis.com/EventCreateRule\"a\n\031GetEvent" - + "CreateRuleRequest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/" - + "\n-analyticsadmin.googleapis.com/EventCre" - + "ateRule\"\214\001\n\033ListEventCreateRulesRequest\022" - + "F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analyticsadmin" - + ".googleapis.com/EventCreateRule\022\021\n\tpage_" - + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\204\001\n\034ListE" - + "ventCreateRulesResponse\022K\n\022event_create_" - + "rules\030\001 \003(\0132/.google.analytics.admin.v1a" - + "lpha.EventCreateRule\022\027\n\017next_page_token\030" - + "\002 \001(\t2\374\350\001\n\025AnalyticsAdminService\022\223\001\n\nGet" - + "Account\0221.google.analytics.admin.v1alpha" - + ".GetAccountRequest\032\'.google.analytics.ad" - + "min.v1alpha.Account\")\332A\004name\202\323\344\223\002\034\022\032/v1a" - + "lpha/{name=accounts/*}\022\224\001\n\014ListAccounts\022" - + "3.google.analytics.admin.v1alpha.ListAcc" - + "ountsRequest\0324.google.analytics.admin.v1" - + "alpha.ListAccountsResponse\"\031\202\323\344\223\002\023\022\021/v1a" - + "lpha/accounts\022\210\001\n\rDeleteAccount\0224.google" - + ".analytics.admin.v1alpha.DeleteAccountRe" - + "quest\032\026.google.protobuf.Empty\")\332A\004name\202\323" - + "\344\223\002\034*\032/v1alpha/{name=accounts/*}\022\271\001\n\rUpd" - + "ateAccount\0224.google.analytics.admin.v1al" - + "pha.UpdateAccountRequest\032\'.google.analyt" - + "ics.admin.v1alpha.Account\"I\332A\023account,up" - + "date_mask\202\323\344\223\002-2\"/v1alpha/{account.name=" - + "accounts/*}:\007account\022\314\001\n\026ProvisionAccoun" - + "tTicket\022=.google.analytics.admin.v1alpha" - + ".ProvisionAccountTicketRequest\032>.google." - + "analytics.admin.v1alpha.ProvisionAccount" - + "TicketResponse\"3\202\323\344\223\002-\"(/v1alpha/account" - + "s:provisionAccountTicket:\001*\022\264\001\n\024ListAcco" - + "untSummaries\022;.google.analytics.admin.v1" - + "alpha.ListAccountSummariesRequest\032<.goog" - + "le.analytics.admin.v1alpha.ListAccountSu" - + "mmariesResponse\"!\202\323\344\223\002\033\022\031/v1alpha/accoun" - + "tSummaries\022\230\001\n\013GetProperty\0222.google.anal" - + "ytics.admin.v1alpha.GetPropertyRequest\032(" - + ".google.analytics.admin.v1alpha.Property" - + "\"+\332A\004name\202\323\344\223\002\036\022\034/v1alpha/{name=properti" - + "es/*}\022\234\001\n\016ListProperties\0225.google.analyt" - + "ics.admin.v1alpha.ListPropertiesRequest\032" - + "6.google.analytics.admin.v1alpha.ListPro" - + "pertiesResponse\"\033\202\323\344\223\002\025\022\023/v1alpha/proper" - + "ties\022\243\001\n\016CreateProperty\0225.google.analyti" - + "cs.admin.v1alpha.CreatePropertyRequest\032(" - + ".google.analytics.admin.v1alpha.Property" - + "\"0\332A\010property\202\323\344\223\002\037\"\023/v1alpha/properties" - + ":\010property\022\236\001\n\016DeleteProperty\0225.google.a" - + "nalytics.admin.v1alpha.DeletePropertyReq" - + "uest\032(.google.analytics.admin.v1alpha.Pr" - + "operty\"+\332A\004name\202\323\344\223\002\036*\034/v1alpha/{name=pr" - + "operties/*}\022\301\001\n\016UpdateProperty\0225.google." - + "analytics.admin.v1alpha.UpdatePropertyRe" - + "quest\032(.google.analytics.admin.v1alpha.P" - + "roperty\"N\332A\024property,update_mask\202\323\344\223\00212%" - + "/v1alpha/{property.name=properties/*}:\010p" - + "roperty\022\316\001\n\013GetUserLink\0222.google.analyti" - + "cs.admin.v1alpha.GetUserLinkRequest\032(.go" - + "ogle.analytics.admin.v1alpha.UserLink\"a\332" - + "A\004name\202\323\344\223\002T\022&/v1alpha/{name=accounts/*/" - + "userLinks/*}Z*\022(/v1alpha/{name=propertie" - + "s/*/userLinks/*}\022\366\001\n\021BatchGetUserLinks\0228" - + ".google.analytics.admin.v1alpha.BatchGet" - + "UserLinksRequest\0329.google.analytics.admi" - + "n.v1alpha.BatchGetUserLinksResponse\"l\202\323\344" - + "\223\002f\022//v1alpha/{parent=accounts/*}/userLi" - + "nks:batchGetZ3\0221/v1alpha/{parent=propert" - + "ies/*}/userLinks:batchGet\022\341\001\n\rListUserLi" - + "nks\0224.google.analytics.admin.v1alpha.Lis" - + "tUserLinksRequest\0325.google.analytics.adm" - + "in.v1alpha.ListUserLinksResponse\"c\332A\006par" - + "ent\202\323\344\223\002T\022&/v1alpha/{parent=accounts/*}/" - + "userLinksZ*\022(/v1alpha/{parent=properties" - + "/*}/userLinks\022\355\001\n\016AuditUserLinks\0225.googl" - + "e.analytics.admin.v1alpha.AuditUserLinks" - + "Request\0326.google.analytics.admin.v1alpha" - + ".AuditUserLinksResponse\"l\202\323\344\223\002f\",/v1alph" - + "a/{parent=accounts/*}/userLinks:audit:\001*" - + "Z3\"./v1alpha/{parent=properties/*}/userL" - + "inks:audit:\001*\022\367\001\n\016CreateUserLink\0225.googl" - + "e.analytics.admin.v1alpha.CreateUserLink" - + "Request\032(.google.analytics.admin.v1alpha" - + ".UserLink\"\203\001\332A\020parent,user_link\202\323\344\223\002j\"&/" - + "v1alpha/{parent=accounts/*}/userLinks:\tu" - + "ser_linkZ5\"(/v1alpha/{parent=properties/" - + "*}/userLinks:\tuser_link\022\213\002\n\024BatchCreateU" - + "serLinks\022;.google.analytics.admin.v1alph" - + "a.BatchCreateUserLinksRequest\032<.google.a" - + "nalytics.admin.v1alpha.BatchCreateUserLi" - + "nksResponse\"x\202\323\344\223\002r\"2/v1alpha/{parent=ac" - + "counts/*}/userLinks:batchCreate:\001*Z9\"4/v" - + "1alpha/{parent=properties/*}/userLinks:b" - + "atchCreate:\001*\022\204\002\n\016UpdateUserLink\0225.googl" - + "e.analytics.admin.v1alpha.UpdateUserLink" - + "Request\032(.google.analytics.admin.v1alpha" - + ".UserLink\"\220\001\332A\tuser_link\202\323\344\223\002~20/v1alpha" - + "/{user_link.name=accounts/*/userLinks/*}" - + ":\tuser_linkZ?22/v1alpha/{user_link.name=" - + "properties/*/userLinks/*}:\tuser_link\022\213\002\n" - + "\024BatchUpdateUserLinks\022;.google.analytics" - + ".admin.v1alpha.BatchUpdateUserLinksReque" - + "st\032<.google.analytics.admin.v1alpha.Batc" - + "hUpdateUserLinksResponse\"x\202\323\344\223\002r\"2/v1alp" - + "ha/{parent=accounts/*}/userLinks:batchUp" - + "date:\001*Z9\"4/v1alpha/{parent=properties/*" - + "}/userLinks:batchUpdate:\001*\022\302\001\n\016DeleteUse" - + "rLink\0225.google.analytics.admin.v1alpha.D" - + "eleteUserLinkRequest\032\026.google.protobuf.E" - + "mpty\"a\332A\004name\202\323\344\223\002T*&/v1alpha/{name=acco" - + "unts/*/userLinks/*}Z**(/v1alpha/{name=pr" - + "operties/*/userLinks/*}\022\345\001\n\024BatchDeleteU" - + "serLinks\022;.google.analytics.admin.v1alph" - + "a.BatchDeleteUserLinksRequest\032\026.google.p" - + "rotobuf.Empty\"x\202\323\344\223\002r\"2/v1alpha/{parent=" - + "accounts/*}/userLinks:batchDelete:\001*Z9\"4" - + "/v1alpha/{parent=properties/*}/userLinks" - + ":batchDelete:\001*\022\331\001\n\022CreateFirebaseLink\0229" - + ".google.analytics.admin.v1alpha.CreateFi" - + "rebaseLinkRequest\032,.google.analytics.adm" - + "in.v1alpha.FirebaseLink\"Z\332A\024parent,fireb" - + "ase_link\202\323\344\223\002=\",/v1alpha/{parent=propert" - + "ies/*}/firebaseLinks:\rfirebase_link\022\244\001\n\022" - + "DeleteFirebaseLink\0229.google.analytics.ad" - + "min.v1alpha.DeleteFirebaseLinkRequest\032\026." - + "google.protobuf.Empty\";\332A\004name\202\323\344\223\002.*,/v" - + "1alpha/{name=properties/*/firebaseLinks/" - + "*}\022\307\001\n\021ListFirebaseLinks\0228.google.analyt" - + "ics.admin.v1alpha.ListFirebaseLinksReque" - + "st\0329.google.analytics.admin.v1alpha.List" - + "FirebaseLinksResponse\"=\332A\006parent\202\323\344\223\002.\022," - + "/v1alpha/{parent=properties/*}/firebaseL" - + "inks\022\303\001\n\020GetGlobalSiteTag\0227.google.analy" - + "tics.admin.v1alpha.GetGlobalSiteTagReque" - + "st\032-.google.analytics.admin.v1alpha.Glob" - + "alSiteTag\"G\332A\004name\202\323\344\223\002:\0228/v1alpha/{name" - + "=properties/*/dataStreams/*/globalSiteTa" - + "g}\022\341\001\n\023CreateGoogleAdsLink\022:.google.anal" - + "ytics.admin.v1alpha.CreateGoogleAdsLinkR" - + "equest\032-.google.analytics.admin.v1alpha." - + "GoogleAdsLink\"_\332A\026parent,google_ads_link" - + "\202\323\344\223\002@\"-/v1alpha/{parent=properties/*}/g" - + "oogleAdsLinks:\017google_ads_link\022\366\001\n\023Updat" - + "eGoogleAdsLink\022:.google.analytics.admin." - + "v1alpha.UpdateGoogleAdsLinkRequest\032-.goo" - + "gle.analytics.admin.v1alpha.GoogleAdsLin" - + "k\"t\332A\033google_ads_link,update_mask\202\323\344\223\002P2" - + "=/v1alpha/{google_ads_link.name=properti" - + "es/*/googleAdsLinks/*}:\017google_ads_link\022" - + "\247\001\n\023DeleteGoogleAdsLink\022:.google.analyti" - + "cs.admin.v1alpha.DeleteGoogleAdsLinkRequ" - + "est\032\026.google.protobuf.Empty\"<\332A\004name\202\323\344\223" - + "\002/*-/v1alpha/{name=properties/*/googleAd" - + "sLinks/*}\022\313\001\n\022ListGoogleAdsLinks\0229.googl" - + "e.analytics.admin.v1alpha.ListGoogleAdsL" - + "inksRequest\032:.google.analytics.admin.v1a" - + "lpha.ListGoogleAdsLinksResponse\">\332A\006pare" - + "nt\202\323\344\223\002/\022-/v1alpha/{parent=properties/*}" - + "/googleAdsLinks\022\313\001\n\026GetDataSharingSettin" - + "gs\022=.google.analytics.admin.v1alpha.GetD" - + "ataSharingSettingsRequest\0323.google.analy" - + "tics.admin.v1alpha.DataSharingSettings\"=" - + "\332A\004name\202\323\344\223\0020\022./v1alpha/{name=accounts/*" - + "/dataSharingSettings}\022\366\001\n\034GetMeasurement" - + "ProtocolSecret\022C.google.analytics.admin." - + "v1alpha.GetMeasurementProtocolSecretRequ" - + "est\0329.google.analytics.admin.v1alpha.Mea" - + "surementProtocolSecret\"V\332A\004name\202\323\344\223\002I\022G/" - + "v1alpha/{name=properties/*/dataStreams/*" - + "/measurementProtocolSecrets/*}\022\211\002\n\036ListM" - + "easurementProtocolSecrets\022E.google.analy" - + "tics.admin.v1alpha.ListMeasurementProtoc" - + "olSecretsRequest\032F.google.analytics.admi" - + "n.v1alpha.ListMeasurementProtocolSecrets" - + "Response\"X\332A\006parent\202\323\344\223\002I\022G/v1alpha/{par" - + "ent=properties/*/dataStreams/*}/measurem" - + "entProtocolSecrets\022\270\002\n\037CreateMeasurement" - + "ProtocolSecret\022F.google.analytics.admin." - + "v1alpha.CreateMeasurementProtocolSecretR" - + "equest\0329.google.analytics.admin.v1alpha." - + "MeasurementProtocolSecret\"\221\001\332A\"parent,me" - + "asurement_protocol_secret\202\323\344\223\002f\"G/v1alph" - + "a/{parent=properties/*/dataStreams/*}/me" - + "asurementProtocolSecrets:\033measurement_pr" - + "otocol_secret\022\331\001\n\037DeleteMeasurementProto" - + "colSecret\022F.google.analytics.admin.v1alp" - + "ha.DeleteMeasurementProtocolSecretReques" - + "t\032\026.google.protobuf.Empty\"V\332A\004name\202\323\344\223\002I" - + "*G/v1alpha/{name=properties/*/dataStream" - + "s/*/measurementProtocolSecrets/*}\022\332\002\n\037Up" - + "dateMeasurementProtocolSecret\022F.google.a" - + "nalytics.admin.v1alpha.UpdateMeasurement" - + "ProtocolSecretRequest\0329.google.analytics" - + ".admin.v1alpha.MeasurementProtocolSecret" - + "\"\263\001\332A\'measurement_protocol_secret,update" - + "_mask\202\323\344\223\002\202\0012c/v1alpha/{measurement_prot" - + "ocol_secret.name=properties/*/dataStream" - + "s/*/measurementProtocolSecrets/*}:\033measu" - + "rement_protocol_secret\022\367\001\n\035AcknowledgeUs" - + "erDataCollection\022D.google.analytics.admi" - + "n.v1alpha.AcknowledgeUserDataCollectionR" - + "equest\032E.google.analytics.admin.v1alpha." - + "AcknowledgeUserDataCollectionResponse\"I\202" - + "\323\344\223\002C\">/v1alpha/{property=properties/*}:" - + "acknowledgeUserDataCollection:\001*\022\221\002\n#Get" - + "SKAdNetworkConversionValueSchema\022J.googl" - + "e.analytics.admin.v1alpha.GetSKAdNetwork" - + "ConversionValueSchemaRequest\032@.google.an" - + "alytics.admin.v1alpha.SKAdNetworkConvers" - + "ionValueSchema\"\\\332A\004name\202\323\344\223\002O\022M/v1alpha/" - + "{name=properties/*/dataStreams/*/sKAdNet" - + "workConversionValueSchema/*}\022\343\002\n&CreateS" - + "KAdNetworkConversionValueSchema\022M.google", - ".analytics.admin.v1alpha.CreateSKAdNetwo" - + "rkConversionValueSchemaRequest\032@.google." - + "analytics.admin.v1alpha.SKAdNetworkConve" - + "rsionValueSchema\"\247\001\332A*parent,skadnetwork" - + "_conversion_value_schema\202\323\344\223\002t\"M/v1alpha" - + "/{parent=properties/*/dataStreams/*}/sKA" - + "dNetworkConversionValueSchema:#skadnetwo" - + "rk_conversion_value_schema\022\355\001\n&DeleteSKA" - + "dNetworkConversionValueSchema\022M.google.a" - + "nalytics.admin.v1alpha.DeleteSKAdNetwork" - + "ConversionValueSchemaRequest\032\026.google.pr" - + "otobuf.Empty\"\\\332A\004name\202\323\344\223\002O*M/v1alpha/{n" - + "ame=properties/*/dataStreams/*/sKAdNetwo" - + "rkConversionValueSchema/*}\022\215\003\n&UpdateSKA" - + "dNetworkConversionValueSchema\022M.google.a" - + "nalytics.admin.v1alpha.UpdateSKAdNetwork" - + "ConversionValueSchemaRequest\032@.google.an" - + "alytics.admin.v1alpha.SKAdNetworkConvers" - + "ionValueSchema\"\321\001\332A/skadnetwork_conversi" - + "on_value_schema,update_mask\202\323\344\223\002\230\0012q/v1a" - + "lpha/{skadnetwork_conversion_value_schem" - + "a.name=properties/*/dataStreams/*/sKAdNe" - + "tworkConversionValueSchema/*}:#skadnetwo" - + "rk_conversion_value_schema\022\244\002\n%ListSKAdN" - + "etworkConversionValueSchemas\022L.google.an" - + "alytics.admin.v1alpha.ListSKAdNetworkCon" - + "versionValueSchemasRequest\032M.google.anal" - + "ytics.admin.v1alpha.ListSKAdNetworkConve" - + "rsionValueSchemasResponse\"^\332A\006parent\202\323\344\223" - + "\002O\022M/v1alpha/{parent=properties/*/dataSt" - + "reams/*}/sKAdNetworkConversionValueSchem" - + "a\022\344\001\n\031SearchChangeHistoryEvents\022@.google" - + ".analytics.admin.v1alpha.SearchChangeHis" - + "toryEventsRequest\032A.google.analytics.adm" - + "in.v1alpha.SearchChangeHistoryEventsResp" - + "onse\"B\202\323\344\223\002<\"7/v1alpha/{account=accounts" - + "/*}:searchChangeHistoryEvents:\001*\022\325\001\n\030Get" - + "GoogleSignalsSettings\022?.google.analytics" - + ".admin.v1alpha.GetGoogleSignalsSettingsR" - + "equest\0325.google.analytics.admin.v1alpha." - + "GoogleSignalsSettings\"A\332A\004name\202\323\344\223\0024\0222/v" - + "1alpha/{name=properties/*/googleSignalsS" - + "ettings}\022\254\002\n\033UpdateGoogleSignalsSettings" - + "\022B.google.analytics.admin.v1alpha.Update" - + "GoogleSignalsSettingsRequest\0325.google.an" - + "alytics.admin.v1alpha.GoogleSignalsSetti" - + "ngs\"\221\001\332A#google_signals_settings,update_" - + "mask\202\323\344\223\002e2J/v1alpha/{google_signals_set" - + "tings.name=properties/*/googleSignalsSet" - + "tings}:\027google_signals_settings\022\353\001\n\025Crea" - + "teConversionEvent\022<.google.analytics.adm" - + "in.v1alpha.CreateConversionEventRequest\032" - + "/.google.analytics.admin.v1alpha.Convers" - + "ionEvent\"c\332A\027parent,conversion_event\202\323\344\223" - + "\002C\"//v1alpha/{parent=properties/*}/conve" - + "rsionEvents:\020conversion_event\022\201\002\n\025Update" - + "ConversionEvent\022<.google.analytics.admin" - + ".v1alpha.UpdateConversionEventRequest\032/." - + "google.analytics.admin.v1alpha.Conversio" - + "nEvent\"y\332A\034conversion_event,update_mask\202" - + "\323\344\223\002T2@/v1alpha/{conversion_event.name=p" - + "roperties/*/conversionEvents/*}:\020convers" - + "ion_event\022\300\001\n\022GetConversionEvent\0229.googl" - + "e.analytics.admin.v1alpha.GetConversionE" - + "ventRequest\032/.google.analytics.admin.v1a" - + "lpha.ConversionEvent\">\332A\004name\202\323\344\223\0021\022//v1" - + "alpha/{name=properties/*/conversionEvent" - + "s/*}\022\255\001\n\025DeleteConversionEvent\022<.google." - + "analytics.admin.v1alpha.DeleteConversion" - + "EventRequest\032\026.google.protobuf.Empty\">\332A" - + "\004name\202\323\344\223\0021*//v1alpha/{name=properties/*" - + "/conversionEvents/*}\022\323\001\n\024ListConversionE" - + "vents\022;.google.analytics.admin.v1alpha.L" - + "istConversionEventsRequest\032<.google.anal" - + "ytics.admin.v1alpha.ListConversionEvents" - + "Response\"@\332A\006parent\202\323\344\223\0021\022//v1alpha/{par" - + "ent=properties/*}/conversionEvents\022\370\001\n G" - + "etDisplayVideo360AdvertiserLink\022G.google" - + ".analytics.admin.v1alpha.GetDisplayVideo" - + "360AdvertiserLinkRequest\032=.google.analyt" - + "ics.admin.v1alpha.DisplayVideo360Adverti" - + "serLink\"L\332A\004name\202\323\344\223\002?\022=/v1alpha/{name=p" - + "roperties/*/displayVideo360AdvertiserLin" - + "ks/*}\022\213\002\n\"ListDisplayVideo360AdvertiserL" - + "inks\022I.google.analytics.admin.v1alpha.Li" - + "stDisplayVideo360AdvertiserLinksRequest\032" - + "J.google.analytics.admin.v1alpha.ListDis" - + "playVideo360AdvertiserLinksResponse\"N\332A\006" - + "parent\202\323\344\223\002?\022=/v1alpha/{parent=propertie" - + "s/*}/displayVideo360AdvertiserLinks\022\306\002\n#" - + "CreateDisplayVideo360AdvertiserLink\022J.go" - + "ogle.analytics.admin.v1alpha.CreateDispl" - + "ayVideo360AdvertiserLinkRequest\032=.google" - + ".analytics.admin.v1alpha.DisplayVideo360" - + "AdvertiserLink\"\223\001\332A(parent,display_video" - + "_360_advertiser_link\202\323\344\223\002b\"=/v1alpha/{pa" - + "rent=properties/*}/displayVideo360Advert" - + "iserLinks:!display_video_360_advertiser_" - + "link\022\327\001\n#DeleteDisplayVideo360Advertiser" - + "Link\022J.google.analytics.admin.v1alpha.De" - + "leteDisplayVideo360AdvertiserLinkRequest" - + "\032\026.google.protobuf.Empty\"L\332A\004name\202\323\344\223\002?*" - + "=/v1alpha/{name=properties/*/displayVide" - + "o360AdvertiserLinks/*}\022\356\002\n#UpdateDisplay" - + "Video360AdvertiserLink\022J.google.analytic" - + "s.admin.v1alpha.UpdateDisplayVideo360Adv" - + "ertiserLinkRequest\032=.google.analytics.ad" - + "min.v1alpha.DisplayVideo360AdvertiserLin" - + "k\"\273\001\332A-display_video_360_advertiser_link" - + ",update_mask\202\323\344\223\002\204\0012_/v1alpha/{display_v" - + "ideo_360_advertiser_link.name=properties" - + "/*/displayVideo360AdvertiserLinks/*}:!di" - + "splay_video_360_advertiser_link\022\230\002\n(GetD" - + "isplayVideo360AdvertiserLinkProposal\022O.g" - + "oogle.analytics.admin.v1alpha.GetDisplay" - + "Video360AdvertiserLinkProposalRequest\032E." - + "google.analytics.admin.v1alpha.DisplayVi" - + "deo360AdvertiserLinkProposal\"T\332A\004name\202\323\344" - + "\223\002G\022E/v1alpha/{name=properties/*/display" - + "Video360AdvertiserLinkProposals/*}\022\253\002\n*L" - + "istDisplayVideo360AdvertiserLinkProposal" - + "s\022Q.google.analytics.admin.v1alpha.ListD" - + "isplayVideo360AdvertiserLinkProposalsReq" - + "uest\032R.google.analytics.admin.v1alpha.Li" - + "stDisplayVideo360AdvertiserLinkProposals" - + "Response\"V\332A\006parent\202\323\344\223\002G\022E/v1alpha/{par" - + "ent=properties/*}/displayVideo360Adverti" - + "serLinkProposals\022\370\002\n+CreateDisplayVideo3" - + "60AdvertiserLinkProposal\022R.google.analyt" - + "ics.admin.v1alpha.CreateDisplayVideo360A" - + "dvertiserLinkProposalRequest\032E.google.an" - + "alytics.admin.v1alpha.DisplayVideo360Adv" - + "ertiserLinkProposal\"\255\001\332A1parent,display_" - + "video_360_advertiser_link_proposal\202\323\344\223\002s" - + "\"E/v1alpha/{parent=properties/*}/display" - + "Video360AdvertiserLinkProposals:*display" - + "_video_360_advertiser_link_proposal\022\357\001\n+" - + "DeleteDisplayVideo360AdvertiserLinkPropo" - + "sal\022R.google.analytics.admin.v1alpha.Del" - + "eteDisplayVideo360AdvertiserLinkProposal" - + "Request\032\026.google.protobuf.Empty\"T\332A\004name" - + "\202\323\344\223\002G*E/v1alpha/{name=properties/*/disp" - + "layVideo360AdvertiserLinkProposals/*}\022\263\002" - + "\n,ApproveDisplayVideo360AdvertiserLinkPr" - + "oposal\022S.google.analytics.admin.v1alpha." - + "ApproveDisplayVideo360AdvertiserLinkProp" - + "osalRequest\032T.google.analytics.admin.v1a" - + "lpha.ApproveDisplayVideo360AdvertiserLin" - + "kProposalResponse\"X\202\323\344\223\002R\"M/v1alpha/{nam" - + "e=properties/*/displayVideo360Advertiser" - + "LinkProposals/*}:approve:\001*\022\241\002\n+CancelDi" + + "/AdSenseLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + + "token\030\003 \001(\t\"w\n\030ListAdSenseLinksResponse\022" + + "B\n\radsense_links\030\001 \003(\0132+.google.analytic" + + "s.admin.v1alpha.AdSenseLink\022\027\n\017next_page" + + "_token\030\002 \001(\t\"e\n FetchConnectedGa4Propert" + + "yRequest\022A\n\010property\030\001 \001(\tB/\342A\001\002\372A(\n&ana" + + "lyticsadmin.googleapis.com/Property\"b\n!F" + + "etchConnectedGa4PropertyResponse\022=\n\010prop" + + "erty\030\001 \001(\tB+\372A(\n&analyticsadmin.googleap" + + "is.com/Property\"\270\001\n\034CreateEventCreateRul" + + "eRequest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analy" + + "ticsadmin.googleapis.com/EventCreateRule" + + "\022P\n\021event_create_rule\030\002 \001(\0132/.google.ana" + + "lytics.admin.v1alpha.EventCreateRuleB\004\342A" + + "\001\002\"\247\001\n\034UpdateEventCreateRuleRequest\022P\n\021e" + + "vent_create_rule\030\001 \001(\0132/.google.analytic" + + "s.admin.v1alpha.EventCreateRuleB\004\342A\001\002\0225\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.Fie" + + "ldMaskB\004\342A\001\002\"d\n\034DeleteEventCreateRuleReq" + + "uest\022D\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-analyticsad" + + "min.googleapis.com/EventCreateRule\"a\n\031Ge" + + "tEventCreateRuleRequest\022D\n\004name\030\001 \001(\tB6\342" + + "A\001\002\372A/\n-analyticsadmin.googleapis.com/Ev" + + "entCreateRule\"\214\001\n\033ListEventCreateRulesRe" + + "quest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372A/\022-analytic" + + "sadmin.googleapis.com/EventCreateRule\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\204\001\n" + + "\034ListEventCreateRulesResponse\022K\n\022event_c" + + "reate_rules\030\001 \003(\0132/.google.analytics.adm" + + "in.v1alpha.EventCreateRule\022\027\n\017next_page_" + + "token\030\002 \001(\t\"\207\001\n\033CreateRollupPropertyRequ" + + "est\022G\n\017rollup_property\030\001 \001(\0132(.google.an" + + "alytics.admin.v1alpha.PropertyB\004\342A\001\002\022\037\n\021" + + "source_properties\030\002 \003(\tB\004\342A\001\001\"\301\001\n\034Create" + + "RollupPropertyResponse\022A\n\017rollup_propert" + + "y\030\001 \001(\0132(.google.analytics.admin.v1alpha" + + ".Property\022^\n\034rollup_property_source_link" + + "s\030\002 \003(\01328.google.analytics.admin.v1alpha" + + ".RollupPropertySourceLink\"s\n\"GetRollupPr" + + "opertySourceLinkRequest\022M\n\004name\030\001 \001(\tB?\342" + + "A\001\002\372A8\n6analyticsadmin.googleapis.com/Ro" + + "llupPropertySourceLink\"\252\001\n$ListRollupPro" + + "pertySourceLinksRequest\022O\n\006parent\030\001 \001(\tB" + + "?\342A\001\002\372A8\0226analyticsadmin.googleapis.com/" + + "RollupPropertySourceLink\022\027\n\tpage_size\030\002 " + + "\001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"\240\001\n%" + + "ListRollupPropertySourceLinksResponse\022^\n" + + "\034rollup_property_source_links\030\001 \003(\01328.go" + + "ogle.analytics.admin.v1alpha.RollupPrope" + + "rtySourceLink\022\027\n\017next_page_token\030\002 \001(\t\"\335" + + "\001\n%CreateRollupPropertySourceLinkRequest" + + "\022O\n\006parent\030\001 \001(\tB?\342A\001\002\372A8\0226analyticsadmi" + + "n.googleapis.com/RollupPropertySourceLin" + + "k\022c\n\033rollup_property_source_link\030\002 \001(\01328" + + ".google.analytics.admin.v1alpha.RollupPr" + + "opertySourceLinkB\004\342A\001\002\"v\n%DeleteRollupPr" + + "opertySourceLinkRequest\022M\n\004name\030\001 \001(\tB?\342" + + "A\001\002\372A8\n6analyticsadmin.googleapis.com/Ro" + + "llupPropertySourceLink\"\200\002\n\030CreateSubprop" + + "ertyRequest\022?\n\006parent\030\001 \001(\tB/\342A\001\002\372A(\n&an" + + "alyticsadmin.googleapis.com/Property\022C\n\013" + + "subproperty\030\002 \001(\0132(.google.analytics.adm" + + "in.v1alpha.PropertyB\004\342A\001\002\022^\n\030subproperty" + + "_event_filter\030\003 \001(\01326.google.analytics.a" + + "dmin.v1alpha.SubpropertyEventFilterB\004\342A\001" + + "\001\"\264\001\n\031CreateSubpropertyResponse\022=\n\013subpr" + + "operty\030\001 \001(\0132(.google.analytics.admin.v1" + + "alpha.Property\022X\n\030subproperty_event_filt" + + "er\030\002 \001(\01326.google.analytics.admin.v1alph" + + "a.SubpropertyEventFilter\"\324\001\n#CreateSubpr" + + "opertyEventFilterRequest\022M\n\006parent\030\001 \001(\t" + + "B=\342A\001\002\372A6\0224analyticsadmin.googleapis.com" + + "/SubpropertyEventFilter\022^\n\030subproperty_e" + + "vent_filter\030\002 \001(\01326.google.analytics.adm" + + "in.v1alpha.SubpropertyEventFilterB\004\342A\001\002\"" + + "o\n GetSubpropertyEventFilterRequest\022K\n\004n" + + "ame\030\001 \001(\tB=\342A\001\002\372A6\n4analyticsadmin.googl" + + "eapis.com/SubpropertyEventFilter\"\246\001\n\"Lis" + + "tSubpropertyEventFiltersRequest\022M\n\006paren" + + "t\030\001 \001(\tB=\342A\001\002\372A6\0224analyticsadmin.googlea" + + "pis.com/SubpropertyEventFilter\022\027\n\tpage_s" + + "ize\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001" + + "\001\"\231\001\n#ListSubpropertyEventFiltersRespons" + + "e\022Y\n\031subproperty_event_filters\030\001 \003(\01326.g" + + "oogle.analytics.admin.v1alpha.Subpropert" + + "yEventFilter\022\027\n\017next_page_token\030\002 \001(\t\"\274\001" + + "\n#UpdateSubpropertyEventFilterRequest\022^\n" + + "\030subproperty_event_filter\030\001 \001(\01326.google" + + ".analytics.admin.v1alpha.SubpropertyEven" + + "tFilterB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.goo" + + "gle.protobuf.FieldMaskB\004\342A\001\002\"r\n#DeleteSu" + + "bpropertyEventFilterRequest\022K\n\004name\030\001 \001(" + + "\tB=\342A\001\002\372A6\n4analyticsadmin.googleapis.co" + + "m/SubpropertyEventFilter2\361\350\001\n\025AnalyticsA" + + "dminService\022\223\001\n\nGetAccount\0221.google.anal" + + "ytics.admin.v1alpha.GetAccountRequest\032\'." + + "google.analytics.admin.v1alpha.Account\")" + + "\332A\004name\202\323\344\223\002\034\022\032/v1alpha/{name=accounts/*" + + "}\022\224\001\n\014ListAccounts\0223.google.analytics.ad" + + "min.v1alpha.ListAccountsRequest\0324.google" + + ".analytics.admin.v1alpha.ListAccountsRes" + + "ponse\"\031\202\323\344\223\002\023\022\021/v1alpha/accounts\022\210\001\n\rDel" + + "eteAccount\0224.google.analytics.admin.v1al" + + "pha.DeleteAccountRequest\032\026.google.protob" + + "uf.Empty\")\332A\004name\202\323\344\223\002\034*\032/v1alpha/{name=" + + "accounts/*}\022\271\001\n\rUpdateAccount\0224.google.a" + + "nalytics.admin.v1alpha.UpdateAccountRequ" + + "est\032\'.google.analytics.admin.v1alpha.Acc" + + "ount\"I\332A\023account,update_mask\202\323\344\223\002-2\"/v1a" + + "lpha/{account.name=accounts/*}:\007account\022" + + "\314\001\n\026ProvisionAccountTicket\022=.google.anal" + + "ytics.admin.v1alpha.ProvisionAccountTick" + + "etRequest\032>.google.analytics.admin.v1alp" + + "ha.ProvisionAccountTicketResponse\"3\202\323\344\223\002" + + "-\"(/v1alpha/accounts:provisionAccountTic" + + "ket:\001*\022\264\001\n\024ListAccountSummaries\022;.google" + + ".analytics.admin.v1alpha.ListAccountSumm" + + "ariesRequest\032<.google.analytics.admin.v1" + + "alpha.ListAccountSummariesResponse\"!\202\323\344\223" + + "\002\033\022\031/v1alpha/accountSummaries\022\230\001\n\013GetPro" + + "perty\0222.google.analytics.admin.v1alpha.G" + + "etPropertyRequest\032(.google.analytics.adm" + + "in.v1alpha.Property\"+\332A\004name\202\323\344\223\002\036\022\034/v1a" + + "lpha/{name=properties/*}\022\234\001\n\016ListPropert" + + "ies\0225.google.analytics.admin.v1alpha.Lis" + + "tPropertiesRequest\0326.google.analytics.ad" + + "min.v1alpha.ListPropertiesResponse\"\033\202\323\344\223" + + "\002\025\022\023/v1alpha/properties\022\243\001\n\016CreateProper" + + "ty\0225.google.analytics.admin.v1alpha.Crea" + + "tePropertyRequest\032(.google.analytics.adm" + + "in.v1alpha.Property\"0\332A\010property\202\323\344\223\002\037\"\023" + + "/v1alpha/properties:\010property\022\236\001\n\016Delete" + + "Property\0225.google.analytics.admin.v1alph" + + "a.DeletePropertyRequest\032(.google.analyti" + + "cs.admin.v1alpha.Property\"+\332A\004name\202\323\344\223\002\036" + + "*\034/v1alpha/{name=properties/*}\022\301\001\n\016Updat" + + "eProperty\0225.google.analytics.admin.v1alp" + + "ha.UpdatePropertyRequest\032(.google.analyt" + + "ics.admin.v1alpha.Property\"N\332A\024property," + + "update_mask\202\323\344\223\00212%/v1alpha/{property.na" + + "me=properties/*}:\010property\022\331\001\n\022CreateFir" + + "ebaseLink\0229.google.analytics.admin.v1alp" + + "ha.CreateFirebaseLinkRequest\032,.google.an" + + "alytics.admin.v1alpha.FirebaseLink\"Z\332A\024p" + + "arent,firebase_link\202\323\344\223\002=\",/v1alpha/{par" + + "ent=properties/*}/firebaseLinks:\rfirebas" + + "e_link\022\244\001\n\022DeleteFirebaseLink\0229.google.a" + + "nalytics.admin.v1alpha.DeleteFirebaseLin" + + "kRequest\032\026.google.protobuf.Empty\";\332A\004nam" + + "e\202\323\344\223\002.*,/v1alpha/{name=properties/*/fir" + + "ebaseLinks/*}\022\307\001\n\021ListFirebaseLinks\0228.go" + + "ogle.analytics.admin.v1alpha.ListFirebas" + + "eLinksRequest\0329.google.analytics.admin.v" + + "1alpha.ListFirebaseLinksResponse\"=\332A\006par" + + "ent\202\323\344\223\002.\022,/v1alpha/{parent=properties/*" + + "}/firebaseLinks\022\303\001\n\020GetGlobalSiteTag\0227.g" + + "oogle.analytics.admin.v1alpha.GetGlobalS" + + "iteTagRequest\032-.google.analytics.admin.v" + + "1alpha.GlobalSiteTag\"G\332A\004name\202\323\344\223\002:\0228/v1" + + "alpha/{name=properties/*/dataStreams/*/g" + + "lobalSiteTag}\022\341\001\n\023CreateGoogleAdsLink\022:." + + "google.analytics.admin.v1alpha.CreateGoo" + + "gleAdsLinkRequest\032-.google.analytics.adm" + + "in.v1alpha.GoogleAdsLink\"_\332A\026parent,goog" + + "le_ads_link\202\323\344\223\002@\"-/v1alpha/{parent=prop" + + "erties/*}/googleAdsLinks:\017google_ads_lin" + + "k\022\366\001\n\023UpdateGoogleAdsLink\022:.google.analy" + + "tics.admin.v1alpha.UpdateGoogleAdsLinkRe" + + "quest\032-.google.analytics.admin.v1alpha.G" + + "oogleAdsLink\"t\332A\033google_ads_link,update_" + + "mask\202\323\344\223\002P2=/v1alpha/{google_ads_link.na" + + "me=properties/*/googleAdsLinks/*}:\017googl" + + "e_ads_link\022\247\001\n\023DeleteGoogleAdsLink\022:.goo" + + "gle.analytics.admin.v1alpha.DeleteGoogle" + + "AdsLinkRequest\032\026.google.protobuf.Empty\"<" + + "\332A\004name\202\323\344\223\002/*-/v1alpha/{name=properties" + + "/*/googleAdsLinks/*}\022\313\001\n\022ListGoogleAdsLi" + + "nks\0229.google.analytics.admin.v1alpha.Lis" + + "tGoogleAdsLinksRequest\032:.google.analytic" + + "s.admin.v1alpha.ListGoogleAdsLinksRespon" + + "se\">\332A\006parent\202\323\344\223\002/\022-/v1alpha/{parent=pr" + + "operties/*}/googleAdsLinks\022\313\001\n\026GetDataSh" + + "aringSettings\022=.google.analytics.admin.v" + + "1alpha.GetDataSharingSettingsRequest\0323.g" + + "oogle.analytics.admin.v1alpha.DataSharin" + + "gSettings\"=\332A\004name\202\323\344\223\0020\022./v1alpha/{name" + + "=accounts/*/dataSharingSettings}\022\366\001\n\034Get" + + "MeasurementProtocolSecret\022C.google.analy" + + "tics.admin.v1alpha.GetMeasurementProtoco" + + "lSecretRequest\0329.google.analytics.admin." + + "v1alpha.MeasurementProtocolSecret\"V\332A\004na" + + "me\202\323\344\223\002I\022G/v1alpha/{name=properties/*/da" + + "taStreams/*/measurementProtocolSecrets/*" + + "}\022\211\002\n\036ListMeasurementProtocolSecrets\022E.g" + + "oogle.analytics.admin.v1alpha.ListMeasur" + + "ementProtocolSecretsRequest\032F.google.ana" + + "lytics.admin.v1alpha.ListMeasurementProt" + + "ocolSecretsResponse\"X\332A\006parent\202\323\344\223\002I\022G/v" + + "1alpha/{parent=properties/*/dataStreams/" + + "*}/measurementProtocolSecrets\022\270\002\n\037Create" + + "MeasurementProtocolSecret\022F.google.analy" + + "tics.admin.v1alpha.CreateMeasurementProt" + + "ocolSecretRequest\0329.google.analytics.adm" + + "in.v1alpha.MeasurementProtocolSecret\"\221\001\332" + + "A\"parent,measurement_protocol_secret\202\323\344\223" + + "\002f\"G/v1alpha/{parent=properties/*/dataSt" + + "reams/*}/measurementProtocolSecrets:\033mea" + + "surement_protocol_secret\022\331\001\n\037DeleteMeasu" + + "rementProtocolSecret\022F.google.analytics." + + "admin.v1alpha.DeleteMeasurementProtocolS" + + "ecretRequest\032\026.google.protobuf.Empty\"V\332A" + + "\004name\202\323\344\223\002I*G/v1alpha/{name=properties/*" + + "/dataStreams/*/measurementProtocolSecret" + + "s/*}\022\332\002\n\037UpdateMeasurementProtocolSecret" + + "\022F.google.analytics.admin.v1alpha.Update" + + "MeasurementProtocolSecretRequest\0329.googl" + + "e.analytics.admin.v1alpha.MeasurementPro" + + "tocolSecret\"\263\001\332A\'measurement_protocol_se" + + "cret,update_mask\202\323\344\223\002\202\0012c/v1alpha/{measu" + + "rement_protocol_secret.name=properties/*" + + "/dataStreams/*/measurementProtocolSecret" + + "s/*}:\033measurement_protocol_secret\022\367\001\n\035Ac" + + "knowledgeUserDataCollection\022D.google.ana" + + "lytics.admin.v1alpha.AcknowledgeUserData" + + "CollectionRequest\032E.google.analytics.adm" + + "in.v1alpha.AcknowledgeUserDataCollection" + + "Response\"I\202\323\344\223\002C\">/v1alpha/{property=pro" + + "perties/*}:acknowledgeUserDataCollection" + + ":\001*\022\221\002\n#GetSKAdNetworkConversionValueSch" + + "ema\022J.google.analytics.admin.v1alpha.Get" + + "SKAdNetworkConversionValueSchemaRequest\032" + + "@.google.analytics.admin.v1alpha.SKAdNet" + + "workConversionValueSchema\"\\\332A\004name\202\323\344\223\002O" + + "\022M/v1alpha/{name=properties/*/dataStream" + + "s/*/sKAdNetworkConversionValueSchema/*}\022" + + "\343\002\n&CreateSKAdNetworkConversionValueSche" + + "ma\022M.google.analytics.admin.v1alpha.Crea" + + "teSKAdNetworkConversionValueSchemaReques" + + "t\032@.google.analytics.admin.v1alpha.SKAdN" + + "etworkConversionValueSchema\"\247\001\332A*parent," + + "skadnetwork_conversion_value_schema\202\323\344\223\002" + + "t\"M/v1alpha/{parent=properties/*/dataStr" + + "eams/*}/sKAdNetworkConversionValueSchema" + + ":#skadnetwork_conversion_value_schema\022\355\001" + + "\n&DeleteSKAdNetworkConversionValueSchema" + + "\022M.google.analytics.admin.v1alpha.Delete" + + "SKAdNetworkConversionValueSchemaRequest\032" + + "\026.google.protobuf.Empty\"\\\332A\004name\202\323\344\223\002O*M" + + "/v1alpha/{name=properties/*/dataStreams/" + + "*/sKAdNetworkConversionValueSchema/*}\022\215\003" + + "\n&UpdateSKAdNetworkConversionValueSchema" + + "\022M.google.analytics.admin.v1alpha.Update" + + "SKAdNetworkConversionValueSchemaRequest\032" + + "@.google.analytics.admin.v1alpha.SKAdNet" + + "workConversionValueSchema\"\321\001\332A/skadnetwo" + + "rk_conversion_value_schema,update_mask\202\323" + + "\344\223\002\230\0012q/v1alpha/{skadnetwork_conversion_" + + "value_schema.name=properties/*/dataStrea" + + "ms/*/sKAdNetworkConversionValueSchema/*}" + + ":#skadnetwork_conversion_value_schema\022\244\002" + + "\n%ListSKAdNetworkConversionValueSchemas\022" + + "L.google.analytics.admin.v1alpha.ListSKA" + + "dNetworkConversionValueSchemasRequest\032M." + + "google.analytics.admin.v1alpha.ListSKAdN" + + "etworkConversionValueSchemasResponse\"^\332A" + + "\006parent\202\323\344\223\002O\022M/v1alpha/{parent=properti" + + "es/*/dataStreams/*}/sKAdNetworkConversio" + + "nValueSchema\022\344\001\n\031SearchChangeHistoryEven" + + "ts\022@.google.analytics.admin.v1alpha.Sear" + + "chChangeHistoryEventsRequest\032A.google.an" + + "alytics.admin.v1alpha.SearchChangeHistor", + "yEventsResponse\"B\202\323\344\223\002<\"7/v1alpha/{accou" + + "nt=accounts/*}:searchChangeHistoryEvents" + + ":\001*\022\325\001\n\030GetGoogleSignalsSettings\022?.googl" + + "e.analytics.admin.v1alpha.GetGoogleSigna" + + "lsSettingsRequest\0325.google.analytics.adm" + + "in.v1alpha.GoogleSignalsSettings\"A\332A\004nam" + + "e\202\323\344\223\0024\0222/v1alpha/{name=properties/*/goo" + + "gleSignalsSettings}\022\254\002\n\033UpdateGoogleSign" + + "alsSettings\022B.google.analytics.admin.v1a" + + "lpha.UpdateGoogleSignalsSettingsRequest\032" + + "5.google.analytics.admin.v1alpha.GoogleS" + + "ignalsSettings\"\221\001\332A#google_signals_setti" + + "ngs,update_mask\202\323\344\223\002e2J/v1alpha/{google_" + + "signals_settings.name=properties/*/googl" + + "eSignalsSettings}:\027google_signals_settin" + + "gs\022\353\001\n\025CreateConversionEvent\022<.google.an" + + "alytics.admin.v1alpha.CreateConversionEv" + + "entRequest\032/.google.analytics.admin.v1al" + + "pha.ConversionEvent\"c\332A\027parent,conversio" + + "n_event\202\323\344\223\002C\"//v1alpha/{parent=properti" + + "es/*}/conversionEvents:\020conversion_event" + + "\022\201\002\n\025UpdateConversionEvent\022<.google.anal" + + "ytics.admin.v1alpha.UpdateConversionEven" + + "tRequest\032/.google.analytics.admin.v1alph" + + "a.ConversionEvent\"y\332A\034conversion_event,u" + + "pdate_mask\202\323\344\223\002T2@/v1alpha/{conversion_e" + + "vent.name=properties/*/conversionEvents/" + + "*}:\020conversion_event\022\300\001\n\022GetConversionEv" + + "ent\0229.google.analytics.admin.v1alpha.Get" + + "ConversionEventRequest\032/.google.analytic" + + "s.admin.v1alpha.ConversionEvent\">\332A\004name" + + "\202\323\344\223\0021\022//v1alpha/{name=properties/*/conv" + + "ersionEvents/*}\022\255\001\n\025DeleteConversionEven" + + "t\022<.google.analytics.admin.v1alpha.Delet" + + "eConversionEventRequest\032\026.google.protobu" + + "f.Empty\">\332A\004name\202\323\344\223\0021*//v1alpha/{name=p" + + "roperties/*/conversionEvents/*}\022\323\001\n\024List" + + "ConversionEvents\022;.google.analytics.admi" + + "n.v1alpha.ListConversionEventsRequest\032<." + + "google.analytics.admin.v1alpha.ListConve" + + "rsionEventsResponse\"@\332A\006parent\202\323\344\223\0021\022//v" + + "1alpha/{parent=properties/*}/conversionE" + + "vents\022\370\001\n GetDisplayVideo360AdvertiserLi" + + "nk\022G.google.analytics.admin.v1alpha.GetD" + + "isplayVideo360AdvertiserLinkRequest\032=.go" + + "ogle.analytics.admin.v1alpha.DisplayVide" + + "o360AdvertiserLink\"L\332A\004name\202\323\344\223\002?\022=/v1al" + + "pha/{name=properties/*/displayVideo360Ad" + + "vertiserLinks/*}\022\213\002\n\"ListDisplayVideo360" + + "AdvertiserLinks\022I.google.analytics.admin" + + ".v1alpha.ListDisplayVideo360AdvertiserLi" + + "nksRequest\032J.google.analytics.admin.v1al" + + "pha.ListDisplayVideo360AdvertiserLinksRe" + + "sponse\"N\332A\006parent\202\323\344\223\002?\022=/v1alpha/{paren" + + "t=properties/*}/displayVideo360Advertise" + + "rLinks\022\306\002\n#CreateDisplayVideo360Advertis" + + "erLink\022J.google.analytics.admin.v1alpha." + + "CreateDisplayVideo360AdvertiserLinkReque" + + "st\032=.google.analytics.admin.v1alpha.Disp" + + "layVideo360AdvertiserLink\"\223\001\332A(parent,di" + + "splay_video_360_advertiser_link\202\323\344\223\002b\"=/" + + "v1alpha/{parent=properties/*}/displayVid" + + "eo360AdvertiserLinks:!display_video_360_" + + "advertiser_link\022\327\001\n#DeleteDisplayVideo36" + + "0AdvertiserLink\022J.google.analytics.admin" + + ".v1alpha.DeleteDisplayVideo360Advertiser" + + "LinkRequest\032\026.google.protobuf.Empty\"L\332A\004" + + "name\202\323\344\223\002?*=/v1alpha/{name=properties/*/" + + "displayVideo360AdvertiserLinks/*}\022\356\002\n#Up" + + "dateDisplayVideo360AdvertiserLink\022J.goog" + + "le.analytics.admin.v1alpha.UpdateDisplay" + + "Video360AdvertiserLinkRequest\032=.google.a" + + "nalytics.admin.v1alpha.DisplayVideo360Ad" + + "vertiserLink\"\273\001\332A-display_video_360_adve" + + "rtiser_link,update_mask\202\323\344\223\002\204\0012_/v1alpha" + + "/{display_video_360_advertiser_link.name" + + "=properties/*/displayVideo360AdvertiserL" + + "inks/*}:!display_video_360_advertiser_li" + + "nk\022\230\002\n(GetDisplayVideo360AdvertiserLinkP" + + "roposal\022O.google.analytics.admin.v1alpha" + + ".GetDisplayVideo360AdvertiserLinkProposa" + + "lRequest\032E.google.analytics.admin.v1alph" + + "a.DisplayVideo360AdvertiserLinkProposal\"" + + "T\332A\004name\202\323\344\223\002G\022E/v1alpha/{name=propertie" + + "s/*/displayVideo360AdvertiserLinkProposa" + + "ls/*}\022\253\002\n*ListDisplayVideo360AdvertiserL" + + "inkProposals\022Q.google.analytics.admin.v1" + + "alpha.ListDisplayVideo360AdvertiserLinkP" + + "roposalsRequest\032R.google.analytics.admin" + + ".v1alpha.ListDisplayVideo360AdvertiserLi" + + "nkProposalsResponse\"V\332A\006parent\202\323\344\223\002G\022E/v" + + "1alpha/{parent=properties/*}/displayVide" + + "o360AdvertiserLinkProposals\022\370\002\n+CreateDi" + "splayVideo360AdvertiserLinkProposal\022R.go" - + "ogle.analytics.admin.v1alpha.CancelDispl" + + "ogle.analytics.admin.v1alpha.CreateDispl" + "ayVideo360AdvertiserLinkProposalRequest\032" + "E.google.analytics.admin.v1alpha.Display" - + "Video360AdvertiserLinkProposal\"W\202\323\344\223\002Q\"L" - + "/v1alpha/{name=properties/*/displayVideo" - + "360AdvertiserLinkProposals/*}:cancel:\001*\022" - + "\353\001\n\025CreateCustomDimension\022<.google.analy" - + "tics.admin.v1alpha.CreateCustomDimension" - + "Request\032/.google.analytics.admin.v1alpha" - + ".CustomDimension\"c\332A\027parent,custom_dimen" - + "sion\202\323\344\223\002C\"//v1alpha/{parent=properties/" - + "*}/customDimensions:\020custom_dimension\022\201\002" - + "\n\025UpdateCustomDimension\022<.google.analyti" - + "cs.admin.v1alpha.UpdateCustomDimensionRe" - + "quest\032/.google.analytics.admin.v1alpha.C" - + "ustomDimension\"y\332A\034custom_dimension,upda" - + "te_mask\202\323\344\223\002T2@/v1alpha/{custom_dimensio" - + "n.name=properties/*/customDimensions/*}:" - + "\020custom_dimension\022\323\001\n\024ListCustomDimensio" - + "ns\022;.google.analytics.admin.v1alpha.List" - + "CustomDimensionsRequest\032<.google.analyti" - + "cs.admin.v1alpha.ListCustomDimensionsRes" - + "ponse\"@\332A\006parent\202\323\344\223\0021\022//v1alpha/{parent" - + "=properties/*}/customDimensions\022\272\001\n\026Arch" - + "iveCustomDimension\022=.google.analytics.ad" - + "min.v1alpha.ArchiveCustomDimensionReques" - + "t\032\026.google.protobuf.Empty\"I\332A\004name\202\323\344\223\002<" - + "\"7/v1alpha/{name=properties/*/customDime" - + "nsions/*}:archive:\001*\022\300\001\n\022GetCustomDimens" - + "ion\0229.google.analytics.admin.v1alpha.Get" - + "CustomDimensionRequest\032/.google.analytic" - + "s.admin.v1alpha.CustomDimension\">\332A\004name" - + "\202\323\344\223\0021\022//v1alpha/{name=properties/*/cust" - + "omDimensions/*}\022\331\001\n\022CreateCustomMetric\0229" - + ".google.analytics.admin.v1alpha.CreateCu" - + "stomMetricRequest\032,.google.analytics.adm" - + "in.v1alpha.CustomMetric\"Z\332A\024parent,custo" - + "m_metric\202\323\344\223\002=\",/v1alpha/{parent=propert" - + "ies/*}/customMetrics:\rcustom_metric\022\354\001\n\022" - + "UpdateCustomMetric\0229.google.analytics.ad" - + "min.v1alpha.UpdateCustomMetricRequest\032,." - + "google.analytics.admin.v1alpha.CustomMet" - + "ric\"m\332A\031custom_metric,update_mask\202\323\344\223\002K2" - + ":/v1alpha/{custom_metric.name=properties" - + "/*/customMetrics/*}:\rcustom_metric\022\307\001\n\021L" - + "istCustomMetrics\0228.google.analytics.admi" - + "n.v1alpha.ListCustomMetricsRequest\0329.goo" - + "gle.analytics.admin.v1alpha.ListCustomMe" - + "tricsResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1alpha" - + "/{parent=properties/*}/customMetrics\022\261\001\n" - + "\023ArchiveCustomMetric\022:.google.analytics." - + "admin.v1alpha.ArchiveCustomMetricRequest" - + "\032\026.google.protobuf.Empty\"F\332A\004name\202\323\344\223\0029\"" - + "4/v1alpha/{name=properties/*/customMetri" - + "cs/*}:archive:\001*\022\264\001\n\017GetCustomMetric\0226.g" - + "oogle.analytics.admin.v1alpha.GetCustomM" - + "etricRequest\032,.google.analytics.admin.v1" - + "alpha.CustomMetric\";\332A\004name\202\323\344\223\002.\022,/v1al" - + "pha/{name=properties/*/customMetrics/*}\022" - + "\325\001\n\030GetDataRetentionSettings\022?.google.an" - + "alytics.admin.v1alpha.GetDataRetentionSe" - + "ttingsRequest\0325.google.analytics.admin.v" - + "1alpha.DataRetentionSettings\"A\332A\004name\202\323\344" - + "\223\0024\0222/v1alpha/{name=properties/*/dataRet" - + "entionSettings}\022\254\002\n\033UpdateDataRetentionS" - + "ettings\022B.google.analytics.admin.v1alpha" - + ".UpdateDataRetentionSettingsRequest\0325.go" - + "ogle.analytics.admin.v1alpha.DataRetenti" - + "onSettings\"\221\001\332A#data_retention_settings," - + "update_mask\202\323\344\223\002e2J/v1alpha/{data_retent" - + "ion_settings.name=properties/*/dataReten" - + "tionSettings}:\027data_retention_settings\022\315" - + "\001\n\020CreateDataStream\0227.google.analytics.a" - + "dmin.v1alpha.CreateDataStreamRequest\032*.g" - + "oogle.analytics.admin.v1alpha.DataStream" - + "\"T\332A\022parent,data_stream\202\323\344\223\0029\"*/v1alpha/" - + "{parent=properties/*}/dataStreams:\013data_" - + "stream\022\236\001\n\020DeleteDataStream\0227.google.ana" - + "lytics.admin.v1alpha.DeleteDataStreamReq" - + "uest\032\026.google.protobuf.Empty\"9\332A\004name\202\323\344" - + "\223\002,**/v1alpha/{name=properties/*/dataStr" - + "eams/*}\022\336\001\n\020UpdateDataStream\0227.google.an" - + "alytics.admin.v1alpha.UpdateDataStreamRe" - + "quest\032*.google.analytics.admin.v1alpha.D" - + "ataStream\"e\332A\027data_stream,update_mask\202\323\344" - + "\223\002E26/v1alpha/{data_stream.name=properti" - + "es/*/dataStreams/*}:\013data_stream\022\277\001\n\017Lis" - + "tDataStreams\0226.google.analytics.admin.v1" - + "alpha.ListDataStreamsRequest\0327.google.an" - + "alytics.admin.v1alpha.ListDataStreamsRes" - + "ponse\";\332A\006parent\202\323\344\223\002,\022*/v1alpha/{parent" - + "=properties/*}/dataStreams\022\254\001\n\rGetDataSt" - + "ream\0224.google.analytics.admin.v1alpha.Ge" - + "tDataStreamRequest\032*.google.analytics.ad" - + "min.v1alpha.DataStream\"9\332A\004name\202\323\344\223\002,\022*/" - + "v1alpha/{name=properties/*/dataStreams/*" - + "}\022\244\001\n\013GetAudience\0222.google.analytics.adm" - + "in.v1alpha.GetAudienceRequest\032(.google.a" - + "nalytics.admin.v1alpha.Audience\"7\332A\004name" - + "\202\323\344\223\002*\022(/v1alpha/{name=properties/*/audi" - + "ences/*}\022\267\001\n\rListAudiences\0224.google.anal" - + "ytics.admin.v1alpha.ListAudiencesRequest" - + "\0325.google.analytics.admin.v1alpha.ListAu" - + "diencesResponse\"9\332A\006parent\202\323\344\223\002*\022(/v1alp" - + "ha/{parent=properties/*}/audiences\022\277\001\n\016C" - + "reateAudience\0225.google.analytics.admin.v" - + "1alpha.CreateAudienceRequest\032(.google.an" - + "alytics.admin.v1alpha.Audience\"L\332A\017paren" - + "t,audience\202\323\344\223\0024\"(/v1alpha/{parent=prope" - + "rties/*}/audiences:\010audience\022\315\001\n\016UpdateA" - + "udience\0225.google.analytics.admin.v1alpha" - + ".UpdateAudienceRequest\032(.google.analytic" - + "s.admin.v1alpha.Audience\"Z\332A\024audience,up" - + "date_mask\202\323\344\223\002=21/v1alpha/{audience.name" - + "=properties/*/audiences/*}:\010audience\022\236\001\n" - + "\017ArchiveAudience\0226.google.analytics.admi" - + "n.v1alpha.ArchiveAudienceRequest\032\026.googl" - + "e.protobuf.Empty\";\202\323\344\223\0025\"0/v1alpha/{name" - + "=properties/*/audiences/*}:archive:\001*\022\304\001" - + "\n\023GetSearchAds360Link\022:.google.analytics" - + ".admin.v1alpha.GetSearchAds360LinkReques" - + "t\0320.google.analytics.admin.v1alpha.Searc" - + "hAds360Link\"?\332A\004name\202\323\344\223\0022\0220/v1alpha/{na" - + "me=properties/*/searchAds360Links/*}\022\327\001\n" - + "\025ListSearchAds360Links\022<.google.analytic" - + "s.admin.v1alpha.ListSearchAds360LinksReq" - + "uest\032=.google.analytics.admin.v1alpha.Li" - + "stSearchAds360LinksResponse\"A\332A\006parent\202\323" - + "\344\223\0022\0220/v1alpha/{parent=properties/*}/sea" - + "rchAds360Links\022\365\001\n\026CreateSearchAds360Lin" - + "k\022=.google.analytics.admin.v1alpha.Creat" - + "eSearchAds360LinkRequest\0320.google.analyt" - + "ics.admin.v1alpha.SearchAds360Link\"j\332A\032p" - + "arent,search_ads_360_link\202\323\344\223\002G\"0/v1alph" - + "a/{parent=properties/*}/searchAds360Link" - + "s:\023search_ads_360_link\022\260\001\n\026DeleteSearchA" - + "ds360Link\022=.google.analytics.admin.v1alp" - + "ha.DeleteSearchAds360LinkRequest\032\026.googl" - + "e.protobuf.Empty\"?\332A\004name\202\323\344\223\0022*0/v1alph" - + "a/{name=properties/*/searchAds360Links/*" - + "}\022\217\002\n\026UpdateSearchAds360Link\022=.google.an" - + "alytics.admin.v1alpha.UpdateSearchAds360" - + "LinkRequest\0320.google.analytics.admin.v1a" - + "lpha.SearchAds360Link\"\203\001\332A\037search_ads_36" - + "0_link,update_mask\202\323\344\223\002[2D/v1alpha/{sear" - + "ch_ads_360_link.name=properties/*/search" - + "Ads360Links/*}:\023search_ads_360_link\022\315\001\n\026" - + "GetAttributionSettings\022=.google.analytic" - + "s.admin.v1alpha.GetAttributionSettingsRe" - + "quest\0323.google.analytics.admin.v1alpha.A" - + "ttributionSettings\"?\332A\004name\202\323\344\223\0022\0220/v1al" - + "pha/{name=properties/*/attributionSettin" - + "gs}\022\233\002\n\031UpdateAttributionSettings\022@.goog" - + "le.analytics.admin.v1alpha.UpdateAttribu" - + "tionSettingsRequest\0323.google.analytics.a" - + "dmin.v1alpha.AttributionSettings\"\206\001\332A at" - + "tribution_settings,update_mask\202\323\344\223\002]2E/v" - + "1alpha/{attribution_settings.name=proper" - + "ties/*/attributionSettings}:\024attribution" - + "_settings\022\360\001\n\017RunAccessReport\0226.google.a" - + "nalytics.admin.v1alpha.RunAccessReportRe" - + "quest\0327.google.analytics.admin.v1alpha.R" - + "unAccessReportResponse\"l\202\323\344\223\002f\"./v1alpha" - + "/{entity=properties/*}:runAccessReport:\001" - + "*Z1\",/v1alpha/{entity=accounts/*}:runAcc" - + "essReport:\001*\022\237\002\n\023CreateAccessBinding\022:.g" - + "oogle.analytics.admin.v1alpha.CreateAcce" - + "ssBindingRequest\032-.google.analytics.admi" - + "n.v1alpha.AccessBinding\"\234\001\332A\025parent,acce" - + "ss_binding\202\323\344\223\002~\"+/v1alpha/{parent=accou" - + "nts/*}/accessBindings:\016access_bindingZ?\"" - + "-/v1alpha/{parent=properties/*}/accessBi" - + "ndings:\016access_binding\022\347\001\n\020GetAccessBind" - + "ing\0227.google.analytics.admin.v1alpha.Get" - + "AccessBindingRequest\032-.google.analytics." - + "admin.v1alpha.AccessBinding\"k\332A\004name\202\323\344\223" - + "\002^\022+/v1alpha/{name=accounts/*/accessBind" - + "ings/*}Z/\022-/v1alpha/{name=properties/*/a" - + "ccessBindings/*}\022\267\002\n\023UpdateAccessBinding" - + "\022:.google.analytics.admin.v1alpha.Update" - + "AccessBindingRequest\032-.google.analytics." - + "admin.v1alpha.AccessBinding\"\264\001\332A\016access_" - + "binding\202\323\344\223\002\234\0012:/v1alpha/{access_binding" - + ".name=accounts/*/accessBindings/*}:\016acce" - + "ss_bindingZN2\"9/v1a" - + "lpha/{parent=properties/*}/accessBinding" - + "s:batchCreate:\001*\022\217\002\n\026BatchGetAccessBindi" - + "ngs\022=.google.analytics.admin.v1alpha.Bat" - + "chGetAccessBindingsRequest\032>.google.anal" - + "ytics.admin.v1alpha.BatchGetAccessBindin" - + "gsResponse\"v\202\323\344\223\002p\0224/v1alpha/{parent=acc" - + "ounts/*}/accessBindings:batchGetZ8\0226/v1a" - + "lpha/{parent=properties/*}/accessBinding" - + "s:batchGet\022\245\002\n\031BatchUpdateAccessBindings" - + "\022@.google.analytics.admin.v1alpha.BatchU" - + "pdateAccessBindingsRequest\032A.google.anal" - + "ytics.admin.v1alpha.BatchUpdateAccessBin" - + "dingsResponse\"\202\001\202\323\344\223\002|\"7/v1alpha/{parent" - + "=accounts/*}/accessBindings:batchUpdate:" - + "\001*Z>\"9/v1alpha/{parent=properties/*}/acc" - + "essBindings:batchUpdate:\001*\022\372\001\n\031BatchDele" - + "teAccessBindings\022@.google.analytics.admi" - + "n.v1alpha.BatchDeleteAccessBindingsReque" - + "st\032\026.google.protobuf.Empty\"\202\001\202\323\344\223\002|\"7/v1" - + "alpha/{parent=accounts/*}/accessBindings" - + ":batchDelete:\001*Z>\"9/v1alpha/{parent=prop" - + "erties/*}/accessBindings:batchDelete:\001*\022" - + "\300\001\n\022GetExpandedDataSet\0229.google.analytic" - + "s.admin.v1alpha.GetExpandedDataSetReques" - + "t\032/.google.analytics.admin.v1alpha.Expan" - + "dedDataSet\">\332A\004name\202\323\344\223\0021\022//v1alpha/{nam" - + "e=properties/*/expandedDataSets/*}\022\323\001\n\024L" - + "istExpandedDataSets\022;.google.analytics.a" - + "dmin.v1alpha.ListExpandedDataSetsRequest" - + "\032<.google.analytics.admin.v1alpha.ListEx" - + "pandedDataSetsResponse\"@\332A\006parent\202\323\344\223\0021\022" - + "//v1alpha/{parent=properties/*}/expanded" - + "DataSets\022\355\001\n\025CreateExpandedDataSet\022<.goo" - + "gle.analytics.admin.v1alpha.CreateExpand" - + "edDataSetRequest\032/.google.analytics.admi" - + "n.v1alpha.ExpandedDataSet\"e\332A\030parent,exp" - + "anded_data_set\202\323\344\223\002D\"//v1alpha/{parent=p" - + "roperties/*}/expandedDataSets:\021expanded_" - + "data_set\022\204\002\n\025UpdateExpandedDataSet\022<.goo" - + "gle.analytics.admin.v1alpha.UpdateExpand" - + "edDataSetRequest\032/.google.analytics.admi" - + "n.v1alpha.ExpandedDataSet\"|\332A\035expanded_d" - + "ata_set,update_mask\202\323\344\223\002V2A/v1alpha/{exp" - + "anded_data_set.name=properties/*/expande", - "dDataSets/*}:\021expanded_data_set\022\255\001\n\025Dele" - + "teExpandedDataSet\022<.google.analytics.adm" - + "in.v1alpha.DeleteExpandedDataSetRequest\032" - + "\026.google.protobuf.Empty\">\332A\004name\202\323\344\223\0021*/" - + "/v1alpha/{name=properties/*/expandedData" - + "Sets/*}\022\264\001\n\017GetChannelGroup\0226.google.ana" - + "lytics.admin.v1alpha.GetChannelGroupRequ" - + "est\032,.google.analytics.admin.v1alpha.Cha" - + "nnelGroup\";\332A\004name\202\323\344\223\002.\022,/v1alpha/{name" - + "=properties/*/channelGroups/*}\022\307\001\n\021ListC" - + "hannelGroups\0228.google.analytics.admin.v1" - + "alpha.ListChannelGroupsRequest\0329.google." - + "analytics.admin.v1alpha.ListChannelGroup" - + "sResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1alpha/{pa" - + "rent=properties/*}/channelGroups\022\331\001\n\022Cre" - + "ateChannelGroup\0229.google.analytics.admin" - + ".v1alpha.CreateChannelGroupRequest\032,.goo" - + "gle.analytics.admin.v1alpha.ChannelGroup" - + "\"Z\332A\024parent,channel_group\202\323\344\223\002=\",/v1alph" - + "a/{parent=properties/*}/channelGroups:\rc" - + "hannel_group\022\354\001\n\022UpdateChannelGroup\0229.go" - + "ogle.analytics.admin.v1alpha.UpdateChann" + + "Video360AdvertiserLinkProposal\"\255\001\332A1pare" + + "nt,display_video_360_advertiser_link_pro" + + "posal\202\323\344\223\002s\"E/v1alpha/{parent=properties" + + "/*}/displayVideo360AdvertiserLinkProposa" + + "ls:*display_video_360_advertiser_link_pr" + + "oposal\022\357\001\n+DeleteDisplayVideo360Advertis" + + "erLinkProposal\022R.google.analytics.admin." + + "v1alpha.DeleteDisplayVideo360AdvertiserL" + + "inkProposalRequest\032\026.google.protobuf.Emp" + + "ty\"T\332A\004name\202\323\344\223\002G*E/v1alpha/{name=proper" + + "ties/*/displayVideo360AdvertiserLinkProp" + + "osals/*}\022\263\002\n,ApproveDisplayVideo360Adver" + + "tiserLinkProposal\022S.google.analytics.adm" + + "in.v1alpha.ApproveDisplayVideo360Adverti" + + "serLinkProposalRequest\032T.google.analytic" + + "s.admin.v1alpha.ApproveDisplayVideo360Ad" + + "vertiserLinkProposalResponse\"X\202\323\344\223\002R\"M/v" + + "1alpha/{name=properties/*/displayVideo36" + + "0AdvertiserLinkProposals/*}:approve:\001*\022\241" + + "\002\n+CancelDisplayVideo360AdvertiserLinkPr" + + "oposal\022R.google.analytics.admin.v1alpha." + + "CancelDisplayVideo360AdvertiserLinkPropo" + + "salRequest\032E.google.analytics.admin.v1al" + + "pha.DisplayVideo360AdvertiserLinkProposa" + + "l\"W\202\323\344\223\002Q\"L/v1alpha/{name=properties/*/d" + + "isplayVideo360AdvertiserLinkProposals/*}" + + ":cancel:\001*\022\353\001\n\025CreateCustomDimension\022<.g" + + "oogle.analytics.admin.v1alpha.CreateCust" + + "omDimensionRequest\032/.google.analytics.ad" + + "min.v1alpha.CustomDimension\"c\332A\027parent,c" + + "ustom_dimension\202\323\344\223\002C\"//v1alpha/{parent=" + + "properties/*}/customDimensions:\020custom_d" + + "imension\022\201\002\n\025UpdateCustomDimension\022<.goo" + + "gle.analytics.admin.v1alpha.UpdateCustom" + + "DimensionRequest\032/.google.analytics.admi" + + "n.v1alpha.CustomDimension\"y\332A\034custom_dim" + + "ension,update_mask\202\323\344\223\002T2@/v1alpha/{cust" + + "om_dimension.name=properties/*/customDim" + + "ensions/*}:\020custom_dimension\022\323\001\n\024ListCus" + + "tomDimensions\022;.google.analytics.admin.v" + + "1alpha.ListCustomDimensionsRequest\032<.goo" + + "gle.analytics.admin.v1alpha.ListCustomDi" + + "mensionsResponse\"@\332A\006parent\202\323\344\223\0021\022//v1al" + + "pha/{parent=properties/*}/customDimensio" + + "ns\022\272\001\n\026ArchiveCustomDimension\022=.google.a" + + "nalytics.admin.v1alpha.ArchiveCustomDime" + + "nsionRequest\032\026.google.protobuf.Empty\"I\332A" + + "\004name\202\323\344\223\002<\"7/v1alpha/{name=properties/*" + + "/customDimensions/*}:archive:\001*\022\300\001\n\022GetC" + + "ustomDimension\0229.google.analytics.admin." + + "v1alpha.GetCustomDimensionRequest\032/.goog" + + "le.analytics.admin.v1alpha.CustomDimensi" + + "on\">\332A\004name\202\323\344\223\0021\022//v1alpha/{name=proper" + + "ties/*/customDimensions/*}\022\331\001\n\022CreateCus" + + "tomMetric\0229.google.analytics.admin.v1alp" + + "ha.CreateCustomMetricRequest\032,.google.an" + + "alytics.admin.v1alpha.CustomMetric\"Z\332A\024p" + + "arent,custom_metric\202\323\344\223\002=\",/v1alpha/{par" + + "ent=properties/*}/customMetrics:\rcustom_" + + "metric\022\354\001\n\022UpdateCustomMetric\0229.google.a" + + "nalytics.admin.v1alpha.UpdateCustomMetri" + + "cRequest\032,.google.analytics.admin.v1alph" + + "a.CustomMetric\"m\332A\031custom_metric,update_" + + "mask\202\323\344\223\002K2:/v1alpha/{custom_metric.name" + + "=properties/*/customMetrics/*}:\rcustom_m" + + "etric\022\307\001\n\021ListCustomMetrics\0228.google.ana" + + "lytics.admin.v1alpha.ListCustomMetricsRe" + + "quest\0329.google.analytics.admin.v1alpha.L" + + "istCustomMetricsResponse\"=\332A\006parent\202\323\344\223\002" + + ".\022,/v1alpha/{parent=properties/*}/custom" + + "Metrics\022\261\001\n\023ArchiveCustomMetric\022:.google" + + ".analytics.admin.v1alpha.ArchiveCustomMe" + + "tricRequest\032\026.google.protobuf.Empty\"F\332A\004" + + "name\202\323\344\223\0029\"4/v1alpha/{name=properties/*/" + + "customMetrics/*}:archive:\001*\022\264\001\n\017GetCusto" + + "mMetric\0226.google.analytics.admin.v1alpha" + + ".GetCustomMetricRequest\032,.google.analyti" + + "cs.admin.v1alpha.CustomMetric\";\332A\004name\202\323" + + "\344\223\002.\022,/v1alpha/{name=properties/*/custom" + + "Metrics/*}\022\325\001\n\030GetDataRetentionSettings\022" + + "?.google.analytics.admin.v1alpha.GetData" + + "RetentionSettingsRequest\0325.google.analyt" + + "ics.admin.v1alpha.DataRetentionSettings\"" + + "A\332A\004name\202\323\344\223\0024\0222/v1alpha/{name=propertie" + + "s/*/dataRetentionSettings}\022\254\002\n\033UpdateDat" + + "aRetentionSettings\022B.google.analytics.ad" + + "min.v1alpha.UpdateDataRetentionSettingsR" + + "equest\0325.google.analytics.admin.v1alpha." + + "DataRetentionSettings\"\221\001\332A#data_retentio" + + "n_settings,update_mask\202\323\344\223\002e2J/v1alpha/{" + + "data_retention_settings.name=properties/" + + "*/dataRetentionSettings}:\027data_retention" + + "_settings\022\315\001\n\020CreateDataStream\0227.google." + + "analytics.admin.v1alpha.CreateDataStream" + + "Request\032*.google.analytics.admin.v1alpha" + + ".DataStream\"T\332A\022parent,data_stream\202\323\344\223\0029" + + "\"*/v1alpha/{parent=properties/*}/dataStr" + + "eams:\013data_stream\022\236\001\n\020DeleteDataStream\0227" + + ".google.analytics.admin.v1alpha.DeleteDa" + + "taStreamRequest\032\026.google.protobuf.Empty\"" + + "9\332A\004name\202\323\344\223\002,**/v1alpha/{name=propertie" + + "s/*/dataStreams/*}\022\336\001\n\020UpdateDataStream\022" + + "7.google.analytics.admin.v1alpha.UpdateD" + + "ataStreamRequest\032*.google.analytics.admi" + + "n.v1alpha.DataStream\"e\332A\027data_stream,upd" + + "ate_mask\202\323\344\223\002E26/v1alpha/{data_stream.na" + + "me=properties/*/dataStreams/*}:\013data_str" + + "eam\022\277\001\n\017ListDataStreams\0226.google.analyti" + + "cs.admin.v1alpha.ListDataStreamsRequest\032" + + "7.google.analytics.admin.v1alpha.ListDat" + + "aStreamsResponse\";\332A\006parent\202\323\344\223\002,\022*/v1al" + + "pha/{parent=properties/*}/dataStreams\022\254\001" + + "\n\rGetDataStream\0224.google.analytics.admin" + + ".v1alpha.GetDataStreamRequest\032*.google.a" + + "nalytics.admin.v1alpha.DataStream\"9\332A\004na" + + "me\202\323\344\223\002,\022*/v1alpha/{name=properties/*/da" + + "taStreams/*}\022\244\001\n\013GetAudience\0222.google.an" + + "alytics.admin.v1alpha.GetAudienceRequest" + + "\032(.google.analytics.admin.v1alpha.Audien" + + "ce\"7\332A\004name\202\323\344\223\002*\022(/v1alpha/{name=proper" + + "ties/*/audiences/*}\022\267\001\n\rListAudiences\0224." + + "google.analytics.admin.v1alpha.ListAudie" + + "ncesRequest\0325.google.analytics.admin.v1a" + + "lpha.ListAudiencesResponse\"9\332A\006parent\202\323\344" + + "\223\002*\022(/v1alpha/{parent=properties/*}/audi" + + "ences\022\277\001\n\016CreateAudience\0225.google.analyt" + + "ics.admin.v1alpha.CreateAudienceRequest\032" + + "(.google.analytics.admin.v1alpha.Audienc" + + "e\"L\332A\017parent,audience\202\323\344\223\0024\"(/v1alpha/{p" + + "arent=properties/*}/audiences:\010audience\022" + + "\315\001\n\016UpdateAudience\0225.google.analytics.ad" + + "min.v1alpha.UpdateAudienceRequest\032(.goog" + + "le.analytics.admin.v1alpha.Audience\"Z\332A\024" + + "audience,update_mask\202\323\344\223\002=21/v1alpha/{au" + + "dience.name=properties/*/audiences/*}:\010a" + + "udience\022\236\001\n\017ArchiveAudience\0226.google.ana" + + "lytics.admin.v1alpha.ArchiveAudienceRequ" + + "est\032\026.google.protobuf.Empty\";\202\323\344\223\0025\"0/v1" + + "alpha/{name=properties/*/audiences/*}:ar" + + "chive:\001*\022\304\001\n\023GetSearchAds360Link\022:.googl" + + "e.analytics.admin.v1alpha.GetSearchAds36" + + "0LinkRequest\0320.google.analytics.admin.v1" + + "alpha.SearchAds360Link\"?\332A\004name\202\323\344\223\0022\0220/" + + "v1alpha/{name=properties/*/searchAds360L" + + "inks/*}\022\327\001\n\025ListSearchAds360Links\022<.goog" + + "le.analytics.admin.v1alpha.ListSearchAds" + + "360LinksRequest\032=.google.analytics.admin" + + ".v1alpha.ListSearchAds360LinksResponse\"A" + + "\332A\006parent\202\323\344\223\0022\0220/v1alpha/{parent=proper" + + "ties/*}/searchAds360Links\022\365\001\n\026CreateSear" + + "chAds360Link\022=.google.analytics.admin.v1" + + "alpha.CreateSearchAds360LinkRequest\0320.go" + + "ogle.analytics.admin.v1alpha.SearchAds36" + + "0Link\"j\332A\032parent,search_ads_360_link\202\323\344\223" + + "\002G\"0/v1alpha/{parent=properties/*}/searc" + + "hAds360Links:\023search_ads_360_link\022\260\001\n\026De" + + "leteSearchAds360Link\022=.google.analytics." + + "admin.v1alpha.DeleteSearchAds360LinkRequ" + + "est\032\026.google.protobuf.Empty\"?\332A\004name\202\323\344\223" + + "\0022*0/v1alpha/{name=properties/*/searchAd" + + "s360Links/*}\022\217\002\n\026UpdateSearchAds360Link\022" + + "=.google.analytics.admin.v1alpha.UpdateS" + + "earchAds360LinkRequest\0320.google.analytic" + + "s.admin.v1alpha.SearchAds360Link\"\203\001\332A\037se" + + "arch_ads_360_link,update_mask\202\323\344\223\002[2D/v1" + + "alpha/{search_ads_360_link.name=properti" + + "es/*/searchAds360Links/*}:\023search_ads_36" + + "0_link\022\315\001\n\026GetAttributionSettings\022=.goog" + + "le.analytics.admin.v1alpha.GetAttributio" + + "nSettingsRequest\0323.google.analytics.admi" + + "n.v1alpha.AttributionSettings\"?\332A\004name\202\323" + + "\344\223\0022\0220/v1alpha/{name=properties/*/attrib" + + "utionSettings}\022\233\002\n\031UpdateAttributionSett" + + "ings\022@.google.analytics.admin.v1alpha.Up" + + "dateAttributionSettingsRequest\0323.google." + + "analytics.admin.v1alpha.AttributionSetti" + + "ngs\"\206\001\332A attribution_settings,update_mas" + + "k\202\323\344\223\002]2E/v1alpha/{attribution_settings." + + "name=properties/*/attributionSettings}:\024" + + "attribution_settings\022\360\001\n\017RunAccessReport" + + "\0226.google.analytics.admin.v1alpha.RunAcc" + + "essReportRequest\0327.google.analytics.admi" + + "n.v1alpha.RunAccessReportResponse\"l\202\323\344\223\002" + + "f\"./v1alpha/{entity=properties/*}:runAcc" + + "essReport:\001*Z1\",/v1alpha/{entity=account" + + "s/*}:runAccessReport:\001*\022\237\002\n\023CreateAccess" + + "Binding\022:.google.analytics.admin.v1alpha" + + ".CreateAccessBindingRequest\032-.google.ana" + + "lytics.admin.v1alpha.AccessBinding\"\234\001\332A\025" + + "parent,access_binding\202\323\344\223\002~\"+/v1alpha/{p" + + "arent=accounts/*}/accessBindings:\016access" + + "_bindingZ?\"-/v1alpha/{parent=properties/" + + "*}/accessBindings:\016access_binding\022\347\001\n\020Ge" + + "tAccessBinding\0227.google.analytics.admin." + + "v1alpha.GetAccessBindingRequest\032-.google" + + ".analytics.admin.v1alpha.AccessBinding\"k" + + "\332A\004name\202\323\344\223\002^\022+/v1alpha/{name=accounts/*" + + "/accessBindings/*}Z/\022-/v1alpha/{name=pro" + + "perties/*/accessBindings/*}\022\267\002\n\023UpdateAc" + + "cessBinding\022:.google.analytics.admin.v1a" + + "lpha.UpdateAccessBindingRequest\032-.google" + + ".analytics.admin.v1alpha.AccessBinding\"\264" + + "\001\332A\016access_binding\202\323\344\223\002\234\0012:/v1alpha/{acc" + + "ess_binding.name=accounts/*/accessBindin" + + "gs/*}:\016access_bindingZN2\"9/v1alpha/{parent=properties/*}/ac" + + "cessBindings:batchCreate:\001*\022\217\002\n\026BatchGet" + + "AccessBindings\022=.google.analytics.admin." + + "v1alpha.BatchGetAccessBindingsRequest\032>." + + "google.analytics.admin.v1alpha.BatchGetA" + + "ccessBindingsResponse\"v\202\323\344\223\002p\0224/v1alpha/" + + "{parent=accounts/*}/accessBindings:batch" + + "GetZ8\0226/v1alpha/{parent=properties/*}/ac" + + "cessBindings:batchGet\022\245\002\n\031BatchUpdateAcc" + + "essBindings\022@.google.analytics.admin.v1a" + + "lpha.BatchUpdateAccessBindingsRequest\032A." + + "google.analytics.admin.v1alpha.BatchUpda" + + "teAccessBindingsResponse\"\202\001\202\323\344\223\002|\"7/v1al" + + "pha/{parent=accounts/*}/accessBindings:b" + + "atchUpdate:\001*Z>\"9/v1alpha/{parent=proper" + + "ties/*}/accessBindings:batchUpdate:\001*\022\372\001" + + "\n\031BatchDeleteAccessBindings\022@.google.ana" + + "lytics.admin.v1alpha.BatchDeleteAccessBi" + + "ndingsRequest\032\026.google.protobuf.Empty\"\202\001" + + "\202\323\344\223\002|\"7/v1alpha/{parent=accounts/*}/acc" + + "essBindings:batchDelete:\001*Z>\"9/v1alpha/{" + + "parent=properties/*}/accessBindings:batc" + + "hDelete:\001*\022\300\001\n\022GetExpandedDataSet\0229.goog" + + "le.analytics.admin.v1alpha.GetExpandedDa" + + "taSetRequest\032/.google.analytics.admin.v1" + + "alpha.ExpandedDataSet\">\332A\004name\202\323\344\223\0021\022//v" + + "1alpha/{name=properties/*/expandedDataSe" + + "ts/*}\022\323\001\n\024ListExpandedDataSets\022;.google." + + "analytics.admin.v1alpha.ListExpandedData" + + "SetsRequest\032<.google.analytics.admin.v1a" + + "lpha.ListExpandedDataSetsResponse\"@\332A\006pa" + + "rent\202\323\344\223\0021\022//v1alpha/{parent=properties/" + + "*}/expandedDataSets\022\355\001\n\025CreateExpandedDa" + + "taSet\022<.google.analytics.admin.v1alpha.C" + + "reateExpandedDataSetRequest\032/.google.ana" + + "lytics.admin.v1alpha.ExpandedDataSet\"e\332A" + + "\030parent,expanded_data_set\202\323\344\223\002D\"//v1alph" + + "a/{parent=properties/*}/expandedDataSets" + + ":\021expanded_data_set\022\204\002\n\025UpdateExpandedDa" + + "taSet\022<.google.analytics.admin.v1alpha.U" + + "pdateExpandedDataSetRequest\032/.google.ana" + + "lytics.admin.v1alpha.ExpandedDataSet\"|\332A" + + "\035expanded_data_set,update_mask\202\323\344\223\002V2A/v" + + "1alpha/{expanded_data_set.name=propertie" + + "s/*/expandedDataSets/*}:\021expanded_data_s" + + "et\022\255\001\n\025DeleteExpandedDataSet\022<.google.an" + + "alytics.admin.v1alpha.DeleteExpandedData" + + "SetRequest\032\026.google.protobuf.Empty\">\332A\004n" + + "ame\202\323\344\223\0021*//v1alpha/{name=properties/*/e" + + "xpandedDataSets/*}\022\264\001\n\017GetChannelGroup\0226" + + ".google.analytics.admin.v1alpha.GetChann" + "elGroupRequest\032,.google.analytics.admin." - + "v1alpha.ChannelGroup\"m\332A\031channel_group,u" - + "pdate_mask\202\323\344\223\002K2:/v1alpha/{channel_grou" - + "p.name=properties/*/channelGroups/*}:\rch" - + "annel_group\022\244\001\n\022DeleteChannelGroup\0229.goo" - + "gle.analytics.admin.v1alpha.DeleteChanne" - + "lGroupRequest\032\026.google.protobuf.Empty\";\332" - + "A\004name\202\323\344\223\002.*,/v1alpha/{name=properties/" - + "*/channelGroups/*}\022\376\001\n\"SetAutomatedGa4Co" - + "nfigurationOptOut\022I.google.analytics.adm" - + "in.v1alpha.SetAutomatedGa4ConfigurationO" - + "ptOutRequest\032J.google.analytics.admin.v1" - + "alpha.SetAutomatedGa4ConfigurationOptOut" - + "Response\"A\202\323\344\223\002;\"6/v1alpha/properties:se" - + "tAutomatedGa4ConfigurationOptOut:\001*\022\206\002\n$" - + "FetchAutomatedGa4ConfigurationOptOut\022K.g" - + "oogle.analytics.admin.v1alpha.FetchAutom" - + "atedGa4ConfigurationOptOutRequest\032L.goog" - + "le.analytics.admin.v1alpha.FetchAutomate" - + "dGa4ConfigurationOptOutResponse\"C\202\323\344\223\002=\"" - + "8/v1alpha/properties:fetchAutomatedGa4Co" - + "nfigurationOptOut:\001*\022\264\001\n\017GetBigQueryLink" - + "\0226.google.analytics.admin.v1alpha.GetBig" - + "QueryLinkRequest\032,.google.analytics.admi" - + "n.v1alpha.BigQueryLink\";\332A\004name\202\323\344\223\002.\022,/" - + "v1alpha/{name=properties/*/bigQueryLinks" - + "/*}\022\307\001\n\021ListBigQueryLinks\0228.google.analy" - + "tics.admin.v1alpha.ListBigQueryLinksRequ" - + "est\0329.google.analytics.admin.v1alpha.Lis" - + "tBigQueryLinksResponse\"=\332A\006parent\202\323\344\223\002.\022" - + ",/v1alpha/{parent=properties/*}/bigQuery" - + "Links\022\373\001\n\036GetEnhancedMeasurementSettings" - + "\022E.google.analytics.admin.v1alpha.GetEnh" - + "ancedMeasurementSettingsRequest\032;.google" - + ".analytics.admin.v1alpha.EnhancedMeasure" - + "mentSettings\"U\332A\004name\202\323\344\223\002H\022F/v1alpha/{n" - + "ame=properties/*/dataStreams/*/enhancedM" - + "easurementSettings}\022\345\002\n!UpdateEnhancedMe" - + "asurementSettings\022H.google.analytics.adm" - + "in.v1alpha.UpdateEnhancedMeasurementSett" - + "ingsRequest\032;.google.analytics.admin.v1a" - + "lpha.EnhancedMeasurementSettings\"\270\001\332A)en" - + "hanced_measurement_settings,update_mask\202" - + "\323\344\223\002\205\0012d/v1alpha/{enhanced_measurement_s" - + "ettings.name=properties/*/dataStreams/*/" - + "enhancedMeasurementSettings}:\035enhanced_m" - + "easurement_settings\022\316\001\n\026CreateConnectedS" - + "iteTag\022=.google.analytics.admin.v1alpha." - + "CreateConnectedSiteTagRequest\032>.google.a" - + "nalytics.admin.v1alpha.CreateConnectedSi" - + "teTagResponse\"5\202\323\344\223\002/\"*/v1alpha/properti" - + "es:createConnectedSiteTag:\001*\022\246\001\n\026DeleteC" - + "onnectedSiteTag\022=.google.analytics.admin" - + ".v1alpha.DeleteConnectedSiteTagRequest\032\026" - + ".google.protobuf.Empty\"5\202\323\344\223\002/\"*/v1alpha" - + "/properties:deleteConnectedSiteTag:\001*\022\312\001" - + "\n\025ListConnectedSiteTags\022<.google.analyti" - + "cs.admin.v1alpha.ListConnectedSiteTagsRe" - + "quest\032=.google.analytics.admin.v1alpha.L" - + "istConnectedSiteTagsResponse\"4\202\323\344\223\002.\")/v" - + "1alpha/properties:listConnectedSiteTags:" - + "\001*\022\327\001\n\031FetchConnectedGa4Property\022@.googl" - + "e.analytics.admin.v1alpha.FetchConnected" - + "Ga4PropertyRequest\032A.google.analytics.ad" - + "min.v1alpha.FetchConnectedGa4PropertyRes" - + "ponse\"5\202\323\344\223\002/\022-/v1alpha/properties:fetch" - + "ConnectedGa4Property\022\260\001\n\016GetAdSenseLink\022" - + "5.google.analytics.admin.v1alpha.GetAdSe" - + "nseLinkRequest\032+.google.analytics.admin." - + "v1alpha.AdSenseLink\":\332A\004name\202\323\344\223\002-\022+/v1a" - + "lpha/{name=properties/*/adSenseLinks/*}\022" - + "\323\001\n\021CreateAdSenseLink\0228.google.analytics" - + ".admin.v1alpha.CreateAdSenseLinkRequest\032" - + "+.google.analytics.admin.v1alpha.AdSense" - + "Link\"W\332A\023parent,adsense_link\202\323\344\223\002;\"+/v1a" - + "lpha/{parent=properties/*}/adSenseLinks:" - + "\014adsense_link\022\241\001\n\021DeleteAdSenseLink\0228.go" - + "ogle.analytics.admin.v1alpha.DeleteAdSen" - + "seLinkRequest\032\026.google.protobuf.Empty\":\332" - + "A\004name\202\323\344\223\002-*+/v1alpha/{name=properties/" - + "*/adSenseLinks/*}\022\303\001\n\020ListAdSenseLinks\0227" - + ".google.analytics.admin.v1alpha.ListAdSe" - + "nseLinksRequest\0328.google.analytics.admin" - + ".v1alpha.ListAdSenseLinksResponse\"<\332A\006pa" - + "rent\202\323\344\223\002-\022+/v1alpha/{parent=properties/" - + "*}/adSenseLinks\022\316\001\n\022GetEventCreateRule\0229" - + ".google.analytics.admin.v1alpha.GetEvent" - + "CreateRuleRequest\032/.google.analytics.adm" - + "in.v1alpha.EventCreateRule\"L\332A\004name\202\323\344\223\002" - + "?\022=/v1alpha/{name=properties/*/dataStrea" - + "ms/*/eventCreateRules/*}\022\341\001\n\024ListEventCr" - + "eateRules\022;.google.analytics.admin.v1alp" - + "ha.ListEventCreateRulesRequest\032<.google." - + "analytics.admin.v1alpha.ListEventCreateR" - + "ulesResponse\"N\332A\006parent\202\323\344\223\002?\022=/v1alpha/" - + "{parent=properties/*/dataStreams/*}/even" - + "tCreateRules\022\373\001\n\025CreateEventCreateRule\022<" - + ".google.analytics.admin.v1alpha.CreateEv" - + "entCreateRuleRequest\032/.google.analytics." - + "admin.v1alpha.EventCreateRule\"s\332A\030parent" - + ",event_create_rule\202\323\344\223\002R\"=/v1alpha/{pare" - + "nt=properties/*/dataStreams/*}/eventCrea" - + "teRules:\021event_create_rule\022\223\002\n\025UpdateEve" - + "ntCreateRule\022<.google.analytics.admin.v1" - + "alpha.UpdateEventCreateRuleRequest\032/.goo" - + "gle.analytics.admin.v1alpha.EventCreateR" - + "ule\"\212\001\332A\035event_create_rule,update_mask\202\323" - + "\344\223\002d2O/v1alpha/{event_create_rule.name=p" - + "roperties/*/dataStreams/*/eventCreateRul" - + "es/*}:\021event_create_rule\022\273\001\n\025DeleteEvent" - + "CreateRule\022<.google.analytics.admin.v1al" - + "pha.DeleteEventCreateRuleRequest\032\026.googl" - + "e.protobuf.Empty\"L\332A\004name\202\323\344\223\002?*=/v1alph" - + "a/{name=properties/*/dataStreams/*/event" - + "CreateRules/*}\032\374\001\312A\035analyticsadmin.googl" - + "eapis.com\322A\330\001https://www.googleapis.com/" - + "auth/analytics.edit,https://www.googleap" - + "is.com/auth/analytics.manage.users,https" - + "://www.googleapis.com/auth/analytics.man" - + "age.users.readonly,https://www.googleapi" - + "s.com/auth/analytics.readonlyB{\n\"com.goo" - + "gle.analytics.admin.v1alphaB\023AnalyticsAd" - + "minProtoP\001Z>cloud.google.com/go/analytic" - + "s/admin/apiv1alpha/adminpb;adminpbb\006prot" - + "o3" + + "v1alpha.ChannelGroup\";\332A\004name\202\323\344\223\002.\022,/v1" + + "alpha/{name=properties/*/channelGroups/*" + + "}\022\307\001\n\021ListChannelGroups\0228.google.analyti" + + "cs.admin.v1alpha.ListChannelGroupsReques" + + "t\0329.google.analytics.admin.v1alpha.ListC" + + "hannelGroupsResponse\"=\332A\006parent\202\323\344\223\002.\022,/" + + "v1alpha/{parent=properties/*}/channelGro" + + "ups\022\331\001\n\022CreateChannelGroup\0229.google.anal" + + "ytics.admin.v1alpha.CreateChannelGroupRe" + + "quest\032,.google.analytics.admin.v1alpha.C" + + "hannelGroup\"Z\332A\024parent,channel_group\202\323\344\223" + + "\002=\",/v1alpha/{parent=properties/*}/chann" + + "elGroups:\rchannel_group\022\354\001\n\022UpdateChanne" + + "lGroup\0229.google.analytics.admin.v1alpha." + + "UpdateChannelGroupRequest\032,.google.analy" + + "tics.admin.v1alpha.ChannelGroup\"m\332A\031chan" + + "nel_group,update_mask\202\323\344\223\002K2:/v1alpha/{c" + + "hannel_group.name=properties/*/channelGr" + + "oups/*}:\rchannel_group\022\244\001\n\022DeleteChannel" + + "Group\0229.google.analytics.admin.v1alpha.D" + + "eleteChannelGroupRequest\032\026.google.protob" + + "uf.Empty\";\332A\004name\202\323\344\223\002.*,/v1alpha/{name=" + + "properties/*/channelGroups/*}\022\376\001\n\"SetAut" + + "omatedGa4ConfigurationOptOut\022I.google.an" + + "alytics.admin.v1alpha.SetAutomatedGa4Con" + + "figurationOptOutRequest\032J.google.analyti" + + "cs.admin.v1alpha.SetAutomatedGa4Configur", + "ationOptOutResponse\"A\202\323\344\223\002;\"6/v1alpha/pr" + + "operties:setAutomatedGa4ConfigurationOpt" + + "Out:\001*\022\206\002\n$FetchAutomatedGa4Configuratio" + + "nOptOut\022K.google.analytics.admin.v1alpha" + + ".FetchAutomatedGa4ConfigurationOptOutReq" + + "uest\032L.google.analytics.admin.v1alpha.Fe" + + "tchAutomatedGa4ConfigurationOptOutRespon" + + "se\"C\202\323\344\223\002=\"8/v1alpha/properties:fetchAut" + + "omatedGa4ConfigurationOptOut:\001*\022\264\001\n\017GetB" + + "igQueryLink\0226.google.analytics.admin.v1a" + + "lpha.GetBigQueryLinkRequest\032,.google.ana" + + "lytics.admin.v1alpha.BigQueryLink\";\332A\004na" + + "me\202\323\344\223\002.\022,/v1alpha/{name=properties/*/bi" + + "gQueryLinks/*}\022\307\001\n\021ListBigQueryLinks\0228.g" + + "oogle.analytics.admin.v1alpha.ListBigQue" + + "ryLinksRequest\0329.google.analytics.admin." + + "v1alpha.ListBigQueryLinksResponse\"=\332A\006pa" + + "rent\202\323\344\223\002.\022,/v1alpha/{parent=properties/" + + "*}/bigQueryLinks\022\373\001\n\036GetEnhancedMeasurem" + + "entSettings\022E.google.analytics.admin.v1a" + + "lpha.GetEnhancedMeasurementSettingsReque" + + "st\032;.google.analytics.admin.v1alpha.Enha" + + "ncedMeasurementSettings\"U\332A\004name\202\323\344\223\002H\022F" + + "/v1alpha/{name=properties/*/dataStreams/" + + "*/enhancedMeasurementSettings}\022\345\002\n!Updat" + + "eEnhancedMeasurementSettings\022H.google.an" + + "alytics.admin.v1alpha.UpdateEnhancedMeas" + + "urementSettingsRequest\032;.google.analytic" + + "s.admin.v1alpha.EnhancedMeasurementSetti" + + "ngs\"\270\001\332A)enhanced_measurement_settings,u" + + "pdate_mask\202\323\344\223\002\205\0012d/v1alpha/{enhanced_me" + + "asurement_settings.name=properties/*/dat" + + "aStreams/*/enhancedMeasurementSettings}:" + + "\035enhanced_measurement_settings\022\316\001\n\026Creat" + + "eConnectedSiteTag\022=.google.analytics.adm" + + "in.v1alpha.CreateConnectedSiteTagRequest" + + "\032>.google.analytics.admin.v1alpha.Create" + + "ConnectedSiteTagResponse\"5\202\323\344\223\002/\"*/v1alp" + + "ha/properties:createConnectedSiteTag:\001*\022" + + "\246\001\n\026DeleteConnectedSiteTag\022=.google.anal" + + "ytics.admin.v1alpha.DeleteConnectedSiteT" + + "agRequest\032\026.google.protobuf.Empty\"5\202\323\344\223\002" + + "/\"*/v1alpha/properties:deleteConnectedSi" + + "teTag:\001*\022\312\001\n\025ListConnectedSiteTags\022<.goo" + + "gle.analytics.admin.v1alpha.ListConnecte" + + "dSiteTagsRequest\032=.google.analytics.admi" + + "n.v1alpha.ListConnectedSiteTagsResponse\"" + + "4\202\323\344\223\002.\")/v1alpha/properties:listConnect" + + "edSiteTags:\001*\022\327\001\n\031FetchConnectedGa4Prope" + + "rty\022@.google.analytics.admin.v1alpha.Fet" + + "chConnectedGa4PropertyRequest\032A.google.a" + + "nalytics.admin.v1alpha.FetchConnectedGa4" + + "PropertyResponse\"5\202\323\344\223\002/\022-/v1alpha/prope" + + "rties:fetchConnectedGa4Property\022\260\001\n\016GetA" + + "dSenseLink\0225.google.analytics.admin.v1al" + + "pha.GetAdSenseLinkRequest\032+.google.analy" + + "tics.admin.v1alpha.AdSenseLink\":\332A\004name\202" + + "\323\344\223\002-\022+/v1alpha/{name=properties/*/adSen" + + "seLinks/*}\022\323\001\n\021CreateAdSenseLink\0228.googl" + + "e.analytics.admin.v1alpha.CreateAdSenseL" + + "inkRequest\032+.google.analytics.admin.v1al" + + "pha.AdSenseLink\"W\332A\023parent,adsense_link\202" + + "\323\344\223\002;\"+/v1alpha/{parent=properties/*}/ad" + + "SenseLinks:\014adsense_link\022\241\001\n\021DeleteAdSen" + + "seLink\0228.google.analytics.admin.v1alpha." + + "DeleteAdSenseLinkRequest\032\026.google.protob" + + "uf.Empty\":\332A\004name\202\323\344\223\002-*+/v1alpha/{name=" + + "properties/*/adSenseLinks/*}\022\303\001\n\020ListAdS" + + "enseLinks\0227.google.analytics.admin.v1alp" + + "ha.ListAdSenseLinksRequest\0328.google.anal" + + "ytics.admin.v1alpha.ListAdSenseLinksResp" + + "onse\"<\332A\006parent\202\323\344\223\002-\022+/v1alpha/{parent=" + + "properties/*}/adSenseLinks\022\316\001\n\022GetEventC" + + "reateRule\0229.google.analytics.admin.v1alp" + + "ha.GetEventCreateRuleRequest\032/.google.an" + + "alytics.admin.v1alpha.EventCreateRule\"L\332" + + "A\004name\202\323\344\223\002?\022=/v1alpha/{name=properties/" + + "*/dataStreams/*/eventCreateRules/*}\022\341\001\n\024" + + "ListEventCreateRules\022;.google.analytics." + + "admin.v1alpha.ListEventCreateRulesReques" + + "t\032<.google.analytics.admin.v1alpha.ListE" + + "ventCreateRulesResponse\"N\332A\006parent\202\323\344\223\002?" + + "\022=/v1alpha/{parent=properties/*/dataStre" + + "ams/*}/eventCreateRules\022\373\001\n\025CreateEventC" + + "reateRule\022<.google.analytics.admin.v1alp" + + "ha.CreateEventCreateRuleRequest\032/.google" + + ".analytics.admin.v1alpha.EventCreateRule" + + "\"s\332A\030parent,event_create_rule\202\323\344\223\002R\"=/v1" + + "alpha/{parent=properties/*/dataStreams/*" + + "}/eventCreateRules:\021event_create_rule\022\223\002" + + "\n\025UpdateEventCreateRule\022<.google.analyti" + + "cs.admin.v1alpha.UpdateEventCreateRuleRe" + + "quest\032/.google.analytics.admin.v1alpha.E" + + "ventCreateRule\"\212\001\332A\035event_create_rule,up" + + "date_mask\202\323\344\223\002d2O/v1alpha/{event_create_" + + "rule.name=properties/*/dataStreams/*/eve" + + "ntCreateRules/*}:\021event_create_rule\022\273\001\n\025" + + "DeleteEventCreateRule\022<.google.analytics" + + ".admin.v1alpha.DeleteEventCreateRuleRequ" + + "est\032\026.google.protobuf.Empty\"L\332A\004name\202\323\344\223" + + "\002?*=/v1alpha/{name=properties/*/dataStre" + + "ams/*/eventCreateRules/*}\022\272\002\n\033UpdateData" + + "RedactionSettings\022B.google.analytics.adm" + + "in.v1alpha.UpdateDataRedactionSettingsRe" + + "quest\0325.google.analytics.admin.v1alpha.D" + + "ataRedactionSettings\"\237\001\332A#data_redaction" + + "_settings,update_mask\202\323\344\223\002s2X/v1alpha/{d" + + "ata_redaction_settings.name=properties/*" + + "/dataStreams/*/dataRedactionSettings}:\027d" + + "ata_redaction_settings\022\343\001\n\030GetDataRedact" + + "ionSettings\022?.google.analytics.admin.v1a" + + "lpha.GetDataRedactionSettingsRequest\0325.g" + + "oogle.analytics.admin.v1alpha.DataRedact" + + "ionSettings\"O\332A\004name\202\323\344\223\002B\022@/v1alpha/{na" + + "me=properties/*/dataStreams/*/dataRedact" + + "ionSettings}\022\306\001\n\024CreateRollupProperty\022;." + + "google.analytics.admin.v1alpha.CreateRol" + + "lupPropertyRequest\032<.google.analytics.ad" + + "min.v1alpha.CreateRollupPropertyResponse" + + "\"3\202\323\344\223\002-\"(/v1alpha/properties:createRoll" + + "upProperty:\001*\022\344\001\n\033GetRollupPropertySourc" + + "eLink\022B.google.analytics.admin.v1alpha.G" + + "etRollupPropertySourceLinkRequest\0328.goog" + + "le.analytics.admin.v1alpha.RollupPropert" + + "ySourceLink\"G\332A\004name\202\323\344\223\002:\0228/v1alpha/{na" + + "me=properties/*/rollupPropertySourceLink" + + "s/*}\022\367\001\n\035ListRollupPropertySourceLinks\022D" + + ".google.analytics.admin.v1alpha.ListRoll" + + "upPropertySourceLinksRequest\032E.google.an" + + "alytics.admin.v1alpha.ListRollupProperty" + + "SourceLinksResponse\"I\332A\006parent\202\323\344\223\002:\0228/v" + + "1alpha/{parent=properties/*}/rollupPrope" + + "rtySourceLinks\022\246\002\n\036CreateRollupPropertyS" + + "ourceLink\022E.google.analytics.admin.v1alp" + + "ha.CreateRollupPropertySourceLinkRequest" + + "\0328.google.analytics.admin.v1alpha.Rollup" + + "PropertySourceLink\"\202\001\332A\"parent,rollup_pr" + + "operty_source_link\202\323\344\223\002W\"8/v1alpha/{pare" + + "nt=properties/*}/rollupPropertySourceLin" + + "ks:\033rollup_property_source_link\022\310\001\n\036Dele" + + "teRollupPropertySourceLink\022E.google.anal" + + "ytics.admin.v1alpha.DeleteRollupProperty" + + "SourceLinkRequest\032\026.google.protobuf.Empt" + + "y\"G\332A\004name\202\323\344\223\002:*8/v1alpha/{name=propert" + + "ies/*/rollupPropertySourceLinks/*}\022\272\001\n\021C" + + "reateSubproperty\0228.google.analytics.admi" + + "n.v1alpha.CreateSubpropertyRequest\0329.goo" + + "gle.analytics.admin.v1alpha.CreateSubpro" + + "pertyResponse\"0\202\323\344\223\002*\"%/v1alpha/properti" + + "es:createSubproperty:\001*\022\302\001\n\034DeleteSubpro" + + "pertyEventFilter\022C.google.analytics.admi" + + "n.v1alpha.DeleteSubpropertyEventFilterRe" + + "quest\032\026.google.protobuf.Empty\"E\332A\004name\202\323" + + "\344\223\0028*6/v1alpha/{name=properties/*/subpro" + + "pertyEventFilters/*}\022\227\002\n\034CreateSubproper" + + "tyEventFilter\022C.google.analytics.admin.v" + + "1alpha.CreateSubpropertyEventFilterReque" + + "st\0326.google.analytics.admin.v1alpha.Subp" + + "ropertyEventFilter\"z\332A\037parent,subpropert" + + "y_event_filter\202\323\344\223\002R\"6/v1alpha/{parent=p" + + "roperties/*}/subpropertyEventFilters:\030su" + + "bproperty_event_filter\032\374\001\312A\035analyticsadm" + + "in.googleapis.com\322A\330\001https://www.googlea" + + "pis.com/auth/analytics.edit,https://www." + + "googleapis.com/auth/analytics.manage.use" + + "rs,https://www.googleapis.com/auth/analy" + + "tics.manage.users.readonly,https://www.g" + + "oogleapis.com/auth/analytics.readonlyB{\n" + + "\"com.google.analytics.admin.v1alphaB\023Ana" + + "lyticsAdminProtoP\001Z>cloud.google.com/go/" + + "analytics/admin/apiv1alpha/adminpb;admin" + + "pbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -2062,6 +2095,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.analytics.admin.v1alpha.EventCreateAndEdit.getDescriptor(), com.google.analytics.admin.v1alpha.ExpandedDataSetProto.getDescriptor(), com.google.analytics.admin.v1alpha.ResourcesProto.getDescriptor(), + com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), @@ -2087,6 +2121,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TimeZone", "OrderBys", "ReturnEntityQuota", + "IncludeAllUsers", + "ExpandGroups", }); internal_static_google_analytics_admin_v1alpha_RunAccessReportResponse_descriptor = getDescriptor().getMessageTypes().get(1); @@ -2200,128 +2236,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_descriptor, - new java.lang.String[] { - "Parent", "Names", - }); - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_descriptor, - new java.lang.String[] { - "UserLinks", - }); - internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_descriptor, - new java.lang.String[] { - "UserLinks", "NextPageToken", - }); - internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_descriptor, - new java.lang.String[] { - "UserLinks", "NextPageToken", - }); - internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_descriptor, - new java.lang.String[] { - "Parent", "NotifyNewUser", "UserLink", - }); - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_descriptor, - new java.lang.String[] { - "Parent", "NotifyNewUsers", "Requests", - }); - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_descriptor, - new java.lang.String[] { - "UserLinks", - }); - internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_descriptor, - new java.lang.String[] { - "UserLink", - }); - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_descriptor, - new java.lang.String[] { - "Parent", "Requests", - }); - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_descriptor, - new java.lang.String[] { - "UserLinks", - }); - internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_descriptor, - new java.lang.String[] { - "Parent", "Requests", - }); internal_static_google_analytics_admin_v1alpha_CreateFirebaseLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(15); internal_static_google_analytics_admin_v1alpha_CreateFirebaseLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateFirebaseLinkRequest_descriptor, @@ -2329,7 +2245,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "FirebaseLink", }); internal_static_google_analytics_admin_v1alpha_DeleteFirebaseLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(16); internal_static_google_analytics_admin_v1alpha_DeleteFirebaseLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteFirebaseLinkRequest_descriptor, @@ -2337,7 +2253,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListFirebaseLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(17); internal_static_google_analytics_admin_v1alpha_ListFirebaseLinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListFirebaseLinksRequest_descriptor, @@ -2345,7 +2261,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListFirebaseLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(18); internal_static_google_analytics_admin_v1alpha_ListFirebaseLinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListFirebaseLinksResponse_descriptor, @@ -2353,7 +2269,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FirebaseLinks", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetGlobalSiteTagRequest_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(19); internal_static_google_analytics_admin_v1alpha_GetGlobalSiteTagRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetGlobalSiteTagRequest_descriptor, @@ -2361,7 +2277,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_CreateGoogleAdsLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(20); internal_static_google_analytics_admin_v1alpha_CreateGoogleAdsLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateGoogleAdsLinkRequest_descriptor, @@ -2369,7 +2285,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "GoogleAdsLink", }); internal_static_google_analytics_admin_v1alpha_UpdateGoogleAdsLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(21); internal_static_google_analytics_admin_v1alpha_UpdateGoogleAdsLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateGoogleAdsLinkRequest_descriptor, @@ -2377,7 +2293,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GoogleAdsLink", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_DeleteGoogleAdsLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(22); internal_static_google_analytics_admin_v1alpha_DeleteGoogleAdsLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteGoogleAdsLinkRequest_descriptor, @@ -2385,7 +2301,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListGoogleAdsLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(23); internal_static_google_analytics_admin_v1alpha_ListGoogleAdsLinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListGoogleAdsLinksRequest_descriptor, @@ -2393,7 +2309,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListGoogleAdsLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(24); internal_static_google_analytics_admin_v1alpha_ListGoogleAdsLinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListGoogleAdsLinksResponse_descriptor, @@ -2401,7 +2317,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GoogleAdsLinks", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetDataSharingSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(25); internal_static_google_analytics_admin_v1alpha_GetDataSharingSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetDataSharingSettingsRequest_descriptor, @@ -2409,7 +2325,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(26); internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor, @@ -2417,7 +2333,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(27); internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor, @@ -2425,7 +2341,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccountSummaries", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_AcknowledgeUserDataCollectionRequest_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(28); internal_static_google_analytics_admin_v1alpha_AcknowledgeUserDataCollectionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_AcknowledgeUserDataCollectionRequest_descriptor, @@ -2433,13 +2349,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", "Acknowledgement", }); internal_static_google_analytics_admin_v1alpha_AcknowledgeUserDataCollectionResponse_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(29); internal_static_google_analytics_admin_v1alpha_AcknowledgeUserDataCollectionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_AcknowledgeUserDataCollectionResponse_descriptor, new java.lang.String[] {}); internal_static_google_analytics_admin_v1alpha_SearchChangeHistoryEventsRequest_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(30); internal_static_google_analytics_admin_v1alpha_SearchChangeHistoryEventsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_SearchChangeHistoryEventsRequest_descriptor, @@ -2455,7 +2371,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PageToken", }); internal_static_google_analytics_admin_v1alpha_SearchChangeHistoryEventsResponse_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(31); internal_static_google_analytics_admin_v1alpha_SearchChangeHistoryEventsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_SearchChangeHistoryEventsResponse_descriptor, @@ -2463,7 +2379,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ChangeHistoryEvents", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetMeasurementProtocolSecretRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(32); internal_static_google_analytics_admin_v1alpha_GetMeasurementProtocolSecretRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetMeasurementProtocolSecretRequest_descriptor, @@ -2471,7 +2387,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_CreateMeasurementProtocolSecretRequest_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(33); internal_static_google_analytics_admin_v1alpha_CreateMeasurementProtocolSecretRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateMeasurementProtocolSecretRequest_descriptor, @@ -2479,7 +2395,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "MeasurementProtocolSecret", }); internal_static_google_analytics_admin_v1alpha_DeleteMeasurementProtocolSecretRequest_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(34); internal_static_google_analytics_admin_v1alpha_DeleteMeasurementProtocolSecretRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteMeasurementProtocolSecretRequest_descriptor, @@ -2487,7 +2403,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateMeasurementProtocolSecretRequest_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(35); internal_static_google_analytics_admin_v1alpha_UpdateMeasurementProtocolSecretRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateMeasurementProtocolSecretRequest_descriptor, @@ -2495,7 +2411,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MeasurementProtocolSecret", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_ListMeasurementProtocolSecretsRequest_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(36); internal_static_google_analytics_admin_v1alpha_ListMeasurementProtocolSecretsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListMeasurementProtocolSecretsRequest_descriptor, @@ -2503,7 +2419,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListMeasurementProtocolSecretsResponse_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(37); internal_static_google_analytics_admin_v1alpha_ListMeasurementProtocolSecretsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListMeasurementProtocolSecretsResponse_descriptor, @@ -2511,7 +2427,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MeasurementProtocolSecrets", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetSKAdNetworkConversionValueSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(38); internal_static_google_analytics_admin_v1alpha_GetSKAdNetworkConversionValueSchemaRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetSKAdNetworkConversionValueSchemaRequest_descriptor, @@ -2519,7 +2435,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_CreateSKAdNetworkConversionValueSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageTypes().get(39); internal_static_google_analytics_admin_v1alpha_CreateSKAdNetworkConversionValueSchemaRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateSKAdNetworkConversionValueSchemaRequest_descriptor, @@ -2527,7 +2443,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "SkadnetworkConversionValueSchema", }); internal_static_google_analytics_admin_v1alpha_DeleteSKAdNetworkConversionValueSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(55); + getDescriptor().getMessageTypes().get(40); internal_static_google_analytics_admin_v1alpha_DeleteSKAdNetworkConversionValueSchemaRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteSKAdNetworkConversionValueSchemaRequest_descriptor, @@ -2535,7 +2451,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateSKAdNetworkConversionValueSchemaRequest_descriptor = - getDescriptor().getMessageTypes().get(56); + getDescriptor().getMessageTypes().get(41); internal_static_google_analytics_admin_v1alpha_UpdateSKAdNetworkConversionValueSchemaRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateSKAdNetworkConversionValueSchemaRequest_descriptor, @@ -2543,7 +2459,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SkadnetworkConversionValueSchema", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_ListSKAdNetworkConversionValueSchemasRequest_descriptor = - getDescriptor().getMessageTypes().get(57); + getDescriptor().getMessageTypes().get(42); internal_static_google_analytics_admin_v1alpha_ListSKAdNetworkConversionValueSchemasRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListSKAdNetworkConversionValueSchemasRequest_descriptor, @@ -2551,7 +2467,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListSKAdNetworkConversionValueSchemasResponse_descriptor = - getDescriptor().getMessageTypes().get(58); + getDescriptor().getMessageTypes().get(43); internal_static_google_analytics_admin_v1alpha_ListSKAdNetworkConversionValueSchemasResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListSKAdNetworkConversionValueSchemasResponse_descriptor, @@ -2559,7 +2475,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SkadnetworkConversionValueSchemas", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetGoogleSignalsSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(59); + getDescriptor().getMessageTypes().get(44); internal_static_google_analytics_admin_v1alpha_GetGoogleSignalsSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetGoogleSignalsSettingsRequest_descriptor, @@ -2567,7 +2483,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateGoogleSignalsSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(60); + getDescriptor().getMessageTypes().get(45); internal_static_google_analytics_admin_v1alpha_UpdateGoogleSignalsSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateGoogleSignalsSettingsRequest_descriptor, @@ -2575,7 +2491,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GoogleSignalsSettings", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_CreateConversionEventRequest_descriptor = - getDescriptor().getMessageTypes().get(61); + getDescriptor().getMessageTypes().get(46); internal_static_google_analytics_admin_v1alpha_CreateConversionEventRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateConversionEventRequest_descriptor, @@ -2583,7 +2499,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConversionEvent", "Parent", }); internal_static_google_analytics_admin_v1alpha_UpdateConversionEventRequest_descriptor = - getDescriptor().getMessageTypes().get(62); + getDescriptor().getMessageTypes().get(47); internal_static_google_analytics_admin_v1alpha_UpdateConversionEventRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateConversionEventRequest_descriptor, @@ -2591,7 +2507,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConversionEvent", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_GetConversionEventRequest_descriptor = - getDescriptor().getMessageTypes().get(63); + getDescriptor().getMessageTypes().get(48); internal_static_google_analytics_admin_v1alpha_GetConversionEventRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetConversionEventRequest_descriptor, @@ -2599,7 +2515,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_DeleteConversionEventRequest_descriptor = - getDescriptor().getMessageTypes().get(64); + getDescriptor().getMessageTypes().get(49); internal_static_google_analytics_admin_v1alpha_DeleteConversionEventRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteConversionEventRequest_descriptor, @@ -2607,7 +2523,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListConversionEventsRequest_descriptor = - getDescriptor().getMessageTypes().get(65); + getDescriptor().getMessageTypes().get(50); internal_static_google_analytics_admin_v1alpha_ListConversionEventsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListConversionEventsRequest_descriptor, @@ -2615,7 +2531,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListConversionEventsResponse_descriptor = - getDescriptor().getMessageTypes().get(66); + getDescriptor().getMessageTypes().get(51); internal_static_google_analytics_admin_v1alpha_ListConversionEventsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListConversionEventsResponse_descriptor, @@ -2623,7 +2539,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConversionEvents", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetDisplayVideo360AdvertiserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(67); + getDescriptor().getMessageTypes().get(52); internal_static_google_analytics_admin_v1alpha_GetDisplayVideo360AdvertiserLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetDisplayVideo360AdvertiserLinkRequest_descriptor, @@ -2631,7 +2547,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(68); + getDescriptor().getMessageTypes().get(53); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinksRequest_descriptor, @@ -2639,7 +2555,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(69); + getDescriptor().getMessageTypes().get(54); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinksResponse_descriptor, @@ -2647,7 +2563,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayVideo360AdvertiserLinks", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_CreateDisplayVideo360AdvertiserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(70); + getDescriptor().getMessageTypes().get(55); internal_static_google_analytics_admin_v1alpha_CreateDisplayVideo360AdvertiserLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateDisplayVideo360AdvertiserLinkRequest_descriptor, @@ -2655,7 +2571,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "DisplayVideo360AdvertiserLink", }); internal_static_google_analytics_admin_v1alpha_DeleteDisplayVideo360AdvertiserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(71); + getDescriptor().getMessageTypes().get(56); internal_static_google_analytics_admin_v1alpha_DeleteDisplayVideo360AdvertiserLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteDisplayVideo360AdvertiserLinkRequest_descriptor, @@ -2663,7 +2579,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateDisplayVideo360AdvertiserLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(72); + getDescriptor().getMessageTypes().get(57); internal_static_google_analytics_admin_v1alpha_UpdateDisplayVideo360AdvertiserLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateDisplayVideo360AdvertiserLinkRequest_descriptor, @@ -2671,7 +2587,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayVideo360AdvertiserLink", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_GetDisplayVideo360AdvertiserLinkProposalRequest_descriptor = - getDescriptor().getMessageTypes().get(73); + getDescriptor().getMessageTypes().get(58); internal_static_google_analytics_admin_v1alpha_GetDisplayVideo360AdvertiserLinkProposalRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetDisplayVideo360AdvertiserLinkProposalRequest_descriptor, @@ -2679,7 +2595,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinkProposalsRequest_descriptor = - getDescriptor().getMessageTypes().get(74); + getDescriptor().getMessageTypes().get(59); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinkProposalsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinkProposalsRequest_descriptor, @@ -2687,7 +2603,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinkProposalsResponse_descriptor = - getDescriptor().getMessageTypes().get(75); + getDescriptor().getMessageTypes().get(60); internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinkProposalsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListDisplayVideo360AdvertiserLinkProposalsResponse_descriptor, @@ -2695,7 +2611,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayVideo360AdvertiserLinkProposals", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_CreateDisplayVideo360AdvertiserLinkProposalRequest_descriptor = - getDescriptor().getMessageTypes().get(76); + getDescriptor().getMessageTypes().get(61); internal_static_google_analytics_admin_v1alpha_CreateDisplayVideo360AdvertiserLinkProposalRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateDisplayVideo360AdvertiserLinkProposalRequest_descriptor, @@ -2703,7 +2619,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "DisplayVideo360AdvertiserLinkProposal", }); internal_static_google_analytics_admin_v1alpha_DeleteDisplayVideo360AdvertiserLinkProposalRequest_descriptor = - getDescriptor().getMessageTypes().get(77); + getDescriptor().getMessageTypes().get(62); internal_static_google_analytics_admin_v1alpha_DeleteDisplayVideo360AdvertiserLinkProposalRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteDisplayVideo360AdvertiserLinkProposalRequest_descriptor, @@ -2711,7 +2627,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ApproveDisplayVideo360AdvertiserLinkProposalRequest_descriptor = - getDescriptor().getMessageTypes().get(78); + getDescriptor().getMessageTypes().get(63); internal_static_google_analytics_admin_v1alpha_ApproveDisplayVideo360AdvertiserLinkProposalRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ApproveDisplayVideo360AdvertiserLinkProposalRequest_descriptor, @@ -2719,7 +2635,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ApproveDisplayVideo360AdvertiserLinkProposalResponse_descriptor = - getDescriptor().getMessageTypes().get(79); + getDescriptor().getMessageTypes().get(64); internal_static_google_analytics_admin_v1alpha_ApproveDisplayVideo360AdvertiserLinkProposalResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ApproveDisplayVideo360AdvertiserLinkProposalResponse_descriptor, @@ -2727,7 +2643,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayVideo360AdvertiserLink", }); internal_static_google_analytics_admin_v1alpha_CancelDisplayVideo360AdvertiserLinkProposalRequest_descriptor = - getDescriptor().getMessageTypes().get(80); + getDescriptor().getMessageTypes().get(65); internal_static_google_analytics_admin_v1alpha_CancelDisplayVideo360AdvertiserLinkProposalRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CancelDisplayVideo360AdvertiserLinkProposalRequest_descriptor, @@ -2735,7 +2651,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetSearchAds360LinkRequest_descriptor = - getDescriptor().getMessageTypes().get(81); + getDescriptor().getMessageTypes().get(66); internal_static_google_analytics_admin_v1alpha_GetSearchAds360LinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetSearchAds360LinkRequest_descriptor, @@ -2743,7 +2659,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListSearchAds360LinksRequest_descriptor = - getDescriptor().getMessageTypes().get(82); + getDescriptor().getMessageTypes().get(67); internal_static_google_analytics_admin_v1alpha_ListSearchAds360LinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListSearchAds360LinksRequest_descriptor, @@ -2751,7 +2667,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListSearchAds360LinksResponse_descriptor = - getDescriptor().getMessageTypes().get(83); + getDescriptor().getMessageTypes().get(68); internal_static_google_analytics_admin_v1alpha_ListSearchAds360LinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListSearchAds360LinksResponse_descriptor, @@ -2759,7 +2675,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SearchAds360Links", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_CreateSearchAds360LinkRequest_descriptor = - getDescriptor().getMessageTypes().get(84); + getDescriptor().getMessageTypes().get(69); internal_static_google_analytics_admin_v1alpha_CreateSearchAds360LinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateSearchAds360LinkRequest_descriptor, @@ -2767,7 +2683,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "SearchAds360Link", }); internal_static_google_analytics_admin_v1alpha_DeleteSearchAds360LinkRequest_descriptor = - getDescriptor().getMessageTypes().get(85); + getDescriptor().getMessageTypes().get(70); internal_static_google_analytics_admin_v1alpha_DeleteSearchAds360LinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteSearchAds360LinkRequest_descriptor, @@ -2775,7 +2691,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateSearchAds360LinkRequest_descriptor = - getDescriptor().getMessageTypes().get(86); + getDescriptor().getMessageTypes().get(71); internal_static_google_analytics_admin_v1alpha_UpdateSearchAds360LinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateSearchAds360LinkRequest_descriptor, @@ -2783,7 +2699,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SearchAds360Link", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_CreateCustomDimensionRequest_descriptor = - getDescriptor().getMessageTypes().get(87); + getDescriptor().getMessageTypes().get(72); internal_static_google_analytics_admin_v1alpha_CreateCustomDimensionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateCustomDimensionRequest_descriptor, @@ -2791,7 +2707,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "CustomDimension", }); internal_static_google_analytics_admin_v1alpha_UpdateCustomDimensionRequest_descriptor = - getDescriptor().getMessageTypes().get(88); + getDescriptor().getMessageTypes().get(73); internal_static_google_analytics_admin_v1alpha_UpdateCustomDimensionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateCustomDimensionRequest_descriptor, @@ -2799,7 +2715,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomDimension", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_ListCustomDimensionsRequest_descriptor = - getDescriptor().getMessageTypes().get(89); + getDescriptor().getMessageTypes().get(74); internal_static_google_analytics_admin_v1alpha_ListCustomDimensionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListCustomDimensionsRequest_descriptor, @@ -2807,7 +2723,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListCustomDimensionsResponse_descriptor = - getDescriptor().getMessageTypes().get(90); + getDescriptor().getMessageTypes().get(75); internal_static_google_analytics_admin_v1alpha_ListCustomDimensionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListCustomDimensionsResponse_descriptor, @@ -2815,7 +2731,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomDimensions", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_ArchiveCustomDimensionRequest_descriptor = - getDescriptor().getMessageTypes().get(91); + getDescriptor().getMessageTypes().get(76); internal_static_google_analytics_admin_v1alpha_ArchiveCustomDimensionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ArchiveCustomDimensionRequest_descriptor, @@ -2823,7 +2739,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetCustomDimensionRequest_descriptor = - getDescriptor().getMessageTypes().get(92); + getDescriptor().getMessageTypes().get(77); internal_static_google_analytics_admin_v1alpha_GetCustomDimensionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetCustomDimensionRequest_descriptor, @@ -2831,7 +2747,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_CreateCustomMetricRequest_descriptor = - getDescriptor().getMessageTypes().get(93); + getDescriptor().getMessageTypes().get(78); internal_static_google_analytics_admin_v1alpha_CreateCustomMetricRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateCustomMetricRequest_descriptor, @@ -2839,7 +2755,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "CustomMetric", }); internal_static_google_analytics_admin_v1alpha_UpdateCustomMetricRequest_descriptor = - getDescriptor().getMessageTypes().get(94); + getDescriptor().getMessageTypes().get(79); internal_static_google_analytics_admin_v1alpha_UpdateCustomMetricRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateCustomMetricRequest_descriptor, @@ -2847,7 +2763,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomMetric", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_ListCustomMetricsRequest_descriptor = - getDescriptor().getMessageTypes().get(95); + getDescriptor().getMessageTypes().get(80); internal_static_google_analytics_admin_v1alpha_ListCustomMetricsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListCustomMetricsRequest_descriptor, @@ -2855,7 +2771,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListCustomMetricsResponse_descriptor = - getDescriptor().getMessageTypes().get(96); + getDescriptor().getMessageTypes().get(81); internal_static_google_analytics_admin_v1alpha_ListCustomMetricsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListCustomMetricsResponse_descriptor, @@ -2863,7 +2779,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomMetrics", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_ArchiveCustomMetricRequest_descriptor = - getDescriptor().getMessageTypes().get(97); + getDescriptor().getMessageTypes().get(82); internal_static_google_analytics_admin_v1alpha_ArchiveCustomMetricRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ArchiveCustomMetricRequest_descriptor, @@ -2871,7 +2787,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetCustomMetricRequest_descriptor = - getDescriptor().getMessageTypes().get(98); + getDescriptor().getMessageTypes().get(83); internal_static_google_analytics_admin_v1alpha_GetCustomMetricRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetCustomMetricRequest_descriptor, @@ -2879,7 +2795,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetDataRetentionSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(99); + getDescriptor().getMessageTypes().get(84); internal_static_google_analytics_admin_v1alpha_GetDataRetentionSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetDataRetentionSettingsRequest_descriptor, @@ -2887,7 +2803,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateDataRetentionSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(100); + getDescriptor().getMessageTypes().get(85); internal_static_google_analytics_admin_v1alpha_UpdateDataRetentionSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateDataRetentionSettingsRequest_descriptor, @@ -2895,7 +2811,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataRetentionSettings", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_CreateDataStreamRequest_descriptor = - getDescriptor().getMessageTypes().get(101); + getDescriptor().getMessageTypes().get(86); internal_static_google_analytics_admin_v1alpha_CreateDataStreamRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateDataStreamRequest_descriptor, @@ -2903,7 +2819,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "DataStream", }); internal_static_google_analytics_admin_v1alpha_DeleteDataStreamRequest_descriptor = - getDescriptor().getMessageTypes().get(102); + getDescriptor().getMessageTypes().get(87); internal_static_google_analytics_admin_v1alpha_DeleteDataStreamRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteDataStreamRequest_descriptor, @@ -2911,7 +2827,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateDataStreamRequest_descriptor = - getDescriptor().getMessageTypes().get(103); + getDescriptor().getMessageTypes().get(88); internal_static_google_analytics_admin_v1alpha_UpdateDataStreamRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateDataStreamRequest_descriptor, @@ -2919,7 +2835,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataStream", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_ListDataStreamsRequest_descriptor = - getDescriptor().getMessageTypes().get(104); + getDescriptor().getMessageTypes().get(89); internal_static_google_analytics_admin_v1alpha_ListDataStreamsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListDataStreamsRequest_descriptor, @@ -2927,7 +2843,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListDataStreamsResponse_descriptor = - getDescriptor().getMessageTypes().get(105); + getDescriptor().getMessageTypes().get(90); internal_static_google_analytics_admin_v1alpha_ListDataStreamsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListDataStreamsResponse_descriptor, @@ -2935,7 +2851,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DataStreams", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetDataStreamRequest_descriptor = - getDescriptor().getMessageTypes().get(106); + getDescriptor().getMessageTypes().get(91); internal_static_google_analytics_admin_v1alpha_GetDataStreamRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetDataStreamRequest_descriptor, @@ -2943,7 +2859,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetAudienceRequest_descriptor = - getDescriptor().getMessageTypes().get(107); + getDescriptor().getMessageTypes().get(92); internal_static_google_analytics_admin_v1alpha_GetAudienceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetAudienceRequest_descriptor, @@ -2951,7 +2867,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListAudiencesRequest_descriptor = - getDescriptor().getMessageTypes().get(108); + getDescriptor().getMessageTypes().get(93); internal_static_google_analytics_admin_v1alpha_ListAudiencesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAudiencesRequest_descriptor, @@ -2959,7 +2875,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListAudiencesResponse_descriptor = - getDescriptor().getMessageTypes().get(109); + getDescriptor().getMessageTypes().get(94); internal_static_google_analytics_admin_v1alpha_ListAudiencesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAudiencesResponse_descriptor, @@ -2967,7 +2883,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Audiences", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_CreateAudienceRequest_descriptor = - getDescriptor().getMessageTypes().get(110); + getDescriptor().getMessageTypes().get(95); internal_static_google_analytics_admin_v1alpha_CreateAudienceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateAudienceRequest_descriptor, @@ -2975,7 +2891,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Audience", }); internal_static_google_analytics_admin_v1alpha_UpdateAudienceRequest_descriptor = - getDescriptor().getMessageTypes().get(111); + getDescriptor().getMessageTypes().get(96); internal_static_google_analytics_admin_v1alpha_UpdateAudienceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateAudienceRequest_descriptor, @@ -2983,7 +2899,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Audience", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_ArchiveAudienceRequest_descriptor = - getDescriptor().getMessageTypes().get(112); + getDescriptor().getMessageTypes().get(97); internal_static_google_analytics_admin_v1alpha_ArchiveAudienceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ArchiveAudienceRequest_descriptor, @@ -2991,7 +2907,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetAttributionSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(113); + getDescriptor().getMessageTypes().get(98); internal_static_google_analytics_admin_v1alpha_GetAttributionSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetAttributionSettingsRequest_descriptor, @@ -2999,7 +2915,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateAttributionSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(114); + getDescriptor().getMessageTypes().get(99); internal_static_google_analytics_admin_v1alpha_UpdateAttributionSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateAttributionSettingsRequest_descriptor, @@ -3007,7 +2923,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AttributionSettings", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_GetAccessBindingRequest_descriptor = - getDescriptor().getMessageTypes().get(115); + getDescriptor().getMessageTypes().get(100); internal_static_google_analytics_admin_v1alpha_GetAccessBindingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetAccessBindingRequest_descriptor, @@ -3015,7 +2931,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_BatchGetAccessBindingsRequest_descriptor = - getDescriptor().getMessageTypes().get(116); + getDescriptor().getMessageTypes().get(101); internal_static_google_analytics_admin_v1alpha_BatchGetAccessBindingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BatchGetAccessBindingsRequest_descriptor, @@ -3023,7 +2939,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Names", }); internal_static_google_analytics_admin_v1alpha_BatchGetAccessBindingsResponse_descriptor = - getDescriptor().getMessageTypes().get(117); + getDescriptor().getMessageTypes().get(102); internal_static_google_analytics_admin_v1alpha_BatchGetAccessBindingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BatchGetAccessBindingsResponse_descriptor, @@ -3031,7 +2947,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccessBindings", }); internal_static_google_analytics_admin_v1alpha_ListAccessBindingsRequest_descriptor = - getDescriptor().getMessageTypes().get(118); + getDescriptor().getMessageTypes().get(103); internal_static_google_analytics_admin_v1alpha_ListAccessBindingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAccessBindingsRequest_descriptor, @@ -3039,7 +2955,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListAccessBindingsResponse_descriptor = - getDescriptor().getMessageTypes().get(119); + getDescriptor().getMessageTypes().get(104); internal_static_google_analytics_admin_v1alpha_ListAccessBindingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAccessBindingsResponse_descriptor, @@ -3047,7 +2963,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccessBindings", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_CreateAccessBindingRequest_descriptor = - getDescriptor().getMessageTypes().get(120); + getDescriptor().getMessageTypes().get(105); internal_static_google_analytics_admin_v1alpha_CreateAccessBindingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateAccessBindingRequest_descriptor, @@ -3055,7 +2971,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "AccessBinding", }); internal_static_google_analytics_admin_v1alpha_BatchCreateAccessBindingsRequest_descriptor = - getDescriptor().getMessageTypes().get(121); + getDescriptor().getMessageTypes().get(106); internal_static_google_analytics_admin_v1alpha_BatchCreateAccessBindingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BatchCreateAccessBindingsRequest_descriptor, @@ -3063,7 +2979,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Requests", }); internal_static_google_analytics_admin_v1alpha_BatchCreateAccessBindingsResponse_descriptor = - getDescriptor().getMessageTypes().get(122); + getDescriptor().getMessageTypes().get(107); internal_static_google_analytics_admin_v1alpha_BatchCreateAccessBindingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BatchCreateAccessBindingsResponse_descriptor, @@ -3071,7 +2987,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccessBindings", }); internal_static_google_analytics_admin_v1alpha_UpdateAccessBindingRequest_descriptor = - getDescriptor().getMessageTypes().get(123); + getDescriptor().getMessageTypes().get(108); internal_static_google_analytics_admin_v1alpha_UpdateAccessBindingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateAccessBindingRequest_descriptor, @@ -3079,7 +2995,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccessBinding", }); internal_static_google_analytics_admin_v1alpha_BatchUpdateAccessBindingsRequest_descriptor = - getDescriptor().getMessageTypes().get(124); + getDescriptor().getMessageTypes().get(109); internal_static_google_analytics_admin_v1alpha_BatchUpdateAccessBindingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BatchUpdateAccessBindingsRequest_descriptor, @@ -3087,7 +3003,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Requests", }); internal_static_google_analytics_admin_v1alpha_BatchUpdateAccessBindingsResponse_descriptor = - getDescriptor().getMessageTypes().get(125); + getDescriptor().getMessageTypes().get(110); internal_static_google_analytics_admin_v1alpha_BatchUpdateAccessBindingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BatchUpdateAccessBindingsResponse_descriptor, @@ -3095,7 +3011,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccessBindings", }); internal_static_google_analytics_admin_v1alpha_DeleteAccessBindingRequest_descriptor = - getDescriptor().getMessageTypes().get(126); + getDescriptor().getMessageTypes().get(111); internal_static_google_analytics_admin_v1alpha_DeleteAccessBindingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteAccessBindingRequest_descriptor, @@ -3103,7 +3019,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_BatchDeleteAccessBindingsRequest_descriptor = - getDescriptor().getMessageTypes().get(127); + getDescriptor().getMessageTypes().get(112); internal_static_google_analytics_admin_v1alpha_BatchDeleteAccessBindingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BatchDeleteAccessBindingsRequest_descriptor, @@ -3111,7 +3027,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Requests", }); internal_static_google_analytics_admin_v1alpha_CreateExpandedDataSetRequest_descriptor = - getDescriptor().getMessageTypes().get(128); + getDescriptor().getMessageTypes().get(113); internal_static_google_analytics_admin_v1alpha_CreateExpandedDataSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateExpandedDataSetRequest_descriptor, @@ -3119,7 +3035,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ExpandedDataSet", }); internal_static_google_analytics_admin_v1alpha_UpdateExpandedDataSetRequest_descriptor = - getDescriptor().getMessageTypes().get(129); + getDescriptor().getMessageTypes().get(114); internal_static_google_analytics_admin_v1alpha_UpdateExpandedDataSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateExpandedDataSetRequest_descriptor, @@ -3127,7 +3043,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExpandedDataSet", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_DeleteExpandedDataSetRequest_descriptor = - getDescriptor().getMessageTypes().get(130); + getDescriptor().getMessageTypes().get(115); internal_static_google_analytics_admin_v1alpha_DeleteExpandedDataSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteExpandedDataSetRequest_descriptor, @@ -3135,7 +3051,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetExpandedDataSetRequest_descriptor = - getDescriptor().getMessageTypes().get(131); + getDescriptor().getMessageTypes().get(116); internal_static_google_analytics_admin_v1alpha_GetExpandedDataSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetExpandedDataSetRequest_descriptor, @@ -3143,7 +3059,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListExpandedDataSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(132); + getDescriptor().getMessageTypes().get(117); internal_static_google_analytics_admin_v1alpha_ListExpandedDataSetsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListExpandedDataSetsRequest_descriptor, @@ -3151,7 +3067,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListExpandedDataSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(133); + getDescriptor().getMessageTypes().get(118); internal_static_google_analytics_admin_v1alpha_ListExpandedDataSetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListExpandedDataSetsResponse_descriptor, @@ -3159,7 +3075,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExpandedDataSets", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_CreateChannelGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(134); + getDescriptor().getMessageTypes().get(119); internal_static_google_analytics_admin_v1alpha_CreateChannelGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateChannelGroupRequest_descriptor, @@ -3167,7 +3083,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ChannelGroup", }); internal_static_google_analytics_admin_v1alpha_UpdateChannelGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(135); + getDescriptor().getMessageTypes().get(120); internal_static_google_analytics_admin_v1alpha_UpdateChannelGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateChannelGroupRequest_descriptor, @@ -3175,7 +3091,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ChannelGroup", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_DeleteChannelGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(136); + getDescriptor().getMessageTypes().get(121); internal_static_google_analytics_admin_v1alpha_DeleteChannelGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteChannelGroupRequest_descriptor, @@ -3183,7 +3099,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetChannelGroupRequest_descriptor = - getDescriptor().getMessageTypes().get(137); + getDescriptor().getMessageTypes().get(122); internal_static_google_analytics_admin_v1alpha_GetChannelGroupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetChannelGroupRequest_descriptor, @@ -3191,7 +3107,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListChannelGroupsRequest_descriptor = - getDescriptor().getMessageTypes().get(138); + getDescriptor().getMessageTypes().get(123); internal_static_google_analytics_admin_v1alpha_ListChannelGroupsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListChannelGroupsRequest_descriptor, @@ -3199,7 +3115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListChannelGroupsResponse_descriptor = - getDescriptor().getMessageTypes().get(139); + getDescriptor().getMessageTypes().get(124); internal_static_google_analytics_admin_v1alpha_ListChannelGroupsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListChannelGroupsResponse_descriptor, @@ -3207,7 +3123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ChannelGroups", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_SetAutomatedGa4ConfigurationOptOutRequest_descriptor = - getDescriptor().getMessageTypes().get(140); + getDescriptor().getMessageTypes().get(125); internal_static_google_analytics_admin_v1alpha_SetAutomatedGa4ConfigurationOptOutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_SetAutomatedGa4ConfigurationOptOutRequest_descriptor, @@ -3215,13 +3131,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", "OptOut", }); internal_static_google_analytics_admin_v1alpha_SetAutomatedGa4ConfigurationOptOutResponse_descriptor = - getDescriptor().getMessageTypes().get(141); + getDescriptor().getMessageTypes().get(126); internal_static_google_analytics_admin_v1alpha_SetAutomatedGa4ConfigurationOptOutResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_SetAutomatedGa4ConfigurationOptOutResponse_descriptor, new java.lang.String[] {}); internal_static_google_analytics_admin_v1alpha_FetchAutomatedGa4ConfigurationOptOutRequest_descriptor = - getDescriptor().getMessageTypes().get(142); + getDescriptor().getMessageTypes().get(127); internal_static_google_analytics_admin_v1alpha_FetchAutomatedGa4ConfigurationOptOutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_FetchAutomatedGa4ConfigurationOptOutRequest_descriptor, @@ -3229,7 +3145,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", }); internal_static_google_analytics_admin_v1alpha_FetchAutomatedGa4ConfigurationOptOutResponse_descriptor = - getDescriptor().getMessageTypes().get(143); + getDescriptor().getMessageTypes().get(128); internal_static_google_analytics_admin_v1alpha_FetchAutomatedGa4ConfigurationOptOutResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_FetchAutomatedGa4ConfigurationOptOutResponse_descriptor, @@ -3237,7 +3153,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OptOut", }); internal_static_google_analytics_admin_v1alpha_GetBigQueryLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(144); + getDescriptor().getMessageTypes().get(129); internal_static_google_analytics_admin_v1alpha_GetBigQueryLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetBigQueryLinkRequest_descriptor, @@ -3245,7 +3161,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListBigQueryLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(145); + getDescriptor().getMessageTypes().get(130); internal_static_google_analytics_admin_v1alpha_ListBigQueryLinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListBigQueryLinksRequest_descriptor, @@ -3253,7 +3169,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListBigQueryLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(146); + getDescriptor().getMessageTypes().get(131); internal_static_google_analytics_admin_v1alpha_ListBigQueryLinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListBigQueryLinksResponse_descriptor, @@ -3261,7 +3177,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BigqueryLinks", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_GetEnhancedMeasurementSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(147); + getDescriptor().getMessageTypes().get(132); internal_static_google_analytics_admin_v1alpha_GetEnhancedMeasurementSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetEnhancedMeasurementSettingsRequest_descriptor, @@ -3269,15 +3185,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_UpdateEnhancedMeasurementSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(148); + getDescriptor().getMessageTypes().get(133); internal_static_google_analytics_admin_v1alpha_UpdateEnhancedMeasurementSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateEnhancedMeasurementSettingsRequest_descriptor, new java.lang.String[] { "EnhancedMeasurementSettings", "UpdateMask", }); + internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(134); + internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(135); + internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_descriptor, + new java.lang.String[] { + "DataRedactionSettings", "UpdateMask", + }); internal_static_google_analytics_admin_v1alpha_CreateConnectedSiteTagRequest_descriptor = - getDescriptor().getMessageTypes().get(149); + getDescriptor().getMessageTypes().get(136); internal_static_google_analytics_admin_v1alpha_CreateConnectedSiteTagRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateConnectedSiteTagRequest_descriptor, @@ -3285,13 +3217,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", "ConnectedSiteTag", }); internal_static_google_analytics_admin_v1alpha_CreateConnectedSiteTagResponse_descriptor = - getDescriptor().getMessageTypes().get(150); + getDescriptor().getMessageTypes().get(137); internal_static_google_analytics_admin_v1alpha_CreateConnectedSiteTagResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateConnectedSiteTagResponse_descriptor, new java.lang.String[] {}); internal_static_google_analytics_admin_v1alpha_DeleteConnectedSiteTagRequest_descriptor = - getDescriptor().getMessageTypes().get(151); + getDescriptor().getMessageTypes().get(138); internal_static_google_analytics_admin_v1alpha_DeleteConnectedSiteTagRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteConnectedSiteTagRequest_descriptor, @@ -3299,7 +3231,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", "TagId", }); internal_static_google_analytics_admin_v1alpha_ListConnectedSiteTagsRequest_descriptor = - getDescriptor().getMessageTypes().get(152); + getDescriptor().getMessageTypes().get(139); internal_static_google_analytics_admin_v1alpha_ListConnectedSiteTagsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListConnectedSiteTagsRequest_descriptor, @@ -3307,7 +3239,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", }); internal_static_google_analytics_admin_v1alpha_ListConnectedSiteTagsResponse_descriptor = - getDescriptor().getMessageTypes().get(153); + getDescriptor().getMessageTypes().get(140); internal_static_google_analytics_admin_v1alpha_ListConnectedSiteTagsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListConnectedSiteTagsResponse_descriptor, @@ -3315,7 +3247,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConnectedSiteTags", }); internal_static_google_analytics_admin_v1alpha_CreateAdSenseLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(154); + getDescriptor().getMessageTypes().get(141); internal_static_google_analytics_admin_v1alpha_CreateAdSenseLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateAdSenseLinkRequest_descriptor, @@ -3323,7 +3255,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "AdsenseLink", }); internal_static_google_analytics_admin_v1alpha_GetAdSenseLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(155); + getDescriptor().getMessageTypes().get(142); internal_static_google_analytics_admin_v1alpha_GetAdSenseLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetAdSenseLinkRequest_descriptor, @@ -3331,7 +3263,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_DeleteAdSenseLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(156); + getDescriptor().getMessageTypes().get(143); internal_static_google_analytics_admin_v1alpha_DeleteAdSenseLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteAdSenseLinkRequest_descriptor, @@ -3339,7 +3271,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListAdSenseLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(157); + getDescriptor().getMessageTypes().get(144); internal_static_google_analytics_admin_v1alpha_ListAdSenseLinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAdSenseLinksRequest_descriptor, @@ -3347,7 +3279,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListAdSenseLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(158); + getDescriptor().getMessageTypes().get(145); internal_static_google_analytics_admin_v1alpha_ListAdSenseLinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListAdSenseLinksResponse_descriptor, @@ -3355,7 +3287,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AdsenseLinks", "NextPageToken", }); internal_static_google_analytics_admin_v1alpha_FetchConnectedGa4PropertyRequest_descriptor = - getDescriptor().getMessageTypes().get(159); + getDescriptor().getMessageTypes().get(146); internal_static_google_analytics_admin_v1alpha_FetchConnectedGa4PropertyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_FetchConnectedGa4PropertyRequest_descriptor, @@ -3363,7 +3295,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", }); internal_static_google_analytics_admin_v1alpha_FetchConnectedGa4PropertyResponse_descriptor = - getDescriptor().getMessageTypes().get(160); + getDescriptor().getMessageTypes().get(147); internal_static_google_analytics_admin_v1alpha_FetchConnectedGa4PropertyResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_FetchConnectedGa4PropertyResponse_descriptor, @@ -3371,7 +3303,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", }); internal_static_google_analytics_admin_v1alpha_CreateEventCreateRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(161); + getDescriptor().getMessageTypes().get(148); internal_static_google_analytics_admin_v1alpha_CreateEventCreateRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CreateEventCreateRuleRequest_descriptor, @@ -3379,7 +3311,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "EventCreateRule", }); internal_static_google_analytics_admin_v1alpha_UpdateEventCreateRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(162); + getDescriptor().getMessageTypes().get(149); internal_static_google_analytics_admin_v1alpha_UpdateEventCreateRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_UpdateEventCreateRuleRequest_descriptor, @@ -3387,7 +3319,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EventCreateRule", "UpdateMask", }); internal_static_google_analytics_admin_v1alpha_DeleteEventCreateRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(163); + getDescriptor().getMessageTypes().get(150); internal_static_google_analytics_admin_v1alpha_DeleteEventCreateRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DeleteEventCreateRuleRequest_descriptor, @@ -3395,7 +3327,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_GetEventCreateRuleRequest_descriptor = - getDescriptor().getMessageTypes().get(164); + getDescriptor().getMessageTypes().get(151); internal_static_google_analytics_admin_v1alpha_GetEventCreateRuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GetEventCreateRuleRequest_descriptor, @@ -3403,7 +3335,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesRequest_descriptor = - getDescriptor().getMessageTypes().get(165); + getDescriptor().getMessageTypes().get(152); internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesRequest_descriptor, @@ -3411,13 +3343,133 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesResponse_descriptor = - getDescriptor().getMessageTypes().get(166); + getDescriptor().getMessageTypes().get(153); internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ListEventCreateRulesResponse_descriptor, new java.lang.String[] { "EventCreateRules", "NextPageToken", }); + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_descriptor = + getDescriptor().getMessageTypes().get(154); + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_descriptor, + new java.lang.String[] { + "RollupProperty", "SourceProperties", + }); + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_descriptor = + getDescriptor().getMessageTypes().get(155); + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_descriptor, + new java.lang.String[] { + "RollupProperty", "RollupPropertySourceLinks", + }); + internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(156); + internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_descriptor = + getDescriptor().getMessageTypes().get(157); + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_descriptor = + getDescriptor().getMessageTypes().get(158); + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_descriptor, + new java.lang.String[] { + "RollupPropertySourceLinks", "NextPageToken", + }); + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(159); + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_descriptor, + new java.lang.String[] { + "Parent", "RollupPropertySourceLink", + }); + internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(160); + internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_descriptor = + getDescriptor().getMessageTypes().get(161); + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_descriptor, + new java.lang.String[] { + "Parent", "Subproperty", "SubpropertyEventFilter", + }); + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_descriptor = + getDescriptor().getMessageTypes().get(162); + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_descriptor, + new java.lang.String[] { + "Subproperty", "SubpropertyEventFilter", + }); + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_descriptor = + getDescriptor().getMessageTypes().get(163); + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_descriptor, + new java.lang.String[] { + "Parent", "SubpropertyEventFilter", + }); + internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_descriptor = + getDescriptor().getMessageTypes().get(164); + internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_descriptor = + getDescriptor().getMessageTypes().get(165); + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_descriptor = + getDescriptor().getMessageTypes().get(166); + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_descriptor, + new java.lang.String[] { + "SubpropertyEventFilters", "NextPageToken", + }); + internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_descriptor = + getDescriptor().getMessageTypes().get(167); + internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_descriptor, + new java.lang.String[] { + "SubpropertyEventFilter", "UpdateMask", + }); + internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_descriptor = + getDescriptor().getMessageTypes().get(168); + internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_descriptor, + new java.lang.String[] { + "Name", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -3434,6 +3486,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.analytics.admin.v1alpha.EventCreateAndEdit.getDescriptor(); com.google.analytics.admin.v1alpha.ExpandedDataSetProto.getDescriptor(); com.google.analytics.admin.v1alpha.ResourcesProto.getDescriptor(); + com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLink.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLink.java deleted file mode 100644 index 60c147da7958..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLink.java +++ /dev/null @@ -1,1464 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/resources.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Read-only resource used to summarize a principal's effective roles.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.AuditUserLink} - */ -public final class AuditUserLink extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.AuditUserLink) - AuditUserLinkOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuditUserLink.newBuilder() to construct. - private AuditUserLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuditUserLink() { - name_ = ""; - emailAddress_ = ""; - directRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - effectiveRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuditUserLink(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLink_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLink_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.AuditUserLink.class, - com.google.analytics.admin.v1alpha.AuditUserLink.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EMAIL_ADDRESS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object emailAddress_ = ""; - /** - * - * - *
-   * Email address of the linked user
-   * 
- * - * string email_address = 2; - * - * @return The emailAddress. - */ - @java.lang.Override - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - emailAddress_ = s; - return s; - } - } - /** - * - * - *
-   * Email address of the linked user
-   * 
- * - * string email_address = 2; - * - * @return The bytes for emailAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIRECT_ROLES_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList directRoles_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return A list containing the directRoles. - */ - public com.google.protobuf.ProtocolStringList getDirectRolesList() { - return directRoles_; - } - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return The count of directRoles. - */ - public int getDirectRolesCount() { - return directRoles_.size(); - } - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the element to return. - * @return The directRoles at the given index. - */ - public java.lang.String getDirectRoles(int index) { - return directRoles_.get(index); - } - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the value to return. - * @return The bytes of the directRoles at the given index. - */ - public com.google.protobuf.ByteString getDirectRolesBytes(int index) { - return directRoles_.getByteString(index); - } - - public static final int EFFECTIVE_ROLES_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList effectiveRoles_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @return A list containing the effectiveRoles. - */ - public com.google.protobuf.ProtocolStringList getEffectiveRolesList() { - return effectiveRoles_; - } - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @return The count of effectiveRoles. - */ - public int getEffectiveRolesCount() { - return effectiveRoles_.size(); - } - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @param index The index of the element to return. - * @return The effectiveRoles at the given index. - */ - public java.lang.String getEffectiveRoles(int index) { - return effectiveRoles_.get(index); - } - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @param index The index of the value to return. - * @return The bytes of the effectiveRoles at the given index. - */ - public com.google.protobuf.ByteString getEffectiveRolesBytes(int index) { - return effectiveRoles_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, emailAddress_); - } - for (int i = 0; i < directRoles_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, directRoles_.getRaw(i)); - } - for (int i = 0; i < effectiveRoles_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, effectiveRoles_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, emailAddress_); - } - { - int dataSize = 0; - for (int i = 0; i < directRoles_.size(); i++) { - dataSize += computeStringSizeNoTag(directRoles_.getRaw(i)); - } - size += dataSize; - size += 1 * getDirectRolesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < effectiveRoles_.size(); i++) { - dataSize += computeStringSizeNoTag(effectiveRoles_.getRaw(i)); - } - size += dataSize; - size += 1 * getEffectiveRolesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.AuditUserLink)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.AuditUserLink other = - (com.google.analytics.admin.v1alpha.AuditUserLink) obj; - - if (!getName().equals(other.getName())) return false; - if (!getEmailAddress().equals(other.getEmailAddress())) return false; - if (!getDirectRolesList().equals(other.getDirectRolesList())) return false; - if (!getEffectiveRolesList().equals(other.getEffectiveRolesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + EMAIL_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getEmailAddress().hashCode(); - if (getDirectRolesCount() > 0) { - hash = (37 * hash) + DIRECT_ROLES_FIELD_NUMBER; - hash = (53 * hash) + getDirectRolesList().hashCode(); - } - if (getEffectiveRolesCount() > 0) { - hash = (37 * hash) + EFFECTIVE_ROLES_FIELD_NUMBER; - hash = (53 * hash) + getEffectiveRolesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.analytics.admin.v1alpha.AuditUserLink prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Read-only resource used to summarize a principal's effective roles.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.AuditUserLink} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.AuditUserLink) - com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLink_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLink_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.AuditUserLink.class, - com.google.analytics.admin.v1alpha.AuditUserLink.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.AuditUserLink.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - emailAddress_ = ""; - directRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - effectiveRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLink_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLink getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.AuditUserLink.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLink build() { - com.google.analytics.admin.v1alpha.AuditUserLink result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLink buildPartial() { - com.google.analytics.admin.v1alpha.AuditUserLink result = - new com.google.analytics.admin.v1alpha.AuditUserLink(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.analytics.admin.v1alpha.AuditUserLink result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.emailAddress_ = emailAddress_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - directRoles_.makeImmutable(); - result.directRoles_ = directRoles_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - effectiveRoles_.makeImmutable(); - result.effectiveRoles_ = effectiveRoles_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.AuditUserLink) { - return mergeFrom((com.google.analytics.admin.v1alpha.AuditUserLink) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.analytics.admin.v1alpha.AuditUserLink other) { - if (other == com.google.analytics.admin.v1alpha.AuditUserLink.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getEmailAddress().isEmpty()) { - emailAddress_ = other.emailAddress_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.directRoles_.isEmpty()) { - if (directRoles_.isEmpty()) { - directRoles_ = other.directRoles_; - bitField0_ |= 0x00000004; - } else { - ensureDirectRolesIsMutable(); - directRoles_.addAll(other.directRoles_); - } - onChanged(); - } - if (!other.effectiveRoles_.isEmpty()) { - if (effectiveRoles_.isEmpty()) { - effectiveRoles_ = other.effectiveRoles_; - bitField0_ |= 0x00000008; - } else { - ensureEffectiveRolesIsMutable(); - effectiveRoles_.addAll(other.effectiveRoles_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - emailAddress_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDirectRolesIsMutable(); - directRoles_.add(s); - break; - } // case 26 - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureEffectiveRolesIsMutable(); - effectiveRoles_.add(s); - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object emailAddress_ = ""; - /** - * - * - *
-     * Email address of the linked user
-     * 
- * - * string email_address = 2; - * - * @return The emailAddress. - */ - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - emailAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Email address of the linked user
-     * 
- * - * string email_address = 2; - * - * @return The bytes for emailAddress. - */ - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Email address of the linked user
-     * 
- * - * string email_address = 2; - * - * @param value The emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - emailAddress_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Email address of the linked user
-     * 
- * - * string email_address = 2; - * - * @return This builder for chaining. - */ - public Builder clearEmailAddress() { - emailAddress_ = getDefaultInstance().getEmailAddress(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Email address of the linked user
-     * 
- * - * string email_address = 2; - * - * @param value The bytes for emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - emailAddress_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList directRoles_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureDirectRolesIsMutable() { - if (!directRoles_.isModifiable()) { - directRoles_ = new com.google.protobuf.LazyStringArrayList(directRoles_); - } - bitField0_ |= 0x00000004; - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @return A list containing the directRoles. - */ - public com.google.protobuf.ProtocolStringList getDirectRolesList() { - directRoles_.makeImmutable(); - return directRoles_; - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @return The count of directRoles. - */ - public int getDirectRolesCount() { - return directRoles_.size(); - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the element to return. - * @return The directRoles at the given index. - */ - public java.lang.String getDirectRoles(int index) { - return directRoles_.get(index); - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the value to return. - * @return The bytes of the directRoles at the given index. - */ - public com.google.protobuf.ByteString getDirectRolesBytes(int index) { - return directRoles_.getByteString(index); - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param index The index to set the value at. - * @param value The directRoles to set. - * @return This builder for chaining. - */ - public Builder setDirectRoles(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDirectRolesIsMutable(); - directRoles_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param value The directRoles to add. - * @return This builder for chaining. - */ - public Builder addDirectRoles(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDirectRolesIsMutable(); - directRoles_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param values The directRoles to add. - * @return This builder for chaining. - */ - public Builder addAllDirectRoles(java.lang.Iterable values) { - ensureDirectRolesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, directRoles_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @return This builder for chaining. - */ - public Builder clearDirectRoles() { - directRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - ; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this entity.
-     *
-     * Format: predefinedRoles/viewer
-     *
-     * Excludes roles that are inherited from an account (if this is for a
-     * property), group, or organization admin role.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param value The bytes of the directRoles to add. - * @return This builder for chaining. - */ - public Builder addDirectRolesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDirectRolesIsMutable(); - directRoles_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList effectiveRoles_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureEffectiveRolesIsMutable() { - if (!effectiveRoles_.isModifiable()) { - effectiveRoles_ = new com.google.protobuf.LazyStringArrayList(effectiveRoles_); - } - bitField0_ |= 0x00000008; - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @return A list containing the effectiveRoles. - */ - public com.google.protobuf.ProtocolStringList getEffectiveRolesList() { - effectiveRoles_.makeImmutable(); - return effectiveRoles_; - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @return The count of effectiveRoles. - */ - public int getEffectiveRolesCount() { - return effectiveRoles_.size(); - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @param index The index of the element to return. - * @return The effectiveRoles at the given index. - */ - public java.lang.String getEffectiveRoles(int index) { - return effectiveRoles_.get(index); - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @param index The index of the value to return. - * @return The bytes of the effectiveRoles at the given index. - */ - public com.google.protobuf.ByteString getEffectiveRolesBytes(int index) { - return effectiveRoles_.getByteString(index); - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @param index The index to set the value at. - * @param value The effectiveRoles to set. - * @return This builder for chaining. - */ - public Builder setEffectiveRoles(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEffectiveRolesIsMutable(); - effectiveRoles_.set(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @param value The effectiveRoles to add. - * @return This builder for chaining. - */ - public Builder addEffectiveRoles(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEffectiveRolesIsMutable(); - effectiveRoles_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @param values The effectiveRoles to add. - * @return This builder for chaining. - */ - public Builder addAllEffectiveRoles(java.lang.Iterable values) { - ensureEffectiveRolesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, effectiveRoles_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @return This builder for chaining. - */ - public Builder clearEffectiveRoles() { - effectiveRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - ; - onChanged(); - return this; - } - /** - * - * - *
-     * Union of all permissions a user has at this account or property (includes
-     * direct permissions, group-inherited permissions, etc.).
-     *
-     * Format: predefinedRoles/viewer
-     * 
- * - * repeated string effective_roles = 4; - * - * @param value The bytes of the effectiveRoles to add. - * @return This builder for chaining. - */ - public Builder addEffectiveRolesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureEffectiveRolesIsMutable(); - effectiveRoles_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.AuditUserLink) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.AuditUserLink) - private static final com.google.analytics.admin.v1alpha.AuditUserLink DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.AuditUserLink(); - } - - public static com.google.analytics.admin.v1alpha.AuditUserLink getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuditUserLink parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLink getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinkOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinkOrBuilder.java deleted file mode 100644 index 55a8fe926b3f..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinkOrBuilder.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/resources.proto - -package com.google.analytics.admin.v1alpha; - -public interface AuditUserLinkOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.AuditUserLink) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Email address of the linked user
-   * 
- * - * string email_address = 2; - * - * @return The emailAddress. - */ - java.lang.String getEmailAddress(); - /** - * - * - *
-   * Email address of the linked user
-   * 
- * - * string email_address = 2; - * - * @return The bytes for emailAddress. - */ - com.google.protobuf.ByteString getEmailAddressBytes(); - - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return A list containing the directRoles. - */ - java.util.List getDirectRolesList(); - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return The count of directRoles. - */ - int getDirectRolesCount(); - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the element to return. - * @return The directRoles at the given index. - */ - java.lang.String getDirectRoles(int index); - /** - * - * - *
-   * Roles directly assigned to this user for this entity.
-   *
-   * Format: predefinedRoles/viewer
-   *
-   * Excludes roles that are inherited from an account (if this is for a
-   * property), group, or organization admin role.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the value to return. - * @return The bytes of the directRoles at the given index. - */ - com.google.protobuf.ByteString getDirectRolesBytes(int index); - - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @return A list containing the effectiveRoles. - */ - java.util.List getEffectiveRolesList(); - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @return The count of effectiveRoles. - */ - int getEffectiveRolesCount(); - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @param index The index of the element to return. - * @return The effectiveRoles at the given index. - */ - java.lang.String getEffectiveRoles(int index); - /** - * - * - *
-   * Union of all permissions a user has at this account or property (includes
-   * direct permissions, group-inherited permissions, etc.).
-   *
-   * Format: predefinedRoles/viewer
-   * 
- * - * repeated string effective_roles = 4; - * - * @param index The index of the value to return. - * @return The bytes of the effectiveRoles at the given index. - */ - com.google.protobuf.ByteString getEffectiveRolesBytes(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksRequest.java deleted file mode 100644 index 1c9b0af61562..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksRequest.java +++ /dev/null @@ -1,1347 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Request message for BatchCreateUserLinks RPC.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchCreateUserLinksRequest} - */ -public final class BatchCreateUserLinksRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) - BatchCreateUserLinksRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchCreateUserLinksRequest.newBuilder() to construct. - private BatchCreateUserLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchCreateUserLinksRequest() { - parent_ = ""; - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchCreateUserLinksRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. This field is required. The parent field in the CreateUserLinkRequest
-   * messages must either be empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. This field is required. The parent field in the CreateUserLinkRequest
-   * messages must either be empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTIFY_NEW_USERS_FIELD_NUMBER = 2; - private boolean notifyNewUsers_ = false; - /** - * - * - *
-   * Optional. If set, then email the new users notifying them that they've been
-   * granted permissions to the resource. Regardless of whether this is set or
-   * not, notify_new_user field inside each individual request is ignored.
-   * 
- * - * bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The notifyNewUsers. - */ - @java.lang.Override - public boolean getNotifyNewUsers() { - return notifyNewUsers_; - } - - public static final int REQUESTS_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private java.util.List requests_; - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getRequestsList() { - return requests_; - } - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest getRequests(int index) { - return requests_.get(index); - } - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (notifyNewUsers_ != false) { - output.writeBool(2, notifyNewUsers_); - } - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(3, requests_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (notifyNewUsers_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, notifyNewUsers_); - } - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, requests_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest other = - (com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getNotifyNewUsers() != other.getNotifyNewUsers()) return false; - if (!getRequestsList().equals(other.getRequestsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + NOTIFY_NEW_USERS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNotifyNewUsers()); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for BatchCreateUserLinks RPC.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchCreateUserLinksRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - notifyNewUsers_ = false; - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - } else { - requests_ = null; - requestsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksRequest_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest - getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest build() { - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest buildPartial() { - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest result = - new com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest result) { - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - } - - private void buildPartial0( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.notifyNewUsers_ = notifyNewUsers_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest other) { - if (other - == com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getNotifyNewUsers() != false) { - setNotifyNewUsers(other.getNotifyNewUsers()); - } - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000004); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRequestsFieldBuilder() - : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - notifyNewUsers_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - com.google.analytics.admin.v1alpha.CreateUserLinkRequest m = - input.readMessage( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.parser(), - extensionRegistry); - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(m); - } else { - requestsBuilder_.addMessage(m); - } - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. This field is required. The parent field in the CreateUserLinkRequest
-     * messages must either be empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. This field is required. The parent field in the CreateUserLinkRequest
-     * messages must either be empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. This field is required. The parent field in the CreateUserLinkRequest
-     * messages must either be empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. This field is required. The parent field in the CreateUserLinkRequest
-     * messages must either be empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. This field is required. The parent field in the CreateUserLinkRequest
-     * messages must either be empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private boolean notifyNewUsers_; - /** - * - * - *
-     * Optional. If set, then email the new users notifying them that they've been
-     * granted permissions to the resource. Regardless of whether this is set or
-     * not, notify_new_user field inside each individual request is ignored.
-     * 
- * - * bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The notifyNewUsers. - */ - @java.lang.Override - public boolean getNotifyNewUsers() { - return notifyNewUsers_; - } - /** - * - * - *
-     * Optional. If set, then email the new users notifying them that they've been
-     * granted permissions to the resource. Regardless of whether this is set or
-     * not, notify_new_user field inside each individual request is ignored.
-     * 
- * - * bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The notifyNewUsers to set. - * @return This builder for chaining. - */ - public Builder setNotifyNewUsers(boolean value) { - - notifyNewUsers_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If set, then email the new users notifying them that they've been
-     * granted permissions to the resource. Regardless of whether this is set or
-     * not, notify_new_user field inside each individual request is ignored.
-     * 
- * - * bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNotifyNewUsers() { - bitField0_ = (bitField0_ & ~0x00000002); - notifyNewUsers_ = false; - onChanged(); - return this; - } - - private java.util.List requests_ = - java.util.Collections.emptyList(); - - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - requests_ = - new java.util.ArrayList( - requests_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.CreateUserLinkRequest, - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder> - requestsBuilder_; - - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setRequests( - int index, com.google.analytics.admin.v1alpha.CreateUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setRequests( - int index, - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests(com.google.analytics.admin.v1alpha.CreateUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - int index, com.google.analytics.admin.v1alpha.CreateUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - int index, - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllRequests( - java.lang.Iterable - values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List< - ? extends com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder> - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder() - .addBuilder( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder() - .addBuilder( - index, com.google.analytics.admin.v1alpha.CreateUserLinkRequest.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The requests specifying the user links to create.
-     * A maximum of 1000 user links can be created in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.CreateUserLinkRequest, - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.CreateUserLinkRequest, - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder>( - requests_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) - private static final com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest(); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateUserLinksRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksRequestOrBuilder.java deleted file mode 100644 index 92ade5845a4d..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksRequestOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -public interface BatchCreateUserLinksRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. This field is required. The parent field in the CreateUserLinkRequest
-   * messages must either be empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. This field is required. The parent field in the CreateUserLinkRequest
-   * messages must either be empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. If set, then email the new users notifying them that they've been
-   * granted permissions to the resource. Regardless of whether this is set or
-   * not, notify_new_user field inside each individual request is ignored.
-   * 
- * - * bool notify_new_users = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The notifyNewUsers. - */ - boolean getNotifyNewUsers(); - - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getRequestsList(); - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.analytics.admin.v1alpha.CreateUserLinkRequest getRequests(int index); - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getRequestsCount(); - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getRequestsOrBuilderList(); - /** - * - * - *
-   * Required. The requests specifying the user links to create.
-   * A maximum of 1000 user links can be created in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.CreateUserLinkRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder getRequestsOrBuilder(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksResponse.java deleted file mode 100644 index fbee521df1ad..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksResponse.java +++ /dev/null @@ -1,945 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Response message for BatchCreateUserLinks RPC.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} - */ -public final class BatchCreateUserLinksResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) - BatchCreateUserLinksResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchCreateUserLinksResponse.newBuilder() to construct. - private BatchCreateUserLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchCreateUserLinksResponse() { - userLinks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchCreateUserLinksResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.class, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.Builder.class); - } - - public static final int USER_LINKS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List userLinks_; - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List getUserLinksList() { - return userLinks_; - } - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List - getUserLinksOrBuilderList() { - return userLinks_; - } - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public int getUserLinksCount() { - return userLinks_.size(); - } - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - return userLinks_.get(index); - } - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - return userLinks_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < userLinks_.size(); i++) { - output.writeMessage(1, userLinks_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < userLinks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLinks_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse other = - (com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) obj; - - if (!getUserLinksList().equals(other.getUserLinksList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getUserLinksCount() > 0) { - hash = (37 * hash) + USER_LINKS_FIELD_NUMBER; - hash = (53 * hash) + getUserLinksList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for BatchCreateUserLinks RPC.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.class, - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - } else { - userLinks_ = null; - userLinksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchCreateUserLinksResponse_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse - getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse build() { - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse buildPartial() { - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse result = - new com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse result) { - if (userLinksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - userLinks_ = java.util.Collections.unmodifiableList(userLinks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.userLinks_ = userLinks_; - } else { - result.userLinks_ = userLinksBuilder_.build(); - } - } - - private void buildPartial0( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) { - return mergeFrom((com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse other) { - if (other - == com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.getDefaultInstance()) - return this; - if (userLinksBuilder_ == null) { - if (!other.userLinks_.isEmpty()) { - if (userLinks_.isEmpty()) { - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureUserLinksIsMutable(); - userLinks_.addAll(other.userLinks_); - } - onChanged(); - } - } else { - if (!other.userLinks_.isEmpty()) { - if (userLinksBuilder_.isEmpty()) { - userLinksBuilder_.dispose(); - userLinksBuilder_ = null; - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - userLinksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getUserLinksFieldBuilder() - : null; - } else { - userLinksBuilder_.addAllMessages(other.userLinks_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.analytics.admin.v1alpha.UserLink m = - input.readMessage( - com.google.analytics.admin.v1alpha.UserLink.parser(), extensionRegistry); - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(m); - } else { - userLinksBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List userLinks_ = - java.util.Collections.emptyList(); - - private void ensureUserLinksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - userLinks_ = - new java.util.ArrayList(userLinks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - userLinksBuilder_; - - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List getUserLinksList() { - if (userLinksBuilder_ == null) { - return java.util.Collections.unmodifiableList(userLinks_); - } else { - return userLinksBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public int getUserLinksCount() { - if (userLinksBuilder_ == null) { - return userLinks_.size(); - } else { - return userLinksBuilder_.getCount(); - } - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.set(index, value); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.set(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(value); - onChanged(); - } else { - userLinksBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(index, value); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addAllUserLinks( - java.lang.Iterable values) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLinks_); - onChanged(); - } else { - userLinksBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder clearUserLinks() { - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - userLinksBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder removeUserLinks(int index) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.remove(index); - onChanged(); - } else { - userLinksBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder getUserLinksBuilder(int index) { - return getUserLinksFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksOrBuilderList() { - if (userLinksBuilder_ != null) { - return userLinksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(userLinks_); - } - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder() { - return getUserLinksFieldBuilder() - .addBuilder(com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder(int index) { - return getUserLinksFieldBuilder() - .addBuilder(index, com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * The user links created.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksBuilderList() { - return getUserLinksFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - getUserLinksFieldBuilder() { - if (userLinksBuilder_ == null) { - userLinksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder>( - userLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - userLinks_ = null; - } - return userLinksBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) - private static final com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse(); - } - - public static com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchCreateUserLinksResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksResponseOrBuilder.java deleted file mode 100644 index baf80931679a..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchCreateUserLinksResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -public interface BatchCreateUserLinksResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - java.util.List getUserLinksList(); - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index); - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - int getUserLinksCount(); - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - java.util.List - getUserLinksOrBuilderList(); - /** - * - * - *
-   * The user links created.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchDeleteUserLinksRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchDeleteUserLinksRequest.java deleted file mode 100644 index b5f6beda30b6..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchDeleteUserLinksRequest.java +++ /dev/null @@ -1,1246 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Request message for BatchDeleteUserLinks RPC.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest} - */ -public final class BatchDeleteUserLinksRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) - BatchDeleteUserLinksRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchDeleteUserLinksRequest.newBuilder() to construct. - private BatchDeleteUserLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchDeleteUserLinksRequest() { - parent_ = ""; - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchDeleteUserLinksRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all values for user link names to delete must match this
-   * field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all values for user link names to delete must match this
-   * field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUESTS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List requests_; - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getRequestsList() { - return requests_; - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest getRequests(int index) { - return requests_.get(index); - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(2, requests_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requests_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest other = - (com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getRequestsList().equals(other.getRequestsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for BatchDeleteUserLinks RPC.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - } else { - requests_ = null; - requestsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchDeleteUserLinksRequest_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest - getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest build() { - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest buildPartial() { - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest result = - new com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest result) { - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - } - - private void buildPartial0( - com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest other) { - if (other - == com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000002); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRequestsFieldBuilder() - : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest m = - input.readMessage( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.parser(), - extensionRegistry); - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(m); - } else { - requestsBuilder_.addMessage(m); - } - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all values for user link names to delete must match this
-     * field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all values for user link names to delete must match this
-     * field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all values for user link names to delete must match this
-     * field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all values for user link names to delete must match this
-     * field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all values for user link names to delete must match this
-     * field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List requests_ = - java.util.Collections.emptyList(); - - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - requests_ = - new java.util.ArrayList( - requests_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder> - requestsBuilder_; - - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setRequests( - int index, com.google.analytics.admin.v1alpha.DeleteUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setRequests( - int index, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests(com.google.analytics.admin.v1alpha.DeleteUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - int index, com.google.analytics.admin.v1alpha.DeleteUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - int index, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllRequests( - java.lang.Iterable - values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List< - ? extends com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder> - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder() - .addBuilder( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder() - .addBuilder( - index, com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder>( - requests_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) - private static final com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest(); - } - - public static com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchDeleteUserLinksRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchDeleteUserLinksRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchDeleteUserLinksRequestOrBuilder.java deleted file mode 100644 index 465404c76240..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchDeleteUserLinksRequestOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -public interface BatchDeleteUserLinksRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all values for user link names to delete must match this
-   * field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all values for user link names to delete must match this
-   * field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getRequestsList(); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest getRequests(int index); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getRequestsCount(); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getRequestsOrBuilderList(); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.DeleteUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder getRequestsOrBuilder(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksRequestOrBuilder.java deleted file mode 100644 index 2948fcecff0d..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksRequestOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -public interface BatchGetUserLinksRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.BatchGetUserLinksRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all provided values for the 'names' field must match
-   * this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all provided values for the 'names' field must match
-   * this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
-   * 
- * - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return A list containing the names. - */ - java.util.List getNamesList(); - /** - * - * - *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
-   * 
- * - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The count of names. - */ - int getNamesCount(); - /** - * - * - *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
-   * 
- * - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the element to return. - * @return The names at the given index. - */ - java.lang.String getNames(int index); - /** - * - * - *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
-   * 
- * - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - com.google.protobuf.ByteString getNamesBytes(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksResponse.java deleted file mode 100644 index 2aa0678af6fb..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksResponse.java +++ /dev/null @@ -1,942 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Response message for BatchGetUserLinks RPC.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchGetUserLinksResponse} - */ -public final class BatchGetUserLinksResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.BatchGetUserLinksResponse) - BatchGetUserLinksResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchGetUserLinksResponse.newBuilder() to construct. - private BatchGetUserLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchGetUserLinksResponse() { - userLinks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchGetUserLinksResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.class, - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.Builder.class); - } - - public static final int USER_LINKS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List userLinks_; - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List getUserLinksList() { - return userLinks_; - } - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List - getUserLinksOrBuilderList() { - return userLinks_; - } - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public int getUserLinksCount() { - return userLinks_.size(); - } - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - return userLinks_.get(index); - } - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - return userLinks_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < userLinks_.size(); i++) { - output.writeMessage(1, userLinks_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < userLinks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLinks_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse other = - (com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse) obj; - - if (!getUserLinksList().equals(other.getUserLinksList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getUserLinksCount() > 0) { - hash = (37 * hash) + USER_LINKS_FIELD_NUMBER; - hash = (53 * hash) + getUserLinksList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for BatchGetUserLinks RPC.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchGetUserLinksResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.BatchGetUserLinksResponse) - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.class, - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - } else { - userLinks_ = null; - userLinksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksResponse_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse - getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse build() { - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse buildPartial() { - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse result = - new com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse result) { - if (userLinksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - userLinks_ = java.util.Collections.unmodifiableList(userLinks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.userLinks_ = userLinks_; - } else { - result.userLinks_ = userLinksBuilder_.build(); - } - } - - private void buildPartial0( - com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse) { - return mergeFrom((com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse other) { - if (other - == com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse.getDefaultInstance()) - return this; - if (userLinksBuilder_ == null) { - if (!other.userLinks_.isEmpty()) { - if (userLinks_.isEmpty()) { - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureUserLinksIsMutable(); - userLinks_.addAll(other.userLinks_); - } - onChanged(); - } - } else { - if (!other.userLinks_.isEmpty()) { - if (userLinksBuilder_.isEmpty()) { - userLinksBuilder_.dispose(); - userLinksBuilder_ = null; - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - userLinksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getUserLinksFieldBuilder() - : null; - } else { - userLinksBuilder_.addAllMessages(other.userLinks_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.analytics.admin.v1alpha.UserLink m = - input.readMessage( - com.google.analytics.admin.v1alpha.UserLink.parser(), extensionRegistry); - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(m); - } else { - userLinksBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List userLinks_ = - java.util.Collections.emptyList(); - - private void ensureUserLinksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - userLinks_ = - new java.util.ArrayList(userLinks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - userLinksBuilder_; - - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List getUserLinksList() { - if (userLinksBuilder_ == null) { - return java.util.Collections.unmodifiableList(userLinks_); - } else { - return userLinksBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public int getUserLinksCount() { - if (userLinksBuilder_ == null) { - return userLinks_.size(); - } else { - return userLinksBuilder_.getCount(); - } - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.set(index, value); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.set(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(value); - onChanged(); - } else { - userLinksBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(index, value); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addAllUserLinks( - java.lang.Iterable values) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLinks_); - onChanged(); - } else { - userLinksBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder clearUserLinks() { - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - userLinksBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder removeUserLinks(int index) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.remove(index); - onChanged(); - } else { - userLinksBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder getUserLinksBuilder(int index) { - return getUserLinksFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksOrBuilderList() { - if (userLinksBuilder_ != null) { - return userLinksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(userLinks_); - } - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder() { - return getUserLinksFieldBuilder() - .addBuilder(com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder(int index) { - return getUserLinksFieldBuilder() - .addBuilder(index, com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * The requested user links.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksBuilderList() { - return getUserLinksFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - getUserLinksFieldBuilder() { - if (userLinksBuilder_ == null) { - userLinksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder>( - userLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - userLinks_ = null; - } - return userLinksBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.BatchGetUserLinksResponse) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.BatchGetUserLinksResponse) - private static final com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse(); - } - - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchGetUserLinksResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksResponseOrBuilder.java deleted file mode 100644 index 3991bf8f0c90..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -public interface BatchGetUserLinksResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.BatchGetUserLinksResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - java.util.List getUserLinksList(); - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index); - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - int getUserLinksCount(); - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - java.util.List - getUserLinksOrBuilderList(); - /** - * - * - *
-   * The requested user links.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksRequest.java deleted file mode 100644 index 094dbe03c830..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksRequest.java +++ /dev/null @@ -1,1246 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Request message for BatchUpdateUserLinks RPC.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest} - */ -public final class BatchUpdateUserLinksRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) - BatchUpdateUserLinksRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchUpdateUserLinksRequest.newBuilder() to construct. - private BatchUpdateUserLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchUpdateUserLinksRequest() { - parent_ = ""; - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchUpdateUserLinksRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent field in the UpdateUserLinkRequest messages must either be
-   * empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent field in the UpdateUserLinkRequest messages must either be
-   * empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUESTS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private java.util.List requests_; - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getRequestsList() { - return requests_; - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest getRequests(int index) { - return requests_.get(index); - } - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(2, requests_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requests_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest other = - (com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getRequestsList().equals(other.getRequestsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for BatchUpdateUserLinks RPC.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - } else { - requests_ = null; - requestsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksRequest_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest - getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest build() { - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest buildPartial() { - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest result = - new com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest result) { - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - } - - private void buildPartial0( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest other) { - if (other - == com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000002); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRequestsFieldBuilder() - : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest m = - input.readMessage( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.parser(), - extensionRegistry); - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(m); - } else { - requestsBuilder_.addMessage(m); - } - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent field in the UpdateUserLinkRequest messages must either be
-     * empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent field in the UpdateUserLinkRequest messages must either be
-     * empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent field in the UpdateUserLinkRequest messages must either be
-     * empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent field in the UpdateUserLinkRequest messages must either be
-     * empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The account or property that all user links in the request are
-     * for. The parent field in the UpdateUserLinkRequest messages must either be
-     * empty or match this field.
-     * Example format: accounts/1234
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.util.List requests_ = - java.util.Collections.emptyList(); - - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - requests_ = - new java.util.ArrayList( - requests_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder> - requestsBuilder_; - - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setRequests( - int index, com.google.analytics.admin.v1alpha.UpdateUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setRequests( - int index, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests(com.google.analytics.admin.v1alpha.UpdateUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - int index, com.google.analytics.admin.v1alpha.UpdateUserLinkRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addRequests( - int index, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllRequests( - java.lang.Iterable - values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List< - ? extends com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder> - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder() - .addBuilder( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder() - .addBuilder( - index, com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The requests specifying the user links to update.
-     * A maximum of 1000 user links can be updated in a batch.
-     * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder>( - requests_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) - private static final com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest(); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchUpdateUserLinksRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksRequestOrBuilder.java deleted file mode 100644 index d15dcca5b597..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksRequestOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -public interface BatchUpdateUserLinksRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent field in the UpdateUserLinkRequest messages must either be
-   * empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The account or property that all user links in the request are
-   * for. The parent field in the UpdateUserLinkRequest messages must either be
-   * empty or match this field.
-   * Example format: accounts/1234
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getRequestsList(); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest getRequests(int index); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getRequestsCount(); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List - getRequestsOrBuilderList(); - /** - * - * - *
-   * Required. The requests specifying the user links to update.
-   * A maximum of 1000 user links can be updated in a batch.
-   * 
- * - * - * repeated .google.analytics.admin.v1alpha.UpdateUserLinkRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder getRequestsOrBuilder(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksResponse.java deleted file mode 100644 index 370bb3b39f00..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksResponse.java +++ /dev/null @@ -1,945 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Response message for BatchUpdateUserLinks RPC.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} - */ -public final class BatchUpdateUserLinksResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) - BatchUpdateUserLinksResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchUpdateUserLinksResponse.newBuilder() to construct. - private BatchUpdateUserLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchUpdateUserLinksResponse() { - userLinks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchUpdateUserLinksResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.class, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.Builder.class); - } - - public static final int USER_LINKS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List userLinks_; - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List getUserLinksList() { - return userLinks_; - } - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List - getUserLinksOrBuilderList() { - return userLinks_; - } - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public int getUserLinksCount() { - return userLinks_.size(); - } - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - return userLinks_.get(index); - } - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - return userLinks_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < userLinks_.size(); i++) { - output.writeMessage(1, userLinks_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < userLinks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLinks_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse other = - (com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) obj; - - if (!getUserLinksList().equals(other.getUserLinksList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getUserLinksCount() > 0) { - hash = (37 * hash) + USER_LINKS_FIELD_NUMBER; - hash = (53 * hash) + getUserLinksList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for BatchUpdateUserLinks RPC.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.class, - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - } else { - userLinks_ = null; - userLinksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchUpdateUserLinksResponse_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse - getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse build() { - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse buildPartial() { - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse result = - new com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse result) { - if (userLinksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - userLinks_ = java.util.Collections.unmodifiableList(userLinks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.userLinks_ = userLinks_; - } else { - result.userLinks_ = userLinksBuilder_.build(); - } - } - - private void buildPartial0( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) { - return mergeFrom((com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse other) { - if (other - == com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.getDefaultInstance()) - return this; - if (userLinksBuilder_ == null) { - if (!other.userLinks_.isEmpty()) { - if (userLinks_.isEmpty()) { - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureUserLinksIsMutable(); - userLinks_.addAll(other.userLinks_); - } - onChanged(); - } - } else { - if (!other.userLinks_.isEmpty()) { - if (userLinksBuilder_.isEmpty()) { - userLinksBuilder_.dispose(); - userLinksBuilder_ = null; - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - userLinksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getUserLinksFieldBuilder() - : null; - } else { - userLinksBuilder_.addAllMessages(other.userLinks_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.analytics.admin.v1alpha.UserLink m = - input.readMessage( - com.google.analytics.admin.v1alpha.UserLink.parser(), extensionRegistry); - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(m); - } else { - userLinksBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List userLinks_ = - java.util.Collections.emptyList(); - - private void ensureUserLinksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - userLinks_ = - new java.util.ArrayList(userLinks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - userLinksBuilder_; - - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List getUserLinksList() { - if (userLinksBuilder_ == null) { - return java.util.Collections.unmodifiableList(userLinks_); - } else { - return userLinksBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public int getUserLinksCount() { - if (userLinksBuilder_ == null) { - return userLinks_.size(); - } else { - return userLinksBuilder_.getCount(); - } - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.set(index, value); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.set(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(value); - onChanged(); - } else { - userLinksBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(index, value); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addAllUserLinks( - java.lang.Iterable values) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLinks_); - onChanged(); - } else { - userLinksBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder clearUserLinks() { - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - userLinksBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder removeUserLinks(int index) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.remove(index); - onChanged(); - } else { - userLinksBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder getUserLinksBuilder(int index) { - return getUserLinksFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksOrBuilderList() { - if (userLinksBuilder_ != null) { - return userLinksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(userLinks_); - } - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder() { - return getUserLinksFieldBuilder() - .addBuilder(com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder(int index) { - return getUserLinksFieldBuilder() - .addBuilder(index, com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * The user links updated.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksBuilderList() { - return getUserLinksFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - getUserLinksFieldBuilder() { - if (userLinksBuilder_ == null) { - userLinksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder>( - userLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - userLinks_ = null; - } - return userLinksBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) - private static final com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse(); - } - - public static com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchUpdateUserLinksResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksResponseOrBuilder.java deleted file mode 100644 index a3fcec097cb2..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchUpdateUserLinksResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -public interface BatchUpdateUserLinksResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - java.util.List getUserLinksList(); - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index); - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - int getUserLinksCount(); - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - java.util.List - getUserLinksOrBuilderList(); - /** - * - * - *
-   * The user links updated.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryChange.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryChange.java index 78a87c9e18e4..043a73f36c4d 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryChange.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryChange.java @@ -778,6 +778,45 @@ public interface ChangeHistoryResourceOrBuilder com.google.analytics.admin.v1alpha.EnhancedMeasurementSettingsOrBuilder getEnhancedMeasurementSettingsOrBuilder(); + /** + * + * + *
+     * A snapshot of DataRedactionSettings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + * + * @return Whether the dataRedactionSettings field is set. + */ + boolean hasDataRedactionSettings(); + /** + * + * + *
+     * A snapshot of DataRedactionSettings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + * + * @return The dataRedactionSettings. + */ + com.google.analytics.admin.v1alpha.DataRedactionSettings getDataRedactionSettings(); + /** + * + * + *
+     * A snapshot of DataRedactionSettings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder + getDataRedactionSettingsOrBuilder(); + /** * * @@ -1004,6 +1043,7 @@ public enum ResourceCase CHANNEL_GROUP(22), BIGQUERY_LINK(23), ENHANCED_MEASUREMENT_SETTINGS(24), + DATA_REDACTION_SETTINGS(25), SKADNETWORK_CONVERSION_VALUE_SCHEMA(26), ADSENSE_LINK(27), AUDIENCE(28), @@ -1064,6 +1104,8 @@ public static ResourceCase forNumber(int value) { return BIGQUERY_LINK; case 24: return ENHANCED_MEASUREMENT_SETTINGS; + case 25: + return DATA_REDACTION_SETTINGS; case 26: return SKADNETWORK_CONVERSION_VALUE_SCHEMA; case 27: @@ -2110,6 +2152,61 @@ public boolean hasEnhancedMeasurementSettings() { return com.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.getDefaultInstance(); } + public static final int DATA_REDACTION_SETTINGS_FIELD_NUMBER = 25; + /** + * + * + *
+     * A snapshot of DataRedactionSettings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + * + * @return Whether the dataRedactionSettings field is set. + */ + @java.lang.Override + public boolean hasDataRedactionSettings() { + return resourceCase_ == 25; + } + /** + * + * + *
+     * A snapshot of DataRedactionSettings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + * + * @return The dataRedactionSettings. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettings getDataRedactionSettings() { + if (resourceCase_ == 25) { + return (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_; + } + return com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance(); + } + /** + * + * + *
+     * A snapshot of DataRedactionSettings resource in change history.
+     * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder + getDataRedactionSettingsOrBuilder() { + if (resourceCase_ == 25) { + return (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_; + } + return com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance(); + } + public static final int SKADNETWORK_CONVERSION_VALUE_SCHEMA_FIELD_NUMBER = 26; /** * @@ -2406,6 +2503,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 24, (com.google.analytics.admin.v1alpha.EnhancedMeasurementSettings) resource_); } + if (resourceCase_ == 25) { + output.writeMessage( + 25, (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_); + } if (resourceCase_ == 26) { output.writeMessage( 26, (com.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema) resource_); @@ -2525,6 +2626,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 24, (com.google.analytics.admin.v1alpha.EnhancedMeasurementSettings) resource_); } + if (resourceCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_); + } if (resourceCase_ == 26) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -2627,6 +2733,9 @@ public boolean equals(final java.lang.Object obj) { if (!getEnhancedMeasurementSettings().equals(other.getEnhancedMeasurementSettings())) return false; break; + case 25: + if (!getDataRedactionSettings().equals(other.getDataRedactionSettings())) return false; + break; case 26: if (!getSkadnetworkConversionValueSchema() .equals(other.getSkadnetworkConversionValueSchema())) return false; @@ -2731,6 +2840,10 @@ public int hashCode() { hash = (37 * hash) + ENHANCED_MEASUREMENT_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getEnhancedMeasurementSettings().hashCode(); break; + case 25: + hash = (37 * hash) + DATA_REDACTION_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDataRedactionSettings().hashCode(); + break; case 26: hash = (37 * hash) + SKADNETWORK_CONVERSION_VALUE_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getSkadnetworkConversionValueSchema().hashCode(); @@ -2959,6 +3072,9 @@ public Builder clear() { if (enhancedMeasurementSettingsBuilder_ != null) { enhancedMeasurementSettingsBuilder_.clear(); } + if (dataRedactionSettingsBuilder_ != null) { + dataRedactionSettingsBuilder_.clear(); + } if (skadnetworkConversionValueSchemaBuilder_ != null) { skadnetworkConversionValueSchemaBuilder_.clear(); } @@ -3078,6 +3194,9 @@ private void buildPartialOneofs( if (resourceCase_ == 24 && enhancedMeasurementSettingsBuilder_ != null) { result.resource_ = enhancedMeasurementSettingsBuilder_.build(); } + if (resourceCase_ == 25 && dataRedactionSettingsBuilder_ != null) { + result.resource_ = dataRedactionSettingsBuilder_.build(); + } if (resourceCase_ == 26 && skadnetworkConversionValueSchemaBuilder_ != null) { result.resource_ = skadnetworkConversionValueSchemaBuilder_.build(); } @@ -3242,6 +3361,11 @@ public Builder mergeFrom( mergeEnhancedMeasurementSettings(other.getEnhancedMeasurementSettings()); break; } + case DATA_REDACTION_SETTINGS: + { + mergeDataRedactionSettings(other.getDataRedactionSettings()); + break; + } case SKADNETWORK_CONVERSION_VALUE_SCHEMA: { mergeSkadnetworkConversionValueSchema(other.getSkadnetworkConversionValueSchema()); @@ -3420,6 +3544,13 @@ public Builder mergeFrom( resourceCase_ = 24; break; } // case 194 + case 202: + { + input.readMessage( + getDataRedactionSettingsFieldBuilder().getBuilder(), extensionRegistry); + resourceCase_ = 25; + break; + } // case 202 case 210: { input.readMessage( @@ -7651,6 +7782,231 @@ public Builder clearEnhancedMeasurementSettings() { return enhancedMeasurementSettingsBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.DataRedactionSettings, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder, + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder> + dataRedactionSettingsBuilder_; + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + * + * @return Whether the dataRedactionSettings field is set. + */ + @java.lang.Override + public boolean hasDataRedactionSettings() { + return resourceCase_ == 25; + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + * + * @return The dataRedactionSettings. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettings getDataRedactionSettings() { + if (dataRedactionSettingsBuilder_ == null) { + if (resourceCase_ == 25) { + return (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_; + } + return com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance(); + } else { + if (resourceCase_ == 25) { + return dataRedactionSettingsBuilder_.getMessage(); + } + return com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + public Builder setDataRedactionSettings( + com.google.analytics.admin.v1alpha.DataRedactionSettings value) { + if (dataRedactionSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + dataRedactionSettingsBuilder_.setMessage(value); + } + resourceCase_ = 25; + return this; + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + public Builder setDataRedactionSettings( + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder builderForValue) { + if (dataRedactionSettingsBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + dataRedactionSettingsBuilder_.setMessage(builderForValue.build()); + } + resourceCase_ = 25; + return this; + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + public Builder mergeDataRedactionSettings( + com.google.analytics.admin.v1alpha.DataRedactionSettings value) { + if (dataRedactionSettingsBuilder_ == null) { + if (resourceCase_ == 25 + && resource_ + != com.google.analytics.admin.v1alpha.DataRedactionSettings + .getDefaultInstance()) { + resource_ = + com.google.analytics.admin.v1alpha.DataRedactionSettings.newBuilder( + (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_) + .mergeFrom(value) + .buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + if (resourceCase_ == 25) { + dataRedactionSettingsBuilder_.mergeFrom(value); + } else { + dataRedactionSettingsBuilder_.setMessage(value); + } + } + resourceCase_ = 25; + return this; + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + public Builder clearDataRedactionSettings() { + if (dataRedactionSettingsBuilder_ == null) { + if (resourceCase_ == 25) { + resourceCase_ = 0; + resource_ = null; + onChanged(); + } + } else { + if (resourceCase_ == 25) { + resourceCase_ = 0; + resource_ = null; + } + dataRedactionSettingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + public com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder + getDataRedactionSettingsBuilder() { + return getDataRedactionSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder + getDataRedactionSettingsOrBuilder() { + if ((resourceCase_ == 25) && (dataRedactionSettingsBuilder_ != null)) { + return dataRedactionSettingsBuilder_.getMessageOrBuilder(); + } else { + if (resourceCase_ == 25) { + return (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_; + } + return com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance(); + } + } + /** + * + * + *
+       * A snapshot of DataRedactionSettings resource in change history.
+       * 
+ * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 25; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.DataRedactionSettings, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder, + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder> + getDataRedactionSettingsFieldBuilder() { + if (dataRedactionSettingsBuilder_ == null) { + if (!(resourceCase_ == 25)) { + resource_ = + com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance(); + } + dataRedactionSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.DataRedactionSettings, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder, + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder>( + (com.google.analytics.admin.v1alpha.DataRedactionSettings) resource_, + getParentForChildren(), + isClean()); + resource_ = null; + } + resourceCase_ = 25; + onChanged(); + return dataRedactionSettingsBuilder_; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema, com.google.analytics.admin.v1alpha.SKAdNetworkConversionValueSchema.Builder, diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryResourceType.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryResourceType.java index 06c66651a5f8..b801d532aca2 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryResourceType.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ChangeHistoryResourceType.java @@ -218,6 +218,16 @@ public enum ChangeHistoryResourceType implements com.google.protobuf.ProtocolMes * ENHANCED_MEASUREMENT_SETTINGS = 24; */ ENHANCED_MEASUREMENT_SETTINGS(24), + /** + * + * + *
+   * DataRedactionSettings resource
+   * 
+ * + * DATA_REDACTION_SETTINGS = 25; + */ + DATA_REDACTION_SETTINGS(25), /** * * @@ -451,6 +461,16 @@ public enum ChangeHistoryResourceType implements com.google.protobuf.ProtocolMes * ENHANCED_MEASUREMENT_SETTINGS = 24; */ public static final int ENHANCED_MEASUREMENT_SETTINGS_VALUE = 24; + /** + * + * + *
+   * DataRedactionSettings resource
+   * 
+ * + * DATA_REDACTION_SETTINGS = 25; + */ + public static final int DATA_REDACTION_SETTINGS_VALUE = 25; /** * * @@ -554,6 +574,8 @@ public static ChangeHistoryResourceType forNumber(int value) { return CHANNEL_GROUP; case 24: return ENHANCED_MEASUREMENT_SETTINGS; + case 25: + return DATA_REDACTION_SETTINGS; case 26: return SKADNETWORK_CONVERSION_VALUE_SCHEMA; case 27: diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyRequest.java new file mode 100644 index 000000000000..4c80ed350380 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyRequest.java @@ -0,0 +1,1030 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for CreateRollupProperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateRollupPropertyRequest} + */ +public final class CreateRollupPropertyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.CreateRollupPropertyRequest) + CreateRollupPropertyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRollupPropertyRequest.newBuilder() to construct. + private CreateRollupPropertyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRollupPropertyRequest() { + sourceProperties_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRollupPropertyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.class, + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.Builder.class); + } + + public static final int ROLLUP_PROPERTY_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1alpha.Property rollupProperty_; + /** + * + * + *
+   * Required. The roll-up property to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollupProperty field is set. + */ + @java.lang.Override + public boolean hasRollupProperty() { + return rollupProperty_ != null; + } + /** + * + * + *
+   * Required. The roll-up property to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollupProperty. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.Property getRollupProperty() { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } + /** + * + * + *
+   * Required. The roll-up property to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getRollupPropertyOrBuilder() { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } + + public static final int SOURCE_PROPERTIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sourceProperties_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourceProperties. + */ + public com.google.protobuf.ProtocolStringList getSourcePropertiesList() { + return sourceProperties_; + } + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourceProperties. + */ + public int getSourcePropertiesCount() { + return sourceProperties_.size(); + } + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourceProperties at the given index. + */ + public java.lang.String getSourceProperties(int index) { + return sourceProperties_.get(index); + } + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourceProperties at the given index. + */ + public com.google.protobuf.ByteString getSourcePropertiesBytes(int index) { + return sourceProperties_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rollupProperty_ != null) { + output.writeMessage(1, getRollupProperty()); + } + for (int i = 0; i < sourceProperties_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceProperties_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rollupProperty_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRollupProperty()); + } + { + int dataSize = 0; + for (int i = 0; i < sourceProperties_.size(); i++) { + dataSize += computeStringSizeNoTag(sourceProperties_.getRaw(i)); + } + size += dataSize; + size += 1 * getSourcePropertiesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest other = + (com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest) obj; + + if (hasRollupProperty() != other.hasRollupProperty()) return false; + if (hasRollupProperty()) { + if (!getRollupProperty().equals(other.getRollupProperty())) return false; + } + if (!getSourcePropertiesList().equals(other.getSourcePropertiesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRollupProperty()) { + hash = (37 * hash) + ROLLUP_PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getRollupProperty().hashCode(); + } + if (getSourcePropertiesCount() > 0) { + hash = (37 * hash) + SOURCE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getSourcePropertiesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateRollupProperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateRollupPropertyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.CreateRollupPropertyRequest) + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.class, + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rollupProperty_ = null; + if (rollupPropertyBuilder_ != null) { + rollupPropertyBuilder_.dispose(); + rollupPropertyBuilder_ = null; + } + sourceProperties_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest build() { + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest buildPartial() { + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest result = + new com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rollupProperty_ = + rollupPropertyBuilder_ == null ? rollupProperty_ : rollupPropertyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + sourceProperties_.makeImmutable(); + result.sourceProperties_ = sourceProperties_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest) { + return mergeFrom((com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest other) { + if (other + == com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest.getDefaultInstance()) + return this; + if (other.hasRollupProperty()) { + mergeRollupProperty(other.getRollupProperty()); + } + if (!other.sourceProperties_.isEmpty()) { + if (sourceProperties_.isEmpty()) { + sourceProperties_ = other.sourceProperties_; + bitField0_ |= 0x00000002; + } else { + ensureSourcePropertiesIsMutable(); + sourceProperties_.addAll(other.sourceProperties_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRollupPropertyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourcePropertiesIsMutable(); + sourceProperties_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.analytics.admin.v1alpha.Property rollupProperty_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + rollupPropertyBuilder_; + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollupProperty field is set. + */ + public boolean hasRollupProperty() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollupProperty. + */ + public com.google.analytics.admin.v1alpha.Property getRollupProperty() { + if (rollupPropertyBuilder_ == null) { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } else { + return rollupPropertyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollupProperty(com.google.analytics.admin.v1alpha.Property value) { + if (rollupPropertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollupProperty_ = value; + } else { + rollupPropertyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollupProperty( + com.google.analytics.admin.v1alpha.Property.Builder builderForValue) { + if (rollupPropertyBuilder_ == null) { + rollupProperty_ = builderForValue.build(); + } else { + rollupPropertyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRollupProperty(com.google.analytics.admin.v1alpha.Property value) { + if (rollupPropertyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && rollupProperty_ != null + && rollupProperty_ + != com.google.analytics.admin.v1alpha.Property.getDefaultInstance()) { + getRollupPropertyBuilder().mergeFrom(value); + } else { + rollupProperty_ = value; + } + } else { + rollupPropertyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRollupProperty() { + bitField0_ = (bitField0_ & ~0x00000001); + rollupProperty_ = null; + if (rollupPropertyBuilder_ != null) { + rollupPropertyBuilder_.dispose(); + rollupPropertyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.Property.Builder getRollupPropertyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRollupPropertyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getRollupPropertyOrBuilder() { + if (rollupPropertyBuilder_ != null) { + return rollupPropertyBuilder_.getMessageOrBuilder(); + } else { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } + } + /** + * + * + *
+     * Required. The roll-up property to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + getRollupPropertyFieldBuilder() { + if (rollupPropertyBuilder_ == null) { + rollupPropertyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder>( + getRollupProperty(), getParentForChildren(), isClean()); + rollupProperty_ = null; + } + return rollupPropertyBuilder_; + } + + private com.google.protobuf.LazyStringArrayList sourceProperties_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSourcePropertiesIsMutable() { + if (!sourceProperties_.isModifiable()) { + sourceProperties_ = new com.google.protobuf.LazyStringArrayList(sourceProperties_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourceProperties. + */ + public com.google.protobuf.ProtocolStringList getSourcePropertiesList() { + sourceProperties_.makeImmutable(); + return sourceProperties_; + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourceProperties. + */ + public int getSourcePropertiesCount() { + return sourceProperties_.size(); + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourceProperties at the given index. + */ + public java.lang.String getSourceProperties(int index) { + return sourceProperties_.get(index); + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourceProperties at the given index. + */ + public com.google.protobuf.ByteString getSourcePropertiesBytes(int index) { + return sourceProperties_.getByteString(index); + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The sourceProperties to set. + * @return This builder for chaining. + */ + public Builder setSourceProperties(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcePropertiesIsMutable(); + sourceProperties_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sourceProperties to add. + * @return This builder for chaining. + */ + public Builder addSourceProperties(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcePropertiesIsMutable(); + sourceProperties_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The sourceProperties to add. + * @return This builder for chaining. + */ + public Builder addAllSourceProperties(java.lang.Iterable values) { + ensureSourcePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceProperties_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSourceProperties() { + sourceProperties_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource names of properties that will be sources to the
+     * created roll-up property.
+     * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the sourceProperties to add. + * @return This builder for chaining. + */ + public Builder addSourcePropertiesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSourcePropertiesIsMutable(); + sourceProperties_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.CreateRollupPropertyRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.CreateRollupPropertyRequest) + private static final com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest(); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRollupPropertyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyRequestOrBuilder.java new file mode 100644 index 000000000000..9b75e1ca1dfc --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface CreateRollupPropertyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.CreateRollupPropertyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The roll-up property to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollupProperty field is set. + */ + boolean hasRollupProperty(); + /** + * + * + *
+   * Required. The roll-up property to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollupProperty. + */ + com.google.analytics.admin.v1alpha.Property getRollupProperty(); + /** + * + * + *
+   * Required. The roll-up property to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property rollup_property = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1alpha.PropertyOrBuilder getRollupPropertyOrBuilder(); + + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourceProperties. + */ + java.util.List getSourcePropertiesList(); + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourceProperties. + */ + int getSourcePropertiesCount(); + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourceProperties at the given index. + */ + java.lang.String getSourceProperties(int index); + /** + * + * + *
+   * Optional. The resource names of properties that will be sources to the
+   * created roll-up property.
+   * 
+ * + * repeated string source_properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourceProperties at the given index. + */ + com.google.protobuf.ByteString getSourcePropertiesBytes(int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyResponse.java new file mode 100644 index 000000000000..587f1c65411f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyResponse.java @@ -0,0 +1,1288 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Response message for CreateRollupProperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateRollupPropertyResponse} + */ +public final class CreateRollupPropertyResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.CreateRollupPropertyResponse) + CreateRollupPropertyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRollupPropertyResponse.newBuilder() to construct. + private CreateRollupPropertyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRollupPropertyResponse() { + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRollupPropertyResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.class, + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.Builder.class); + } + + public static final int ROLLUP_PROPERTY_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1alpha.Property rollupProperty_; + /** + * + * + *
+   * The created roll-up property.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + * + * @return Whether the rollupProperty field is set. + */ + @java.lang.Override + public boolean hasRollupProperty() { + return rollupProperty_ != null; + } + /** + * + * + *
+   * The created roll-up property.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + * + * @return The rollupProperty. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.Property getRollupProperty() { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } + /** + * + * + *
+   * The created roll-up property.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getRollupPropertyOrBuilder() { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } + + public static final int ROLLUP_PROPERTY_SOURCE_LINKS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + rollupPropertySourceLinks_; + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + @java.lang.Override + public java.util.List + getRollupPropertySourceLinksList() { + return rollupPropertySourceLinks_; + } + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + getRollupPropertySourceLinksOrBuilderList() { + return rollupPropertySourceLinks_; + } + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + @java.lang.Override + public int getRollupPropertySourceLinksCount() { + return rollupPropertySourceLinks_.size(); + } + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLinks( + int index) { + return rollupPropertySourceLinks_.get(index); + } + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinksOrBuilder(int index) { + return rollupPropertySourceLinks_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rollupProperty_ != null) { + output.writeMessage(1, getRollupProperty()); + } + for (int i = 0; i < rollupPropertySourceLinks_.size(); i++) { + output.writeMessage(2, rollupPropertySourceLinks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rollupProperty_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRollupProperty()); + } + for (int i = 0; i < rollupPropertySourceLinks_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, rollupPropertySourceLinks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse other = + (com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse) obj; + + if (hasRollupProperty() != other.hasRollupProperty()) return false; + if (hasRollupProperty()) { + if (!getRollupProperty().equals(other.getRollupProperty())) return false; + } + if (!getRollupPropertySourceLinksList().equals(other.getRollupPropertySourceLinksList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRollupProperty()) { + hash = (37 * hash) + ROLLUP_PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getRollupProperty().hashCode(); + } + if (getRollupPropertySourceLinksCount() > 0) { + hash = (37 * hash) + ROLLUP_PROPERTY_SOURCE_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getRollupPropertySourceLinksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for CreateRollupProperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateRollupPropertyResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.CreateRollupPropertyResponse) + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.class, + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rollupProperty_ = null; + if (rollupPropertyBuilder_ != null) { + rollupPropertyBuilder_.dispose(); + rollupPropertyBuilder_ = null; + } + if (rollupPropertySourceLinksBuilder_ == null) { + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + } else { + rollupPropertySourceLinks_ = null; + rollupPropertySourceLinksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertyResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse build() { + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse buildPartial() { + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse result = + new com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse result) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + rollupPropertySourceLinks_ = + java.util.Collections.unmodifiableList(rollupPropertySourceLinks_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rollupPropertySourceLinks_ = rollupPropertySourceLinks_; + } else { + result.rollupPropertySourceLinks_ = rollupPropertySourceLinksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rollupProperty_ = + rollupPropertyBuilder_ == null ? rollupProperty_ : rollupPropertyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse) { + return mergeFrom((com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse other) { + if (other + == com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse.getDefaultInstance()) + return this; + if (other.hasRollupProperty()) { + mergeRollupProperty(other.getRollupProperty()); + } + if (rollupPropertySourceLinksBuilder_ == null) { + if (!other.rollupPropertySourceLinks_.isEmpty()) { + if (rollupPropertySourceLinks_.isEmpty()) { + rollupPropertySourceLinks_ = other.rollupPropertySourceLinks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.addAll(other.rollupPropertySourceLinks_); + } + onChanged(); + } + } else { + if (!other.rollupPropertySourceLinks_.isEmpty()) { + if (rollupPropertySourceLinksBuilder_.isEmpty()) { + rollupPropertySourceLinksBuilder_.dispose(); + rollupPropertySourceLinksBuilder_ = null; + rollupPropertySourceLinks_ = other.rollupPropertySourceLinks_; + bitField0_ = (bitField0_ & ~0x00000002); + rollupPropertySourceLinksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRollupPropertySourceLinksFieldBuilder() + : null; + } else { + rollupPropertySourceLinksBuilder_.addAllMessages(other.rollupPropertySourceLinks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRollupPropertyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.analytics.admin.v1alpha.RollupPropertySourceLink m = + input.readMessage( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.parser(), + extensionRegistry); + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(m); + } else { + rollupPropertySourceLinksBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.analytics.admin.v1alpha.Property rollupProperty_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + rollupPropertyBuilder_; + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + * + * @return Whether the rollupProperty field is set. + */ + public boolean hasRollupProperty() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + * + * @return The rollupProperty. + */ + public com.google.analytics.admin.v1alpha.Property getRollupProperty() { + if (rollupPropertyBuilder_ == null) { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } else { + return rollupPropertyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + public Builder setRollupProperty(com.google.analytics.admin.v1alpha.Property value) { + if (rollupPropertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollupProperty_ = value; + } else { + rollupPropertyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + public Builder setRollupProperty( + com.google.analytics.admin.v1alpha.Property.Builder builderForValue) { + if (rollupPropertyBuilder_ == null) { + rollupProperty_ = builderForValue.build(); + } else { + rollupPropertyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + public Builder mergeRollupProperty(com.google.analytics.admin.v1alpha.Property value) { + if (rollupPropertyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && rollupProperty_ != null + && rollupProperty_ + != com.google.analytics.admin.v1alpha.Property.getDefaultInstance()) { + getRollupPropertyBuilder().mergeFrom(value); + } else { + rollupProperty_ = value; + } + } else { + rollupPropertyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + public Builder clearRollupProperty() { + bitField0_ = (bitField0_ & ~0x00000001); + rollupProperty_ = null; + if (rollupPropertyBuilder_ != null) { + rollupPropertyBuilder_.dispose(); + rollupPropertyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + public com.google.analytics.admin.v1alpha.Property.Builder getRollupPropertyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRollupPropertyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getRollupPropertyOrBuilder() { + if (rollupPropertyBuilder_ != null) { + return rollupPropertyBuilder_.getMessageOrBuilder(); + } else { + return rollupProperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : rollupProperty_; + } + } + /** + * + * + *
+     * The created roll-up property.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + getRollupPropertyFieldBuilder() { + if (rollupPropertyBuilder_ == null) { + rollupPropertyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder>( + getRollupProperty(), getParentForChildren(), isClean()); + rollupProperty_ = null; + } + return rollupPropertyBuilder_; + } + + private java.util.List + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + + private void ensureRollupPropertySourceLinksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + rollupPropertySourceLinks_ = + new java.util.ArrayList( + rollupPropertySourceLinks_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + rollupPropertySourceLinksBuilder_; + + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public java.util.List + getRollupPropertySourceLinksList() { + if (rollupPropertySourceLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(rollupPropertySourceLinks_); + } else { + return rollupPropertySourceLinksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public int getRollupPropertySourceLinksCount() { + if (rollupPropertySourceLinksBuilder_ == null) { + return rollupPropertySourceLinks_.size(); + } else { + return rollupPropertySourceLinksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLinks( + int index) { + if (rollupPropertySourceLinksBuilder_ == null) { + return rollupPropertySourceLinks_.get(index); + } else { + return rollupPropertySourceLinksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder setRollupPropertySourceLinks( + int index, com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.set(index, value); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder setRollupPropertySourceLinks( + int index, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder builderForValue) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder addRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(value); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder addRollupPropertySourceLinks( + int index, com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(index, value); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder addRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder builderForValue) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(builderForValue.build()); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder addRollupPropertySourceLinks( + int index, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder builderForValue) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder addAllRollupPropertySourceLinks( + java.lang.Iterable + values) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rollupPropertySourceLinks_); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder clearRollupPropertySourceLinks() { + if (rollupPropertySourceLinksBuilder_ == null) { + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public Builder removeRollupPropertySourceLinks(int index) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.remove(index); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder + getRollupPropertySourceLinksBuilder(int index) { + return getRollupPropertySourceLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinksOrBuilder(int index) { + if (rollupPropertySourceLinksBuilder_ == null) { + return rollupPropertySourceLinks_.get(index); + } else { + return rollupPropertySourceLinksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + getRollupPropertySourceLinksOrBuilderList() { + if (rollupPropertySourceLinksBuilder_ != null) { + return rollupPropertySourceLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rollupPropertySourceLinks_); + } + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder + addRollupPropertySourceLinksBuilder() { + return getRollupPropertySourceLinksFieldBuilder() + .addBuilder( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance()); + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder + addRollupPropertySourceLinksBuilder(int index) { + return getRollupPropertySourceLinksFieldBuilder() + .addBuilder( + index, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance()); + } + /** + * + * + *
+     * The created roll-up property source links.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + public java.util.List + getRollupPropertySourceLinksBuilderList() { + return getRollupPropertySourceLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + getRollupPropertySourceLinksFieldBuilder() { + if (rollupPropertySourceLinksBuilder_ == null) { + rollupPropertySourceLinksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder>( + rollupPropertySourceLinks_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + rollupPropertySourceLinks_ = null; + } + return rollupPropertySourceLinksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.CreateRollupPropertyResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.CreateRollupPropertyResponse) + private static final com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse(); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRollupPropertyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyResponseOrBuilder.java new file mode 100644 index 000000000000..4f1a51e8a5ce --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertyResponseOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface CreateRollupPropertyResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.CreateRollupPropertyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The created roll-up property.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + * + * @return Whether the rollupProperty field is set. + */ + boolean hasRollupProperty(); + /** + * + * + *
+   * The created roll-up property.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + * + * @return The rollupProperty. + */ + com.google.analytics.admin.v1alpha.Property getRollupProperty(); + /** + * + * + *
+   * The created roll-up property.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property rollup_property = 1; + */ + com.google.analytics.admin.v1alpha.PropertyOrBuilder getRollupPropertyOrBuilder(); + + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + java.util.List + getRollupPropertySourceLinksList(); + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLinks( + int index); + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + int getRollupPropertySourceLinksCount(); + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + java.util.List + getRollupPropertySourceLinksOrBuilderList(); + /** + * + * + *
+   * The created roll-up property source links.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 2; + * + */ + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinksOrBuilder(int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertySourceLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertySourceLinkRequest.java new file mode 100644 index 000000000000..fe838f34b369 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertySourceLinkRequest.java @@ -0,0 +1,967 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for CreateRollupPropertySourceLink RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest} + */ +public final class CreateRollupPropertySourceLinkRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) + CreateRollupPropertySourceLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRollupPropertySourceLinkRequest.newBuilder() to construct. + private CreateRollupPropertySourceLinkRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRollupPropertySourceLinkRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRollupPropertySourceLinkRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest.class, + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLUP_PROPERTY_SOURCE_LINK_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1alpha.RollupPropertySourceLink rollupPropertySourceLink_; + /** + * + * + *
+   * Required. The roll-up property source link to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollupPropertySourceLink field is set. + */ + @java.lang.Override + public boolean hasRollupPropertySourceLink() { + return rollupPropertySourceLink_ != null; + } + /** + * + * + *
+   * Required. The roll-up property source link to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollupPropertySourceLink. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLink() { + return rollupPropertySourceLink_ == null + ? com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance() + : rollupPropertySourceLink_; + } + /** + * + * + *
+   * Required. The roll-up property source link to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinkOrBuilder() { + return rollupPropertySourceLink_ == null + ? com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance() + : rollupPropertySourceLink_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (rollupPropertySourceLink_ != null) { + output.writeMessage(2, getRollupPropertySourceLink()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (rollupPropertySourceLink_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getRollupPropertySourceLink()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest other = + (com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRollupPropertySourceLink() != other.hasRollupPropertySourceLink()) return false; + if (hasRollupPropertySourceLink()) { + if (!getRollupPropertySourceLink().equals(other.getRollupPropertySourceLink())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasRollupPropertySourceLink()) { + hash = (37 * hash) + ROLLUP_PROPERTY_SOURCE_LINK_FIELD_NUMBER; + hash = (53 * hash) + getRollupPropertySourceLink().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateRollupPropertySourceLink RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest.class, + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + rollupPropertySourceLink_ = null; + if (rollupPropertySourceLinkBuilder_ != null) { + rollupPropertySourceLinkBuilder_.dispose(); + rollupPropertySourceLinkBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateRollupPropertySourceLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest build() { + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest buildPartial() { + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest result = + new com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rollupPropertySourceLink_ = + rollupPropertySourceLinkBuilder_ == null + ? rollupPropertySourceLink_ + : rollupPropertySourceLinkBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest other) { + if (other + == com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRollupPropertySourceLink()) { + mergeRollupPropertySourceLink(other.getRollupPropertySourceLink()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getRollupPropertySourceLinkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: properties/{property_id}
+     * Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1alpha.RollupPropertySourceLink rollupPropertySourceLink_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + rollupPropertySourceLinkBuilder_; + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollupPropertySourceLink field is set. + */ + public boolean hasRollupPropertySourceLink() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollupPropertySourceLink. + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink + getRollupPropertySourceLink() { + if (rollupPropertySourceLinkBuilder_ == null) { + return rollupPropertySourceLink_ == null + ? com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance() + : rollupPropertySourceLink_; + } else { + return rollupPropertySourceLinkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollupPropertySourceLink_ = value; + } else { + rollupPropertySourceLinkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder builderForValue) { + if (rollupPropertySourceLinkBuilder_ == null) { + rollupPropertySourceLink_ = builderForValue.build(); + } else { + rollupPropertySourceLinkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRollupPropertySourceLink( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinkBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rollupPropertySourceLink_ != null + && rollupPropertySourceLink_ + != com.google.analytics.admin.v1alpha.RollupPropertySourceLink + .getDefaultInstance()) { + getRollupPropertySourceLinkBuilder().mergeFrom(value); + } else { + rollupPropertySourceLink_ = value; + } + } else { + rollupPropertySourceLinkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRollupPropertySourceLink() { + bitField0_ = (bitField0_ & ~0x00000002); + rollupPropertySourceLink_ = null; + if (rollupPropertySourceLinkBuilder_ != null) { + rollupPropertySourceLinkBuilder_.dispose(); + rollupPropertySourceLinkBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder + getRollupPropertySourceLinkBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRollupPropertySourceLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinkOrBuilder() { + if (rollupPropertySourceLinkBuilder_ != null) { + return rollupPropertySourceLinkBuilder_.getMessageOrBuilder(); + } else { + return rollupPropertySourceLink_ == null + ? com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance() + : rollupPropertySourceLink_; + } + } + /** + * + * + *
+     * Required. The roll-up property source link to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + getRollupPropertySourceLinkFieldBuilder() { + if (rollupPropertySourceLinkBuilder_ == null) { + rollupPropertySourceLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder>( + getRollupPropertySourceLink(), getParentForChildren(), isClean()); + rollupPropertySourceLink_ = null; + } + return rollupPropertySourceLinkBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) + private static final com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest(); + } + + public static com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRollupPropertySourceLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateUserLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertySourceLinkRequestOrBuilder.java similarity index 57% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateUserLinkRequestOrBuilder.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertySourceLinkRequestOrBuilder.java index 793167f465fd..cb5b773e2ea9 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateUserLinkRequestOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateRollupPropertySourceLinkRequestOrBuilder.java @@ -18,16 +18,17 @@ package com.google.analytics.admin.v1alpha; -public interface CreateUserLinkRequestOrBuilder +public interface CreateRollupPropertySourceLinkRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.CreateUserLinkRequest) + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Example format: accounts/1234
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
    * 
* * @@ -41,7 +42,8 @@ public interface CreateUserLinkRequestOrBuilder * * *
-   * Required. Example format: accounts/1234
+   * Required. Format: properties/{property_id}
+   * Example: properties/1234
    * 
* * @@ -56,54 +58,41 @@ public interface CreateUserLinkRequestOrBuilder * * *
-   * Optional. If set, then email the new user notifying them that they've been
-   * granted permissions to the resource.
-   * 
- * - * bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The notifyNewUser. - */ - boolean getNotifyNewUser(); - - /** - * - * - *
-   * Required. The user link to create.
+   * Required. The roll-up property source link to create.
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the userLink field is set. + * @return Whether the rollupPropertySourceLink field is set. */ - boolean hasUserLink(); + boolean hasRollupPropertySourceLink(); /** * * *
-   * Required. The user link to create.
+   * Required. The roll-up property source link to create.
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The userLink. + * @return The rollupPropertySourceLink. */ - com.google.analytics.admin.v1alpha.UserLink getUserLink(); + com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLink(); /** * * *
-   * Required. The user link to create.
+   * Required. The roll-up property source link to create.
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_link = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinkOrBuilder(); + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinkOrBuilder(); } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateUserLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyEventFilterRequest.java similarity index 55% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateUserLinkRequest.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyEventFilterRequest.java index ca05a43fa08e..74f79c656287 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateUserLinkRequest.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyEventFilterRequest.java @@ -22,51 +22,46 @@ * * *
- * Request message for CreateUserLink RPC.
- *
- * Users can have multiple email addresses associated with their Google
- * account, and one of these email addresses is the "primary" email address.
- * Any of the email addresses associated with a Google account may be used
- * for a new UserLink, but the returned UserLink will always contain the
- * "primary" email address. As a result, the input and output email address
- * for this request may differ.
+ * Request message for CreateSubpropertyEventFilter RPC.
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.CreateUserLinkRequest} + * Protobuf type {@code google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest} */ -public final class CreateUserLinkRequest extends com.google.protobuf.GeneratedMessageV3 +public final class CreateSubpropertyEventFilterRequest + extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.CreateUserLinkRequest) - CreateUserLinkRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) + CreateSubpropertyEventFilterRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use CreateUserLinkRequest.newBuilder() to construct. - private CreateUserLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use CreateSubpropertyEventFilterRequest.newBuilder() to construct. + private CreateSubpropertyEventFilterRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CreateUserLinkRequest() { + private CreateSubpropertyEventFilterRequest() { parent_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateUserLinkRequest(); + return new CreateSubpropertyEventFilterRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_fieldAccessorTable + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.class, - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder.class); + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; @@ -77,7 +72,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Example format: accounts/1234
+   * Required. The ordinary property for which to create a subproperty event
+   * filter. Format: properties/property_id Example: properties/123
    * 
* * @@ -102,7 +98,8 @@ public java.lang.String getParent() { * * *
-   * Required. Example format: accounts/1234
+   * Required. The ordinary property for which to create a subproperty event
+   * filter. Format: properties/property_id Example: properties/123
    * 
* * @@ -124,79 +121,61 @@ public com.google.protobuf.ByteString getParentBytes() { } } - public static final int NOTIFY_NEW_USER_FIELD_NUMBER = 2; - private boolean notifyNewUser_ = false; + public static final int SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; /** * * *
-   * Optional. If set, then email the new user notifying them that they've been
-   * granted permissions to the resource.
-   * 
- * - * bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The notifyNewUser. - */ - @java.lang.Override - public boolean getNotifyNewUser() { - return notifyNewUser_; - } - - public static final int USER_LINK_FIELD_NUMBER = 3; - private com.google.analytics.admin.v1alpha.UserLink userLink_; - /** - * - * - *
-   * Required. The user link to create.
+   * Required. The subproperty event filter to create.
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the userLink field is set. + * @return Whether the subpropertyEventFilter field is set. */ @java.lang.Override - public boolean hasUserLink() { - return userLink_ != null; + public boolean hasSubpropertyEventFilter() { + return subpropertyEventFilter_ != null; } /** * * *
-   * Required. The user link to create.
+   * Required. The subproperty event filter to create.
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The userLink. + * @return The subpropertyEventFilter. */ @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getUserLink() { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; } /** * * *
-   * Required. The user link to create.
+   * Required. The subproperty event filter to create.
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinkOrBuilder() { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; } private byte memoizedIsInitialized = -1; @@ -216,11 +195,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (notifyNewUser_ != false) { - output.writeBool(2, notifyNewUser_); - } - if (userLink_ != null) { - output.writeMessage(3, getUserLink()); + if (subpropertyEventFilter_ != null) { + output.writeMessage(2, getSubpropertyEventFilter()); } getUnknownFields().writeTo(output); } @@ -234,11 +210,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (notifyNewUser_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, notifyNewUser_); - } - if (userLink_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUserLink()); + if (subpropertyEventFilter_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubpropertyEventFilter()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -250,17 +224,16 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.CreateUserLinkRequest)) { + if (!(obj instanceof com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.CreateUserLinkRequest other = - (com.google.analytics.admin.v1alpha.CreateUserLinkRequest) obj; + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest other = + (com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (getNotifyNewUser() != other.getNotifyNewUser()) return false; - if (hasUserLink() != other.hasUserLink()) return false; - if (hasUserLink()) { - if (!getUserLink().equals(other.getUserLink())) return false; + if (hasSubpropertyEventFilter() != other.hasSubpropertyEventFilter()) return false; + if (hasSubpropertyEventFilter()) { + if (!getSubpropertyEventFilter().equals(other.getSubpropertyEventFilter())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -275,82 +248,81 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + NOTIFY_NEW_USER_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNotifyNewUser()); - if (hasUserLink()) { - hash = (37 * hash) + USER_LINK_FIELD_NUMBER; - hash = (53 * hash) + getUserLink().hashCode(); + if (hasSubpropertyEventFilter()) { + hash = (37 * hash) + SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getSubpropertyEventFilter().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -368,7 +340,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest prototype) { + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -386,38 +358,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for CreateUserLink RPC.
-   *
-   * Users can have multiple email addresses associated with their Google
-   * account, and one of these email addresses is the "primary" email address.
-   * Any of the email addresses associated with a Google account may be used
-   * for a new UserLink, but the returned UserLink will always contain the
-   * "primary" email address. As a result, the input and output email address
-   * for this request may differ.
+   * Request message for CreateSubpropertyEventFilter RPC.
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.CreateUserLinkRequest} + * Protobuf type {@code google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.CreateUserLinkRequest) - com.google.analytics.admin.v1alpha.CreateUserLinkRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_fieldAccessorTable + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.class, - com.google.analytics.admin.v1alpha.CreateUserLinkRequest.Builder.class); + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.CreateUserLinkRequest.newBuilder() + // Construct using + // com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -429,11 +395,10 @@ public Builder clear() { super.clear(); bitField0_ = 0; parent_ = ""; - notifyNewUser_ = false; - userLink_ = null; - if (userLinkBuilder_ != null) { - userLinkBuilder_.dispose(); - userLinkBuilder_ = null; + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; } return this; } @@ -441,17 +406,20 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_CreateUserLinkRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyEventFilterRequest_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.CreateUserLinkRequest.getDefaultInstance(); + public com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + .getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest build() { - com.google.analytics.admin.v1alpha.CreateUserLinkRequest result = buildPartial(); + public com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest build() { + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -459,9 +427,9 @@ public com.google.analytics.admin.v1alpha.CreateUserLinkRequest build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest buildPartial() { - com.google.analytics.admin.v1alpha.CreateUserLinkRequest result = - new com.google.analytics.admin.v1alpha.CreateUserLinkRequest(this); + public com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest buildPartial() { + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest result = + new com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -469,16 +437,17 @@ public com.google.analytics.admin.v1alpha.CreateUserLinkRequest buildPartial() { return result; } - private void buildPartial0(com.google.analytics.admin.v1alpha.CreateUserLinkRequest result) { + private void buildPartial0( + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.notifyNewUser_ = notifyNewUser_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.userLink_ = userLinkBuilder_ == null ? userLink_ : userLinkBuilder_.build(); + result.subpropertyEventFilter_ = + subpropertyEventFilterBuilder_ == null + ? subpropertyEventFilter_ + : subpropertyEventFilterBuilder_.build(); } } @@ -517,27 +486,27 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.CreateUserLinkRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.CreateUserLinkRequest) other); + if (other instanceof com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.CreateUserLinkRequest other) { - if (other == com.google.analytics.admin.v1alpha.CreateUserLinkRequest.getDefaultInstance()) - return this; + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest other) { + if (other + == com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + .getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; bitField0_ |= 0x00000001; onChanged(); } - if (other.getNotifyNewUser() != false) { - setNotifyNewUser(other.getNotifyNewUser()); - } - if (other.hasUserLink()) { - mergeUserLink(other.getUserLink()); + if (other.hasSubpropertyEventFilter()) { + mergeSubpropertyEventFilter(other.getSubpropertyEventFilter()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -571,18 +540,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 - case 16: + case 18: { - notifyNewUser_ = input.readBool(); + input.readMessage( + getSubpropertyEventFilterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; - } // case 16 - case 26: - { - input.readMessage(getUserLinkFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -607,7 +571,8 @@ public Builder mergeFrom( * * *
-     * Required. Example format: accounts/1234
+     * Required. The ordinary property for which to create a subproperty event
+     * filter. Format: properties/property_id Example: properties/123
      * 
* * @@ -631,7 +596,8 @@ public java.lang.String getParent() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The ordinary property for which to create a subproperty event
+     * filter. Format: properties/property_id Example: properties/123
      * 
* * @@ -655,7 +621,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The ordinary property for which to create a subproperty event
+     * filter. Format: properties/property_id Example: properties/123
      * 
* * @@ -678,7 +645,8 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. Example format: accounts/1234
+     * Required. The ordinary property for which to create a subproperty event
+     * filter. Format: properties/property_id Example: properties/123
      * 
* * @@ -697,7 +665,8 @@ public Builder clearParent() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The ordinary property for which to create a subproperty event
+     * filter. Format: properties/property_id Example: properties/123
      * 
* * @@ -718,127 +687,72 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private boolean notifyNewUser_; - /** - * - * - *
-     * Optional. If set, then email the new user notifying them that they've been
-     * granted permissions to the resource.
-     * 
- * - * bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The notifyNewUser. - */ - @java.lang.Override - public boolean getNotifyNewUser() { - return notifyNewUser_; - } - /** - * - * - *
-     * Optional. If set, then email the new user notifying them that they've been
-     * granted permissions to the resource.
-     * 
- * - * bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The notifyNewUser to set. - * @return This builder for chaining. - */ - public Builder setNotifyNewUser(boolean value) { - - notifyNewUser_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If set, then email the new user notifying them that they've been
-     * granted permissions to the resource.
-     * 
- * - * bool notify_new_user = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNotifyNewUser() { - bitField0_ = (bitField0_ & ~0x00000002); - notifyNewUser_ = false; - onChanged(); - return this; - } - - private com.google.analytics.admin.v1alpha.UserLink userLink_; + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - userLinkBuilder_; + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + subpropertyEventFilterBuilder_; /** * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return Whether the userLink field is set. + * @return Whether the subpropertyEventFilter field is set. */ - public boolean hasUserLink() { - return ((bitField0_ & 0x00000004) != 0); + public boolean hasSubpropertyEventFilter() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * * - * @return The userLink. + * @return The subpropertyEventFilter. */ - public com.google.analytics.admin.v1alpha.UserLink getUserLink() { - if (userLinkBuilder_ == null) { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + if (subpropertyEventFilterBuilder_ == null) { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; } else { - return userLinkBuilder_.getMessage(); + return subpropertyEventFilterBuilder_.getMessage(); } } /** * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setUserLink(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinkBuilder_ == null) { + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - userLink_ = value; + subpropertyEventFilter_ = value; } else { - userLinkBuilder_.setMessage(value); + subpropertyEventFilterBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -846,21 +760,21 @@ public Builder setUserLink(com.google.analytics.admin.v1alpha.UserLink value) { * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder setUserLink( - com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinkBuilder_ == null) { - userLink_ = builderForValue.build(); + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder builderForValue) { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilter_ = builderForValue.build(); } else { - userLinkBuilder_.setMessage(builderForValue.build()); + subpropertyEventFilterBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -868,26 +782,28 @@ public Builder setUserLink( * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder mergeUserLink(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinkBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && userLink_ != null - && userLink_ != com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()) { - getUserLinkBuilder().mergeFrom(value); + public Builder mergeSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && subpropertyEventFilter_ != null + && subpropertyEventFilter_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance()) { + getSubpropertyEventFilterBuilder().mergeFrom(value); } else { - userLink_ = value; + subpropertyEventFilter_ = value; } } else { - userLinkBuilder_.mergeFrom(value); + subpropertyEventFilterBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -895,19 +811,19 @@ public Builder mergeUserLink(com.google.analytics.admin.v1alpha.UserLink value) * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public Builder clearUserLink() { - bitField0_ = (bitField0_ & ~0x00000004); - userLink_ = null; - if (userLinkBuilder_ != null) { - userLinkBuilder_.dispose(); - userLinkBuilder_ = null; + public Builder clearSubpropertyEventFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; } onChanged(); return this; @@ -916,64 +832,66 @@ public Builder clearUserLink() { * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.analytics.admin.v1alpha.UserLink.Builder getUserLinkBuilder() { - bitField0_ |= 0x00000004; + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder + getSubpropertyEventFilterBuilder() { + bitField0_ |= 0x00000002; onChanged(); - return getUserLinkFieldBuilder().getBuilder(); + return getSubpropertyEventFilterFieldBuilder().getBuilder(); } /** * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinkOrBuilder() { - if (userLinkBuilder_ != null) { - return userLinkBuilder_.getMessageOrBuilder(); + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + if (subpropertyEventFilterBuilder_ != null) { + return subpropertyEventFilterBuilder_.getMessageOrBuilder(); } else { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; } } /** * * *
-     * Required. The user link to create.
+     * Required. The subproperty event filter to create.
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - getUserLinkFieldBuilder() { - if (userLinkBuilder_ == null) { - userLinkBuilder_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + getSubpropertyEventFilterFieldBuilder() { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder>( - getUserLink(), getParentForChildren(), isClean()); - userLink_ = null; + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder>( + getSubpropertyEventFilter(), getParentForChildren(), isClean()); + subpropertyEventFilter_ = null; } - return userLinkBuilder_; + return subpropertyEventFilterBuilder_; } @java.lang.Override @@ -987,24 +905,26 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.CreateUserLinkRequest) + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.CreateUserLinkRequest) - private static final com.google.analytics.admin.v1alpha.CreateUserLinkRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) + private static final com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.CreateUserLinkRequest(); + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest(); } - public static com.google.analytics.admin.v1alpha.CreateUserLinkRequest getDefaultInstance() { + public static com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public CreateUserLinkRequest parsePartialFrom( + public CreateSubpropertyEventFilterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1023,17 +943,18 @@ public CreateUserLinkRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.CreateUserLinkRequest getDefaultInstanceForType() { + public com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyEventFilterRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyEventFilterRequestOrBuilder.java new file mode 100644 index 000000000000..f45fc7fba43c --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyEventFilterRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface CreateSubpropertyEventFilterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ordinary property for which to create a subproperty event
+   * filter. Format: properties/property_id Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The ordinary property for which to create a subproperty event
+   * filter. Format: properties/property_id Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The subproperty event filter to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + boolean hasSubpropertyEventFilter(); + /** + * + * + *
+   * Required. The subproperty event filter to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subpropertyEventFilter. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter(); + /** + * + * + *
+   * Required. The subproperty event filter to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyRequest.java new file mode 100644 index 000000000000..702859f450f2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyRequest.java @@ -0,0 +1,1243 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for CreateSubproperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateSubpropertyRequest} + */ +public final class CreateSubpropertyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.CreateSubpropertyRequest) + CreateSubpropertyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSubpropertyRequest.newBuilder() to construct. + private CreateSubpropertyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSubpropertyRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSubpropertyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.class, + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The ordinary property for which to create a subproperty.
+   * Format: properties/property_id
+   * Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ordinary property for which to create a subproperty.
+   * Format: properties/property_id
+   * Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBPROPERTY_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1alpha.Property subproperty_; + /** + * + * + *
+   * Required. The subproperty to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subproperty field is set. + */ + @java.lang.Override + public boolean hasSubproperty() { + return subproperty_ != null; + } + /** + * + * + *
+   * Required. The subproperty to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subproperty. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.Property getSubproperty() { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } + /** + * + * + *
+   * Required. The subproperty to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getSubpropertyOrBuilder() { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } + + public static final int SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER = 3; + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; + /** + * + * + *
+   * Optional. The subproperty event filter to create on an ordinary property.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + @java.lang.Override + public boolean hasSubpropertyEventFilter() { + return subpropertyEventFilter_ != null; + } + /** + * + * + *
+   * Optional. The subproperty event filter to create on an ordinary property.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subpropertyEventFilter. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + /** + * + * + *
+   * Optional. The subproperty event filter to create on an ordinary property.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (subproperty_ != null) { + output.writeMessage(2, getSubproperty()); + } + if (subpropertyEventFilter_ != null) { + output.writeMessage(3, getSubpropertyEventFilter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (subproperty_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubproperty()); + } + if (subpropertyEventFilter_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSubpropertyEventFilter()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.CreateSubpropertyRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest other = + (com.google.analytics.admin.v1alpha.CreateSubpropertyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasSubproperty() != other.hasSubproperty()) return false; + if (hasSubproperty()) { + if (!getSubproperty().equals(other.getSubproperty())) return false; + } + if (hasSubpropertyEventFilter() != other.hasSubpropertyEventFilter()) return false; + if (hasSubpropertyEventFilter()) { + if (!getSubpropertyEventFilter().equals(other.getSubpropertyEventFilter())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasSubproperty()) { + hash = (37 * hash) + SUBPROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getSubproperty().hashCode(); + } + if (hasSubpropertyEventFilter()) { + hash = (37 * hash) + SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getSubpropertyEventFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateSubproperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateSubpropertyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.CreateSubpropertyRequest) + com.google.analytics.admin.v1alpha.CreateSubpropertyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.class, + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + subproperty_ = null; + if (subpropertyBuilder_ != null) { + subpropertyBuilder_.dispose(); + subpropertyBuilder_ = null; + } + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyRequest getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyRequest build() { + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyRequest buildPartial() { + com.google.analytics.admin.v1alpha.CreateSubpropertyRequest result = + new com.google.analytics.admin.v1alpha.CreateSubpropertyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.analytics.admin.v1alpha.CreateSubpropertyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subproperty_ = + subpropertyBuilder_ == null ? subproperty_ : subpropertyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subpropertyEventFilter_ = + subpropertyEventFilterBuilder_ == null + ? subpropertyEventFilter_ + : subpropertyEventFilterBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.CreateSubpropertyRequest) { + return mergeFrom((com.google.analytics.admin.v1alpha.CreateSubpropertyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.CreateSubpropertyRequest other) { + if (other == com.google.analytics.admin.v1alpha.CreateSubpropertyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSubproperty()) { + mergeSubproperty(other.getSubproperty()); + } + if (other.hasSubpropertyEventFilter()) { + mergeSubpropertyEventFilter(other.getSubpropertyEventFilter()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSubpropertyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getSubpropertyEventFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The ordinary property for which to create a subproperty.
+     * Format: properties/property_id
+     * Example: properties/123
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ordinary property for which to create a subproperty.
+     * Format: properties/property_id
+     * Example: properties/123
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ordinary property for which to create a subproperty.
+     * Format: properties/property_id
+     * Example: properties/123
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ordinary property for which to create a subproperty.
+     * Format: properties/property_id
+     * Example: properties/123
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ordinary property for which to create a subproperty.
+     * Format: properties/property_id
+     * Example: properties/123
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1alpha.Property subproperty_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + subpropertyBuilder_; + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subproperty field is set. + */ + public boolean hasSubproperty() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subproperty. + */ + public com.google.analytics.admin.v1alpha.Property getSubproperty() { + if (subpropertyBuilder_ == null) { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } else { + return subpropertyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubproperty(com.google.analytics.admin.v1alpha.Property value) { + if (subpropertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subproperty_ = value; + } else { + subpropertyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubproperty( + com.google.analytics.admin.v1alpha.Property.Builder builderForValue) { + if (subpropertyBuilder_ == null) { + subproperty_ = builderForValue.build(); + } else { + subpropertyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSubproperty(com.google.analytics.admin.v1alpha.Property value) { + if (subpropertyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && subproperty_ != null + && subproperty_ != com.google.analytics.admin.v1alpha.Property.getDefaultInstance()) { + getSubpropertyBuilder().mergeFrom(value); + } else { + subproperty_ = value; + } + } else { + subpropertyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSubproperty() { + bitField0_ = (bitField0_ & ~0x00000002); + subproperty_ = null; + if (subpropertyBuilder_ != null) { + subpropertyBuilder_.dispose(); + subpropertyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.Property.Builder getSubpropertyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSubpropertyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getSubpropertyOrBuilder() { + if (subpropertyBuilder_ != null) { + return subpropertyBuilder_.getMessageOrBuilder(); + } else { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } + } + /** + * + * + *
+     * Required. The subproperty to create.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + getSubpropertyFieldBuilder() { + if (subpropertyBuilder_ == null) { + subpropertyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder>( + getSubproperty(), getParentForChildren(), isClean()); + subproperty_ = null; + } + return subpropertyBuilder_; + } + + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + subpropertyEventFilterBuilder_; + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + public boolean hasSubpropertyEventFilter() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subpropertyEventFilter. + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + if (subpropertyEventFilterBuilder_ == null) { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } else { + return subpropertyEventFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subpropertyEventFilter_ = value; + } else { + subpropertyEventFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder builderForValue) { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilter_ = builderForValue.build(); + } else { + subpropertyEventFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && subpropertyEventFilter_ != null + && subpropertyEventFilter_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance()) { + getSubpropertyEventFilterBuilder().mergeFrom(value); + } else { + subpropertyEventFilter_ = value; + } + } else { + subpropertyEventFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSubpropertyEventFilter() { + bitField0_ = (bitField0_ & ~0x00000004); + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder + getSubpropertyEventFilterBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubpropertyEventFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + if (subpropertyEventFilterBuilder_ != null) { + return subpropertyEventFilterBuilder_.getMessageOrBuilder(); + } else { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + } + /** + * + * + *
+     * Optional. The subproperty event filter to create on an ordinary property.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + getSubpropertyEventFilterFieldBuilder() { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder>( + getSubpropertyEventFilter(), getParentForChildren(), isClean()); + subpropertyEventFilter_ = null; + } + return subpropertyEventFilterBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.CreateSubpropertyRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.CreateSubpropertyRequest) + private static final com.google.analytics.admin.v1alpha.CreateSubpropertyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.CreateSubpropertyRequest(); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubpropertyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyRequestOrBuilder.java new file mode 100644 index 000000000000..e9b8d29ea8da --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface CreateSubpropertyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.CreateSubpropertyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ordinary property for which to create a subproperty.
+   * Format: properties/property_id
+   * Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The ordinary property for which to create a subproperty.
+   * Format: properties/property_id
+   * Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The subproperty to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subproperty field is set. + */ + boolean hasSubproperty(); + /** + * + * + *
+   * Required. The subproperty to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subproperty. + */ + com.google.analytics.admin.v1alpha.Property getSubproperty(); + /** + * + * + *
+   * Required. The subproperty to create.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.Property subproperty = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1alpha.PropertyOrBuilder getSubpropertyOrBuilder(); + + /** + * + * + *
+   * Optional. The subproperty event filter to create on an ordinary property.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + boolean hasSubpropertyEventFilter(); + /** + * + * + *
+   * Optional. The subproperty event filter to create on an ordinary property.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subpropertyEventFilter. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter(); + /** + * + * + *
+   * Optional. The subproperty event filter to create on an ordinary property.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyResponse.java new file mode 100644 index 000000000000..94c4378e0c6f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyResponse.java @@ -0,0 +1,1000 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Response message for CreateSubproperty RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateSubpropertyResponse} + */ +public final class CreateSubpropertyResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.CreateSubpropertyResponse) + CreateSubpropertyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSubpropertyResponse.newBuilder() to construct. + private CreateSubpropertyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSubpropertyResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSubpropertyResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.class, + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.Builder.class); + } + + public static final int SUBPROPERTY_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1alpha.Property subproperty_; + /** + * + * + *
+   * The created subproperty.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + * + * @return Whether the subproperty field is set. + */ + @java.lang.Override + public boolean hasSubproperty() { + return subproperty_ != null; + } + /** + * + * + *
+   * The created subproperty.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + * + * @return The subproperty. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.Property getSubproperty() { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } + /** + * + * + *
+   * The created subproperty.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getSubpropertyOrBuilder() { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } + + public static final int SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; + /** + * + * + *
+   * The created subproperty event filter.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + @java.lang.Override + public boolean hasSubpropertyEventFilter() { + return subpropertyEventFilter_ != null; + } + /** + * + * + *
+   * The created subproperty event filter.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + * + * @return The subpropertyEventFilter. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + /** + * + * + *
+   * The created subproperty event filter.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subproperty_ != null) { + output.writeMessage(1, getSubproperty()); + } + if (subpropertyEventFilter_ != null) { + output.writeMessage(2, getSubpropertyEventFilter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subproperty_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubproperty()); + } + if (subpropertyEventFilter_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubpropertyEventFilter()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.CreateSubpropertyResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse other = + (com.google.analytics.admin.v1alpha.CreateSubpropertyResponse) obj; + + if (hasSubproperty() != other.hasSubproperty()) return false; + if (hasSubproperty()) { + if (!getSubproperty().equals(other.getSubproperty())) return false; + } + if (hasSubpropertyEventFilter() != other.hasSubpropertyEventFilter()) return false; + if (hasSubpropertyEventFilter()) { + if (!getSubpropertyEventFilter().equals(other.getSubpropertyEventFilter())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubproperty()) { + hash = (37 * hash) + SUBPROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getSubproperty().hashCode(); + } + if (hasSubpropertyEventFilter()) { + hash = (37 * hash) + SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getSubpropertyEventFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for CreateSubproperty RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.CreateSubpropertyResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.CreateSubpropertyResponse) + com.google.analytics.admin.v1alpha.CreateSubpropertyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.class, + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subproperty_ = null; + if (subpropertyBuilder_ != null) { + subpropertyBuilder_.dispose(); + subpropertyBuilder_ = null; + } + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_CreateSubpropertyResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyResponse build() { + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyResponse buildPartial() { + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse result = + new com.google.analytics.admin.v1alpha.CreateSubpropertyResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.CreateSubpropertyResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subproperty_ = + subpropertyBuilder_ == null ? subproperty_ : subpropertyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subpropertyEventFilter_ = + subpropertyEventFilterBuilder_ == null + ? subpropertyEventFilter_ + : subpropertyEventFilterBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.CreateSubpropertyResponse) { + return mergeFrom((com.google.analytics.admin.v1alpha.CreateSubpropertyResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.CreateSubpropertyResponse other) { + if (other + == com.google.analytics.admin.v1alpha.CreateSubpropertyResponse.getDefaultInstance()) + return this; + if (other.hasSubproperty()) { + mergeSubproperty(other.getSubproperty()); + } + if (other.hasSubpropertyEventFilter()) { + mergeSubpropertyEventFilter(other.getSubpropertyEventFilter()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSubpropertyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getSubpropertyEventFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.analytics.admin.v1alpha.Property subproperty_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + subpropertyBuilder_; + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + * + * @return Whether the subproperty field is set. + */ + public boolean hasSubproperty() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + * + * @return The subproperty. + */ + public com.google.analytics.admin.v1alpha.Property getSubproperty() { + if (subpropertyBuilder_ == null) { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } else { + return subpropertyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + public Builder setSubproperty(com.google.analytics.admin.v1alpha.Property value) { + if (subpropertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subproperty_ = value; + } else { + subpropertyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + public Builder setSubproperty( + com.google.analytics.admin.v1alpha.Property.Builder builderForValue) { + if (subpropertyBuilder_ == null) { + subproperty_ = builderForValue.build(); + } else { + subpropertyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + public Builder mergeSubproperty(com.google.analytics.admin.v1alpha.Property value) { + if (subpropertyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && subproperty_ != null + && subproperty_ != com.google.analytics.admin.v1alpha.Property.getDefaultInstance()) { + getSubpropertyBuilder().mergeFrom(value); + } else { + subproperty_ = value; + } + } else { + subpropertyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + public Builder clearSubproperty() { + bitField0_ = (bitField0_ & ~0x00000001); + subproperty_ = null; + if (subpropertyBuilder_ != null) { + subpropertyBuilder_.dispose(); + subpropertyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + public com.google.analytics.admin.v1alpha.Property.Builder getSubpropertyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubpropertyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + public com.google.analytics.admin.v1alpha.PropertyOrBuilder getSubpropertyOrBuilder() { + if (subpropertyBuilder_ != null) { + return subpropertyBuilder_.getMessageOrBuilder(); + } else { + return subproperty_ == null + ? com.google.analytics.admin.v1alpha.Property.getDefaultInstance() + : subproperty_; + } + } + /** + * + * + *
+     * The created subproperty.
+     * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder> + getSubpropertyFieldBuilder() { + if (subpropertyBuilder_ == null) { + subpropertyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.Property, + com.google.analytics.admin.v1alpha.Property.Builder, + com.google.analytics.admin.v1alpha.PropertyOrBuilder>( + getSubproperty(), getParentForChildren(), isClean()); + subproperty_ = null; + } + return subpropertyBuilder_; + } + + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + subpropertyEventFilterBuilder_; + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + public boolean hasSubpropertyEventFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + * + * @return The subpropertyEventFilter. + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + if (subpropertyEventFilterBuilder_ == null) { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } else { + return subpropertyEventFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subpropertyEventFilter_ = value; + } else { + subpropertyEventFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder builderForValue) { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilter_ = builderForValue.build(); + } else { + subpropertyEventFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + public Builder mergeSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && subpropertyEventFilter_ != null + && subpropertyEventFilter_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance()) { + getSubpropertyEventFilterBuilder().mergeFrom(value); + } else { + subpropertyEventFilter_ = value; + } + } else { + subpropertyEventFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + public Builder clearSubpropertyEventFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder + getSubpropertyEventFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSubpropertyEventFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + if (subpropertyEventFilterBuilder_ != null) { + return subpropertyEventFilterBuilder_.getMessageOrBuilder(); + } else { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + } + /** + * + * + *
+     * The created subproperty event filter.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + getSubpropertyEventFilterFieldBuilder() { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder>( + getSubpropertyEventFilter(), getParentForChildren(), isClean()); + subpropertyEventFilter_ = null; + } + return subpropertyEventFilterBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.CreateSubpropertyResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.CreateSubpropertyResponse) + private static final com.google.analytics.admin.v1alpha.CreateSubpropertyResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.CreateSubpropertyResponse(); + } + + public static com.google.analytics.admin.v1alpha.CreateSubpropertyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubpropertyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.CreateSubpropertyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyResponseOrBuilder.java new file mode 100644 index 000000000000..92cd1a374a4f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/CreateSubpropertyResponseOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface CreateSubpropertyResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.CreateSubpropertyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The created subproperty.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + * + * @return Whether the subproperty field is set. + */ + boolean hasSubproperty(); + /** + * + * + *
+   * The created subproperty.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + * + * @return The subproperty. + */ + com.google.analytics.admin.v1alpha.Property getSubproperty(); + /** + * + * + *
+   * The created subproperty.
+   * 
+ * + * .google.analytics.admin.v1alpha.Property subproperty = 1; + */ + com.google.analytics.admin.v1alpha.PropertyOrBuilder getSubpropertyOrBuilder(); + + /** + * + * + *
+   * The created subproperty event filter.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + boolean hasSubpropertyEventFilter(); + /** + * + * + *
+   * The created subproperty event filter.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + * + * @return The subpropertyEventFilter. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter(); + /** + * + * + *
+   * The created subproperty event filter.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 2; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettings.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettings.java new file mode 100644 index 000000000000..1ca895bb81aa --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettings.java @@ -0,0 +1,1186 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Settings for client-side data redaction. Singleton resource under a Web
+ * Stream.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.DataRedactionSettings} + */ +public final class DataRedactionSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.DataRedactionSettings) + DataRedactionSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataRedactionSettings.newBuilder() to construct. + private DataRedactionSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataRedactionSettings() { + name_ = ""; + queryParameterKeys_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataRedactionSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.DataRedactionSettings.class, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of this Data Redaction Settings resource.
+   * Format:
+   * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of this Data Redaction Settings resource.
+   * Format:
+   * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_REDACTION_ENABLED_FIELD_NUMBER = 2; + private boolean emailRedactionEnabled_ = false; + /** + * + * + *
+   * If enabled, any event parameter or user property values that look like an
+   * email will be redacted.
+   * 
+ * + * bool email_redaction_enabled = 2; + * + * @return The emailRedactionEnabled. + */ + @java.lang.Override + public boolean getEmailRedactionEnabled() { + return emailRedactionEnabled_; + } + + public static final int QUERY_PARAMETER_REDACTION_ENABLED_FIELD_NUMBER = 3; + private boolean queryParameterRedactionEnabled_ = false; + /** + * + * + *
+   * Query Parameter redaction removes the key and value portions of a
+   * query parameter if it is in the configured set of query parameters.
+   *
+   * If enabled, URL query replacement logic will be run for the Stream. Any
+   * query parameters defined in query_parameter_keys will be redacted.
+   * 
+ * + * bool query_parameter_redaction_enabled = 3; + * + * @return The queryParameterRedactionEnabled. + */ + @java.lang.Override + public boolean getQueryParameterRedactionEnabled() { + return queryParameterRedactionEnabled_; + } + + public static final int QUERY_PARAMETER_KEYS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList queryParameterKeys_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @return A list containing the queryParameterKeys. + */ + public com.google.protobuf.ProtocolStringList getQueryParameterKeysList() { + return queryParameterKeys_; + } + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @return The count of queryParameterKeys. + */ + public int getQueryParameterKeysCount() { + return queryParameterKeys_.size(); + } + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param index The index of the element to return. + * @return The queryParameterKeys at the given index. + */ + public java.lang.String getQueryParameterKeys(int index) { + return queryParameterKeys_.get(index); + } + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the queryParameterKeys at the given index. + */ + public com.google.protobuf.ByteString getQueryParameterKeysBytes(int index) { + return queryParameterKeys_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (emailRedactionEnabled_ != false) { + output.writeBool(2, emailRedactionEnabled_); + } + if (queryParameterRedactionEnabled_ != false) { + output.writeBool(3, queryParameterRedactionEnabled_); + } + for (int i = 0; i < queryParameterKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, queryParameterKeys_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (emailRedactionEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, emailRedactionEnabled_); + } + if (queryParameterRedactionEnabled_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, queryParameterRedactionEnabled_); + } + { + int dataSize = 0; + for (int i = 0; i < queryParameterKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(queryParameterKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getQueryParameterKeysList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.DataRedactionSettings)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.DataRedactionSettings other = + (com.google.analytics.admin.v1alpha.DataRedactionSettings) obj; + + if (!getName().equals(other.getName())) return false; + if (getEmailRedactionEnabled() != other.getEmailRedactionEnabled()) return false; + if (getQueryParameterRedactionEnabled() != other.getQueryParameterRedactionEnabled()) + return false; + if (!getQueryParameterKeysList().equals(other.getQueryParameterKeysList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + EMAIL_REDACTION_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEmailRedactionEnabled()); + hash = (37 * hash) + QUERY_PARAMETER_REDACTION_ENABLED_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getQueryParameterRedactionEnabled()); + if (getQueryParameterKeysCount() > 0) { + hash = (37 * hash) + QUERY_PARAMETER_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getQueryParameterKeysList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.DataRedactionSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Settings for client-side data redaction. Singleton resource under a Web
+   * Stream.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.DataRedactionSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.DataRedactionSettings) + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.DataRedactionSettings.class, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.DataRedactionSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + emailRedactionEnabled_ = false; + queryParameterRedactionEnabled_ = false; + queryParameterKeys_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettings getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettings build() { + com.google.analytics.admin.v1alpha.DataRedactionSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettings buildPartial() { + com.google.analytics.admin.v1alpha.DataRedactionSettings result = + new com.google.analytics.admin.v1alpha.DataRedactionSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.analytics.admin.v1alpha.DataRedactionSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.emailRedactionEnabled_ = emailRedactionEnabled_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.queryParameterRedactionEnabled_ = queryParameterRedactionEnabled_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + queryParameterKeys_.makeImmutable(); + result.queryParameterKeys_ = queryParameterKeys_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.DataRedactionSettings) { + return mergeFrom((com.google.analytics.admin.v1alpha.DataRedactionSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.DataRedactionSettings other) { + if (other == com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getEmailRedactionEnabled() != false) { + setEmailRedactionEnabled(other.getEmailRedactionEnabled()); + } + if (other.getQueryParameterRedactionEnabled() != false) { + setQueryParameterRedactionEnabled(other.getQueryParameterRedactionEnabled()); + } + if (!other.queryParameterKeys_.isEmpty()) { + if (queryParameterKeys_.isEmpty()) { + queryParameterKeys_ = other.queryParameterKeys_; + bitField0_ |= 0x00000008; + } else { + ensureQueryParameterKeysIsMutable(); + queryParameterKeys_.addAll(other.queryParameterKeys_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + emailRedactionEnabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + queryParameterRedactionEnabled_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryParameterKeysIsMutable(); + queryParameterKeys_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of this Data Redaction Settings resource.
+     * Format:
+     * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of this Data Redaction Settings resource.
+     * Format:
+     * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of this Data Redaction Settings resource.
+     * Format:
+     * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of this Data Redaction Settings resource.
+     * Format:
+     * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of this Data Redaction Settings resource.
+     * Format:
+     * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean emailRedactionEnabled_; + /** + * + * + *
+     * If enabled, any event parameter or user property values that look like an
+     * email will be redacted.
+     * 
+ * + * bool email_redaction_enabled = 2; + * + * @return The emailRedactionEnabled. + */ + @java.lang.Override + public boolean getEmailRedactionEnabled() { + return emailRedactionEnabled_; + } + /** + * + * + *
+     * If enabled, any event parameter or user property values that look like an
+     * email will be redacted.
+     * 
+ * + * bool email_redaction_enabled = 2; + * + * @param value The emailRedactionEnabled to set. + * @return This builder for chaining. + */ + public Builder setEmailRedactionEnabled(boolean value) { + + emailRedactionEnabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If enabled, any event parameter or user property values that look like an
+     * email will be redacted.
+     * 
+ * + * bool email_redaction_enabled = 2; + * + * @return This builder for chaining. + */ + public Builder clearEmailRedactionEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + emailRedactionEnabled_ = false; + onChanged(); + return this; + } + + private boolean queryParameterRedactionEnabled_; + /** + * + * + *
+     * Query Parameter redaction removes the key and value portions of a
+     * query parameter if it is in the configured set of query parameters.
+     *
+     * If enabled, URL query replacement logic will be run for the Stream. Any
+     * query parameters defined in query_parameter_keys will be redacted.
+     * 
+ * + * bool query_parameter_redaction_enabled = 3; + * + * @return The queryParameterRedactionEnabled. + */ + @java.lang.Override + public boolean getQueryParameterRedactionEnabled() { + return queryParameterRedactionEnabled_; + } + /** + * + * + *
+     * Query Parameter redaction removes the key and value portions of a
+     * query parameter if it is in the configured set of query parameters.
+     *
+     * If enabled, URL query replacement logic will be run for the Stream. Any
+     * query parameters defined in query_parameter_keys will be redacted.
+     * 
+ * + * bool query_parameter_redaction_enabled = 3; + * + * @param value The queryParameterRedactionEnabled to set. + * @return This builder for chaining. + */ + public Builder setQueryParameterRedactionEnabled(boolean value) { + + queryParameterRedactionEnabled_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Query Parameter redaction removes the key and value portions of a
+     * query parameter if it is in the configured set of query parameters.
+     *
+     * If enabled, URL query replacement logic will be run for the Stream. Any
+     * query parameters defined in query_parameter_keys will be redacted.
+     * 
+ * + * bool query_parameter_redaction_enabled = 3; + * + * @return This builder for chaining. + */ + public Builder clearQueryParameterRedactionEnabled() { + bitField0_ = (bitField0_ & ~0x00000004); + queryParameterRedactionEnabled_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList queryParameterKeys_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureQueryParameterKeysIsMutable() { + if (!queryParameterKeys_.isModifiable()) { + queryParameterKeys_ = new com.google.protobuf.LazyStringArrayList(queryParameterKeys_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @return A list containing the queryParameterKeys. + */ + public com.google.protobuf.ProtocolStringList getQueryParameterKeysList() { + queryParameterKeys_.makeImmutable(); + return queryParameterKeys_; + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @return The count of queryParameterKeys. + */ + public int getQueryParameterKeysCount() { + return queryParameterKeys_.size(); + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param index The index of the element to return. + * @return The queryParameterKeys at the given index. + */ + public java.lang.String getQueryParameterKeys(int index) { + return queryParameterKeys_.get(index); + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the queryParameterKeys at the given index. + */ + public com.google.protobuf.ByteString getQueryParameterKeysBytes(int index) { + return queryParameterKeys_.getByteString(index); + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param index The index to set the value at. + * @param value The queryParameterKeys to set. + * @return This builder for chaining. + */ + public Builder setQueryParameterKeys(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryParameterKeysIsMutable(); + queryParameterKeys_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param value The queryParameterKeys to add. + * @return This builder for chaining. + */ + public Builder addQueryParameterKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryParameterKeysIsMutable(); + queryParameterKeys_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param values The queryParameterKeys to add. + * @return This builder for chaining. + */ + public Builder addAllQueryParameterKeys(java.lang.Iterable values) { + ensureQueryParameterKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queryParameterKeys_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @return This builder for chaining. + */ + public Builder clearQueryParameterKeys() { + queryParameterKeys_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameter keys to apply redaction logic to if present in the URL.
+     * Query parameter matching is case-insensitive.
+     *
+     * Must contain at least one element if query_parameter_replacement_enabled
+     * is true. Keys cannot contain commas.
+     * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param value The bytes of the queryParameterKeys to add. + * @return This builder for chaining. + */ + public Builder addQueryParameterKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureQueryParameterKeysIsMutable(); + queryParameterKeys_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.DataRedactionSettings) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.DataRedactionSettings) + private static final com.google.analytics.admin.v1alpha.DataRedactionSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.DataRedactionSettings(); + } + + public static com.google.analytics.admin.v1alpha.DataRedactionSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataRedactionSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettingsName.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettingsName.java new file mode 100644 index 000000000000..46305cd6cbfd --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettingsName.java @@ -0,0 +1,194 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DataRedactionSettingsName implements ResourceName { + private static final PathTemplate PROPERTY_DATA_STREAM = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/dataStreams/{data_stream}/dataRedactionSettings"); + private volatile Map fieldValuesMap; + private final String property; + private final String dataStream; + + @Deprecated + protected DataRedactionSettingsName() { + property = null; + dataStream = null; + } + + private DataRedactionSettingsName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + dataStream = Preconditions.checkNotNull(builder.getDataStream()); + } + + public String getProperty() { + return property; + } + + public String getDataStream() { + return dataStream; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataRedactionSettingsName of(String property, String dataStream) { + return newBuilder().setProperty(property).setDataStream(dataStream).build(); + } + + public static String format(String property, String dataStream) { + return newBuilder().setProperty(property).setDataStream(dataStream).build().toString(); + } + + public static DataRedactionSettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_DATA_STREAM.validatedMatch( + formattedString, + "DataRedactionSettingsName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("data_stream")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DataRedactionSettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_DATA_STREAM.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (dataStream != null) { + fieldMapBuilder.put("data_stream", dataStream); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_DATA_STREAM.instantiate("property", property, "data_stream", dataStream); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataRedactionSettingsName that = ((DataRedactionSettingsName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.dataStream, that.dataStream); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(dataStream); + return h; + } + + /** Builder for properties/{property}/dataStreams/{data_stream}/dataRedactionSettings. */ + public static class Builder { + private String property; + private String dataStream; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getDataStream() { + return dataStream; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setDataStream(String dataStream) { + this.dataStream = dataStream; + return this; + } + + private Builder(DataRedactionSettingsName dataRedactionSettingsName) { + this.property = dataRedactionSettingsName.property; + this.dataStream = dataRedactionSettingsName.dataStream; + } + + public DataRedactionSettingsName build() { + return new DataRedactionSettingsName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettingsOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettingsOrBuilder.java new file mode 100644 index 000000000000..1e3f93b42ea5 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataRedactionSettingsOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +public interface DataRedactionSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.DataRedactionSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of this Data Redaction Settings resource.
+   * Format:
+   * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of this Data Redaction Settings resource.
+   * Format:
+   * properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If enabled, any event parameter or user property values that look like an
+   * email will be redacted.
+   * 
+ * + * bool email_redaction_enabled = 2; + * + * @return The emailRedactionEnabled. + */ + boolean getEmailRedactionEnabled(); + + /** + * + * + *
+   * Query Parameter redaction removes the key and value portions of a
+   * query parameter if it is in the configured set of query parameters.
+   *
+   * If enabled, URL query replacement logic will be run for the Stream. Any
+   * query parameters defined in query_parameter_keys will be redacted.
+   * 
+ * + * bool query_parameter_redaction_enabled = 3; + * + * @return The queryParameterRedactionEnabled. + */ + boolean getQueryParameterRedactionEnabled(); + + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @return A list containing the queryParameterKeys. + */ + java.util.List getQueryParameterKeysList(); + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @return The count of queryParameterKeys. + */ + int getQueryParameterKeysCount(); + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param index The index of the element to return. + * @return The queryParameterKeys at the given index. + */ + java.lang.String getQueryParameterKeys(int index); + /** + * + * + *
+   * The query parameter keys to apply redaction logic to if present in the URL.
+   * Query parameter matching is case-insensitive.
+   *
+   * Must contain at least one element if query_parameter_replacement_enabled
+   * is true. Keys cannot contain commas.
+   * 
+ * + * repeated string query_parameter_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the queryParameterKeys at the given index. + */ + com.google.protobuf.ByteString getQueryParameterKeysBytes(int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteRollupPropertySourceLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteRollupPropertySourceLinkRequest.java new file mode 100644 index 000000000000..12736e599766 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteRollupPropertySourceLinkRequest.java @@ -0,0 +1,671 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for DeleteRollupPropertySourceLink RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest} + */ +public final class DeleteRollupPropertySourceLinkRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) + DeleteRollupPropertySourceLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteRollupPropertySourceLinkRequest.newBuilder() to construct. + private DeleteRollupPropertySourceLinkRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteRollupPropertySourceLinkRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteRollupPropertySourceLinkRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest.class, + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/1234/rollupPropertySourceLinks/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/1234/rollupPropertySourceLinks/5678
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest other = + (com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteRollupPropertySourceLink RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest.class, + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteRollupPropertySourceLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest build() { + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest buildPartial() { + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest result = + new com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest other) { + if (other + == com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/1234/rollupPropertySourceLinks/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/1234/rollupPropertySourceLinks/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/1234/rollupPropertySourceLinks/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/1234/rollupPropertySourceLinks/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/1234/rollupPropertySourceLinks/5678
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) + private static final com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest(); + } + + public static com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRollupPropertySourceLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetUserLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteRollupPropertySourceLinkRequestOrBuilder.java similarity index 74% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetUserLinkRequestOrBuilder.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteRollupPropertySourceLinkRequestOrBuilder.java index 24963e162f5a..97b4513255d6 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetUserLinkRequestOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteRollupPropertySourceLinkRequestOrBuilder.java @@ -18,16 +18,18 @@ package com.google.analytics.admin.v1alpha; -public interface GetUserLinkRequestOrBuilder +public interface DeleteRollupPropertySourceLinkRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.GetUserLinkRequest) + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/1234/rollupPropertySourceLinks/5678
    * 
* * @@ -41,7 +43,9 @@ public interface GetUserLinkRequestOrBuilder * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/1234/rollupPropertySourceLinks/5678
    * 
* * diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteSubpropertyEventFilterRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteSubpropertyEventFilterRequest.java new file mode 100644 index 000000000000..03c1083bf563 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteSubpropertyEventFilterRequest.java @@ -0,0 +1,674 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for DeleteSubpropertyEventFilter RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest} + */ +public final class DeleteSubpropertyEventFilterRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) + DeleteSubpropertyEventFilterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSubpropertyEventFilterRequest.newBuilder() to construct. + private DeleteSubpropertyEventFilterRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSubpropertyEventFilterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSubpropertyEventFilterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Resource name of the subproperty event filter to delete.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the subproperty event filter to delete.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest other = + (com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteSubpropertyEventFilter RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_DeleteSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest build() { + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest buildPartial() { + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest result = + new com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest other) { + if (other + == com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to delete.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to delete.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to delete.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to delete.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to delete.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) + private static final com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest(); + } + + public static com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubpropertyEventFilterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteSubpropertyEventFilterRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteSubpropertyEventFilterRequestOrBuilder.java new file mode 100644 index 000000000000..3011cbc04ac7 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteSubpropertyEventFilterRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface DeleteSubpropertyEventFilterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the subproperty event filter to delete.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Resource name of the subproperty event filter to delete.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetDataRedactionSettingsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetDataRedactionSettingsRequest.java new file mode 100644 index 000000000000..4dc8e309e8b9 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetDataRedactionSettingsRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for GetDataRedactionSettings RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest} + */ +public final class GetDataRedactionSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) + GetDataRedactionSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataRedactionSettingsRequest.newBuilder() to construct. + private GetDataRedactionSettingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataRedactionSettingsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataRedactionSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest.class, + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest other = + (com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetDataRedactionSettings RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest.class, + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetDataRedactionSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest build() { + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest buildPartial() { + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest result = + new com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest other) { + if (other + == com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the settings to lookup.
+     * Format:
+     * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+     * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) + private static final com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest(); + } + + public static com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataRedactionSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteUserLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetDataRedactionSettingsRequestOrBuilder.java similarity index 72% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteUserLinkRequestOrBuilder.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetDataRedactionSettingsRequestOrBuilder.java index 066b46cf77c4..ca43a6cc64fe 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteUserLinkRequestOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetDataRedactionSettingsRequestOrBuilder.java @@ -18,16 +18,19 @@ package com.google.analytics.admin.v1alpha; -public interface DeleteUserLinkRequestOrBuilder +public interface GetDataRedactionSettingsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.DeleteUserLinkRequest) + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
    * 
* * @@ -41,7 +44,10 @@ public interface DeleteUserLinkRequestOrBuilder * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. The name of the settings to lookup.
+   * Format:
+   * properties/{property}/dataStreams/{data_stream}/dataRedactionSettings
+   * Example: "properties/1000/dataStreams/2000/dataRedactionSettings"
    * 
* * diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateUserLinkRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetRollupPropertySourceLinkRequest.java similarity index 50% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateUserLinkRequest.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetRollupPropertySourceLinkRequest.java index 3bdb55b9e46e..56815f11e4e2 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateUserLinkRequest.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetRollupPropertySourceLinkRequest.java @@ -22,98 +22,106 @@ * * *
- * Request message for UpdateUserLink RPC.
+ * Request message for GetRollupPropertySourceLink RPC.
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.UpdateUserLinkRequest} + * Protobuf type {@code google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest} */ -public final class UpdateUserLinkRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetRollupPropertySourceLinkRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.UpdateUserLinkRequest) - UpdateUserLinkRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) + GetRollupPropertySourceLinkRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use UpdateUserLinkRequest.newBuilder() to construct. - private UpdateUserLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetRollupPropertySourceLinkRequest.newBuilder() to construct. + private GetRollupPropertySourceLinkRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private UpdateUserLinkRequest() {} + private GetRollupPropertySourceLinkRequest() { + name_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateUserLinkRequest(); + return new GetRollupPropertySourceLinkRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_fieldAccessorTable + .internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.class, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder.class); + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest.class, + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest.Builder.class); } - public static final int USER_LINK_FIELD_NUMBER = 1; - private com.google.analytics.admin.v1alpha.UserLink userLink_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * * *
-   * Required. The user link to update.
+   * Required. The name of the roll-up property source link to lookup.
+   * Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/123/rollupPropertySourceLinks/456
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return Whether the userLink field is set. + * @return The name. */ @java.lang.Override - public boolean hasUserLink() { - return userLink_ != null; + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } } /** * * *
-   * Required. The user link to update.
+   * Required. The name of the roll-up property source link to lookup.
+   * Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/123/rollupPropertySourceLinks/456
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The userLink. - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getUserLink() { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; - } - /** - * - * - *
-   * Required. The user link to update.
-   * 
- * - * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * @return The bytes for name. */ @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinkOrBuilder() { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -130,8 +138,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (userLink_ != null) { - output.writeMessage(1, getUserLink()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -142,8 +150,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (userLink_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUserLink()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -155,16 +163,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.UpdateUserLinkRequest)) { + if (!(obj instanceof com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest other = - (com.google.analytics.admin.v1alpha.UpdateUserLinkRequest) obj; + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest other = + (com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) obj; - if (hasUserLink() != other.hasUserLink()) return false; - if (hasUserLink()) { - if (!getUserLink().equals(other.getUserLink())) return false; - } + if (!getName().equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -176,80 +181,79 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUserLink()) { - hash = (37 * hash) + USER_LINK_FIELD_NUMBER; - hash = (53 * hash) + getUserLink().hashCode(); - } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest parseFrom( + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -267,7 +271,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest prototype) { + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -285,31 +289,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for UpdateUserLink RPC.
+   * Request message for GetRollupPropertySourceLink RPC.
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.UpdateUserLinkRequest} + * Protobuf type {@code google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.UpdateUserLinkRequest) - com.google.analytics.admin.v1alpha.UpdateUserLinkRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_fieldAccessorTable + .internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.class, - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.Builder.class); + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest.class, + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.newBuilder() + // Construct using + // com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -320,28 +325,26 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - userLink_ = null; - if (userLinkBuilder_ != null) { - userLinkBuilder_.dispose(); - userLinkBuilder_ = null; - } + name_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_UpdateUserLinkRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_GetRollupPropertySourceLinkRequest_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.getDefaultInstance(); + public com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + .getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest build() { - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest result = buildPartial(); + public com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest build() { + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -349,9 +352,9 @@ public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest buildPartial() { - com.google.analytics.admin.v1alpha.UpdateUserLinkRequest result = - new com.google.analytics.admin.v1alpha.UpdateUserLinkRequest(this); + public com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest buildPartial() { + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest result = + new com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -359,10 +362,11 @@ public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest buildPartial() { return result; } - private void buildPartial0(com.google.analytics.admin.v1alpha.UpdateUserLinkRequest result) { + private void buildPartial0( + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.userLink_ = userLinkBuilder_ == null ? userLink_ : userLinkBuilder_.build(); + result.name_ = name_; } } @@ -401,19 +405,24 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.UpdateUserLinkRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.UpdateUserLinkRequest) other); + if (other instanceof com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.UpdateUserLinkRequest other) { - if (other == com.google.analytics.admin.v1alpha.UpdateUserLinkRequest.getDefaultInstance()) - return this; - if (other.hasUserLink()) { - mergeUserLink(other.getUserLink()); + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest other) { + if (other + == com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -443,7 +452,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getUserLinkFieldBuilder().getBuilder(), extensionRegistry); + name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -466,119 +475,83 @@ public Builder mergeFrom( private int bitField0_; - private com.google.analytics.admin.v1alpha.UserLink userLink_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - userLinkBuilder_; + private java.lang.Object name_ = ""; /** * * *
-     * Required. The user link to update.
+     * Required. The name of the roll-up property source link to lookup.
+     * Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/123/rollupPropertySourceLinks/456
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return Whether the userLink field is set. + * @return The name. */ - public boolean hasUserLink() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Required. The user link to update.
-     * 
- * - * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The userLink. - */ - public com.google.analytics.admin.v1alpha.UserLink getUserLink() { - if (userLinkBuilder_ == null) { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; } else { - return userLinkBuilder_.getMessage(); + return (java.lang.String) ref; } } /** * * *
-     * Required. The user link to update.
+     * Required. The name of the roll-up property source link to lookup.
+     * Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/123/rollupPropertySourceLinks/456
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * - */ - public Builder setUserLink(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - userLink_ = value; - } else { - userLinkBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The user link to update.
-     * 
* - * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * @return The bytes for name. */ - public Builder setUserLink( - com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinkBuilder_ == null) { - userLink_ = builderForValue.build(); + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; } else { - userLinkBuilder_.setMessage(builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** * * *
-     * Required. The user link to update.
+     * Required. The name of the roll-up property source link to lookup.
+     * Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/123/rollupPropertySourceLinks/456
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * + * + * @param value The name to set. + * @return This builder for chaining. */ - public Builder mergeUserLink(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinkBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && userLink_ != null - && userLink_ != com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()) { - getUserLinkBuilder().mergeFrom(value); - } else { - userLink_ = value; - } - } else { - userLinkBuilder_.mergeFrom(value); + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -587,20 +560,21 @@ public Builder mergeUserLink(com.google.analytics.admin.v1alpha.UserLink value) * * *
-     * Required. The user link to update.
+     * Required. The name of the roll-up property source link to lookup.
+     * Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/123/rollupPropertySourceLinks/456
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * + * + * @return This builder for chaining. */ - public Builder clearUserLink() { + public Builder clearName() { + name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); - userLink_ = null; - if (userLinkBuilder_ != null) { - userLinkBuilder_.dispose(); - userLinkBuilder_ = null; - } onChanged(); return this; } @@ -608,64 +582,28 @@ public Builder clearUserLink() { * * *
-     * Required. The user link to update.
-     * 
- * - * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder getUserLinkBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUserLinkFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The user link to update.
+     * Required. The name of the roll-up property source link to lookup.
+     * Format:
+     * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+     * Example: properties/123/rollupPropertySourceLinks/456
      * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * - */ - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinkOrBuilder() { - if (userLinkBuilder_ != null) { - return userLinkBuilder_.getMessageOrBuilder(); - } else { - return userLink_ == null - ? com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance() - : userLink_; - } - } - /** - * - * - *
-     * Required. The user link to update.
-     * 
* - * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * + * @param value The bytes for name to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - getUserLinkFieldBuilder() { - if (userLinkBuilder_ == null) { - userLinkBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder>( - getUserLink(), getParentForChildren(), isClean()); - userLink_ = null; + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return userLinkBuilder_; + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } @java.lang.Override @@ -679,24 +617,26 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.UpdateUserLinkRequest) + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.UpdateUserLinkRequest) - private static final com.google.analytics.admin.v1alpha.UpdateUserLinkRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) + private static final com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.UpdateUserLinkRequest(); + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest(); } - public static com.google.analytics.admin.v1alpha.UpdateUserLinkRequest getDefaultInstance() { + public static com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public UpdateUserLinkRequest parsePartialFrom( + public GetRollupPropertySourceLinkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -715,17 +655,18 @@ public UpdateUserLinkRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.UpdateUserLinkRequest getDefaultInstanceForType() { + public com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetRollupPropertySourceLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetRollupPropertySourceLinkRequestOrBuilder.java new file mode 100644 index 000000000000..2dfe1507bae7 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetRollupPropertySourceLinkRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface GetRollupPropertySourceLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the roll-up property source link to lookup.
+   * Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/123/rollupPropertySourceLinks/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the roll-up property source link to lookup.
+   * Format:
+   * properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id}
+   * Example: properties/123/rollupPropertySourceLinks/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetSubpropertyEventFilterRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetSubpropertyEventFilterRequest.java new file mode 100644 index 000000000000..4feef93da8cd --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetSubpropertyEventFilterRequest.java @@ -0,0 +1,672 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for GetSubpropertyEventFilter RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest} + */ +public final class GetSubpropertyEventFilterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) + GetSubpropertyEventFilterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSubpropertyEventFilterRequest.newBuilder() to construct. + private GetSubpropertyEventFilterRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSubpropertyEventFilterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSubpropertyEventFilterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Resource name of the subproperty event filter to lookup.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the subproperty event filter to lookup.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest other = + (com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetSubpropertyEventFilter RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_GetSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest build() { + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest buildPartial() { + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest result = + new com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest other) { + if (other + == com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to lookup.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to lookup.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to lookup.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to lookup.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the subproperty event filter to lookup.
+     * Format:
+     * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+     * Example: properties/123/subpropertyEventFilters/456
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) + private static final com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest(); + } + + public static com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubpropertyEventFilterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateUserLinkRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetSubpropertyEventFilterRequestOrBuilder.java similarity index 53% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateUserLinkRequestOrBuilder.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetSubpropertyEventFilterRequestOrBuilder.java index e05215161dee..64a6c5aef7f4 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateUserLinkRequestOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetSubpropertyEventFilterRequestOrBuilder.java @@ -18,49 +18,43 @@ package com.google.analytics.admin.v1alpha; -public interface UpdateUserLinkRequestOrBuilder +public interface GetSubpropertyEventFilterRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.UpdateUserLinkRequest) + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.GetSubpropertyEventFilterRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. The user link to update.
+   * Required. Resource name of the subproperty event filter to lookup.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return Whether the userLink field is set. + * @return The name. */ - boolean hasUserLink(); + java.lang.String getName(); /** * * *
-   * Required. The user link to update.
+   * Required. Resource name of the subproperty event filter to lookup.
+   * Format:
+   * properties/property_id/subpropertyEventFilters/subproperty_event_filter
+   * Example: properties/123/subpropertyEventFilters/456
    * 
* * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * - * @return The userLink. + * @return The bytes for name. */ - com.google.analytics.admin.v1alpha.UserLink getUserLink(); - /** - * - * - *
-   * Required. The user link to update.
-   * 
- * - * - * .google.analytics.admin.v1alpha.UserLink user_link = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinkOrBuilder(); + com.google.protobuf.ByteString getNameBytes(); } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksRequest.java new file mode 100644 index 000000000000..e698fe393203 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksRequest.java @@ -0,0 +1,978 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for ListRollupPropertySourceLinks RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest} + */ +public final class ListRollupPropertySourceLinksRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) + ListRollupPropertySourceLinksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRollupPropertySourceLinksRequest.newBuilder() to construct. + private ListRollupPropertySourceLinksRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRollupPropertySourceLinksRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRollupPropertySourceLinksRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest.class, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the roll-up property to list roll-up property source
+   * links under. Format: properties/{property_id} Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the roll-up property to list roll-up property source
+   * links under. Format: properties/{property_id} Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+   * subsequent page. When paginating, all other parameters provided to
+   * `ListRollupPropertySourceLinks` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+   * subsequent page. When paginating, all other parameters provided to
+   * `ListRollupPropertySourceLinks` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest other = + (com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListRollupPropertySourceLinks RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest.class, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest build() { + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest buildPartial() { + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest result = + new com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest other) { + if (other + == com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the roll-up property to list roll-up property source
+     * links under. Format: properties/{property_id} Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the roll-up property to list roll-up property source
+     * links under. Format: properties/{property_id} Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the roll-up property to list roll-up property source
+     * links under. Format: properties/{property_id} Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the roll-up property to list roll-up property source
+     * links under. Format: properties/{property_id} Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the roll-up property to list roll-up property source
+     * links under. Format: properties/{property_id} Example: properties/1234
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+     * subsequent page. When paginating, all other parameters provided to
+     * `ListRollupPropertySourceLinks` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+     * subsequent page. When paginating, all other parameters provided to
+     * `ListRollupPropertySourceLinks` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+     * subsequent page. When paginating, all other parameters provided to
+     * `ListRollupPropertySourceLinks` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+     * subsequent page. When paginating, all other parameters provided to
+     * `ListRollupPropertySourceLinks` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+     * subsequent page. When paginating, all other parameters provided to
+     * `ListRollupPropertySourceLinks` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) + private static final com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest(); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRollupPropertySourceLinksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksRequestOrBuilder.java new file mode 100644 index 000000000000..291a2ecb5d31 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface ListRollupPropertySourceLinksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the roll-up property to list roll-up property source
+   * links under. Format: properties/{property_id} Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the roll-up property to list roll-up property source
+   * links under. Format: properties/{property_id} Example: properties/1234
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+   * subsequent page. When paginating, all other parameters provided to
+   * `ListRollupPropertySourceLinks` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListRollupPropertySourceLinks` call. Provide this to retrieve the
+   * subsequent page. When paginating, all other parameters provided to
+   * `ListRollupPropertySourceLinks` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksResponse.java new file mode 100644 index 000000000000..b2f92c7ffaa2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksResponse.java @@ -0,0 +1,1221 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Response message for ListRollupPropertySourceLinks RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse} + */ +public final class ListRollupPropertySourceLinksResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) + ListRollupPropertySourceLinksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRollupPropertySourceLinksResponse.newBuilder() to construct. + private ListRollupPropertySourceLinksResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRollupPropertySourceLinksResponse() { + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRollupPropertySourceLinksResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse.class, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse.Builder.class); + } + + public static final int ROLLUP_PROPERTY_SOURCE_LINKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + rollupPropertySourceLinks_; + /** + * + * + *
+   * List of RollupPropertySourceLinks.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + @java.lang.Override + public java.util.List + getRollupPropertySourceLinksList() { + return rollupPropertySourceLinks_; + } + /** + * + * + *
+   * List of RollupPropertySourceLinks.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + getRollupPropertySourceLinksOrBuilderList() { + return rollupPropertySourceLinks_; + } + /** + * + * + *
+   * List of RollupPropertySourceLinks.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + @java.lang.Override + public int getRollupPropertySourceLinksCount() { + return rollupPropertySourceLinks_.size(); + } + /** + * + * + *
+   * List of RollupPropertySourceLinks.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLinks( + int index) { + return rollupPropertySourceLinks_.get(index); + } + /** + * + * + *
+   * List of RollupPropertySourceLinks.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinksOrBuilder(int index) { + return rollupPropertySourceLinks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rollupPropertySourceLinks_.size(); i++) { + output.writeMessage(1, rollupPropertySourceLinks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rollupPropertySourceLinks_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, rollupPropertySourceLinks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse other = + (com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) obj; + + if (!getRollupPropertySourceLinksList().equals(other.getRollupPropertySourceLinksList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRollupPropertySourceLinksCount() > 0) { + hash = (37 * hash) + ROLLUP_PROPERTY_SOURCE_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getRollupPropertySourceLinksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListRollupPropertySourceLinks RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse.class, + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rollupPropertySourceLinksBuilder_ == null) { + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + } else { + rollupPropertySourceLinks_ = null; + rollupPropertySourceLinksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListRollupPropertySourceLinksResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse build() { + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse buildPartial() { + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse result = + new com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse result) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rollupPropertySourceLinks_ = + java.util.Collections.unmodifiableList(rollupPropertySourceLinks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rollupPropertySourceLinks_ = rollupPropertySourceLinks_; + } else { + result.rollupPropertySourceLinks_ = rollupPropertySourceLinksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse other) { + if (other + == com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + .getDefaultInstance()) return this; + if (rollupPropertySourceLinksBuilder_ == null) { + if (!other.rollupPropertySourceLinks_.isEmpty()) { + if (rollupPropertySourceLinks_.isEmpty()) { + rollupPropertySourceLinks_ = other.rollupPropertySourceLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.addAll(other.rollupPropertySourceLinks_); + } + onChanged(); + } + } else { + if (!other.rollupPropertySourceLinks_.isEmpty()) { + if (rollupPropertySourceLinksBuilder_.isEmpty()) { + rollupPropertySourceLinksBuilder_.dispose(); + rollupPropertySourceLinksBuilder_ = null; + rollupPropertySourceLinks_ = other.rollupPropertySourceLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + rollupPropertySourceLinksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRollupPropertySourceLinksFieldBuilder() + : null; + } else { + rollupPropertySourceLinksBuilder_.addAllMessages(other.rollupPropertySourceLinks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1alpha.RollupPropertySourceLink m = + input.readMessage( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.parser(), + extensionRegistry); + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(m); + } else { + rollupPropertySourceLinksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + + private void ensureRollupPropertySourceLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rollupPropertySourceLinks_ = + new java.util.ArrayList( + rollupPropertySourceLinks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + rollupPropertySourceLinksBuilder_; + + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public java.util.List + getRollupPropertySourceLinksList() { + if (rollupPropertySourceLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(rollupPropertySourceLinks_); + } else { + return rollupPropertySourceLinksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public int getRollupPropertySourceLinksCount() { + if (rollupPropertySourceLinksBuilder_ == null) { + return rollupPropertySourceLinks_.size(); + } else { + return rollupPropertySourceLinksBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLinks( + int index) { + if (rollupPropertySourceLinksBuilder_ == null) { + return rollupPropertySourceLinks_.get(index); + } else { + return rollupPropertySourceLinksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder setRollupPropertySourceLinks( + int index, com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.set(index, value); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder setRollupPropertySourceLinks( + int index, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder builderForValue) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder addRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(value); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder addRollupPropertySourceLinks( + int index, com.google.analytics.admin.v1alpha.RollupPropertySourceLink value) { + if (rollupPropertySourceLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(index, value); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder addRollupPropertySourceLinks( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder builderForValue) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(builderForValue.build()); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder addRollupPropertySourceLinks( + int index, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder builderForValue) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder addAllRollupPropertySourceLinks( + java.lang.Iterable + values) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rollupPropertySourceLinks_); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder clearRollupPropertySourceLinks() { + if (rollupPropertySourceLinksBuilder_ == null) { + rollupPropertySourceLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public Builder removeRollupPropertySourceLinks(int index) { + if (rollupPropertySourceLinksBuilder_ == null) { + ensureRollupPropertySourceLinksIsMutable(); + rollupPropertySourceLinks_.remove(index); + onChanged(); + } else { + rollupPropertySourceLinksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder + getRollupPropertySourceLinksBuilder(int index) { + return getRollupPropertySourceLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinksOrBuilder(int index) { + if (rollupPropertySourceLinksBuilder_ == null) { + return rollupPropertySourceLinks_.get(index); + } else { + return rollupPropertySourceLinksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + getRollupPropertySourceLinksOrBuilderList() { + if (rollupPropertySourceLinksBuilder_ != null) { + return rollupPropertySourceLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rollupPropertySourceLinks_); + } + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder + addRollupPropertySourceLinksBuilder() { + return getRollupPropertySourceLinksFieldBuilder() + .addBuilder( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance()); + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder + addRollupPropertySourceLinksBuilder(int index) { + return getRollupPropertySourceLinksFieldBuilder() + .addBuilder( + index, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance()); + } + /** + * + * + *
+     * List of RollupPropertySourceLinks.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * + */ + public java.util.List + getRollupPropertySourceLinksBuilderList() { + return getRollupPropertySourceLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder> + getRollupPropertySourceLinksFieldBuilder() { + if (rollupPropertySourceLinksBuilder_ == null) { + rollupPropertySourceLinksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.RollupPropertySourceLink, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder, + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder>( + rollupPropertySourceLinks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + rollupPropertySourceLinks_ = null; + } + return rollupPropertySourceLinksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) + private static final com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse(); + } + + public static com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRollupPropertySourceLinksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksResponseOrBuilder.java similarity index 54% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksResponseOrBuilder.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksResponseOrBuilder.java index c292ccf09a55..e4275d113c65 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksResponseOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListRollupPropertySourceLinksResponseOrBuilder.java @@ -18,67 +18,75 @@ package com.google.analytics.admin.v1alpha; -public interface AuditUserLinksResponseOrBuilder +public interface ListRollupPropertySourceLinksResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.AuditUserLinksResponse) + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse) com.google.protobuf.MessageOrBuilder { /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * List of RollupPropertySourceLinks.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * */ - java.util.List getUserLinksList(); + java.util.List + getRollupPropertySourceLinksList(); /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * List of RollupPropertySourceLinks.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * */ - com.google.analytics.admin.v1alpha.AuditUserLink getUserLinks(int index); + com.google.analytics.admin.v1alpha.RollupPropertySourceLink getRollupPropertySourceLinks( + int index); /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * List of RollupPropertySourceLinks.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * */ - int getUserLinksCount(); + int getRollupPropertySourceLinksCount(); /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * List of RollupPropertySourceLinks.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * */ - java.util.List - getUserLinksOrBuilderList(); + java.util.List + getRollupPropertySourceLinksOrBuilderList(); /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * List of RollupPropertySourceLinks.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.RollupPropertySourceLink rollup_property_source_links = 1; + * */ - com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder getUserLinksOrBuilder(int index); + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder + getRollupPropertySourceLinksOrBuilder(int index); /** * diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequest.java index 0d1d990ca88d..5c90aab6e190 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequest.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequest.java @@ -74,9 +74,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Format:
-   * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-   * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+   * Required. The DataStream resource to list schemas for.
+   * Format:
+   * properties/{property_id}/dataStreams/{dataStream}
+   * Example: properties/1234/dataStreams/5678
    * 
* * @@ -101,9 +102,10 @@ public java.lang.String getParent() { * * *
-   * Required. Format:
-   * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-   * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+   * Required. The DataStream resource to list schemas for.
+   * Format:
+   * properties/{property_id}/dataStreams/{dataStream}
+   * Example: properties/1234/dataStreams/5678
    * 
* * @@ -621,9 +623,10 @@ public Builder mergeFrom( * * *
-     * Required. Format:
-     * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-     * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+     * Required. The DataStream resource to list schemas for.
+     * Format:
+     * properties/{property_id}/dataStreams/{dataStream}
+     * Example: properties/1234/dataStreams/5678
      * 
* * @@ -647,9 +650,10 @@ public java.lang.String getParent() { * * *
-     * Required. Format:
-     * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-     * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+     * Required. The DataStream resource to list schemas for.
+     * Format:
+     * properties/{property_id}/dataStreams/{dataStream}
+     * Example: properties/1234/dataStreams/5678
      * 
* * @@ -673,9 +677,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. Format:
-     * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-     * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+     * Required. The DataStream resource to list schemas for.
+     * Format:
+     * properties/{property_id}/dataStreams/{dataStream}
+     * Example: properties/1234/dataStreams/5678
      * 
* * @@ -698,9 +703,10 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. Format:
-     * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-     * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+     * Required. The DataStream resource to list schemas for.
+     * Format:
+     * properties/{property_id}/dataStreams/{dataStream}
+     * Example: properties/1234/dataStreams/5678
      * 
* * @@ -719,9 +725,10 @@ public Builder clearParent() { * * *
-     * Required. Format:
-     * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-     * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+     * Required. The DataStream resource to list schemas for.
+     * Format:
+     * properties/{property_id}/dataStreams/{dataStream}
+     * Example: properties/1234/dataStreams/5678
      * 
* * diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequestOrBuilder.java index c0ec5cfbe90d..8a08ddbc335c 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequestOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSKAdNetworkConversionValueSchemasRequestOrBuilder.java @@ -27,9 +27,10 @@ public interface ListSKAdNetworkConversionValueSchemasRequestOrBuilder * * *
-   * Required. Format:
-   * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-   * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+   * Required. The DataStream resource to list schemas for.
+   * Format:
+   * properties/{property_id}/dataStreams/{dataStream}
+   * Example: properties/1234/dataStreams/5678
    * 
* * @@ -43,9 +44,10 @@ public interface ListSKAdNetworkConversionValueSchemasRequestOrBuilder * * *
-   * Required. Format:
-   * properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema
-   * Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema
+   * Required. The DataStream resource to list schemas for.
+   * Format:
+   * properties/{property_id}/dataStreams/{dataStream}
+   * Example: properties/1234/dataStreams/5678
    * 
* * diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersRequest.java similarity index 53% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksRequest.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersRequest.java index 2254e22dbc7a..f36309b40ff9 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/BatchGetUserLinksRequest.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersRequest.java @@ -22,45 +22,46 @@ * * *
- * Request message for BatchGetUserLinks RPC.
+ * Request message for ListSubpropertyEventFilters RPC.
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.BatchGetUserLinksRequest} + * Protobuf type {@code google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest} */ -public final class BatchGetUserLinksRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ListSubpropertyEventFiltersRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.BatchGetUserLinksRequest) - BatchGetUserLinksRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) + ListSubpropertyEventFiltersRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use BatchGetUserLinksRequest.newBuilder() to construct. - private BatchGetUserLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListSubpropertyEventFiltersRequest.newBuilder() to construct. + private ListSubpropertyEventFiltersRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private BatchGetUserLinksRequest() { + private ListSubpropertyEventFiltersRequest() { parent_ = ""; - names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pageToken_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchGetUserLinksRequest(); + return new ListSubpropertyEventFiltersRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_fieldAccessorTable + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.Builder.class); + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest.class, + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; @@ -71,10 +72,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all provided values for the 'names' field must match
-   * this field.
-   * Example format: accounts/1234
+   * Required. Resource name of the ordinary property.
+   * Format: properties/property_id
+   * Example: properties/123
    * 
* * @@ -99,10 +99,9 @@ public java.lang.String getParent() { * * *
-   * Required. The account or property that all user links in the request are
-   * for. The parent of all provided values for the 'names' field must match
-   * this field.
-   * Example format: accounts/1234
+   * Required. Resource name of the ordinary property.
+   * Format: properties/property_id
+   * Example: properties/123
    * 
* * @@ -124,84 +123,84 @@ public com.google.protobuf.ByteString getParentBytes() { } } - public static final int NAMES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList names_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
-   * 
- * - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return A list containing the names. - */ - public com.google.protobuf.ProtocolStringList getNamesList() { - return names_; - } + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; /** * * *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
+   * Optional. The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages. If unspecified,
+   * at most 50 resources will be returned. The maximum value is 200; (higher
+   * values will be coerced to the maximum)
    * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The count of names. + * @return The pageSize. */ - public int getNamesCount() { - return names_.size(); + @java.lang.Override + public int getPageSize() { + return pageSize_; } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; /** * * *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
+   * Optional. A page token, received from a previous
+   * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+   * page. When paginating, all other parameters provided to
+   * `ListSubpropertyEventFilters` must match the call that provided the page
+   * token.
    * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the element to return. - * @return The names at the given index. + * @return The pageToken. */ - public java.lang.String getNames(int index) { - return names_.get(index); + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } } /** * * *
-   * Required. The names of the user links to retrieve.
-   * A maximum of 1000 user links can be retrieved in a batch.
-   * Format: accounts/{accountId}/userLinks/{userLinkId}
+   * Optional. A page token, received from a previous
+   * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+   * page. When paginating, all other parameters provided to
+   * `ListSubpropertyEventFilters` must match the call that provided the page
+   * token.
    * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the value to return. - * @return The bytes of the names at the given index. + * @return The bytes for pageToken. */ - public com.google.protobuf.ByteString getNamesBytes(int index) { - return names_.getByteString(index); + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -221,8 +220,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - for (int i = 0; i < names_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, names_.getRaw(i)); + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -236,13 +238,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - { - int dataSize = 0; - for (int i = 0; i < names_.size(); i++) { - dataSize += computeStringSizeNoTag(names_.getRaw(i)); - } - size += dataSize; - size += 1 * getNamesList().size(); + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -254,14 +254,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest)) { + if (!(obj instanceof com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest other = - (com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest) obj; + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest other = + (com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) obj; if (!getParent().equals(other.getParent())) return false; - if (!getNamesList().equals(other.getNamesList())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -275,80 +276,81 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - if (getNamesCount() > 0) { - hash = (37 * hash) + NAMES_FIELD_NUMBER; - hash = (53 * hash) + getNamesList().hashCode(); - } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest parseFrom( + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -366,7 +368,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest prototype) { + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -384,31 +386,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for BatchGetUserLinks RPC.
+   * Request message for ListSubpropertyEventFilters RPC.
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.BatchGetUserLinksRequest} + * Protobuf type {@code google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.BatchGetUserLinksRequest) - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_fieldAccessorTable + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.class, - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.Builder.class); + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest.class, + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.newBuilder() + // Construct using + // com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -420,24 +423,27 @@ public Builder clear() { super.clear(); bitField0_ = 0; parent_ = ""; - names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pageSize_ = 0; + pageToken_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_BatchGetUserLinksRequest_descriptor; + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersRequest_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.getDefaultInstance(); + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + .getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest build() { - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest result = buildPartial(); + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest build() { + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -445,9 +451,9 @@ public com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest buildPartial() { - com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest result = - new com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest(this); + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest buildPartial() { + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest result = + new com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -455,14 +461,17 @@ public com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest buildPartial( return result; } - private void buildPartial0(com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest result) { + private void buildPartial0( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; } if (((from_bitField0_ & 0x00000002) != 0)) { - names_.makeImmutable(); - result.names_ = names_; + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; } } @@ -501,30 +510,31 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest) other); + if (other instanceof com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest other) { - if (other == com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest.getDefaultInstance()) - return this; + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest other) { + if (other + == com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + .getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; bitField0_ |= 0x00000001; onChanged(); } - if (!other.names_.isEmpty()) { - if (names_.isEmpty()) { - names_ = other.names_; - bitField0_ |= 0x00000002; - } else { - ensureNamesIsMutable(); - names_.addAll(other.names_); - } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -559,13 +569,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 - case 18: + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureNamesIsMutable(); - names_.add(s); + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; break; - } // case 18 + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -590,10 +605,9 @@ public Builder mergeFrom( * * *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all provided values for the 'names' field must match
-     * this field.
-     * Example format: accounts/1234
+     * Required. Resource name of the ordinary property.
+     * Format: properties/property_id
+     * Example: properties/123
      * 
* * @@ -617,10 +631,9 @@ public java.lang.String getParent() { * * *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all provided values for the 'names' field must match
-     * this field.
-     * Example format: accounts/1234
+     * Required. Resource name of the ordinary property.
+     * Format: properties/property_id
+     * Example: properties/123
      * 
* * @@ -644,10 +657,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all provided values for the 'names' field must match
-     * this field.
-     * Example format: accounts/1234
+     * Required. Resource name of the ordinary property.
+     * Format: properties/property_id
+     * Example: properties/123
      * 
* * @@ -670,10 +682,9 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all provided values for the 'names' field must match
-     * this field.
-     * Example format: accounts/1234
+     * Required. Resource name of the ordinary property.
+     * Format: properties/property_id
+     * Example: properties/123
      * 
* * @@ -692,10 +703,9 @@ public Builder clearParent() { * * *
-     * Required. The account or property that all user links in the request are
-     * for. The parent of all provided values for the 'names' field must match
-     * this field.
-     * Example format: accounts/1234
+     * Required. Resource name of the ordinary property.
+     * Format: properties/property_id
+     * Example: properties/123
      * 
* * @@ -716,163 +726,143 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.LazyStringArrayList names_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureNamesIsMutable() { - if (!names_.isModifiable()) { - names_ = new com.google.protobuf.LazyStringArrayList(names_); - } - bitField0_ |= 0x00000002; - } + private int pageSize_; /** * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages. If unspecified,
+     * at most 50 resources will be returned. The maximum value is 200; (higher
+     * values will be coerced to the maximum)
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * @return A list containing the names. + * @return The pageSize. */ - public com.google.protobuf.ProtocolStringList getNamesList() { - names_.makeImmutable(); - return names_; + @java.lang.Override + public int getPageSize() { + return pageSize_; } /** * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages. If unspecified,
+     * at most 50 resources will be returned. The maximum value is 200; (higher
+     * values will be coerced to the maximum)
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The count of names. + * @param value The pageSize to set. + * @return This builder for chaining. */ - public int getNamesCount() { - return names_.size(); + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. The maximum number of resources to return. The service may return
+     * fewer than this value, even if there are additional pages. If unspecified,
+     * at most 50 resources will be returned. The maximum value is 200; (higher
+     * values will be coerced to the maximum)
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the element to return. - * @return The names at the given index. + * @return This builder for chaining. */ - public java.lang.String getNames(int index) { - return names_.get(index); + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; } + + private java.lang.Object pageToken_ = ""; /** * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. A page token, received from a previous
+     * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+     * page. When paginating, all other parameters provided to
+     * `ListSubpropertyEventFilters` must match the call that provided the page
+     * token.
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the value to return. - * @return The bytes of the names at the given index. + * @return The pageToken. */ - public com.google.protobuf.ByteString getNamesBytes(int index) { - return names_.getByteString(index); + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. A page token, received from a previous
+     * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+     * page. When paginating, all other parameters provided to
+     * `ListSubpropertyEventFilters` must match the call that provided the page
+     * token.
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index to set the value at. - * @param value The names to set. - * @return This builder for chaining. + * @return The bytes for pageToken. */ - public Builder setNames(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - ensureNamesIsMutable(); - names_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; } /** * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. A page token, received from a previous
+     * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+     * page. When paginating, all other parameters provided to
+     * `ListSubpropertyEventFilters` must match the call that provided the page
+     * token.
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The names to add. + * @param value The pageToken to set. * @return This builder for chaining. */ - public Builder addNames(java.lang.String value) { + public Builder setPageToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureNamesIsMutable(); - names_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
-     * 
- * - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param values The names to add. - * @return This builder for chaining. - */ - public Builder addAllNames(java.lang.Iterable values) { - ensureNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); - bitField0_ |= 0x00000002; + pageToken_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -880,21 +870,20 @@ public Builder addAllNames(java.lang.Iterable values) { * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. A page token, received from a previous
+     * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+     * page. When paginating, all other parameters provided to
+     * `ListSubpropertyEventFilters` must match the call that provided the page
+     * token.
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ - public Builder clearNames() { - names_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -902,26 +891,25 @@ public Builder clearNames() { * * *
-     * Required. The names of the user links to retrieve.
-     * A maximum of 1000 user links can be retrieved in a batch.
-     * Format: accounts/{accountId}/userLinks/{userLinkId}
+     * Optional. A page token, received from a previous
+     * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+     * page. When paginating, all other parameters provided to
+     * `ListSubpropertyEventFilters` must match the call that provided the page
+     * token.
      * 
* - * - * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The bytes of the names to add. + * @param value The bytes for pageToken to set. * @return This builder for chaining. */ - public Builder addNamesBytes(com.google.protobuf.ByteString value) { + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureNamesIsMutable(); - names_.add(value); - bitField0_ |= 0x00000002; + pageToken_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -937,24 +925,26 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.BatchGetUserLinksRequest) + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.BatchGetUserLinksRequest) - private static final com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) + private static final com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest(); + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest(); } - public static com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest getDefaultInstance() { + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public BatchGetUserLinksRequest parsePartialFrom( + public ListSubpropertyEventFiltersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -973,17 +963,18 @@ public BatchGetUserLinksRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest getDefaultInstanceForType() { + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersRequestOrBuilder.java new file mode 100644 index 000000000000..1d0f66132f19 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface ListSubpropertyEventFiltersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the ordinary property.
+   * Format: properties/property_id
+   * Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the ordinary property.
+   * Format: properties/property_id
+   * Example: properties/123
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of resources to return. The service may return
+   * fewer than this value, even if there are additional pages. If unspecified,
+   * at most 50 resources will be returned. The maximum value is 200; (higher
+   * values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+   * page. When paginating, all other parameters provided to
+   * `ListSubpropertyEventFilters` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent
+   * page. When paginating, all other parameters provided to
+   * `ListSubpropertyEventFilters` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersResponse.java new file mode 100644 index 000000000000..7c86f8b68da9 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersResponse.java @@ -0,0 +1,1217 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Response message for ListSubpropertyEventFilter RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse} + */ +public final class ListSubpropertyEventFiltersResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) + ListSubpropertyEventFiltersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSubpropertyEventFiltersResponse.newBuilder() to construct. + private ListSubpropertyEventFiltersResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSubpropertyEventFiltersResponse() { + subpropertyEventFilters_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSubpropertyEventFiltersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse.class, + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse.Builder.class); + } + + public static final int SUBPROPERTY_EVENT_FILTERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + subpropertyEventFilters_; + /** + * + * + *
+   * List of subproperty event filters.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + @java.lang.Override + public java.util.List + getSubpropertyEventFiltersList() { + return subpropertyEventFilters_; + } + /** + * + * + *
+   * List of subproperty event filters.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + getSubpropertyEventFiltersOrBuilderList() { + return subpropertyEventFilters_; + } + /** + * + * + *
+   * List of subproperty event filters.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + @java.lang.Override + public int getSubpropertyEventFiltersCount() { + return subpropertyEventFilters_.size(); + } + /** + * + * + *
+   * List of subproperty event filters.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilters( + int index) { + return subpropertyEventFilters_.get(index); + } + /** + * + * + *
+   * List of subproperty event filters.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFiltersOrBuilder(int index) { + return subpropertyEventFilters_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < subpropertyEventFilters_.size(); i++) { + output.writeMessage(1, subpropertyEventFilters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < subpropertyEventFilters_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, subpropertyEventFilters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse other = + (com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) obj; + + if (!getSubpropertyEventFiltersList().equals(other.getSubpropertyEventFiltersList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubpropertyEventFiltersCount() > 0) { + hash = (37 * hash) + SUBPROPERTY_EVENT_FILTERS_FIELD_NUMBER; + hash = (53 * hash) + getSubpropertyEventFiltersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListSubpropertyEventFilter RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse.class, + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subpropertyEventFiltersBuilder_ == null) { + subpropertyEventFilters_ = java.util.Collections.emptyList(); + } else { + subpropertyEventFilters_ = null; + subpropertyEventFiltersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListSubpropertyEventFiltersResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse build() { + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse buildPartial() { + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse result = + new com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse result) { + if (subpropertyEventFiltersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subpropertyEventFilters_ = + java.util.Collections.unmodifiableList(subpropertyEventFilters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subpropertyEventFilters_ = subpropertyEventFilters_; + } else { + result.subpropertyEventFilters_ = subpropertyEventFiltersBuilder_.build(); + } + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse other) { + if (other + == com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + .getDefaultInstance()) return this; + if (subpropertyEventFiltersBuilder_ == null) { + if (!other.subpropertyEventFilters_.isEmpty()) { + if (subpropertyEventFilters_.isEmpty()) { + subpropertyEventFilters_ = other.subpropertyEventFilters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.addAll(other.subpropertyEventFilters_); + } + onChanged(); + } + } else { + if (!other.subpropertyEventFilters_.isEmpty()) { + if (subpropertyEventFiltersBuilder_.isEmpty()) { + subpropertyEventFiltersBuilder_.dispose(); + subpropertyEventFiltersBuilder_ = null; + subpropertyEventFilters_ = other.subpropertyEventFilters_; + bitField0_ = (bitField0_ & ~0x00000001); + subpropertyEventFiltersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSubpropertyEventFiltersFieldBuilder() + : null; + } else { + subpropertyEventFiltersBuilder_.addAllMessages(other.subpropertyEventFilters_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1alpha.SubpropertyEventFilter m = + input.readMessage( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.parser(), + extensionRegistry); + if (subpropertyEventFiltersBuilder_ == null) { + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.add(m); + } else { + subpropertyEventFiltersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + subpropertyEventFilters_ = java.util.Collections.emptyList(); + + private void ensureSubpropertyEventFiltersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subpropertyEventFilters_ = + new java.util.ArrayList( + subpropertyEventFilters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + subpropertyEventFiltersBuilder_; + + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public java.util.List + getSubpropertyEventFiltersList() { + if (subpropertyEventFiltersBuilder_ == null) { + return java.util.Collections.unmodifiableList(subpropertyEventFilters_); + } else { + return subpropertyEventFiltersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public int getSubpropertyEventFiltersCount() { + if (subpropertyEventFiltersBuilder_ == null) { + return subpropertyEventFilters_.size(); + } else { + return subpropertyEventFiltersBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilters( + int index) { + if (subpropertyEventFiltersBuilder_ == null) { + return subpropertyEventFilters_.get(index); + } else { + return subpropertyEventFiltersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder setSubpropertyEventFilters( + int index, com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.set(index, value); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder setSubpropertyEventFilters( + int index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder builderForValue) { + if (subpropertyEventFiltersBuilder_ == null) { + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.set(index, builderForValue.build()); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder addSubpropertyEventFilters( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.add(value); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder addSubpropertyEventFilters( + int index, com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFiltersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.add(index, value); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder addSubpropertyEventFilters( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder builderForValue) { + if (subpropertyEventFiltersBuilder_ == null) { + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.add(builderForValue.build()); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder addSubpropertyEventFilters( + int index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder builderForValue) { + if (subpropertyEventFiltersBuilder_ == null) { + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.add(index, builderForValue.build()); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder addAllSubpropertyEventFilters( + java.lang.Iterable + values) { + if (subpropertyEventFiltersBuilder_ == null) { + ensureSubpropertyEventFiltersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subpropertyEventFilters_); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder clearSubpropertyEventFilters() { + if (subpropertyEventFiltersBuilder_ == null) { + subpropertyEventFilters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public Builder removeSubpropertyEventFilters(int index) { + if (subpropertyEventFiltersBuilder_ == null) { + ensureSubpropertyEventFiltersIsMutable(); + subpropertyEventFilters_.remove(index); + onChanged(); + } else { + subpropertyEventFiltersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder + getSubpropertyEventFiltersBuilder(int index) { + return getSubpropertyEventFiltersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFiltersOrBuilder(int index) { + if (subpropertyEventFiltersBuilder_ == null) { + return subpropertyEventFilters_.get(index); + } else { + return subpropertyEventFiltersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + getSubpropertyEventFiltersOrBuilderList() { + if (subpropertyEventFiltersBuilder_ != null) { + return subpropertyEventFiltersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subpropertyEventFilters_); + } + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder + addSubpropertyEventFiltersBuilder() { + return getSubpropertyEventFiltersFieldBuilder() + .addBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance()); + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder + addSubpropertyEventFiltersBuilder(int index) { + return getSubpropertyEventFiltersFieldBuilder() + .addBuilder( + index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance()); + } + /** + * + * + *
+     * List of subproperty event filters.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * + */ + public java.util.List + getSubpropertyEventFiltersBuilderList() { + return getSubpropertyEventFiltersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + getSubpropertyEventFiltersFieldBuilder() { + if (subpropertyEventFiltersBuilder_ == null) { + subpropertyEventFiltersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder>( + subpropertyEventFilters_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subpropertyEventFilters_ = null; + } + return subpropertyEventFiltersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) + private static final com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse(); + } + + public static com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubpropertyEventFiltersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksResponseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersResponseOrBuilder.java similarity index 50% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksResponseOrBuilder.java rename to java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersResponseOrBuilder.java index bcf8b7a64aeb..e580e0ddee87 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksResponseOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListSubpropertyEventFiltersResponseOrBuilder.java @@ -18,69 +18,81 @@ package com.google.analytics.admin.v1alpha; -public interface ListUserLinksResponseOrBuilder +public interface ListSubpropertyEventFiltersResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListUserLinksResponse) + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListSubpropertyEventFiltersResponse) com.google.protobuf.MessageOrBuilder { /** * * *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
+   * List of subproperty event filters.
    * 
* - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * */ - java.util.List getUserLinksList(); + java.util.List + getSubpropertyEventFiltersList(); /** * * *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
+   * List of subproperty event filters.
    * 
* - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * */ - com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index); + com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilters(int index); /** * * *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
+   * List of subproperty event filters.
    * 
* - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * */ - int getUserLinksCount(); + int getSubpropertyEventFiltersCount(); /** * * *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
+   * List of subproperty event filters.
    * 
* - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * */ - java.util.List - getUserLinksOrBuilderList(); + java.util.List + getSubpropertyEventFiltersOrBuilderList(); /** * * *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
+   * List of subproperty event filters.
    * 
* - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filters = 1; + * */ - com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index); + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFiltersOrBuilder(int index); /** * * *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
    * 
* * string next_page_token = 2; @@ -92,8 +104,8 @@ public interface ListUserLinksResponseOrBuilder * * *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
    * 
* * string next_page_token = 2; diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksResponse.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksResponse.java deleted file mode 100644 index b5e70009d01a..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksResponse.java +++ /dev/null @@ -1,1127 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * Response message for ListUserLinks RPC.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.ListUserLinksResponse} - */ -public final class ListUserLinksResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListUserLinksResponse) - ListUserLinksResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListUserLinksResponse.newBuilder() to construct. - private ListUserLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListUserLinksResponse() { - userLinks_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListUserLinksResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.ListUserLinksResponse.class, - com.google.analytics.admin.v1alpha.ListUserLinksResponse.Builder.class); - } - - public static final int USER_LINKS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List userLinks_; - /** - * - * - *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List getUserLinksList() { - return userLinks_; - } - /** - * - * - *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public java.util.List - getUserLinksOrBuilderList() { - return userLinks_; - } - /** - * - * - *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public int getUserLinksCount() { - return userLinks_.size(); - } - /** - * - * - *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - return userLinks_.get(index); - } - /** - * - * - *
-   * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-   * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - return userLinks_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < userLinks_.size(); i++) { - output.writeMessage(1, userLinks_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < userLinks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLinks_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.ListUserLinksResponse)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.ListUserLinksResponse other = - (com.google.analytics.admin.v1alpha.ListUserLinksResponse) obj; - - if (!getUserLinksList().equals(other.getUserLinksList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getUserLinksCount() > 0) { - hash = (37 * hash) + USER_LINKS_FIELD_NUMBER; - hash = (53 * hash) + getUserLinksList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.ListUserLinksResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for ListUserLinks RPC.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.ListUserLinksResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListUserLinksResponse) - com.google.analytics.admin.v1alpha.ListUserLinksResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.ListUserLinksResponse.class, - com.google.analytics.admin.v1alpha.ListUserLinksResponse.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.ListUserLinksResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - } else { - userLinks_ = null; - userLinksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksResponse_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksResponse getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.ListUserLinksResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksResponse build() { - com.google.analytics.admin.v1alpha.ListUserLinksResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksResponse buildPartial() { - com.google.analytics.admin.v1alpha.ListUserLinksResponse result = - new com.google.analytics.admin.v1alpha.ListUserLinksResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.ListUserLinksResponse result) { - if (userLinksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - userLinks_ = java.util.Collections.unmodifiableList(userLinks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.userLinks_ = userLinks_; - } else { - result.userLinks_ = userLinksBuilder_.build(); - } - } - - private void buildPartial0(com.google.analytics.admin.v1alpha.ListUserLinksResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.ListUserLinksResponse) { - return mergeFrom((com.google.analytics.admin.v1alpha.ListUserLinksResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.analytics.admin.v1alpha.ListUserLinksResponse other) { - if (other == com.google.analytics.admin.v1alpha.ListUserLinksResponse.getDefaultInstance()) - return this; - if (userLinksBuilder_ == null) { - if (!other.userLinks_.isEmpty()) { - if (userLinks_.isEmpty()) { - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureUserLinksIsMutable(); - userLinks_.addAll(other.userLinks_); - } - onChanged(); - } - } else { - if (!other.userLinks_.isEmpty()) { - if (userLinksBuilder_.isEmpty()) { - userLinksBuilder_.dispose(); - userLinksBuilder_ = null; - userLinks_ = other.userLinks_; - bitField0_ = (bitField0_ & ~0x00000001); - userLinksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getUserLinksFieldBuilder() - : null; - } else { - userLinksBuilder_.addAllMessages(other.userLinks_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.analytics.admin.v1alpha.UserLink m = - input.readMessage( - com.google.analytics.admin.v1alpha.UserLink.parser(), extensionRegistry); - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(m); - } else { - userLinksBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List userLinks_ = - java.util.Collections.emptyList(); - - private void ensureUserLinksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - userLinks_ = - new java.util.ArrayList(userLinks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - userLinksBuilder_; - - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List getUserLinksList() { - if (userLinksBuilder_ == null) { - return java.util.Collections.unmodifiableList(userLinks_); - } else { - return userLinksBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public int getUserLinksCount() { - if (userLinksBuilder_ == null) { - return userLinks_.size(); - } else { - return userLinksBuilder_.getCount(); - } - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink getUserLinks(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.set(index, value); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder setUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.set(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(value); - onChanged(); - } else { - userLinksBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks(int index, com.google.analytics.admin.v1alpha.UserLink value) { - if (userLinksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUserLinksIsMutable(); - userLinks_.add(index, value); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addUserLinks( - int index, com.google.analytics.admin.v1alpha.UserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(index, builderForValue.build()); - onChanged(); - } else { - userLinksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder addAllUserLinks( - java.lang.Iterable values) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLinks_); - onChanged(); - } else { - userLinksBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder clearUserLinks() { - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - userLinksBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public Builder removeUserLinks(int index) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.remove(index); - onChanged(); - } else { - userLinksBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder getUserLinksBuilder(int index) { - return getUserLinksFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLinkOrBuilder getUserLinksOrBuilder(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); - } else { - return userLinksBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksOrBuilderList() { - if (userLinksBuilder_ != null) { - return userLinksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(userLinks_); - } - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder() { - return getUserLinksFieldBuilder() - .addBuilder(com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public com.google.analytics.admin.v1alpha.UserLink.Builder addUserLinksBuilder(int index) { - return getUserLinksFieldBuilder() - .addBuilder(index, com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()); - } - /** - * - * - *
-     * List of UserLinks. These will be ordered stably, but in an arbitrary order.
-     * 
- * - * repeated .google.analytics.admin.v1alpha.UserLink user_links = 1; - */ - public java.util.List - getUserLinksBuilderList() { - return getUserLinksFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder> - getUserLinksFieldBuilder() { - if (userLinksBuilder_ == null) { - userLinksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.UserLink, - com.google.analytics.admin.v1alpha.UserLink.Builder, - com.google.analytics.admin.v1alpha.UserLinkOrBuilder>( - userLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - userLinks_ = null; - } - return userLinksBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListUserLinksResponse) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListUserLinksResponse) - private static final com.google.analytics.admin.v1alpha.ListUserLinksResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.ListUserLinksResponse(); - } - - public static com.google.analytics.admin.v1alpha.ListUserLinksResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListUserLinksResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java index 690962abcd9e..7a3d028640b9 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java @@ -133,8 +133,7 @@ public com.google.protobuf.ByteString getNameBytes() { *
    * Immutable. The property type for this Property resource. When creating a
    * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-   * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-   * types cannot yet be created with the Google Analytics Admin API.
+   * "ORDINARY_PROPERTY" will be implied.
    * 
* * @@ -153,8 +152,7 @@ public int getPropertyTypeValue() { *
    * Immutable. The property type for this Property resource. When creating a
    * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-   * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-   * types cannot yet be created with the Google Analytics Admin API.
+   * "ORDINARY_PROPERTY" will be implied.
    * 
* * @@ -1536,8 +1534,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { *
      * Immutable. The property type for this Property resource. When creating a
      * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-     * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-     * types cannot yet be created with the Google Analytics Admin API.
+     * "ORDINARY_PROPERTY" will be implied.
      * 
* * @@ -1556,8 +1553,7 @@ public int getPropertyTypeValue() { *
      * Immutable. The property type for this Property resource. When creating a
      * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-     * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-     * types cannot yet be created with the Google Analytics Admin API.
+     * "ORDINARY_PROPERTY" will be implied.
      * 
* * @@ -1579,8 +1575,7 @@ public Builder setPropertyTypeValue(int value) { *
      * Immutable. The property type for this Property resource. When creating a
      * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-     * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-     * types cannot yet be created with the Google Analytics Admin API.
+     * "ORDINARY_PROPERTY" will be implied.
      * 
* * @@ -1601,8 +1596,7 @@ public com.google.analytics.admin.v1alpha.PropertyType getPropertyType() { *
      * Immutable. The property type for this Property resource. When creating a
      * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-     * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-     * types cannot yet be created with the Google Analytics Admin API.
+     * "ORDINARY_PROPERTY" will be implied.
      * 
* * @@ -1627,8 +1621,7 @@ public Builder setPropertyType(com.google.analytics.admin.v1alpha.PropertyType v *
      * Immutable. The property type for this Property resource. When creating a
      * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-     * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-     * types cannot yet be created with the Google Analytics Admin API.
+     * "ORDINARY_PROPERTY" will be implied.
      * 
* * diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java index 4c99b25662ce..5d1a12f94230 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java @@ -58,8 +58,7 @@ public interface PropertyOrBuilder *
    * Immutable. The property type for this Property resource. When creating a
    * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-   * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-   * types cannot yet be created with the Google Analytics Admin API.
+   * "ORDINARY_PROPERTY" will be implied.
    * 
* * @@ -75,8 +74,7 @@ public interface PropertyOrBuilder *
    * Immutable. The property type for this Property resource. When creating a
    * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
-   * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY"
-   * types cannot yet be created with the Google Analytics Admin API.
+   * "ORDINARY_PROPERTY" will be implied.
    * 
* * diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java index 4fbd32a688fc..de387a927ad1 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java @@ -51,14 +51,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_admin_v1alpha_DataStream_IosAppStreamData_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_DataStream_IosAppStreamData_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_UserLink_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_UserLink_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_admin_v1alpha_AuditUserLink_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_admin_v1alpha_AuditUserLink_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_admin_v1alpha_FirebaseLink_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -171,10 +163,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_admin_v1alpha_ConnectedSiteTag_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_ConnectedSiteTag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_admin_v1alpha_AdSenseLink_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_AdSenseLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -244,403 +244,412 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_DATA_STREAM\020\002\022\027\n\023IOS_APP_DATA_STREAM\020\003:" + "^\352A[\n(analyticsadmin.googleapis.com/Data" + "Stream\022/properties/{property}/dataStream" - + "s/{data_stream}B\r\n\013stream_data\"\326\001\n\010UserL" - + "ink\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\033\n\remail_address" - + "\030\002 \001(\tB\004\342A\001\005\022\024\n\014direct_roles\030\003 \003(\t:\202\001\352A\177" - + "\n&analyticsadmin.googleapis.com/UserLink" - + "\022(accounts/{account}/userLinks/{user_lin" - + "k}\022+properties/{property}/userLinks/{use" - + "r_link}\"c\n\rAuditUserLink\022\014\n\004name\030\001 \001(\t\022\025" - + "\n\remail_address\030\002 \001(\t\022\024\n\014direct_roles\030\003 " - + "\003(\t\022\027\n\017effective_roles\030\004 \003(\t\"\326\001\n\014Firebas" - + "eLink\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\025\n\007project\030\002 \001" - + "(\tB\004\342A\001\005\0225\n\013create_time\030\003 \001(\0132\032.google.p" - + "rotobuf.TimestampB\004\342A\001\003:d\352Aa\n*analyticsa" - + "dmin.googleapis.com/FirebaseLink\0223proper" - + "ties/{property}/firebaseLinks/{firebase_" - + "link}\"\253\001\n\rGlobalSiteTag\022\022\n\004name\030\001 \001(\tB\004\342" - + "A\001\003\022\025\n\007snippet\030\002 \001(\tB\004\342A\001\005:o\352Al\n+analyti" - + "csadmin.googleapis.com/GlobalSiteTag\022=pr" - + "operties/{property}/dataStreams/{data_st" - + "ream}/globalSiteTag\"\236\003\n\rGoogleAdsLink\022\022\n" - + "\004name\030\001 \001(\tB\004\342A\001\003\022\031\n\013customer_id\030\003 \001(\tB\004" - + "\342A\001\005\022 \n\022can_manage_clients\030\004 \001(\010B\004\342A\001\003\022?" - + "\n\033ads_personalization_enabled\030\005 \001(\0132\032.go" - + "ogle.protobuf.BoolValue\0225\n\013create_time\030\007" - + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225" - + "\n\013update_time\030\010 \001(\0132\032.google.protobuf.Ti" - + "mestampB\004\342A\001\003\022#\n\025creator_email_address\030\t" - + " \001(\tB\004\342A\001\003:h\352Ae\n+analyticsadmin.googleap" - + "is.com/GoogleAdsLink\0226properties/{proper" - + "ty}/googleAdsLinks/{google_ads_link}\"\354\002\n" - + "\023DataSharingSettings\022\022\n\004name\030\001 \001(\tB\004\342A\001\003" - + "\022+\n#sharing_with_google_support_enabled\030" - + "\002 \001(\010\0222\n*sharing_with_google_assigned_sa" - + "les_enabled\030\003 \001(\010\022-\n%sharing_with_google" - + "_any_sales_enabled\030\004 \001(\010\022,\n$sharing_with" - + "_google_products_enabled\030\005 \001(\010\022#\n\033sharin" - + "g_with_others_enabled\030\006 \001(\010:^\352A[\n1analyt" - + "icsadmin.googleapis.com/DataSharingSetti" - + "ngs\022&accounts/{account}/dataSharingSetti" - + "ngs\"\225\002\n\016AccountSummary\022\014\n\004name\030\001 \001(\t\022;\n\007" - + "account\030\002 \001(\tB*\372A\'\n%analyticsadmin.googl" - + "eapis.com/Account\022\024\n\014display_name\030\003 \001(\t\022" - + "K\n\022property_summaries\030\004 \003(\0132/.google.ana" - + "lytics.admin.v1alpha.PropertySummary:U\352A" - + "R\n,analyticsadmin.googleapis.com/Account" - + "Summary\022\"accountSummaries/{account_summa" - + "ry}\"\273\001\n\017PropertySummary\022=\n\010property\030\001 \001(" - + "\tB+\372A(\n&analyticsadmin.googleapis.com/Pr" - + "operty\022\024\n\014display_name\030\002 \001(\t\022C\n\rproperty" - + "_type\030\003 \001(\0162,.google.analytics.admin.v1a" - + "lpha.PropertyType\022\016\n\006parent\030\004 \001(\t\"\221\002\n\031Me" - + "asurementProtocolSecret\022\022\n\004name\030\001 \001(\tB\004\342" - + "A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022\032\n\014secre" - + "t_value\030\003 \001(\tB\004\342A\001\003:\247\001\352A\243\001\n7analyticsadm" - + "in.googleapis.com/MeasurementProtocolSec" - + "ret\022hproperties/{property}/dataStreams/{" - + "data_stream}/measurementProtocolSecrets/" - + "{measurement_protocol_secret}\"\205\004\n SKAdNe" - + "tworkConversionValueSchema\022\022\n\004name\030\001 \001(\t" - + "B\004\342A\001\003\022Q\n\023postback_window_one\030\002 \001(\0132..go" - + "ogle.analytics.admin.v1alpha.PostbackWin" - + "dowB\004\342A\001\002\022K\n\023postback_window_two\030\003 \001(\0132." - + ".google.analytics.admin.v1alpha.Postback" - + "Window\022M\n\025postback_window_three\030\004 \001(\0132.." + + "s/{data_stream}B\r\n\013stream_data\"\326\001\n\014Fireb" + + "aseLink\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\025\n\007project\030\002" + + " \001(\tB\004\342A\001\005\0225\n\013create_time\030\003 \001(\0132\032.google" + + ".protobuf.TimestampB\004\342A\001\003:d\352Aa\n*analytic" + + "sadmin.googleapis.com/FirebaseLink\0223prop" + + "erties/{property}/firebaseLinks/{firebas" + + "e_link}\"\253\001\n\rGlobalSiteTag\022\022\n\004name\030\001 \001(\tB" + + "\004\342A\001\003\022\025\n\007snippet\030\002 \001(\tB\004\342A\001\005:o\352Al\n+analy" + + "ticsadmin.googleapis.com/GlobalSiteTag\022=" + + "properties/{property}/dataStreams/{data_" + + "stream}/globalSiteTag\"\236\003\n\rGoogleAdsLink\022" + + "\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\031\n\013customer_id\030\003 \001(\t" + + "B\004\342A\001\005\022 \n\022can_manage_clients\030\004 \001(\010B\004\342A\001\003" + + "\022?\n\033ads_personalization_enabled\030\005 \001(\0132\032." + + "google.protobuf.BoolValue\0225\n\013create_time" + + "\030\007 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" + + "\0225\n\013update_time\030\010 \001(\0132\032.google.protobuf." + + "TimestampB\004\342A\001\003\022#\n\025creator_email_address" + + "\030\t \001(\tB\004\342A\001\003:h\352Ae\n+analyticsadmin.google" + + "apis.com/GoogleAdsLink\0226properties/{prop" + + "erty}/googleAdsLinks/{google_ads_link}\"\354" + + "\002\n\023DataSharingSettings\022\022\n\004name\030\001 \001(\tB\004\342A" + + "\001\003\022+\n#sharing_with_google_support_enable" + + "d\030\002 \001(\010\0222\n*sharing_with_google_assigned_" + + "sales_enabled\030\003 \001(\010\022-\n%sharing_with_goog" + + "le_any_sales_enabled\030\004 \001(\010\022,\n$sharing_wi" + + "th_google_products_enabled\030\005 \001(\010\022#\n\033shar" + + "ing_with_others_enabled\030\006 \001(\010:^\352A[\n1anal" + + "yticsadmin.googleapis.com/DataSharingSet" + + "tings\022&accounts/{account}/dataSharingSet" + + "tings\"\225\002\n\016AccountSummary\022\014\n\004name\030\001 \001(\t\022;" + + "\n\007account\030\002 \001(\tB*\372A\'\n%analyticsadmin.goo" + + "gleapis.com/Account\022\024\n\014display_name\030\003 \001(" + + "\t\022K\n\022property_summaries\030\004 \003(\0132/.google.a" + + "nalytics.admin.v1alpha.PropertySummary:U" + + "\352AR\n,analyticsadmin.googleapis.com/Accou" + + "ntSummary\022\"accountSummaries/{account_sum" + + "mary}\"\273\001\n\017PropertySummary\022=\n\010property\030\001 " + + "\001(\tB+\372A(\n&analyticsadmin.googleapis.com/" + + "Property\022\024\n\014display_name\030\002 \001(\t\022C\n\rproper" + + "ty_type\030\003 \001(\0162,.google.analytics.admin.v" + + "1alpha.PropertyType\022\016\n\006parent\030\004 \001(\t\"\221\002\n\031" + + "MeasurementProtocolSecret\022\022\n\004name\030\001 \001(\tB" + + "\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022\032\n\014sec" + + "ret_value\030\003 \001(\tB\004\342A\001\003:\247\001\352A\243\001\n7analyticsa" + + "dmin.googleapis.com/MeasurementProtocolS" + + "ecret\022hproperties/{property}/dataStreams" + + "/{data_stream}/measurementProtocolSecret" + + "s/{measurement_protocol_secret}\"\205\004\n SKAd" + + "NetworkConversionValueSchema\022\022\n\004name\030\001 \001" + + "(\tB\004\342A\001\003\022Q\n\023postback_window_one\030\002 \001(\0132.." + "google.analytics.admin.v1alpha.PostbackW" - + "indow\022\037\n\027apply_conversion_values\030\005 \001(\010:\274" - + "\001\352A\270\001\n>analyticsadmin.googleapis.com/SKA" - + "dNetworkConversionValueSchema\022vpropertie" - + "s/{property}/dataStreams/{data_stream}/s" - + "KAdNetworkConversionValueSchema/{skadnet" - + "work_conversion_value_schema}\"\207\001\n\016Postba" - + "ckWindow\022K\n\021conversion_values\030\001 \003(\01320.go" - + "ogle.analytics.admin.v1alpha.ConversionV" - + "alues\022(\n postback_window_settings_enable" - + "d\030\002 \001(\010\"\365\001\n\020ConversionValues\022\024\n\014display_" - + "name\030\001 \001(\t\022\027\n\nfine_value\030\002 \001(\005H\000\210\001\001\022G\n\014c" - + "oarse_value\030\003 \001(\0162+.google.analytics.adm" - + "in.v1alpha.CoarseValueB\004\342A\001\002\022D\n\016event_ma" - + "ppings\030\004 \003(\0132,.google.analytics.admin.v1" - + "alpha.EventMapping\022\024\n\014lock_enabled\030\005 \001(\010" - + "B\r\n\013_fine_value\"\360\001\n\014EventMapping\022\030\n\neven" - + "t_name\030\001 \001(\tB\004\342A\001\002\022\034\n\017min_event_count\030\002 " - + "\001(\003H\000\210\001\001\022\034\n\017max_event_count\030\003 \001(\003H\001\210\001\001\022\034" - + "\n\017min_event_value\030\004 \001(\001H\002\210\001\001\022\034\n\017max_even" - + "t_value\030\005 \001(\001H\003\210\001\001B\022\n\020_min_event_countB\022" - + "\n\020_max_event_countB\022\n\020_min_event_valueB\022" - + "\n\020_max_event_value\"\212\002\n\022ChangeHistoryEven" - + "t\022\n\n\002id\030\001 \001(\t\022/\n\013change_time\030\002 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\022=\n\nactor_type\030\003 \001" - + "(\0162).google.analytics.admin.v1alpha.Acto" - + "rType\022\030\n\020user_actor_email\030\004 \001(\t\022\030\n\020chang" - + "es_filtered\030\005 \001(\010\022D\n\007changes\030\006 \003(\01323.goo" - + "gle.analytics.admin.v1alpha.ChangeHistor" - + "yChange\"\266\021\n\023ChangeHistoryChange\022\020\n\010resou" - + "rce\030\001 \001(\t\022:\n\006action\030\002 \001(\0162*.google.analy" - + "tics.admin.v1alpha.ActionType\022i\n\026resourc" - + "e_before_change\030\003 \001(\0132I.google.analytics" - + ".admin.v1alpha.ChangeHistoryChange.Chang" - + "eHistoryResource\022h\n\025resource_after_chang" - + "e\030\004 \001(\0132I.google.analytics.admin.v1alpha" - + ".ChangeHistoryChange.ChangeHistoryResour" - + "ce\032\373\016\n\025ChangeHistoryResource\022:\n\007account\030" - + "\001 \001(\0132\'.google.analytics.admin.v1alpha.A" - + "ccountH\000\022<\n\010property\030\002 \001(\0132(.google.anal" - + "ytics.admin.v1alpha.PropertyH\000\022E\n\rfireba" - + "se_link\030\006 \001(\0132,.google.analytics.admin.v" - + "1alpha.FirebaseLinkH\000\022H\n\017google_ads_link" - + "\030\007 \001(\0132-.google.analytics.admin.v1alpha." - + "GoogleAdsLinkH\000\022X\n\027google_signals_settin" - + "gs\030\010 \001(\01325.google.analytics.admin.v1alph" - + "a.GoogleSignalsSettingsH\000\022j\n!display_vid" - + "eo_360_advertiser_link\030\t \001(\0132=.google.an" - + "alytics.admin.v1alpha.DisplayVideo360Adv" - + "ertiserLinkH\000\022{\n*display_video_360_adver" - + "tiser_link_proposal\030\n \001(\0132E.google.analy" - + "tics.admin.v1alpha.DisplayVideo360Advert" - + "iserLinkProposalH\000\022K\n\020conversion_event\030\013" - + " \001(\0132/.google.analytics.admin.v1alpha.Co" - + "nversionEventH\000\022`\n\033measurement_protocol_" - + "secret\030\014 \001(\01329.google.analytics.admin.v1" - + "alpha.MeasurementProtocolSecretH\000\022K\n\020cus" - + "tom_dimension\030\r \001(\0132/.google.analytics.a" - + "dmin.v1alpha.CustomDimensionH\000\022E\n\rcustom" - + "_metric\030\016 \001(\0132,.google.analytics.admin.v" - + "1alpha.CustomMetricH\000\022X\n\027data_retention_" - + "settings\030\017 \001(\01325.google.analytics.admin." - + "v1alpha.DataRetentionSettingsH\000\022O\n\023searc" - + "h_ads_360_link\030\020 \001(\01320.google.analytics." - + "admin.v1alpha.SearchAds360LinkH\000\022A\n\013data" - + "_stream\030\022 \001(\0132*.google.analytics.admin.v" - + "1alpha.DataStreamH\000\022S\n\024attribution_setti" - + "ngs\030\024 \001(\01323.google.analytics.admin.v1alp" - + "ha.AttributionSettingsH\000\022L\n\021expanded_dat" - + "a_set\030\025 \001(\0132/.google.analytics.admin.v1a" - + "lpha.ExpandedDataSetH\000\022E\n\rchannel_group\030" - + "\026 \001(\0132,.google.analytics.admin.v1alpha.C" - + "hannelGroupH\000\022E\n\rbigquery_link\030\027 \001(\0132,.g" - + "oogle.analytics.admin.v1alpha.BigQueryLi" - + "nkH\000\022d\n\035enhanced_measurement_settings\030\030 " - + "\001(\0132;.google.analytics.admin.v1alpha.Enh" - + "ancedMeasurementSettingsH\000\022o\n#skadnetwor" - + "k_conversion_value_schema\030\032 \001(\0132@.google" - + ".analytics.admin.v1alpha.SKAdNetworkConv" - + "ersionValueSchemaH\000\022C\n\014adsense_link\030\033 \001(" - + "\0132+.google.analytics.admin.v1alpha.AdSen" - + "seLinkH\000\022<\n\010audience\030\034 \001(\0132(.google.anal" - + "ytics.admin.v1alpha.AudienceH\000\022L\n\021event_" - + "create_rule\030\035 \001(\0132/.google.analytics.adm" - + "in.v1alpha.EventCreateRuleH\000B\n\n\010resource" - + "\"\344\003\n\035DisplayVideo360AdvertiserLink\022\022\n\004na" - + "me\030\001 \001(\tB\004\342A\001\003\022\033\n\radvertiser_id\030\002 \001(\tB\004\342" - + "A\001\005\022%\n\027advertiser_display_name\030\003 \001(\tB\004\342A" - + "\001\003\022?\n\033ads_personalization_enabled\030\004 \001(\0132" - + "\032.google.protobuf.BoolValue\022G\n\035campaign_" - + "data_sharing_enabled\030\005 \001(\0132\032.google.prot" - + "obuf.BoolValueB\004\342A\001\005\022C\n\031cost_data_sharin" - + "g_enabled\030\006 \001(\0132\032.google.protobuf.BoolVa" - + "lueB\004\342A\001\005:\233\001\352A\227\001\n;analyticsadmin.googlea" - + "pis.com/DisplayVideo360AdvertiserLink\022Xp" - + "roperties/{property}/displayVideo360Adve" - + "rtiserLinks/{display_video_360_advertise" - + "r_link}\"\222\005\n%DisplayVideo360AdvertiserLin" - + "kProposal\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\033\n\radverti" - + "ser_id\030\002 \001(\tB\004\342A\001\005\022e\n\034link_proposal_stat" - + "us_details\030\003 \001(\01329.google.analytics.admi" - + "n.v1alpha.LinkProposalStatusDetailsB\004\342A\001" - + "\003\022%\n\027advertiser_display_name\030\004 \001(\tB\004\342A\001\003" - + "\022\036\n\020validation_email\030\005 \001(\tB\004\342A\001\004\022E\n\033ads_" - + "personalization_enabled\030\006 \001(\0132\032.google.p" - + "rotobuf.BoolValueB\004\342A\001\005\022G\n\035campaign_data" - + "_sharing_enabled\030\007 \001(\0132\032.google.protobuf" - + ".BoolValueB\004\342A\001\005\022C\n\031cost_data_sharing_en" - + "abled\030\010 \001(\0132\032.google.protobuf.BoolValueB" - + "\004\342A\001\005:\264\001\352A\260\001\nCanalyticsadmin.googleapis." - + "com/DisplayVideo360AdvertiserLinkProposa" - + "l\022iproperties/{property}/displayVideo360" - + "AdvertiserLinkProposals/{display_video_3" - + "60_advertiser_link_proposal}\"\355\003\n\020SearchA" - + "ds360Link\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\033\n\radverti" - + "ser_id\030\002 \001(\tB\004\342A\001\005\022G\n\035campaign_data_shar" - + "ing_enabled\030\003 \001(\0132\032.google.protobuf.Bool" - + "ValueB\004\342A\001\005\022C\n\031cost_data_sharing_enabled" - + "\030\004 \001(\0132\032.google.protobuf.BoolValueB\004\342A\001\005" - + "\022%\n\027advertiser_display_name\030\005 \001(\tB\004\342A\001\003\022" - + "?\n\033ads_personalization_enabled\030\006 \001(\0132\032.g" - + "oogle.protobuf.BoolValue\022>\n\032site_stats_s" - + "haring_enabled\030\007 \001(\0132\032.google.protobuf.B" - + "oolValue:r\352Ao\n.analyticsadmin.googleapis" - + ".com/SearchAds360Link\022=properties/{prope" - + "rty}/searchAds360Links/{search_ads_360_l" - + "ink}\"\377\001\n\031LinkProposalStatusDetails\022m\n li" - + "nk_proposal_initiating_product\030\001 \001(\0162=.g" - + "oogle.analytics.admin.v1alpha.LinkPropos" - + "alInitiatingProductB\004\342A\001\003\022\035\n\017requestor_e" - + "mail\030\002 \001(\tB\004\342A\001\003\022T\n\023link_proposal_state\030" - + "\003 \001(\01621.google.analytics.admin.v1alpha.L" - + "inkProposalStateB\004\342A\001\003\"\357\003\n\017ConversionEve" - + "nt\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\030\n\nevent_name\030\002 \001" - + "(\tB\004\342A\001\005\0225\n\013create_time\030\003 \001(\0132\032.google.p" - + "rotobuf.TimestampB\004\342A\001\003\022\027\n\tdeletable\030\004 \001" - + "(\010B\004\342A\001\003\022\024\n\006custom\030\005 \001(\010B\004\342A\001\003\022g\n\017counti" - + "ng_method\030\006 \001(\0162H.google.analytics.admin" - + ".v1alpha.ConversionEvent.ConversionCount" - + "ingMethodB\004\342A\001\001\"p\n\030ConversionCountingMet" - + "hod\022*\n&CONVERSION_COUNTING_METHOD_UNSPEC" - + "IFIED\020\000\022\022\n\016ONCE_PER_EVENT\020\001\022\024\n\020ONCE_PER_" - + "SESSION\020\002:m\352Aj\n-analyticsadmin.googleapi" - + "s.com/ConversionEvent\0229properties/{prope" - + "rty}/conversionEvents/{conversion_event}" - + "\"\242\002\n\025GoogleSignalsSettings\022\022\n\004name\030\001 \001(\t" - + "B\004\342A\001\003\022A\n\005state\030\003 \001(\01622.google.analytics" - + ".admin.v1alpha.GoogleSignalsState\022K\n\007con" - + "sent\030\004 \001(\01624.google.analytics.admin.v1al" - + "pha.GoogleSignalsConsentB\004\342A\001\003:e\352Ab\n3ana" - + "lyticsadmin.googleapis.com/GoogleSignals" - + "Settings\022+properties/{property}/googleSi" - + "gnalsSettings\"\276\003\n\017CustomDimension\022\022\n\004nam" - + "e\030\001 \001(\tB\004\342A\001\003\022\035\n\016parameter_name\030\002 \001(\tB\005\342" - + "A\002\002\005\022\032\n\014display_name\030\003 \001(\tB\004\342A\001\002\022\031\n\013desc" - + "ription\030\004 \001(\tB\004\342A\001\001\022T\n\005scope\030\005 \001(\0162>.goo" - + "gle.analytics.admin.v1alpha.CustomDimens" - + "ion.DimensionScopeB\005\342A\002\002\005\022*\n\034disallow_ad" - + "s_personalization\030\006 \001(\010B\004\342A\001\001\"P\n\016Dimensi" - + "onScope\022\037\n\033DIMENSION_SCOPE_UNSPECIFIED\020\000" - + "\022\t\n\005EVENT\020\001\022\010\n\004USER\020\002\022\010\n\004ITEM\020\003:m\352Aj\n-an" - + "alyticsadmin.googleapis.com/CustomDimens" - + "ion\0229properties/{property}/customDimensi" - + "ons/{custom_dimension}\"\310\006\n\014CustomMetric\022" - + "\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\035\n\016parameter_name\030\002 " - + "\001(\tB\005\342A\002\002\005\022\032\n\014display_name\030\003 \001(\tB\004\342A\001\002\022\031" - + "\n\013description\030\004 \001(\tB\004\342A\001\001\022\\\n\020measurement" - + "_unit\030\005 \001(\0162<.google.analytics.admin.v1a" - + "lpha.CustomMetric.MeasurementUnitB\004\342A\001\002\022" - + "N\n\005scope\030\006 \001(\01628.google.analytics.admin." - + "v1alpha.CustomMetric.MetricScopeB\005\342A\002\002\005\022" - + "g\n\026restricted_metric_type\030\010 \003(\0162A.google" - + ".analytics.admin.v1alpha.CustomMetric.Re" - + "strictedMetricTypeB\004\342A\001\001\"\267\001\n\017Measurement" - + "Unit\022 \n\034MEASUREMENT_UNIT_UNSPECIFIED\020\000\022\014" - + "\n\010STANDARD\020\001\022\014\n\010CURRENCY\020\002\022\010\n\004FEET\020\003\022\n\n\006" - + "METERS\020\004\022\016\n\nKILOMETERS\020\005\022\t\n\005MILES\020\006\022\020\n\014M" - + "ILLISECONDS\020\007\022\013\n\007SECONDS\020\010\022\013\n\007MINUTES\020\t\022" - + "\t\n\005HOURS\020\n\"6\n\013MetricScope\022\034\n\030METRIC_SCOP" - + "E_UNSPECIFIED\020\000\022\t\n\005EVENT\020\001\"_\n\024Restricted" - + "MetricType\022&\n\"RESTRICTED_METRIC_TYPE_UNS" - + "PECIFIED\020\000\022\r\n\tCOST_DATA\020\001\022\020\n\014REVENUE_DAT" - + "A\020\002:d\352Aa\n*analyticsadmin.googleapis.com/" - + "CustomMetric\0223properties/{property}/cust" - + "omMetrics/{custom_metric}\"\303\003\n\025DataRetent" - + "ionSettings\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022e\n\024event" - + "_data_retention\030\002 \001(\0162G.google.analytics" - + ".admin.v1alpha.DataRetentionSettings.Ret" - + "entionDuration\022\'\n\037reset_user_data_on_new" - + "_activity\030\003 \001(\010\"\236\001\n\021RetentionDuration\022\"\n" - + "\036RETENTION_DURATION_UNSPECIFIED\020\000\022\016\n\nTWO" - + "_MONTHS\020\001\022\023\n\017FOURTEEN_MONTHS\020\003\022\025\n\021TWENTY" - + "_SIX_MONTHS\020\004\022\027\n\023THIRTY_EIGHT_MONTHS\020\005\022\020" - + "\n\014FIFTY_MONTHS\020\006:e\352Ab\n3analyticsadmin.go" - + "ogleapis.com/DataRetentionSettings\022+prop" - + "erties/{property}/dataRetentionSettings\"" - + "\252\r\n\023AttributionSettings\022\022\n\004name\030\001 \001(\tB\004\342" - + "A\001\003\022\230\001\n,acquisition_conversion_event_loo" - + "kback_window\030\002 \001(\0162\\.google.analytics.ad" - + "min.v1alpha.AttributionSettings.Acquisit" - + "ionConversionEventLookbackWindowB\004\342A\001\002\022\214" - + "\001\n&other_conversion_event_lookback_windo" - + "w\030\003 \001(\0162V.google.analytics.admin.v1alpha" - + ".AttributionSettings.OtherConversionEven" - + "tLookbackWindowB\004\342A\001\002\022x\n\033reporting_attri" - + "bution_model\030\004 \001(\0162M.google.analytics.ad" - + "min.v1alpha.AttributionSettings.Reportin" - + "gAttributionModelB\004\342A\001\002\022\207\001\n$ads_web_conv" - + "ersion_data_export_scope\030\005 \001(\0162S.google." + + "indowB\004\342A\001\002\022K\n\023postback_window_two\030\003 \001(\013" + + "2..google.analytics.admin.v1alpha.Postba" + + "ckWindow\022M\n\025postback_window_three\030\004 \001(\0132" + + "..google.analytics.admin.v1alpha.Postbac" + + "kWindow\022\037\n\027apply_conversion_values\030\005 \001(\010" + + ":\274\001\352A\270\001\n>analyticsadmin.googleapis.com/S" + + "KAdNetworkConversionValueSchema\022vpropert" + + "ies/{property}/dataStreams/{data_stream}" + + "/sKAdNetworkConversionValueSchema/{skadn" + + "etwork_conversion_value_schema}\"\207\001\n\016Post" + + "backWindow\022K\n\021conversion_values\030\001 \003(\01320." + + "google.analytics.admin.v1alpha.Conversio" + + "nValues\022(\n postback_window_settings_enab" + + "led\030\002 \001(\010\"\365\001\n\020ConversionValues\022\024\n\014displa" + + "y_name\030\001 \001(\t\022\027\n\nfine_value\030\002 \001(\005H\000\210\001\001\022G\n" + + "\014coarse_value\030\003 \001(\0162+.google.analytics.a" + + "dmin.v1alpha.CoarseValueB\004\342A\001\002\022D\n\016event_" + + "mappings\030\004 \003(\0132,.google.analytics.admin." + + "v1alpha.EventMapping\022\024\n\014lock_enabled\030\005 \001" + + "(\010B\r\n\013_fine_value\"\360\001\n\014EventMapping\022\030\n\nev" + + "ent_name\030\001 \001(\tB\004\342A\001\002\022\034\n\017min_event_count\030" + + "\002 \001(\003H\000\210\001\001\022\034\n\017max_event_count\030\003 \001(\003H\001\210\001\001" + + "\022\034\n\017min_event_value\030\004 \001(\001H\002\210\001\001\022\034\n\017max_ev" + + "ent_value\030\005 \001(\001H\003\210\001\001B\022\n\020_min_event_count" + + "B\022\n\020_max_event_countB\022\n\020_min_event_value" + + "B\022\n\020_max_event_value\"\212\002\n\022ChangeHistoryEv" + + "ent\022\n\n\002id\030\001 \001(\t\022/\n\013change_time\030\002 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022=\n\nactor_type\030\003" + + " \001(\0162).google.analytics.admin.v1alpha.Ac" + + "torType\022\030\n\020user_actor_email\030\004 \001(\t\022\030\n\020cha" + + "nges_filtered\030\005 \001(\010\022D\n\007changes\030\006 \003(\01323.g" + + "oogle.analytics.admin.v1alpha.ChangeHist" + + "oryChange\"\220\022\n\023ChangeHistoryChange\022\020\n\010res" + + "ource\030\001 \001(\t\022:\n\006action\030\002 \001(\0162*.google.ana" + + "lytics.admin.v1alpha.ActionType\022i\n\026resou" + + "rce_before_change\030\003 \001(\0132I.google.analyti" + + "cs.admin.v1alpha.ChangeHistoryChange.Cha" + + "ngeHistoryResource\022h\n\025resource_after_cha" + + "nge\030\004 \001(\0132I.google.analytics.admin.v1alp" + + "ha.ChangeHistoryChange.ChangeHistoryReso" + + "urce\032\325\017\n\025ChangeHistoryResource\022:\n\007accoun" + + "t\030\001 \001(\0132\'.google.analytics.admin.v1alpha" + + ".AccountH\000\022<\n\010property\030\002 \001(\0132(.google.an" + + "alytics.admin.v1alpha.PropertyH\000\022E\n\rfire" + + "base_link\030\006 \001(\0132,.google.analytics.admin" + + ".v1alpha.FirebaseLinkH\000\022H\n\017google_ads_li" + + "nk\030\007 \001(\0132-.google.analytics.admin.v1alph" + + "a.GoogleAdsLinkH\000\022X\n\027google_signals_sett" + + "ings\030\010 \001(\01325.google.analytics.admin.v1al" + + "pha.GoogleSignalsSettingsH\000\022j\n!display_v" + + "ideo_360_advertiser_link\030\t \001(\0132=.google." + + "analytics.admin.v1alpha.DisplayVideo360A" + + "dvertiserLinkH\000\022{\n*display_video_360_adv" + + "ertiser_link_proposal\030\n \001(\0132E.google.ana" + + "lytics.admin.v1alpha.DisplayVideo360Adve" + + "rtiserLinkProposalH\000\022K\n\020conversion_event" + + "\030\013 \001(\0132/.google.analytics.admin.v1alpha." + + "ConversionEventH\000\022`\n\033measurement_protoco" + + "l_secret\030\014 \001(\01329.google.analytics.admin." + + "v1alpha.MeasurementProtocolSecretH\000\022K\n\020c" + + "ustom_dimension\030\r \001(\0132/.google.analytics" + + ".admin.v1alpha.CustomDimensionH\000\022E\n\rcust" + + "om_metric\030\016 \001(\0132,.google.analytics.admin" + + ".v1alpha.CustomMetricH\000\022X\n\027data_retentio" + + "n_settings\030\017 \001(\01325.google.analytics.admi" + + "n.v1alpha.DataRetentionSettingsH\000\022O\n\023sea" + + "rch_ads_360_link\030\020 \001(\01320.google.analytic" + + "s.admin.v1alpha.SearchAds360LinkH\000\022A\n\013da" + + "ta_stream\030\022 \001(\0132*.google.analytics.admin" + + ".v1alpha.DataStreamH\000\022S\n\024attribution_set" + + "tings\030\024 \001(\01323.google.analytics.admin.v1a" + + "lpha.AttributionSettingsH\000\022L\n\021expanded_d" + + "ata_set\030\025 \001(\0132/.google.analytics.admin.v" + + "1alpha.ExpandedDataSetH\000\022E\n\rchannel_grou" + + "p\030\026 \001(\0132,.google.analytics.admin.v1alpha" + + ".ChannelGroupH\000\022E\n\rbigquery_link\030\027 \001(\0132," + + ".google.analytics.admin.v1alpha.BigQuery" + + "LinkH\000\022d\n\035enhanced_measurement_settings\030" + + "\030 \001(\0132;.google.analytics.admin.v1alpha.E" + + "nhancedMeasurementSettingsH\000\022X\n\027data_red" + + "action_settings\030\031 \001(\01325.google.analytics" + + ".admin.v1alpha.DataRedactionSettingsH\000\022o" + + "\n#skadnetwork_conversion_value_schema\030\032 " + + "\001(\0132@.google.analytics.admin.v1alpha.SKA" + + "dNetworkConversionValueSchemaH\000\022C\n\014adsen" + + "se_link\030\033 \001(\0132+.google.analytics.admin.v" + + "1alpha.AdSenseLinkH\000\022<\n\010audience\030\034 \001(\0132(" + + ".google.analytics.admin.v1alpha.Audience" + + "H\000\022L\n\021event_create_rule\030\035 \001(\0132/.google.a" + + "nalytics.admin.v1alpha.EventCreateRuleH\000" + + "B\n\n\010resource\"\344\003\n\035DisplayVideo360Advertis" + + "erLink\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\033\n\radvertiser" + + "_id\030\002 \001(\tB\004\342A\001\005\022%\n\027advertiser_display_na" + + "me\030\003 \001(\tB\004\342A\001\003\022?\n\033ads_personalization_en" + + "abled\030\004 \001(\0132\032.google.protobuf.BoolValue\022" + + "G\n\035campaign_data_sharing_enabled\030\005 \001(\0132\032" + + ".google.protobuf.BoolValueB\004\342A\001\005\022C\n\031cost" + + "_data_sharing_enabled\030\006 \001(\0132\032.google.pro" + + "tobuf.BoolValueB\004\342A\001\005:\233\001\352A\227\001\n;analyticsa" + + "dmin.googleapis.com/DisplayVideo360Adver" + + "tiserLink\022Xproperties/{property}/display" + + "Video360AdvertiserLinks/{display_video_3" + + "60_advertiser_link}\"\222\005\n%DisplayVideo360A" + + "dvertiserLinkProposal\022\022\n\004name\030\001 \001(\tB\004\342A\001" + + "\003\022\033\n\radvertiser_id\030\002 \001(\tB\004\342A\001\005\022e\n\034link_p" + + "roposal_status_details\030\003 \001(\01329.google.an" + + "alytics.admin.v1alpha.LinkProposalStatus" + + "DetailsB\004\342A\001\003\022%\n\027advertiser_display_name" + + "\030\004 \001(\tB\004\342A\001\003\022\036\n\020validation_email\030\005 \001(\tB\004" + + "\342A\001\004\022E\n\033ads_personalization_enabled\030\006 \001(" + + "\0132\032.google.protobuf.BoolValueB\004\342A\001\005\022G\n\035c" + + "ampaign_data_sharing_enabled\030\007 \001(\0132\032.goo" + + "gle.protobuf.BoolValueB\004\342A\001\005\022C\n\031cost_dat" + + "a_sharing_enabled\030\010 \001(\0132\032.google.protobu" + + "f.BoolValueB\004\342A\001\005:\264\001\352A\260\001\nCanalyticsadmin" + + ".googleapis.com/DisplayVideo360Advertise" + + "rLinkProposal\022iproperties/{property}/dis" + + "playVideo360AdvertiserLinkProposals/{dis" + + "play_video_360_advertiser_link_proposal}" + + "\"\355\003\n\020SearchAds360Link\022\022\n\004name\030\001 \001(\tB\004\342A\001" + + "\003\022\033\n\radvertiser_id\030\002 \001(\tB\004\342A\001\005\022G\n\035campai" + + "gn_data_sharing_enabled\030\003 \001(\0132\032.google.p" + + "rotobuf.BoolValueB\004\342A\001\005\022C\n\031cost_data_sha" + + "ring_enabled\030\004 \001(\0132\032.google.protobuf.Boo" + + "lValueB\004\342A\001\005\022%\n\027advertiser_display_name\030" + + "\005 \001(\tB\004\342A\001\003\022?\n\033ads_personalization_enabl" + + "ed\030\006 \001(\0132\032.google.protobuf.BoolValue\022>\n\032" + + "site_stats_sharing_enabled\030\007 \001(\0132\032.googl" + + "e.protobuf.BoolValue:r\352Ao\n.analyticsadmi" + + "n.googleapis.com/SearchAds360Link\022=prope" + + "rties/{property}/searchAds360Links/{sear" + + "ch_ads_360_link}\"\377\001\n\031LinkProposalStatusD" + + "etails\022m\n link_proposal_initiating_produ" + + "ct\030\001 \001(\0162=.google.analytics.admin.v1alph" + + "a.LinkProposalInitiatingProductB\004\342A\001\003\022\035\n" + + "\017requestor_email\030\002 \001(\tB\004\342A\001\003\022T\n\023link_pro" + + "posal_state\030\003 \001(\01621.google.analytics.adm" + + "in.v1alpha.LinkProposalStateB\004\342A\001\003\"\357\003\n\017C" + + "onversionEvent\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\030\n\nev" + + "ent_name\030\002 \001(\tB\004\342A\001\005\0225\n\013create_time\030\003 \001(" + + "\0132\032.google.protobuf.TimestampB\004\342A\001\003\022\027\n\td" + + "eletable\030\004 \001(\010B\004\342A\001\003\022\024\n\006custom\030\005 \001(\010B\004\342A" + + "\001\003\022g\n\017counting_method\030\006 \001(\0162H.google.ana" + + "lytics.admin.v1alpha.ConversionEvent.Con" + + "versionCountingMethodB\004\342A\001\001\"p\n\030Conversio" + + "nCountingMethod\022*\n&CONVERSION_COUNTING_M" + + "ETHOD_UNSPECIFIED\020\000\022\022\n\016ONCE_PER_EVENT\020\001\022" + + "\024\n\020ONCE_PER_SESSION\020\002:m\352Aj\n-analyticsadm" + + "in.googleapis.com/ConversionEvent\0229prope" + + "rties/{property}/conversionEvents/{conve" + + "rsion_event}\"\242\002\n\025GoogleSignalsSettings\022\022" + + "\n\004name\030\001 \001(\tB\004\342A\001\003\022A\n\005state\030\003 \001(\01622.goog" + + "le.analytics.admin.v1alpha.GoogleSignals" + + "State\022K\n\007consent\030\004 \001(\01624.google.analytic" + + "s.admin.v1alpha.GoogleSignalsConsentB\004\342A" + + "\001\003:e\352Ab\n3analyticsadmin.googleapis.com/G" + + "oogleSignalsSettings\022+properties/{proper" + + "ty}/googleSignalsSettings\"\276\003\n\017CustomDime" + + "nsion\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\035\n\016parameter_n" + + "ame\030\002 \001(\tB\005\342A\002\002\005\022\032\n\014display_name\030\003 \001(\tB\004" + + "\342A\001\002\022\031\n\013description\030\004 \001(\tB\004\342A\001\001\022T\n\005scope" + + "\030\005 \001(\0162>.google.analytics.admin.v1alpha." + + "CustomDimension.DimensionScopeB\005\342A\002\002\005\022*\n" + + "\034disallow_ads_personalization\030\006 \001(\010B\004\342A\001" + + "\001\"P\n\016DimensionScope\022\037\n\033DIMENSION_SCOPE_U" + + "NSPECIFIED\020\000\022\t\n\005EVENT\020\001\022\010\n\004USER\020\002\022\010\n\004ITE" + + "M\020\003:m\352Aj\n-analyticsadmin.googleapis.com/" + + "CustomDimension\0229properties/{property}/c" + + "ustomDimensions/{custom_dimension}\"\310\006\n\014C" + + "ustomMetric\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\035\n\016param" + + "eter_name\030\002 \001(\tB\005\342A\002\002\005\022\032\n\014display_name\030\003" + + " \001(\tB\004\342A\001\002\022\031\n\013description\030\004 \001(\tB\004\342A\001\001\022\\\n" + + "\020measurement_unit\030\005 \001(\0162<.google.analyti" + + "cs.admin.v1alpha.CustomMetric.Measuremen" + + "tUnitB\004\342A\001\002\022N\n\005scope\030\006 \001(\01628.google.anal" + + "ytics.admin.v1alpha.CustomMetric.MetricS" + + "copeB\005\342A\002\002\005\022g\n\026restricted_metric_type\030\010 " + + "\003(\0162A.google.analytics.admin.v1alpha.Cus" + + "tomMetric.RestrictedMetricTypeB\004\342A\001\001\"\267\001\n" + + "\017MeasurementUnit\022 \n\034MEASUREMENT_UNIT_UNS" + + "PECIFIED\020\000\022\014\n\010STANDARD\020\001\022\014\n\010CURRENCY\020\002\022\010" + + "\n\004FEET\020\003\022\n\n\006METERS\020\004\022\016\n\nKILOMETERS\020\005\022\t\n\005" + + "MILES\020\006\022\020\n\014MILLISECONDS\020\007\022\013\n\007SECONDS\020\010\022\013" + + "\n\007MINUTES\020\t\022\t\n\005HOURS\020\n\"6\n\013MetricScope\022\034\n" + + "\030METRIC_SCOPE_UNSPECIFIED\020\000\022\t\n\005EVENT\020\001\"_" + + "\n\024RestrictedMetricType\022&\n\"RESTRICTED_MET" + + "RIC_TYPE_UNSPECIFIED\020\000\022\r\n\tCOST_DATA\020\001\022\020\n" + + "\014REVENUE_DATA\020\002:d\352Aa\n*analyticsadmin.goo" + + "gleapis.com/CustomMetric\0223properties/{pr" + + "operty}/customMetrics/{custom_metric}\"\303\003" + + "\n\025DataRetentionSettings\022\022\n\004name\030\001 \001(\tB\004\342" + + "A\001\003\022e\n\024event_data_retention\030\002 \001(\0162G.goog" + + "le.analytics.admin.v1alpha.DataRetention" + + "Settings.RetentionDuration\022\'\n\037reset_user" + + "_data_on_new_activity\030\003 \001(\010\"\236\001\n\021Retentio" + + "nDuration\022\"\n\036RETENTION_DURATION_UNSPECIF" + + "IED\020\000\022\016\n\nTWO_MONTHS\020\001\022\023\n\017FOURTEEN_MONTHS" + + "\020\003\022\025\n\021TWENTY_SIX_MONTHS\020\004\022\027\n\023THIRTY_EIGH" + + "T_MONTHS\020\005\022\020\n\014FIFTY_MONTHS\020\006:e\352Ab\n3analy" + + "ticsadmin.googleapis.com/DataRetentionSe" + + "ttings\022+properties/{property}/dataRetent" + + "ionSettings\"\252\r\n\023AttributionSettings\022\022\n\004n" + + "ame\030\001 \001(\tB\004\342A\001\003\022\230\001\n,acquisition_conversi" + + "on_event_lookback_window\030\002 \001(\0162\\.google." + "analytics.admin.v1alpha.AttributionSetti" - + "ngs.AdsWebConversionDataExportScopeB\004\342A\001" - + "\002\"\333\001\n(AcquisitionConversionEventLookback" - + "Window\022<\n8ACQUISITION_CONVERSION_EVENT_L" - + "OOKBACK_WINDOW_UNSPECIFIED\020\000\0227\n3ACQUISIT" - + "ION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_D" - + "AYS\020\001\0228\n4ACQUISITION_CONVERSION_EVENT_LO" - + "OKBACK_WINDOW_30_DAYS\020\002\"\370\001\n\"OtherConvers" - + "ionEventLookbackWindow\0226\n2OTHER_CONVERSI" - + "ON_EVENT_LOOKBACK_WINDOW_UNSPECIFIED\020\000\0222" - + "\n.OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW" - + "_30_DAYS\020\001\0222\n.OTHER_CONVERSION_EVENT_LOO" - + "KBACK_WINDOW_60_DAYS\020\002\0222\n.OTHER_CONVERSI" - + "ON_EVENT_LOOKBACK_WINDOW_90_DAYS\020\003\"\353\002\n\031R" - + "eportingAttributionModel\022+\n\'REPORTING_AT" - + "TRIBUTION_MODEL_UNSPECIFIED\020\000\022)\n%PAID_AN" - + "D_ORGANIC_CHANNELS_DATA_DRIVEN\020\001\022(\n$PAID" - + "_AND_ORGANIC_CHANNELS_LAST_CLICK\020\002\022)\n%PA" - + "ID_AND_ORGANIC_CHANNELS_FIRST_CLICK\020\003\022$\n" - + " PAID_AND_ORGANIC_CHANNELS_LINEAR\020\004\022,\n(P" - + "AID_AND_ORGANIC_CHANNELS_POSITION_BASED\020" - + "\005\022(\n$PAID_AND_ORGANIC_CHANNELS_TIME_DECA" - + "Y\020\006\022#\n\037GOOGLE_PAID_CHANNELS_LAST_CLICK\020\007" - + "\"\246\001\n\037AdsWebConversionDataExportScope\0224\n0" - + "ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNS" - + "PECIFIED\020\000\022\024\n\020NOT_SELECTED_YET\020\001\022\035\n\031PAID" - + "_AND_ORGANIC_CHANNELS\020\002\022\030\n\024GOOGLE_PAID_C" - + "HANNELS\020\003:a\352A^\n1analyticsadmin.googleapi" - + "s.com/AttributionSettings\022)properties/{p" - + "roperty}/attributionSettings\"\362\001\n\rAccessB" - + "inding\022\016\n\004user\030\002 \001(\tH\000\022\022\n\004name\030\001 \001(\tB\004\342A" - + "\001\003\022\r\n\005roles\030\003 \003(\t:\234\001\352A\230\001\n+analyticsadmin" - + ".googleapis.com/AccessBinding\0222accounts/" - + "{account}/accessBindings/{access_binding" - + "}\0225properties/{property}/accessBindings/" - + "{access_binding}B\017\n\raccess_target\"\213\003\n\014Bi" - + "gQueryLink\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\025\n\007projec" - + "t\030\002 \001(\tB\004\342A\001\005\0225\n\013create_time\030\003 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\004\342A\001\003\022\034\n\024daily_ex" - + "port_enabled\030\004 \001(\010\022 \n\030streaming_export_e" - + "nabled\030\005 \001(\010\022\"\n\032fresh_daily_export_enabl" - + "ed\030\t \001(\010\022\036\n\026include_advertising_id\030\006 \001(\010" - + "\022\026\n\016export_streams\030\007 \003(\t\022\027\n\017excluded_eve" - + "nts\030\010 \003(\t:d\352Aa\n*analyticsadmin.googleapi" - + "s.com/BigQueryLink\0223properties/{property" - + "}/bigQueryLinks/{bigquery_link}\"\365\003\n\033Enha" - + "ncedMeasurementSettings\022\022\n\004name\030\001 \001(\tB\004\342" - + "A\001\003\022\026\n\016stream_enabled\030\002 \001(\010\022\027\n\017scrolls_e" - + "nabled\030\003 \001(\010\022\037\n\027outbound_clicks_enabled\030" - + "\004 \001(\010\022\033\n\023site_search_enabled\030\005 \001(\010\022 \n\030vi" - + "deo_engagement_enabled\030\006 \001(\010\022\036\n\026file_dow" - + "nloads_enabled\030\007 \001(\010\022\034\n\024page_changes_ena" - + "bled\030\010 \001(\010\022!\n\031form_interactions_enabled\030" - + "\t \001(\010\022$\n\026search_query_parameter\030\n \001(\tB\004\342" - + "A\001\002\022\033\n\023uri_query_parameter\030\013 \001(\t:\214\001\352A\210\001\n" - + "9analyticsadmin.googleapis.com/EnhancedM" - + "easurementSettings\022Kproperties/{property" - + "}/dataStreams/{data_stream}/enhancedMeas" - + "urementSettings\"D\n\020ConnectedSiteTag\022\032\n\014d" - + "isplay_name\030\001 \001(\tB\004\342A\001\002\022\024\n\006tag_id\030\002 \001(\tB" - + "\004\342A\001\002\"\242\001\n\013AdSenseLink\022\022\n\004name\030\001 \001(\tB\004\342A\001" - + "\003\022\034\n\016ad_client_code\030\002 \001(\tB\004\342A\001\005:a\352A^\n)an" - + "alyticsadmin.googleapis.com/AdSenseLink\022" - + "1properties/{property}/adSenseLinks/{ads" - + "ense_link}*\252\004\n\020IndustryCategory\022!\n\035INDUS" - + "TRY_CATEGORY_UNSPECIFIED\020\000\022\016\n\nAUTOMOTIVE" - + "\020\001\022#\n\037BUSINESS_AND_INDUSTRIAL_MARKETS\020\002\022" - + "\013\n\007FINANCE\020\003\022\016\n\nHEALTHCARE\020\004\022\016\n\nTECHNOLO", - "GY\020\005\022\n\n\006TRAVEL\020\006\022\t\n\005OTHER\020\007\022\032\n\026ARTS_AND_" - + "ENTERTAINMENT\020\010\022\026\n\022BEAUTY_AND_FITNESS\020\t\022" - + "\030\n\024BOOKS_AND_LITERATURE\020\n\022\022\n\016FOOD_AND_DR" - + "INK\020\013\022\t\n\005GAMES\020\014\022\027\n\023HOBBIES_AND_LEISURE\020" - + "\r\022\023\n\017HOME_AND_GARDEN\020\016\022\030\n\024INTERNET_AND_T" - + "ELECOM\020\017\022\026\n\022LAW_AND_GOVERNMENT\020\020\022\010\n\004NEWS" - + "\020\021\022\026\n\022ONLINE_COMMUNITIES\020\022\022\026\n\022PEOPLE_AND" - + "_SOCIETY\020\023\022\024\n\020PETS_AND_ANIMALS\020\024\022\017\n\013REAL" - + "_ESTATE\020\025\022\r\n\tREFERENCE\020\026\022\013\n\007SCIENCE\020\027\022\n\n" - + "\006SPORTS\020\030\022\026\n\022JOBS_AND_EDUCATION\020\031\022\014\n\010SHO" - + "PPING\020\032*f\n\014ServiceLevel\022\035\n\031SERVICE_LEVEL" - + "_UNSPECIFIED\020\000\022\035\n\031GOOGLE_ANALYTICS_STAND" - + "ARD\020\001\022\030\n\024GOOGLE_ANALYTICS_360\020\002*J\n\tActor" - + "Type\022\032\n\026ACTOR_TYPE_UNSPECIFIED\020\000\022\010\n\004USER" - + "\020\001\022\n\n\006SYSTEM\020\002\022\013\n\007SUPPORT\020\003*P\n\nActionTyp" - + "e\022\033\n\027ACTION_TYPE_UNSPECIFIED\020\000\022\013\n\007CREATE" - + "D\020\001\022\013\n\007UPDATED\020\002\022\013\n\007DELETED\020\003*\356\004\n\031Change" - + "HistoryResourceType\022,\n(CHANGE_HISTORY_RE" - + "SOURCE_TYPE_UNSPECIFIED\020\000\022\013\n\007ACCOUNT\020\001\022\014" - + "\n\010PROPERTY\020\002\022\021\n\rFIREBASE_LINK\020\006\022\023\n\017GOOGL" - + "E_ADS_LINK\020\007\022\033\n\027GOOGLE_SIGNALS_SETTINGS\020" - + "\010\022\024\n\020CONVERSION_EVENT\020\t\022\037\n\033MEASUREMENT_P" - + "ROTOCOL_SECRET\020\n\022\024\n\020CUSTOM_DIMENSION\020\013\022\021" - + "\n\rCUSTOM_METRIC\020\014\022\033\n\027DATA_RETENTION_SETT" - + "INGS\020\r\022%\n!DISPLAY_VIDEO_360_ADVERTISER_L" - + "INK\020\016\022.\n*DISPLAY_VIDEO_360_ADVERTISER_LI" - + "NK_PROPOSAL\020\017\022\027\n\023SEARCH_ADS_360_LINK\020\020\022\017" - + "\n\013DATA_STREAM\020\022\022\030\n\024ATTRIBUTION_SETTINGS\020" - + "\024\022\025\n\021EXPANDED_DATA_SET\020\025\022\021\n\rCHANNEL_GROU" - + "P\020\026\022!\n\035ENHANCED_MEASUREMENT_SETTINGS\020\030\022\'" - + "\n#SKADNETWORK_CONVERSION_VALUE_SCHEMA\020\032\022" - + "\020\n\014ADSENSE_LINK\020\033\022\014\n\010AUDIENCE\020\034\022\025\n\021EVENT" - + "_CREATE_RULE\020\035*s\n\022GoogleSignalsState\022$\n " - + "GOOGLE_SIGNALS_STATE_UNSPECIFIED\020\000\022\032\n\026GO" - + "OGLE_SIGNALS_ENABLED\020\001\022\033\n\027GOOGLE_SIGNALS" - + "_DISABLED\020\002*\216\001\n\024GoogleSignalsConsent\022&\n\"" - + "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED\020\000\022$\n " - + "GOOGLE_SIGNALS_CONSENT_CONSENTED\020\002\022(\n$GO" - + "OGLE_SIGNALS_CONSENT_NOT_CONSENTED\020\001*{\n\035" - + "LinkProposalInitiatingProduct\0220\n,LINK_PR" - + "OPOSAL_INITIATING_PRODUCT_UNSPECIFIED\020\000\022" - + "\024\n\020GOOGLE_ANALYTICS\020\001\022\022\n\016LINKED_PRODUCT\020" - + "\002*\304\001\n\021LinkProposalState\022#\n\037LINK_PROPOSAL" - + "_STATE_UNSPECIFIED\020\000\022)\n%AWAITING_REVIEW_" - + "FROM_GOOGLE_ANALYTICS\020\001\022\'\n#AWAITING_REVI" - + "EW_FROM_LINKED_PRODUCT\020\002\022\r\n\tWITHDRAWN\020\003\022" - + "\014\n\010DECLINED\020\004\022\013\n\007EXPIRED\020\005\022\014\n\010OBSOLETE\020\006" - + "*\202\001\n\014PropertyType\022\035\n\031PROPERTY_TYPE_UNSPE" - + "CIFIED\020\000\022\032\n\026PROPERTY_TYPE_ORDINARY\020\001\022\035\n\031" - + "PROPERTY_TYPE_SUBPROPERTY\020\002\022\030\n\024PROPERTY_" - + "TYPE_ROLLUP\020\003*q\n\013CoarseValue\022\034\n\030COARSE_V" - + "ALUE_UNSPECIFIED\020\000\022\024\n\020COARSE_VALUE_LOW\020\001" - + "\022\027\n\023COARSE_VALUE_MEDIUM\020\002\022\025\n\021COARSE_VALU" - + "E_HIGH\020\003Bv\n\"com.google.analytics.admin.v" - + "1alphaB\016ResourcesProtoP\001Z>cloud.google.c" - + "om/go/analytics/admin/apiv1alpha/adminpb" - + ";adminpbb\006proto3" + + "ngs.AcquisitionConversionEventLookbackWi" + + "ndowB\004\342A\001\002\022\214\001\n&other_conversion_event_lo" + + "okback_window\030\003 \001(\0162V.google.analytics.a" + + "dmin.v1alpha.AttributionSettings.OtherCo" + + "nversionEventLookbackWindowB\004\342A\001\002\022x\n\033rep" + + "orting_attribution_model\030\004 \001(\0162M.google." + + "analytics.admin.v1alpha.AttributionSetti" + + "ngs.ReportingAttributionModelB\004\342A\001\002\022\207\001\n$" + + "ads_web_conversion_data_export_scope\030\005 \001" + + "(\0162S.google.analytics.admin.v1alpha.Attr" + + "ibutionSettings.AdsWebConversionDataExpo" + + "rtScopeB\004\342A\001\002\"\333\001\n(AcquisitionConversionE" + + "ventLookbackWindow\022<\n8ACQUISITION_CONVER" + + "SION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED\020\000" + + "\0227\n3ACQUISITION_CONVERSION_EVENT_LOOKBAC" + + "K_WINDOW_7_DAYS\020\001\0228\n4ACQUISITION_CONVERS" + + "ION_EVENT_LOOKBACK_WINDOW_30_DAYS\020\002\"\370\001\n\"" + + "OtherConversionEventLookbackWindow\0226\n2OT" + + "HER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNS" + + "PECIFIED\020\000\0222\n.OTHER_CONVERSION_EVENT_LOO" + + "KBACK_WINDOW_30_DAYS\020\001\0222\n.OTHER_CONVERSI" + + "ON_EVENT_LOOKBACK_WINDOW_60_DAYS\020\002\0222\n.OT" + + "HER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_" + + "DAYS\020\003\"\353\002\n\031ReportingAttributionModel\022+\n\'" + + "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED\020" + + "\000\022)\n%PAID_AND_ORGANIC_CHANNELS_DATA_DRIV" + + "EN\020\001\022(\n$PAID_AND_ORGANIC_CHANNELS_LAST_C" + + "LICK\020\002\022)\n%PAID_AND_ORGANIC_CHANNELS_FIRS" + + "T_CLICK\020\003\022$\n PAID_AND_ORGANIC_CHANNELS_L" + + "INEAR\020\004\022,\n(PAID_AND_ORGANIC_CHANNELS_POS" + + "ITION_BASED\020\005\022(\n$PAID_AND_ORGANIC_CHANNE" + + "LS_TIME_DECAY\020\006\022#\n\037GOOGLE_PAID_CHANNELS_" + + "LAST_CLICK\020\007\"\246\001\n\037AdsWebConversionDataExp" + + "ortScope\0224\n0ADS_WEB_CONVERSION_DATA_EXPO" + + "RT_SCOPE_UNSPECIFIED\020\000\022\024\n\020NOT_SELECTED_Y" + + "ET\020\001\022\035\n\031PAID_AND_ORGANIC_CHANNELS\020\002\022\030\n\024G" + + "OOGLE_PAID_CHANNELS\020\003:a\352A^\n1analyticsadm" + + "in.googleapis.com/AttributionSettings\022)p" + + "roperties/{property}/attributionSettings" + + "\"\362\001\n\rAccessBinding\022\016\n\004user\030\002 \001(\tH\000\022\022\n\004na" + + "me\030\001 \001(\tB\004\342A\001\003\022\r\n\005roles\030\003 \003(\t:\234\001\352A\230\001\n+an" + + "alyticsadmin.googleapis.com/AccessBindin" + + "g\0222accounts/{account}/accessBindings/{ac" + + "cess_binding}\0225properties/{property}/acc" + + "essBindings/{access_binding}B\017\n\raccess_t" + + "arget\"\213\003\n\014BigQueryLink\022\022\n\004name\030\001 \001(\tB\004\342A" + + "\001\003\022\025\n\007project\030\002 \001(\tB\004\342A\001\005\0225\n\013create_time" + + "\030\003 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" + + "\022\034\n\024daily_export_enabled\030\004 \001(\010\022 \n\030stream" + + "ing_export_enabled\030\005 \001(\010\022\"\n\032fresh_daily_" + + "export_enabled\030\t \001(\010\022\036\n\026include_advertis" + + "ing_id\030\006 \001(\010\022\026\n\016export_streams\030\007 \003(\t\022\027\n\017" + + "excluded_events\030\010 \003(\t:d\352Aa\n*analyticsadm" + + "in.googleapis.com/BigQueryLink\0223properti" + + "es/{property}/bigQueryLinks/{bigquery_li" + + "nk}\"\365\003\n\033EnhancedMeasurementSettings\022\022\n\004n" + + "ame\030\001 \001(\tB\004\342A\001\003\022\026\n\016stream_enabled\030\002 \001(\010\022" + + "\027\n\017scrolls_enabled\030\003 \001(\010\022\037\n\027outbound_cli" + + "cks_enabled\030\004 \001(\010\022\033\n\023site_search_enabled" + + "\030\005 \001(\010\022 \n\030video_engagement_enabled\030\006 \001(\010" + + "\022\036\n\026file_downloads_enabled\030\007 \001(\010\022\034\n\024page" + + "_changes_enabled\030\010 \001(\010\022!\n\031form_interacti" + + "ons_enabled\030\t \001(\010\022$\n\026search_query_parame" + + "ter\030\n \001(\tB\004\342A\001\002\022\033\n\023uri_query_parameter\030\013" + + " \001(\t:\214\001\352A\210\001\n9analyticsadmin.googleapis.c" + + "om/EnhancedMeasurementSettings\022Kproperti" + + "es/{property}/dataStreams/{data_stream}/" + + "enhancedMeasurementSettings\"D\n\020Connected" + + "SiteTag\022\032\n\014display_name\030\001 \001(\tB\004\342A\001\002\022\024\n\006t" + + "ag_id\030\002 \001(\tB\004\342A\001\002\"\226\002\n\025DataRedactionSetti" + + "ngs\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\037\n\027email_redacti" + + "on_enabled\030\002 \001(\010\022)\n!query_parameter_reda" + + "ction_enabled\030\003 \001(\010\022\034\n\024query_parameter_k" + + "eys\030\004 \003(\t:\177\352A|\n3analyticsadmin.googleapi" + + "s.com/DataRedactionSettings\022Eproperties/" + + "{property}/dataStreams/{data_stream}/dat" + + "aRedactionSettings\"\242\001\n\013AdSenseLink\022\022\n\004na" + + "me\030\001 \001(\tB\004\342A\001\003\022\034\n\016ad_client_code\030\002 \001(\tB\004" + + "\342A\001\005:a\352A^\n)analyticsadmin.googleapis.com" + + "/AdSenseLink\0221properties/{property}/adSe" + + "nseLinks/{adsense_link}\"\220\002\n\030RollupProper" + + "tySourceLink\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\035\n\017sour" + + "ce_property\030\002 \001(\tB\004\342A\001\005:\300\001\352A\274\001\n6analytic", + "sadmin.googleapis.com/RollupPropertySour" + + "ceLink\022Mproperties/{property}/rollupProp" + + "ertySourceLinks/{rollup_property_source_" + + "link}*\031rollupPropertySourceLinks2\030rollup" + + "PropertySourceLink*\252\004\n\020IndustryCategory\022" + + "!\n\035INDUSTRY_CATEGORY_UNSPECIFIED\020\000\022\016\n\nAU" + + "TOMOTIVE\020\001\022#\n\037BUSINESS_AND_INDUSTRIAL_MA" + + "RKETS\020\002\022\013\n\007FINANCE\020\003\022\016\n\nHEALTHCARE\020\004\022\016\n\n" + + "TECHNOLOGY\020\005\022\n\n\006TRAVEL\020\006\022\t\n\005OTHER\020\007\022\032\n\026A" + + "RTS_AND_ENTERTAINMENT\020\010\022\026\n\022BEAUTY_AND_FI" + + "TNESS\020\t\022\030\n\024BOOKS_AND_LITERATURE\020\n\022\022\n\016FOO" + + "D_AND_DRINK\020\013\022\t\n\005GAMES\020\014\022\027\n\023HOBBIES_AND_" + + "LEISURE\020\r\022\023\n\017HOME_AND_GARDEN\020\016\022\030\n\024INTERN" + + "ET_AND_TELECOM\020\017\022\026\n\022LAW_AND_GOVERNMENT\020\020" + + "\022\010\n\004NEWS\020\021\022\026\n\022ONLINE_COMMUNITIES\020\022\022\026\n\022PE" + + "OPLE_AND_SOCIETY\020\023\022\024\n\020PETS_AND_ANIMALS\020\024" + + "\022\017\n\013REAL_ESTATE\020\025\022\r\n\tREFERENCE\020\026\022\013\n\007SCIE" + + "NCE\020\027\022\n\n\006SPORTS\020\030\022\026\n\022JOBS_AND_EDUCATION\020" + + "\031\022\014\n\010SHOPPING\020\032*f\n\014ServiceLevel\022\035\n\031SERVI" + + "CE_LEVEL_UNSPECIFIED\020\000\022\035\n\031GOOGLE_ANALYTI" + + "CS_STANDARD\020\001\022\030\n\024GOOGLE_ANALYTICS_360\020\002*" + + "J\n\tActorType\022\032\n\026ACTOR_TYPE_UNSPECIFIED\020\000" + + "\022\010\n\004USER\020\001\022\n\n\006SYSTEM\020\002\022\013\n\007SUPPORT\020\003*P\n\nA" + + "ctionType\022\033\n\027ACTION_TYPE_UNSPECIFIED\020\000\022\013" + + "\n\007CREATED\020\001\022\013\n\007UPDATED\020\002\022\013\n\007DELETED\020\003*\213\005" + + "\n\031ChangeHistoryResourceType\022,\n(CHANGE_HI" + + "STORY_RESOURCE_TYPE_UNSPECIFIED\020\000\022\013\n\007ACC" + + "OUNT\020\001\022\014\n\010PROPERTY\020\002\022\021\n\rFIREBASE_LINK\020\006\022" + + "\023\n\017GOOGLE_ADS_LINK\020\007\022\033\n\027GOOGLE_SIGNALS_S" + + "ETTINGS\020\010\022\024\n\020CONVERSION_EVENT\020\t\022\037\n\033MEASU" + + "REMENT_PROTOCOL_SECRET\020\n\022\024\n\020CUSTOM_DIMEN" + + "SION\020\013\022\021\n\rCUSTOM_METRIC\020\014\022\033\n\027DATA_RETENT" + + "ION_SETTINGS\020\r\022%\n!DISPLAY_VIDEO_360_ADVE" + + "RTISER_LINK\020\016\022.\n*DISPLAY_VIDEO_360_ADVER" + + "TISER_LINK_PROPOSAL\020\017\022\027\n\023SEARCH_ADS_360_" + + "LINK\020\020\022\017\n\013DATA_STREAM\020\022\022\030\n\024ATTRIBUTION_S" + + "ETTINGS\020\024\022\025\n\021EXPANDED_DATA_SET\020\025\022\021\n\rCHAN" + + "NEL_GROUP\020\026\022!\n\035ENHANCED_MEASUREMENT_SETT" + + "INGS\020\030\022\033\n\027DATA_REDACTION_SETTINGS\020\031\022\'\n#S" + + "KADNETWORK_CONVERSION_VALUE_SCHEMA\020\032\022\020\n\014" + + "ADSENSE_LINK\020\033\022\014\n\010AUDIENCE\020\034\022\025\n\021EVENT_CR" + + "EATE_RULE\020\035*s\n\022GoogleSignalsState\022$\n GOO" + + "GLE_SIGNALS_STATE_UNSPECIFIED\020\000\022\032\n\026GOOGL" + + "E_SIGNALS_ENABLED\020\001\022\033\n\027GOOGLE_SIGNALS_DI" + + "SABLED\020\002*\216\001\n\024GoogleSignalsConsent\022&\n\"GOO" + + "GLE_SIGNALS_CONSENT_UNSPECIFIED\020\000\022$\n GOO" + + "GLE_SIGNALS_CONSENT_CONSENTED\020\002\022(\n$GOOGL" + + "E_SIGNALS_CONSENT_NOT_CONSENTED\020\001*{\n\035Lin" + + "kProposalInitiatingProduct\0220\n,LINK_PROPO" + + "SAL_INITIATING_PRODUCT_UNSPECIFIED\020\000\022\024\n\020" + + "GOOGLE_ANALYTICS\020\001\022\022\n\016LINKED_PRODUCT\020\002*\304" + + "\001\n\021LinkProposalState\022#\n\037LINK_PROPOSAL_ST" + + "ATE_UNSPECIFIED\020\000\022)\n%AWAITING_REVIEW_FRO" + + "M_GOOGLE_ANALYTICS\020\001\022\'\n#AWAITING_REVIEW_" + + "FROM_LINKED_PRODUCT\020\002\022\r\n\tWITHDRAWN\020\003\022\014\n\010" + + "DECLINED\020\004\022\013\n\007EXPIRED\020\005\022\014\n\010OBSOLETE\020\006*\202\001" + + "\n\014PropertyType\022\035\n\031PROPERTY_TYPE_UNSPECIF" + + "IED\020\000\022\032\n\026PROPERTY_TYPE_ORDINARY\020\001\022\035\n\031PRO" + + "PERTY_TYPE_SUBPROPERTY\020\002\022\030\n\024PROPERTY_TYP" + + "E_ROLLUP\020\003*q\n\013CoarseValue\022\034\n\030COARSE_VALU" + + "E_UNSPECIFIED\020\000\022\024\n\020COARSE_VALUE_LOW\020\001\022\027\n" + + "\023COARSE_VALUE_MEDIUM\020\002\022\025\n\021COARSE_VALUE_H" + + "IGH\020\003Bv\n\"com.google.analytics.admin.v1al" + + "phaB\016ResourcesProtoP\001Z>cloud.google.com/" + + "go/analytics/admin/apiv1alpha/adminpb;ad" + + "minpbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -729,24 +738,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "FirebaseAppId", "BundleId", }); - internal_static_google_analytics_admin_v1alpha_UserLink_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_analytics_admin_v1alpha_UserLink_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_UserLink_descriptor, - new java.lang.String[] { - "Name", "EmailAddress", "DirectRoles", - }); - internal_static_google_analytics_admin_v1alpha_AuditUserLink_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_analytics_admin_v1alpha_AuditUserLink_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_admin_v1alpha_AuditUserLink_descriptor, - new java.lang.String[] { - "Name", "EmailAddress", "DirectRoles", "EffectiveRoles", - }); internal_static_google_analytics_admin_v1alpha_FirebaseLink_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(3); internal_static_google_analytics_admin_v1alpha_FirebaseLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_FirebaseLink_descriptor, @@ -754,7 +747,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Project", "CreateTime", }); internal_static_google_analytics_admin_v1alpha_GlobalSiteTag_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(4); internal_static_google_analytics_admin_v1alpha_GlobalSiteTag_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GlobalSiteTag_descriptor, @@ -762,7 +755,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Snippet", }); internal_static_google_analytics_admin_v1alpha_GoogleAdsLink_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(5); internal_static_google_analytics_admin_v1alpha_GoogleAdsLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GoogleAdsLink_descriptor, @@ -776,7 +769,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreatorEmailAddress", }); internal_static_google_analytics_admin_v1alpha_DataSharingSettings_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(6); internal_static_google_analytics_admin_v1alpha_DataSharingSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DataSharingSettings_descriptor, @@ -789,7 +782,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SharingWithOthersEnabled", }); internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(7); internal_static_google_analytics_admin_v1alpha_AccountSummary_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor, @@ -797,7 +790,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Account", "DisplayName", "PropertySummaries", }); internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(8); internal_static_google_analytics_admin_v1alpha_PropertySummary_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor, @@ -805,7 +798,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Property", "DisplayName", "PropertyType", "Parent", }); internal_static_google_analytics_admin_v1alpha_MeasurementProtocolSecret_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(9); internal_static_google_analytics_admin_v1alpha_MeasurementProtocolSecret_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_MeasurementProtocolSecret_descriptor, @@ -813,7 +806,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "DisplayName", "SecretValue", }); internal_static_google_analytics_admin_v1alpha_SKAdNetworkConversionValueSchema_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(10); internal_static_google_analytics_admin_v1alpha_SKAdNetworkConversionValueSchema_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_SKAdNetworkConversionValueSchema_descriptor, @@ -825,7 +818,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApplyConversionValues", }); internal_static_google_analytics_admin_v1alpha_PostbackWindow_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(11); internal_static_google_analytics_admin_v1alpha_PostbackWindow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_PostbackWindow_descriptor, @@ -833,7 +826,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConversionValues", "PostbackWindowSettingsEnabled", }); internal_static_google_analytics_admin_v1alpha_ConversionValues_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(12); internal_static_google_analytics_admin_v1alpha_ConversionValues_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ConversionValues_descriptor, @@ -846,7 +839,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FineValue", }); internal_static_google_analytics_admin_v1alpha_EventMapping_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(13); internal_static_google_analytics_admin_v1alpha_EventMapping_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_EventMapping_descriptor, @@ -862,7 +855,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaxEventValue", }); internal_static_google_analytics_admin_v1alpha_ChangeHistoryEvent_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(14); internal_static_google_analytics_admin_v1alpha_ChangeHistoryEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ChangeHistoryEvent_descriptor, @@ -870,7 +863,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Id", "ChangeTime", "ActorType", "UserActorEmail", "ChangesFiltered", "Changes", }); internal_static_google_analytics_admin_v1alpha_ChangeHistoryChange_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(15); internal_static_google_analytics_admin_v1alpha_ChangeHistoryChange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ChangeHistoryChange_descriptor, @@ -904,6 +897,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ChannelGroup", "BigqueryLink", "EnhancedMeasurementSettings", + "DataRedactionSettings", "SkadnetworkConversionValueSchema", "AdsenseLink", "Audience", @@ -911,7 +905,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Resource", }); internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(16); internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_descriptor, @@ -924,7 +918,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CostDataSharingEnabled", }); internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLinkProposal_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(17); internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLinkProposal_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLinkProposal_descriptor, @@ -939,7 +933,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CostDataSharingEnabled", }); internal_static_google_analytics_admin_v1alpha_SearchAds360Link_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(18); internal_static_google_analytics_admin_v1alpha_SearchAds360Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_SearchAds360Link_descriptor, @@ -953,7 +947,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SiteStatsSharingEnabled", }); internal_static_google_analytics_admin_v1alpha_LinkProposalStatusDetails_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(19); internal_static_google_analytics_admin_v1alpha_LinkProposalStatusDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_LinkProposalStatusDetails_descriptor, @@ -961,7 +955,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LinkProposalInitiatingProduct", "RequestorEmail", "LinkProposalState", }); internal_static_google_analytics_admin_v1alpha_ConversionEvent_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(20); internal_static_google_analytics_admin_v1alpha_ConversionEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ConversionEvent_descriptor, @@ -969,7 +963,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "EventName", "CreateTime", "Deletable", "Custom", "CountingMethod", }); internal_static_google_analytics_admin_v1alpha_GoogleSignalsSettings_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(21); internal_static_google_analytics_admin_v1alpha_GoogleSignalsSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GoogleSignalsSettings_descriptor, @@ -977,7 +971,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "State", "Consent", }); internal_static_google_analytics_admin_v1alpha_CustomDimension_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(22); internal_static_google_analytics_admin_v1alpha_CustomDimension_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CustomDimension_descriptor, @@ -990,7 +984,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisallowAdsPersonalization", }); internal_static_google_analytics_admin_v1alpha_CustomMetric_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(23); internal_static_google_analytics_admin_v1alpha_CustomMetric_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_CustomMetric_descriptor, @@ -1004,7 +998,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RestrictedMetricType", }); internal_static_google_analytics_admin_v1alpha_DataRetentionSettings_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(24); internal_static_google_analytics_admin_v1alpha_DataRetentionSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_DataRetentionSettings_descriptor, @@ -1012,7 +1006,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "EventDataRetention", "ResetUserDataOnNewActivity", }); internal_static_google_analytics_admin_v1alpha_AttributionSettings_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(25); internal_static_google_analytics_admin_v1alpha_AttributionSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_AttributionSettings_descriptor, @@ -1024,7 +1018,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AdsWebConversionDataExportScope", }); internal_static_google_analytics_admin_v1alpha_AccessBinding_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(26); internal_static_google_analytics_admin_v1alpha_AccessBinding_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_AccessBinding_descriptor, @@ -1032,7 +1026,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "User", "Name", "Roles", "AccessTarget", }); internal_static_google_analytics_admin_v1alpha_BigQueryLink_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(27); internal_static_google_analytics_admin_v1alpha_BigQueryLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_BigQueryLink_descriptor, @@ -1048,7 +1042,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExcludedEvents", }); internal_static_google_analytics_admin_v1alpha_EnhancedMeasurementSettings_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(28); internal_static_google_analytics_admin_v1alpha_EnhancedMeasurementSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_EnhancedMeasurementSettings_descriptor, @@ -1066,21 +1060,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UriQueryParameter", }); internal_static_google_analytics_admin_v1alpha_ConnectedSiteTag_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(29); internal_static_google_analytics_admin_v1alpha_ConnectedSiteTag_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_ConnectedSiteTag_descriptor, new java.lang.String[] { "DisplayName", "TagId", }); + internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_DataRedactionSettings_descriptor, + new java.lang.String[] { + "Name", + "EmailRedactionEnabled", + "QueryParameterRedactionEnabled", + "QueryParameterKeys", + }); internal_static_google_analytics_admin_v1alpha_AdSenseLink_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(31); internal_static_google_analytics_admin_v1alpha_AdSenseLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_AdSenseLink_descriptor, new java.lang.String[] { "Name", "AdClientCode", }); + internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_descriptor, + new java.lang.String[] { + "Name", "SourceProperty", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLink.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLink.java new file mode 100644 index 000000000000..bce793f3358d --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLink.java @@ -0,0 +1,842 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A link that references a source property under the parent rollup property.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.RollupPropertySourceLink} + */ +public final class RollupPropertySourceLink extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.RollupPropertySourceLink) + RollupPropertySourceLinkOrBuilder { + private static final long serialVersionUID = 0L; + // Use RollupPropertySourceLink.newBuilder() to construct. + private RollupPropertySourceLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RollupPropertySourceLink() { + name_ = ""; + sourceProperty_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RollupPropertySourceLink(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.class, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of this RollupPropertySourceLink.
+   * Format:
+   * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+   * Format: 'properties/123/rollupPropertySourceLinks/456'
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of this RollupPropertySourceLink.
+   * Format:
+   * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+   * Format: 'properties/123/rollupPropertySourceLinks/456'
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PROPERTY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceProperty_ = ""; + /** + * + * + *
+   * Immutable. Resource name of the source property.
+   * Format: properties/{property_id}
+   * Example: "properties/789"
+   * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sourceProperty. + */ + @java.lang.Override + public java.lang.String getSourceProperty() { + java.lang.Object ref = sourceProperty_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceProperty_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Resource name of the source property.
+   * Format: properties/{property_id}
+   * Example: "properties/789"
+   * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for sourceProperty. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourcePropertyBytes() { + java.lang.Object ref = sourceProperty_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceProperty_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceProperty_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceProperty_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceProperty_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceProperty_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.RollupPropertySourceLink)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.RollupPropertySourceLink other = + (com.google.analytics.admin.v1alpha.RollupPropertySourceLink) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSourceProperty().equals(other.getSourceProperty())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SOURCE_PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getSourceProperty().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A link that references a source property under the parent rollup property.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.RollupPropertySourceLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.RollupPropertySourceLink) + com.google.analytics.admin.v1alpha.RollupPropertySourceLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.class, + com.google.analytics.admin.v1alpha.RollupPropertySourceLink.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.RollupPropertySourceLink.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + sourceProperty_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_RollupPropertySourceLink_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink build() { + com.google.analytics.admin.v1alpha.RollupPropertySourceLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink buildPartial() { + com.google.analytics.admin.v1alpha.RollupPropertySourceLink result = + new com.google.analytics.admin.v1alpha.RollupPropertySourceLink(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.analytics.admin.v1alpha.RollupPropertySourceLink result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sourceProperty_ = sourceProperty_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.RollupPropertySourceLink) { + return mergeFrom((com.google.analytics.admin.v1alpha.RollupPropertySourceLink) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.RollupPropertySourceLink other) { + if (other == com.google.analytics.admin.v1alpha.RollupPropertySourceLink.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSourceProperty().isEmpty()) { + sourceProperty_ = other.sourceProperty_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + sourceProperty_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of this RollupPropertySourceLink.
+     * Format:
+     * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+     * Format: 'properties/123/rollupPropertySourceLinks/456'
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of this RollupPropertySourceLink.
+     * Format:
+     * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+     * Format: 'properties/123/rollupPropertySourceLinks/456'
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of this RollupPropertySourceLink.
+     * Format:
+     * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+     * Format: 'properties/123/rollupPropertySourceLinks/456'
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this RollupPropertySourceLink.
+     * Format:
+     * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+     * Format: 'properties/123/rollupPropertySourceLinks/456'
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of this RollupPropertySourceLink.
+     * Format:
+     * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+     * Format: 'properties/123/rollupPropertySourceLinks/456'
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object sourceProperty_ = ""; + /** + * + * + *
+     * Immutable. Resource name of the source property.
+     * Format: properties/{property_id}
+     * Example: "properties/789"
+     * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sourceProperty. + */ + public java.lang.String getSourceProperty() { + java.lang.Object ref = sourceProperty_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceProperty_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Resource name of the source property.
+     * Format: properties/{property_id}
+     * Example: "properties/789"
+     * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for sourceProperty. + */ + public com.google.protobuf.ByteString getSourcePropertyBytes() { + java.lang.Object ref = sourceProperty_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceProperty_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Resource name of the source property.
+     * Format: properties/{property_id}
+     * Example: "properties/789"
+     * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The sourceProperty to set. + * @return This builder for chaining. + */ + public Builder setSourceProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceProperty_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of the source property.
+     * Format: properties/{property_id}
+     * Example: "properties/789"
+     * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearSourceProperty() { + sourceProperty_ = getDefaultInstance().getSourceProperty(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of the source property.
+     * Format: properties/{property_id}
+     * Example: "properties/789"
+     * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for sourceProperty to set. + * @return This builder for chaining. + */ + public Builder setSourcePropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceProperty_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.RollupPropertySourceLink) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.RollupPropertySourceLink) + private static final com.google.analytics.admin.v1alpha.RollupPropertySourceLink DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.RollupPropertySourceLink(); + } + + public static com.google.analytics.admin.v1alpha.RollupPropertySourceLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollupPropertySourceLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.RollupPropertySourceLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLinkName.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLinkName.java new file mode 100644 index 000000000000..9b9da87541d2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLinkName.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class RollupPropertySourceLinkName implements ResourceName { + private static final PathTemplate PROPERTY_ROLLUP_PROPERTY_SOURCE_LINK = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/rollupPropertySourceLinks/{rollup_property_source_link}"); + private volatile Map fieldValuesMap; + private final String property; + private final String rollupPropertySourceLink; + + @Deprecated + protected RollupPropertySourceLinkName() { + property = null; + rollupPropertySourceLink = null; + } + + private RollupPropertySourceLinkName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + rollupPropertySourceLink = Preconditions.checkNotNull(builder.getRollupPropertySourceLink()); + } + + public String getProperty() { + return property; + } + + public String getRollupPropertySourceLink() { + return rollupPropertySourceLink; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RollupPropertySourceLinkName of(String property, String rollupPropertySourceLink) { + return newBuilder() + .setProperty(property) + .setRollupPropertySourceLink(rollupPropertySourceLink) + .build(); + } + + public static String format(String property, String rollupPropertySourceLink) { + return newBuilder() + .setProperty(property) + .setRollupPropertySourceLink(rollupPropertySourceLink) + .build() + .toString(); + } + + public static RollupPropertySourceLinkName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_ROLLUP_PROPERTY_SOURCE_LINK.validatedMatch( + formattedString, + "RollupPropertySourceLinkName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("rollup_property_source_link")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RollupPropertySourceLinkName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_ROLLUP_PROPERTY_SOURCE_LINK.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (rollupPropertySourceLink != null) { + fieldMapBuilder.put("rollup_property_source_link", rollupPropertySourceLink); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_ROLLUP_PROPERTY_SOURCE_LINK.instantiate( + "property", property, "rollup_property_source_link", rollupPropertySourceLink); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RollupPropertySourceLinkName that = ((RollupPropertySourceLinkName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.rollupPropertySourceLink, that.rollupPropertySourceLink); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(rollupPropertySourceLink); + return h; + } + + /** Builder for properties/{property}/rollupPropertySourceLinks/{rollup_property_source_link}. */ + public static class Builder { + private String property; + private String rollupPropertySourceLink; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getRollupPropertySourceLink() { + return rollupPropertySourceLink; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setRollupPropertySourceLink(String rollupPropertySourceLink) { + this.rollupPropertySourceLink = rollupPropertySourceLink; + return this; + } + + private Builder(RollupPropertySourceLinkName rollupPropertySourceLinkName) { + this.property = rollupPropertySourceLinkName.property; + this.rollupPropertySourceLink = rollupPropertySourceLinkName.rollupPropertySourceLink; + } + + public RollupPropertySourceLinkName build() { + return new RollupPropertySourceLinkName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLinkOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLinkOrBuilder.java new file mode 100644 index 000000000000..73247d52cdf2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RollupPropertySourceLinkOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +public interface RollupPropertySourceLinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.RollupPropertySourceLink) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of this RollupPropertySourceLink.
+   * Format:
+   * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+   * Format: 'properties/123/rollupPropertySourceLinks/456'
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of this RollupPropertySourceLink.
+   * Format:
+   * 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}'
+   * Format: 'properties/123/rollupPropertySourceLinks/456'
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. Resource name of the source property.
+   * Format: properties/{property_id}
+   * Example: "properties/789"
+   * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The sourceProperty. + */ + java.lang.String getSourceProperty(); + /** + * + * + *
+   * Immutable. Resource name of the source property.
+   * Format: properties/{property_id}
+   * Example: "properties/789"
+   * 
+ * + * string source_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for sourceProperty. + */ + com.google.protobuf.ByteString getSourcePropertyBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequest.java index 7ac9e9b034fd..aae2b03385a7 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequest.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequest.java @@ -706,6 +706,49 @@ public boolean getReturnEntityQuota() { return returnEntityQuota_; } + public static final int INCLUDE_ALL_USERS_FIELD_NUMBER = 12; + private boolean includeAllUsers_ = false; + /** + * + * + *
+   * Optional. Determines whether to include users who have never made an API
+   * call in the response. If true, all users with access to the specified
+   * property or account are included in the response, regardless of whether
+   * they have made an API call or not. If false, only the users who have made
+   * an API call will be included.
+   * 
+ * + * bool include_all_users = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeAllUsers. + */ + @java.lang.Override + public boolean getIncludeAllUsers() { + return includeAllUsers_; + } + + public static final int EXPAND_GROUPS_FIELD_NUMBER = 13; + private boolean expandGroups_ = false; + /** + * + * + *
+   * Optional. Decides whether to return the users within user groups. This
+   * field works only when include_all_users is set to true. If true, it will
+   * return all users with access to the specified property or account.
+   * If false, only the users with direct access will be returned.
+   * 
+ * + * bool expand_groups = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + @java.lang.Override + public boolean getExpandGroups() { + return expandGroups_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -753,6 +796,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (returnEntityQuota_ != false) { output.writeBool(11, returnEntityQuota_); } + if (includeAllUsers_ != false) { + output.writeBool(12, includeAllUsers_); + } + if (expandGroups_ != false) { + output.writeBool(13, expandGroups_); + } getUnknownFields().writeTo(output); } @@ -795,6 +844,12 @@ public int getSerializedSize() { if (returnEntityQuota_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnEntityQuota_); } + if (includeAllUsers_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, includeAllUsers_); + } + if (expandGroups_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, expandGroups_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -828,6 +883,8 @@ public boolean equals(final java.lang.Object obj) { if (!getTimeZone().equals(other.getTimeZone())) return false; if (!getOrderBysList().equals(other.getOrderBysList())) return false; if (getReturnEntityQuota() != other.getReturnEntityQuota()) return false; + if (getIncludeAllUsers() != other.getIncludeAllUsers()) return false; + if (getExpandGroups() != other.getExpandGroups()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -873,6 +930,10 @@ public int hashCode() { } hash = (37 * hash) + RETURN_ENTITY_QUOTA_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnEntityQuota()); + hash = (37 * hash) + INCLUDE_ALL_USERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeAllUsers()); + hash = (37 * hash) + EXPAND_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandGroups()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1056,6 +1117,8 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000200); returnEntityQuota_ = false; + includeAllUsers_ = false; + expandGroups_ = false; return this; } @@ -1156,6 +1219,12 @@ private void buildPartial0(com.google.analytics.admin.v1alpha.RunAccessReportReq if (((from_bitField0_ & 0x00000400) != 0)) { result.returnEntityQuota_ = returnEntityQuota_; } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.includeAllUsers_ = includeAllUsers_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.expandGroups_ = expandGroups_; + } } @java.lang.Override @@ -1337,6 +1406,12 @@ public Builder mergeFrom(com.google.analytics.admin.v1alpha.RunAccessReportReque if (other.getReturnEntityQuota() != false) { setReturnEntityQuota(other.getReturnEntityQuota()); } + if (other.getIncludeAllUsers() != false) { + setIncludeAllUsers(other.getIncludeAllUsers()); + } + if (other.getExpandGroups() != false) { + setExpandGroups(other.getExpandGroups()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1461,6 +1536,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000400; break; } // case 88 + case 96: + { + includeAllUsers_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: + { + expandGroups_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3938,6 +4025,133 @@ public Builder clearReturnEntityQuota() { return this; } + private boolean includeAllUsers_; + /** + * + * + *
+     * Optional. Determines whether to include users who have never made an API
+     * call in the response. If true, all users with access to the specified
+     * property or account are included in the response, regardless of whether
+     * they have made an API call or not. If false, only the users who have made
+     * an API call will be included.
+     * 
+ * + * bool include_all_users = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeAllUsers. + */ + @java.lang.Override + public boolean getIncludeAllUsers() { + return includeAllUsers_; + } + /** + * + * + *
+     * Optional. Determines whether to include users who have never made an API
+     * call in the response. If true, all users with access to the specified
+     * property or account are included in the response, regardless of whether
+     * they have made an API call or not. If false, only the users who have made
+     * an API call will be included.
+     * 
+ * + * bool include_all_users = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The includeAllUsers to set. + * @return This builder for chaining. + */ + public Builder setIncludeAllUsers(boolean value) { + + includeAllUsers_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Determines whether to include users who have never made an API
+     * call in the response. If true, all users with access to the specified
+     * property or account are included in the response, regardless of whether
+     * they have made an API call or not. If false, only the users who have made
+     * an API call will be included.
+     * 
+ * + * bool include_all_users = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIncludeAllUsers() { + bitField0_ = (bitField0_ & ~0x00000800); + includeAllUsers_ = false; + onChanged(); + return this; + } + + private boolean expandGroups_; + /** + * + * + *
+     * Optional. Decides whether to return the users within user groups. This
+     * field works only when include_all_users is set to true. If true, it will
+     * return all users with access to the specified property or account.
+     * If false, only the users with direct access will be returned.
+     * 
+ * + * bool expand_groups = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + @java.lang.Override + public boolean getExpandGroups() { + return expandGroups_; + } + /** + * + * + *
+     * Optional. Decides whether to return the users within user groups. This
+     * field works only when include_all_users is set to true. If true, it will
+     * return all users with access to the specified property or account.
+     * If false, only the users with direct access will be returned.
+     * 
+ * + * bool expand_groups = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The expandGroups to set. + * @return This builder for chaining. + */ + public Builder setExpandGroups(boolean value) { + + expandGroups_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Decides whether to return the users within user groups. This
+     * field works only when include_all_users is set to true. If true, it will
+     * return all users with access to the specified property or account.
+     * If false, only the users with direct access will be returned.
+     * 
+ * + * bool expand_groups = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExpandGroups() { + bitField0_ = (bitField0_ & ~0x00001000); + expandGroups_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequestOrBuilder.java index 7ea1bb64cbb1..5461495c7937 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequestOrBuilder.java +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/RunAccessReportRequestOrBuilder.java @@ -484,4 +484,37 @@ public interface RunAccessReportRequestOrBuilder * @return The returnEntityQuota. */ boolean getReturnEntityQuota(); + + /** + * + * + *
+   * Optional. Determines whether to include users who have never made an API
+   * call in the response. If true, all users with access to the specified
+   * property or account are included in the response, regardless of whether
+   * they have made an API call or not. If false, only the users who have made
+   * an API call will be included.
+   * 
+ * + * bool include_all_users = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeAllUsers. + */ + boolean getIncludeAllUsers(); + + /** + * + * + *
+   * Optional. Decides whether to return the users within user groups. This
+   * field works only when include_all_users is set to true. If true, it will
+   * return all users with access to the specified property or account.
+   * If false, only the users with direct access will be returned.
+   * 
+ * + * bool expand_groups = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + boolean getExpandGroups(); } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilter.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilter.java new file mode 100644 index 000000000000..8e7896e963f6 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilter.java @@ -0,0 +1,1479 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A resource message representing a GA4 Subproperty event filter.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilter} + */ +public final class SubpropertyEventFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.SubpropertyEventFilter) + SubpropertyEventFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubpropertyEventFilter.newBuilder() to construct. + private SubpropertyEventFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubpropertyEventFilter() { + name_ = ""; + applyToProperty_ = ""; + filterClauses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubpropertyEventFilter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Format:
+   * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+   * Example: properties/1234/subpropertyEventFilters/5678
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Format:
+   * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+   * Example: properties/1234/subpropertyEventFilters/5678
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLY_TO_PROPERTY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object applyToProperty_ = ""; + /** + * + * + *
+   * Immutable. Resource name of the Subproperty that uses this filter.
+   * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the applyToProperty field is set. + */ + @java.lang.Override + public boolean hasApplyToProperty() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Immutable. Resource name of the Subproperty that uses this filter.
+   * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The applyToProperty. + */ + @java.lang.Override + public java.lang.String getApplyToProperty() { + java.lang.Object ref = applyToProperty_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyToProperty_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Resource name of the Subproperty that uses this filter.
+   * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for applyToProperty. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplyToPropertyBytes() { + java.lang.Object ref = applyToProperty_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applyToProperty_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_CLAUSES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + filterClauses_; + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public java.util.List + getFilterClausesList() { + return filterClauses_; + } + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder> + getFilterClausesOrBuilderList() { + return filterClauses_; + } + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public int getFilterClausesCount() { + return filterClauses_.size(); + } + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause getFilterClauses( + int index) { + return filterClauses_.get(index); + } + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder + getFilterClausesOrBuilder(int index) { + return filterClauses_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applyToProperty_); + } + for (int i = 0; i < filterClauses_.size(); i++) { + output.writeMessage(3, filterClauses_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, applyToProperty_); + } + for (int i = 0; i < filterClauses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, filterClauses_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilter)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.SubpropertyEventFilter other = + (com.google.analytics.admin.v1alpha.SubpropertyEventFilter) obj; + + if (!getName().equals(other.getName())) return false; + if (hasApplyToProperty() != other.hasApplyToProperty()) return false; + if (hasApplyToProperty()) { + if (!getApplyToProperty().equals(other.getApplyToProperty())) return false; + } + if (!getFilterClausesList().equals(other.getFilterClausesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasApplyToProperty()) { + hash = (37 * hash) + APPLY_TO_PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getApplyToProperty().hashCode(); + } + if (getFilterClausesCount() > 0) { + hash = (37 * hash) + FILTER_CLAUSES_FIELD_NUMBER; + hash = (53 * hash) + getFilterClausesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource message representing a GA4 Subproperty event filter.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.SubpropertyEventFilter) + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.SubpropertyEventFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + applyToProperty_ = ""; + if (filterClausesBuilder_ == null) { + filterClauses_ = java.util.Collections.emptyList(); + } else { + filterClauses_ = null; + filterClausesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter build() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter buildPartial() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilter result = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilter(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter result) { + if (filterClausesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + filterClauses_ = java.util.Collections.unmodifiableList(filterClauses_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.filterClauses_ = filterClauses_; + } else { + result.filterClauses_ = filterClausesBuilder_.build(); + } + } + + private void buildPartial0(com.google.analytics.admin.v1alpha.SubpropertyEventFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.applyToProperty_ = applyToProperty_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilter) { + return mergeFrom((com.google.analytics.admin.v1alpha.SubpropertyEventFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.SubpropertyEventFilter other) { + if (other == com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasApplyToProperty()) { + applyToProperty_ = other.applyToProperty_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (filterClausesBuilder_ == null) { + if (!other.filterClauses_.isEmpty()) { + if (filterClauses_.isEmpty()) { + filterClauses_ = other.filterClauses_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFilterClausesIsMutable(); + filterClauses_.addAll(other.filterClauses_); + } + onChanged(); + } + } else { + if (!other.filterClauses_.isEmpty()) { + if (filterClausesBuilder_.isEmpty()) { + filterClausesBuilder_.dispose(); + filterClausesBuilder_ = null; + filterClauses_ = other.filterClauses_; + bitField0_ = (bitField0_ & ~0x00000004); + filterClausesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFilterClausesFieldBuilder() + : null; + } else { + filterClausesBuilder_.addAllMessages(other.filterClauses_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + applyToProperty_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause m = + input.readMessage( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.parser(), + extensionRegistry); + if (filterClausesBuilder_ == null) { + ensureFilterClausesIsMutable(); + filterClauses_.add(m); + } else { + filterClausesBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Format:
+     * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+     * Example: properties/1234/subpropertyEventFilters/5678
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Format:
+     * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+     * Example: properties/1234/subpropertyEventFilters/5678
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Format:
+     * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+     * Example: properties/1234/subpropertyEventFilters/5678
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Format:
+     * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+     * Example: properties/1234/subpropertyEventFilters/5678
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Format:
+     * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+     * Example: properties/1234/subpropertyEventFilters/5678
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object applyToProperty_ = ""; + /** + * + * + *
+     * Immutable. Resource name of the Subproperty that uses this filter.
+     * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the applyToProperty field is set. + */ + public boolean hasApplyToProperty() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Immutable. Resource name of the Subproperty that uses this filter.
+     * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The applyToProperty. + */ + public java.lang.String getApplyToProperty() { + java.lang.Object ref = applyToProperty_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applyToProperty_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Resource name of the Subproperty that uses this filter.
+     * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for applyToProperty. + */ + public com.google.protobuf.ByteString getApplyToPropertyBytes() { + java.lang.Object ref = applyToProperty_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applyToProperty_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Resource name of the Subproperty that uses this filter.
+     * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The applyToProperty to set. + * @return This builder for chaining. + */ + public Builder setApplyToProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applyToProperty_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of the Subproperty that uses this filter.
+     * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearApplyToProperty() { + applyToProperty_ = getDefaultInstance().getApplyToProperty(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Resource name of the Subproperty that uses this filter.
+     * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for applyToProperty to set. + * @return This builder for chaining. + */ + public Builder setApplyToPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applyToProperty_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List + filterClauses_ = java.util.Collections.emptyList(); + + private void ensureFilterClausesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + filterClauses_ = + new java.util.ArrayList< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause>(filterClauses_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder> + filterClausesBuilder_; + + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public java.util.List + getFilterClausesList() { + if (filterClausesBuilder_ == null) { + return java.util.Collections.unmodifiableList(filterClauses_); + } else { + return filterClausesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public int getFilterClausesCount() { + if (filterClausesBuilder_ == null) { + return filterClauses_.size(); + } else { + return filterClausesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause getFilterClauses( + int index) { + if (filterClausesBuilder_ == null) { + return filterClauses_.get(index); + } else { + return filterClausesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder setFilterClauses( + int index, com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause value) { + if (filterClausesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterClausesIsMutable(); + filterClauses_.set(index, value); + onChanged(); + } else { + filterClausesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder setFilterClauses( + int index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder builderForValue) { + if (filterClausesBuilder_ == null) { + ensureFilterClausesIsMutable(); + filterClauses_.set(index, builderForValue.build()); + onChanged(); + } else { + filterClausesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterClauses( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause value) { + if (filterClausesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterClausesIsMutable(); + filterClauses_.add(value); + onChanged(); + } else { + filterClausesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterClauses( + int index, com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause value) { + if (filterClausesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterClausesIsMutable(); + filterClauses_.add(index, value); + onChanged(); + } else { + filterClausesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterClauses( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder builderForValue) { + if (filterClausesBuilder_ == null) { + ensureFilterClausesIsMutable(); + filterClauses_.add(builderForValue.build()); + onChanged(); + } else { + filterClausesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterClauses( + int index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder builderForValue) { + if (filterClausesBuilder_ == null) { + ensureFilterClausesIsMutable(); + filterClauses_.add(index, builderForValue.build()); + onChanged(); + } else { + filterClausesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addAllFilterClauses( + java.lang.Iterable< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause> + values) { + if (filterClausesBuilder_ == null) { + ensureFilterClausesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filterClauses_); + onChanged(); + } else { + filterClausesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder clearFilterClauses() { + if (filterClausesBuilder_ == null) { + filterClauses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + filterClausesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder removeFilterClauses(int index) { + if (filterClausesBuilder_ == null) { + ensureFilterClausesIsMutable(); + filterClauses_.remove(index); + onChanged(); + } else { + filterClausesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder + getFilterClausesBuilder(int index) { + return getFilterClausesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder + getFilterClausesOrBuilder(int index) { + if (filterClausesBuilder_ == null) { + return filterClauses_.get(index); + } else { + return filterClausesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder> + getFilterClausesOrBuilderList() { + if (filterClausesBuilder_ != null) { + return filterClausesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filterClauses_); + } + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder + addFilterClausesBuilder() { + return getFilterClausesFieldBuilder() + .addBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder + addFilterClausesBuilder(int index) { + return getFilterClausesFieldBuilder() + .addBuilder( + index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Unordered list. Filter clauses that define the
+     * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+     * data is sent to the subproperty.
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public java.util.List + getFilterClausesBuilderList() { + return getFilterClausesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder> + getFilterClausesFieldBuilder() { + if (filterClausesBuilder_ == null) { + filterClausesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder>( + filterClauses_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + filterClauses_ = null; + } + return filterClausesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.SubpropertyEventFilter) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.SubpropertyEventFilter) + private static final com.google.analytics.admin.v1alpha.SubpropertyEventFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.SubpropertyEventFilter(); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubpropertyEventFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterClause.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterClause.java new file mode 100644 index 000000000000..3d22d1281c14 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterClause.java @@ -0,0 +1,1113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A clause for defining a filter. A filter may be inclusive (events satisfying
+ * the filter clause are included in the subproperty's data) or exclusive
+ * (events satisfying the filter clause are excluded from the subproperty's
+ * data).
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterClause} + */ +public final class SubpropertyEventFilterClause extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterClause) + SubpropertyEventFilterClauseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubpropertyEventFilterClause.newBuilder() to construct. + private SubpropertyEventFilterClause(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubpropertyEventFilterClause() { + filterClauseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubpropertyEventFilterClause(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder.class); + } + + /** + * + * + *
+   * Specifies whether this is an include or exclude filter clause.
+   * 
+ * + * Protobuf enum {@code + * google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType} + */ + public enum FilterClauseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Filter clause type unknown or not specified.
+     * 
+ * + * FILTER_CLAUSE_TYPE_UNSPECIFIED = 0; + */ + FILTER_CLAUSE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Events will be included in the Sub property if the filter clause is met.
+     * 
+ * + * INCLUDE = 1; + */ + INCLUDE(1), + /** + * + * + *
+     * Events will be excluded from the Sub property if the filter clause is
+     * met.
+     * 
+ * + * EXCLUDE = 2; + */ + EXCLUDE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Filter clause type unknown or not specified.
+     * 
+ * + * FILTER_CLAUSE_TYPE_UNSPECIFIED = 0; + */ + public static final int FILTER_CLAUSE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Events will be included in the Sub property if the filter clause is met.
+     * 
+ * + * INCLUDE = 1; + */ + public static final int INCLUDE_VALUE = 1; + /** + * + * + *
+     * Events will be excluded from the Sub property if the filter clause is
+     * met.
+     * 
+ * + * EXCLUDE = 2; + */ + public static final int EXCLUDE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FilterClauseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FilterClauseType forNumber(int value) { + switch (value) { + case 0: + return FILTER_CLAUSE_TYPE_UNSPECIFIED; + case 1: + return INCLUDE; + case 2: + return EXCLUDE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FilterClauseType findValueByNumber(int number) { + return FilterClauseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FilterClauseType[] VALUES = values(); + + public static FilterClauseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FilterClauseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType) + } + + public static final int FILTER_CLAUSE_TYPE_FIELD_NUMBER = 1; + private int filterClauseType_ = 0; + /** + * + * + *
+   * Required. The type for the filter clause.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for filterClauseType. + */ + @java.lang.Override + public int getFilterClauseTypeValue() { + return filterClauseType_; + } + /** + * + * + *
+   * Required. The type for the filter clause.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filterClauseType. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + getFilterClauseType() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType result = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType.forNumber( + filterClauseType_); + return result == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + .UNRECOGNIZED + : result; + } + + public static final int FILTER_EXPRESSION_FIELD_NUMBER = 2; + private com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filterExpression_; + /** + * + * + *
+   * Required. The logical expression for what events are sent to the
+   * subproperty.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filterExpression field is set. + */ + @java.lang.Override + public boolean hasFilterExpression() { + return filterExpression_ != null; + } + /** + * + * + *
+   * Required. The logical expression for what events are sent to the
+   * subproperty.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filterExpression. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getFilterExpression() { + return filterExpression_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.getDefaultInstance() + : filterExpression_; + } + /** + * + * + *
+   * Required. The logical expression for what events are sent to the
+   * subproperty.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getFilterExpressionOrBuilder() { + return filterExpression_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.getDefaultInstance() + : filterExpression_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (filterClauseType_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + .FILTER_CLAUSE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, filterClauseType_); + } + if (filterExpression_ != null) { + output.writeMessage(2, getFilterExpression()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (filterClauseType_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + .FILTER_CLAUSE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, filterClauseType_); + } + if (filterExpression_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFilterExpression()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause other = + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause) obj; + + if (filterClauseType_ != other.filterClauseType_) return false; + if (hasFilterExpression() != other.hasFilterExpression()) return false; + if (hasFilterExpression()) { + if (!getFilterExpression().equals(other.getFilterExpression())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILTER_CLAUSE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + filterClauseType_; + if (hasFilterExpression()) { + hash = (37 * hash) + FILTER_EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getFilterExpression().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A clause for defining a filter. A filter may be inclusive (events satisfying
+   * the filter clause are included in the subproperty's data) or exclusive
+   * (events satisfying the filter clause are excluded from the subproperty's
+   * data).
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterClause} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterClause) + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + filterClauseType_ = 0; + filterExpression_ = null; + if (filterExpressionBuilder_ != null) { + filterExpressionBuilder_.dispose(); + filterExpressionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause build() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause buildPartial() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause result = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.filterClauseType_ = filterClauseType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filterExpression_ = + filterExpressionBuilder_ == null ? filterExpression_ : filterExpressionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause) { + return mergeFrom((com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause other) { + if (other + == com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.getDefaultInstance()) + return this; + if (other.filterClauseType_ != 0) { + setFilterClauseTypeValue(other.getFilterClauseTypeValue()); + } + if (other.hasFilterExpression()) { + mergeFilterExpression(other.getFilterExpression()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + filterClauseType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getFilterExpressionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int filterClauseType_ = 0; + /** + * + * + *
+     * Required. The type for the filter clause.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for filterClauseType. + */ + @java.lang.Override + public int getFilterClauseTypeValue() { + return filterClauseType_; + } + /** + * + * + *
+     * Required. The type for the filter clause.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for filterClauseType to set. + * @return This builder for chaining. + */ + public Builder setFilterClauseTypeValue(int value) { + filterClauseType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type for the filter clause.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filterClauseType. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + getFilterClauseType() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType result = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + .forNumber(filterClauseType_); + return result == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type for the filter clause.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The filterClauseType to set. + * @return This builder for chaining. + */ + public Builder setFilterClauseType( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + filterClauseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type for the filter clause.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearFilterClauseType() { + bitField0_ = (bitField0_ & ~0x00000001); + filterClauseType_ = 0; + onChanged(); + return this; + } + + private com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filterExpression_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + filterExpressionBuilder_; + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filterExpression field is set. + */ + public boolean hasFilterExpression() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filterExpression. + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + getFilterExpression() { + if (filterExpressionBuilder_ == null) { + return filterExpression_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance() + : filterExpression_; + } else { + return filterExpressionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFilterExpression( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression value) { + if (filterExpressionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filterExpression_ = value; + } else { + filterExpressionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFilterExpression( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + builderForValue) { + if (filterExpressionBuilder_ == null) { + filterExpression_ = builderForValue.build(); + } else { + filterExpressionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFilterExpression( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression value) { + if (filterExpressionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && filterExpression_ != null + && filterExpression_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance()) { + getFilterExpressionBuilder().mergeFrom(value); + } else { + filterExpression_ = value; + } + } else { + filterExpressionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFilterExpression() { + bitField0_ = (bitField0_ & ~0x00000002); + filterExpression_ = null; + if (filterExpressionBuilder_ != null) { + filterExpressionBuilder_.dispose(); + filterExpressionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + getFilterExpressionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFilterExpressionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getFilterExpressionOrBuilder() { + if (filterExpressionBuilder_ != null) { + return filterExpressionBuilder_.getMessageOrBuilder(); + } else { + return filterExpression_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance() + : filterExpression_; + } + } + /** + * + * + *
+     * Required. The logical expression for what events are sent to the
+     * subproperty.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + getFilterExpressionFieldBuilder() { + if (filterExpressionBuilder_ == null) { + filterExpressionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder>( + getFilterExpression(), getParentForChildren(), isClean()); + filterExpression_ = null; + } + return filterExpressionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterClause) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterClause) + private static final com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause(); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubpropertyEventFilterClause parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterClauseOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterClauseOrBuilder.java new file mode 100644 index 000000000000..92a13b314662 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterClauseOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +public interface SubpropertyEventFilterClauseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.SubpropertyEventFilterClause) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The type for the filter clause.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for filterClauseType. + */ + int getFilterClauseTypeValue(); + /** + * + * + *
+   * Required. The type for the filter clause.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType filter_clause_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filterClauseType. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause.FilterClauseType + getFilterClauseType(); + + /** + * + * + *
+   * Required. The logical expression for what events are sent to the
+   * subproperty.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filterExpression field is set. + */ + boolean hasFilterExpression(); + /** + * + * + *
+   * Required. The logical expression for what events are sent to the
+   * subproperty.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filterExpression. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getFilterExpression(); + /** + * + * + *
+   * Required. The logical expression for what events are sent to the
+   * subproperty.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getFilterExpressionOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterCondition.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterCondition.java new file mode 100644 index 000000000000..224b88803494 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterCondition.java @@ -0,0 +1,2452 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A specific filter expression
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterCondition} + */ +public final class SubpropertyEventFilterCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) + SubpropertyEventFilterConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubpropertyEventFilterCondition.newBuilder() to construct. + private SubpropertyEventFilterCondition( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubpropertyEventFilterCondition() { + fieldName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubpropertyEventFilterCondition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.Builder.class); + } + + public interface StringFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The match type for the string filter.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for matchType. + */ + int getMatchTypeValue(); + /** + * + * + *
+     * Required. The match type for the string filter.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The matchType. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType + getMatchType(); + + /** + * + * + *
+     * Required. The string value used for the matching.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * Required. The string value used for the matching.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+     * Optional. If true, the string value is case sensitive. If false, the
+     * match is case-insensitive.
+     * 
+ * + * bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The caseSensitive. + */ + boolean getCaseSensitive(); + } + /** + * + * + *
+   * A filter for a string-type dimension that matches a particular pattern.
+   * 
+ * + * Protobuf type {@code + * google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter} + */ + public static final class StringFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + StringFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use StringFilter.newBuilder() to construct. + private StringFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StringFilter() { + matchType_ = 0; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StringFilter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .Builder.class); + } + + /** + * + * + *
+     * How the filter will be used to determine a match.
+     * 
+ * + * Protobuf enum {@code + * google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType} + */ + public enum MatchType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Match type unknown or not specified.
+       * 
+ * + * MATCH_TYPE_UNSPECIFIED = 0; + */ + MATCH_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Exact match of the string value.
+       * 
+ * + * EXACT = 1; + */ + EXACT(1), + /** + * + * + *
+       * Begins with the string value.
+       * 
+ * + * BEGINS_WITH = 2; + */ + BEGINS_WITH(2), + /** + * + * + *
+       * Ends with the string value.
+       * 
+ * + * ENDS_WITH = 3; + */ + ENDS_WITH(3), + /** + * + * + *
+       * Contains the string value.
+       * 
+ * + * CONTAINS = 4; + */ + CONTAINS(4), + /** + * + * + *
+       * Full regular expression matches with the string value.
+       * 
+ * + * FULL_REGEXP = 5; + */ + FULL_REGEXP(5), + /** + * + * + *
+       * Partial regular expression matches with the string value.
+       * 
+ * + * PARTIAL_REGEXP = 6; + */ + PARTIAL_REGEXP(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Match type unknown or not specified.
+       * 
+ * + * MATCH_TYPE_UNSPECIFIED = 0; + */ + public static final int MATCH_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Exact match of the string value.
+       * 
+ * + * EXACT = 1; + */ + public static final int EXACT_VALUE = 1; + /** + * + * + *
+       * Begins with the string value.
+       * 
+ * + * BEGINS_WITH = 2; + */ + public static final int BEGINS_WITH_VALUE = 2; + /** + * + * + *
+       * Ends with the string value.
+       * 
+ * + * ENDS_WITH = 3; + */ + public static final int ENDS_WITH_VALUE = 3; + /** + * + * + *
+       * Contains the string value.
+       * 
+ * + * CONTAINS = 4; + */ + public static final int CONTAINS_VALUE = 4; + /** + * + * + *
+       * Full regular expression matches with the string value.
+       * 
+ * + * FULL_REGEXP = 5; + */ + public static final int FULL_REGEXP_VALUE = 5; + /** + * + * + *
+       * Partial regular expression matches with the string value.
+       * 
+ * + * PARTIAL_REGEXP = 6; + */ + public static final int PARTIAL_REGEXP_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MatchType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MatchType forNumber(int value) { + switch (value) { + case 0: + return MATCH_TYPE_UNSPECIFIED; + case 1: + return EXACT; + case 2: + return BEGINS_WITH; + case 3: + return ENDS_WITH; + case 4: + return CONTAINS; + case 5: + return FULL_REGEXP; + case 6: + return PARTIAL_REGEXP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MatchType findValueByNumber(int number) { + return MatchType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MatchType[] VALUES = values(); + + public static MatchType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MatchType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType) + } + + public static final int MATCH_TYPE_FIELD_NUMBER = 1; + private int matchType_ = 0; + /** + * + * + *
+     * Required. The match type for the string filter.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for matchType. + */ + @java.lang.Override + public int getMatchTypeValue() { + return matchType_; + } + /** + * + * + *
+     * Required. The match type for the string filter.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The matchType. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType + getMatchType() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType + result = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .MatchType.forNumber(matchType_); + return result == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .MatchType.UNRECOGNIZED + : result; + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * + * + *
+     * Required. The string value used for the matching.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The string value used for the matching.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CASE_SENSITIVE_FIELD_NUMBER = 3; + private boolean caseSensitive_ = false; + /** + * + * + *
+     * Optional. If true, the string value is case sensitive. If false, the
+     * match is case-insensitive.
+     * 
+ * + * bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (matchType_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .MatchType.MATCH_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, matchType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (caseSensitive_ != false) { + output.writeBool(3, caseSensitive_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (matchType_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .MatchType.MATCH_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, matchType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (caseSensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, caseSensitive_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter other = + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) obj; + + if (matchType_ != other.matchType_) return false; + if (!getValue().equals(other.getValue())) return false; + if (getCaseSensitive() != other.getCaseSensitive()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + matchType_; + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + CASE_SENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseSensitive()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * Protobuf type {@code + * google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchType_ = 0; + value_ = ""; + caseSensitive_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + build() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + buildPartial() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter result = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchType_ = matchType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.caseSensitive_ = caseSensitive_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter other) { + if (other + == com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance()) return this; + if (other.matchType_ != 0) { + setMatchTypeValue(other.getMatchTypeValue()); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getCaseSensitive() != false) { + setCaseSensitive(other.getCaseSensitive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + matchType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + caseSensitive_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int matchType_ = 0; + /** + * + * + *
+       * Required. The match type for the string filter.
+       * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for matchType. + */ + @java.lang.Override + public int getMatchTypeValue() { + return matchType_; + } + /** + * + * + *
+       * Required. The match type for the string filter.
+       * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for matchType to set. + * @return This builder for chaining. + */ + public Builder setMatchTypeValue(int value) { + matchType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The match type for the string filter.
+       * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The matchType. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .MatchType + getMatchType() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType + result = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .MatchType.forNumber(matchType_); + return result == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .MatchType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. The match type for the string filter.
+       * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The matchType to set. + * @return This builder for chaining. + */ + public Builder setMatchType( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + matchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The match type for the string filter.
+       * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.MatchType match_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMatchType() { + bitField0_ = (bitField0_ & ~0x00000001); + matchType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * Required. The string value used for the matching.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The string value used for the matching.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The string value used for the matching.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The string value used for the matching.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The string value used for the matching.
+       * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean caseSensitive_; + /** + * + * + *
+       * Optional. If true, the string value is case sensitive. If false, the
+       * match is case-insensitive.
+       * 
+ * + * bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + /** + * + * + *
+       * Optional. If true, the string value is case sensitive. If false, the
+       * match is case-insensitive.
+       * 
+ * + * bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The caseSensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseSensitive(boolean value) { + + caseSensitive_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If true, the string value is case sensitive. If false, the
+       * match is case-insensitive.
+       * 
+ * + * bool case_sensitive = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCaseSensitive() { + bitField0_ = (bitField0_ & ~0x00000004); + caseSensitive_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + private static final com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .StringFilter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter(); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StringFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int oneFilterCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object oneFilter_; + + public enum OneFilterCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NULL_FILTER(2), + STRING_FILTER(3), + ONEFILTER_NOT_SET(0); + private final int value; + + private OneFilterCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneFilterCase valueOf(int value) { + return forNumber(value); + } + + public static OneFilterCase forNumber(int value) { + switch (value) { + case 2: + return NULL_FILTER; + case 3: + return STRING_FILTER; + case 0: + return ONEFILTER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneFilterCase getOneFilterCase() { + return OneFilterCase.forNumber(oneFilterCase_); + } + + public static final int NULL_FILTER_FIELD_NUMBER = 2; + /** + * + * + *
+   * A filter for null values.
+   * 
+ * + * bool null_filter = 2; + * + * @return Whether the nullFilter field is set. + */ + @java.lang.Override + public boolean hasNullFilter() { + return oneFilterCase_ == 2; + } + /** + * + * + *
+   * A filter for null values.
+   * 
+ * + * bool null_filter = 2; + * + * @return The nullFilter. + */ + @java.lang.Override + public boolean getNullFilter() { + if (oneFilterCase_ == 2) { + return (java.lang.Boolean) oneFilter_; + } + return false; + } + + public static final int STRING_FILTER_FIELD_NUMBER = 3; + /** + * + * + *
+   * A filter for a string-type dimension that matches a particular pattern.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + * + * @return Whether the stringFilter field is set. + */ + @java.lang.Override + public boolean hasStringFilter() { + return oneFilterCase_ == 3; + } + /** + * + * + *
+   * A filter for a string-type dimension that matches a particular pattern.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + * + * @return The stringFilter. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + getStringFilter() { + if (oneFilterCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + oneFilter_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance(); + } + /** + * + * + *
+   * A filter for a string-type dimension that matches a particular pattern.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilterOrBuilder + getStringFilterOrBuilder() { + if (oneFilterCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + oneFilter_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance(); + } + + public static final int FIELD_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldName_ = ""; + /** + * + * + *
+   * Required. The field that is being filtered.
+   * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The field that is being filtered.
+   * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_); + } + if (oneFilterCase_ == 2) { + output.writeBool(2, (boolean) ((java.lang.Boolean) oneFilter_)); + } + if (oneFilterCase_ == 3) { + output.writeMessage( + 3, + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + oneFilter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_); + } + if (oneFilterCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, (boolean) ((java.lang.Boolean) oneFilter_)); + } + if (oneFilterCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + oneFilter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition other = + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) obj; + + if (!getFieldName().equals(other.getFieldName())) return false; + if (!getOneFilterCase().equals(other.getOneFilterCase())) return false; + switch (oneFilterCase_) { + case 2: + if (getNullFilter() != other.getNullFilter()) return false; + break; + case 3: + if (!getStringFilter().equals(other.getStringFilter())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + switch (oneFilterCase_) { + case 2: + hash = (37 * hash) + NULL_FILTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNullFilter()); + break; + case 3: + hash = (37 * hash) + STRING_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getStringFilter().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A specific filter expression
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) + com.google.analytics.admin.v1alpha.SubpropertyEventFilterConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stringFilterBuilder_ != null) { + stringFilterBuilder_.clear(); + } + fieldName_ = ""; + oneFilterCase_ = 0; + oneFilter_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition build() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition buildPartial() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition result = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fieldName_ = fieldName_; + } + } + + private void buildPartialOneofs( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition result) { + result.oneFilterCase_ = oneFilterCase_; + result.oneFilter_ = this.oneFilter_; + if (oneFilterCase_ == 3 && stringFilterBuilder_ != null) { + result.oneFilter_ = stringFilterBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition other) { + if (other + == com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .getDefaultInstance()) return this; + if (!other.getFieldName().isEmpty()) { + fieldName_ = other.fieldName_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getOneFilterCase()) { + case NULL_FILTER: + { + setNullFilter(other.getNullFilter()); + break; + } + case STRING_FILTER: + { + mergeStringFilter(other.getStringFilter()); + break; + } + case ONEFILTER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 16: + { + oneFilter_ = input.readBool(); + oneFilterCase_ = 2; + break; + } // case 16 + case 26: + { + input.readMessage(getStringFilterFieldBuilder().getBuilder(), extensionRegistry); + oneFilterCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int oneFilterCase_ = 0; + private java.lang.Object oneFilter_; + + public OneFilterCase getOneFilterCase() { + return OneFilterCase.forNumber(oneFilterCase_); + } + + public Builder clearOneFilter() { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * A filter for null values.
+     * 
+ * + * bool null_filter = 2; + * + * @return Whether the nullFilter field is set. + */ + public boolean hasNullFilter() { + return oneFilterCase_ == 2; + } + /** + * + * + *
+     * A filter for null values.
+     * 
+ * + * bool null_filter = 2; + * + * @return The nullFilter. + */ + public boolean getNullFilter() { + if (oneFilterCase_ == 2) { + return (java.lang.Boolean) oneFilter_; + } + return false; + } + /** + * + * + *
+     * A filter for null values.
+     * 
+ * + * bool null_filter = 2; + * + * @param value The nullFilter to set. + * @return This builder for chaining. + */ + public Builder setNullFilter(boolean value) { + + oneFilterCase_ = 2; + oneFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter for null values.
+     * 
+ * + * bool null_filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearNullFilter() { + if (oneFilterCase_ == 2) { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .StringFilterOrBuilder> + stringFilterBuilder_; + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + * + * @return Whether the stringFilter field is set. + */ + @java.lang.Override + public boolean hasStringFilter() { + return oneFilterCase_ == 3; + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + * + * @return The stringFilter. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + getStringFilter() { + if (stringFilterBuilder_ == null) { + if (oneFilterCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + oneFilter_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance(); + } else { + if (oneFilterCase_ == 3) { + return stringFilterBuilder_.getMessage(); + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + public Builder setStringFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter value) { + if (stringFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneFilter_ = value; + onChanged(); + } else { + stringFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 3; + return this; + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + public Builder setStringFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.Builder + builderForValue) { + if (stringFilterBuilder_ == null) { + oneFilter_ = builderForValue.build(); + onChanged(); + } else { + stringFilterBuilder_.setMessage(builderForValue.build()); + } + oneFilterCase_ = 3; + return this; + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + public Builder mergeStringFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter value) { + if (stringFilterBuilder_ == null) { + if (oneFilterCase_ == 3 + && oneFilter_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance()) { + oneFilter_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .newBuilder( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .StringFilter) + oneFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + oneFilter_ = value; + } + onChanged(); + } else { + if (oneFilterCase_ == 3) { + stringFilterBuilder_.mergeFrom(value); + } else { + stringFilterBuilder_.setMessage(value); + } + } + oneFilterCase_ = 3; + return this; + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + public Builder clearStringFilter() { + if (stringFilterBuilder_ == null) { + if (oneFilterCase_ == 3) { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + } + } else { + if (oneFilterCase_ == 3) { + oneFilterCase_ = 0; + oneFilter_ = null; + } + stringFilterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.Builder + getStringFilterBuilder() { + return getStringFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilterOrBuilder + getStringFilterOrBuilder() { + if ((oneFilterCase_ == 3) && (stringFilterBuilder_ != null)) { + return stringFilterBuilder_.getMessageOrBuilder(); + } else { + if (oneFilterCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + oneFilter_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for a string-type dimension that matches a particular pattern.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .StringFilterOrBuilder> + getStringFilterFieldBuilder() { + if (stringFilterBuilder_ == null) { + if (!(oneFilterCase_ == 3)) { + oneFilter_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .getDefaultInstance(); + } + stringFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter + .Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .StringFilterOrBuilder>( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter) + oneFilter_, + getParentForChildren(), + isClean()); + oneFilter_ = null; + } + oneFilterCase_ = 3; + onChanged(); + return stringFilterBuilder_; + } + + private java.lang.Object fieldName_ = ""; + /** + * + * + *
+     * Required. The field that is being filtered.
+     * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The field that is being filtered.
+     * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The field that is being filtered.
+     * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field that is being filtered.
+     * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + fieldName_ = getDefaultInstance().getFieldName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The field that is being filtered.
+     * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) + private static final com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition(); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubpropertyEventFilterCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterConditionOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterConditionOrBuilder.java new file mode 100644 index 000000000000..f334741b9030 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterConditionOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +public interface SubpropertyEventFilterConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A filter for null values.
+   * 
+ * + * bool null_filter = 2; + * + * @return Whether the nullFilter field is set. + */ + boolean hasNullFilter(); + /** + * + * + *
+   * A filter for null values.
+   * 
+ * + * bool null_filter = 2; + * + * @return The nullFilter. + */ + boolean getNullFilter(); + + /** + * + * + *
+   * A filter for a string-type dimension that matches a particular pattern.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + * + * @return Whether the stringFilter field is set. + */ + boolean hasStringFilter(); + /** + * + * + *
+   * A filter for a string-type dimension that matches a particular pattern.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + * + * @return The stringFilter. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter getStringFilter(); + /** + * + * + *
+   * A filter for a string-type dimension that matches a particular pattern.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilter string_filter = 3; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.StringFilterOrBuilder + getStringFilterOrBuilder(); + + /** + * + * + *
+   * Required. The field that is being filtered.
+   * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + /** + * + * + *
+   * Required. The field that is being filtered.
+   * 
+ * + * string field_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.OneFilterCase + getOneFilterCase(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpression.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpression.java new file mode 100644 index 000000000000..b0d3d9c158ab --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpression.java @@ -0,0 +1,1546 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A logical expression of Subproperty event filters.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterExpression} + */ +public final class SubpropertyEventFilterExpression extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) + SubpropertyEventFilterExpressionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubpropertyEventFilterExpression.newBuilder() to construct. + private SubpropertyEventFilterExpression( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubpropertyEventFilterExpression() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubpropertyEventFilterExpression(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder.class); + } + + private int exprCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object expr_; + + public enum ExprCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OR_GROUP(1), + NOT_EXPRESSION(2), + FILTER_CONDITION(3), + EXPR_NOT_SET(0); + private final int value; + + private ExprCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExprCase valueOf(int value) { + return forNumber(value); + } + + public static ExprCase forNumber(int value) { + switch (value) { + case 1: + return OR_GROUP; + case 2: + return NOT_EXPRESSION; + case 3: + return FILTER_CONDITION; + case 0: + return EXPR_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ExprCase getExprCase() { + return ExprCase.forNumber(exprCase_); + } + + public static final int OR_GROUP_FIELD_NUMBER = 1; + /** + * + * + *
+   * A list of expressions to OR’ed together. Must only contain
+   * not_expression or filter_condition expressions.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + * @return Whether the orGroup field is set. + */ + @java.lang.Override + public boolean hasOrGroup() { + return exprCase_ == 1; + } + /** + * + * + *
+   * A list of expressions to OR’ed together. Must only contain
+   * not_expression or filter_condition expressions.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + * @return The orGroup. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList getOrGroup() { + if (exprCase_ == 1) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance(); + } + /** + * + * + *
+   * A list of expressions to OR’ed together. Must only contain
+   * not_expression or filter_condition expressions.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionListOrBuilder + getOrGroupOrBuilder() { + if (exprCase_ == 1) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance(); + } + + public static final int NOT_EXPRESSION_FIELD_NUMBER = 2; + /** + * + * + *
+   * A filter expression to be NOT'ed (inverted, complemented). It can only
+   * include a filter. This cannot be set on the top level
+   * SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + * + * @return Whether the notExpression field is set. + */ + @java.lang.Override + public boolean hasNotExpression() { + return exprCase_ == 2; + } + /** + * + * + *
+   * A filter expression to be NOT'ed (inverted, complemented). It can only
+   * include a filter. This cannot be set on the top level
+   * SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + * + * @return The notExpression. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getNotExpression() { + if (exprCase_ == 2) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.getDefaultInstance(); + } + /** + * + * + *
+   * A filter expression to be NOT'ed (inverted, complemented). It can only
+   * include a filter. This cannot be set on the top level
+   * SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getNotExpressionOrBuilder() { + if (exprCase_ == 2) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.getDefaultInstance(); + } + + public static final int FILTER_CONDITION_FIELD_NUMBER = 3; + /** + * + * + *
+   * Creates a filter that matches a specific event. This cannot be set on the
+   * top level SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + * + * @return Whether the filterCondition field is set. + */ + @java.lang.Override + public boolean hasFilterCondition() { + return exprCase_ == 3; + } + /** + * + * + *
+   * Creates a filter that matches a specific event. This cannot be set on the
+   * top level SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + * + * @return The filterCondition. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition getFilterCondition() { + if (exprCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.getDefaultInstance(); + } + /** + * + * + *
+   * Creates a filter that matches a specific event. This cannot be set on the
+   * top level SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterConditionOrBuilder + getFilterConditionOrBuilder() { + if (exprCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (exprCase_ == 1) { + output.writeMessage( + 1, (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) expr_); + } + if (exprCase_ == 2) { + output.writeMessage( + 2, (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_); + } + if (exprCase_ == 3) { + output.writeMessage( + 3, (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (exprCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) expr_); + } + if (exprCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_); + } + if (exprCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression other = + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) obj; + + if (!getExprCase().equals(other.getExprCase())) return false; + switch (exprCase_) { + case 1: + if (!getOrGroup().equals(other.getOrGroup())) return false; + break; + case 2: + if (!getNotExpression().equals(other.getNotExpression())) return false; + break; + case 3: + if (!getFilterCondition().equals(other.getFilterCondition())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (exprCase_) { + case 1: + hash = (37 * hash) + OR_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getOrGroup().hashCode(); + break; + case 2: + hash = (37 * hash) + NOT_EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getNotExpression().hashCode(); + break; + case 3: + hash = (37 * hash) + FILTER_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getFilterCondition().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A logical expression of Subproperty event filters.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterExpression} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (orGroupBuilder_ != null) { + orGroupBuilder_.clear(); + } + if (notExpressionBuilder_ != null) { + notExpressionBuilder_.clear(); + } + if (filterConditionBuilder_ != null) { + filterConditionBuilder_.clear(); + } + exprCase_ = 0; + expr_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression build() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression buildPartial() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression result = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression result) { + result.exprCase_ = exprCase_; + result.expr_ = this.expr_; + if (exprCase_ == 1 && orGroupBuilder_ != null) { + result.expr_ = orGroupBuilder_.build(); + } + if (exprCase_ == 2 && notExpressionBuilder_ != null) { + result.expr_ = notExpressionBuilder_.build(); + } + if (exprCase_ == 3 && filterConditionBuilder_ != null) { + result.expr_ = filterConditionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression other) { + if (other + == com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance()) return this; + switch (other.getExprCase()) { + case OR_GROUP: + { + mergeOrGroup(other.getOrGroup()); + break; + } + case NOT_EXPRESSION: + { + mergeNotExpression(other.getNotExpression()); + break; + } + case FILTER_CONDITION: + { + mergeFilterCondition(other.getFilterCondition()); + break; + } + case EXPR_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOrGroupFieldBuilder().getBuilder(), extensionRegistry); + exprCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getNotExpressionFieldBuilder().getBuilder(), extensionRegistry); + exprCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getFilterConditionFieldBuilder().getBuilder(), extensionRegistry); + exprCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int exprCase_ = 0; + private java.lang.Object expr_; + + public ExprCase getExprCase() { + return ExprCase.forNumber(exprCase_); + } + + public Builder clearExpr() { + exprCase_ = 0; + expr_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionListOrBuilder> + orGroupBuilder_; + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + * + * @return Whether the orGroup field is set. + */ + @java.lang.Override + public boolean hasOrGroup() { + return exprCase_ == 1; + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + * + * @return The orGroup. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList getOrGroup() { + if (orGroupBuilder_ == null) { + if (exprCase_ == 1) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance(); + } else { + if (exprCase_ == 1) { + return orGroupBuilder_.getMessage(); + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + */ + public Builder setOrGroup( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList value) { + if (orGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expr_ = value; + onChanged(); + } else { + orGroupBuilder_.setMessage(value); + } + exprCase_ = 1; + return this; + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + */ + public Builder setOrGroup( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.Builder + builderForValue) { + if (orGroupBuilder_ == null) { + expr_ = builderForValue.build(); + onChanged(); + } else { + orGroupBuilder_.setMessage(builderForValue.build()); + } + exprCase_ = 1; + return this; + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + */ + public Builder mergeOrGroup( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList value) { + if (orGroupBuilder_ == null) { + if (exprCase_ == 1 + && expr_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance()) { + expr_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.newBuilder( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) + expr_) + .mergeFrom(value) + .buildPartial(); + } else { + expr_ = value; + } + onChanged(); + } else { + if (exprCase_ == 1) { + orGroupBuilder_.mergeFrom(value); + } else { + orGroupBuilder_.setMessage(value); + } + } + exprCase_ = 1; + return this; + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + */ + public Builder clearOrGroup() { + if (orGroupBuilder_ == null) { + if (exprCase_ == 1) { + exprCase_ = 0; + expr_ = null; + onChanged(); + } + } else { + if (exprCase_ == 1) { + exprCase_ = 0; + expr_ = null; + } + orGroupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.Builder + getOrGroupBuilder() { + return getOrGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionListOrBuilder + getOrGroupOrBuilder() { + if ((exprCase_ == 1) && (orGroupBuilder_ != null)) { + return orGroupBuilder_.getMessageOrBuilder(); + } else { + if (exprCase_ == 1) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A list of expressions to OR’ed together. Must only contain
+     * not_expression or filter_condition expressions.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionListOrBuilder> + getOrGroupFieldBuilder() { + if (orGroupBuilder_ == null) { + if (!(exprCase_ == 1)) { + expr_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance(); + } + orGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionListOrBuilder>( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) expr_, + getParentForChildren(), + isClean()); + expr_ = null; + } + exprCase_ = 1; + onChanged(); + return orGroupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + notExpressionBuilder_; + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + * + * @return Whether the notExpression field is set. + */ + @java.lang.Override + public boolean hasNotExpression() { + return exprCase_ == 2; + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + * + * @return The notExpression. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getNotExpression() { + if (notExpressionBuilder_ == null) { + if (exprCase_ == 2) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance(); + } else { + if (exprCase_ == 2) { + return notExpressionBuilder_.getMessage(); + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + public Builder setNotExpression( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression value) { + if (notExpressionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expr_ = value; + onChanged(); + } else { + notExpressionBuilder_.setMessage(value); + } + exprCase_ = 2; + return this; + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + public Builder setNotExpression( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + builderForValue) { + if (notExpressionBuilder_ == null) { + expr_ = builderForValue.build(); + onChanged(); + } else { + notExpressionBuilder_.setMessage(builderForValue.build()); + } + exprCase_ = 2; + return this; + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + public Builder mergeNotExpression( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression value) { + if (notExpressionBuilder_ == null) { + if (exprCase_ == 2 + && expr_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance()) { + expr_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.newBuilder( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_) + .mergeFrom(value) + .buildPartial(); + } else { + expr_ = value; + } + onChanged(); + } else { + if (exprCase_ == 2) { + notExpressionBuilder_.mergeFrom(value); + } else { + notExpressionBuilder_.setMessage(value); + } + } + exprCase_ = 2; + return this; + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + public Builder clearNotExpression() { + if (notExpressionBuilder_ == null) { + if (exprCase_ == 2) { + exprCase_ = 0; + expr_ = null; + onChanged(); + } + } else { + if (exprCase_ == 2) { + exprCase_ = 0; + expr_ = null; + } + notExpressionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + getNotExpressionBuilder() { + return getNotExpressionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getNotExpressionOrBuilder() { + if ((exprCase_ == 2) && (notExpressionBuilder_ != null)) { + return notExpressionBuilder_.getMessageOrBuilder(); + } else { + if (exprCase_ == 2) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter expression to be NOT'ed (inverted, complemented). It can only
+     * include a filter. This cannot be set on the top level
+     * SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + getNotExpressionFieldBuilder() { + if (notExpressionBuilder_ == null) { + if (!(exprCase_ == 2)) { + expr_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance(); + } + notExpressionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder>( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) expr_, + getParentForChildren(), + isClean()); + expr_ = null; + } + exprCase_ = 2; + onChanged(); + return notExpressionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterConditionOrBuilder> + filterConditionBuilder_; + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + * + * @return Whether the filterCondition field is set. + */ + @java.lang.Override + public boolean hasFilterCondition() { + return exprCase_ == 3; + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + * + * @return The filterCondition. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition getFilterCondition() { + if (filterConditionBuilder_ == null) { + if (exprCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .getDefaultInstance(); + } else { + if (exprCase_ == 3) { + return filterConditionBuilder_.getMessage(); + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + public Builder setFilterCondition( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition value) { + if (filterConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expr_ = value; + onChanged(); + } else { + filterConditionBuilder_.setMessage(value); + } + exprCase_ = 3; + return this; + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + public Builder setFilterCondition( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.Builder + builderForValue) { + if (filterConditionBuilder_ == null) { + expr_ = builderForValue.build(); + onChanged(); + } else { + filterConditionBuilder_.setMessage(builderForValue.build()); + } + exprCase_ = 3; + return this; + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + public Builder mergeFilterCondition( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition value) { + if (filterConditionBuilder_ == null) { + if (exprCase_ == 3 + && expr_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .getDefaultInstance()) { + expr_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.newBuilder( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_) + .mergeFrom(value) + .buildPartial(); + } else { + expr_ = value; + } + onChanged(); + } else { + if (exprCase_ == 3) { + filterConditionBuilder_.mergeFrom(value); + } else { + filterConditionBuilder_.setMessage(value); + } + } + exprCase_ = 3; + return this; + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + public Builder clearFilterCondition() { + if (filterConditionBuilder_ == null) { + if (exprCase_ == 3) { + exprCase_ = 0; + expr_ = null; + onChanged(); + } + } else { + if (exprCase_ == 3) { + exprCase_ = 0; + expr_ = null; + } + filterConditionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.Builder + getFilterConditionBuilder() { + return getFilterConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterConditionOrBuilder + getFilterConditionOrBuilder() { + if ((exprCase_ == 3) && (filterConditionBuilder_ != null)) { + return filterConditionBuilder_.getMessageOrBuilder(); + } else { + if (exprCase_ == 3) { + return (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_; + } + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Creates a filter that matches a specific event. This cannot be set on the
+     * top level SubpropertyEventFilterExpression.
+     * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterConditionOrBuilder> + getFilterConditionFieldBuilder() { + if (filterConditionBuilder_ == null) { + if (!(exprCase_ == 3)) { + expr_ = + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition + .getDefaultInstance(); + } + filterConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterConditionOrBuilder>( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition) expr_, + getParentForChildren(), + isClean()); + expr_ = null; + } + exprCase_ = 3; + onChanged(); + return filterConditionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) + private static final com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression(); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubpropertyEventFilterExpression parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionList.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionList.java new file mode 100644 index 000000000000..87cf420aa05a --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionList.java @@ -0,0 +1,1037 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A list of Subproperty event filter expressions.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList} + */ +public final class SubpropertyEventFilterExpressionList + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) + SubpropertyEventFilterExpressionListOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubpropertyEventFilterExpressionList.newBuilder() to construct. + private SubpropertyEventFilterExpressionList( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubpropertyEventFilterExpressionList() { + filterExpressions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubpropertyEventFilterExpressionList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.Builder.class); + } + + public static final int FILTER_EXPRESSIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + filterExpressions_; + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public java.util.List + getFilterExpressionsList() { + return filterExpressions_; + } + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + getFilterExpressionsOrBuilderList() { + return filterExpressions_; + } + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public int getFilterExpressionsCount() { + return filterExpressions_.size(); + } + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getFilterExpressions( + int index) { + return filterExpressions_.get(index); + } + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getFilterExpressionsOrBuilder(int index) { + return filterExpressions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < filterExpressions_.size(); i++) { + output.writeMessage(1, filterExpressions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < filterExpressions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, filterExpressions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList other = + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) obj; + + if (!getFilterExpressionsList().equals(other.getFilterExpressionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFilterExpressionsCount() > 0) { + hash = (37 * hash) + FILTER_EXPRESSIONS_FIELD_NUMBER; + hash = (53 * hash) + getFilterExpressionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of Subproperty event filter expressions.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.class, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.Builder + .class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (filterExpressionsBuilder_ == null) { + filterExpressions_ = java.util.Collections.emptyList(); + } else { + filterExpressions_ = null; + filterExpressionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterProto + .internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList build() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList buildPartial() { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList result = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList result) { + if (filterExpressionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + filterExpressions_ = java.util.Collections.unmodifiableList(filterExpressions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.filterExpressions_ = filterExpressions_; + } else { + result.filterExpressions_ = filterExpressionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList other) { + if (other + == com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + .getDefaultInstance()) return this; + if (filterExpressionsBuilder_ == null) { + if (!other.filterExpressions_.isEmpty()) { + if (filterExpressions_.isEmpty()) { + filterExpressions_ = other.filterExpressions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFilterExpressionsIsMutable(); + filterExpressions_.addAll(other.filterExpressions_); + } + onChanged(); + } + } else { + if (!other.filterExpressions_.isEmpty()) { + if (filterExpressionsBuilder_.isEmpty()) { + filterExpressionsBuilder_.dispose(); + filterExpressionsBuilder_ = null; + filterExpressions_ = other.filterExpressions_; + bitField0_ = (bitField0_ & ~0x00000001); + filterExpressionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFilterExpressionsFieldBuilder() + : null; + } else { + filterExpressionsBuilder_.addAllMessages(other.filterExpressions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression m = + input.readMessage( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .parser(), + extensionRegistry); + if (filterExpressionsBuilder_ == null) { + ensureFilterExpressionsIsMutable(); + filterExpressions_.add(m); + } else { + filterExpressionsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + filterExpressions_ = java.util.Collections.emptyList(); + + private void ensureFilterExpressionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + filterExpressions_ = + new java.util.ArrayList< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression>( + filterExpressions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + filterExpressionsBuilder_; + + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public java.util.List + getFilterExpressionsList() { + if (filterExpressionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(filterExpressions_); + } else { + return filterExpressionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public int getFilterExpressionsCount() { + if (filterExpressionsBuilder_ == null) { + return filterExpressions_.size(); + } else { + return filterExpressionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getFilterExpressions( + int index) { + if (filterExpressionsBuilder_ == null) { + return filterExpressions_.get(index); + } else { + return filterExpressionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder setFilterExpressions( + int index, com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression value) { + if (filterExpressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterExpressionsIsMutable(); + filterExpressions_.set(index, value); + onChanged(); + } else { + filterExpressionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder setFilterExpressions( + int index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + builderForValue) { + if (filterExpressionsBuilder_ == null) { + ensureFilterExpressionsIsMutable(); + filterExpressions_.set(index, builderForValue.build()); + onChanged(); + } else { + filterExpressionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterExpressions( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression value) { + if (filterExpressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterExpressionsIsMutable(); + filterExpressions_.add(value); + onChanged(); + } else { + filterExpressionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterExpressions( + int index, com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression value) { + if (filterExpressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterExpressionsIsMutable(); + filterExpressions_.add(index, value); + onChanged(); + } else { + filterExpressionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterExpressions( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + builderForValue) { + if (filterExpressionsBuilder_ == null) { + ensureFilterExpressionsIsMutable(); + filterExpressions_.add(builderForValue.build()); + onChanged(); + } else { + filterExpressionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addFilterExpressions( + int index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + builderForValue) { + if (filterExpressionsBuilder_ == null) { + ensureFilterExpressionsIsMutable(); + filterExpressions_.add(index, builderForValue.build()); + onChanged(); + } else { + filterExpressionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder addAllFilterExpressions( + java.lang.Iterable< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression> + values) { + if (filterExpressionsBuilder_ == null) { + ensureFilterExpressionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, filterExpressions_); + onChanged(); + } else { + filterExpressionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder clearFilterExpressions() { + if (filterExpressionsBuilder_ == null) { + filterExpressions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + filterExpressionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public Builder removeFilterExpressions(int index) { + if (filterExpressionsBuilder_ == null) { + ensureFilterExpressionsIsMutable(); + filterExpressions_.remove(index); + onChanged(); + } else { + filterExpressionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + getFilterExpressionsBuilder(int index) { + return getFilterExpressionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getFilterExpressionsOrBuilder(int index) { + if (filterExpressionsBuilder_ == null) { + return filterExpressions_.get(index); + } else { + return filterExpressionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public java.util.List< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + getFilterExpressionsOrBuilderList() { + if (filterExpressionsBuilder_ != null) { + return filterExpressionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filterExpressions_); + } + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + addFilterExpressionsBuilder() { + return getFilterExpressionsFieldBuilder() + .addBuilder( + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder + addFilterExpressionsBuilder(int index) { + return getFilterExpressionsFieldBuilder() + .addBuilder( + index, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression + .getDefaultInstance()); + } + /** + * + * + *
+     * Required. Unordered list. A list of Subproperty event filter expressions
+     * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + public java.util.List< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder> + getFilterExpressionsBuilderList() { + return getFilterExpressionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + getFilterExpressionsFieldBuilder() { + if (filterExpressionsBuilder_ == null) { + filterExpressionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder>( + filterExpressions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + filterExpressions_ = null; + } + return filterExpressionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) + private static final com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList(); + } + + public static com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubpropertyEventFilterExpressionList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionListOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionListOrBuilder.java new file mode 100644 index 000000000000..1e74881f418f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionListOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +public interface SubpropertyEventFilterExpressionListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + java.util.List + getFilterExpressionsList(); + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getFilterExpressions( + int index); + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + int getFilterExpressionsCount(); + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + java.util.List< + ? extends com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder> + getFilterExpressionsOrBuilderList(); + /** + * + * + *
+   * Required. Unordered list. A list of Subproperty event filter expressions
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression filter_expressions = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getFilterExpressionsOrBuilder(int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionOrBuilder.java new file mode 100644 index 000000000000..bb4d99e9179e --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterExpressionOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +public interface SubpropertyEventFilterExpressionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.SubpropertyEventFilterExpression) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of expressions to OR’ed together. Must only contain
+   * not_expression or filter_condition expressions.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + * @return Whether the orGroup field is set. + */ + boolean hasOrGroup(); + /** + * + * + *
+   * A list of expressions to OR’ed together. Must only contain
+   * not_expression or filter_condition expressions.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + * + * @return The orGroup. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList getOrGroup(); + /** + * + * + *
+   * A list of expressions to OR’ed together. Must only contain
+   * not_expression or filter_condition expressions.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionList or_group = 1; + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionListOrBuilder + getOrGroupOrBuilder(); + + /** + * + * + *
+   * A filter expression to be NOT'ed (inverted, complemented). It can only
+   * include a filter. This cannot be set on the top level
+   * SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + * + * @return Whether the notExpression field is set. + */ + boolean hasNotExpression(); + /** + * + * + *
+   * A filter expression to be NOT'ed (inverted, complemented). It can only
+   * include a filter. This cannot be set on the top level
+   * SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + * + * @return The notExpression. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression getNotExpression(); + /** + * + * + *
+   * A filter expression to be NOT'ed (inverted, complemented). It can only
+   * include a filter. This cannot be set on the top level
+   * SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterExpression not_expression = 2; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpressionOrBuilder + getNotExpressionOrBuilder(); + + /** + * + * + *
+   * Creates a filter that matches a specific event. This cannot be set on the
+   * top level SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + * + * @return Whether the filterCondition field is set. + */ + boolean hasFilterCondition(); + /** + * + * + *
+   * Creates a filter that matches a specific event. This cannot be set on the
+   * top level SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + * + * @return The filterCondition. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterCondition getFilterCondition(); + /** + * + * + *
+   * Creates a filter that matches a specific event. This cannot be set on the
+   * top level SubpropertyEventFilterExpression.
+   * 
+ * + * .google.analytics.admin.v1alpha.SubpropertyEventFilterCondition filter_condition = 3; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterConditionOrBuilder + getFilterConditionOrBuilder(); + + com.google.analytics.admin.v1alpha.SubpropertyEventFilterExpression.ExprCase getExprCase(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterName.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterName.java new file mode 100644 index 000000000000..b160ace54854 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterName.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SubpropertyEventFilterName implements ResourceName { + private static final PathTemplate PROPERTY_SUB_PROPERTY_EVENT_FILTER = + PathTemplate.createWithoutUrlEncoding( + "properties/{property}/subpropertyEventFilters/{sub_property_event_filter}"); + private volatile Map fieldValuesMap; + private final String property; + private final String subPropertyEventFilter; + + @Deprecated + protected SubpropertyEventFilterName() { + property = null; + subPropertyEventFilter = null; + } + + private SubpropertyEventFilterName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + subPropertyEventFilter = Preconditions.checkNotNull(builder.getSubPropertyEventFilter()); + } + + public String getProperty() { + return property; + } + + public String getSubPropertyEventFilter() { + return subPropertyEventFilter; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SubpropertyEventFilterName of(String property, String subPropertyEventFilter) { + return newBuilder() + .setProperty(property) + .setSubPropertyEventFilter(subPropertyEventFilter) + .build(); + } + + public static String format(String property, String subPropertyEventFilter) { + return newBuilder() + .setProperty(property) + .setSubPropertyEventFilter(subPropertyEventFilter) + .build() + .toString(); + } + + public static SubpropertyEventFilterName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY_SUB_PROPERTY_EVENT_FILTER.validatedMatch( + formattedString, + "SubpropertyEventFilterName.parse: formattedString not in valid format"); + return of(matchMap.get("property"), matchMap.get("sub_property_event_filter")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SubpropertyEventFilterName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY_SUB_PROPERTY_EVENT_FILTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (subPropertyEventFilter != null) { + fieldMapBuilder.put("sub_property_event_filter", subPropertyEventFilter); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY_SUB_PROPERTY_EVENT_FILTER.instantiate( + "property", property, "sub_property_event_filter", subPropertyEventFilter); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SubpropertyEventFilterName that = ((SubpropertyEventFilterName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.subPropertyEventFilter, that.subPropertyEventFilter); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(subPropertyEventFilter); + return h; + } + + /** Builder for properties/{property}/subpropertyEventFilters/{sub_property_event_filter}. */ + public static class Builder { + private String property; + private String subPropertyEventFilter; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public String getSubPropertyEventFilter() { + return subPropertyEventFilter; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + public Builder setSubPropertyEventFilter(String subPropertyEventFilter) { + this.subPropertyEventFilter = subPropertyEventFilter; + return this; + } + + private Builder(SubpropertyEventFilterName subpropertyEventFilterName) { + this.property = subpropertyEventFilterName.property; + this.subPropertyEventFilter = subpropertyEventFilterName.subPropertyEventFilter; + } + + public SubpropertyEventFilterName build() { + return new SubpropertyEventFilterName(this); + } + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterOrBuilder.java new file mode 100644 index 000000000000..b0bee1b20692 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +public interface SubpropertyEventFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.SubpropertyEventFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Format:
+   * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+   * Example: properties/1234/subpropertyEventFilters/5678
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Format:
+   * properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter}
+   * Example: properties/1234/subpropertyEventFilters/5678
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. Resource name of the Subproperty that uses this filter.
+   * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the applyToProperty field is set. + */ + boolean hasApplyToProperty(); + /** + * + * + *
+   * Immutable. Resource name of the Subproperty that uses this filter.
+   * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The applyToProperty. + */ + java.lang.String getApplyToProperty(); + /** + * + * + *
+   * Immutable. Resource name of the Subproperty that uses this filter.
+   * 
+ * + * optional string apply_to_property = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for applyToProperty. + */ + com.google.protobuf.ByteString getApplyToPropertyBytes(); + + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + java.util.List + getFilterClausesList(); + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClause getFilterClauses(int index); + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + int getFilterClausesCount(); + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + java.util.List + getFilterClausesOrBuilderList(); + /** + * + * + *
+   * Required. Unordered list. Filter clauses that define the
+   * SubpropertyEventFilter. All clauses are AND'ed together to determine what
+   * data is sent to the subproperty.
+   * 
+ * + * + * repeated .google.analytics.admin.v1alpha.SubpropertyEventFilterClause filter_clauses = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterClauseOrBuilder + getFilterClausesOrBuilder(int index); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterProto.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterProto.java new file mode 100644 index 000000000000..58e0fe70a959 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/SubpropertyEventFilterProto.java @@ -0,0 +1,182 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/subproperty_event_filter.proto + +package com.google.analytics.admin.v1alpha; + +public final class SubpropertyEventFilterProto { + private SubpropertyEventFilterProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n=google/analytics/admin/v1alpha/subprop" + + "erty_event_filter.proto\022\036google.analytic" + + "s.admin.v1alpha\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\"\205\004\n\037" + + "SubpropertyEventFilterCondition\022\025\n\013null_" + + "filter\030\002 \001(\010H\000\022e\n\rstring_filter\030\003 \001(\0132L." + + "google.analytics.admin.v1alpha.Subproper" + + "tyEventFilterCondition.StringFilterH\000\022\030\n" + + "\nfield_name\030\001 \001(\tB\004\342A\001\002\032\273\002\n\014StringFilter" + + "\022p\n\nmatch_type\030\001 \001(\0162V.google.analytics." + + "admin.v1alpha.SubpropertyEventFilterCond" + + "ition.StringFilter.MatchTypeB\004\342A\001\002\022\023\n\005va" + + "lue\030\002 \001(\tB\004\342A\001\002\022\034\n\016case_sensitive\030\003 \001(\010B" + + "\004\342A\001\001\"\205\001\n\tMatchType\022\032\n\026MATCH_TYPE_UNSPEC" + + "IFIED\020\000\022\t\n\005EXACT\020\001\022\017\n\013BEGINS_WITH\020\002\022\r\n\tE" + + "NDS_WITH\020\003\022\014\n\010CONTAINS\020\004\022\017\n\013FULL_REGEXP\020" + + "\005\022\022\n\016PARTIAL_REGEXP\020\006B\014\n\none_filter\"\275\002\n " + + "SubpropertyEventFilterExpression\022X\n\010or_g" + + "roup\030\001 \001(\0132D.google.analytics.admin.v1al" + + "pha.SubpropertyEventFilterExpressionList" + + "H\000\022Z\n\016not_expression\030\002 \001(\0132@.google.anal" + + "ytics.admin.v1alpha.SubpropertyEventFilt" + + "erExpressionH\000\022[\n\020filter_condition\030\003 \001(\013" + + "2?.google.analytics.admin.v1alpha.Subpro" + + "pertyEventFilterConditionH\000B\006\n\004expr\"\213\001\n$" + + "SubpropertyEventFilterExpressionList\022c\n\022" + + "filter_expressions\030\001 \003(\0132@.google.analyt" + + "ics.admin.v1alpha.SubpropertyEventFilter" + + "ExpressionB\005\342A\002\002\006\"\304\002\n\034SubpropertyEventFi" + + "lterClause\022o\n\022filter_clause_type\030\001 \001(\0162M" + + ".google.analytics.admin.v1alpha.Subprope" + + "rtyEventFilterClause.FilterClauseTypeB\004\342" + + "A\001\002\022a\n\021filter_expression\030\002 \001(\0132@.google." + + "analytics.admin.v1alpha.SubpropertyEvent" + + "FilterExpressionB\004\342A\001\002\"P\n\020FilterClauseTy" + + "pe\022\"\n\036FILTER_CLAUSE_TYPE_UNSPECIFIED\020\000\022\013" + + "\n\007INCLUDE\020\001\022\013\n\007EXCLUDE\020\002\"\376\002\n\026Subproperty" + + "EventFilter\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022$\n\021apply" + + "_to_property\030\002 \001(\tB\004\342A\001\005H\000\210\001\001\022[\n\016filter_" + + "clauses\030\003 \003(\0132<.google.analytics.admin.v" + + "1alpha.SubpropertyEventFilterClauseB\005\342A\002" + + "\002\006:\266\001\352A\262\001\n4analyticsadmin.googleapis.com" + + "/SubpropertyEventFilter\022Iproperties/{pro" + + "perty}/subpropertyEventFilters/{sub_prop" + + "erty_event_filter}*\027subpropertyEventFilt" + + "ers2\026subpropertyEventFilterB\024\n\022_apply_to" + + "_propertyB\203\001\n\"com.google.analytics.admin" + + ".v1alphaB\033SubpropertyEventFilterProtoP\001Z" + + ">cloud.google.com/go/analytics/admin/api" + + "v1alpha/adminpb;adminpbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_descriptor, + new java.lang.String[] { + "NullFilter", "StringFilter", "FieldName", "OneFilter", + }); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_descriptor = + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_descriptor + .getNestedTypes() + .get(0); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterCondition_StringFilter_descriptor, + new java.lang.String[] { + "MatchType", "Value", "CaseSensitive", + }); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpression_descriptor, + new java.lang.String[] { + "OrGroup", "NotExpression", "FilterCondition", "Expr", + }); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterExpressionList_descriptor, + new java.lang.String[] { + "FilterExpressions", + }); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilterClause_descriptor, + new java.lang.String[] { + "FilterClauseType", "FilterExpression", + }); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_SubpropertyEventFilter_descriptor, + new java.lang.String[] { + "Name", "ApplyToProperty", "FilterClauses", "ApplyToProperty", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateDataRedactionSettingsRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateDataRedactionSettingsRequest.java new file mode 100644 index 000000000000..8a35f638b1a2 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateDataRedactionSettingsRequest.java @@ -0,0 +1,1074 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for UpdateDataRedactionSettings RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest} + */ +public final class UpdateDataRedactionSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) + UpdateDataRedactionSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDataRedactionSettingsRequest.newBuilder() to construct. + private UpdateDataRedactionSettingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDataRedactionSettingsRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDataRedactionSettingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest.class, + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest.Builder.class); + } + + public static final int DATA_REDACTION_SETTINGS_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1alpha.DataRedactionSettings dataRedactionSettings_; + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataRedactionSettings field is set. + */ + @java.lang.Override + public boolean hasDataRedactionSettings() { + return dataRedactionSettings_ != null; + } + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataRedactionSettings. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettings getDataRedactionSettings() { + return dataRedactionSettings_ == null + ? com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance() + : dataRedactionSettings_; + } + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder + getDataRedactionSettingsOrBuilder() { + return dataRedactionSettings_ == null + ? com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance() + : dataRedactionSettings_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake
+   * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake
+   * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake
+   * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dataRedactionSettings_ != null) { + output.writeMessage(1, getDataRedactionSettings()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataRedactionSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataRedactionSettings()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest other = + (com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) obj; + + if (hasDataRedactionSettings() != other.hasDataRedactionSettings()) return false; + if (hasDataRedactionSettings()) { + if (!getDataRedactionSettings().equals(other.getDataRedactionSettings())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataRedactionSettings()) { + hash = (37 * hash) + DATA_REDACTION_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDataRedactionSettings().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for UpdateDataRedactionSettings RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest.class, + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataRedactionSettings_ = null; + if (dataRedactionSettingsBuilder_ != null) { + dataRedactionSettingsBuilder_.dispose(); + dataRedactionSettingsBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateDataRedactionSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest build() { + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest buildPartial() { + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest result = + new com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataRedactionSettings_ = + dataRedactionSettingsBuilder_ == null + ? dataRedactionSettings_ + : dataRedactionSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest other) { + if (other + == com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + .getDefaultInstance()) return this; + if (other.hasDataRedactionSettings()) { + mergeDataRedactionSettings(other.getDataRedactionSettings()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getDataRedactionSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.analytics.admin.v1alpha.DataRedactionSettings dataRedactionSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.DataRedactionSettings, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder, + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder> + dataRedactionSettingsBuilder_; + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataRedactionSettings field is set. + */ + public boolean hasDataRedactionSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataRedactionSettings. + */ + public com.google.analytics.admin.v1alpha.DataRedactionSettings getDataRedactionSettings() { + if (dataRedactionSettingsBuilder_ == null) { + return dataRedactionSettings_ == null + ? com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance() + : dataRedactionSettings_; + } else { + return dataRedactionSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataRedactionSettings( + com.google.analytics.admin.v1alpha.DataRedactionSettings value) { + if (dataRedactionSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataRedactionSettings_ = value; + } else { + dataRedactionSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataRedactionSettings( + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder builderForValue) { + if (dataRedactionSettingsBuilder_ == null) { + dataRedactionSettings_ = builderForValue.build(); + } else { + dataRedactionSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataRedactionSettings( + com.google.analytics.admin.v1alpha.DataRedactionSettings value) { + if (dataRedactionSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && dataRedactionSettings_ != null + && dataRedactionSettings_ + != com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance()) { + getDataRedactionSettingsBuilder().mergeFrom(value); + } else { + dataRedactionSettings_ = value; + } + } else { + dataRedactionSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataRedactionSettings() { + bitField0_ = (bitField0_ & ~0x00000001); + dataRedactionSettings_ = null; + if (dataRedactionSettingsBuilder_ != null) { + dataRedactionSettingsBuilder_.dispose(); + dataRedactionSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder + getDataRedactionSettingsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDataRedactionSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder + getDataRedactionSettingsOrBuilder() { + if (dataRedactionSettingsBuilder_ != null) { + return dataRedactionSettingsBuilder_.getMessageOrBuilder(); + } else { + return dataRedactionSettings_ == null + ? com.google.analytics.admin.v1alpha.DataRedactionSettings.getDefaultInstance() + : dataRedactionSettings_; + } + } + /** + * + * + *
+     * Required. The settings to update.
+     * The `name` field is used to identify the settings to be updated.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.DataRedactionSettings, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder, + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder> + getDataRedactionSettingsFieldBuilder() { + if (dataRedactionSettingsBuilder_ == null) { + dataRedactionSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.DataRedactionSettings, + com.google.analytics.admin.v1alpha.DataRedactionSettings.Builder, + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder>( + getDataRedactionSettings(), getParentForChildren(), isClean()); + dataRedactionSettings_ = null; + } + return dataRedactionSettingsBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to be updated. Field names must be in snake
+     * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) + private static final com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest(); + } + + public static com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataRedactionSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateDataRedactionSettingsRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateDataRedactionSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..d80e67ab3db1 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateDataRedactionSettingsRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface UpdateDataRedactionSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataRedactionSettings field is set. + */ + boolean hasDataRedactionSettings(); + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataRedactionSettings. + */ + com.google.analytics.admin.v1alpha.DataRedactionSettings getDataRedactionSettings(); + /** + * + * + *
+   * Required. The settings to update.
+   * The `name` field is used to identify the settings to be updated.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.DataRedactionSettings data_redaction_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1alpha.DataRedactionSettingsOrBuilder + getDataRedactionSettingsOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake
+   * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake
+   * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to be updated. Field names must be in snake
+   * case (e.g., "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateSubpropertyEventFilterRequest.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateSubpropertyEventFilterRequest.java new file mode 100644 index 000000000000..9876da44f3db --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateSubpropertyEventFilterRequest.java @@ -0,0 +1,1064 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for UpdateSubpropertyEventFilter RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest} + */ +public final class UpdateSubpropertyEventFilterRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) + UpdateSubpropertyEventFilterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSubpropertyEventFilterRequest.newBuilder() to construct. + private UpdateSubpropertyEventFilterRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSubpropertyEventFilterRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSubpropertyEventFilterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest.Builder.class); + } + + public static final int SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER = 1; + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; + /** + * + * + *
+   * Required. The subproperty event filter to update.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + @java.lang.Override + public boolean hasSubpropertyEventFilter() { + return subpropertyEventFilter_ != null; + } + /** + * + * + *
+   * Required. The subproperty event filter to update.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subpropertyEventFilter. + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + /** + * + * + *
+   * Required. The subproperty event filter to update.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subpropertyEventFilter_ != null) { + output.writeMessage(1, getSubpropertyEventFilter()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (subpropertyEventFilter_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubpropertyEventFilter()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest other = + (com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) obj; + + if (hasSubpropertyEventFilter() != other.hasSubpropertyEventFilter()) return false; + if (hasSubpropertyEventFilter()) { + if (!getSubpropertyEventFilter().equals(other.getSubpropertyEventFilter())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubpropertyEventFilter()) { + hash = (37 * hash) + SUBPROPERTY_EVENT_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getSubpropertyEventFilter().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for UpdateSubpropertyEventFilter RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest.class, + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest.Builder.class); + } + + // Construct using + // com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_UpdateSubpropertyEventFilterRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest build() { + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest buildPartial() { + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest result = + new com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subpropertyEventFilter_ = + subpropertyEventFilterBuilder_ == null + ? subpropertyEventFilter_ + : subpropertyEventFilterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) { + return mergeFrom( + (com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest other) { + if (other + == com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + .getDefaultInstance()) return this; + if (other.hasSubpropertyEventFilter()) { + mergeSubpropertyEventFilter(other.getSubpropertyEventFilter()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getSubpropertyEventFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.analytics.admin.v1alpha.SubpropertyEventFilter subpropertyEventFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + subpropertyEventFilterBuilder_; + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + public boolean hasSubpropertyEventFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subpropertyEventFilter. + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter() { + if (subpropertyEventFilterBuilder_ == null) { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } else { + return subpropertyEventFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subpropertyEventFilter_ = value; + } else { + subpropertyEventFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder builderForValue) { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilter_ = builderForValue.build(); + } else { + subpropertyEventFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSubpropertyEventFilter( + com.google.analytics.admin.v1alpha.SubpropertyEventFilter value) { + if (subpropertyEventFilterBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && subpropertyEventFilter_ != null + && subpropertyEventFilter_ + != com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance()) { + getSubpropertyEventFilterBuilder().mergeFrom(value); + } else { + subpropertyEventFilter_ = value; + } + } else { + subpropertyEventFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSubpropertyEventFilter() { + bitField0_ = (bitField0_ & ~0x00000001); + subpropertyEventFilter_ = null; + if (subpropertyEventFilterBuilder_ != null) { + subpropertyEventFilterBuilder_.dispose(); + subpropertyEventFilterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder + getSubpropertyEventFilterBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubpropertyEventFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder() { + if (subpropertyEventFilterBuilder_ != null) { + return subpropertyEventFilterBuilder_.getMessageOrBuilder(); + } else { + return subpropertyEventFilter_ == null + ? com.google.analytics.admin.v1alpha.SubpropertyEventFilter.getDefaultInstance() + : subpropertyEventFilter_; + } + } + /** + * + * + *
+     * Required. The subproperty event filter to update.
+     * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder> + getSubpropertyEventFilterFieldBuilder() { + if (subpropertyEventFilterBuilder_ == null) { + subpropertyEventFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.admin.v1alpha.SubpropertyEventFilter, + com.google.analytics.admin.v1alpha.SubpropertyEventFilter.Builder, + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder>( + getSubpropertyEventFilter(), getParentForChildren(), isClean()); + subpropertyEventFilter_ = null; + } + return subpropertyEventFilterBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The list of fields to update. Field names must be in snake case
+     * (for example, "field_to_update"). Omitted fields will not be updated. To
+     * replace the entire entity, use one path with the string "*" to match all
+     * fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) + private static final com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest(); + } + + public static com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubpropertyEventFilterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateSubpropertyEventFilterRequestOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateSubpropertyEventFilterRequestOrBuilder.java new file mode 100644 index 000000000000..9aac2a776f4f --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UpdateSubpropertyEventFilterRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface UpdateSubpropertyEventFilterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.UpdateSubpropertyEventFilterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The subproperty event filter to update.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subpropertyEventFilter field is set. + */ + boolean hasSubpropertyEventFilter(); + /** + * + * + *
+   * Required. The subproperty event filter to update.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subpropertyEventFilter. + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilter getSubpropertyEventFilter(); + /** + * + * + *
+   * Required. The subproperty event filter to update.
+   * 
+ * + * + * .google.analytics.admin.v1alpha.SubpropertyEventFilter subproperty_event_filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.analytics.admin.v1alpha.SubpropertyEventFilterOrBuilder + getSubpropertyEventFilterOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The list of fields to update. Field names must be in snake case
+   * (for example, "field_to_update"). Omitted fields will not be updated. To
+   * replace the entire entity, use one path with the string "*" to match all
+   * fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLink.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLink.java deleted file mode 100644 index f8cfe6cde872..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLink.java +++ /dev/null @@ -1,1266 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/resources.proto - -package com.google.analytics.admin.v1alpha; - -/** - * - * - *
- * A resource message representing a user's permissions on an Account or
- * Property resource.
- * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.UserLink} - */ -public final class UserLink extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.UserLink) - UserLinkOrBuilder { - private static final long serialVersionUID = 0L; - // Use UserLink.newBuilder() to construct. - private UserLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UserLink() { - name_ = ""; - emailAddress_ = ""; - directRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UserLink(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_UserLink_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_UserLink_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.UserLink.class, - com.google.analytics.admin.v1alpha.UserLink.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Output only. Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EMAIL_ADDRESS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object emailAddress_ = ""; - /** - * - * - *
-   * Immutable. Email address of the user to link
-   * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The emailAddress. - */ - @java.lang.Override - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - emailAddress_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Email address of the user to link
-   * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for emailAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIRECT_ROLES_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList directRoles_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return A list containing the directRoles. - */ - public com.google.protobuf.ProtocolStringList getDirectRolesList() { - return directRoles_; - } - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return The count of directRoles. - */ - public int getDirectRolesCount() { - return directRoles_.size(); - } - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the element to return. - * @return The directRoles at the given index. - */ - public java.lang.String getDirectRoles(int index) { - return directRoles_.get(index); - } - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the value to return. - * @return The bytes of the directRoles at the given index. - */ - public com.google.protobuf.ByteString getDirectRolesBytes(int index) { - return directRoles_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, emailAddress_); - } - for (int i = 0; i < directRoles_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, directRoles_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, emailAddress_); - } - { - int dataSize = 0; - for (int i = 0; i < directRoles_.size(); i++) { - dataSize += computeStringSizeNoTag(directRoles_.getRaw(i)); - } - size += dataSize; - size += 1 * getDirectRolesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.analytics.admin.v1alpha.UserLink)) { - return super.equals(obj); - } - com.google.analytics.admin.v1alpha.UserLink other = - (com.google.analytics.admin.v1alpha.UserLink) obj; - - if (!getName().equals(other.getName())) return false; - if (!getEmailAddress().equals(other.getEmailAddress())) return false; - if (!getDirectRolesList().equals(other.getDirectRolesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + EMAIL_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getEmailAddress().hashCode(); - if (getDirectRolesCount() > 0) { - hash = (37 * hash) + DIRECT_ROLES_FIELD_NUMBER; - hash = (53 * hash) + getDirectRolesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.analytics.admin.v1alpha.UserLink parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.analytics.admin.v1alpha.UserLink prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A resource message representing a user's permissions on an Account or
-   * Property resource.
-   * 
- * - * Protobuf type {@code google.analytics.admin.v1alpha.UserLink} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.UserLink) - com.google.analytics.admin.v1alpha.UserLinkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_UserLink_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_UserLink_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.UserLink.class, - com.google.analytics.admin.v1alpha.UserLink.Builder.class); - } - - // Construct using com.google.analytics.admin.v1alpha.UserLink.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - emailAddress_ = ""; - directRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.ResourcesProto - .internal_static_google_analytics_admin_v1alpha_UserLink_descriptor; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance(); - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink build() { - com.google.analytics.admin.v1alpha.UserLink result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink buildPartial() { - com.google.analytics.admin.v1alpha.UserLink result = - new com.google.analytics.admin.v1alpha.UserLink(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.analytics.admin.v1alpha.UserLink result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.emailAddress_ = emailAddress_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - directRoles_.makeImmutable(); - result.directRoles_ = directRoles_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.UserLink) { - return mergeFrom((com.google.analytics.admin.v1alpha.UserLink) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.analytics.admin.v1alpha.UserLink other) { - if (other == com.google.analytics.admin.v1alpha.UserLink.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getEmailAddress().isEmpty()) { - emailAddress_ = other.emailAddress_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.directRoles_.isEmpty()) { - if (directRoles_.isEmpty()) { - directRoles_ = other.directRoles_; - bitField0_ |= 0x00000004; - } else { - ensureDirectRolesIsMutable(); - directRoles_.addAll(other.directRoles_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - emailAddress_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDirectRolesIsMutable(); - directRoles_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Example format: properties/1234/userLinks/5678
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object emailAddress_ = ""; - /** - * - * - *
-     * Immutable. Email address of the user to link
-     * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The emailAddress. - */ - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - emailAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Email address of the user to link
-     * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for emailAddress. - */ - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Email address of the user to link
-     * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - emailAddress_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Email address of the user to link
-     * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearEmailAddress() { - emailAddress_ = getDefaultInstance().getEmailAddress(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Email address of the user to link
-     * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - emailAddress_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList directRoles_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureDirectRolesIsMutable() { - if (!directRoles_.isModifiable()) { - directRoles_ = new com.google.protobuf.LazyStringArrayList(directRoles_); - } - bitField0_ |= 0x00000004; - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @return A list containing the directRoles. - */ - public com.google.protobuf.ProtocolStringList getDirectRolesList() { - directRoles_.makeImmutable(); - return directRoles_; - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @return The count of directRoles. - */ - public int getDirectRolesCount() { - return directRoles_.size(); - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the element to return. - * @return The directRoles at the given index. - */ - public java.lang.String getDirectRoles(int index) { - return directRoles_.get(index); - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the value to return. - * @return The bytes of the directRoles at the given index. - */ - public com.google.protobuf.ByteString getDirectRolesBytes(int index) { - return directRoles_.getByteString(index); - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param index The index to set the value at. - * @param value The directRoles to set. - * @return This builder for chaining. - */ - public Builder setDirectRoles(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDirectRolesIsMutable(); - directRoles_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param value The directRoles to add. - * @return This builder for chaining. - */ - public Builder addDirectRoles(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDirectRolesIsMutable(); - directRoles_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param values The directRoles to add. - * @return This builder for chaining. - */ - public Builder addAllDirectRoles(java.lang.Iterable values) { - ensureDirectRolesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, directRoles_); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @return This builder for chaining. - */ - public Builder clearDirectRoles() { - directRoles_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - ; - onChanged(); - return this; - } - /** - * - * - *
-     * Roles directly assigned to this user for this account or property.
-     *
-     * Valid values:
-     * predefinedRoles/viewer
-     * predefinedRoles/analyst
-     * predefinedRoles/editor
-     * predefinedRoles/admin
-     * predefinedRoles/no-cost-data
-     * predefinedRoles/no-revenue-data
-     *
-     * Excludes roles that are inherited from a higher-level entity, group,
-     * or organization admin role.
-     *
-     * A UserLink that is updated to have an empty list of direct_roles will be
-     * deleted.
-     * 
- * - * repeated string direct_roles = 3; - * - * @param value The bytes of the directRoles to add. - * @return This builder for chaining. - */ - public Builder addDirectRolesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDirectRolesIsMutable(); - directRoles_.add(value); - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.UserLink) - } - - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.UserLink) - private static final com.google.analytics.admin.v1alpha.UserLink DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.UserLink(); - } - - public static com.google.analytics.admin.v1alpha.UserLink getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UserLink parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.analytics.admin.v1alpha.UserLink getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkName.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkName.java deleted file mode 100644 index 3257631b58bf..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkName.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.analytics.admin.v1alpha; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class UserLinkName implements ResourceName { - private static final PathTemplate ACCOUNT_USER_LINK = - PathTemplate.createWithoutUrlEncoding("accounts/{account}/userLinks/{user_link}"); - private static final PathTemplate PROPERTY_USER_LINK = - PathTemplate.createWithoutUrlEncoding("properties/{property}/userLinks/{user_link}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String account; - private final String userLink; - private final String property; - - @Deprecated - protected UserLinkName() { - account = null; - userLink = null; - property = null; - } - - private UserLinkName(Builder builder) { - account = Preconditions.checkNotNull(builder.getAccount()); - userLink = Preconditions.checkNotNull(builder.getUserLink()); - property = null; - pathTemplate = ACCOUNT_USER_LINK; - } - - private UserLinkName(PropertyUserLinkBuilder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - userLink = Preconditions.checkNotNull(builder.getUserLink()); - account = null; - pathTemplate = PROPERTY_USER_LINK; - } - - public String getAccount() { - return account; - } - - public String getUserLink() { - return userLink; - } - - public String getProperty() { - return property; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newAccountUserLinkBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static PropertyUserLinkBuilder newPropertyUserLinkBuilder() { - return new PropertyUserLinkBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static UserLinkName of(String account, String userLink) { - return newBuilder().setAccount(account).setUserLink(userLink).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static UserLinkName ofAccountUserLinkName(String account, String userLink) { - return newBuilder().setAccount(account).setUserLink(userLink).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static UserLinkName ofPropertyUserLinkName(String property, String userLink) { - return newPropertyUserLinkBuilder().setProperty(property).setUserLink(userLink).build(); - } - - public static String format(String account, String userLink) { - return newBuilder().setAccount(account).setUserLink(userLink).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatAccountUserLinkName(String account, String userLink) { - return newBuilder().setAccount(account).setUserLink(userLink).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatPropertyUserLinkName(String property, String userLink) { - return newPropertyUserLinkBuilder() - .setProperty(property) - .setUserLink(userLink) - .build() - .toString(); - } - - public static UserLinkName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (ACCOUNT_USER_LINK.matches(formattedString)) { - Map matchMap = ACCOUNT_USER_LINK.match(formattedString); - return ofAccountUserLinkName(matchMap.get("account"), matchMap.get("user_link")); - } else if (PROPERTY_USER_LINK.matches(formattedString)) { - Map matchMap = PROPERTY_USER_LINK.match(formattedString); - return ofPropertyUserLinkName(matchMap.get("property"), matchMap.get("user_link")); - } - throw new ValidationException("UserLinkName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (UserLinkName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ACCOUNT_USER_LINK.matches(formattedString) - || PROPERTY_USER_LINK.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (account != null) { - fieldMapBuilder.put("account", account); - } - if (userLink != null) { - fieldMapBuilder.put("user_link", userLink); - } - if (property != null) { - fieldMapBuilder.put("property", property); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null && getClass() == o.getClass()) { - UserLinkName that = ((UserLinkName) o); - return Objects.equals(this.account, that.account) - && Objects.equals(this.userLink, that.userLink) - && Objects.equals(this.property, that.property); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(account); - h *= 1000003; - h ^= Objects.hashCode(userLink); - h *= 1000003; - h ^= Objects.hashCode(property); - return h; - } - - /** Builder for accounts/{account}/userLinks/{user_link}. */ - public static class Builder { - private String account; - private String userLink; - - protected Builder() {} - - public String getAccount() { - return account; - } - - public String getUserLink() { - return userLink; - } - - public Builder setAccount(String account) { - this.account = account; - return this; - } - - public Builder setUserLink(String userLink) { - this.userLink = userLink; - return this; - } - - private Builder(UserLinkName userLinkName) { - Preconditions.checkArgument( - Objects.equals(userLinkName.pathTemplate, ACCOUNT_USER_LINK), - "toBuilder is only supported when UserLinkName has the pattern of accounts/{account}/userLinks/{user_link}"); - this.account = userLinkName.account; - this.userLink = userLinkName.userLink; - } - - public UserLinkName build() { - return new UserLinkName(this); - } - } - - /** Builder for properties/{property}/userLinks/{user_link}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class PropertyUserLinkBuilder { - private String property; - private String userLink; - - protected PropertyUserLinkBuilder() {} - - public String getProperty() { - return property; - } - - public String getUserLink() { - return userLink; - } - - public PropertyUserLinkBuilder setProperty(String property) { - this.property = property; - return this; - } - - public PropertyUserLinkBuilder setUserLink(String userLink) { - this.userLink = userLink; - return this; - } - - public UserLinkName build() { - return new UserLinkName(this); - } - } -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkOrBuilder.java b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkOrBuilder.java deleted file mode 100644 index 0b5aa4e1bbbc..000000000000 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkOrBuilder.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/resources.proto - -package com.google.analytics.admin.v1alpha; - -public interface UserLinkOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.UserLink) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. Example format: properties/1234/userLinks/5678
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Immutable. Email address of the user to link
-   * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The emailAddress. - */ - java.lang.String getEmailAddress(); - /** - * - * - *
-   * Immutable. Email address of the user to link
-   * 
- * - * string email_address = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for emailAddress. - */ - com.google.protobuf.ByteString getEmailAddressBytes(); - - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return A list containing the directRoles. - */ - java.util.List getDirectRolesList(); - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @return The count of directRoles. - */ - int getDirectRolesCount(); - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the element to return. - * @return The directRoles at the given index. - */ - java.lang.String getDirectRoles(int index); - /** - * - * - *
-   * Roles directly assigned to this user for this account or property.
-   *
-   * Valid values:
-   * predefinedRoles/viewer
-   * predefinedRoles/analyst
-   * predefinedRoles/editor
-   * predefinedRoles/admin
-   * predefinedRoles/no-cost-data
-   * predefinedRoles/no-revenue-data
-   *
-   * Excludes roles that are inherited from a higher-level entity, group,
-   * or organization admin role.
-   *
-   * A UserLink that is updated to have an empty list of direct_roles will be
-   * deleted.
-   * 
- * - * repeated string direct_roles = 3; - * - * @param index The index of the value to return. - * @return The bytes of the directRoles at the given index. - */ - com.google.protobuf.ByteString getDirectRolesBytes(int index); -} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto index 15eec30fc8f3..ce1b3eeebe7e 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto @@ -22,6 +22,7 @@ import "google/analytics/admin/v1alpha/channel_group.proto"; import "google/analytics/admin/v1alpha/event_create_and_edit.proto"; import "google/analytics/admin/v1alpha/expanded_data_set.proto"; import "google/analytics/admin/v1alpha/resources.proto"; +import "google/analytics/admin/v1alpha/subproperty_event_filter.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; @@ -70,7 +71,7 @@ service AnalyticsAdminService { // // If the accounts are not restored before the expiration time, the account // and all child resources (eg: Properties, GoogleAdsLinks, Streams, - // UserLinks) will be permanently purged. + // AccessBindings) will be permanently purged. // https://support.google.com/analytics/answer/6154772 // // Returns an error if the target is not found. @@ -142,7 +143,7 @@ service AnalyticsAdminService { // However, they can be restored using the Trash Can UI. // // If the properties are not restored before the expiration time, the Property - // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + // and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) // will be permanently purged. // https://support.google.com/analytics/answer/6154772 // @@ -163,136 +164,6 @@ service AnalyticsAdminService { option (google.api.method_signature) = "property,update_mask"; } - // Gets information about a user's link to an account or property. - rpc GetUserLink(GetUserLinkRequest) returns (UserLink) { - option (google.api.http) = { - get: "/v1alpha/{name=accounts/*/userLinks/*}" - additional_bindings { get: "/v1alpha/{name=properties/*/userLinks/*}" } - }; - option (google.api.method_signature) = "name"; - } - - // Gets information about multiple users' links to an account or property. - rpc BatchGetUserLinks(BatchGetUserLinksRequest) - returns (BatchGetUserLinksResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=accounts/*}/userLinks:batchGet" - additional_bindings { - get: "/v1alpha/{parent=properties/*}/userLinks:batchGet" - } - }; - } - - // Lists all user links on an account or property. - rpc ListUserLinks(ListUserLinksRequest) returns (ListUserLinksResponse) { - option (google.api.http) = { - get: "/v1alpha/{parent=accounts/*}/userLinks" - additional_bindings { get: "/v1alpha/{parent=properties/*}/userLinks" } - }; - option (google.api.method_signature) = "parent"; - } - - // Lists all user links on an account or property, including implicit ones - // that come from effective permissions granted by groups or organization - // admin roles. - // - // If a returned user link does not have direct permissions, they cannot - // be removed from the account or property directly with the DeleteUserLink - // command. They have to be removed from the group/etc that gives them - // permissions, which is currently only usable/discoverable in the GA or GMP - // UIs. - rpc AuditUserLinks(AuditUserLinksRequest) returns (AuditUserLinksResponse) { - option (google.api.http) = { - post: "/v1alpha/{parent=accounts/*}/userLinks:audit" - body: "*" - additional_bindings { - post: "/v1alpha/{parent=properties/*}/userLinks:audit" - body: "*" - } - }; - } - - // Creates a user link on an account or property. - // - // If the user with the specified email already has permissions on the - // account or property, then the user's existing permissions will be unioned - // with the permissions specified in the new UserLink. - rpc CreateUserLink(CreateUserLinkRequest) returns (UserLink) { - option (google.api.http) = { - post: "/v1alpha/{parent=accounts/*}/userLinks" - body: "user_link" - additional_bindings { - post: "/v1alpha/{parent=properties/*}/userLinks" - body: "user_link" - } - }; - option (google.api.method_signature) = "parent,user_link"; - } - - // Creates information about multiple users' links to an account or property. - // - // This method is transactional. If any UserLink cannot be created, none of - // the UserLinks will be created. - rpc BatchCreateUserLinks(BatchCreateUserLinksRequest) - returns (BatchCreateUserLinksResponse) { - option (google.api.http) = { - post: "/v1alpha/{parent=accounts/*}/userLinks:batchCreate" - body: "*" - additional_bindings { - post: "/v1alpha/{parent=properties/*}/userLinks:batchCreate" - body: "*" - } - }; - } - - // Updates a user link on an account or property. - rpc UpdateUserLink(UpdateUserLinkRequest) returns (UserLink) { - option (google.api.http) = { - patch: "/v1alpha/{user_link.name=accounts/*/userLinks/*}" - body: "user_link" - additional_bindings { - patch: "/v1alpha/{user_link.name=properties/*/userLinks/*}" - body: "user_link" - } - }; - option (google.api.method_signature) = "user_link"; - } - - // Updates information about multiple users' links to an account or property. - rpc BatchUpdateUserLinks(BatchUpdateUserLinksRequest) - returns (BatchUpdateUserLinksResponse) { - option (google.api.http) = { - post: "/v1alpha/{parent=accounts/*}/userLinks:batchUpdate" - body: "*" - additional_bindings { - post: "/v1alpha/{parent=properties/*}/userLinks:batchUpdate" - body: "*" - } - }; - } - - // Deletes a user link on an account or property. - rpc DeleteUserLink(DeleteUserLinkRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1alpha/{name=accounts/*/userLinks/*}" - additional_bindings { delete: "/v1alpha/{name=properties/*/userLinks/*}" } - }; - option (google.api.method_signature) = "name"; - } - - // Deletes information about multiple users' links to an account or property. - rpc BatchDeleteUserLinks(BatchDeleteUserLinksRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1alpha/{parent=accounts/*}/userLinks:batchDelete" - body: "*" - additional_bindings { - post: "/v1alpha/{parent=properties/*}/userLinks:batchDelete" - body: "*" - } - }; - } - // Creates a FirebaseLink. // // Properties can have at most one FirebaseLink. @@ -1385,6 +1256,130 @@ service AnalyticsAdminService { }; option (google.api.method_signature) = "name"; } + + // Updates a DataRedactionSettings on a property. + rpc UpdateDataRedactionSettings(UpdateDataRedactionSettingsRequest) + returns (DataRedactionSettings) { + option (google.api.http) = { + patch: "/v1alpha/{data_redaction_settings.name=properties/*/dataStreams/*/dataRedactionSettings}" + body: "data_redaction_settings" + }; + option (google.api.method_signature) = + "data_redaction_settings,update_mask"; + } + + // Lookup for a single DataRedactionSettings. + rpc GetDataRedactionSettings(GetDataRedactionSettingsRequest) + returns (DataRedactionSettings) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/dataStreams/*/dataRedactionSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a roll-up property and all roll-up property source links. + rpc CreateRollupProperty(CreateRollupPropertyRequest) + returns (CreateRollupPropertyResponse) { + option (google.api.http) = { + post: "/v1alpha/properties:createRollupProperty" + body: "*" + }; + } + + // Lookup for a single roll-up property source Link. + // Only roll-up properties can have source links, so this method will throw an + // error if used on other types of properties. + rpc GetRollupPropertySourceLink(GetRollupPropertySourceLinkRequest) + returns (RollupPropertySourceLink) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists roll-up property source Links on a property. + // Only roll-up properties can have source links, so this method will throw an + // error if used on other types of properties. + rpc ListRollupPropertySourceLinks(ListRollupPropertySourceLinksRequest) + returns (ListRollupPropertySourceLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/rollupPropertySourceLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a roll-up property source link. + // Only roll-up properties can have source links, so this method will throw an + // error if used on other types of properties. + rpc CreateRollupPropertySourceLink(CreateRollupPropertySourceLinkRequest) + returns (RollupPropertySourceLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/rollupPropertySourceLinks" + body: "rollup_property_source_link" + }; + option (google.api.method_signature) = "parent,rollup_property_source_link"; + } + + // Deletes a roll-up property source link. + // Only roll-up properties can have source links, so this method will throw an + // error if used on other types of properties. + rpc DeleteRollupPropertySourceLink(DeleteRollupPropertySourceLinkRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/rollupPropertySourceLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a subproperty and a subproperty event filter that applies to the + // created subproperty. + rpc CreateSubproperty(CreateSubpropertyRequest) + returns (CreateSubpropertyResponse) { + option (google.api.http) = { + post: "/v1alpha/properties:createSubproperty" + body: "*" + }; + } + + // Deletes a subproperty event filter. + rpc DeleteSubpropertyEventFilter(DeleteSubpropertyEventFilterRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/subpropertyEventFilters/*}" + }; + option (google.api.method_signature) = "name"; + } + + + + + + + + + + + + + + + + + + + + + + // Creates a subproperty Event Filter. + rpc CreateSubpropertyEventFilter(CreateSubpropertyEventFilterRequest) + returns (SubpropertyEventFilter) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/subpropertyEventFilters" + body: "subproperty_event_filter" + }; + option (google.api.method_signature) = "parent,subproperty_event_filter"; + } + } // The request for a Data Access Record Report. @@ -1465,6 +1460,19 @@ message RunAccessReportRequest { // quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level // requests, this field must be false. bool return_entity_quota = 11; + + // Optional. Determines whether to include users who have never made an API + // call in the response. If true, all users with access to the specified + // property or account are included in the response, regardless of whether + // they have made an API call or not. If false, only the users who have made + // an API call will be included. + bool include_all_users = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Decides whether to return the users within user groups. This + // field works only when include_all_users is set to true. If true, it will + // return all users with access to the specified property or account. + // If false, only the users with direct access will be returned. + bool expand_groups = 13 [(google.api.field_behavior) = OPTIONAL]; } // The customized Data Access Record Report response. @@ -1679,230 +1687,6 @@ message DeletePropertyRequest { ]; } -// Request message for GetUserLink RPC. -message GetUserLinkRequest { - // Required. Example format: accounts/1234/userLinks/5678 - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/UserLink" - } - ]; -} - -// Request message for BatchGetUserLinks RPC. -message BatchGetUserLinksRequest { - // Required. The account or property that all user links in the request are - // for. The parent of all provided values for the 'names' field must match - // this field. - // Example format: accounts/1234 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsadmin.googleapis.com/UserLink" - } - ]; - - // Required. The names of the user links to retrieve. - // A maximum of 1000 user links can be retrieved in a batch. - // Format: accounts/{accountId}/userLinks/{userLinkId} - repeated string names = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/UserLink" - } - ]; -} - -// Response message for BatchGetUserLinks RPC. -message BatchGetUserLinksResponse { - // The requested user links. - repeated UserLink user_links = 1; -} - -// Request message for ListUserLinks RPC. -message ListUserLinksRequest { - // Required. Example format: accounts/1234 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsadmin.googleapis.com/UserLink" - } - ]; - - // The maximum number of user links to return. - // The service may return fewer than this value. - // If unspecified, at most 200 user links will be returned. - // The maximum value is 500; values above 500 will be coerced to 500. - int32 page_size = 2; - - // A page token, received from a previous `ListUserLinks` call. - // Provide this to retrieve the subsequent page. - // When paginating, all other parameters provided to `ListUserLinks` must - // match the call that provided the page token. - string page_token = 3; -} - -// Response message for ListUserLinks RPC. -message ListUserLinksResponse { - // List of UserLinks. These will be ordered stably, but in an arbitrary order. - repeated UserLink user_links = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for AuditUserLinks RPC. -message AuditUserLinksRequest { - // Required. Example format: accounts/1234 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsadmin.googleapis.com/UserLink" - } - ]; - - // The maximum number of user links to return. - // The service may return fewer than this value. - // If unspecified, at most 1000 user links will be returned. - // The maximum value is 5000; values above 5000 will be coerced to 5000. - int32 page_size = 2; - - // A page token, received from a previous `AuditUserLinks` call. - // Provide this to retrieve the subsequent page. - // When paginating, all other parameters provided to `AuditUserLinks` must - // match the call that provided the page token. - string page_token = 3; -} - -// Response message for AuditUserLinks RPC. -message AuditUserLinksResponse { - // List of AuditUserLinks. These will be ordered stably, but in an arbitrary - // order. - repeated AuditUserLink user_links = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request message for CreateUserLink RPC. -// -// Users can have multiple email addresses associated with their Google -// account, and one of these email addresses is the "primary" email address. -// Any of the email addresses associated with a Google account may be used -// for a new UserLink, but the returned UserLink will always contain the -// "primary" email address. As a result, the input and output email address -// for this request may differ. -message CreateUserLinkRequest { - // Required. Example format: accounts/1234 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsadmin.googleapis.com/UserLink" - } - ]; - - // Optional. If set, then email the new user notifying them that they've been - // granted permissions to the resource. - bool notify_new_user = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The user link to create. - UserLink user_link = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for BatchCreateUserLinks RPC. -message BatchCreateUserLinksRequest { - // Required. The account or property that all user links in the request are - // for. This field is required. The parent field in the CreateUserLinkRequest - // messages must either be empty or match this field. - // Example format: accounts/1234 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsadmin.googleapis.com/UserLink" - } - ]; - - // Optional. If set, then email the new users notifying them that they've been - // granted permissions to the resource. Regardless of whether this is set or - // not, notify_new_user field inside each individual request is ignored. - bool notify_new_users = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The requests specifying the user links to create. - // A maximum of 1000 user links can be created in a batch. - repeated CreateUserLinkRequest requests = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for BatchCreateUserLinks RPC. -message BatchCreateUserLinksResponse { - // The user links created. - repeated UserLink user_links = 1; -} - -// Request message for UpdateUserLink RPC. -message UpdateUserLinkRequest { - // Required. The user link to update. - UserLink user_link = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for BatchUpdateUserLinks RPC. -message BatchUpdateUserLinksRequest { - // Required. The account or property that all user links in the request are - // for. The parent field in the UpdateUserLinkRequest messages must either be - // empty or match this field. - // Example format: accounts/1234 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsadmin.googleapis.com/UserLink" - } - ]; - - // Required. The requests specifying the user links to update. - // A maximum of 1000 user links can be updated in a batch. - repeated UpdateUserLinkRequest requests = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for BatchUpdateUserLinks RPC. -message BatchUpdateUserLinksResponse { - // The user links updated. - repeated UserLink user_links = 1; -} - -// Request message for DeleteUserLink RPC. -message DeleteUserLinkRequest { - // Required. Example format: accounts/1234/userLinks/5678 - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/UserLink" - } - ]; -} - -// Request message for BatchDeleteUserLinks RPC. -message BatchDeleteUserLinksRequest { - // Required. The account or property that all user links in the request are - // for. The parent of all values for user link names to delete must match this - // field. - // Example format: accounts/1234 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "analyticsadmin.googleapis.com/UserLink" - } - ]; - - // Required. The requests specifying the user links to update. - // A maximum of 1000 user links can be updated in a batch. - repeated DeleteUserLinkRequest requests = 2 - [(google.api.field_behavior) = REQUIRED]; -} - // Request message for CreateFirebaseLink RPC message CreateFirebaseLinkRequest { // Required. Format: properties/{property_id} @@ -2322,9 +2106,10 @@ message UpdateSKAdNetworkConversionValueSchemaRequest { // Request message for ListSKAdNetworkConversionValueSchemas RPC message ListSKAdNetworkConversionValueSchemasRequest { - // Required. Format: - // properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema - // Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema + // Required. The DataStream resource to list schemas for. + // Format: + // properties/{property_id}/dataStreams/{dataStream} + // Example: properties/1234/dataStreams/5678 string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -3619,6 +3404,35 @@ message UpdateEnhancedMeasurementSettingsRequest { [(google.api.field_behavior) = REQUIRED]; } +// Request message for GetDataRedactionSettings RPC. +message GetDataRedactionSettingsRequest { + // Required. The name of the settings to lookup. + // Format: + // properties/{property}/dataStreams/{data_stream}/dataRedactionSettings + // Example: "properties/1000/dataStreams/2000/dataRedactionSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataRedactionSettings" + } + ]; +} + +// Request message for UpdateDataRedactionSettings RPC. +message UpdateDataRedactionSettingsRequest { + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + DataRedactionSettings data_redaction_settings = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake + // case (e.g., "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + // Request message for CreateConnectedSiteTag RPC. message CreateConnectedSiteTagRequest { // The Universal Analytics property to create connected site tags for. @@ -3855,3 +3669,224 @@ message ListEventCreateRulesResponse { // If this field is omitted, there are no subsequent pages. string next_page_token = 2; } + +// Request message for CreateRollupProperty RPC. +message CreateRollupPropertyRequest { + // Required. The roll-up property to create. + Property rollup_property = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The resource names of properties that will be sources to the + // created roll-up property. + repeated string source_properties = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for CreateRollupProperty RPC. +message CreateRollupPropertyResponse { + // The created roll-up property. + Property rollup_property = 1; + + // The created roll-up property source links. + repeated RollupPropertySourceLink rollup_property_source_links = 2; +} + +// Request message for GetRollupPropertySourceLink RPC. +message GetRollupPropertySourceLinkRequest { + // Required. The name of the roll-up property source link to lookup. + // Format: + // properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} + // Example: properties/123/rollupPropertySourceLinks/456 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/RollupPropertySourceLink" + } + ]; +} + +// Request message for ListRollupPropertySourceLinks RPC. +message ListRollupPropertySourceLinksRequest { + // Required. The name of the roll-up property to list roll-up property source + // links under. Format: properties/{property_id} Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/RollupPropertySourceLink" + } + ]; + + // Optional. The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListRollupPropertySourceLinks` call. Provide this to retrieve the + // subsequent page. When paginating, all other parameters provided to + // `ListRollupPropertySourceLinks` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListRollupPropertySourceLinks RPC. +message ListRollupPropertySourceLinksResponse { + // List of RollupPropertySourceLinks. + repeated RollupPropertySourceLink rollup_property_source_links = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateRollupPropertySourceLink RPC. +message CreateRollupPropertySourceLinkRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/RollupPropertySourceLink" + } + ]; + + // Required. The roll-up property source link to create. + RollupPropertySourceLink rollup_property_source_link = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteRollupPropertySourceLink RPC. +message DeleteRollupPropertySourceLinkRequest { + // Required. Format: + // properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link_id} + // Example: properties/1234/rollupPropertySourceLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/RollupPropertySourceLink" + } + ]; +} + +// Request message for CreateSubproperty RPC. +message CreateSubpropertyRequest { + // Required. The ordinary property for which to create a subproperty. + // Format: properties/property_id + // Example: properties/123 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Required. The subproperty to create. + Property subproperty = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The subproperty event filter to create on an ordinary property. + SubpropertyEventFilter subproperty_event_filter = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for CreateSubproperty RPC. +message CreateSubpropertyResponse { + // The created subproperty. + Property subproperty = 1; + + // The created subproperty event filter. + SubpropertyEventFilter subproperty_event_filter = 2; +} + +// Request message for CreateSubpropertyEventFilter RPC. +message CreateSubpropertyEventFilterRequest { + // Required. The ordinary property for which to create a subproperty event + // filter. Format: properties/property_id Example: properties/123 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/SubpropertyEventFilter" + } + ]; + + // Required. The subproperty event filter to create. + SubpropertyEventFilter subproperty_event_filter = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for GetSubpropertyEventFilter RPC. +message GetSubpropertyEventFilterRequest { + // Required. Resource name of the subproperty event filter to lookup. + // Format: + // properties/property_id/subpropertyEventFilters/subproperty_event_filter + // Example: properties/123/subpropertyEventFilters/456 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/SubpropertyEventFilter" + } + ]; +} + +// Request message for ListSubpropertyEventFilters RPC. +message ListSubpropertyEventFiltersRequest { + // Required. Resource name of the ordinary property. + // Format: properties/property_id + // Example: properties/123 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/SubpropertyEventFilter" + } + ]; + + // Optional. The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. If unspecified, + // at most 50 resources will be returned. The maximum value is 200; (higher + // values will be coerced to the maximum) + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListSubpropertyEventFilters` call. Provide this to retrieve the subsequent + // page. When paginating, all other parameters provided to + // `ListSubpropertyEventFilters` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListSubpropertyEventFilter RPC. +message ListSubpropertyEventFiltersResponse { + // List of subproperty event filters. + repeated SubpropertyEventFilter subproperty_event_filters = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. If + // this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for UpdateSubpropertyEventFilter RPC. +message UpdateSubpropertyEventFilterRequest { + // Required. The subproperty event filter to update. + SubpropertyEventFilter subproperty_event_filter = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. Field names must be in snake case + // (for example, "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteSubpropertyEventFilter RPC. +message DeleteSubpropertyEventFilterRequest { + // Required. Resource name of the subproperty event filter to delete. + // Format: + // properties/property_id/subpropertyEventFilters/subproperty_event_filter + // Example: properties/123/subpropertyEventFilters/456 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/SubpropertyEventFilter" + } + ]; +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto index 99d334173650..4c252dd747df 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto @@ -216,6 +216,9 @@ enum ChangeHistoryResourceType { // EnhancedMeasurementSettings resource ENHANCED_MEASUREMENT_SETTINGS = 24; + // DataRedactionSettings resource + DATA_REDACTION_SETTINGS = 25; + // SKAdNetworkConversionValueSchema resource SKADNETWORK_CONVERSION_VALUE_SCHEMA = 26; @@ -379,8 +382,7 @@ message Property { // Immutable. The property type for this Property resource. When creating a // property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then - // "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" - // types cannot yet be created with the Google Analytics Admin API. + // "ORDINARY_PROPERTY" will be implied. PropertyType property_type = 14 [(google.api.field_behavior) = IMMUTABLE]; // Output only. Time when the entity was originally created. @@ -557,62 +559,6 @@ message DataStream { [(google.api.field_behavior) = OUTPUT_ONLY]; } -// A resource message representing a user's permissions on an Account or -// Property resource. -message UserLink { - option (google.api.resource) = { - type: "analyticsadmin.googleapis.com/UserLink" - pattern: "accounts/{account}/userLinks/{user_link}" - pattern: "properties/{property}/userLinks/{user_link}" - }; - - // Output only. Example format: properties/1234/userLinks/5678 - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Immutable. Email address of the user to link - string email_address = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Roles directly assigned to this user for this account or property. - // - // Valid values: - // predefinedRoles/viewer - // predefinedRoles/analyst - // predefinedRoles/editor - // predefinedRoles/admin - // predefinedRoles/no-cost-data - // predefinedRoles/no-revenue-data - // - // Excludes roles that are inherited from a higher-level entity, group, - // or organization admin role. - // - // A UserLink that is updated to have an empty list of direct_roles will be - // deleted. - repeated string direct_roles = 3; -} - -// Read-only resource used to summarize a principal's effective roles. -message AuditUserLink { - // Example format: properties/1234/userLinks/5678 - string name = 1; - - // Email address of the linked user - string email_address = 2; - - // Roles directly assigned to this user for this entity. - // - // Format: predefinedRoles/viewer - // - // Excludes roles that are inherited from an account (if this is for a - // property), group, or organization admin role. - repeated string direct_roles = 3; - - // Union of all permissions a user has at this account or property (includes - // direct permissions, group-inherited permissions, etc.). - // - // Format: predefinedRoles/viewer - repeated string effective_roles = 4; -} - // A link between a GA4 property and a Firebase project. message FirebaseLink { option (google.api.resource) = { @@ -1014,6 +960,9 @@ message ChangeHistoryChange { // A snapshot of EnhancedMeasurementSettings resource in change history. EnhancedMeasurementSettings enhanced_measurement_settings = 24; + // A snapshot of DataRedactionSettings resource in change history. + DataRedactionSettings data_redaction_settings = 25; + // A snapshot of SKAdNetworkConversionValueSchema resource in change // history. SKAdNetworkConversionValueSchema skadnetwork_conversion_value_schema = 26; @@ -1814,6 +1763,39 @@ message ConnectedSiteTag { string tag_id = 2 [(google.api.field_behavior) = REQUIRED]; } +// Settings for client-side data redaction. Singleton resource under a Web +// Stream. +message DataRedactionSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataRedactionSettings" + pattern: "properties/{property}/dataStreams/{data_stream}/dataRedactionSettings" + }; + + // Output only. Name of this Data Redaction Settings resource. + // Format: + // properties/{property_id}/dataStreams/{data_stream}/dataRedactionSettings + // Example: "properties/1000/dataStreams/2000/dataRedactionSettings" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // If enabled, any event parameter or user property values that look like an + // email will be redacted. + bool email_redaction_enabled = 2; + + // Query Parameter redaction removes the key and value portions of a + // query parameter if it is in the configured set of query parameters. + // + // If enabled, URL query replacement logic will be run for the Stream. Any + // query parameters defined in query_parameter_keys will be redacted. + bool query_parameter_redaction_enabled = 3; + + // The query parameter keys to apply redaction logic to if present in the URL. + // Query parameter matching is case-insensitive. + // + // Must contain at least one element if query_parameter_replacement_enabled + // is true. Keys cannot contain commas. + repeated string query_parameter_keys = 4; +} + // A link between a GA4 Property and an AdSense for Content ad client. message AdSenseLink { option (google.api.resource) = { @@ -1830,3 +1812,24 @@ message AdSenseLink { // Example format: "ca-pub-1234567890" string ad_client_code = 2 [(google.api.field_behavior) = IMMUTABLE]; } + +// A link that references a source property under the parent rollup property. +message RollupPropertySourceLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/RollupPropertySourceLink" + pattern: "properties/{property}/rollupPropertySourceLinks/{rollup_property_source_link}" + plural: "rollupPropertySourceLinks" + singular: "rollupPropertySourceLink" + }; + + // Output only. Resource name of this RollupPropertySourceLink. + // Format: + // 'properties/{property_id}/rollupPropertySourceLinks/{rollup_property_source_link}' + // Format: 'properties/123/rollupPropertySourceLinks/456' + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Resource name of the source property. + // Format: properties/{property_id} + // Example: "properties/789" + string source_property = 2 [(google.api.field_behavior) = IMMUTABLE]; +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/subproperty_event_filter.proto b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/subproperty_event_filter.proto new file mode 100644 index 000000000000..b5f06eea3d71 --- /dev/null +++ b/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/subproperty_event_filter.proto @@ -0,0 +1,159 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "SubpropertyEventFilterProto"; +option java_package = "com.google.analytics.admin.v1alpha"; + +// A specific filter expression +message SubpropertyEventFilterCondition { + // A filter for a string-type dimension that matches a particular pattern. + message StringFilter { + // How the filter will be used to determine a match. + enum MatchType { + // Match type unknown or not specified. + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full regular expression matches with the string value. + FULL_REGEXP = 5; + + // Partial regular expression matches with the string value. + PARTIAL_REGEXP = 6; + } + + // Required. The match type for the string filter. + MatchType match_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The string value used for the matching. + string value = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, the string value is case sensitive. If false, the + // match is case-insensitive. + bool case_sensitive = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + oneof one_filter { + // A filter for null values. + bool null_filter = 2; + + // A filter for a string-type dimension that matches a particular pattern. + StringFilter string_filter = 3; + } + + // Required. The field that is being filtered. + string field_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A logical expression of Subproperty event filters. +message SubpropertyEventFilterExpression { + // The expression applied to a filter. + oneof expr { + // A list of expressions to OR’ed together. Must only contain + // not_expression or filter_condition expressions. + SubpropertyEventFilterExpressionList or_group = 1; + + // A filter expression to be NOT'ed (inverted, complemented). It can only + // include a filter. This cannot be set on the top level + // SubpropertyEventFilterExpression. + SubpropertyEventFilterExpression not_expression = 2; + + // Creates a filter that matches a specific event. This cannot be set on the + // top level SubpropertyEventFilterExpression. + SubpropertyEventFilterCondition filter_condition = 3; + } +} + +// A list of Subproperty event filter expressions. +message SubpropertyEventFilterExpressionList { + // Required. Unordered list. A list of Subproperty event filter expressions + repeated SubpropertyEventFilterExpression filter_expressions = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = UNORDERED_LIST + ]; +} + +// A clause for defining a filter. A filter may be inclusive (events satisfying +// the filter clause are included in the subproperty's data) or exclusive +// (events satisfying the filter clause are excluded from the subproperty's +// data). +message SubpropertyEventFilterClause { + // Specifies whether this is an include or exclude filter clause. + enum FilterClauseType { + // Filter clause type unknown or not specified. + FILTER_CLAUSE_TYPE_UNSPECIFIED = 0; + + // Events will be included in the Sub property if the filter clause is met. + INCLUDE = 1; + + // Events will be excluded from the Sub property if the filter clause is + // met. + EXCLUDE = 2; + } + + // Required. The type for the filter clause. + FilterClauseType filter_clause_type = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical expression for what events are sent to the + // subproperty. + SubpropertyEventFilterExpression filter_expression = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A resource message representing a GA4 Subproperty event filter. +message SubpropertyEventFilter { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/SubpropertyEventFilter" + pattern: "properties/{property}/subpropertyEventFilters/{sub_property_event_filter}" + plural: "subpropertyEventFilters" + singular: "subpropertyEventFilter" + }; + + // Output only. Format: + // properties/{ordinary_property_id}/subpropertyEventFilters/{sub_property_event_filter} + // Example: properties/1234/subpropertyEventFilters/5678 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Resource name of the Subproperty that uses this filter. + optional string apply_to_property = 2 + [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Unordered list. Filter clauses that define the + // SubpropertyEventFilter. All clauses are AND'ed together to determine what + // data is sent to the subproperty. + repeated SubpropertyEventFilterClause filter_clauses = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = UNORDERED_LIST + ]; +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml b/java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml index c212cfa8fcdc..37dcaecd0013 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml +++ b/java-analytics-admin/proto-google-analytics-admin-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-admin-v1beta - 0.38.0 + 0.39.0 proto-google-analytics-admin-v1beta Proto library for google-analytics-admin com.google.analytics google-analytics-admin-parent - 0.38.0 + 0.39.0 diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchcreateuserlinks/AsyncBatchCreateUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchcreateuserlinks/AsyncBatchCreateUserLinks.java deleted file mode 100644 index 2103f1b3b89f..000000000000 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchcreateuserlinks/AsyncBatchCreateUserLinks.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.analytics.admin.v1alpha.samples; - -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_async] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; -import com.google.api.core.ApiFuture; -import java.util.ArrayList; - -public class AsyncBatchCreateUserLinks { - - public static void main(String[] args) throws Exception { - asyncBatchCreateUserLinks(); - } - - public static void asyncBatchCreateUserLinks() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUsers(true) - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - analyticsAdminServiceClient.batchCreateUserLinksCallable().futureCall(request); - // Do something. - BatchCreateUserLinksResponse response = future.get(); - } - } -} -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchcreateuserlinks/SyncBatchCreateUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchcreateuserlinks/SyncBatchCreateUserLinks.java deleted file mode 100644 index 7c181f780bdb..000000000000 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchcreateuserlinks/SyncBatchCreateUserLinks.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.analytics.admin.v1alpha.samples; - -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_sync] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; -import java.util.ArrayList; - -public class SyncBatchCreateUserLinks { - - public static void main(String[] args) throws Exception { - syncBatchCreateUserLinks(); - } - - public static void syncBatchCreateUserLinks() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUsers(true) - .addAllRequests(new ArrayList()) - .build(); - BatchCreateUserLinksResponse response = - analyticsAdminServiceClient.batchCreateUserLinks(request); - } - } -} -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchupdateuserlinks/SyncBatchUpdateUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchupdateuserlinks/SyncBatchUpdateUserLinks.java deleted file mode 100644 index a6a8e9ceb621..000000000000 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchupdateuserlinks/SyncBatchUpdateUserLinks.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.analytics.admin.v1alpha.samples; - -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_sync] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; -import java.util.ArrayList; - -public class SyncBatchUpdateUserLinks { - - public static void main(String[] args) throws Exception { - syncBatchUpdateUserLinks(); - } - - public static void syncBatchUpdateUserLinks() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - BatchUpdateUserLinksRequest request = - BatchUpdateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) - .build(); - BatchUpdateUserLinksResponse response = - analyticsAdminServiceClient.batchUpdateUserLinks(request); - } - } -} -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/AsyncCreateUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrollupproperty/AsyncCreateRollupProperty.java similarity index 64% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/AsyncCreateUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrollupproperty/AsyncCreateRollupProperty.java index a4381ba6137b..aa840b2700af 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/AsyncCreateUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrollupproperty/AsyncCreateRollupProperty.java @@ -16,20 +16,21 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_async] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupProperty_async] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse; +import com.google.analytics.admin.v1alpha.Property; import com.google.api.core.ApiFuture; +import java.util.ArrayList; -public class AsyncCreateUserLink { +public class AsyncCreateRollupProperty { public static void main(String[] args) throws Exception { - asyncCreateUserLink(); + asyncCreateRollupProperty(); } - public static void asyncCreateUserLink() throws Exception { + public static void asyncCreateRollupProperty() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -37,17 +38,16 @@ public static void asyncCreateUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - CreateUserLinkRequest request = - CreateUserLinkRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUser(true) - .setUserLink(UserLink.newBuilder().build()) + CreateRollupPropertyRequest request = + CreateRollupPropertyRequest.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllSourceProperties(new ArrayList()) .build(); - ApiFuture future = - analyticsAdminServiceClient.createUserLinkCallable().futureCall(request); + ApiFuture future = + analyticsAdminServiceClient.createRollupPropertyCallable().futureCall(request); // Do something. - UserLink response = future.get(); + CreateRollupPropertyResponse response = future.get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupProperty_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrollupproperty/SyncCreateRollupProperty.java similarity index 66% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrollupproperty/SyncCreateRollupProperty.java index 2c1f1ec8d810..da24e9d8d397 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrollupproperty/SyncCreateRollupProperty.java @@ -16,19 +16,20 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_sync] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupProperty_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.CreateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyRequest; +import com.google.analytics.admin.v1alpha.CreateRollupPropertyResponse; +import com.google.analytics.admin.v1alpha.Property; +import java.util.ArrayList; -public class SyncCreateUserLink { +public class SyncCreateRollupProperty { public static void main(String[] args) throws Exception { - syncCreateUserLink(); + syncCreateRollupProperty(); } - public static void syncCreateUserLink() throws Exception { + public static void syncCreateRollupProperty() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -36,14 +37,14 @@ public static void syncCreateUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - CreateUserLinkRequest request = - CreateUserLinkRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .setNotifyNewUser(true) - .setUserLink(UserLink.newBuilder().build()) + CreateRollupPropertyRequest request = + CreateRollupPropertyRequest.newBuilder() + .setRollupProperty(Property.newBuilder().build()) + .addAllSourceProperties(new ArrayList()) .build(); - UserLink response = analyticsAdminServiceClient.createUserLink(request); + CreateRollupPropertyResponse response = + analyticsAdminServiceClient.createRollupProperty(request); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupProperty_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/AsyncCreateRollupPropertySourceLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/AsyncCreateRollupPropertySourceLink.java new file mode 100644 index 000000000000..a40fc8b544e7 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/AsyncCreateRollupPropertySourceLink.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_async] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; +import com.google.api.core.ApiFuture; + +public class AsyncCreateRollupPropertySourceLink { + + public static void main(String[] args) throws Exception { + asyncCreateRollupPropertySourceLink(); + } + + public static void asyncCreateRollupPropertySourceLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + CreateRollupPropertySourceLinkRequest request = + CreateRollupPropertySourceLinkRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setRollupPropertySourceLink(RollupPropertySourceLink.newBuilder().build()) + .build(); + ApiFuture future = + analyticsAdminServiceClient.createRollupPropertySourceLinkCallable().futureCall(request); + // Do something. + RollupPropertySourceLink response = future.get(); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkAccountnameUserlink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLink.java similarity index 62% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkAccountnameUserlink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLink.java index c8cb58e531de..4903bce8e378 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkAccountnameUserlink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLink.java @@ -16,18 +16,19 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_AccountnameUserlink_sync] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.CreateRollupPropertySourceLinkRequest; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; -public class SyncCreateUserLinkAccountnameUserlink { +public class SyncCreateRollupPropertySourceLink { public static void main(String[] args) throws Exception { - syncCreateUserLinkAccountnameUserlink(); + syncCreateRollupPropertySourceLink(); } - public static void syncCreateUserLinkAccountnameUserlink() throws Exception { + public static void syncCreateRollupPropertySourceLink() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,10 +36,14 @@ public static void syncCreateUserLinkAccountnameUserlink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - AccountName parent = AccountName.of("[ACCOUNT]"); - UserLink userLink = UserLink.newBuilder().build(); - UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + CreateRollupPropertySourceLinkRequest request = + CreateRollupPropertySourceLinkRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setRollupPropertySourceLink(RollupPropertySourceLink.newBuilder().build()) + .build(); + RollupPropertySourceLink response = + analyticsAdminServiceClient.createRollupPropertySourceLink(request); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_AccountnameUserlink_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLinkPropertynameRolluppropertysourcelink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLinkPropertynameRolluppropertysourcelink.java new file mode 100644 index 000000000000..2b781fd8752c --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLinkPropertynameRolluppropertysourcelink.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_PropertynameRolluppropertysourcelink_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; + +public class SyncCreateRollupPropertySourceLinkPropertynameRolluppropertysourcelink { + + public static void main(String[] args) throws Exception { + syncCreateRollupPropertySourceLinkPropertynameRolluppropertysourcelink(); + } + + public static void syncCreateRollupPropertySourceLinkPropertynameRolluppropertysourcelink() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + PropertyName parent = PropertyName.of("[PROPERTY]"); + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); + RollupPropertySourceLink response = + analyticsAdminServiceClient.createRollupPropertySourceLink( + parent, rollupPropertySourceLink); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_PropertynameRolluppropertysourcelink_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLinkStringRolluppropertysourcelink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLinkStringRolluppropertysourcelink.java new file mode 100644 index 000000000000..690f568d3b5d --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createrolluppropertysourcelink/SyncCreateRollupPropertySourceLinkStringRolluppropertysourcelink.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_StringRolluppropertysourcelink_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; + +public class SyncCreateRollupPropertySourceLinkStringRolluppropertysourcelink { + + public static void main(String[] args) throws Exception { + syncCreateRollupPropertySourceLinkStringRolluppropertysourcelink(); + } + + public static void syncCreateRollupPropertySourceLinkStringRolluppropertysourcelink() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + String parent = PropertyName.of("[PROPERTY]").toString(); + RollupPropertySourceLink rollupPropertySourceLink = + RollupPropertySourceLink.newBuilder().build(); + RollupPropertySourceLink response = + analyticsAdminServiceClient.createRollupPropertySourceLink( + parent, rollupPropertySourceLink); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_StringRolluppropertysourcelink_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubproperty/AsyncCreateSubproperty.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubproperty/AsyncCreateSubproperty.java new file mode 100644 index 000000000000..0cb37e9b0426 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubproperty/AsyncCreateSubproperty.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubproperty_async] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.CreateSubpropertyRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyResponse; +import com.google.analytics.admin.v1alpha.Property; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; +import com.google.api.core.ApiFuture; + +public class AsyncCreateSubproperty { + + public static void main(String[] args) throws Exception { + asyncCreateSubproperty(); + } + + public static void asyncCreateSubproperty() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + CreateSubpropertyRequest request = + CreateSubpropertyRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); + ApiFuture future = + analyticsAdminServiceClient.createSubpropertyCallable().futureCall(request); + // Do something. + CreateSubpropertyResponse response = future.get(); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubproperty_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubproperty/SyncCreateSubproperty.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubproperty/SyncCreateSubproperty.java new file mode 100644 index 000000000000..0dfc254730b6 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubproperty/SyncCreateSubproperty.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubproperty_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.CreateSubpropertyRequest; +import com.google.analytics.admin.v1alpha.CreateSubpropertyResponse; +import com.google.analytics.admin.v1alpha.Property; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; + +public class SyncCreateSubproperty { + + public static void main(String[] args) throws Exception { + syncCreateSubproperty(); + } + + public static void syncCreateSubproperty() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + CreateSubpropertyRequest request = + CreateSubpropertyRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubproperty(Property.newBuilder().build()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); + CreateSubpropertyResponse response = analyticsAdminServiceClient.createSubproperty(request); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubproperty_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/AsyncCreateSubpropertyEventFilter.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/AsyncCreateSubpropertyEventFilter.java new file mode 100644 index 000000000000..c463be239921 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/AsyncCreateSubpropertyEventFilter.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_async] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; +import com.google.api.core.ApiFuture; + +public class AsyncCreateSubpropertyEventFilter { + + public static void main(String[] args) throws Exception { + asyncCreateSubpropertyEventFilter(); + } + + public static void asyncCreateSubpropertyEventFilter() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + CreateSubpropertyEventFilterRequest request = + CreateSubpropertyEventFilterRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); + ApiFuture future = + analyticsAdminServiceClient.createSubpropertyEventFilterCallable().futureCall(request); + // Do something. + SubpropertyEventFilter response = future.get(); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilter.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilter.java new file mode 100644 index 000000000000..bbf0c9dbf329 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilter.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.CreateSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; + +public class SyncCreateSubpropertyEventFilter { + + public static void main(String[] args) throws Exception { + syncCreateSubpropertyEventFilter(); + } + + public static void syncCreateSubpropertyEventFilter() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + CreateSubpropertyEventFilterRequest request = + CreateSubpropertyEventFilterRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) + .setSubpropertyEventFilter(SubpropertyEventFilter.newBuilder().build()) + .build(); + SubpropertyEventFilter response = + analyticsAdminServiceClient.createSubpropertyEventFilter(request); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkPropertynameUserlink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilterPropertynameSubpropertyeventfilter.java similarity index 68% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkPropertynameUserlink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilterPropertynameSubpropertyeventfilter.java index ae071dadac91..d8354b005a84 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkPropertynameUserlink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilterPropertynameSubpropertyeventfilter.java @@ -16,18 +16,19 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_PropertynameUserlink_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_PropertynameSubpropertyeventfilter_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; import com.google.analytics.admin.v1alpha.PropertyName; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; -public class SyncCreateUserLinkPropertynameUserlink { +public class SyncCreateSubpropertyEventFilterPropertynameSubpropertyeventfilter { public static void main(String[] args) throws Exception { - syncCreateUserLinkPropertynameUserlink(); + syncCreateSubpropertyEventFilterPropertynameSubpropertyeventfilter(); } - public static void syncCreateUserLinkPropertynameUserlink() throws Exception { + public static void syncCreateSubpropertyEventFilterPropertynameSubpropertyeventfilter() + throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -36,9 +37,10 @@ public static void syncCreateUserLinkPropertynameUserlink() throws Exception { try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { PropertyName parent = PropertyName.of("[PROPERTY]"); - UserLink userLink = UserLink.newBuilder().build(); - UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + SubpropertyEventFilter response = + analyticsAdminServiceClient.createSubpropertyEventFilter(parent, subpropertyEventFilter); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_PropertynameUserlink_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_PropertynameSubpropertyeventfilter_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkStringUserlink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilterStringSubpropertyeventfilter.java similarity index 64% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkStringUserlink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilterStringSubpropertyeventfilter.java index 1a6cc49665be..6368d375a60b 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createuserlink/SyncCreateUserLinkStringUserlink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/createsubpropertyeventfilter/SyncCreateSubpropertyEventFilterStringSubpropertyeventfilter.java @@ -16,18 +16,19 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_StringUserlink_sync] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_StringSubpropertyeventfilter_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilter; -public class SyncCreateUserLinkStringUserlink { +public class SyncCreateSubpropertyEventFilterStringSubpropertyeventfilter { public static void main(String[] args) throws Exception { - syncCreateUserLinkStringUserlink(); + syncCreateSubpropertyEventFilterStringSubpropertyeventfilter(); } - public static void syncCreateUserLinkStringUserlink() throws Exception { + public static void syncCreateSubpropertyEventFilterStringSubpropertyeventfilter() + throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,10 +36,11 @@ public static void syncCreateUserLinkStringUserlink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - String parent = AccountName.of("[ACCOUNT]").toString(); - UserLink userLink = UserLink.newBuilder().build(); - UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink); + String parent = PropertyName.of("[PROPERTY]").toString(); + SubpropertyEventFilter subpropertyEventFilter = SubpropertyEventFilter.newBuilder().build(); + SubpropertyEventFilter response = + analyticsAdminServiceClient.createSubpropertyEventFilter(parent, subpropertyEventFilter); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_StringUserlink_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_StringSubpropertyeventfilter_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchdeleteuserlinks/AsyncBatchDeleteUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/AsyncDeleteRollupPropertySourceLink.java similarity index 65% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchdeleteuserlinks/AsyncBatchDeleteUserLinks.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/AsyncDeleteRollupPropertySourceLink.java index 48cc88653341..064fc97ce2c1 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchdeleteuserlinks/AsyncBatchDeleteUserLinks.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/AsyncDeleteRollupPropertySourceLink.java @@ -16,22 +16,20 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_async] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_async] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; +import com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; import com.google.api.core.ApiFuture; import com.google.protobuf.Empty; -import java.util.ArrayList; -public class AsyncBatchDeleteUserLinks { +public class AsyncDeleteRollupPropertySourceLink { public static void main(String[] args) throws Exception { - asyncBatchDeleteUserLinks(); + asyncDeleteRollupPropertySourceLink(); } - public static void asyncBatchDeleteUserLinks() throws Exception { + public static void asyncDeleteRollupPropertySourceLink() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -39,16 +37,17 @@ public static void asyncBatchDeleteUserLinks() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - BatchDeleteUserLinksRequest request = - BatchDeleteUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) + DeleteRollupPropertySourceLinkRequest request = + DeleteRollupPropertySourceLinkRequest.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) .build(); ApiFuture future = - analyticsAdminServiceClient.batchDeleteUserLinksCallable().futureCall(request); + analyticsAdminServiceClient.deleteRollupPropertySourceLinkCallable().futureCall(request); // Do something. future.get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLink.java new file mode 100644 index 000000000000..ee82ea7fdbe2 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLink.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.DeleteRollupPropertySourceLinkRequest; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; +import com.google.protobuf.Empty; + +public class SyncDeleteRollupPropertySourceLink { + + public static void main(String[] args) throws Exception { + syncDeleteRollupPropertySourceLink(); + } + + public static void syncDeleteRollupPropertySourceLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + DeleteRollupPropertySourceLinkRequest request = + DeleteRollupPropertySourceLinkRequest.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) + .build(); + analyticsAdminServiceClient.deleteRollupPropertySourceLink(request); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLinkRolluppropertysourcelinkname.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLinkRolluppropertysourcelinkname.java new file mode 100644 index 000000000000..2be3fe2664fb --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLinkRolluppropertysourcelinkname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_Rolluppropertysourcelinkname_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; +import com.google.protobuf.Empty; + +public class SyncDeleteRollupPropertySourceLinkRolluppropertysourcelinkname { + + public static void main(String[] args) throws Exception { + syncDeleteRollupPropertySourceLinkRolluppropertysourcelinkname(); + } + + public static void syncDeleteRollupPropertySourceLinkRolluppropertysourcelinkname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + analyticsAdminServiceClient.deleteRollupPropertySourceLink(name); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_Rolluppropertysourcelinkname_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLinkString.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLinkString.java similarity index 73% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLinkString.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLinkString.java index 77185a250121..e540e8a9fcc4 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLinkString.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleterolluppropertysourcelink/SyncDeleteRollupPropertySourceLinkString.java @@ -16,18 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_String_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_String_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLinkName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; import com.google.protobuf.Empty; -public class SyncDeleteUserLinkString { +public class SyncDeleteRollupPropertySourceLinkString { public static void main(String[] args) throws Exception { - syncDeleteUserLinkString(); + syncDeleteRollupPropertySourceLinkString(); } - public static void syncDeleteUserLinkString() throws Exception { + public static void syncDeleteRollupPropertySourceLinkString() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,9 +35,10 @@ public static void syncDeleteUserLinkString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); - analyticsAdminServiceClient.deleteUserLink(name); + String name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]").toString(); + analyticsAdminServiceClient.deleteRollupPropertySourceLink(name); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_String_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteRollupPropertySourceLink_String_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/AsyncDeleteUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/AsyncDeleteSubpropertyEventFilter.java similarity index 68% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/AsyncDeleteUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/AsyncDeleteSubpropertyEventFilter.java index a20324a54df7..3348d26efbc1 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/AsyncDeleteUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/AsyncDeleteSubpropertyEventFilter.java @@ -16,20 +16,20 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_async] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_async] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLinkName; +import com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilterName; import com.google.api.core.ApiFuture; import com.google.protobuf.Empty; -public class AsyncDeleteUserLink { +public class AsyncDeleteSubpropertyEventFilter { public static void main(String[] args) throws Exception { - asyncDeleteUserLink(); + asyncDeleteSubpropertyEventFilter(); } - public static void asyncDeleteUserLink() throws Exception { + public static void asyncDeleteSubpropertyEventFilter() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -37,15 +37,17 @@ public static void asyncDeleteUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - DeleteUserLinkRequest request = - DeleteUserLinkRequest.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + DeleteSubpropertyEventFilterRequest request = + DeleteSubpropertyEventFilterRequest.newBuilder() + .setName( + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + .toString()) .build(); ApiFuture future = - analyticsAdminServiceClient.deleteUserLinkCallable().futureCall(request); + analyticsAdminServiceClient.deleteSubpropertyEventFilterCallable().futureCall(request); // Do something. future.get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilter.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilter.java new file mode 100644 index 000000000000..7fa254e79cd9 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilter.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.DeleteSubpropertyEventFilterRequest; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilterName; +import com.google.protobuf.Empty; + +public class SyncDeleteSubpropertyEventFilter { + + public static void main(String[] args) throws Exception { + syncDeleteSubpropertyEventFilter(); + } + + public static void syncDeleteSubpropertyEventFilter() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + DeleteSubpropertyEventFilterRequest request = + DeleteSubpropertyEventFilterRequest.newBuilder() + .setName( + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]") + .toString()) + .build(); + analyticsAdminServiceClient.deleteSubpropertyEventFilter(request); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLinkUserlinkname.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilterString.java similarity index 74% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLinkUserlinkname.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilterString.java index 8e908010d860..ffef09efdf5a 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLinkUserlinkname.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilterString.java @@ -16,18 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_Userlinkname_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_String_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLinkName; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilterName; import com.google.protobuf.Empty; -public class SyncDeleteUserLinkUserlinkname { +public class SyncDeleteSubpropertyEventFilterString { public static void main(String[] args) throws Exception { - syncDeleteUserLinkUserlinkname(); + syncDeleteSubpropertyEventFilterString(); } - public static void syncDeleteUserLinkUserlinkname() throws Exception { + public static void syncDeleteSubpropertyEventFilterString() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,9 +35,10 @@ public static void syncDeleteUserLinkUserlinkname() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - analyticsAdminServiceClient.deleteUserLink(name); + String name = + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]").toString(); + analyticsAdminServiceClient.deleteSubpropertyEventFilter(name); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_Userlinkname_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_String_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilterSubpropertyeventfiltername.java similarity index 70% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilterSubpropertyeventfiltername.java index 08a82ce7f2d3..ede36e1b1916 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deleteuserlink/SyncDeleteUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/deletesubpropertyeventfilter/SyncDeleteSubpropertyEventFilterSubpropertyeventfiltername.java @@ -16,19 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_Subpropertyeventfiltername_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLinkName; +import com.google.analytics.admin.v1alpha.SubpropertyEventFilterName; import com.google.protobuf.Empty; -public class SyncDeleteUserLink { +public class SyncDeleteSubpropertyEventFilterSubpropertyeventfiltername { public static void main(String[] args) throws Exception { - syncDeleteUserLink(); + syncDeleteSubpropertyEventFilterSubpropertyeventfiltername(); } - public static void syncDeleteUserLink() throws Exception { + public static void syncDeleteSubpropertyEventFilterSubpropertyeventfiltername() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -36,12 +35,10 @@ public static void syncDeleteUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - DeleteUserLinkRequest request = - DeleteUserLinkRequest.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .build(); - analyticsAdminServiceClient.deleteUserLink(request); + SubpropertyEventFilterName name = + SubpropertyEventFilterName.of("[PROPERTY]", "[SUB_PROPERTY_EVENT_FILTER]"); + analyticsAdminServiceClient.deleteSubpropertyEventFilter(name); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSubpropertyEventFilter_Subpropertyeventfiltername_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/AsyncGetDataRedactionSettings.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/AsyncGetDataRedactionSettings.java new file mode 100644 index 000000000000..17545517be26 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/AsyncGetDataRedactionSettings.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_async] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; +import com.google.analytics.admin.v1alpha.DataRedactionSettingsName; +import com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest; +import com.google.api.core.ApiFuture; + +public class AsyncGetDataRedactionSettings { + + public static void main(String[] args) throws Exception { + asyncGetDataRedactionSettings(); + } + + public static void asyncGetDataRedactionSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + GetDataRedactionSettingsRequest request = + GetDataRedactionSettingsRequest.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) + .build(); + ApiFuture future = + analyticsAdminServiceClient.getDataRedactionSettingsCallable().futureCall(request); + // Do something. + DataRedactionSettings response = future.get(); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/AsyncGetUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettings.java similarity index 66% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/AsyncGetUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettings.java index 13e07e914467..a7f5cb4941c2 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/AsyncGetUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettings.java @@ -16,20 +16,19 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_async] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.GetUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; -import com.google.analytics.admin.v1alpha.UserLinkName; -import com.google.api.core.ApiFuture; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; +import com.google.analytics.admin.v1alpha.DataRedactionSettingsName; +import com.google.analytics.admin.v1alpha.GetDataRedactionSettingsRequest; -public class AsyncGetUserLink { +public class SyncGetDataRedactionSettings { public static void main(String[] args) throws Exception { - asyncGetUserLink(); + syncGetDataRedactionSettings(); } - public static void asyncGetUserLink() throws Exception { + public static void syncGetDataRedactionSettings() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -37,15 +36,13 @@ public static void asyncGetUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - GetUserLinkRequest request = - GetUserLinkRequest.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + GetDataRedactionSettingsRequest request = + GetDataRedactionSettingsRequest.newBuilder() + .setName(DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString()) .build(); - ApiFuture future = - analyticsAdminServiceClient.getUserLinkCallable().futureCall(request); - // Do something. - UserLink response = future.get(); + DataRedactionSettings response = + analyticsAdminServiceClient.getDataRedactionSettings(request); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettingsDataredactionsettingsname.java similarity index 68% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettingsDataredactionsettingsname.java index 403ba9518bf4..8ded74dfd4ef 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettingsDataredactionsettingsname.java @@ -16,19 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_Dataredactionsettingsname_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.GetUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; -import com.google.analytics.admin.v1alpha.UserLinkName; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; +import com.google.analytics.admin.v1alpha.DataRedactionSettingsName; -public class SyncGetUserLink { +public class SyncGetDataRedactionSettingsDataredactionsettingsname { public static void main(String[] args) throws Exception { - syncGetUserLink(); + syncGetDataRedactionSettingsDataredactionsettingsname(); } - public static void syncGetUserLink() throws Exception { + public static void syncGetDataRedactionSettingsDataredactionsettingsname() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -36,12 +35,9 @@ public static void syncGetUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - GetUserLinkRequest request = - GetUserLinkRequest.newBuilder() - .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) - .build(); - UserLink response = analyticsAdminServiceClient.getUserLink(request); + DataRedactionSettingsName name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]"); + DataRedactionSettings response = analyticsAdminServiceClient.getDataRedactionSettings(name); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_Dataredactionsettingsname_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLinkString.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettingsString.java similarity index 71% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLinkString.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettingsString.java index caf3914e5ce4..7541702a53a8 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLinkString.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getdataredactionsettings/SyncGetDataRedactionSettingsString.java @@ -16,18 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_String_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_String_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLink; -import com.google.analytics.admin.v1alpha.UserLinkName; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; +import com.google.analytics.admin.v1alpha.DataRedactionSettingsName; -public class SyncGetUserLinkString { +public class SyncGetDataRedactionSettingsString { public static void main(String[] args) throws Exception { - syncGetUserLinkString(); + syncGetDataRedactionSettingsString(); } - public static void syncGetUserLinkString() throws Exception { + public static void syncGetDataRedactionSettingsString() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,9 +35,9 @@ public static void syncGetUserLinkString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString(); - UserLink response = analyticsAdminServiceClient.getUserLink(name); + String name = DataRedactionSettingsName.of("[PROPERTY]", "[DATA_STREAM]").toString(); + DataRedactionSettings response = analyticsAdminServiceClient.getDataRedactionSettings(name); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_String_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRedactionSettings_String_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchupdateuserlinks/AsyncBatchUpdateUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/AsyncGetRollupPropertySourceLink.java similarity index 60% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchupdateuserlinks/AsyncBatchUpdateUserLinks.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/AsyncGetRollupPropertySourceLink.java index 8d6875b80a57..98bfb56c8d82 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchupdateuserlinks/AsyncBatchUpdateUserLinks.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/AsyncGetRollupPropertySourceLink.java @@ -16,22 +16,20 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_async] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_async] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; +import com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; import com.google.api.core.ApiFuture; -import java.util.ArrayList; -public class AsyncBatchUpdateUserLinks { +public class AsyncGetRollupPropertySourceLink { public static void main(String[] args) throws Exception { - asyncBatchUpdateUserLinks(); + asyncGetRollupPropertySourceLink(); } - public static void asyncBatchUpdateUserLinks() throws Exception { + public static void asyncGetRollupPropertySourceLink() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -39,16 +37,17 @@ public static void asyncBatchUpdateUserLinks() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - BatchUpdateUserLinksRequest request = - BatchUpdateUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) + GetRollupPropertySourceLinkRequest request = + GetRollupPropertySourceLinkRequest.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) .build(); - ApiFuture future = - analyticsAdminServiceClient.batchUpdateUserLinksCallable().futureCall(request); + ApiFuture future = + analyticsAdminServiceClient.getRollupPropertySourceLinkCallable().futureCall(request); // Do something. - BatchUpdateUserLinksResponse response = future.get(); + RollupPropertySourceLink response = future.get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLink.java new file mode 100644 index 000000000000..0fa9ee30f9dc --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLink.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.GetRollupPropertySourceLinkRequest; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; + +public class SyncGetRollupPropertySourceLink { + + public static void main(String[] args) throws Exception { + syncGetRollupPropertySourceLink(); + } + + public static void syncGetRollupPropertySourceLink() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + GetRollupPropertySourceLinkRequest request = + GetRollupPropertySourceLinkRequest.newBuilder() + .setName( + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]") + .toString()) + .build(); + RollupPropertySourceLink response = + analyticsAdminServiceClient.getRollupPropertySourceLink(request); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLinkRolluppropertysourcelinkname.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLinkRolluppropertysourcelinkname.java new file mode 100644 index 000000000000..39fb432819f7 --- /dev/null +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLinkRolluppropertysourcelinkname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha.samples; + +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_Rolluppropertysourcelinkname_sync] +import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; + +public class SyncGetRollupPropertySourceLinkRolluppropertysourcelinkname { + + public static void main(String[] args) throws Exception { + syncGetRollupPropertySourceLinkRolluppropertysourcelinkname(); + } + + public static void syncGetRollupPropertySourceLinkRolluppropertysourcelinkname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AnalyticsAdminServiceClient analyticsAdminServiceClient = + AnalyticsAdminServiceClient.create()) { + RollupPropertySourceLinkName name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]"); + RollupPropertySourceLink response = + analyticsAdminServiceClient.getRollupPropertySourceLink(name); + } + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_Rolluppropertysourcelinkname_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLinkUserlinkname.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLinkString.java similarity index 70% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLinkUserlinkname.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLinkString.java index a0031d639432..8c811c8ebd05 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getuserlink/SyncGetUserLinkUserlinkname.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/getrolluppropertysourcelink/SyncGetRollupPropertySourceLinkString.java @@ -16,18 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_Userlinkname_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_String_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLink; -import com.google.analytics.admin.v1alpha.UserLinkName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLinkName; -public class SyncGetUserLinkUserlinkname { +public class SyncGetRollupPropertySourceLinkString { public static void main(String[] args) throws Exception { - syncGetUserLinkUserlinkname(); + syncGetRollupPropertySourceLinkString(); } - public static void syncGetUserLinkUserlinkname() throws Exception { + public static void syncGetRollupPropertySourceLinkString() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,9 +35,11 @@ public static void syncGetUserLinkUserlinkname() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - UserLink response = analyticsAdminServiceClient.getUserLink(name); + String name = + RollupPropertySourceLinkName.of("[PROPERTY]", "[ROLLUP_PROPERTY_SOURCE_LINK]").toString(); + RollupPropertySourceLink response = + analyticsAdminServiceClient.getRollupPropertySourceLink(name); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_Userlinkname_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetRollupPropertySourceLink_String_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/AsyncListUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/AsyncListRollupPropertySourceLinks.java similarity index 65% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/AsyncListUserLinks.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/AsyncListRollupPropertySourceLinks.java index 26e3ed949670..1ea33c9e8967 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/AsyncListUserLinks.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/AsyncListRollupPropertySourceLinks.java @@ -16,20 +16,20 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_async] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.ListUserLinksRequest; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; import com.google.api.core.ApiFuture; -public class AsyncListUserLinks { +public class AsyncListRollupPropertySourceLinks { public static void main(String[] args) throws Exception { - asyncListUserLinks(); + asyncListRollupPropertySourceLinks(); } - public static void asyncListUserLinks() throws Exception { + public static void asyncListRollupPropertySourceLinks() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -37,19 +37,21 @@ public static void asyncListUserLinks() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - ListUserLinksRequest request = - ListUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) + ListRollupPropertySourceLinksRequest request = + ListRollupPropertySourceLinksRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); - ApiFuture future = - analyticsAdminServiceClient.listUserLinksPagedCallable().futureCall(request); + ApiFuture future = + analyticsAdminServiceClient + .listRollupPropertySourceLinksPagedCallable() + .futureCall(request); // Do something. - for (UserLink element : future.get().iterateAll()) { + for (RollupPropertySourceLink element : future.get().iterateAll()) { // doThingsWith(element); } } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/AsyncListUserLinksPaged.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/AsyncListRollupPropertySourceLinksPaged.java similarity index 66% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/AsyncListUserLinksPaged.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/AsyncListRollupPropertySourceLinksPaged.java index ae4cb980a64a..5e8106d5c502 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/AsyncListUserLinksPaged.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/AsyncListRollupPropertySourceLinksPaged.java @@ -16,21 +16,21 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_Paged_async] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_Paged_async] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.ListUserLinksRequest; -import com.google.analytics.admin.v1alpha.ListUserLinksResponse; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksResponse; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; import com.google.common.base.Strings; -public class AsyncListUserLinksPaged { +public class AsyncListRollupPropertySourceLinksPaged { public static void main(String[] args) throws Exception { - asyncListUserLinksPaged(); + asyncListRollupPropertySourceLinksPaged(); } - public static void asyncListUserLinksPaged() throws Exception { + public static void asyncListRollupPropertySourceLinksPaged() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -38,16 +38,16 @@ public static void asyncListUserLinksPaged() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - ListUserLinksRequest request = - ListUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) + ListRollupPropertySourceLinksRequest request = + ListRollupPropertySourceLinksRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { - ListUserLinksResponse response = - analyticsAdminServiceClient.listUserLinksCallable().call(request); - for (UserLink element : response.getUserLinksList()) { + ListRollupPropertySourceLinksResponse response = + analyticsAdminServiceClient.listRollupPropertySourceLinksCallable().call(request); + for (RollupPropertySourceLink element : response.getRollupPropertySourceLinksList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); @@ -60,4 +60,4 @@ public static void asyncListUserLinksPaged() throws Exception { } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_Paged_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_Paged_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinks.java similarity index 67% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinks.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinks.java index 81ac6c65b993..d7263213db2a 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinks.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinks.java @@ -16,19 +16,19 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_sync] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.ListUserLinksRequest; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.ListRollupPropertySourceLinksRequest; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; -public class SyncListUserLinks { +public class SyncListRollupPropertySourceLinks { public static void main(String[] args) throws Exception { - syncListUserLinks(); + syncListRollupPropertySourceLinks(); } - public static void syncListUserLinks() throws Exception { + public static void syncListRollupPropertySourceLinks() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -36,16 +36,17 @@ public static void syncListUserLinks() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - ListUserLinksRequest request = - ListUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) + ListRollupPropertySourceLinksRequest request = + ListRollupPropertySourceLinksRequest.newBuilder() + .setParent(PropertyName.of("[PROPERTY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); - for (UserLink element : analyticsAdminServiceClient.listUserLinks(request).iterateAll()) { + for (RollupPropertySourceLink element : + analyticsAdminServiceClient.listRollupPropertySourceLinks(request).iterateAll()) { // doThingsWith(element); } } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksPropertyname.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinksPropertyname.java similarity index 76% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksPropertyname.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinksPropertyname.java index 28d648bc01f2..41fa26f69b3e 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksPropertyname.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinksPropertyname.java @@ -16,18 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_Propertyname_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_Propertyname_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; import com.google.analytics.admin.v1alpha.PropertyName; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; -public class SyncListUserLinksPropertyname { +public class SyncListRollupPropertySourceLinksPropertyname { public static void main(String[] args) throws Exception { - syncListUserLinksPropertyname(); + syncListRollupPropertySourceLinksPropertyname(); } - public static void syncListUserLinksPropertyname() throws Exception { + public static void syncListRollupPropertySourceLinksPropertyname() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -36,10 +36,11 @@ public static void syncListUserLinksPropertyname() throws Exception { try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { PropertyName parent = PropertyName.of("[PROPERTY]"); - for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + for (RollupPropertySourceLink element : + analyticsAdminServiceClient.listRollupPropertySourceLinks(parent).iterateAll()) { // doThingsWith(element); } } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_Propertyname_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_Propertyname_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksString.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinksString.java similarity index 71% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksString.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinksString.java index 830c643f989c..1ea84f16bac4 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksString.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listrolluppropertysourcelinks/SyncListRollupPropertySourceLinksString.java @@ -16,18 +16,18 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_String_sync] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_String_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.PropertyName; +import com.google.analytics.admin.v1alpha.RollupPropertySourceLink; -public class SyncListUserLinksString { +public class SyncListRollupPropertySourceLinksString { public static void main(String[] args) throws Exception { - syncListUserLinksString(); + syncListRollupPropertySourceLinksString(); } - public static void syncListUserLinksString() throws Exception { + public static void syncListRollupPropertySourceLinksString() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,11 +35,12 @@ public static void syncListUserLinksString() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - String parent = AccountName.of("[ACCOUNT]").toString(); - for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + String parent = PropertyName.of("[PROPERTY]").toString(); + for (RollupPropertySourceLink element : + analyticsAdminServiceClient.listRollupPropertySourceLinks(parent).iterateAll()) { // doThingsWith(element); } } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_String_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListRollupPropertySourceLinks_String_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/AsyncRunAccessReport.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/AsyncRunAccessReport.java index cb88cf08542b..2936648a45ed 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/AsyncRunAccessReport.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/AsyncRunAccessReport.java @@ -55,6 +55,8 @@ public static void asyncRunAccessReport() throws Exception { .setTimeZone("timeZone-2077180903") .addAllOrderBys(new ArrayList()) .setReturnEntityQuota(true) + .setIncludeAllUsers(true) + .setExpandGroups(true) .build(); ApiFuture future = analyticsAdminServiceClient.runAccessReportCallable().futureCall(request); diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/SyncRunAccessReport.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/SyncRunAccessReport.java index cf022c5acd89..94c7eb904783 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/SyncRunAccessReport.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/runaccessreport/SyncRunAccessReport.java @@ -54,6 +54,8 @@ public static void syncRunAccessReport() throws Exception { .setTimeZone("timeZone-2077180903") .addAllOrderBys(new ArrayList()) .setReturnEntityQuota(true) + .setIncludeAllUsers(true) + .setExpandGroups(true) .build(); RunAccessReportResponse response = analyticsAdminServiceClient.runAccessReport(request); } diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchgetuserlinks/AsyncBatchGetUserLinks.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/AsyncUpdateDataRedactionSettings.java similarity index 61% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchgetuserlinks/AsyncBatchGetUserLinks.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/AsyncUpdateDataRedactionSettings.java index bebc87cf63d2..4faadb945a6d 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchgetuserlinks/AsyncBatchGetUserLinks.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/AsyncUpdateDataRedactionSettings.java @@ -16,21 +16,20 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_async] -import com.google.analytics.admin.v1alpha.AccountName; +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRedactionSettings_async] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; +import com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest; import com.google.api.core.ApiFuture; -import java.util.ArrayList; +import com.google.protobuf.FieldMask; -public class AsyncBatchGetUserLinks { +public class AsyncUpdateDataRedactionSettings { public static void main(String[] args) throws Exception { - asyncBatchGetUserLinks(); + asyncUpdateDataRedactionSettings(); } - public static void asyncBatchGetUserLinks() throws Exception { + public static void asyncUpdateDataRedactionSettings() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -38,16 +37,16 @@ public static void asyncBatchGetUserLinks() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - BatchGetUserLinksRequest request = - BatchGetUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) + UpdateDataRedactionSettingsRequest request = + UpdateDataRedactionSettingsRequest.newBuilder() + .setDataRedactionSettings(DataRedactionSettings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) .build(); - ApiFuture future = - analyticsAdminServiceClient.batchGetUserLinksCallable().futureCall(request); + ApiFuture future = + analyticsAdminServiceClient.updateDataRedactionSettingsCallable().futureCall(request); // Do something. - BatchGetUserLinksResponse response = future.get(); + DataRedactionSettings response = future.get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRedactionSettings_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/AsyncUpdateUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/SyncUpdateDataRedactionSettings.java similarity index 64% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/AsyncUpdateUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/SyncUpdateDataRedactionSettings.java index 2ab99efdf0e9..2d56b284cf32 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/AsyncUpdateUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/SyncUpdateDataRedactionSettings.java @@ -16,19 +16,19 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_async] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRedactionSettings_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; -import com.google.api.core.ApiFuture; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; +import com.google.analytics.admin.v1alpha.UpdateDataRedactionSettingsRequest; +import com.google.protobuf.FieldMask; -public class AsyncUpdateUserLink { +public class SyncUpdateDataRedactionSettings { public static void main(String[] args) throws Exception { - asyncUpdateUserLink(); + syncUpdateDataRedactionSettings(); } - public static void asyncUpdateUserLink() throws Exception { + public static void syncUpdateDataRedactionSettings() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -36,13 +36,14 @@ public static void asyncUpdateUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - UpdateUserLinkRequest request = - UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build(); - ApiFuture future = - analyticsAdminServiceClient.updateUserLinkCallable().futureCall(request); - // Do something. - UserLink response = future.get(); + UpdateDataRedactionSettingsRequest request = + UpdateDataRedactionSettingsRequest.newBuilder() + .setDataRedactionSettings(DataRedactionSettings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + DataRedactionSettings response = + analyticsAdminServiceClient.updateDataRedactionSettings(request); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_async] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRedactionSettings_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/SyncUpdateUserLink.java b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/SyncUpdateDataRedactionSettingsDataredactionsettingsFieldmask.java similarity index 64% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/SyncUpdateUserLink.java rename to java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/SyncUpdateDataRedactionSettingsDataredactionsettingsFieldmask.java index 8a0ca645438d..9059383bac9b 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/SyncUpdateUserLink.java +++ b/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updatedataredactionsettings/SyncUpdateDataRedactionSettingsDataredactionsettingsFieldmask.java @@ -16,18 +16,19 @@ package com.google.analytics.admin.v1alpha.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_sync] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRedactionSettings_DataredactionsettingsFieldmask_sync] import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UpdateUserLinkRequest; -import com.google.analytics.admin.v1alpha.UserLink; +import com.google.analytics.admin.v1alpha.DataRedactionSettings; +import com.google.protobuf.FieldMask; -public class SyncUpdateUserLink { +public class SyncUpdateDataRedactionSettingsDataredactionsettingsFieldmask { public static void main(String[] args) throws Exception { - syncUpdateUserLink(); + syncUpdateDataRedactionSettingsDataredactionsettingsFieldmask(); } - public static void syncUpdateUserLink() throws Exception { + public static void syncUpdateDataRedactionSettingsDataredactionsettingsFieldmask() + throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. @@ -35,10 +36,12 @@ public static void syncUpdateUserLink() throws Exception { // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) { - UpdateUserLinkRequest request = - UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build(); - UserLink response = analyticsAdminServiceClient.updateUserLink(request); + DataRedactionSettings dataRedactionSettings = DataRedactionSettings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DataRedactionSettings response = + analyticsAdminServiceClient.updateDataRedactionSettings( + dataRedactionSettings, updateMask); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_sync] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRedactionSettings_DataredactionsettingsFieldmask_sync] diff --git a/java-analytics-data/CHANGELOG.md b/java-analytics-data/CHANGELOG.md index da96b93f6441..756e4adaf48e 100644 --- a/java-analytics-data/CHANGELOG.md +++ b/java-analytics-data/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.40.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.39.0 (2023-10-11) ### Dependencies diff --git a/java-analytics-data/README.md b/java-analytics-data/README.md index 850512d39ac6..3e21c51196f4 100644 --- a/java-analytics-data/README.md +++ b/java-analytics-data/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.analytics google-analytics-data - 0.39.0 + 0.40.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.analytics:google-analytics-data:0.39.0' +implementation 'com.google.analytics:google-analytics-data:0.40.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.39.0" +libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.40.0" ``` diff --git a/java-analytics-data/google-analytics-data-bom/pom.xml b/java-analytics-data/google-analytics-data-bom/pom.xml index 997913435c9c..28605427caae 100644 --- a/java-analytics-data/google-analytics-data-bom/pom.xml +++ b/java-analytics-data/google-analytics-data-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.analytics google-analytics-data-bom - 0.39.0 + 0.40.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.analytics google-analytics-data - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-analytics-data-v1beta - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-analytics-data-v1beta - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.39.0 + 0.40.0 diff --git a/java-analytics-data/google-analytics-data/pom.xml b/java-analytics-data/google-analytics-data/pom.xml index 6f6eefc51563..a27b045c9d41 100644 --- a/java-analytics-data/google-analytics-data/pom.xml +++ b/java-analytics-data/google-analytics-data/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.analytics google-analytics-data - 0.39.0 + 0.40.0 jar Google Analytics Data provides programmatic methods to access report data in Google Analytics App+Web properties. com.google.analytics google-analytics-data-parent - 0.39.0 + 0.40.0 google-analytics-data diff --git a/java-analytics-data/grpc-google-analytics-data-v1alpha/pom.xml b/java-analytics-data/grpc-google-analytics-data-v1alpha/pom.xml index 68abb22e6551..9b9657294fac 100644 --- a/java-analytics-data/grpc-google-analytics-data-v1alpha/pom.xml +++ b/java-analytics-data/grpc-google-analytics-data-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.39.0 + 0.40.0 grpc-google-analytics-data-v1alpha GRPC library for google-analytics-data com.google.analytics google-analytics-data-parent - 0.39.0 + 0.40.0 diff --git a/java-analytics-data/grpc-google-analytics-data-v1beta/pom.xml b/java-analytics-data/grpc-google-analytics-data-v1beta/pom.xml index f07603218fea..284b00fb4b08 100644 --- a/java-analytics-data/grpc-google-analytics-data-v1beta/pom.xml +++ b/java-analytics-data/grpc-google-analytics-data-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-data-v1beta - 0.39.0 + 0.40.0 grpc-google-analytics-data-v1beta GRPC library for grpc-google-analytics-data-v1beta com.google.analytics google-analytics-data-parent - 0.39.0 + 0.40.0 diff --git a/java-analytics-data/pom.xml b/java-analytics-data/pom.xml index f941b95d5d8c..9ff6d8e48920 100644 --- a/java-analytics-data/pom.xml +++ b/java-analytics-data/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-data-parent pom - 0.39.0 + 0.40.0 Google Analytics Data Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.analytics google-analytics-data - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-analytics-data-v1beta - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-analytics-data-v1beta - 0.39.0 + 0.40.0 diff --git a/java-analytics-data/proto-google-analytics-data-v1alpha/pom.xml b/java-analytics-data/proto-google-analytics-data-v1alpha/pom.xml index b5b54d8a876b..a5fcc92e6ead 100644 --- a/java-analytics-data/proto-google-analytics-data-v1alpha/pom.xml +++ b/java-analytics-data/proto-google-analytics-data-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.39.0 + 0.40.0 proto-google-analytics-data-v1alpha Proto library for google-analytics-data com.google.analytics google-analytics-data-parent - 0.39.0 + 0.40.0 diff --git a/java-analytics-data/proto-google-analytics-data-v1beta/pom.xml b/java-analytics-data/proto-google-analytics-data-v1beta/pom.xml index 683e34377580..97ed4cec8cb3 100644 --- a/java-analytics-data/proto-google-analytics-data-v1beta/pom.xml +++ b/java-analytics-data/proto-google-analytics-data-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-data-v1beta - 0.39.0 + 0.40.0 proto-google-analytics-data-v1beta PROTO library for proto-google-analytics-data-v1beta com.google.analytics google-analytics-data-parent - 0.39.0 + 0.40.0 diff --git a/java-analyticshub/CHANGELOG.md b/java-analyticshub/CHANGELOG.md index ba75f5038052..5d5027be22b2 100644 --- a/java-analyticshub/CHANGELOG.md +++ b/java-analyticshub/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.26.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.25.0 (2023-10-11) ### Dependencies diff --git a/java-analyticshub/README.md b/java-analyticshub/README.md index 204e6899bfc5..6943876df562 100644 --- a/java-analyticshub/README.md +++ b/java-analyticshub/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-analyticshub - 0.25.0 + 0.26.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-analyticshub:0.25.0' +implementation 'com.google.cloud:google-cloud-analyticshub:0.26.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-analyticshub" % "0.25.0" +libraryDependencies += "com.google.cloud" % "google-cloud-analyticshub" % "0.26.0" ``` diff --git a/java-analyticshub/google-cloud-analyticshub-bom/pom.xml b/java-analyticshub/google-cloud-analyticshub-bom/pom.xml index 54b4363c9b37..317a34d60edb 100644 --- a/java-analyticshub/google-cloud-analyticshub-bom/pom.xml +++ b/java-analyticshub/google-cloud-analyticshub-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-analyticshub-bom - 0.25.0 + 0.26.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-analyticshub - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-analyticshub-v1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-analyticshub-v1 - 0.25.0 + 0.26.0 diff --git a/java-analyticshub/google-cloud-analyticshub/pom.xml b/java-analyticshub/google-cloud-analyticshub/pom.xml index c20e32cd6486..6600f511888a 100644 --- a/java-analyticshub/google-cloud-analyticshub/pom.xml +++ b/java-analyticshub/google-cloud-analyticshub/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-analyticshub - 0.25.0 + 0.26.0 jar Google Analytics Hub API Analytics Hub API TBD com.google.cloud google-cloud-analyticshub-parent - 0.25.0 + 0.26.0 google-cloud-analyticshub diff --git a/java-analyticshub/grpc-google-cloud-analyticshub-v1/pom.xml b/java-analyticshub/grpc-google-cloud-analyticshub-v1/pom.xml index 068f389a6962..23f4be9e6533 100644 --- a/java-analyticshub/grpc-google-cloud-analyticshub-v1/pom.xml +++ b/java-analyticshub/grpc-google-cloud-analyticshub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-analyticshub-v1 - 0.25.0 + 0.26.0 grpc-google-cloud-analyticshub-v1 GRPC library for google-cloud-analyticshub com.google.cloud google-cloud-analyticshub-parent - 0.25.0 + 0.26.0 diff --git a/java-analyticshub/pom.xml b/java-analyticshub/pom.xml index 575c17266d96..90be5acb68e7 100644 --- a/java-analyticshub/pom.xml +++ b/java-analyticshub/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-analyticshub-parent pom - 0.25.0 + 0.26.0 Google Analytics Hub API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-analyticshub - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-analyticshub-v1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-analyticshub-v1 - 0.25.0 + 0.26.0 diff --git a/java-analyticshub/proto-google-cloud-analyticshub-v1/pom.xml b/java-analyticshub/proto-google-cloud-analyticshub-v1/pom.xml index 224ed3cf12b6..17c2f0b1a338 100644 --- a/java-analyticshub/proto-google-cloud-analyticshub-v1/pom.xml +++ b/java-analyticshub/proto-google-cloud-analyticshub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-analyticshub-v1 - 0.25.0 + 0.26.0 proto-google-cloud-analyticshub-v1 Proto library for google-cloud-analyticshub com.google.cloud google-cloud-analyticshub-parent - 0.25.0 + 0.26.0 diff --git a/java-api-gateway/CHANGELOG.md b/java-api-gateway/CHANGELOG.md index 6d5b09c6a3c9..e12fd8dc875f 100644 --- a/java-api-gateway/CHANGELOG.md +++ b/java-api-gateway/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-api-gateway/README.md b/java-api-gateway/README.md index bd8ac4cf6f9b..355db3d5d2c2 100644 --- a/java-api-gateway/README.md +++ b/java-api-gateway/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-api-gateway - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-api-gateway:2.28.0' +implementation 'com.google.cloud:google-cloud-api-gateway:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-api-gateway" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-api-gateway" % "2.29.0" ``` diff --git a/java-api-gateway/google-cloud-api-gateway-bom/pom.xml b/java-api-gateway/google-cloud-api-gateway-bom/pom.xml index 5e0428bf7f2e..183c137c02b0 100644 --- a/java-api-gateway/google-cloud-api-gateway-bom/pom.xml +++ b/java-api-gateway/google-cloud-api-gateway-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-api-gateway-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-api-gateway - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-api-gateway-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-api-gateway-v1 - 2.28.0 + 2.29.0 diff --git a/java-api-gateway/google-cloud-api-gateway/pom.xml b/java-api-gateway/google-cloud-api-gateway/pom.xml index 56f9b3171935..25c6703da608 100644 --- a/java-api-gateway/google-cloud-api-gateway/pom.xml +++ b/java-api-gateway/google-cloud-api-gateway/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-api-gateway - 2.28.0 + 2.29.0 jar Google API Gateway API Gateway enables you to provide secure access to your backend services through a well-defined REST API that is consistent across all of your services, regardless of the service implementation. Clients consume your REST APIS to implement standalone apps for a mobile device or tablet, through apps running in a browser, or through any other type of app that can make a request to an HTTP endpoint. com.google.cloud google-cloud-api-gateway-parent - 2.28.0 + 2.29.0 google-cloud-api-gateway diff --git a/java-api-gateway/grpc-google-cloud-api-gateway-v1/pom.xml b/java-api-gateway/grpc-google-cloud-api-gateway-v1/pom.xml index f8955d1d2443..3612f6513057 100644 --- a/java-api-gateway/grpc-google-cloud-api-gateway-v1/pom.xml +++ b/java-api-gateway/grpc-google-cloud-api-gateway-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-api-gateway-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-api-gateway-v1 GRPC library for google-cloud-api-gateway com.google.cloud google-cloud-api-gateway-parent - 2.28.0 + 2.29.0 diff --git a/java-api-gateway/pom.xml b/java-api-gateway/pom.xml index 604ef0e00d3b..bcc7bfc5bfba 100644 --- a/java-api-gateway/pom.xml +++ b/java-api-gateway/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-api-gateway-parent pom - 2.28.0 + 2.29.0 Google API Gateway Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-api-gateway - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-api-gateway-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-api-gateway-v1 - 2.28.0 + 2.29.0 diff --git a/java-api-gateway/proto-google-cloud-api-gateway-v1/pom.xml b/java-api-gateway/proto-google-cloud-api-gateway-v1/pom.xml index 316cb8e3f149..4f0767e8a924 100644 --- a/java-api-gateway/proto-google-cloud-api-gateway-v1/pom.xml +++ b/java-api-gateway/proto-google-cloud-api-gateway-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-api-gateway-v1 - 2.28.0 + 2.29.0 proto-google-cloud-api-gateway-v1 Proto library for google-cloud-api-gateway com.google.cloud google-cloud-api-gateway-parent - 2.28.0 + 2.29.0 diff --git a/java-apigee-connect/CHANGELOG.md b/java-apigee-connect/CHANGELOG.md index 8329ed8f6e9f..a7b3fee2fd2b 100644 --- a/java-apigee-connect/CHANGELOG.md +++ b/java-apigee-connect/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-apigee-connect/README.md b/java-apigee-connect/README.md index 85a71e1515a0..962baa808f8b 100644 --- a/java-apigee-connect/README.md +++ b/java-apigee-connect/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-apigee-connect - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-apigee-connect:2.28.0' +implementation 'com.google.cloud:google-cloud-apigee-connect:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-apigee-connect" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-apigee-connect" % "2.29.0" ``` diff --git a/java-apigee-connect/google-cloud-apigee-connect-bom/pom.xml b/java-apigee-connect/google-cloud-apigee-connect-bom/pom.xml index 0fed10b6873a..8b28f0430cee 100644 --- a/java-apigee-connect/google-cloud-apigee-connect-bom/pom.xml +++ b/java-apigee-connect/google-cloud-apigee-connect-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-apigee-connect-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-apigee-connect - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-apigee-connect-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-apigee-connect-v1 - 2.28.0 + 2.29.0 diff --git a/java-apigee-connect/google-cloud-apigee-connect/pom.xml b/java-apigee-connect/google-cloud-apigee-connect/pom.xml index 52a582ff670a..66db2b9f3372 100644 --- a/java-apigee-connect/google-cloud-apigee-connect/pom.xml +++ b/java-apigee-connect/google-cloud-apigee-connect/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-apigee-connect - 2.28.0 + 2.29.0 jar Google Apigee Connect Apigee Connect allows the Apigee hybrid management plane to connect securely to the MART service in the runtime plane without requiring you to expose the MART endpoint on the internet. com.google.cloud google-cloud-apigee-connect-parent - 2.28.0 + 2.29.0 google-cloud-apigee-connect diff --git a/java-apigee-connect/grpc-google-cloud-apigee-connect-v1/pom.xml b/java-apigee-connect/grpc-google-cloud-apigee-connect-v1/pom.xml index f5b532d9bfa5..2ff6120b7d9a 100644 --- a/java-apigee-connect/grpc-google-cloud-apigee-connect-v1/pom.xml +++ b/java-apigee-connect/grpc-google-cloud-apigee-connect-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-apigee-connect-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-apigee-connect-v1 GRPC library for google-cloud-apigee-connect com.google.cloud google-cloud-apigee-connect-parent - 2.28.0 + 2.29.0 diff --git a/java-apigee-connect/pom.xml b/java-apigee-connect/pom.xml index 9857c6088b97..95878fa76c6c 100644 --- a/java-apigee-connect/pom.xml +++ b/java-apigee-connect/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-apigee-connect-parent pom - 2.28.0 + 2.29.0 Google Apigee Connect Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-apigee-connect - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-apigee-connect-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-apigee-connect-v1 - 2.28.0 + 2.29.0 diff --git a/java-apigee-connect/proto-google-cloud-apigee-connect-v1/pom.xml b/java-apigee-connect/proto-google-cloud-apigee-connect-v1/pom.xml index fff989e597db..33f2b02a1a03 100644 --- a/java-apigee-connect/proto-google-cloud-apigee-connect-v1/pom.xml +++ b/java-apigee-connect/proto-google-cloud-apigee-connect-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-apigee-connect-v1 - 2.28.0 + 2.29.0 proto-google-cloud-apigee-connect-v1 Proto library for google-cloud-apigee-connect com.google.cloud google-cloud-apigee-connect-parent - 2.28.0 + 2.29.0 diff --git a/java-apigee-registry/CHANGELOG.md b/java-apigee-registry/CHANGELOG.md index 4789906295ca..d6e86a680a8b 100644 --- a/java-apigee-registry/CHANGELOG.md +++ b/java-apigee-registry/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.28.0 (2023-10-11) ### Dependencies diff --git a/java-apigee-registry/README.md b/java-apigee-registry/README.md index 05e2a3227837..41f19d6c7db4 100644 --- a/java-apigee-registry/README.md +++ b/java-apigee-registry/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-apigee-registry - 0.28.0 + 0.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-apigee-registry:0.28.0' +implementation 'com.google.cloud:google-cloud-apigee-registry:0.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-apigee-registry" % "0.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-apigee-registry" % "0.29.0" ``` diff --git a/java-apigee-registry/google-cloud-apigee-registry-bom/pom.xml b/java-apigee-registry/google-cloud-apigee-registry-bom/pom.xml index ebf40b2d464f..b9b94b561143 100644 --- a/java-apigee-registry/google-cloud-apigee-registry-bom/pom.xml +++ b/java-apigee-registry/google-cloud-apigee-registry-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-apigee-registry-bom - 0.28.0 + 0.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-apigee-registry - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-apigee-registry-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-apigee-registry-v1 - 0.28.0 + 0.29.0 diff --git a/java-apigee-registry/google-cloud-apigee-registry/pom.xml b/java-apigee-registry/google-cloud-apigee-registry/pom.xml index b6100974957d..21fe2f7e2c17 100644 --- a/java-apigee-registry/google-cloud-apigee-registry/pom.xml +++ b/java-apigee-registry/google-cloud-apigee-registry/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-apigee-registry - 0.28.0 + 0.29.0 jar Google Registry API Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. com.google.cloud google-cloud-apigee-registry-parent - 0.28.0 + 0.29.0 google-cloud-apigee-registry diff --git a/java-apigee-registry/grpc-google-cloud-apigee-registry-v1/pom.xml b/java-apigee-registry/grpc-google-cloud-apigee-registry-v1/pom.xml index c237552efa23..bd64fc9d939b 100644 --- a/java-apigee-registry/grpc-google-cloud-apigee-registry-v1/pom.xml +++ b/java-apigee-registry/grpc-google-cloud-apigee-registry-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-apigee-registry-v1 - 0.28.0 + 0.29.0 grpc-google-cloud-apigee-registry-v1 GRPC library for google-cloud-apigee-registry com.google.cloud google-cloud-apigee-registry-parent - 0.28.0 + 0.29.0 diff --git a/java-apigee-registry/pom.xml b/java-apigee-registry/pom.xml index 1f60c22a03a3..b4e4f4651b92 100644 --- a/java-apigee-registry/pom.xml +++ b/java-apigee-registry/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-apigee-registry-parent pom - 0.28.0 + 0.29.0 Google Registry API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-apigee-registry - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-apigee-registry-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-apigee-registry-v1 - 0.28.0 + 0.29.0 diff --git a/java-apigee-registry/proto-google-cloud-apigee-registry-v1/pom.xml b/java-apigee-registry/proto-google-cloud-apigee-registry-v1/pom.xml index e5df0f38cfa9..a5c2580e6345 100644 --- a/java-apigee-registry/proto-google-cloud-apigee-registry-v1/pom.xml +++ b/java-apigee-registry/proto-google-cloud-apigee-registry-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-apigee-registry-v1 - 0.28.0 + 0.29.0 proto-google-cloud-apigee-registry-v1 Proto library for google-cloud-apigee-registry com.google.cloud google-cloud-apigee-registry-parent - 0.28.0 + 0.29.0 diff --git a/java-apikeys/CHANGELOG.md b/java-apikeys/CHANGELOG.md index 8f3994f49049..3ed925cb1009 100644 --- a/java-apikeys/CHANGELOG.md +++ b/java-apikeys/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.26.0 (2023-10-11) ### Dependencies diff --git a/java-apikeys/README.md b/java-apikeys/README.md index f0e8945e4c3a..78be849110f8 100644 --- a/java-apikeys/README.md +++ b/java-apikeys/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-apikeys - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-apikeys:0.26.0' +implementation 'com.google.cloud:google-cloud-apikeys:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-apikeys" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-apikeys" % "0.27.0" ``` diff --git a/java-apikeys/google-cloud-apikeys-bom/pom.xml b/java-apikeys/google-cloud-apikeys-bom/pom.xml index 398e60bc9a83..306d9dda4b85 100644 --- a/java-apikeys/google-cloud-apikeys-bom/pom.xml +++ b/java-apikeys/google-cloud-apikeys-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-apikeys-bom - 0.26.0 + 0.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-apikeys - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-apikeys-v2 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-apikeys-v2 - 0.26.0 + 0.27.0 diff --git a/java-apikeys/google-cloud-apikeys/pom.xml b/java-apikeys/google-cloud-apikeys/pom.xml index c4090e85fb44..a53822b561c5 100644 --- a/java-apikeys/google-cloud-apikeys/pom.xml +++ b/java-apikeys/google-cloud-apikeys/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-apikeys - 0.26.0 + 0.27.0 jar Google API Keys API API Keys API API Keys lets you create and manage your API keys for your projects. com.google.cloud google-cloud-apikeys-parent - 0.26.0 + 0.27.0 google-cloud-apikeys diff --git a/java-apikeys/grpc-google-cloud-apikeys-v2/pom.xml b/java-apikeys/grpc-google-cloud-apikeys-v2/pom.xml index e6bcb6666e50..cfb9e1b13ea0 100644 --- a/java-apikeys/grpc-google-cloud-apikeys-v2/pom.xml +++ b/java-apikeys/grpc-google-cloud-apikeys-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-apikeys-v2 - 0.26.0 + 0.27.0 grpc-google-cloud-apikeys-v2 GRPC library for google-cloud-apikeys com.google.cloud google-cloud-apikeys-parent - 0.26.0 + 0.27.0 diff --git a/java-apikeys/pom.xml b/java-apikeys/pom.xml index 8bfd8d4ef158..8fe75dde7379 100644 --- a/java-apikeys/pom.xml +++ b/java-apikeys/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-apikeys-parent pom - 0.26.0 + 0.27.0 Google API Keys API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-apikeys - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-apikeys-v2 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-apikeys-v2 - 0.26.0 + 0.27.0 diff --git a/java-apikeys/proto-google-cloud-apikeys-v2/pom.xml b/java-apikeys/proto-google-cloud-apikeys-v2/pom.xml index 9a67198a119f..76c805753b30 100644 --- a/java-apikeys/proto-google-cloud-apikeys-v2/pom.xml +++ b/java-apikeys/proto-google-cloud-apikeys-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-apikeys-v2 - 0.26.0 + 0.27.0 proto-google-cloud-apikeys-v2 Proto library for google-cloud-apikeys com.google.cloud google-cloud-apikeys-parent - 0.26.0 + 0.27.0 diff --git a/java-appengine-admin/CHANGELOG.md b/java-appengine-admin/CHANGELOG.md index d26734e53f00..f1e3fb6a3367 100644 --- a/java-appengine-admin/CHANGELOG.md +++ b/java-appengine-admin/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-appengine-admin/README.md b/java-appengine-admin/README.md index fe984199cc24..3711612423be 100644 --- a/java-appengine-admin/README.md +++ b/java-appengine-admin/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-appengine-admin - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-appengine-admin:2.28.0' +implementation 'com.google.cloud:google-cloud-appengine-admin:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-appengine-admin" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-appengine-admin" % "2.29.0" ``` diff --git a/java-appengine-admin/google-cloud-appengine-admin-bom/pom.xml b/java-appengine-admin/google-cloud-appengine-admin-bom/pom.xml index fb33055f974e..15ab9e1b48fa 100644 --- a/java-appengine-admin/google-cloud-appengine-admin-bom/pom.xml +++ b/java-appengine-admin/google-cloud-appengine-admin-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-appengine-admin-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-appengine-admin - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-appengine-admin-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-appengine-admin-v1 - 2.28.0 + 2.29.0 diff --git a/java-appengine-admin/google-cloud-appengine-admin/pom.xml b/java-appengine-admin/google-cloud-appengine-admin/pom.xml index 1bbdffef1c9f..ccb73e84090d 100644 --- a/java-appengine-admin/google-cloud-appengine-admin/pom.xml +++ b/java-appengine-admin/google-cloud-appengine-admin/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-appengine-admin - 2.28.0 + 2.29.0 jar Google App Engine Admin API App Engine Admin API you to manage your App Engine applications. com.google.cloud google-cloud-appengine-admin-parent - 2.28.0 + 2.29.0 google-cloud-appengine-admin diff --git a/java-appengine-admin/grpc-google-cloud-appengine-admin-v1/pom.xml b/java-appengine-admin/grpc-google-cloud-appengine-admin-v1/pom.xml index f37b91b7f83b..fe59afa07242 100644 --- a/java-appengine-admin/grpc-google-cloud-appengine-admin-v1/pom.xml +++ b/java-appengine-admin/grpc-google-cloud-appengine-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-appengine-admin-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-appengine-admin-v1 GRPC library for google-cloud-appengine-admin com.google.cloud google-cloud-appengine-admin-parent - 2.28.0 + 2.29.0 diff --git a/java-appengine-admin/pom.xml b/java-appengine-admin/pom.xml index ab318efe4f8e..7cb7a824a7e4 100644 --- a/java-appengine-admin/pom.xml +++ b/java-appengine-admin/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-appengine-admin-parent pom - 2.28.0 + 2.29.0 Google App Engine Admin API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-appengine-admin - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-appengine-admin-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-appengine-admin-v1 - 2.28.0 + 2.29.0 diff --git a/java-appengine-admin/proto-google-cloud-appengine-admin-v1/pom.xml b/java-appengine-admin/proto-google-cloud-appengine-admin-v1/pom.xml index 19e87dfcb401..e8ec0e8c5bdd 100644 --- a/java-appengine-admin/proto-google-cloud-appengine-admin-v1/pom.xml +++ b/java-appengine-admin/proto-google-cloud-appengine-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-appengine-admin-v1 - 2.28.0 + 2.29.0 proto-google-cloud-appengine-admin-v1 Proto library for google-cloud-appengine-admin com.google.cloud google-cloud-appengine-admin-parent - 2.28.0 + 2.29.0 diff --git a/java-area120-tables/CHANGELOG.md b/java-area120-tables/CHANGELOG.md index 4215dda52c1e..cd5a4d07649c 100644 --- a/java-area120-tables/CHANGELOG.md +++ b/java-area120-tables/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.33.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.32.0 (2023-10-11) ### Dependencies diff --git a/java-area120-tables/README.md b/java-area120-tables/README.md index dd775b430e1a..c3348416537d 100644 --- a/java-area120-tables/README.md +++ b/java-area120-tables/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.area120 google-area120-tables - 0.32.0 + 0.33.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.area120:google-area120-tables:0.32.0' +implementation 'com.google.area120:google-area120-tables:0.33.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.area120" % "google-area120-tables" % "0.32.0" +libraryDependencies += "com.google.area120" % "google-area120-tables" % "0.33.0" ``` diff --git a/java-area120-tables/google-area120-tables-bom/pom.xml b/java-area120-tables/google-area120-tables-bom/pom.xml index 4e72fd99dff7..58e06376fb03 100644 --- a/java-area120-tables/google-area120-tables-bom/pom.xml +++ b/java-area120-tables/google-area120-tables-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.area120 google-area120-tables-bom - 0.32.0 + 0.33.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.area120 google-area120-tables - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-area120-tables-v1alpha1 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-area120-tables-v1alpha1 - 0.32.0 + 0.33.0 diff --git a/java-area120-tables/google-area120-tables/pom.xml b/java-area120-tables/google-area120-tables/pom.xml index 2799a4449b6a..9089cce9993e 100644 --- a/java-area120-tables/google-area120-tables/pom.xml +++ b/java-area120-tables/google-area120-tables/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.area120 google-area120-tables - 0.32.0 + 0.33.0 jar Google Area 120 Tables provides programmatic methods to the Area 120 Tables API. com.google.area120 google-area120-tables-parent - 0.32.0 + 0.33.0 google-area120-tables diff --git a/java-area120-tables/grpc-google-area120-tables-v1alpha1/pom.xml b/java-area120-tables/grpc-google-area120-tables-v1alpha1/pom.xml index 951a063b3c3a..08ceb34a9740 100644 --- a/java-area120-tables/grpc-google-area120-tables-v1alpha1/pom.xml +++ b/java-area120-tables/grpc-google-area120-tables-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-area120-tables-v1alpha1 - 0.32.0 + 0.33.0 grpc-google-area120-tables-v1alpha1 GRPC library for google-area120-tables com.google.area120 google-area120-tables-parent - 0.32.0 + 0.33.0 diff --git a/java-area120-tables/pom.xml b/java-area120-tables/pom.xml index 96dcda05be6a..469f62259aaf 100644 --- a/java-area120-tables/pom.xml +++ b/java-area120-tables/pom.xml @@ -4,7 +4,7 @@ com.google.area120 google-area120-tables-parent pom - 0.32.0 + 0.33.0 Google Area 120 Tables Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.area120 google-area120-tables - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-area120-tables-v1alpha1 - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-area120-tables-v1alpha1 - 0.32.0 + 0.33.0 diff --git a/java-area120-tables/proto-google-area120-tables-v1alpha1/pom.xml b/java-area120-tables/proto-google-area120-tables-v1alpha1/pom.xml index c86264704b5e..a45d911b2ab3 100644 --- a/java-area120-tables/proto-google-area120-tables-v1alpha1/pom.xml +++ b/java-area120-tables/proto-google-area120-tables-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-area120-tables-v1alpha1 - 0.32.0 + 0.33.0 proto-google-area120-tables-v1alpha1 Proto library for google-area120-tables com.google.area120 google-area120-tables-parent - 0.32.0 + 0.33.0 diff --git a/java-artifact-registry/CHANGELOG.md b/java-artifact-registry/CHANGELOG.md index 4350a9fcaad9..f1f37d5cca22 100644 --- a/java-artifact-registry/CHANGELOG.md +++ b/java-artifact-registry/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.27.0 (2023-10-11) ### Dependencies diff --git a/java-artifact-registry/README.md b/java-artifact-registry/README.md index b5d6cf0dcb3f..0ae46620e117 100644 --- a/java-artifact-registry/README.md +++ b/java-artifact-registry/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-artifact-registry - 1.27.0 + 1.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-artifact-registry:1.27.0' +implementation 'com.google.cloud:google-cloud-artifact-registry:1.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-artifact-registry" % "1.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-artifact-registry" % "1.28.0" ``` diff --git a/java-artifact-registry/google-cloud-artifact-registry-bom/pom.xml b/java-artifact-registry/google-cloud-artifact-registry-bom/pom.xml index 0f04db36a50f..34b70d8b22d8 100644 --- a/java-artifact-registry/google-cloud-artifact-registry-bom/pom.xml +++ b/java-artifact-registry/google-cloud-artifact-registry-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-artifact-registry-bom - 1.27.0 + 1.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-artifact-registry - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-artifact-registry-v1beta2 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-artifact-registry-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-artifact-registry-v1beta2 - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-artifact-registry-v1 - 1.27.0 + 1.28.0 diff --git a/java-artifact-registry/google-cloud-artifact-registry/pom.xml b/java-artifact-registry/google-cloud-artifact-registry/pom.xml index 884ca7e2c6db..e32e16c15059 100644 --- a/java-artifact-registry/google-cloud-artifact-registry/pom.xml +++ b/java-artifact-registry/google-cloud-artifact-registry/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-artifact-registry - 1.27.0 + 1.28.0 jar Google Artifact Registry provides a single place for your organization to manage container images and language packages (such as Maven and npm). It is fully integrated with Google Cloud's tooling and runtimes and comes with support for native artifact protocols. This makes it simple to integrate it with your CI/CD tooling to set up automated pipelines. com.google.cloud google-cloud-artifact-registry-parent - 1.27.0 + 1.28.0 google-cloud-artifact-registry diff --git a/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/pom.xml b/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/pom.xml index a7696ab51880..e32eaaa5f72f 100644 --- a/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/pom.xml +++ b/java-artifact-registry/grpc-google-cloud-artifact-registry-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-artifact-registry-v1 - 1.27.0 + 1.28.0 grpc-google-cloud-artifact-registry-v1 GRPC library for google-cloud-artifact-registry com.google.cloud google-cloud-artifact-registry-parent - 1.27.0 + 1.28.0 diff --git a/java-artifact-registry/grpc-google-cloud-artifact-registry-v1beta2/pom.xml b/java-artifact-registry/grpc-google-cloud-artifact-registry-v1beta2/pom.xml index 2eb0669ecd25..e03654818b2d 100644 --- a/java-artifact-registry/grpc-google-cloud-artifact-registry-v1beta2/pom.xml +++ b/java-artifact-registry/grpc-google-cloud-artifact-registry-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-artifact-registry-v1beta2 - 0.33.0 + 0.34.0 grpc-google-cloud-artifact-registry-v1beta2 GRPC library for google-cloud-artifact-registry com.google.cloud google-cloud-artifact-registry-parent - 1.27.0 + 1.28.0 diff --git a/java-artifact-registry/pom.xml b/java-artifact-registry/pom.xml index a807caa7ab3c..437d642b3da7 100644 --- a/java-artifact-registry/pom.xml +++ b/java-artifact-registry/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-artifact-registry-parent pom - 1.27.0 + 1.28.0 Google Artifact Registry Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-artifact-registry - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-artifact-registry-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-artifact-registry-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-artifact-registry-v1beta2 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-artifact-registry-v1beta2 - 0.33.0 + 0.34.0 diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/pom.xml b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/pom.xml index d55ece05ea3c..13b627745843 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/pom.xml +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-artifact-registry-v1 - 1.27.0 + 1.28.0 proto-google-cloud-artifact-registry-v1 Proto library for google-cloud-artifact-registry com.google.cloud google-cloud-artifact-registry-parent - 1.27.0 + 1.28.0 diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1beta2/pom.xml b/java-artifact-registry/proto-google-cloud-artifact-registry-v1beta2/pom.xml index 8e4a644efcea..384f710150d8 100644 --- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1beta2/pom.xml +++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-artifact-registry-v1beta2 - 0.33.0 + 0.34.0 grpc-google-cloud-artifact-registry-v1beta2 Proto library for google-cloud-artifact-registry com.google.cloud google-cloud-artifact-registry-parent - 1.27.0 + 1.28.0 diff --git a/java-asset/CHANGELOG.md b/java-asset/CHANGELOG.md index 23a65fecfa1c..cfdbf81c2e0a 100644 --- a/java-asset/CHANGELOG.md +++ b/java-asset/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.33.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.32.0 (2023-10-11) ### Dependencies diff --git a/java-asset/README.md b/java-asset/README.md index 5c1076643b88..bd042bc09f32 100644 --- a/java-asset/README.md +++ b/java-asset/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-asset - 3.32.0 + 3.33.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-asset:3.32.0' +implementation 'com.google.cloud:google-cloud-asset:3.33.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "3.32.0" +libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "3.33.0" ``` diff --git a/java-asset/google-cloud-asset-bom/pom.xml b/java-asset/google-cloud-asset-bom/pom.xml index f9767cf254fd..bbe17f3a7318 100644 --- a/java-asset/google-cloud-asset-bom/pom.xml +++ b/java-asset/google-cloud-asset-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-asset-bom - 3.32.0 + 3.33.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,57 +23,57 @@ com.google.cloud google-cloud-asset - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-asset-v1 - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-asset-v1p2beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-asset-v1p5beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-asset-v1p7beta1 - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-asset-v1 - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-asset-v1p1beta1 - 0.132.0 + 0.133.0 com.google.api.grpc proto-google-cloud-asset-v1p2beta1 - 0.132.0 + 0.133.0 com.google.api.grpc proto-google-cloud-asset-v1p5beta1 - 0.132.0 + 0.133.0 com.google.api.grpc proto-google-cloud-asset-v1p7beta1 - 3.32.0 + 3.33.0 diff --git a/java-asset/google-cloud-asset/pom.xml b/java-asset/google-cloud-asset/pom.xml index a8f664962b16..4ce00bd99bfb 100644 --- a/java-asset/google-cloud-asset/pom.xml +++ b/java-asset/google-cloud-asset/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-asset - 3.32.0 + 3.33.0 jar Google Cloud Asset Java idiomatic client for Google Cloud Asset com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 google-cloud-asset diff --git a/java-asset/grpc-google-cloud-asset-v1/pom.xml b/java-asset/grpc-google-cloud-asset-v1/pom.xml index bcdaffb8d936..8dfdb4325634 100644 --- a/java-asset/grpc-google-cloud-asset-v1/pom.xml +++ b/java-asset/grpc-google-cloud-asset-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1 - 3.32.0 + 3.33.0 grpc-google-cloud-asset-v1 GRPC library for grpc-google-cloud-asset-v1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/grpc-google-cloud-asset-v1p1beta1/pom.xml b/java-asset/grpc-google-cloud-asset-v1p1beta1/pom.xml index 4780b964188f..8cab6a00ec5f 100644 --- a/java-asset/grpc-google-cloud-asset-v1p1beta1/pom.xml +++ b/java-asset/grpc-google-cloud-asset-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 - 0.132.0 + 0.133.0 grpc-google-cloud-asset-v1p1beta1 GRPC library for grpc-google-cloud-asset-v1p1beta1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/grpc-google-cloud-asset-v1p2beta1/pom.xml b/java-asset/grpc-google-cloud-asset-v1p2beta1/pom.xml index afc169c92814..b682f73224a2 100644 --- a/java-asset/grpc-google-cloud-asset-v1p2beta1/pom.xml +++ b/java-asset/grpc-google-cloud-asset-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p2beta1 - 0.132.0 + 0.133.0 grpc-google-cloud-asset-v1p2beta1 GRPC library for grpc-google-cloud-asset-v1p2beta1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/grpc-google-cloud-asset-v1p5beta1/pom.xml b/java-asset/grpc-google-cloud-asset-v1p5beta1/pom.xml index fc8980fb6740..3023bdca1a17 100644 --- a/java-asset/grpc-google-cloud-asset-v1p5beta1/pom.xml +++ b/java-asset/grpc-google-cloud-asset-v1p5beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p5beta1 - 0.132.0 + 0.133.0 grpc-google-cloud-asset-v1p5beta1 GRPC library for grpc-google-cloud-asset-v1p5beta1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/grpc-google-cloud-asset-v1p7beta1/pom.xml b/java-asset/grpc-google-cloud-asset-v1p7beta1/pom.xml index d8e368b48de7..affe86e28ef6 100644 --- a/java-asset/grpc-google-cloud-asset-v1p7beta1/pom.xml +++ b/java-asset/grpc-google-cloud-asset-v1p7beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-asset-v1p7beta1 - 3.32.0 + 3.33.0 grpc-google-cloud-asset-v1p7beta1 GRPC library for google-cloud-asset com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/pom.xml b/java-asset/pom.xml index 30d29c6a4056..0977c99fb2b4 100644 --- a/java-asset/pom.xml +++ b/java-asset/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-asset-parent pom - 3.32.0 + 3.33.0 Google Cloud Asset Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,77 +29,77 @@ com.google.api.grpc proto-google-cloud-asset-v1 - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-asset-v1p7beta1 - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-asset-v1p7beta1 - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-asset-v1p1beta1 - 0.132.0 + 0.133.0 com.google.api.grpc proto-google-cloud-asset-v1p2beta1 - 0.132.0 + 0.133.0 com.google.api.grpc proto-google-cloud-asset-v1p5beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-asset-v1 - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-asset-v1p1beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-asset-v1p2beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-asset-v1p5beta1 - 0.132.0 + 0.133.0 com.google.cloud google-cloud-asset - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-orgpolicy-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-identity-accesscontextmanager-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-cloud-os-config-v1 - 2.30.0 + 2.31.0 com.google.cloud google-cloud-resourcemanager - 1.30.0 + 1.31.0 test diff --git a/java-asset/proto-google-cloud-asset-v1/pom.xml b/java-asset/proto-google-cloud-asset-v1/pom.xml index c400124ddf8b..b3fe33673c42 100644 --- a/java-asset/proto-google-cloud-asset-v1/pom.xml +++ b/java-asset/proto-google-cloud-asset-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1 - 3.32.0 + 3.33.0 proto-google-cloud-asset-v1 PROTO library for proto-google-cloud-asset-v1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/proto-google-cloud-asset-v1p1beta1/pom.xml b/java-asset/proto-google-cloud-asset-v1p1beta1/pom.xml index 6ddf26231197..95c2f197f2ed 100644 --- a/java-asset/proto-google-cloud-asset-v1p1beta1/pom.xml +++ b/java-asset/proto-google-cloud-asset-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p1beta1 - 0.132.0 + 0.133.0 proto-google-cloud-asset-v1p1beta1 PROTO library for proto-google-cloud-asset-v1p1beta1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/proto-google-cloud-asset-v1p2beta1/pom.xml b/java-asset/proto-google-cloud-asset-v1p2beta1/pom.xml index 4c30e7d4fa1a..7131babcbde4 100644 --- a/java-asset/proto-google-cloud-asset-v1p2beta1/pom.xml +++ b/java-asset/proto-google-cloud-asset-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p2beta1 - 0.132.0 + 0.133.0 proto-google-cloud-asset-v1p2beta1 PROTO library for proto-google-cloud-asset-v1p2beta1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/proto-google-cloud-asset-v1p5beta1/pom.xml b/java-asset/proto-google-cloud-asset-v1p5beta1/pom.xml index 70b619dd58c3..07a7c48e743b 100644 --- a/java-asset/proto-google-cloud-asset-v1p5beta1/pom.xml +++ b/java-asset/proto-google-cloud-asset-v1p5beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p5beta1 - 0.132.0 + 0.133.0 proto-google-cloud-asset-v1p5beta1 PROTO library for proto-google-cloud-asset-v1p4beta1 com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-asset/proto-google-cloud-asset-v1p7beta1/pom.xml b/java-asset/proto-google-cloud-asset-v1p7beta1/pom.xml index 36c8f4a989ce..d7ddc2124344 100644 --- a/java-asset/proto-google-cloud-asset-v1p7beta1/pom.xml +++ b/java-asset/proto-google-cloud-asset-v1p7beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-asset-v1p7beta1 - 3.32.0 + 3.33.0 proto-google-cloud-asset-v1p7beta1 Proto library for google-cloud-asset com.google.cloud google-cloud-asset-parent - 3.32.0 + 3.33.0 diff --git a/java-assured-workloads/CHANGELOG.md b/java-assured-workloads/CHANGELOG.md index 5fed76b5e933..7872363a119a 100644 --- a/java-assured-workloads/CHANGELOG.md +++ b/java-assured-workloads/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-assured-workloads/README.md b/java-assured-workloads/README.md index ec5aeac7fcd3..8b92c2d69da6 100644 --- a/java-assured-workloads/README.md +++ b/java-assured-workloads/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-assured-workloads - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-assured-workloads:2.28.0' +implementation 'com.google.cloud:google-cloud-assured-workloads:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-assured-workloads" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-assured-workloads" % "2.29.0" ``` diff --git a/java-assured-workloads/google-cloud-assured-workloads-bom/pom.xml b/java-assured-workloads/google-cloud-assured-workloads-bom/pom.xml index 0e8c496a87f8..35f659c29671 100644 --- a/java-assured-workloads/google-cloud-assured-workloads-bom/pom.xml +++ b/java-assured-workloads/google-cloud-assured-workloads-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-assured-workloads-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-assured-workloads - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-assured-workloads-v1beta1 - 0.40.0 + 0.41.0 com.google.api.grpc grpc-google-cloud-assured-workloads-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-assured-workloads-v1beta1 - 0.40.0 + 0.41.0 com.google.api.grpc proto-google-cloud-assured-workloads-v1 - 2.28.0 + 2.29.0 diff --git a/java-assured-workloads/google-cloud-assured-workloads/pom.xml b/java-assured-workloads/google-cloud-assured-workloads/pom.xml index 3414d5355ce7..aa3fcadc4ad7 100644 --- a/java-assured-workloads/google-cloud-assured-workloads/pom.xml +++ b/java-assured-workloads/google-cloud-assured-workloads/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-assured-workloads - 2.28.0 + 2.29.0 jar Google Assured Workloads for Government allows you to secure your government workloads and accelerate your path to running compliant workloads on Google Cloud with Assured Workloads for Government. com.google.cloud google-cloud-assured-workloads-parent - 2.28.0 + 2.29.0 google-cloud-assured-workloads diff --git a/java-assured-workloads/grpc-google-cloud-assured-workloads-v1/pom.xml b/java-assured-workloads/grpc-google-cloud-assured-workloads-v1/pom.xml index aa726240da9c..e0e20ac2df57 100644 --- a/java-assured-workloads/grpc-google-cloud-assured-workloads-v1/pom.xml +++ b/java-assured-workloads/grpc-google-cloud-assured-workloads-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-assured-workloads-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-assured-workloads-v1 GRPC library for google-cloud-assured-workloads com.google.cloud google-cloud-assured-workloads-parent - 2.28.0 + 2.29.0 diff --git a/java-assured-workloads/grpc-google-cloud-assured-workloads-v1beta1/pom.xml b/java-assured-workloads/grpc-google-cloud-assured-workloads-v1beta1/pom.xml index 65f284dd975d..8fd4541180f9 100644 --- a/java-assured-workloads/grpc-google-cloud-assured-workloads-v1beta1/pom.xml +++ b/java-assured-workloads/grpc-google-cloud-assured-workloads-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-assured-workloads-v1beta1 - 0.40.0 + 0.41.0 grpc-google-cloud-assured-workloads-v1beta1 GRPC library for google-cloud-assured-workloads com.google.cloud google-cloud-assured-workloads-parent - 2.28.0 + 2.29.0 diff --git a/java-assured-workloads/pom.xml b/java-assured-workloads/pom.xml index ef4a6e8c743a..48854fef6440 100644 --- a/java-assured-workloads/pom.xml +++ b/java-assured-workloads/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-assured-workloads-parent pom - 2.28.0 + 2.29.0 Google Assured Workloads for Government Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-assured-workloads - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-assured-workloads-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-assured-workloads-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-assured-workloads-v1beta1 - 0.40.0 + 0.41.0 com.google.api.grpc grpc-google-cloud-assured-workloads-v1beta1 - 0.40.0 + 0.41.0 diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/pom.xml b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/pom.xml index 86b8cdcdb6d6..346994da4652 100644 --- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1/pom.xml +++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-assured-workloads-v1 - 2.28.0 + 2.29.0 proto-google-cloud-assured-workloads-v1 Proto library for google-cloud-assured-workloads com.google.cloud google-cloud-assured-workloads-parent - 2.28.0 + 2.29.0 diff --git a/java-assured-workloads/proto-google-cloud-assured-workloads-v1beta1/pom.xml b/java-assured-workloads/proto-google-cloud-assured-workloads-v1beta1/pom.xml index 7fbf19a26394..357b879a81ee 100644 --- a/java-assured-workloads/proto-google-cloud-assured-workloads-v1beta1/pom.xml +++ b/java-assured-workloads/proto-google-cloud-assured-workloads-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-assured-workloads-v1beta1 - 0.40.0 + 0.41.0 proto-google-cloud-assured-workloads-v1beta1 Proto library for google-cloud-assured-workloads com.google.cloud google-cloud-assured-workloads-parent - 2.28.0 + 2.29.0 diff --git a/java-automl/CHANGELOG.md b/java-automl/CHANGELOG.md index 27b9855d9e9f..cf113a859302 100644 --- a/java-automl/CHANGELOG.md +++ b/java-automl/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-automl/README.md b/java-automl/README.md index a85a292694bd..d1f95e1e6eb3 100644 --- a/java-automl/README.md +++ b/java-automl/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-automl - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-automl:2.28.0' +implementation 'com.google.cloud:google-cloud-automl:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-automl" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-automl" % "2.29.0" ``` diff --git a/java-automl/google-cloud-automl-bom/pom.xml b/java-automl/google-cloud-automl-bom/pom.xml index f39401924391..9892786b18e2 100644 --- a/java-automl/google-cloud-automl-bom/pom.xml +++ b/java-automl/google-cloud-automl-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-automl-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-automl - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-automl-v1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-automl-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-automl-v1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-automl-v1 - 2.28.0 + 2.29.0 diff --git a/java-automl/google-cloud-automl/pom.xml b/java-automl/google-cloud-automl/pom.xml index edec4bc53bed..02b54cc4a3be 100644 --- a/java-automl/google-cloud-automl/pom.xml +++ b/java-automl/google-cloud-automl/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-automl - 2.28.0 + 2.29.0 jar Google Cloud AutoML Java idiomatic client for Google Cloud Auto ML com.google.cloud google-cloud-automl-parent - 2.28.0 + 2.29.0 google-cloud-automl diff --git a/java-automl/grpc-google-cloud-automl-v1/pom.xml b/java-automl/grpc-google-cloud-automl-v1/pom.xml index 3427f980ded9..a7ec1a45aa46 100644 --- a/java-automl/grpc-google-cloud-automl-v1/pom.xml +++ b/java-automl/grpc-google-cloud-automl-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-automl-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-automl-v1 GRPC library for grpc-google-cloud-automl-v1 com.google.cloud google-cloud-automl-parent - 2.28.0 + 2.29.0 diff --git a/java-automl/grpc-google-cloud-automl-v1beta1/pom.xml b/java-automl/grpc-google-cloud-automl-v1beta1/pom.xml index deefc9a0d623..545a2f1807a7 100644 --- a/java-automl/grpc-google-cloud-automl-v1beta1/pom.xml +++ b/java-automl/grpc-google-cloud-automl-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-automl-v1beta1 - 0.115.0 + 0.116.0 grpc-google-cloud-automl-v1beta1 GRPC library for grpc-google-cloud-automl-v1beta1 com.google.cloud google-cloud-automl-parent - 2.28.0 + 2.29.0 diff --git a/java-automl/pom.xml b/java-automl/pom.xml index 4a37ce6df0c8..696faa29a2ea 100644 --- a/java-automl/pom.xml +++ b/java-automl/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-automl-parent pom - 2.28.0 + 2.29.0 Google Cloud AutoML Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-automl-v1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-automl-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-automl-v1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-automl-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-automl - 2.28.0 + 2.29.0 diff --git a/java-automl/proto-google-cloud-automl-v1/pom.xml b/java-automl/proto-google-cloud-automl-v1/pom.xml index 73c2d8a612c3..d498cf62a6cd 100644 --- a/java-automl/proto-google-cloud-automl-v1/pom.xml +++ b/java-automl/proto-google-cloud-automl-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-automl-v1 - 2.28.0 + 2.29.0 proto-google-cloud-automl-v1 PROTO library for proto-google-cloud-automl-v1 com.google.cloud google-cloud-automl-parent - 2.28.0 + 2.29.0 diff --git a/java-automl/proto-google-cloud-automl-v1beta1/pom.xml b/java-automl/proto-google-cloud-automl-v1beta1/pom.xml index d89b94c013d8..7df37b3e9f84 100644 --- a/java-automl/proto-google-cloud-automl-v1beta1/pom.xml +++ b/java-automl/proto-google-cloud-automl-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-automl-v1beta1 - 0.115.0 + 0.116.0 proto-google-cloud-automl-v1beta1 PROTO library for proto-google-cloud-automl-v1beta1 com.google.cloud google-cloud-automl-parent - 2.28.0 + 2.29.0 diff --git a/java-bare-metal-solution/CHANGELOG.md b/java-bare-metal-solution/CHANGELOG.md index e070941fe99e..b2c0d15d1d5f 100644 --- a/java-bare-metal-solution/CHANGELOG.md +++ b/java-bare-metal-solution/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.28.0 (2023-10-11) ### Dependencies diff --git a/java-bare-metal-solution/README.md b/java-bare-metal-solution/README.md index 460ee6d12236..b7037f9a481c 100644 --- a/java-bare-metal-solution/README.md +++ b/java-bare-metal-solution/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-bare-metal-solution - 0.28.0 + 0.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bare-metal-solution:0.28.0' +implementation 'com.google.cloud:google-cloud-bare-metal-solution:0.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bare-metal-solution" % "0.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bare-metal-solution" % "0.29.0" ``` diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution-bom/pom.xml b/java-bare-metal-solution/google-cloud-bare-metal-solution-bom/pom.xml index 753bb4652860..416b7a8fe472 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution-bom/pom.xml +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bare-metal-solution-bom - 0.28.0 + 0.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-bare-metal-solution - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-bare-metal-solution-v2 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-bare-metal-solution-v2 - 0.28.0 + 0.29.0 diff --git a/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml b/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml index 963677080f2d..33e30a7d71d6 100644 --- a/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml +++ b/java-bare-metal-solution/google-cloud-bare-metal-solution/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-bare-metal-solution - 0.28.0 + 0.29.0 jar Google Bare Metal SOlution Bare Metal SOlution Bring your Oracle workloads to Google Cloud with Bare Metal Solution and jumpstart your cloud journey with minimal risk. com.google.cloud google-cloud-bare-metal-solution-parent - 0.28.0 + 0.29.0 google-cloud-bare-metal-solution diff --git a/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/pom.xml b/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/pom.xml index 35a39afedfbd..8b6b6fd8e2b8 100644 --- a/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/pom.xml +++ b/java-bare-metal-solution/grpc-google-cloud-bare-metal-solution-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bare-metal-solution-v2 - 0.28.0 + 0.29.0 grpc-google-cloud-bare-metal-solution-v2 GRPC library for google-cloud-bare-metal-solution com.google.cloud google-cloud-bare-metal-solution-parent - 0.28.0 + 0.29.0 diff --git a/java-bare-metal-solution/pom.xml b/java-bare-metal-solution/pom.xml index 32cb7698850d..59ffc2152141 100644 --- a/java-bare-metal-solution/pom.xml +++ b/java-bare-metal-solution/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bare-metal-solution-parent pom - 0.28.0 + 0.29.0 Google Bare Metal SOlution Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-bare-metal-solution - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-bare-metal-solution-v2 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-bare-metal-solution-v2 - 0.28.0 + 0.29.0 diff --git a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/pom.xml b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/pom.xml index 6cd039c04da4..3c905b176c18 100644 --- a/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/pom.xml +++ b/java-bare-metal-solution/proto-google-cloud-bare-metal-solution-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bare-metal-solution-v2 - 0.28.0 + 0.29.0 proto-google-cloud-bare-metal-solution-v2 Proto library for google-cloud-bare-metal-solution com.google.cloud google-cloud-bare-metal-solution-parent - 0.28.0 + 0.29.0 diff --git a/java-batch/CHANGELOG.md b/java-batch/CHANGELOG.md index a25c268bf220..20c0fe8dccab 100644 --- a/java-batch/CHANGELOG.md +++ b/java-batch/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 0.29.0 (2023-10-25) + +### Features + +* expose display_name to batch v1 API ([#9967](https://github.com/googleapis/google-cloud-java/issues/9967)) ([934c929](https://github.com/googleapis/google-cloud-java/commit/934c92940ec76f96aa71b13249a81cde58bab5ee)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.28.0 (2023-10-11) ### Features diff --git a/java-batch/README.md b/java-batch/README.md index 1d7f4129894e..a5701011d429 100644 --- a/java-batch/README.md +++ b/java-batch/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.24.0 + 26.25.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-batch - 0.28.0 + 0.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-batch:0.28.0' +implementation 'com.google.cloud:google-cloud-batch:0.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-batch" % "0.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-batch" % "0.29.0" ``` @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-batch.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.27.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.28.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-batch/google-cloud-batch-bom/pom.xml b/java-batch/google-cloud-batch-bom/pom.xml index 702267db655b..807f217be27d 100644 --- a/java-batch/google-cloud-batch-bom/pom.xml +++ b/java-batch/google-cloud-batch-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-batch-bom - 0.28.0 + 0.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-batch - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-batch-v1 - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-batch-v1alpha - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-batch-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-batch-v1alpha - 0.28.0 + 0.29.0 diff --git a/java-batch/google-cloud-batch/pom.xml b/java-batch/google-cloud-batch/pom.xml index 243020f577e4..f258567c4a65 100644 --- a/java-batch/google-cloud-batch/pom.xml +++ b/java-batch/google-cloud-batch/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-batch - 0.28.0 + 0.29.0 jar Google Google Cloud Batch Google Cloud Batch n/a com.google.cloud google-cloud-batch-parent - 0.28.0 + 0.29.0 google-cloud-batch diff --git a/java-batch/grpc-google-cloud-batch-v1/pom.xml b/java-batch/grpc-google-cloud-batch-v1/pom.xml index 3dede471ee20..6e65fd3483e8 100644 --- a/java-batch/grpc-google-cloud-batch-v1/pom.xml +++ b/java-batch/grpc-google-cloud-batch-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-batch-v1 - 0.28.0 + 0.29.0 grpc-google-cloud-batch-v1 GRPC library for google-cloud-batch com.google.cloud google-cloud-batch-parent - 0.28.0 + 0.29.0 diff --git a/java-batch/grpc-google-cloud-batch-v1alpha/pom.xml b/java-batch/grpc-google-cloud-batch-v1alpha/pom.xml index d5cf55604838..ffe07fc38f99 100644 --- a/java-batch/grpc-google-cloud-batch-v1alpha/pom.xml +++ b/java-batch/grpc-google-cloud-batch-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-batch-v1alpha - 0.28.0 + 0.29.0 grpc-google-cloud-batch-v1alpha GRPC library for google-cloud-batch com.google.cloud google-cloud-batch-parent - 0.28.0 + 0.29.0 diff --git a/java-batch/pom.xml b/java-batch/pom.xml index 04c07fbdf30e..fd4305600486 100644 --- a/java-batch/pom.xml +++ b/java-batch/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-batch-parent pom - 0.28.0 + 0.29.0 Google Google Cloud Batch Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-batch - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-batch-v1alpha - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-batch-v1alpha - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-batch-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-batch-v1 - 0.28.0 + 0.29.0 diff --git a/java-batch/proto-google-cloud-batch-v1/pom.xml b/java-batch/proto-google-cloud-batch-v1/pom.xml index 8d5e038e19ed..35ab7e8f82d5 100644 --- a/java-batch/proto-google-cloud-batch-v1/pom.xml +++ b/java-batch/proto-google-cloud-batch-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-batch-v1 - 0.28.0 + 0.29.0 proto-google-cloud-batch-v1 Proto library for google-cloud-batch com.google.cloud google-cloud-batch-parent - 0.28.0 + 0.29.0 diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/Runnable.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/Runnable.java index a7c436e033dd..5db4776de1af 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/Runnable.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/Runnable.java @@ -38,7 +38,9 @@ private Runnable(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Runnable() {} + private Runnable() { + displayName_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) @@ -4644,6 +4646,63 @@ public com.google.cloud.batch.v1.Runnable.BarrierOrBuilder getBarrierOrBuilder() return com.google.cloud.batch.v1.Runnable.Barrier.getDefaultInstance(); } + public static final int DISPLAY_NAME_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. DisplayName is an optional field that can be provided by the
+   * caller. If provided, it will be used in logs and other outputs to identify
+   * the script, making it easier for users to understand the logs. If not
+   * provided the index of the runnable will be used for outputs.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. DisplayName is an optional field that can be provided by the
+   * caller. If provided, it will be used in logs and other outputs to identify
+   * the script, making it easier for users to understand the logs. If not
+   * provided the index of the runnable will be used for outputs.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int IGNORE_EXIT_STATUS_FIELD_NUMBER = 3; private boolean ignoreExitStatus_ = false; /** @@ -4949,6 +5008,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, displayName_); + } getUnknownFields().writeTo(output); } @@ -4998,6 +5060,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, displayName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -5013,6 +5078,7 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.batch.v1.Runnable other = (com.google.cloud.batch.v1.Runnable) obj; + if (!getDisplayName().equals(other.getDisplayName())) return false; if (getIgnoreExitStatus() != other.getIgnoreExitStatus()) return false; if (getBackground() != other.getBackground()) return false; if (getAlwaysRun() != other.getAlwaysRun()) return false; @@ -5050,6 +5116,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + IGNORE_EXIT_STATUS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreExitStatus()); hash = (37 * hash) + BACKGROUND_FIELD_NUMBER; @@ -5252,6 +5320,7 @@ public Builder clear() { if (barrierBuilder_ != null) { barrierBuilder_.clear(); } + displayName_ = ""; ignoreExitStatus_ = false; background_ = false; alwaysRun_ = false; @@ -5305,22 +5374,25 @@ public com.google.cloud.batch.v1.Runnable buildPartial() { private void buildPartial0(com.google.cloud.batch.v1.Runnable result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000008) != 0)) { - result.ignoreExitStatus_ = ignoreExitStatus_; + result.displayName_ = displayName_; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.background_ = background_; + result.ignoreExitStatus_ = ignoreExitStatus_; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.alwaysRun_ = alwaysRun_; + result.background_ = background_; } if (((from_bitField0_ & 0x00000040) != 0)) { + result.alwaysRun_ = alwaysRun_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { result.environment_ = environmentBuilder_ == null ? environment_ : environmentBuilder_.build(); } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.timeout_ = timeoutBuilder_ == null ? timeout_ : timeoutBuilder_.build(); } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } @@ -5385,6 +5457,11 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.batch.v1.Runnable other) { if (other == com.google.cloud.batch.v1.Runnable.getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } if (other.getIgnoreExitStatus() != false) { setIgnoreExitStatus(other.getIgnoreExitStatus()); } @@ -5401,7 +5478,7 @@ public Builder mergeFrom(com.google.cloud.batch.v1.Runnable other) { mergeTimeout(other.getTimeout()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; switch (other.getExecutableCase()) { case CONTAINER: { @@ -5464,19 +5541,19 @@ public Builder mergeFrom( case 24: { ignoreExitStatus_ = input.readBool(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 24 case 32: { background_ = input.readBool(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 32 case 40: { alwaysRun_ = input.readBool(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 40 case 50: @@ -5488,13 +5565,13 @@ public Builder mergeFrom( case 58: { input.readMessage(getEnvironmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 58 case 66: { input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 66 case 74: @@ -5506,9 +5583,15 @@ public Builder mergeFrom( internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 74 + case 82: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6167,6 +6250,127 @@ public com.google.cloud.batch.v1.Runnable.BarrierOrBuilder getBarrierOrBuilder() return barrierBuilder_; } + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. DisplayName is an optional field that can be provided by the
+     * caller. If provided, it will be used in logs and other outputs to identify
+     * the script, making it easier for users to understand the logs. If not
+     * provided the index of the runnable will be used for outputs.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. DisplayName is an optional field that can be provided by the
+     * caller. If provided, it will be used in logs and other outputs to identify
+     * the script, making it easier for users to understand the logs. If not
+     * provided the index of the runnable will be used for outputs.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. DisplayName is an optional field that can be provided by the
+     * caller. If provided, it will be used in logs and other outputs to identify
+     * the script, making it easier for users to understand the logs. If not
+     * provided the index of the runnable will be used for outputs.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. DisplayName is an optional field that can be provided by the
+     * caller. If provided, it will be used in logs and other outputs to identify
+     * the script, making it easier for users to understand the logs. If not
+     * provided the index of the runnable will be used for outputs.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. DisplayName is an optional field that can be provided by the
+     * caller. If provided, it will be used in logs and other outputs to identify
+     * the script, making it easier for users to understand the logs. If not
+     * provided the index of the runnable will be used for outputs.
+     * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + private boolean ignoreExitStatus_; /** * @@ -6200,7 +6404,7 @@ public boolean getIgnoreExitStatus() { public Builder setIgnoreExitStatus(boolean value) { ignoreExitStatus_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -6217,7 +6421,7 @@ public Builder setIgnoreExitStatus(boolean value) { * @return This builder for chaining. */ public Builder clearIgnoreExitStatus() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); ignoreExitStatus_ = false; onChanged(); return this; @@ -6258,7 +6462,7 @@ public boolean getBackground() { public Builder setBackground(boolean value) { background_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -6276,7 +6480,7 @@ public Builder setBackground(boolean value) { * @return This builder for chaining. */ public Builder clearBackground() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); background_ = false; onChanged(); return this; @@ -6327,7 +6531,7 @@ public boolean getAlwaysRun() { public Builder setAlwaysRun(boolean value) { alwaysRun_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -6350,7 +6554,7 @@ public Builder setAlwaysRun(boolean value) { * @return This builder for chaining. */ public Builder clearAlwaysRun() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); alwaysRun_ = false; onChanged(); return this; @@ -6375,7 +6579,7 @@ public Builder clearAlwaysRun() { * @return Whether the environment field is set. */ public boolean hasEnvironment() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -6417,7 +6621,7 @@ public Builder setEnvironment(com.google.cloud.batch.v1.Environment value) { } else { environmentBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -6437,7 +6641,7 @@ public Builder setEnvironment(com.google.cloud.batch.v1.Environment.Builder buil } else { environmentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -6453,7 +6657,7 @@ public Builder setEnvironment(com.google.cloud.batch.v1.Environment.Builder buil */ public Builder mergeEnvironment(com.google.cloud.batch.v1.Environment value) { if (environmentBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && environment_ != null && environment_ != com.google.cloud.batch.v1.Environment.getDefaultInstance()) { getEnvironmentBuilder().mergeFrom(value); @@ -6463,7 +6667,7 @@ public Builder mergeEnvironment(com.google.cloud.batch.v1.Environment value) { } else { environmentBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -6478,7 +6682,7 @@ public Builder mergeEnvironment(com.google.cloud.batch.v1.Environment value) { * .google.cloud.batch.v1.Environment environment = 7; */ public Builder clearEnvironment() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); environment_ = null; if (environmentBuilder_ != null) { environmentBuilder_.dispose(); @@ -6498,7 +6702,7 @@ public Builder clearEnvironment() { * .google.cloud.batch.v1.Environment environment = 7; */ public com.google.cloud.batch.v1.Environment.Builder getEnvironmentBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return getEnvironmentFieldBuilder().getBuilder(); } @@ -6566,7 +6770,7 @@ public com.google.cloud.batch.v1.EnvironmentOrBuilder getEnvironmentOrBuilder() * @return Whether the timeout field is set. */ public boolean hasTimeout() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -6604,7 +6808,7 @@ public Builder setTimeout(com.google.protobuf.Duration value) { } else { timeoutBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -6623,7 +6827,7 @@ public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) } else { timeoutBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -6638,7 +6842,7 @@ public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) */ public Builder mergeTimeout(com.google.protobuf.Duration value) { if (timeoutBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && timeout_ != null && timeout_ != com.google.protobuf.Duration.getDefaultInstance()) { getTimeoutBuilder().mergeFrom(value); @@ -6648,7 +6852,7 @@ public Builder mergeTimeout(com.google.protobuf.Duration value) { } else { timeoutBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -6662,7 +6866,7 @@ public Builder mergeTimeout(com.google.protobuf.Duration value) { * .google.protobuf.Duration timeout = 8; */ public Builder clearTimeout() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); timeout_ = null; if (timeoutBuilder_ != null) { timeoutBuilder_.dispose(); @@ -6681,7 +6885,7 @@ public Builder clearTimeout() { * .google.protobuf.Duration timeout = 8; */ public com.google.protobuf.Duration.Builder getTimeoutBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return getTimeoutFieldBuilder().getBuilder(); } @@ -6744,7 +6948,7 @@ private com.google.protobuf.MapField interna if (!labels_.isMutable()) { labels_ = labels_.copy(); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return labels_; } @@ -6829,7 +7033,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); internalGetMutableLabels().getMutableMap().clear(); return this; } @@ -6852,7 +7056,7 @@ public Builder removeLabels(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; return internalGetMutableLabels().getMutableMap(); } /** @@ -6872,7 +7076,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; return this; } /** @@ -6886,7 +7090,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; return this; } diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/RunnableOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/RunnableOrBuilder.java index 9d177296a7ff..6e13d3d6442d 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/RunnableOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/RunnableOrBuilder.java @@ -128,6 +128,37 @@ public interface RunnableOrBuilder */ com.google.cloud.batch.v1.Runnable.BarrierOrBuilder getBarrierOrBuilder(); + /** + * + * + *
+   * Optional. DisplayName is an optional field that can be provided by the
+   * caller. If provided, it will be used in logs and other outputs to identify
+   * the script, making it easier for users to understand the logs. If not
+   * provided the index of the runnable will be used for outputs.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. DisplayName is an optional field that can be provided by the
+   * caller. If provided, it will be used in logs and other outputs to identify
+   * the script, making it easier for users to understand the logs. If not
+   * provided the index of the runnable will be used for outputs.
+   * 
+ * + * string display_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + /** * * diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskProto.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskProto.java index de3a9488bd3e..3e9fc8aab53a 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskProto.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskProto.java @@ -128,64 +128,65 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "usEvent\"q\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + "\013\n\007PENDING\020\001\022\014\n\010ASSIGNED\020\002\022\013\n\007RUNNING\020\003\022" + "\n\n\006FAILED\020\004\022\r\n\tSUCCEEDED\020\005\022\016\n\nUNEXECUTED" - + "\020\006\"\336\005\n\010Runnable\022>\n\tcontainer\030\001 \001(\0132).goo" + + "\020\006\"\372\005\n\010Runnable\022>\n\tcontainer\030\001 \001(\0132).goo" + "gle.cloud.batch.v1.Runnable.ContainerH\000\022" + "8\n\006script\030\002 \001(\0132&.google.cloud.batch.v1." + "Runnable.ScriptH\000\022:\n\007barrier\030\006 \001(\0132\'.goo" + "gle.cloud.batch.v1.Runnable.BarrierH\000\022\032\n" - + "\022ignore_exit_status\030\003 \001(\010\022\022\n\nbackground\030" - + "\004 \001(\010\022\022\n\nalways_run\030\005 \001(\010\0227\n\013environment" - + "\030\007 \001(\0132\".google.cloud.batch.v1.Environme" - + "nt\022*\n\007timeout\030\010 \001(\0132\031.google.protobuf.Du" - + "ration\022;\n\006labels\030\t \003(\0132+.google.cloud.ba" - + "tch.v1.Runnable.LabelsEntry\032\252\001\n\tContaine" - + "r\022\021\n\timage_uri\030\001 \001(\t\022\020\n\010commands\030\002 \003(\t\022\022" - + "\n\nentrypoint\030\003 \001(\t\022\017\n\007volumes\030\007 \003(\t\022\017\n\007o" - + "ptions\030\010 \001(\t\022\036\n\026block_external_network\030\t" - + " \001(\010\022\020\n\010username\030\n \001(\t\022\020\n\010password\030\013 \001(\t" - + "\0323\n\006Script\022\016\n\004path\030\001 \001(\tH\000\022\016\n\004text\030\002 \001(\t" - + "H\000B\t\n\007command\032\027\n\007Barrier\022\014\n\004name\030\001 \001(\t\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001B\014\n\nexecutable\"\375\003\n\010TaskSpec\0222\n\trunn" - + "ables\030\010 \003(\0132\037.google.cloud.batch.v1.Runn" - + "able\022@\n\020compute_resource\030\003 \001(\0132&.google." - + "cloud.batch.v1.ComputeResource\0223\n\020max_ru" - + "n_duration\030\004 \001(\0132\031.google.protobuf.Durat" - + "ion\022\027\n\017max_retry_count\030\005 \001(\005\022B\n\022lifecycl" - + "e_policies\030\t \003(\0132&.google.cloud.batch.v1" - + ".LifecyclePolicy\022K\n\014environments\030\006 \003(\01321" - + ".google.cloud.batch.v1.TaskSpec.Environm" - + "entsEntryB\002\030\001\022.\n\007volumes\030\007 \003(\0132\035.google." - + "cloud.batch.v1.Volume\0227\n\013environment\030\n \001" - + "(\0132\".google.cloud.batch.v1.Environment\0323" - + "\n\021EnvironmentsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"\212\002\n\017LifecyclePolicy\022=\n\006actio" - + "n\030\001 \001(\0162-.google.cloud.batch.v1.Lifecycl" - + "ePolicy.Action\022P\n\020action_condition\030\002 \001(\013" - + "26.google.cloud.batch.v1.LifecyclePolicy" - + ".ActionCondition\032%\n\017ActionCondition\022\022\n\ne" - + "xit_codes\030\001 \003(\005\"?\n\006Action\022\026\n\022ACTION_UNSP" - + "ECIFIED\020\000\022\016\n\nRETRY_TASK\020\001\022\r\n\tFAIL_TASK\020\002" - + "\"\300\001\n\004Task\022\014\n\004name\030\001 \001(\t\0221\n\006status\030\002 \001(\0132" - + "!.google.cloud.batch.v1.TaskStatus:w\352At\n" - + "\031batch.googleapis.com/Task\022Wprojects/{pr" - + "oject}/locations/{location}/jobs/{job}/t" - + "askGroups/{task_group}/tasks/{task}\"\217\003\n\013" - + "Environment\022D\n\tvariables\030\001 \003(\01321.google." - + "cloud.batch.v1.Environment.VariablesEntr" - + "y\022Q\n\020secret_variables\030\002 \003(\01327.google.clo" - + "ud.batch.v1.Environment.SecretVariablesE" - + "ntry\022I\n\023encrypted_variables\030\003 \001(\0132,.goog" - + "le.cloud.batch.v1.Environment.KMSEnvMap\032" - + "2\n\tKMSEnvMap\022\020\n\010key_name\030\001 \001(\t\022\023\n\013cipher" - + "_text\030\002 \001(\t\0320\n\016VariablesEntry\022\013\n\003key\030\001 \001" - + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0326\n\024SecretVariables" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\252\001" - + "\n\031com.google.cloud.batch.v1B\tTaskProtoP\001" - + "Z/cloud.google.com/go/batch/apiv1/batchp" - + "b;batchpb\242\002\003GCB\252\002\025Google.Cloud.Batch.V1\312" - + "\002\025Google\\Cloud\\Batch\\V1\352\002\030Google::Cloud:" - + ":Batch::V1b\006proto3" + + "\014display_name\030\n \001(\tB\004\342A\001\001\022\032\n\022ignore_exit" + + "_status\030\003 \001(\010\022\022\n\nbackground\030\004 \001(\010\022\022\n\nalw" + + "ays_run\030\005 \001(\010\0227\n\013environment\030\007 \001(\0132\".goo" + + "gle.cloud.batch.v1.Environment\022*\n\007timeou" + + "t\030\010 \001(\0132\031.google.protobuf.Duration\022;\n\006la" + + "bels\030\t \003(\0132+.google.cloud.batch.v1.Runna" + + "ble.LabelsEntry\032\252\001\n\tContainer\022\021\n\timage_u" + + "ri\030\001 \001(\t\022\020\n\010commands\030\002 \003(\t\022\022\n\nentrypoint" + + "\030\003 \001(\t\022\017\n\007volumes\030\007 \003(\t\022\017\n\007options\030\010 \001(\t" + + "\022\036\n\026block_external_network\030\t \001(\010\022\020\n\010user" + + "name\030\n \001(\t\022\020\n\010password\030\013 \001(\t\0323\n\006Script\022\016" + + "\n\004path\030\001 \001(\tH\000\022\016\n\004text\030\002 \001(\tH\000B\t\n\007comman" + + "d\032\027\n\007Barrier\022\014\n\004name\030\001 \001(\t\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\014\n\nexe" + + "cutable\"\375\003\n\010TaskSpec\0222\n\trunnables\030\010 \003(\0132" + + "\037.google.cloud.batch.v1.Runnable\022@\n\020comp" + + "ute_resource\030\003 \001(\0132&.google.cloud.batch." + + "v1.ComputeResource\0223\n\020max_run_duration\030\004" + + " \001(\0132\031.google.protobuf.Duration\022\027\n\017max_r" + + "etry_count\030\005 \001(\005\022B\n\022lifecycle_policies\030\t" + + " \003(\0132&.google.cloud.batch.v1.LifecyclePo" + + "licy\022K\n\014environments\030\006 \003(\01321.google.clou" + + "d.batch.v1.TaskSpec.EnvironmentsEntryB\002\030" + + "\001\022.\n\007volumes\030\007 \003(\0132\035.google.cloud.batch." + + "v1.Volume\0227\n\013environment\030\n \001(\0132\".google." + + "cloud.batch.v1.Environment\0323\n\021Environmen" + + "tsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" + + "\212\002\n\017LifecyclePolicy\022=\n\006action\030\001 \001(\0162-.go" + + "ogle.cloud.batch.v1.LifecyclePolicy.Acti" + + "on\022P\n\020action_condition\030\002 \001(\01326.google.cl" + + "oud.batch.v1.LifecyclePolicy.ActionCondi" + + "tion\032%\n\017ActionCondition\022\022\n\nexit_codes\030\001 " + + "\003(\005\"?\n\006Action\022\026\n\022ACTION_UNSPECIFIED\020\000\022\016\n" + + "\nRETRY_TASK\020\001\022\r\n\tFAIL_TASK\020\002\"\300\001\n\004Task\022\014\n" + + "\004name\030\001 \001(\t\0221\n\006status\030\002 \001(\0132!.google.clo" + + "ud.batch.v1.TaskStatus:w\352At\n\031batch.googl" + + "eapis.com/Task\022Wprojects/{project}/locat" + + "ions/{location}/jobs/{job}/taskGroups/{t" + + "ask_group}/tasks/{task}\"\217\003\n\013Environment\022" + + "D\n\tvariables\030\001 \003(\01321.google.cloud.batch." + + "v1.Environment.VariablesEntry\022Q\n\020secret_" + + "variables\030\002 \003(\01327.google.cloud.batch.v1." + + "Environment.SecretVariablesEntry\022I\n\023encr" + + "ypted_variables\030\003 \001(\0132,.google.cloud.bat" + + "ch.v1.Environment.KMSEnvMap\0322\n\tKMSEnvMap" + + "\022\020\n\010key_name\030\001 \001(\t\022\023\n\013cipher_text\030\002 \001(\t\032" + + "0\n\016VariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\0326\n\024SecretVariablesEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\252\001\n\031com.google" + + ".cloud.batch.v1B\tTaskProtoP\001Z/cloud.goog" + + "le.com/go/batch/apiv1/batchpb;batchpb\242\002\003" + + "GCB\252\002\025Google.Cloud.Batch.V1\312\002\025Google\\Clo" + + "ud\\Batch\\V1\352\002\030Google::Cloud::Batch::V1b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -238,6 +239,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Container", "Script", "Barrier", + "DisplayName", "IgnoreExitStatus", "Background", "AlwaysRun", @@ -366,6 +368,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto index f0cc9a477c8d..7bdf5f1ad0f0 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto +++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto @@ -234,6 +234,12 @@ message Runnable { Barrier barrier = 6; } + // Optional. DisplayName is an optional field that can be provided by the + // caller. If provided, it will be used in logs and other outputs to identify + // the script, making it easier for users to understand the logs. If not + // provided the index of the runnable will be used for outputs. + string display_name = 10 [(google.api.field_behavior) = OPTIONAL]; + // Normally, a non-zero exit status causes the Task to fail. This flag allows // execution of other Runnables to continue instead. bool ignore_exit_status = 3; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/pom.xml b/java-batch/proto-google-cloud-batch-v1alpha/pom.xml index 263501d4dd64..67aaf3d5afa6 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/pom.xml +++ b/java-batch/proto-google-cloud-batch-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-batch-v1alpha - 0.28.0 + 0.29.0 proto-google-cloud-batch-v1alpha Proto library for google-cloud-batch com.google.cloud google-cloud-batch-parent - 0.28.0 + 0.29.0 diff --git a/java-beyondcorp-appconnections/CHANGELOG.md b/java-beyondcorp-appconnections/CHANGELOG.md index 61ff294e0e3a..4daa2bf3d47a 100644 --- a/java-beyondcorp-appconnections/CHANGELOG.md +++ b/java-beyondcorp-appconnections/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.26.0 (2023-10-11) ### Dependencies diff --git a/java-beyondcorp-appconnections/README.md b/java-beyondcorp-appconnections/README.md index 34e130eb99c3..9ba1595cf04e 100644 --- a/java-beyondcorp-appconnections/README.md +++ b/java-beyondcorp-appconnections/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-beyondcorp-appconnections - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-beyondcorp-appconnections:0.26.0' +implementation 'com.google.cloud:google-cloud-beyondcorp-appconnections:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-appconnections" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-appconnections" % "0.27.0" ``` diff --git a/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections-bom/pom.xml b/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections-bom/pom.xml index 56fe1d4cb1e8..3d3bded3241b 100644 --- a/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections-bom/pom.xml +++ b/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-appconnections-bom - 0.26.0 + 0.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-beyondcorp-appconnections - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appconnections-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-appconnections-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections/pom.xml b/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections/pom.xml index 088416bb740b..d424439b47b1 100644 --- a/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections/pom.xml +++ b/java-beyondcorp-appconnections/google-cloud-beyondcorp-appconnections/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-appconnections - 0.26.0 + 0.27.0 jar Google BeyondCorp AppConnections BeyondCorp AppConnections is Google's implementation of the zero trust model. It builds upon a decade of experience at Google, combined with ideas and best practices from the community. By shifting access controls from the network perimeter to individual users, BeyondCorp enables secure work from virtually any location without the need for a traditional VPN. com.google.cloud google-cloud-beyondcorp-appconnections-parent - 0.26.0 + 0.27.0 google-cloud-beyondcorp-appconnections diff --git a/java-beyondcorp-appconnections/grpc-google-cloud-beyondcorp-appconnections-v1/pom.xml b/java-beyondcorp-appconnections/grpc-google-cloud-beyondcorp-appconnections-v1/pom.xml index ede2ab19a1f0..bd2ff1ae3c91 100644 --- a/java-beyondcorp-appconnections/grpc-google-cloud-beyondcorp-appconnections-v1/pom.xml +++ b/java-beyondcorp-appconnections/grpc-google-cloud-beyondcorp-appconnections-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appconnections-v1 - 0.26.0 + 0.27.0 grpc-google-cloud-beyondcorp-appconnections-v1 GRPC library for google-cloud-beyondcorp-appconnections com.google.cloud google-cloud-beyondcorp-appconnections-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appconnections/pom.xml b/java-beyondcorp-appconnections/pom.xml index 9cb2defc4fb2..e3c4777cf6a5 100644 --- a/java-beyondcorp-appconnections/pom.xml +++ b/java-beyondcorp-appconnections/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-beyondcorp-appconnections-parent pom - 0.26.0 + 0.27.0 Google BeyondCorp AppConnections Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-beyondcorp-appconnections - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appconnections-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-appconnections-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appconnections/proto-google-cloud-beyondcorp-appconnections-v1/pom.xml b/java-beyondcorp-appconnections/proto-google-cloud-beyondcorp-appconnections-v1/pom.xml index f215ad37d837..d0c8511b9550 100644 --- a/java-beyondcorp-appconnections/proto-google-cloud-beyondcorp-appconnections-v1/pom.xml +++ b/java-beyondcorp-appconnections/proto-google-cloud-beyondcorp-appconnections-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-beyondcorp-appconnections-v1 - 0.26.0 + 0.27.0 proto-google-cloud-beyondcorp-appconnections-v1 Proto library for google-cloud-beyondcorp-appconnections com.google.cloud google-cloud-beyondcorp-appconnections-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appconnectors/CHANGELOG.md b/java-beyondcorp-appconnectors/CHANGELOG.md index c67efcde168a..9ee54d459f53 100644 --- a/java-beyondcorp-appconnectors/CHANGELOG.md +++ b/java-beyondcorp-appconnectors/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.26.0 (2023-10-11) ### Dependencies diff --git a/java-beyondcorp-appconnectors/README.md b/java-beyondcorp-appconnectors/README.md index 6ac280a2def1..f75536727118 100644 --- a/java-beyondcorp-appconnectors/README.md +++ b/java-beyondcorp-appconnectors/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-beyondcorp-appconnectors - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-beyondcorp-appconnectors:0.26.0' +implementation 'com.google.cloud:google-cloud-beyondcorp-appconnectors:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-appconnectors" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-appconnectors" % "0.27.0" ``` diff --git a/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors-bom/pom.xml b/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors-bom/pom.xml index 6a1ceaf4ab74..22b8fe84a58e 100644 --- a/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors-bom/pom.xml +++ b/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-appconnectors-bom - 0.26.0 + 0.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-beyondcorp-appconnectors - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appconnectors-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-appconnectors-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors/pom.xml b/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors/pom.xml index 18cf5a9d9f2f..9dca52336cba 100644 --- a/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors/pom.xml +++ b/java-beyondcorp-appconnectors/google-cloud-beyondcorp-appconnectors/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-appconnectors - 0.26.0 + 0.27.0 jar Google BeyondCorp AppConnectors BeyondCorp AppConnectors provides methods to manage (create/read/update/delete) BeyondCorp AppConnectors. com.google.cloud google-cloud-beyondcorp-appconnectors-parent - 0.26.0 + 0.27.0 google-cloud-beyondcorp-appconnectors diff --git a/java-beyondcorp-appconnectors/grpc-google-cloud-beyondcorp-appconnectors-v1/pom.xml b/java-beyondcorp-appconnectors/grpc-google-cloud-beyondcorp-appconnectors-v1/pom.xml index 10b625935cfa..0ceab1fcee0b 100644 --- a/java-beyondcorp-appconnectors/grpc-google-cloud-beyondcorp-appconnectors-v1/pom.xml +++ b/java-beyondcorp-appconnectors/grpc-google-cloud-beyondcorp-appconnectors-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appconnectors-v1 - 0.26.0 + 0.27.0 grpc-google-cloud-beyondcorp-appconnectors-v1 GRPC library for google-cloud-beyondcorp-appconnectors com.google.cloud google-cloud-beyondcorp-appconnectors-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appconnectors/pom.xml b/java-beyondcorp-appconnectors/pom.xml index 689cedb97602..a149c6a5ed8e 100644 --- a/java-beyondcorp-appconnectors/pom.xml +++ b/java-beyondcorp-appconnectors/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-beyondcorp-appconnectors-parent pom - 0.26.0 + 0.27.0 Google BeyondCorp AppConnectors Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-beyondcorp-appconnectors - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appconnectors-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-appconnectors-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appconnectors/proto-google-cloud-beyondcorp-appconnectors-v1/pom.xml b/java-beyondcorp-appconnectors/proto-google-cloud-beyondcorp-appconnectors-v1/pom.xml index 21d232caa14a..66b34e9cac22 100644 --- a/java-beyondcorp-appconnectors/proto-google-cloud-beyondcorp-appconnectors-v1/pom.xml +++ b/java-beyondcorp-appconnectors/proto-google-cloud-beyondcorp-appconnectors-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-beyondcorp-appconnectors-v1 - 0.26.0 + 0.27.0 proto-google-cloud-beyondcorp-appconnectors-v1 Proto library for google-cloud-beyondcorp-appconnectors com.google.cloud google-cloud-beyondcorp-appconnectors-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appgateways/CHANGELOG.md b/java-beyondcorp-appgateways/CHANGELOG.md index 7c5e8d9c8af7..155ec08a2051 100644 --- a/java-beyondcorp-appgateways/CHANGELOG.md +++ b/java-beyondcorp-appgateways/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.26.0 (2023-10-11) ### Dependencies diff --git a/java-beyondcorp-appgateways/README.md b/java-beyondcorp-appgateways/README.md index 32861e05dcf6..614f49dccd73 100644 --- a/java-beyondcorp-appgateways/README.md +++ b/java-beyondcorp-appgateways/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-beyondcorp-appgateways - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-beyondcorp-appgateways:0.26.0' +implementation 'com.google.cloud:google-cloud-beyondcorp-appgateways:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-appgateways" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-appgateways" % "0.27.0" ``` diff --git a/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways-bom/pom.xml b/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways-bom/pom.xml index 0701701b20a3..6ef7d4fe5175 100644 --- a/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways-bom/pom.xml +++ b/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-appgateways-bom - 0.26.0 + 0.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-beyondcorp-appgateways - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appgateways-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-appgateways-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways/pom.xml b/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways/pom.xml index 85ef0c5ad19e..52b2268b1cb5 100644 --- a/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways/pom.xml +++ b/java-beyondcorp-appgateways/google-cloud-beyondcorp-appgateways/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-appgateways - 0.26.0 + 0.27.0 jar Google BeyondCorp AppGateways BeyondCorp AppGateways A zero trust solution that enables secure access to applications and resources, and offers integrated threat and data protection. com.google.cloud google-cloud-beyondcorp-appgateways-parent - 0.26.0 + 0.27.0 google-cloud-beyondcorp-appgateways diff --git a/java-beyondcorp-appgateways/grpc-google-cloud-beyondcorp-appgateways-v1/pom.xml b/java-beyondcorp-appgateways/grpc-google-cloud-beyondcorp-appgateways-v1/pom.xml index 4afdfa260e02..bc9cb5bbc420 100644 --- a/java-beyondcorp-appgateways/grpc-google-cloud-beyondcorp-appgateways-v1/pom.xml +++ b/java-beyondcorp-appgateways/grpc-google-cloud-beyondcorp-appgateways-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appgateways-v1 - 0.26.0 + 0.27.0 grpc-google-cloud-beyondcorp-appgateways-v1 GRPC library for google-cloud-beyondcorp-appgateways com.google.cloud google-cloud-beyondcorp-appgateways-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appgateways/pom.xml b/java-beyondcorp-appgateways/pom.xml index f2c6378a16d5..dba12af1c15f 100644 --- a/java-beyondcorp-appgateways/pom.xml +++ b/java-beyondcorp-appgateways/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-beyondcorp-appgateways-parent pom - 0.26.0 + 0.27.0 Google BeyondCorp AppGateways Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-beyondcorp-appgateways - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-appgateways-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-appgateways-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-appgateways/proto-google-cloud-beyondcorp-appgateways-v1/pom.xml b/java-beyondcorp-appgateways/proto-google-cloud-beyondcorp-appgateways-v1/pom.xml index 3df0477994e5..b67afdab8e91 100644 --- a/java-beyondcorp-appgateways/proto-google-cloud-beyondcorp-appgateways-v1/pom.xml +++ b/java-beyondcorp-appgateways/proto-google-cloud-beyondcorp-appgateways-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-beyondcorp-appgateways-v1 - 0.26.0 + 0.27.0 proto-google-cloud-beyondcorp-appgateways-v1 Proto library for google-cloud-beyondcorp-appgateways com.google.cloud google-cloud-beyondcorp-appgateways-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientconnectorservices/CHANGELOG.md b/java-beyondcorp-clientconnectorservices/CHANGELOG.md index cebcd6cf891d..e0a8f17cf9cd 100644 --- a/java-beyondcorp-clientconnectorservices/CHANGELOG.md +++ b/java-beyondcorp-clientconnectorservices/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.26.0 (2023-10-11) ### Dependencies diff --git a/java-beyondcorp-clientconnectorservices/README.md b/java-beyondcorp-clientconnectorservices/README.md index 04ec801cc057..1beb075bb6fc 100644 --- a/java-beyondcorp-clientconnectorservices/README.md +++ b/java-beyondcorp-clientconnectorservices/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-beyondcorp-clientconnectorservices - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-beyondcorp-clientconnectorservices:0.26.0' +implementation 'com.google.cloud:google-cloud-beyondcorp-clientconnectorservices:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-clientconnectorservices" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-clientconnectorservices" % "0.27.0" ``` diff --git a/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml b/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml index c8594427ed0c..403456e27ea8 100644 --- a/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml +++ b/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-clientconnectorservices-bom - 0.26.0 + 0.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-beyondcorp-clientconnectorservices - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-clientconnectorservices-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-clientconnectorservices-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices/pom.xml b/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices/pom.xml index d2622476700f..9157a57ee6b9 100644 --- a/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices/pom.xml +++ b/java-beyondcorp-clientconnectorservices/google-cloud-beyondcorp-clientconnectorservices/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-clientconnectorservices - 0.26.0 + 0.27.0 jar Google BeyondCorp ClientConnectorServices BeyondCorp ClientConnectorServices A zero trust solution that enables secure access to applications and resources, and offers integrated threat and data protection. com.google.cloud google-cloud-beyondcorp-clientconnectorservices-parent - 0.26.0 + 0.27.0 google-cloud-beyondcorp-clientconnectorservices diff --git a/java-beyondcorp-clientconnectorservices/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml b/java-beyondcorp-clientconnectorservices/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml index 707933c5a16a..ea8fc438368a 100644 --- a/java-beyondcorp-clientconnectorservices/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml +++ b/java-beyondcorp-clientconnectorservices/grpc-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-beyondcorp-clientconnectorservices-v1 - 0.26.0 + 0.27.0 grpc-google-cloud-beyondcorp-clientconnectorservices-v1 GRPC library for google-cloud-beyondcorp-clientconnectorservices com.google.cloud google-cloud-beyondcorp-clientconnectorservices-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientconnectorservices/pom.xml b/java-beyondcorp-clientconnectorservices/pom.xml index 013f7c791fa4..e268554d86ae 100644 --- a/java-beyondcorp-clientconnectorservices/pom.xml +++ b/java-beyondcorp-clientconnectorservices/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-beyondcorp-clientconnectorservices-parent pom - 0.26.0 + 0.27.0 Google BeyondCorp ClientConnectorServices Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-beyondcorp-clientconnectorservices - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-clientconnectorservices-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-clientconnectorservices-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientconnectorservices/proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml b/java-beyondcorp-clientconnectorservices/proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml index f6d86b8d6d91..fbc0baa63bb4 100644 --- a/java-beyondcorp-clientconnectorservices/proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml +++ b/java-beyondcorp-clientconnectorservices/proto-google-cloud-beyondcorp-clientconnectorservices-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-beyondcorp-clientconnectorservices-v1 - 0.26.0 + 0.27.0 proto-google-cloud-beyondcorp-clientconnectorservices-v1 Proto library for google-cloud-beyondcorp-clientconnectorservices com.google.cloud google-cloud-beyondcorp-clientconnectorservices-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientgateways/CHANGELOG.md b/java-beyondcorp-clientgateways/CHANGELOG.md index 8264f77a1711..19c227ef2bde 100644 --- a/java-beyondcorp-clientgateways/CHANGELOG.md +++ b/java-beyondcorp-clientgateways/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.26.0 (2023-10-11) ### Dependencies diff --git a/java-beyondcorp-clientgateways/README.md b/java-beyondcorp-clientgateways/README.md index fb88c6c854e1..129a31752c03 100644 --- a/java-beyondcorp-clientgateways/README.md +++ b/java-beyondcorp-clientgateways/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-beyondcorp-clientgateways - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-beyondcorp-clientgateways:0.26.0' +implementation 'com.google.cloud:google-cloud-beyondcorp-clientgateways:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-clientgateways" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-beyondcorp-clientgateways" % "0.27.0" ``` diff --git a/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways-bom/pom.xml b/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways-bom/pom.xml index e491e5d26d4c..27985bcebd70 100644 --- a/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways-bom/pom.xml +++ b/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-clientgateways-bom - 0.26.0 + 0.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-beyondcorp-clientgateways - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-clientgateways-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-clientgateways-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways/pom.xml b/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways/pom.xml index 63b4eb3e0913..1b0260f7f4b7 100644 --- a/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways/pom.xml +++ b/java-beyondcorp-clientgateways/google-cloud-beyondcorp-clientgateways/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-beyondcorp-clientgateways - 0.26.0 + 0.27.0 jar Google BeyondCorp ClientGateways BeyondCorp ClientGateways A zero trust solution that enables secure access to applications and resources, and offers integrated threat and data protection. com.google.cloud google-cloud-beyondcorp-clientgateways-parent - 0.26.0 + 0.27.0 google-cloud-beyondcorp-clientgateways diff --git a/java-beyondcorp-clientgateways/grpc-google-cloud-beyondcorp-clientgateways-v1/pom.xml b/java-beyondcorp-clientgateways/grpc-google-cloud-beyondcorp-clientgateways-v1/pom.xml index 7f942436ff67..62f6a8907469 100644 --- a/java-beyondcorp-clientgateways/grpc-google-cloud-beyondcorp-clientgateways-v1/pom.xml +++ b/java-beyondcorp-clientgateways/grpc-google-cloud-beyondcorp-clientgateways-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-beyondcorp-clientgateways-v1 - 0.26.0 + 0.27.0 grpc-google-cloud-beyondcorp-clientgateways-v1 GRPC library for google-cloud-beyondcorp-clientgateways com.google.cloud google-cloud-beyondcorp-clientgateways-parent - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientgateways/pom.xml b/java-beyondcorp-clientgateways/pom.xml index 67d9ff898fd1..c5fd6c29c981 100644 --- a/java-beyondcorp-clientgateways/pom.xml +++ b/java-beyondcorp-clientgateways/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-beyondcorp-clientgateways-parent pom - 0.26.0 + 0.27.0 Google BeyondCorp ClientGateways Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-beyondcorp-clientgateways - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-beyondcorp-clientgateways-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-beyondcorp-clientgateways-v1 - 0.26.0 + 0.27.0 diff --git a/java-beyondcorp-clientgateways/proto-google-cloud-beyondcorp-clientgateways-v1/pom.xml b/java-beyondcorp-clientgateways/proto-google-cloud-beyondcorp-clientgateways-v1/pom.xml index d88e4e690b0d..02a946e9cc82 100644 --- a/java-beyondcorp-clientgateways/proto-google-cloud-beyondcorp-clientgateways-v1/pom.xml +++ b/java-beyondcorp-clientgateways/proto-google-cloud-beyondcorp-clientgateways-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-beyondcorp-clientgateways-v1 - 0.26.0 + 0.27.0 proto-google-cloud-beyondcorp-clientgateways-v1 Proto library for google-cloud-beyondcorp-clientgateways com.google.cloud google-cloud-beyondcorp-clientgateways-parent - 0.26.0 + 0.27.0 diff --git a/java-biglake/CHANGELOG.md b/java-biglake/CHANGELOG.md index 0cf5dc5af89f..2ffb712c8d1d 100644 --- a/java-biglake/CHANGELOG.md +++ b/java-biglake/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.17.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.16.0 (2023-10-11) ### Dependencies diff --git a/java-biglake/README.md b/java-biglake/README.md index 4a5980d55889..1f605e73b465 100644 --- a/java-biglake/README.md +++ b/java-biglake/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-biglake - 0.16.0 + 0.17.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-biglake:0.16.0' +implementation 'com.google.cloud:google-cloud-biglake:0.17.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-biglake" % "0.16.0" +libraryDependencies += "com.google.cloud" % "google-cloud-biglake" % "0.17.0" ``` diff --git a/java-biglake/google-cloud-biglake-bom/pom.xml b/java-biglake/google-cloud-biglake-bom/pom.xml index fc29c0a31987..34fcf33e8f65 100644 --- a/java-biglake/google-cloud-biglake-bom/pom.xml +++ b/java-biglake/google-cloud-biglake-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-biglake-bom - 0.16.0 + 0.17.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-biglake - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-biglake-v1alpha1 - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-biglake-v1 - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-biglake-v1alpha1 - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-biglake-v1 - 0.16.0 + 0.17.0 diff --git a/java-biglake/google-cloud-biglake/pom.xml b/java-biglake/google-cloud-biglake/pom.xml index 665704daa5d8..7c01d4c7cd90 100644 --- a/java-biglake/google-cloud-biglake/pom.xml +++ b/java-biglake/google-cloud-biglake/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-biglake - 0.16.0 + 0.17.0 jar Google BigLake BigLake The BigLake API provides access to BigLake Metastore, a serverless, fully managed, and highly available metastore for open-source data that can be used for querying Apache Iceberg tables in BigQuery. com.google.cloud google-cloud-biglake-parent - 0.16.0 + 0.17.0 google-cloud-biglake diff --git a/java-biglake/grpc-google-cloud-biglake-v1/pom.xml b/java-biglake/grpc-google-cloud-biglake-v1/pom.xml index 9de953dff618..6dff406aa090 100644 --- a/java-biglake/grpc-google-cloud-biglake-v1/pom.xml +++ b/java-biglake/grpc-google-cloud-biglake-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-biglake-v1 - 0.16.0 + 0.17.0 grpc-google-cloud-biglake-v1 GRPC library for google-cloud-biglake com.google.cloud google-cloud-biglake-parent - 0.16.0 + 0.17.0 diff --git a/java-biglake/grpc-google-cloud-biglake-v1alpha1/pom.xml b/java-biglake/grpc-google-cloud-biglake-v1alpha1/pom.xml index 19a1860f9ca5..e0fb12660639 100644 --- a/java-biglake/grpc-google-cloud-biglake-v1alpha1/pom.xml +++ b/java-biglake/grpc-google-cloud-biglake-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-biglake-v1alpha1 - 0.16.0 + 0.17.0 grpc-google-cloud-biglake-v1alpha1 GRPC library for google-cloud-biglake com.google.cloud google-cloud-biglake-parent - 0.16.0 + 0.17.0 diff --git a/java-biglake/pom.xml b/java-biglake/pom.xml index ec05f0397c93..ec7ce3d7b00d 100644 --- a/java-biglake/pom.xml +++ b/java-biglake/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-biglake-parent pom - 0.16.0 + 0.17.0 Google BigLake Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-biglake - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-biglake-v1 - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-biglake-v1 - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-biglake-v1alpha1 - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-biglake-v1alpha1 - 0.16.0 + 0.17.0 diff --git a/java-biglake/proto-google-cloud-biglake-v1/pom.xml b/java-biglake/proto-google-cloud-biglake-v1/pom.xml index f2d9ee36b133..37ff368f89b1 100644 --- a/java-biglake/proto-google-cloud-biglake-v1/pom.xml +++ b/java-biglake/proto-google-cloud-biglake-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-biglake-v1 - 0.16.0 + 0.17.0 proto-google-cloud-biglake-v1 Proto library for google-cloud-biglake com.google.cloud google-cloud-biglake-parent - 0.16.0 + 0.17.0 diff --git a/java-biglake/proto-google-cloud-biglake-v1alpha1/pom.xml b/java-biglake/proto-google-cloud-biglake-v1alpha1/pom.xml index 732fd235637c..8621d87731ce 100644 --- a/java-biglake/proto-google-cloud-biglake-v1alpha1/pom.xml +++ b/java-biglake/proto-google-cloud-biglake-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-biglake-v1alpha1 - 0.16.0 + 0.17.0 proto-google-cloud-biglake-v1alpha1 Proto library for google-cloud-biglake com.google.cloud google-cloud-biglake-parent - 0.16.0 + 0.17.0 diff --git a/java-bigquery-data-exchange/CHANGELOG.md b/java-bigquery-data-exchange/CHANGELOG.md index 4e1c7276d186..8963ff2d05f4 100644 --- a/java-bigquery-data-exchange/CHANGELOG.md +++ b/java-bigquery-data-exchange/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.24.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.23.0 (2023-10-11) ### Dependencies diff --git a/java-bigquery-data-exchange/README.md b/java-bigquery-data-exchange/README.md index 6668375b3900..00e90962e564 100644 --- a/java-bigquery-data-exchange/README.md +++ b/java-bigquery-data-exchange/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-bigquery-data-exchange - 2.23.0 + 2.24.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigquery-data-exchange:2.23.0' +implementation 'com.google.cloud:google-cloud-bigquery-data-exchange:2.24.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquery-data-exchange" % "2.23.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquery-data-exchange" % "2.24.0" ``` diff --git a/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange-bom/pom.xml b/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange-bom/pom.xml index 15e75b27ed05..b6ea942d4146 100644 --- a/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange-bom/pom.xml +++ b/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bigquery-data-exchange-bom - 2.23.0 + 2.24.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-bigquery-data-exchange - 2.23.0 + 2.24.0 com.google.api.grpc grpc-google-cloud-bigquery-data-exchange-v1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc proto-google-cloud-bigquery-data-exchange-v1beta1 - 2.23.0 + 2.24.0 diff --git a/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange/pom.xml b/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange/pom.xml index a2e91e41d8d7..c3b27c5139c5 100644 --- a/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange/pom.xml +++ b/java-bigquery-data-exchange/google-cloud-bigquery-data-exchange/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-bigquery-data-exchange - 2.23.0 + 2.24.0 jar Google Analytics Hub Analytics Hub is a data exchange that allows you to efficiently and securely exchange data assets across organizations to address challenges of data reliability and cost. com.google.cloud google-cloud-bigquery-data-exchange-parent - 2.23.0 + 2.24.0 google-cloud-bigquery-data-exchange diff --git a/java-bigquery-data-exchange/grpc-google-cloud-bigquery-data-exchange-v1beta1/pom.xml b/java-bigquery-data-exchange/grpc-google-cloud-bigquery-data-exchange-v1beta1/pom.xml index f6811c2e5786..bf228dcd8650 100644 --- a/java-bigquery-data-exchange/grpc-google-cloud-bigquery-data-exchange-v1beta1/pom.xml +++ b/java-bigquery-data-exchange/grpc-google-cloud-bigquery-data-exchange-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquery-data-exchange-v1beta1 - 2.23.0 + 2.24.0 grpc-google-cloud-bigquery-data-exchange-v1beta1 GRPC library for google-cloud-bigquery-data-exchange com.google.cloud google-cloud-bigquery-data-exchange-parent - 2.23.0 + 2.24.0 diff --git a/java-bigquery-data-exchange/pom.xml b/java-bigquery-data-exchange/pom.xml index 80d2cb5cc5f7..dc5f93a0741b 100644 --- a/java-bigquery-data-exchange/pom.xml +++ b/java-bigquery-data-exchange/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquery-data-exchange-parent pom - 2.23.0 + 2.24.0 Google Analytics Hub Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-bigquery-data-exchange - 2.23.0 + 2.24.0 com.google.api.grpc grpc-google-cloud-bigquery-data-exchange-v1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc proto-google-cloud-bigquery-data-exchange-v1beta1 - 2.23.0 + 2.24.0 diff --git a/java-bigquery-data-exchange/proto-google-cloud-bigquery-data-exchange-v1beta1/pom.xml b/java-bigquery-data-exchange/proto-google-cloud-bigquery-data-exchange-v1beta1/pom.xml index 535bc6a27d88..d9bfb743cbc8 100644 --- a/java-bigquery-data-exchange/proto-google-cloud-bigquery-data-exchange-v1beta1/pom.xml +++ b/java-bigquery-data-exchange/proto-google-cloud-bigquery-data-exchange-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquery-data-exchange-v1beta1 - 2.23.0 + 2.24.0 proto-google-cloud-bigquery-data-exchange-v1beta1 Proto library for google-cloud-bigquery-data-exchange com.google.cloud google-cloud-bigquery-data-exchange-parent - 2.23.0 + 2.24.0 diff --git a/java-bigqueryconnection/CHANGELOG.md b/java-bigqueryconnection/CHANGELOG.md index 3b09e6968aa9..30ab213b50a6 100644 --- a/java-bigqueryconnection/CHANGELOG.md +++ b/java-bigqueryconnection/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.30.0 (2023-10-11) ### Dependencies diff --git a/java-bigqueryconnection/README.md b/java-bigqueryconnection/README.md index a78b94c147b7..70ace5076a0c 100644 --- a/java-bigqueryconnection/README.md +++ b/java-bigqueryconnection/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-bigqueryconnection - 2.30.0 + 2.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigqueryconnection:2.30.0' +implementation 'com.google.cloud:google-cloud-bigqueryconnection:2.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryconnection" % "2.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryconnection" % "2.31.0" ``` diff --git a/java-bigqueryconnection/google-cloud-bigqueryconnection-bom/pom.xml b/java-bigqueryconnection/google-cloud-bigqueryconnection-bom/pom.xml index f3bf47df3bdf..3d5c1bc4f04c 100644 --- a/java-bigqueryconnection/google-cloud-bigqueryconnection-bom/pom.xml +++ b/java-bigqueryconnection/google-cloud-bigqueryconnection-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bigqueryconnection-bom - 2.30.0 + 2.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-bigqueryconnection - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.38.0 + 0.39.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.38.0 + 0.39.0 diff --git a/java-bigqueryconnection/google-cloud-bigqueryconnection/pom.xml b/java-bigqueryconnection/google-cloud-bigqueryconnection/pom.xml index ae0818241904..c5e959634dbd 100644 --- a/java-bigqueryconnection/google-cloud-bigqueryconnection/pom.xml +++ b/java-bigqueryconnection/google-cloud-bigqueryconnection/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-bigqueryconnection - 2.30.0 + 2.31.0 jar Google Cloud BigQuery Connections is about com.google.cloud google-cloud-bigqueryconnection-parent - 2.30.0 + 2.31.0 google-cloud-bigqueryconnection diff --git a/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1/pom.xml b/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1/pom.xml index fa3bef62e70b..2ed83563f0fc 100644 --- a/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1/pom.xml +++ b/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 2.30.0 + 2.31.0 grpc-google-cloud-bigqueryconnection-v1 GRPC library for grpc-google-cloud-bigqueryconnection-v1 com.google.cloud google-cloud-bigqueryconnection-parent - 2.30.0 + 2.31.0 diff --git a/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml b/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml index 1cce6e42a95a..569e984843b4 100644 --- a/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml +++ b/java-bigqueryconnection/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.38.0 + 0.39.0 grpc-google-cloud-bigqueryconnection-v1beta1 GRPC library for grpc-google-cloud-bigqueryconnection-v1beta1 com.google.cloud google-cloud-bigqueryconnection-parent - 2.30.0 + 2.31.0 diff --git a/java-bigqueryconnection/pom.xml b/java-bigqueryconnection/pom.xml index 86f1008d2768..935158ed45bd 100644 --- a/java-bigqueryconnection/pom.xml +++ b/java-bigqueryconnection/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigqueryconnection-parent pom - 2.30.0 + 2.31.0 Google Cloud BigQuery Connections Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-bigqueryconnection - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.38.0 + 0.39.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.38.0 + 0.39.0 diff --git a/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1/pom.xml b/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1/pom.xml index e635aefe943e..1b04dabee2d6 100644 --- a/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1/pom.xml +++ b/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 2.30.0 + 2.31.0 proto-google-cloud-bigqueryconnection-v1 PROTO library for proto-google-cloud-bigqueryconnection-v1 com.google.cloud google-cloud-bigqueryconnection-parent - 2.30.0 + 2.31.0 diff --git a/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml b/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml index 50cf20114b39..99832936634d 100644 --- a/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml +++ b/java-bigqueryconnection/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.38.0 + 0.39.0 proto-google-cloud-bigqueryconnection-v1beta1 PROTO library for proto-google-cloud-bigqueryconnection-v1beta1 com.google.cloud google-cloud-bigqueryconnection-parent - 2.30.0 + 2.31.0 diff --git a/java-bigquerydatapolicy/CHANGELOG.md b/java-bigquerydatapolicy/CHANGELOG.md index 46552147800d..d11667416ef4 100644 --- a/java-bigquerydatapolicy/CHANGELOG.md +++ b/java-bigquerydatapolicy/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.26.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.25.0 (2023-10-11) ### Dependencies diff --git a/java-bigquerydatapolicy/README.md b/java-bigquerydatapolicy/README.md index 3b35199e25e9..da50c760485c 100644 --- a/java-bigquerydatapolicy/README.md +++ b/java-bigquerydatapolicy/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-bigquerydatapolicy - 0.25.0 + 0.26.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigquerydatapolicy:0.25.0' +implementation 'com.google.cloud:google-cloud-bigquerydatapolicy:0.26.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatapolicy" % "0.25.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatapolicy" % "0.26.0" ``` diff --git a/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy-bom/pom.xml b/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy-bom/pom.xml index d60166281d00..e1059db2388b 100644 --- a/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy-bom/pom.xml +++ b/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatapolicy-bom - 0.25.0 + 0.26.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-bigquerydatapolicy - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-bigquerydatapolicy-v1beta1 - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-bigquerydatapolicy-v1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-bigquerydatapolicy-v1beta1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-bigquerydatapolicy-v1 - 0.25.0 + 0.26.0 diff --git a/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy/pom.xml b/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy/pom.xml index f1c76c9e6558..d86d8a93a18c 100644 --- a/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy/pom.xml +++ b/java-bigquerydatapolicy/google-cloud-bigquerydatapolicy/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatapolicy - 0.25.0 + 0.26.0 jar Google BigQuery DataPolicy API BigQuery DataPolicy API com.google.cloud google-cloud-bigquerydatapolicy-parent - 0.25.0 + 0.26.0 google-cloud-bigquerydatapolicy diff --git a/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1/pom.xml b/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1/pom.xml index 88ebcc86842d..002ccd6a4223 100644 --- a/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1/pom.xml +++ b/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquerydatapolicy-v1 - 0.25.0 + 0.26.0 grpc-google-cloud-bigquerydatapolicy-v1 GRPC library for google-cloud-bigquerydatapolicy com.google.cloud google-cloud-bigquerydatapolicy-parent - 0.25.0 + 0.26.0 diff --git a/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1beta1/pom.xml b/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1beta1/pom.xml index 22b0a716e905..47b9d44e3864 100644 --- a/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1beta1/pom.xml +++ b/java-bigquerydatapolicy/grpc-google-cloud-bigquerydatapolicy-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquerydatapolicy-v1beta1 - 0.25.0 + 0.26.0 grpc-google-cloud-bigquerydatapolicy-v1beta1 GRPC library for google-cloud-bigquerydatapolicy com.google.cloud google-cloud-bigquerydatapolicy-parent - 0.25.0 + 0.26.0 diff --git a/java-bigquerydatapolicy/pom.xml b/java-bigquerydatapolicy/pom.xml index d1408a31fb59..eb151388d0f5 100644 --- a/java-bigquerydatapolicy/pom.xml +++ b/java-bigquerydatapolicy/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquerydatapolicy-parent pom - 0.25.0 + 0.26.0 Google BigQuery DataPolicy API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-bigquerydatapolicy - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-bigquerydatapolicy-v1 - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-bigquerydatapolicy-v1 - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-bigquerydatapolicy-v1beta1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-bigquerydatapolicy-v1beta1 - 0.25.0 + 0.26.0 diff --git a/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1/pom.xml b/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1/pom.xml index 89c2a78df8fa..27c8f9378e66 100644 --- a/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1/pom.xml +++ b/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquerydatapolicy-v1 - 0.25.0 + 0.26.0 proto-google-cloud-bigquerydatapolicy-v1 Proto library for google-cloud-bigquerydatapolicy com.google.cloud google-cloud-bigquerydatapolicy-parent - 0.25.0 + 0.26.0 diff --git a/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1beta1/pom.xml b/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1beta1/pom.xml index 3d6dc276f139..9742281b70fb 100644 --- a/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1beta1/pom.xml +++ b/java-bigquerydatapolicy/proto-google-cloud-bigquerydatapolicy-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquerydatapolicy-v1beta1 - 0.25.0 + 0.26.0 proto-google-cloud-bigquerydatapolicy-v1beta1 Proto library for google-cloud-bigquerydatapolicy com.google.cloud google-cloud-bigquerydatapolicy-parent - 0.25.0 + 0.26.0 diff --git a/java-bigquerydatatransfer/CHANGELOG.md b/java-bigquerydatatransfer/CHANGELOG.md index a7e4a15b6a22..dcb04cdee340 100644 --- a/java-bigquerydatatransfer/CHANGELOG.md +++ b/java-bigquerydatatransfer/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-bigquerydatatransfer/README.md b/java-bigquerydatatransfer/README.md index 2bee089253a5..e517162190fa 100644 --- a/java-bigquerydatatransfer/README.md +++ b/java-bigquerydatatransfer/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-bigquerydatatransfer - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigquerydatatransfer:2.28.0' +implementation 'com.google.cloud:google-cloud-bigquerydatatransfer:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "2.29.0" ``` diff --git a/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer-bom/pom.xml b/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer-bom/pom.xml index 663d54f3b0ca..5baa98b00322 100644 --- a/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer-bom/pom.xml +++ b/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatatransfer-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-bigquerydatatransfer - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 2.28.0 + 2.29.0 diff --git a/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer/pom.xml b/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer/pom.xml index e9a4eeae23dc..16bc996156b9 100644 --- a/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer/pom.xml +++ b/java-bigquerydatatransfer/google-cloud-bigquerydatatransfer/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatatransfer - 2.28.0 + 2.29.0 jar BigQuery DataTransfer BigQuery DataTransfer com.google.cloud google-cloud-bigquerydatatransfer-parent - 2.28.0 + 2.29.0 google-cloud-bigquerydatatransfer diff --git a/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml b/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml index a802d9eca515..29ffb923376c 100644 --- a/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/java-bigquerydatatransfer/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-bigquerydatatransfer-v1 GRPC library for grpc-google-cloud-bigquerydatatransfer-v1 com.google.cloud google-cloud-bigquerydatatransfer-parent - 2.28.0 + 2.29.0 diff --git a/java-bigquerydatatransfer/pom.xml b/java-bigquerydatatransfer/pom.xml index 19eea84d1f5b..bf25bb59734f 100644 --- a/java-bigquerydatatransfer/pom.xml +++ b/java-bigquerydatatransfer/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquerydatatransfer-parent pom - 2.28.0 + 2.29.0 BigQuery DataTransfer Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-bigquerydatatransfer - 2.28.0 + 2.29.0 diff --git a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/pom.xml b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/pom.xml index fd7f416fc8bf..845361caaaaa 100644 --- a/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/java-bigquerydatatransfer/proto-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 2.28.0 + 2.29.0 proto-google-cloud-bigquerydatatransfer-v1 PROTO library for proto-google-cloud-bigquerydatatransfer-v1 com.google.cloud google-cloud-bigquerydatatransfer-parent - 2.28.0 + 2.29.0 diff --git a/java-bigquerymigration/CHANGELOG.md b/java-bigquerymigration/CHANGELOG.md index be75f3757d39..4b15027f82bb 100644 --- a/java-bigquerymigration/CHANGELOG.md +++ b/java-bigquerymigration/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.32.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.31.0 (2023-10-11) ### Dependencies diff --git a/java-bigquerymigration/README.md b/java-bigquerymigration/README.md index 2e94945057e9..d2d174f5f386 100644 --- a/java-bigquerymigration/README.md +++ b/java-bigquerymigration/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-bigquerymigration - 0.31.0 + 0.32.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigquerymigration:0.31.0' +implementation 'com.google.cloud:google-cloud-bigquerymigration:0.32.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquerymigration" % "0.31.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquerymigration" % "0.32.0" ``` diff --git a/java-bigquerymigration/google-cloud-bigquerymigration-bom/pom.xml b/java-bigquerymigration/google-cloud-bigquerymigration-bom/pom.xml index f222605f163e..6ea59fd3e6b7 100644 --- a/java-bigquerymigration/google-cloud-bigquerymigration-bom/pom.xml +++ b/java-bigquerymigration/google-cloud-bigquerymigration-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bigquerymigration-bom - 0.31.0 + 0.32.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-bigquerymigration - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-bigquerymigration-v2alpha - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-bigquerymigration-v2 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-bigquerymigration-v2alpha - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-bigquerymigration-v2 - 0.31.0 + 0.32.0 diff --git a/java-bigquerymigration/google-cloud-bigquerymigration/pom.xml b/java-bigquerymigration/google-cloud-bigquerymigration/pom.xml index d1d57c67a41e..e7f92ffde943 100644 --- a/java-bigquerymigration/google-cloud-bigquerymigration/pom.xml +++ b/java-bigquerymigration/google-cloud-bigquerymigration/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-bigquerymigration - 0.31.0 + 0.32.0 jar Google BigQuery Migration BigQuery Migration BigQuery Migration API com.google.cloud google-cloud-bigquerymigration-parent - 0.31.0 + 0.32.0 google-cloud-bigquerymigration diff --git a/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2/pom.xml b/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2/pom.xml index 058eae908fab..f8d2dc164f9a 100644 --- a/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2/pom.xml +++ b/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquerymigration-v2 - 0.31.0 + 0.32.0 grpc-google-cloud-bigquerymigration-v2 GRPC library for google-cloud-bigquerymigration com.google.cloud google-cloud-bigquerymigration-parent - 0.31.0 + 0.32.0 diff --git a/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2alpha/pom.xml b/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2alpha/pom.xml index aab796eb8825..1ef8b69d06dc 100644 --- a/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2alpha/pom.xml +++ b/java-bigquerymigration/grpc-google-cloud-bigquerymigration-v2alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquerymigration-v2alpha - 0.31.0 + 0.32.0 grpc-google-cloud-bigquerymigration-v2alpha GRPC library for google-cloud-bigquerymigration com.google.cloud google-cloud-bigquerymigration-parent - 0.31.0 + 0.32.0 diff --git a/java-bigquerymigration/pom.xml b/java-bigquerymigration/pom.xml index 1b3669f91987..e32bbdcda4d4 100644 --- a/java-bigquerymigration/pom.xml +++ b/java-bigquerymigration/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquerymigration-parent pom - 0.31.0 + 0.32.0 Google BigQuery Migration Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-bigquerymigration - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-bigquerymigration-v2 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-bigquerymigration-v2 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-bigquerymigration-v2alpha - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-bigquerymigration-v2alpha - 0.31.0 + 0.32.0 diff --git a/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2/pom.xml b/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2/pom.xml index f166505ca6bc..1a29e05e5b47 100644 --- a/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2/pom.xml +++ b/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquerymigration-v2 - 0.31.0 + 0.32.0 proto-google-cloud-bigquerymigration-v2 Proto library for google-cloud-bigquerymigration com.google.cloud google-cloud-bigquerymigration-parent - 0.31.0 + 0.32.0 diff --git a/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2alpha/pom.xml b/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2alpha/pom.xml index 96b5615be55d..3d5e1be4a077 100644 --- a/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2alpha/pom.xml +++ b/java-bigquerymigration/proto-google-cloud-bigquerymigration-v2alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquerymigration-v2alpha - 0.31.0 + 0.32.0 proto-google-cloud-bigquerymigration-v2alpha Proto library for google-cloud-bigquerymigration com.google.cloud google-cloud-bigquerymigration-parent - 0.31.0 + 0.32.0 diff --git a/java-bigqueryreservation/CHANGELOG.md b/java-bigqueryreservation/CHANGELOG.md index 1dd6bcf85017..b48eb63fb7a7 100644 --- a/java-bigqueryreservation/CHANGELOG.md +++ b/java-bigqueryreservation/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-bigqueryreservation/README.md b/java-bigqueryreservation/README.md index 313cf02e278e..bbf12ef5f5d9 100644 --- a/java-bigqueryreservation/README.md +++ b/java-bigqueryreservation/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-bigqueryreservation - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigqueryreservation:2.29.0' +implementation 'com.google.cloud:google-cloud-bigqueryreservation:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryreservation" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryreservation" % "2.30.0" ``` diff --git a/java-bigqueryreservation/google-cloud-bigqueryreservation-bom/pom.xml b/java-bigqueryreservation/google-cloud-bigqueryreservation-bom/pom.xml index d76568788b5b..00caba1ca9b5 100644 --- a/java-bigqueryreservation/google-cloud-bigqueryreservation-bom/pom.xml +++ b/java-bigqueryreservation/google-cloud-bigqueryreservation-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bigqueryreservation-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-bigqueryreservation - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 2.29.0 + 2.30.0 diff --git a/java-bigqueryreservation/google-cloud-bigqueryreservation/pom.xml b/java-bigqueryreservation/google-cloud-bigqueryreservation/pom.xml index d97df82ef8ed..602cbbae3240 100644 --- a/java-bigqueryreservation/google-cloud-bigqueryreservation/pom.xml +++ b/java-bigqueryreservation/google-cloud-bigqueryreservation/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-bigqueryreservation - 2.29.0 + 2.30.0 jar Google Cloud BigQuery Reservations allows users to manage their flat-rate BigQuery reservations. com.google.cloud google-cloud-bigqueryreservation-parent - 2.29.0 + 2.30.0 google-cloud-bigqueryreservation diff --git a/java-bigqueryreservation/grpc-google-cloud-bigqueryreservation-v1/pom.xml b/java-bigqueryreservation/grpc-google-cloud-bigqueryreservation-v1/pom.xml index f092df4b4b26..013ea5ce846c 100644 --- a/java-bigqueryreservation/grpc-google-cloud-bigqueryreservation-v1/pom.xml +++ b/java-bigqueryreservation/grpc-google-cloud-bigqueryreservation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-bigqueryreservation-v1 GRPC library for grpc-google-cloud-bigqueryreservation-v1 com.google.cloud google-cloud-bigqueryreservation-parent - 2.29.0 + 2.30.0 diff --git a/java-bigqueryreservation/pom.xml b/java-bigqueryreservation/pom.xml index 5f9a23c72365..fda2f5860486 100644 --- a/java-bigqueryreservation/pom.xml +++ b/java-bigqueryreservation/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigqueryreservation-parent pom - 2.29.0 + 2.30.0 Google Cloud BigQuery Reservations Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-bigqueryreservation - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 2.29.0 + 2.30.0 diff --git a/java-bigqueryreservation/proto-google-cloud-bigqueryreservation-v1/pom.xml b/java-bigqueryreservation/proto-google-cloud-bigqueryreservation-v1/pom.xml index 5aa0e0c8cdfb..694e6490e1a1 100644 --- a/java-bigqueryreservation/proto-google-cloud-bigqueryreservation-v1/pom.xml +++ b/java-bigqueryreservation/proto-google-cloud-bigqueryreservation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 2.29.0 + 2.30.0 proto-google-cloud-bigqueryreservation-v1 PROTO library for proto-google-cloud-bigqueryreservation-v1 com.google.cloud google-cloud-bigqueryreservation-parent - 2.29.0 + 2.30.0 diff --git a/java-billing/CHANGELOG.md b/java-billing/CHANGELOG.md index ff887f806ba5..52a255ad10e8 100644 --- a/java-billing/CHANGELOG.md +++ b/java-billing/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-billing/README.md b/java-billing/README.md index ae72efd8409f..67a940a271a4 100644 --- a/java-billing/README.md +++ b/java-billing/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-billing - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-billing:2.28.0' +implementation 'com.google.cloud:google-cloud-billing:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.29.0" ``` diff --git a/java-billing/google-cloud-billing-bom/pom.xml b/java-billing/google-cloud-billing-bom/pom.xml index cc6213ce9726..ca86ce0daca5 100644 --- a/java-billing/google-cloud-billing-bom/pom.xml +++ b/java-billing/google-cloud-billing-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-billing-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-billing - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-billing-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-billing-v1 - 2.28.0 + 2.29.0 diff --git a/java-billing/google-cloud-billing/pom.xml b/java-billing/google-cloud-billing/pom.xml index db2f4b153a8e..1b3cc54391a6 100644 --- a/java-billing/google-cloud-billing/pom.xml +++ b/java-billing/google-cloud-billing/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-billing - 2.28.0 + 2.29.0 jar Google Cloud Billing Java idiomatic client for Google Cloud Billing com.google.cloud google-cloud-billing-parent - 2.28.0 + 2.29.0 google-cloud-billing diff --git a/java-billing/grpc-google-cloud-billing-v1/pom.xml b/java-billing/grpc-google-cloud-billing-v1/pom.xml index e7321b274730..08ba7b85f326 100644 --- a/java-billing/grpc-google-cloud-billing-v1/pom.xml +++ b/java-billing/grpc-google-cloud-billing-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-billing-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-billing-v1 GRPC library for grpc-google-cloud-billing-v1 com.google.cloud google-cloud-billing-parent - 2.28.0 + 2.29.0 diff --git a/java-billing/pom.xml b/java-billing/pom.xml index 2e2053232fd6..21a156d859c1 100644 --- a/java-billing/pom.xml +++ b/java-billing/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-billing-parent pom - 2.28.0 + 2.29.0 Google Cloud Billing Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-billing-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-billing-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-billing - 2.28.0 + 2.29.0 diff --git a/java-billing/proto-google-cloud-billing-v1/pom.xml b/java-billing/proto-google-cloud-billing-v1/pom.xml index 7304b4213707..fdebcb1eaabb 100644 --- a/java-billing/proto-google-cloud-billing-v1/pom.xml +++ b/java-billing/proto-google-cloud-billing-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-billing-v1 - 2.28.0 + 2.29.0 proto-google-cloud-billing-v1beta1 PROTO library for proto-google-cloud-billing-v1 com.google.cloud google-cloud-billing-parent - 2.28.0 + 2.29.0 diff --git a/java-billingbudgets/CHANGELOG.md b/java-billingbudgets/CHANGELOG.md index 413a5074cecb..8da396012463 100644 --- a/java-billingbudgets/CHANGELOG.md +++ b/java-billingbudgets/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-billingbudgets/README.md b/java-billingbudgets/README.md index a3e0fdc59c89..8077283cc7c2 100644 --- a/java-billingbudgets/README.md +++ b/java-billingbudgets/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-billingbudgets - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-billingbudgets:2.28.0' +implementation 'com.google.cloud:google-cloud-billingbudgets:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-billingbudgets" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-billingbudgets" % "2.29.0" ``` diff --git a/java-billingbudgets/google-cloud-billingbudgets-bom/pom.xml b/java-billingbudgets/google-cloud-billingbudgets-bom/pom.xml index bd366ef900be..049e005a2416 100644 --- a/java-billingbudgets/google-cloud-billingbudgets-bom/pom.xml +++ b/java-billingbudgets/google-cloud-billingbudgets-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-billingbudgets-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-billingbudgets - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-billingbudgets-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc grpc-google-cloud-billingbudgets-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-billingbudgets-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc proto-google-cloud-billingbudgets-v1 - 2.28.0 + 2.29.0 diff --git a/java-billingbudgets/google-cloud-billingbudgets/pom.xml b/java-billingbudgets/google-cloud-billingbudgets/pom.xml index 1dbdd1200c00..955b5a0bbc9d 100644 --- a/java-billingbudgets/google-cloud-billingbudgets/pom.xml +++ b/java-billingbudgets/google-cloud-billingbudgets/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-billingbudgets - 2.28.0 + 2.29.0 jar Google Cloud billingbudgets Java idiomatic client for Google Cloud billingbudgets com.google.cloud google-cloud-billingbudgets-parent - 2.28.0 + 2.29.0 google-cloud-billingbudgets diff --git a/java-billingbudgets/grpc-google-cloud-billingbudgets-v1/pom.xml b/java-billingbudgets/grpc-google-cloud-billingbudgets-v1/pom.xml index cd309e32ec92..859a1a9c246d 100644 --- a/java-billingbudgets/grpc-google-cloud-billingbudgets-v1/pom.xml +++ b/java-billingbudgets/grpc-google-cloud-billingbudgets-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-billingbudgets-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-billingbudgets-v1 GRPC library for grpc-google-cloud-billingbudgets-v1 com.google.cloud google-cloud-billingbudgets-parent - 2.28.0 + 2.29.0 diff --git a/java-billingbudgets/grpc-google-cloud-billingbudgets-v1beta1/pom.xml b/java-billingbudgets/grpc-google-cloud-billingbudgets-v1beta1/pom.xml index 8234aae754c6..436abc882c09 100644 --- a/java-billingbudgets/grpc-google-cloud-billingbudgets-v1beta1/pom.xml +++ b/java-billingbudgets/grpc-google-cloud-billingbudgets-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-billingbudgets-v1beta1 - 0.37.0 + 0.38.0 grpc-google-cloud-billingbudgets-v1beta1 GRPC library for grpc-google-cloud-billingbudgets-v1beta1 com.google.cloud google-cloud-billingbudgets-parent - 2.28.0 + 2.29.0 diff --git a/java-billingbudgets/pom.xml b/java-billingbudgets/pom.xml index 8659c26f5a12..b714492690b0 100644 --- a/java-billingbudgets/pom.xml +++ b/java-billingbudgets/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-billingbudgets-parent pom - 2.28.0 + 2.29.0 Google Cloud Billing Budgets Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-billingbudgets-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc proto-google-cloud-billingbudgets-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-billingbudgets-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc grpc-google-cloud-billingbudgets-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-billingbudgets - 2.28.0 + 2.29.0 diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/pom.xml b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/pom.xml index e88d02e91229..0a0517befb35 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/pom.xml +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-billingbudgets-v1 - 2.28.0 + 2.29.0 proto-google-cloud-billingbudgets-v1 PROTO library for proto-google-cloud-billingbudgets-v1 com.google.cloud google-cloud-billingbudgets-parent - 2.28.0 + 2.29.0 diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/pom.xml b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/pom.xml index c48abc3ddd83..6fef4e475546 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/pom.xml +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-billingbudgets-v1beta1 - 0.37.0 + 0.38.0 proto-google-cloud-billingbudgets-v1beta1 PROTO library for proto-google-cloud-billingbudgets-v1beta1 com.google.cloud google-cloud-billingbudgets-parent - 2.28.0 + 2.29.0 diff --git a/java-binary-authorization/CHANGELOG.md b/java-binary-authorization/CHANGELOG.md index b36ee0701c6c..48a90e822ed6 100644 --- a/java-binary-authorization/CHANGELOG.md +++ b/java-binary-authorization/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.27.0 (2023-10-11) ### Dependencies diff --git a/java-binary-authorization/README.md b/java-binary-authorization/README.md index ac62e0d5b2d4..58966646adc3 100644 --- a/java-binary-authorization/README.md +++ b/java-binary-authorization/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-binary-authorization - 1.27.0 + 1.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.27.0' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.28.0" ``` diff --git a/java-binary-authorization/google-cloud-binary-authorization-bom/pom.xml b/java-binary-authorization/google-cloud-binary-authorization-bom/pom.xml index e4ef0168c7a6..574d475c452d 100644 --- a/java-binary-authorization/google-cloud-binary-authorization-bom/pom.xml +++ b/java-binary-authorization/google-cloud-binary-authorization-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.27.0 + 1.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-binary-authorization - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.27.0 + 1.28.0 diff --git a/java-binary-authorization/google-cloud-binary-authorization/pom.xml b/java-binary-authorization/google-cloud-binary-authorization/pom.xml index 648939f6e156..1de562eaccf9 100644 --- a/java-binary-authorization/google-cloud-binary-authorization/pom.xml +++ b/java-binary-authorization/google-cloud-binary-authorization/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.27.0 + 1.28.0 jar Google Binary Authorization Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware com.google.cloud google-cloud-binary-authorization-parent - 1.27.0 + 1.28.0 google-cloud-binary-authorization diff --git a/java-binary-authorization/grpc-google-cloud-binary-authorization-v1/pom.xml b/java-binary-authorization/grpc-google-cloud-binary-authorization-v1/pom.xml index 4c21f50814d3..e9a996e5150c 100644 --- a/java-binary-authorization/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/java-binary-authorization/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.27.0 + 1.28.0 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.27.0 + 1.28.0 diff --git a/java-binary-authorization/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/java-binary-authorization/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 8ec903a6446f..fef50f227cee 100644 --- a/java-binary-authorization/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/java-binary-authorization/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.32.0 + 0.33.0 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.27.0 + 1.28.0 diff --git a/java-binary-authorization/pom.xml b/java-binary-authorization/pom.xml index 1d846359beca..4f35a3d38a63 100644 --- a/java-binary-authorization/pom.xml +++ b/java-binary-authorization/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.27.0 + 1.28.0 Google Binary Authorization Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,33 +29,33 @@ com.google.cloud google-cloud-binary-authorization - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.32.0 + 0.33.0 io.grafeas grafeas - 2.29.0 + 2.30.0 diff --git a/java-binary-authorization/proto-google-cloud-binary-authorization-v1/pom.xml b/java-binary-authorization/proto-google-cloud-binary-authorization-v1/pom.xml index 6b8ef2302c6c..a593d442e40d 100644 --- a/java-binary-authorization/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/java-binary-authorization/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.27.0 + 1.28.0 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.27.0 + 1.28.0 diff --git a/java-binary-authorization/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/java-binary-authorization/proto-google-cloud-binary-authorization-v1beta1/pom.xml index a82de1467edf..0ffa53a2bc97 100644 --- a/java-binary-authorization/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/java-binary-authorization/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.32.0 + 0.33.0 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.27.0 + 1.28.0 diff --git a/java-certificate-manager/CHANGELOG.md b/java-certificate-manager/CHANGELOG.md index 395d7688ee4f..dcfd058b72f8 100644 --- a/java-certificate-manager/CHANGELOG.md +++ b/java-certificate-manager/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.32.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.31.0 (2023-10-11) ### Dependencies diff --git a/java-certificate-manager/README.md b/java-certificate-manager/README.md index 206408d9f7fd..c99cb1339943 100644 --- a/java-certificate-manager/README.md +++ b/java-certificate-manager/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-certificate-manager - 0.31.0 + 0.32.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-certificate-manager:0.31.0' +implementation 'com.google.cloud:google-cloud-certificate-manager:0.32.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-certificate-manager" % "0.31.0" +libraryDependencies += "com.google.cloud" % "google-cloud-certificate-manager" % "0.32.0" ``` diff --git a/java-certificate-manager/google-cloud-certificate-manager-bom/pom.xml b/java-certificate-manager/google-cloud-certificate-manager-bom/pom.xml index 622da4be22d2..e2822a9d73d8 100644 --- a/java-certificate-manager/google-cloud-certificate-manager-bom/pom.xml +++ b/java-certificate-manager/google-cloud-certificate-manager-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-certificate-manager-bom - 0.31.0 + 0.32.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-certificate-manager - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-certificate-manager-v1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-certificate-manager-v1 - 0.31.0 + 0.32.0 diff --git a/java-certificate-manager/google-cloud-certificate-manager/pom.xml b/java-certificate-manager/google-cloud-certificate-manager/pom.xml index 7f0c60942b5f..aa6c1298b5db 100644 --- a/java-certificate-manager/google-cloud-certificate-manager/pom.xml +++ b/java-certificate-manager/google-cloud-certificate-manager/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-certificate-manager - 0.31.0 + 0.32.0 jar Google Certificate Manager Certificate Manager lets you acquire and manage TLS (SSL) certificates for use with Cloud Load Balancing. com.google.cloud google-cloud-certificate-manager-parent - 0.31.0 + 0.32.0 google-cloud-certificate-manager diff --git a/java-certificate-manager/grpc-google-cloud-certificate-manager-v1/pom.xml b/java-certificate-manager/grpc-google-cloud-certificate-manager-v1/pom.xml index a5205b732f19..f5669ca66053 100644 --- a/java-certificate-manager/grpc-google-cloud-certificate-manager-v1/pom.xml +++ b/java-certificate-manager/grpc-google-cloud-certificate-manager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-certificate-manager-v1 - 0.31.0 + 0.32.0 grpc-google-cloud-certificate-manager-v1 GRPC library for google-cloud-certificate-manager com.google.cloud google-cloud-certificate-manager-parent - 0.31.0 + 0.32.0 diff --git a/java-certificate-manager/pom.xml b/java-certificate-manager/pom.xml index f81bbc37e33f..d258ad3abdde 100644 --- a/java-certificate-manager/pom.xml +++ b/java-certificate-manager/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-certificate-manager-parent pom - 0.31.0 + 0.32.0 Google Certificate Manager Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-certificate-manager - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-certificate-manager-v1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-certificate-manager-v1 - 0.31.0 + 0.32.0 diff --git a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/pom.xml b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/pom.xml index b4e4eb01a229..00beb93ab180 100644 --- a/java-certificate-manager/proto-google-cloud-certificate-manager-v1/pom.xml +++ b/java-certificate-manager/proto-google-cloud-certificate-manager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-certificate-manager-v1 - 0.31.0 + 0.32.0 proto-google-cloud-certificate-manager-v1 Proto library for google-cloud-certificate-manager com.google.cloud google-cloud-certificate-manager-parent - 0.31.0 + 0.32.0 diff --git a/java-channel/CHANGELOG.md b/java-channel/CHANGELOG.md index 550cbbdd754c..9fa39f37b0ab 100644 --- a/java-channel/CHANGELOG.md +++ b/java-channel/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.33.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.32.0 (2023-10-11) ### Dependencies diff --git a/java-channel/README.md b/java-channel/README.md index bd4f0c789baa..979b33134969 100644 --- a/java-channel/README.md +++ b/java-channel/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-channel - 3.32.0 + 3.33.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-channel:3.32.0' +implementation 'com.google.cloud:google-cloud-channel:3.33.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-channel" % "3.32.0" +libraryDependencies += "com.google.cloud" % "google-cloud-channel" % "3.33.0" ``` diff --git a/java-channel/google-cloud-channel-bom/pom.xml b/java-channel/google-cloud-channel-bom/pom.xml index d1410f952ba0..0deb3a20aefa 100644 --- a/java-channel/google-cloud-channel-bom/pom.xml +++ b/java-channel/google-cloud-channel-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-channel-bom - 3.32.0 + 3.33.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-channel - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-channel-v1 - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-channel-v1 - 3.32.0 + 3.33.0 diff --git a/java-channel/google-cloud-channel/pom.xml b/java-channel/google-cloud-channel/pom.xml index 81562f9de307..3ae2c54e4e9e 100644 --- a/java-channel/google-cloud-channel/pom.xml +++ b/java-channel/google-cloud-channel/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-channel - 3.32.0 + 3.33.0 jar Google Channel Services With Channel Services, Google Cloud partners and resellers have a single unified resale platform, with a unified resale catalog, customer management, order management, billing management, policy and authorization management, and cost management. com.google.cloud google-cloud-channel-parent - 3.32.0 + 3.33.0 google-cloud-channel diff --git a/java-channel/grpc-google-cloud-channel-v1/pom.xml b/java-channel/grpc-google-cloud-channel-v1/pom.xml index d66879cfccf6..1f179e31aee7 100644 --- a/java-channel/grpc-google-cloud-channel-v1/pom.xml +++ b/java-channel/grpc-google-cloud-channel-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-channel-v1 - 3.32.0 + 3.33.0 grpc-google-cloud-channel-v1 GRPC library for google-cloud-channel com.google.cloud google-cloud-channel-parent - 3.32.0 + 3.33.0 diff --git a/java-channel/pom.xml b/java-channel/pom.xml index f100c2461b0f..72f1b872e198 100644 --- a/java-channel/pom.xml +++ b/java-channel/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-channel-parent pom - 3.32.0 + 3.33.0 Google Channel Services Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-channel - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-channel-v1 - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-channel-v1 - 3.32.0 + 3.33.0 diff --git a/java-channel/proto-google-cloud-channel-v1/pom.xml b/java-channel/proto-google-cloud-channel-v1/pom.xml index 908b13a6503c..607b8f7c3ff5 100644 --- a/java-channel/proto-google-cloud-channel-v1/pom.xml +++ b/java-channel/proto-google-cloud-channel-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-channel-v1 - 3.32.0 + 3.33.0 proto-google-cloud-channel-v1 Proto library for google-cloud-channel com.google.cloud google-cloud-channel-parent - 3.32.0 + 3.33.0 diff --git a/java-cloudbuild/CHANGELOG.md b/java-cloudbuild/CHANGELOG.md index 3c0b08dd8ced..d3fa5d32c970 100644 --- a/java-cloudbuild/CHANGELOG.md +++ b/java-cloudbuild/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.30.0 (2023-10-11) ### Dependencies diff --git a/java-cloudbuild/README.md b/java-cloudbuild/README.md index 7de0fab83af7..6786110e0030 100644 --- a/java-cloudbuild/README.md +++ b/java-cloudbuild/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-build - 3.30.0 + 3.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-build:3.30.0' +implementation 'com.google.cloud:google-cloud-build:3.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-build" % "3.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-build" % "3.31.0" ``` diff --git a/java-cloudbuild/google-cloud-build-bom/pom.xml b/java-cloudbuild/google-cloud-build-bom/pom.xml index 699bd873eec2..0fcac38d408c 100644 --- a/java-cloudbuild/google-cloud-build-bom/pom.xml +++ b/java-cloudbuild/google-cloud-build-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-build-bom - 3.30.0 + 3.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-build - 3.30.0 + 3.31.0 com.google.api.grpc grpc-google-cloud-build-v1 - 3.30.0 + 3.31.0 com.google.api.grpc grpc-google-cloud-build-v2 - 3.30.0 + 3.31.0 com.google.api.grpc proto-google-cloud-build-v1 - 3.30.0 + 3.31.0 com.google.api.grpc proto-google-cloud-build-v2 - 3.30.0 + 3.31.0 diff --git a/java-cloudbuild/google-cloud-build/pom.xml b/java-cloudbuild/google-cloud-build/pom.xml index b3f12079f55c..ab61b3265fed 100644 --- a/java-cloudbuild/google-cloud-build/pom.xml +++ b/java-cloudbuild/google-cloud-build/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-build - 3.30.0 + 3.31.0 jar Google Cloud Build @@ -12,7 +12,7 @@ com.google.cloud google-cloud-build-parent - 3.30.0 + 3.31.0 google-cloud-build diff --git a/java-cloudbuild/grpc-google-cloud-build-v1/pom.xml b/java-cloudbuild/grpc-google-cloud-build-v1/pom.xml index 53d66e4ce73d..dcafe3012951 100644 --- a/java-cloudbuild/grpc-google-cloud-build-v1/pom.xml +++ b/java-cloudbuild/grpc-google-cloud-build-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-build-v1 - 3.30.0 + 3.31.0 grpc-google-cloud-build-v1 GRPC library for grpc-google-cloud-build-v1 com.google.cloud google-cloud-build-parent - 3.30.0 + 3.31.0 diff --git a/java-cloudbuild/grpc-google-cloud-build-v2/pom.xml b/java-cloudbuild/grpc-google-cloud-build-v2/pom.xml index 714ec32a011e..e3a9409d104f 100644 --- a/java-cloudbuild/grpc-google-cloud-build-v2/pom.xml +++ b/java-cloudbuild/grpc-google-cloud-build-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-build-v2 - 3.30.0 + 3.31.0 grpc-google-cloud-build-v2 GRPC library for google-cloud-build com.google.cloud google-cloud-build-parent - 3.30.0 + 3.31.0 diff --git a/java-cloudbuild/pom.xml b/java-cloudbuild/pom.xml index 05f5e1e74830..d5f43edc7c22 100644 --- a/java-cloudbuild/pom.xml +++ b/java-cloudbuild/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-build-parent pom - 3.30.0 + 3.31.0 Google Cloud Build Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-build-v1 - 3.30.0 + 3.31.0 com.google.api.grpc proto-google-cloud-build-v2 - 3.30.0 + 3.31.0 com.google.api.grpc grpc-google-cloud-build-v2 - 3.30.0 + 3.31.0 com.google.cloud google-cloud-build - 3.30.0 + 3.31.0 com.google.api.grpc grpc-google-cloud-build-v1 - 3.30.0 + 3.31.0 diff --git a/java-cloudbuild/proto-google-cloud-build-v1/pom.xml b/java-cloudbuild/proto-google-cloud-build-v1/pom.xml index 46c4bb1f4f90..2c8a29e67708 100644 --- a/java-cloudbuild/proto-google-cloud-build-v1/pom.xml +++ b/java-cloudbuild/proto-google-cloud-build-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-build-v1 - 3.30.0 + 3.31.0 proto-google-cloud-build-v1 PROTO library for proto-google-cloud-build-v1 com.google.cloud google-cloud-build-parent - 3.30.0 + 3.31.0 diff --git a/java-cloudbuild/proto-google-cloud-build-v2/pom.xml b/java-cloudbuild/proto-google-cloud-build-v2/pom.xml index a9c69a145fd6..b387d3e54e8a 100644 --- a/java-cloudbuild/proto-google-cloud-build-v2/pom.xml +++ b/java-cloudbuild/proto-google-cloud-build-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-build-v2 - 3.30.0 + 3.31.0 proto-google-cloud-build-v2 Proto library for google-cloud-build com.google.cloud google-cloud-build-parent - 3.30.0 + 3.31.0 diff --git a/java-cloudcommerceconsumerprocurement/CHANGELOG.md b/java-cloudcommerceconsumerprocurement/CHANGELOG.md index 3b3ddaf3910b..1262f64df880 100644 --- a/java-cloudcommerceconsumerprocurement/CHANGELOG.md +++ b/java-cloudcommerceconsumerprocurement/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.26.0 (2023-10-11) ### Dependencies diff --git a/java-cloudcommerceconsumerprocurement/README.md b/java-cloudcommerceconsumerprocurement/README.md index 95d02ecbe7a8..e4fff38a1cd2 100644 --- a/java-cloudcommerceconsumerprocurement/README.md +++ b/java-cloudcommerceconsumerprocurement/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-cloudcommerceconsumerprocurement - 0.26.0 + 0.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-cloudcommerceconsumerprocurement:0.26.0' +implementation 'com.google.cloud:google-cloud-cloudcommerceconsumerprocurement:0.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-cloudcommerceconsumerprocurement" % "0.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-cloudcommerceconsumerprocurement" % "0.27.0" ``` diff --git a/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement-bom/pom.xml b/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement-bom/pom.xml index e77609eef6e9..c74bc16455db 100644 --- a/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement-bom/pom.xml +++ b/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-cloudcommerceconsumerprocurement-bom - 0.26.0 + 0.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-cloudcommerceconsumerprocurement - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-cloudcommerceconsumerprocurement-v1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-cloudcommerceconsumerprocurement-v1 - 0.26.0 + 0.27.0 diff --git a/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement/pom.xml b/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement/pom.xml index bb6920cb813f..ea4ca2fe06be 100644 --- a/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement/pom.xml +++ b/java-cloudcommerceconsumerprocurement/google-cloud-cloudcommerceconsumerprocurement/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-cloudcommerceconsumerprocurement - 0.26.0 + 0.27.0 jar Google Cloud Commerce Consumer Procurement Cloud Commerce Consumer Procurement Find top solutions integrated with Google Cloud to accelerate your digital transformation. Scale and simplify procurement for your organization with online discovery, flexible purchasing, and fulfillment of enterprise-grade cloud solutions. com.google.cloud google-cloud-cloudcommerceconsumerprocurement-parent - 0.26.0 + 0.27.0 google-cloud-cloudcommerceconsumerprocurement diff --git a/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml b/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml index 97c7f3a311f6..5c13f30c2dd0 100644 --- a/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml +++ b/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-cloudcommerceconsumerprocurement-v1 - 0.26.0 + 0.27.0 grpc-google-cloud-cloudcommerceconsumerprocurement-v1 GRPC library for google-cloud-cloudcommerceconsumerprocurement com.google.cloud google-cloud-cloudcommerceconsumerprocurement-parent - 0.26.0 + 0.27.0 diff --git a/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml b/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml index 3e18109979ac..9dc72a6dbcec 100644 --- a/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml +++ b/java-cloudcommerceconsumerprocurement/grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 - 0.26.0 + 0.27.0 grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 GRPC library for google-cloud-cloudcommerceconsumerprocurement com.google.cloud google-cloud-cloudcommerceconsumerprocurement-parent - 0.26.0 + 0.27.0 diff --git a/java-cloudcommerceconsumerprocurement/pom.xml b/java-cloudcommerceconsumerprocurement/pom.xml index d03109e78bc8..a53ced893277 100644 --- a/java-cloudcommerceconsumerprocurement/pom.xml +++ b/java-cloudcommerceconsumerprocurement/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-cloudcommerceconsumerprocurement-parent pom - 0.26.0 + 0.27.0 Google Cloud Commerce Consumer Procurement Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-cloudcommerceconsumerprocurement - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-cloudcommerceconsumerprocurement-v1 - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-cloudcommerceconsumerprocurement-v1 - 0.26.0 + 0.27.0 com.google.api.grpc grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 - 0.26.0 + 0.27.0 com.google.api.grpc proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 - 0.26.0 + 0.27.0 diff --git a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml index 46ceb411fe9e..01e389c36995 100644 --- a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml +++ b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-cloudcommerceconsumerprocurement-v1 - 0.26.0 + 0.27.0 proto-google-cloud-cloudcommerceconsumerprocurement-v1 Proto library for google-cloud-cloudcommerceconsumerprocurement com.google.cloud google-cloud-cloudcommerceconsumerprocurement-parent - 0.26.0 + 0.27.0 diff --git a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml index 6d12f7f55552..6bfb4e39ecfd 100644 --- a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml +++ b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 - 0.26.0 + 0.27.0 proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1 Proto library for google-cloud-cloudcommerceconsumerprocurement com.google.cloud google-cloud-cloudcommerceconsumerprocurement-parent - 0.26.0 + 0.27.0 diff --git a/java-cloudsupport/CHANGELOG.md b/java-cloudsupport/CHANGELOG.md index 5f92f8e942d4..ee6a68a2cf95 100644 --- a/java-cloudsupport/CHANGELOG.md +++ b/java-cloudsupport/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.13.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.12.0 (2023-10-11) ### Dependencies diff --git a/java-cloudsupport/README.md b/java-cloudsupport/README.md index e3d4a4457b6a..2e6cd2fcf876 100644 --- a/java-cloudsupport/README.md +++ b/java-cloudsupport/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-cloudsupport - 0.12.0 + 0.13.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-cloudsupport:0.12.0' +implementation 'com.google.cloud:google-cloud-cloudsupport:0.13.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-cloudsupport" % "0.12.0" +libraryDependencies += "com.google.cloud" % "google-cloud-cloudsupport" % "0.13.0" ``` diff --git a/java-cloudsupport/google-cloud-cloudsupport-bom/pom.xml b/java-cloudsupport/google-cloud-cloudsupport-bom/pom.xml index 484fa0686537..18f1e9b540fa 100644 --- a/java-cloudsupport/google-cloud-cloudsupport-bom/pom.xml +++ b/java-cloudsupport/google-cloud-cloudsupport-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-cloudsupport-bom - 0.12.0 + 0.13.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-cloudsupport - 0.12.0 + 0.13.0 com.google.api.grpc grpc-google-cloud-cloudsupport-v2 - 0.12.0 + 0.13.0 com.google.api.grpc proto-google-cloud-cloudsupport-v2 - 0.12.0 + 0.13.0 diff --git a/java-cloudsupport/google-cloud-cloudsupport/pom.xml b/java-cloudsupport/google-cloud-cloudsupport/pom.xml index 9ebf5cfba0b4..7575e9fb49de 100644 --- a/java-cloudsupport/google-cloud-cloudsupport/pom.xml +++ b/java-cloudsupport/google-cloud-cloudsupport/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-cloudsupport - 0.12.0 + 0.13.0 jar Google Google Cloud Support API Google Cloud Support API Manages Google Cloud technical support cases for Customer Care support offerings. com.google.cloud google-cloud-cloudsupport-parent - 0.12.0 + 0.13.0 google-cloud-cloudsupport diff --git a/java-cloudsupport/grpc-google-cloud-cloudsupport-v2/pom.xml b/java-cloudsupport/grpc-google-cloud-cloudsupport-v2/pom.xml index 357d724e0334..cf28cf13aa4a 100644 --- a/java-cloudsupport/grpc-google-cloud-cloudsupport-v2/pom.xml +++ b/java-cloudsupport/grpc-google-cloud-cloudsupport-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-cloudsupport-v2 - 0.12.0 + 0.13.0 grpc-google-cloud-cloudsupport-v2 GRPC library for google-cloud-cloudsupport com.google.cloud google-cloud-cloudsupport-parent - 0.12.0 + 0.13.0 diff --git a/java-cloudsupport/pom.xml b/java-cloudsupport/pom.xml index c45689261782..4b1b1bb5528b 100644 --- a/java-cloudsupport/pom.xml +++ b/java-cloudsupport/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-cloudsupport-parent pom - 0.12.0 + 0.13.0 Google Google Cloud Support API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-cloudsupport - 0.12.0 + 0.13.0 com.google.api.grpc grpc-google-cloud-cloudsupport-v2 - 0.12.0 + 0.13.0 com.google.api.grpc proto-google-cloud-cloudsupport-v2 - 0.12.0 + 0.13.0 diff --git a/java-cloudsupport/proto-google-cloud-cloudsupport-v2/pom.xml b/java-cloudsupport/proto-google-cloud-cloudsupport-v2/pom.xml index 683c50bbb892..eda2b5316df8 100644 --- a/java-cloudsupport/proto-google-cloud-cloudsupport-v2/pom.xml +++ b/java-cloudsupport/proto-google-cloud-cloudsupport-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-cloudsupport-v2 - 0.12.0 + 0.13.0 proto-google-cloud-cloudsupport-v2 Proto library for google-cloud-cloudsupport com.google.cloud google-cloud-cloudsupport-parent - 0.12.0 + 0.13.0 diff --git a/java-compute/CHANGELOG.md b/java-compute/CHANGELOG.md index 8ec9007e175a..d55814bf790b 100644 --- a/java-compute/CHANGELOG.md +++ b/java-compute/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.39.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.38.0 (2023-10-11) ### Dependencies diff --git a/java-compute/README.md b/java-compute/README.md index a4be7e3e08a0..3ed76e732a5b 100644 --- a/java-compute/README.md +++ b/java-compute/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-compute - 1.38.0 + 1.39.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-compute:1.38.0' +implementation 'com.google.cloud:google-cloud-compute:1.39.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.38.0" +libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.39.0" ``` diff --git a/java-compute/google-cloud-compute-bom/pom.xml b/java-compute/google-cloud-compute-bom/pom.xml index c6c7042447c4..4ab52393664c 100644 --- a/java-compute/google-cloud-compute-bom/pom.xml +++ b/java-compute/google-cloud-compute-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-compute-bom - 1.38.0 + 1.39.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,12 +23,12 @@ com.google.cloud google-cloud-compute - 1.38.0 + 1.39.0 com.google.api.grpc proto-google-cloud-compute-v1 - 1.38.0 + 1.39.0 diff --git a/java-compute/google-cloud-compute/pom.xml b/java-compute/google-cloud-compute/pom.xml index 3643bae8e68a..9716a6784356 100644 --- a/java-compute/google-cloud-compute/pom.xml +++ b/java-compute/google-cloud-compute/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-compute - 1.38.0 + 1.39.0 jar Google Compute Engine Compute Engine delivers configurable virtual machines running in @@ -12,7 +12,7 @@ com.google.cloud google-cloud-compute-parent - 1.38.0 + 1.39.0 google-cloud-compute diff --git a/java-compute/pom.xml b/java-compute/pom.xml index 0e2d3e9b0c24..3df950310757 100644 --- a/java-compute/pom.xml +++ b/java-compute/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-compute-parent pom - 1.38.0 + 1.39.0 Google Compute Engine Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,12 +29,12 @@ com.google.cloud google-cloud-compute - 1.38.0 + 1.39.0 com.google.api.grpc proto-google-cloud-compute-v1 - 1.38.0 + 1.39.0 diff --git a/java-compute/proto-google-cloud-compute-v1/pom.xml b/java-compute/proto-google-cloud-compute-v1/pom.xml index ecf76b22b080..7f3c8ca8f879 100644 --- a/java-compute/proto-google-cloud-compute-v1/pom.xml +++ b/java-compute/proto-google-cloud-compute-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-compute-v1 - 1.38.0 + 1.39.0 proto-google-cloud-compute-v1 Proto library for google-cloud-compute com.google.cloud google-cloud-compute-parent - 1.38.0 + 1.39.0 diff --git a/java-confidentialcomputing/CHANGELOG.md b/java-confidentialcomputing/CHANGELOG.md index 60037c19ce9f..261f7f1b21cc 100644 --- a/java-confidentialcomputing/CHANGELOG.md +++ b/java-confidentialcomputing/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.15.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.14.0 (2023-10-11) ### Dependencies diff --git a/java-confidentialcomputing/README.md b/java-confidentialcomputing/README.md index 1d382b8263dd..0385eaa454b6 100644 --- a/java-confidentialcomputing/README.md +++ b/java-confidentialcomputing/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-confidentialcomputing - 0.14.0 + 0.15.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-confidentialcomputing:0.14.0' +implementation 'com.google.cloud:google-cloud-confidentialcomputing:0.15.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-confidentialcomputing" % "0.14.0" +libraryDependencies += "com.google.cloud" % "google-cloud-confidentialcomputing" % "0.15.0" ``` diff --git a/java-confidentialcomputing/google-cloud-confidentialcomputing-bom/pom.xml b/java-confidentialcomputing/google-cloud-confidentialcomputing-bom/pom.xml index 772c17b89922..f30ad34aed56 100644 --- a/java-confidentialcomputing/google-cloud-confidentialcomputing-bom/pom.xml +++ b/java-confidentialcomputing/google-cloud-confidentialcomputing-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-confidentialcomputing-bom - 0.14.0 + 0.15.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-confidentialcomputing - 0.14.0 + 0.15.0 com.google.api.grpc grpc-google-cloud-confidentialcomputing-v1 - 0.14.0 + 0.15.0 com.google.api.grpc grpc-google-cloud-confidentialcomputing-v1alpha1 - 0.14.0 + 0.15.0 com.google.api.grpc proto-google-cloud-confidentialcomputing-v1 - 0.14.0 + 0.15.0 com.google.api.grpc proto-google-cloud-confidentialcomputing-v1alpha1 - 0.14.0 + 0.15.0 diff --git a/java-confidentialcomputing/google-cloud-confidentialcomputing/pom.xml b/java-confidentialcomputing/google-cloud-confidentialcomputing/pom.xml index 29cd1073e0a2..0fd3bb18b9f4 100644 --- a/java-confidentialcomputing/google-cloud-confidentialcomputing/pom.xml +++ b/java-confidentialcomputing/google-cloud-confidentialcomputing/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-confidentialcomputing - 0.14.0 + 0.15.0 jar Google Confidential Computing API Confidential Computing API Protect data in-use with Confidential VMs, Confidential GKE, Confidential Dataproc, and Confidential Space. com.google.cloud google-cloud-confidentialcomputing-parent - 0.14.0 + 0.15.0 google-cloud-confidentialcomputing diff --git a/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1/pom.xml b/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1/pom.xml index ac7456c1499d..4ac64a060ecd 100644 --- a/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1/pom.xml +++ b/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-confidentialcomputing-v1 - 0.14.0 + 0.15.0 grpc-google-cloud-confidentialcomputing-v1 GRPC library for google-cloud-confidentialcomputing com.google.cloud google-cloud-confidentialcomputing-parent - 0.14.0 + 0.15.0 diff --git a/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1alpha1/pom.xml b/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1alpha1/pom.xml index f6e7be87116d..d37065482a5d 100644 --- a/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1alpha1/pom.xml +++ b/java-confidentialcomputing/grpc-google-cloud-confidentialcomputing-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-confidentialcomputing-v1alpha1 - 0.14.0 + 0.15.0 grpc-google-cloud-confidentialcomputing-v1alpha1 GRPC library for google-cloud-confidentialcomputing com.google.cloud google-cloud-confidentialcomputing-parent - 0.14.0 + 0.15.0 diff --git a/java-confidentialcomputing/pom.xml b/java-confidentialcomputing/pom.xml index d46a7a7e6bc0..178c43d0eb72 100644 --- a/java-confidentialcomputing/pom.xml +++ b/java-confidentialcomputing/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-confidentialcomputing-parent pom - 0.14.0 + 0.15.0 Google Confidential Computing API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-confidentialcomputing - 0.14.0 + 0.15.0 com.google.api.grpc grpc-google-cloud-confidentialcomputing-v1 - 0.14.0 + 0.15.0 com.google.api.grpc grpc-google-cloud-confidentialcomputing-v1alpha1 - 0.14.0 + 0.15.0 com.google.api.grpc proto-google-cloud-confidentialcomputing-v1 - 0.14.0 + 0.15.0 com.google.api.grpc proto-google-cloud-confidentialcomputing-v1alpha1 - 0.14.0 + 0.15.0 diff --git a/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1/pom.xml b/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1/pom.xml index 2391369ce71e..2649639d0790 100644 --- a/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1/pom.xml +++ b/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-confidentialcomputing-v1 - 0.14.0 + 0.15.0 proto-google-cloud-confidentialcomputing-v1 Proto library for google-cloud-confidentialcomputing com.google.cloud google-cloud-confidentialcomputing-parent - 0.14.0 + 0.15.0 diff --git a/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1alpha1/pom.xml b/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1alpha1/pom.xml index 21c6105f0151..9b43294765ae 100644 --- a/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1alpha1/pom.xml +++ b/java-confidentialcomputing/proto-google-cloud-confidentialcomputing-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-confidentialcomputing-v1alpha1 - 0.14.0 + 0.15.0 proto-google-cloud-confidentialcomputing-v1alpha1 Proto library for google-cloud-confidentialcomputing com.google.cloud google-cloud-confidentialcomputing-parent - 0.14.0 + 0.15.0 diff --git a/java-contact-center-insights/CHANGELOG.md b/java-contact-center-insights/CHANGELOG.md index 048454529c19..4c31109b4efc 100644 --- a/java-contact-center-insights/CHANGELOG.md +++ b/java-contact-center-insights/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-contact-center-insights/README.md b/java-contact-center-insights/README.md index 94079f51caef..1e0470e3baab 100644 --- a/java-contact-center-insights/README.md +++ b/java-contact-center-insights/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-contact-center-insights - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-contact-center-insights:2.28.0' +implementation 'com.google.cloud:google-cloud-contact-center-insights:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-contact-center-insights" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-contact-center-insights" % "2.29.0" ``` diff --git a/java-contact-center-insights/google-cloud-contact-center-insights-bom/pom.xml b/java-contact-center-insights/google-cloud-contact-center-insights-bom/pom.xml index 93550016aa22..ed2d76f84e89 100644 --- a/java-contact-center-insights/google-cloud-contact-center-insights-bom/pom.xml +++ b/java-contact-center-insights/google-cloud-contact-center-insights-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-contact-center-insights-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-contact-center-insights - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-contact-center-insights-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-contact-center-insights-v1 - 2.28.0 + 2.29.0 diff --git a/java-contact-center-insights/google-cloud-contact-center-insights/pom.xml b/java-contact-center-insights/google-cloud-contact-center-insights/pom.xml index 67cd07094721..d8ffd152bdef 100644 --- a/java-contact-center-insights/google-cloud-contact-center-insights/pom.xml +++ b/java-contact-center-insights/google-cloud-contact-center-insights/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-contact-center-insights - 2.28.0 + 2.29.0 jar Google CCAI Insights CCAI Insights helps users detect and visualize patterns in their contact center data. com.google.cloud google-cloud-contact-center-insights-parent - 2.28.0 + 2.29.0 google-cloud-contact-center-insights diff --git a/java-contact-center-insights/grpc-google-cloud-contact-center-insights-v1/pom.xml b/java-contact-center-insights/grpc-google-cloud-contact-center-insights-v1/pom.xml index cad8cd20e9f6..6b2b24079276 100644 --- a/java-contact-center-insights/grpc-google-cloud-contact-center-insights-v1/pom.xml +++ b/java-contact-center-insights/grpc-google-cloud-contact-center-insights-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-contact-center-insights-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-contact-center-insights-v1 GRPC library for google-cloud-contact-center-insights com.google.cloud google-cloud-contact-center-insights-parent - 2.28.0 + 2.29.0 diff --git a/java-contact-center-insights/pom.xml b/java-contact-center-insights/pom.xml index f0e1570f1412..56af241db4ff 100644 --- a/java-contact-center-insights/pom.xml +++ b/java-contact-center-insights/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-contact-center-insights-parent pom - 2.28.0 + 2.29.0 Google CCAI Insights Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-contact-center-insights - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-contact-center-insights-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-contact-center-insights-v1 - 2.28.0 + 2.29.0 diff --git a/java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/pom.xml b/java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/pom.xml index 2e3e1b0822de..84cc7e2275be 100644 --- a/java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/pom.xml +++ b/java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-contact-center-insights-v1 - 2.28.0 + 2.29.0 proto-google-cloud-contact-center-insights-v1 Proto library for google-cloud-contact-center-insights com.google.cloud google-cloud-contact-center-insights-parent - 2.28.0 + 2.29.0 diff --git a/java-container/CHANGELOG.md b/java-container/CHANGELOG.md index ff040d2c1384..7b605ccec5d4 100644 --- a/java-container/CHANGELOG.md +++ b/java-container/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.32.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.31.0 (2023-10-11) ### Dependencies diff --git a/java-container/README.md b/java-container/README.md index f901e58349ef..9d35eb5e5c83 100644 --- a/java-container/README.md +++ b/java-container/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-container - 2.31.0 + 2.32.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-container:2.31.0' +implementation 'com.google.cloud:google-cloud-container:2.32.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-container" % "2.31.0" +libraryDependencies += "com.google.cloud" % "google-cloud-container" % "2.32.0" ``` diff --git a/java-container/google-cloud-container-bom/pom.xml b/java-container/google-cloud-container-bom/pom.xml index 07b7a849976a..f47fce810a48 100644 --- a/java-container/google-cloud-container-bom/pom.xml +++ b/java-container/google-cloud-container-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-container-bom - 2.31.0 + 2.32.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-container - 2.31.0 + 2.32.0 com.google.api.grpc grpc-google-cloud-container-v1 - 2.31.0 + 2.32.0 com.google.api.grpc grpc-google-cloud-container-v1beta1 - 2.31.0 + 2.32.0 com.google.api.grpc proto-google-cloud-container-v1 - 2.31.0 + 2.32.0 com.google.api.grpc proto-google-cloud-container-v1beta1 - 2.31.0 + 2.32.0 diff --git a/java-container/google-cloud-container/pom.xml b/java-container/google-cloud-container/pom.xml index e95f80ff91c7..93b5afd22bfb 100644 --- a/java-container/google-cloud-container/pom.xml +++ b/java-container/google-cloud-container/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-container - 2.31.0 + 2.32.0 jar Google Cloud Container Java idiomatic client for Google Cloud Container com.google.cloud google-cloud-container-parent - 2.31.0 + 2.32.0 google-cloud-container diff --git a/java-container/grpc-google-cloud-container-v1/pom.xml b/java-container/grpc-google-cloud-container-v1/pom.xml index 3ee6179e446e..94da83caf0d1 100644 --- a/java-container/grpc-google-cloud-container-v1/pom.xml +++ b/java-container/grpc-google-cloud-container-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-container-v1 - 2.31.0 + 2.32.0 grpc-google-cloud-container-v1 GRPC library for grpc-google-cloud-container-v1 com.google.cloud google-cloud-container-parent - 2.31.0 + 2.32.0 diff --git a/java-container/grpc-google-cloud-container-v1beta1/pom.xml b/java-container/grpc-google-cloud-container-v1beta1/pom.xml index 92a48dda4f8b..0ecf8b5e5369 100644 --- a/java-container/grpc-google-cloud-container-v1beta1/pom.xml +++ b/java-container/grpc-google-cloud-container-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-container-v1beta1 - 2.31.0 + 2.32.0 grpc-google-cloud-container-v1beta1 GRPC library for google-cloud-container com.google.cloud google-cloud-container-parent - 2.31.0 + 2.32.0 diff --git a/java-container/pom.xml b/java-container/pom.xml index 6203f23b60d0..8886382a9fa7 100644 --- a/java-container/pom.xml +++ b/java-container/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-container-parent pom - 2.31.0 + 2.32.0 Google Cloud Container Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-container-v1 - 2.31.0 + 2.32.0 com.google.api.grpc proto-google-cloud-container-v1beta1 - 2.31.0 + 2.32.0 com.google.api.grpc grpc-google-cloud-container-v1beta1 - 2.31.0 + 2.32.0 com.google.api.grpc grpc-google-cloud-container-v1 - 2.31.0 + 2.32.0 com.google.cloud google-cloud-container - 2.31.0 + 2.32.0 diff --git a/java-container/proto-google-cloud-container-v1/pom.xml b/java-container/proto-google-cloud-container-v1/pom.xml index f2b1fe53a2e4..a558d314e269 100644 --- a/java-container/proto-google-cloud-container-v1/pom.xml +++ b/java-container/proto-google-cloud-container-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-container-v1 - 2.31.0 + 2.32.0 proto-google-cloud-container-v1 PROTO library for proto-google-cloud-container-v1 com.google.cloud google-cloud-container-parent - 2.31.0 + 2.32.0 diff --git a/java-container/proto-google-cloud-container-v1beta1/pom.xml b/java-container/proto-google-cloud-container-v1beta1/pom.xml index 2288283ad6f2..ca44f01a427d 100644 --- a/java-container/proto-google-cloud-container-v1beta1/pom.xml +++ b/java-container/proto-google-cloud-container-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-container-v1beta1 - 2.31.0 + 2.32.0 proto-google-cloud-container-v1beta1 Proto library for google-cloud-container com.google.cloud google-cloud-container-parent - 2.31.0 + 2.32.0 diff --git a/java-containeranalysis/CHANGELOG.md b/java-containeranalysis/CHANGELOG.md index 64566dbb16cd..9cb46e05b566 100644 --- a/java-containeranalysis/CHANGELOG.md +++ b/java-containeranalysis/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-containeranalysis/README.md b/java-containeranalysis/README.md index d94648ed84a4..dee634a84982 100644 --- a/java-containeranalysis/README.md +++ b/java-containeranalysis/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-containeranalysis - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-containeranalysis:2.29.0' +implementation 'com.google.cloud:google-cloud-containeranalysis:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "2.30.0" ``` diff --git a/java-containeranalysis/google-cloud-containeranalysis-bom/pom.xml b/java-containeranalysis/google-cloud-containeranalysis-bom/pom.xml index 63d054df3c8f..dc740b46716d 100644 --- a/java-containeranalysis/google-cloud-containeranalysis-bom/pom.xml +++ b/java-containeranalysis/google-cloud-containeranalysis-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-containeranalysis-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-containeranalysis - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1beta1 - 0.119.0 + 0.120.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1beta1 - 0.119.0 + 0.120.0 diff --git a/java-containeranalysis/google-cloud-containeranalysis/pom.xml b/java-containeranalysis/google-cloud-containeranalysis/pom.xml index f3b413bfef1f..705831193477 100644 --- a/java-containeranalysis/google-cloud-containeranalysis/pom.xml +++ b/java-containeranalysis/google-cloud-containeranalysis/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-containeranalysis - 2.29.0 + 2.30.0 jar Google Cloud Container Analysis Java idiomatic client for Google Cloud Container Analysis com.google.cloud google-cloud-containeranalysis-parent - 2.29.0 + 2.30.0 google-cloud-containeranalysis diff --git a/java-containeranalysis/grpc-google-cloud-containeranalysis-v1/pom.xml b/java-containeranalysis/grpc-google-cloud-containeranalysis-v1/pom.xml index 9476b5361558..bccea3801bbf 100644 --- a/java-containeranalysis/grpc-google-cloud-containeranalysis-v1/pom.xml +++ b/java-containeranalysis/grpc-google-cloud-containeranalysis-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-containeranalysis-v1 GRPC library for grpc-google-cloud-containeranalysis-v1 com.google.cloud google-cloud-containeranalysis-parent - 2.29.0 + 2.30.0 diff --git a/java-containeranalysis/grpc-google-cloud-containeranalysis-v1beta1/pom.xml b/java-containeranalysis/grpc-google-cloud-containeranalysis-v1beta1/pom.xml index c2c7bc6f2704..dab1d4a046db 100644 --- a/java-containeranalysis/grpc-google-cloud-containeranalysis-v1beta1/pom.xml +++ b/java-containeranalysis/grpc-google-cloud-containeranalysis-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1beta1 - 0.119.0 + 0.120.0 grpc-google-cloud-containeranalysis-v1beta1 GRPC library for grpc-google-cloud-containeranalysis-v1beta1 com.google.cloud google-cloud-containeranalysis-parent - 2.29.0 + 2.30.0 diff --git a/java-containeranalysis/pom.xml b/java-containeranalysis/pom.xml index 31352b5ca50a..ca15d0866c77 100644 --- a/java-containeranalysis/pom.xml +++ b/java-containeranalysis/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-containeranalysis-parent pom - 2.29.0 + 2.30.0 Google Cloud Container Analysis Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,33 +29,33 @@ com.google.api.grpc proto-google-cloud-containeranalysis-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1beta1 - 0.119.0 + 0.120.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1beta1 - 0.119.0 + 0.120.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1 - 2.29.0 + 2.30.0 com.google.cloud google-cloud-containeranalysis - 2.29.0 + 2.30.0 io.grafeas grafeas - 2.29.0 + 2.30.0 diff --git a/java-containeranalysis/proto-google-cloud-containeranalysis-v1/pom.xml b/java-containeranalysis/proto-google-cloud-containeranalysis-v1/pom.xml index f8d150b67c38..23cc4c7e6767 100644 --- a/java-containeranalysis/proto-google-cloud-containeranalysis-v1/pom.xml +++ b/java-containeranalysis/proto-google-cloud-containeranalysis-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1 - 2.29.0 + 2.30.0 proto-google-cloud-containeranalysis-v1 PROTO library for proto-google-cloud-containeranalysis-v1 com.google.cloud google-cloud-containeranalysis-parent - 2.29.0 + 2.30.0 diff --git a/java-containeranalysis/proto-google-cloud-containeranalysis-v1beta1/pom.xml b/java-containeranalysis/proto-google-cloud-containeranalysis-v1beta1/pom.xml index c0669c502d46..4ee65a19ea91 100644 --- a/java-containeranalysis/proto-google-cloud-containeranalysis-v1beta1/pom.xml +++ b/java-containeranalysis/proto-google-cloud-containeranalysis-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1beta1 - 0.119.0 + 0.120.0 proto-google-cloud-containeranalysis-v1beta1 PROTO library for proto-google-cloud-containeranalysis-v1beta1 com.google.cloud google-cloud-containeranalysis-parent - 2.29.0 + 2.30.0 diff --git a/java-contentwarehouse/README.md b/java-contentwarehouse/README.md index f98075e94e52..595a8252ff8a 100644 --- a/java-contentwarehouse/README.md +++ b/java-contentwarehouse/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-contentwarehouse - 0.24.0 + 0.25.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-contentwarehouse:0.24.0' +implementation 'com.google.cloud:google-cloud-contentwarehouse:0.25.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-contentwarehouse" % "0.24.0" +libraryDependencies += "com.google.cloud" % "google-cloud-contentwarehouse" % "0.25.0" ``` diff --git a/java-contentwarehouse/google-cloud-contentwarehouse-bom/pom.xml b/java-contentwarehouse/google-cloud-contentwarehouse-bom/pom.xml index 7f8d139a05c3..94e282c1e522 100644 --- a/java-contentwarehouse/google-cloud-contentwarehouse-bom/pom.xml +++ b/java-contentwarehouse/google-cloud-contentwarehouse-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-contentwarehouse-bom - 0.24.0 + 0.25.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-contentwarehouse - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-contentwarehouse-v1 - 0.24.0 + 0.25.0 com.google.api.grpc proto-google-cloud-contentwarehouse-v1 - 0.24.0 + 0.25.0 diff --git a/java-contentwarehouse/google-cloud-contentwarehouse/pom.xml b/java-contentwarehouse/google-cloud-contentwarehouse/pom.xml index cbe3f003e4c0..cf2173e47bfb 100644 --- a/java-contentwarehouse/google-cloud-contentwarehouse/pom.xml +++ b/java-contentwarehouse/google-cloud-contentwarehouse/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-contentwarehouse - 0.24.0 + 0.25.0 jar Google Document AI Warehouse Document AI Warehouse Document AI Warehouse is an integrated cloud-native GCP platform to store, search, organize, govern and analyze documents and their structured metadata. com.google.cloud google-cloud-contentwarehouse-parent - 0.24.0 + 0.25.0 google-cloud-contentwarehouse diff --git a/java-contentwarehouse/grpc-google-cloud-contentwarehouse-v1/pom.xml b/java-contentwarehouse/grpc-google-cloud-contentwarehouse-v1/pom.xml index b19c572a0042..2d6c3a407d8e 100644 --- a/java-contentwarehouse/grpc-google-cloud-contentwarehouse-v1/pom.xml +++ b/java-contentwarehouse/grpc-google-cloud-contentwarehouse-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-contentwarehouse-v1 - 0.24.0 + 0.25.0 grpc-google-cloud-contentwarehouse-v1 GRPC library for google-cloud-contentwarehouse com.google.cloud google-cloud-contentwarehouse-parent - 0.24.0 + 0.25.0 diff --git a/java-contentwarehouse/pom.xml b/java-contentwarehouse/pom.xml index efa72ae112ec..7c5a776ee0b3 100644 --- a/java-contentwarehouse/pom.xml +++ b/java-contentwarehouse/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-contentwarehouse-parent pom - 0.24.0 + 0.25.0 Google Document AI Warehouse Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-contentwarehouse - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-contentwarehouse-v1 - 0.24.0 + 0.25.0 com.google.api.grpc proto-google-cloud-contentwarehouse-v1 - 0.24.0 + 0.25.0 @@ -48,7 +48,7 @@ com.google.cloud google-cloud-document-ai - 2.32.0 + 2.33.0 diff --git a/java-contentwarehouse/proto-google-cloud-contentwarehouse-v1/pom.xml b/java-contentwarehouse/proto-google-cloud-contentwarehouse-v1/pom.xml index a26d597aa073..4f8714aac2ab 100644 --- a/java-contentwarehouse/proto-google-cloud-contentwarehouse-v1/pom.xml +++ b/java-contentwarehouse/proto-google-cloud-contentwarehouse-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-contentwarehouse-v1 - 0.24.0 + 0.25.0 proto-google-cloud-contentwarehouse-v1 Proto library for google-cloud-contentwarehouse com.google.cloud google-cloud-contentwarehouse-parent - 0.24.0 + 0.25.0 diff --git a/java-data-fusion/CHANGELOG.md b/java-data-fusion/CHANGELOG.md index 93e4d6c9bed4..a9b3e77fa0c9 100644 --- a/java-data-fusion/CHANGELOG.md +++ b/java-data-fusion/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-data-fusion/README.md b/java-data-fusion/README.md index 5e3a0f1262b5..1016ab648149 100644 --- a/java-data-fusion/README.md +++ b/java-data-fusion/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-data-fusion - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-data-fusion:1.28.0' +implementation 'com.google.cloud:google-cloud-data-fusion:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-data-fusion" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-data-fusion" % "1.29.0" ``` diff --git a/java-data-fusion/google-cloud-data-fusion-bom/pom.xml b/java-data-fusion/google-cloud-data-fusion-bom/pom.xml index 68393db8a535..d4a8fcc3d386 100644 --- a/java-data-fusion/google-cloud-data-fusion-bom/pom.xml +++ b/java-data-fusion/google-cloud-data-fusion-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-data-fusion-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-data-fusion - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-data-fusion-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-data-fusion-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-data-fusion-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-data-fusion-v1 - 1.28.0 + 1.29.0 diff --git a/java-data-fusion/google-cloud-data-fusion/pom.xml b/java-data-fusion/google-cloud-data-fusion/pom.xml index 33aefeeed05b..b71fe46a8e0d 100644 --- a/java-data-fusion/google-cloud-data-fusion/pom.xml +++ b/java-data-fusion/google-cloud-data-fusion/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-data-fusion - 1.28.0 + 1.29.0 jar Google Cloud Data Fusion Cloud Data Fusion is a fully managed, cloud-native, enterprise data integration service for quickly building and managing data pipelines. com.google.cloud google-cloud-data-fusion-parent - 1.28.0 + 1.29.0 google-cloud-data-fusion diff --git a/java-data-fusion/grpc-google-cloud-data-fusion-v1/pom.xml b/java-data-fusion/grpc-google-cloud-data-fusion-v1/pom.xml index 1d0e52a95224..3aad4ad2c16c 100644 --- a/java-data-fusion/grpc-google-cloud-data-fusion-v1/pom.xml +++ b/java-data-fusion/grpc-google-cloud-data-fusion-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-data-fusion-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-data-fusion-v1 GRPC library for google-cloud-data-fusion com.google.cloud google-cloud-data-fusion-parent - 1.28.0 + 1.29.0 diff --git a/java-data-fusion/grpc-google-cloud-data-fusion-v1beta1/pom.xml b/java-data-fusion/grpc-google-cloud-data-fusion-v1beta1/pom.xml index 6a62a8f33e1e..15839052a6b9 100644 --- a/java-data-fusion/grpc-google-cloud-data-fusion-v1beta1/pom.xml +++ b/java-data-fusion/grpc-google-cloud-data-fusion-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-data-fusion-v1beta1 - 0.32.0 + 0.33.0 grpc-google-cloud-data-fusion-v1beta1 GRPC library for google-cloud-data-fusion com.google.cloud google-cloud-data-fusion-parent - 1.28.0 + 1.29.0 diff --git a/java-data-fusion/pom.xml b/java-data-fusion/pom.xml index 58e01c7efbe0..c7bc76f88d68 100644 --- a/java-data-fusion/pom.xml +++ b/java-data-fusion/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-data-fusion-parent pom - 1.28.0 + 1.29.0 Google Cloud Data Fusion Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-data-fusion - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-data-fusion-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-data-fusion-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-data-fusion-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-data-fusion-v1 - 1.28.0 + 1.29.0 diff --git a/java-data-fusion/proto-google-cloud-data-fusion-v1/pom.xml b/java-data-fusion/proto-google-cloud-data-fusion-v1/pom.xml index 319ac307ba13..f4f6395c4c64 100644 --- a/java-data-fusion/proto-google-cloud-data-fusion-v1/pom.xml +++ b/java-data-fusion/proto-google-cloud-data-fusion-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-data-fusion-v1 - 1.28.0 + 1.29.0 proto-google-cloud-data-fusion-v1 Proto library for google-cloud-data-fusion com.google.cloud google-cloud-data-fusion-parent - 1.28.0 + 1.29.0 diff --git a/java-data-fusion/proto-google-cloud-data-fusion-v1beta1/pom.xml b/java-data-fusion/proto-google-cloud-data-fusion-v1beta1/pom.xml index 4aee9ccc139e..7fa208698c34 100644 --- a/java-data-fusion/proto-google-cloud-data-fusion-v1beta1/pom.xml +++ b/java-data-fusion/proto-google-cloud-data-fusion-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-data-fusion-v1beta1 - 0.32.0 + 0.33.0 proto-google-cloud-data-fusion-v1beta1 Proto library for google-cloud-data-fusion com.google.cloud google-cloud-data-fusion-parent - 1.28.0 + 1.29.0 diff --git a/java-datacatalog/CHANGELOG.md b/java-datacatalog/CHANGELOG.md index 2dd9b9df1f6d..21fd7865658c 100644 --- a/java-datacatalog/CHANGELOG.md +++ b/java-datacatalog/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.35.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.34.0 (2023-10-11) ### Dependencies diff --git a/java-datacatalog/README.md b/java-datacatalog/README.md index 9ac746897beb..3c46403d855b 100644 --- a/java-datacatalog/README.md +++ b/java-datacatalog/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-datacatalog - 1.34.0 + 1.35.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-datacatalog:1.34.0' +implementation 'com.google.cloud:google-cloud-datacatalog:1.35.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datacatalog" % "1.34.0" +libraryDependencies += "com.google.cloud" % "google-cloud-datacatalog" % "1.35.0" ``` diff --git a/java-datacatalog/google-cloud-datacatalog-bom/pom.xml b/java-datacatalog/google-cloud-datacatalog-bom/pom.xml index b100e60fd9ff..88525cd001b0 100644 --- a/java-datacatalog/google-cloud-datacatalog-bom/pom.xml +++ b/java-datacatalog/google-cloud-datacatalog-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-datacatalog-bom - 1.34.0 + 1.35.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-datacatalog - 1.34.0 + 1.35.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1 - 1.34.0 + 1.35.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 - 0.71.0 + 0.72.0 com.google.api.grpc proto-google-cloud-datacatalog-v1 - 1.34.0 + 1.35.0 com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 - 0.71.0 + 0.72.0 diff --git a/java-datacatalog/google-cloud-datacatalog/pom.xml b/java-datacatalog/google-cloud-datacatalog/pom.xml index 3ff6e8f9f18c..251dcb1c0c58 100644 --- a/java-datacatalog/google-cloud-datacatalog/pom.xml +++ b/java-datacatalog/google-cloud-datacatalog/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-datacatalog - 1.34.0 + 1.35.0 jar Google Cloud Data Catalog Java idiomatic client for Google Cloud Data Catalog com.google.cloud google-cloud-datacatalog-parent - 1.34.0 + 1.35.0 google-cloud-datacatalog diff --git a/java-datacatalog/grpc-google-cloud-datacatalog-v1/pom.xml b/java-datacatalog/grpc-google-cloud-datacatalog-v1/pom.xml index bfa9f983220c..8947a190941e 100644 --- a/java-datacatalog/grpc-google-cloud-datacatalog-v1/pom.xml +++ b/java-datacatalog/grpc-google-cloud-datacatalog-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1 - 1.34.0 + 1.35.0 grpc-google-cloud-datacatalog-v1 GRPC library for grpc-google-cloud-datacatalog-v1 com.google.cloud google-cloud-datacatalog-parent - 1.34.0 + 1.35.0 diff --git a/java-datacatalog/grpc-google-cloud-datacatalog-v1beta1/pom.xml b/java-datacatalog/grpc-google-cloud-datacatalog-v1beta1/pom.xml index 87b3be64da4b..57f188b50f93 100644 --- a/java-datacatalog/grpc-google-cloud-datacatalog-v1beta1/pom.xml +++ b/java-datacatalog/grpc-google-cloud-datacatalog-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 - 0.71.0 + 0.72.0 grpc-google-cloud-datacatalog-v1beta1 GRPC library for grpc-google-cloud-datacatalog-v1beta1 com.google.cloud google-cloud-datacatalog-parent - 1.34.0 + 1.35.0 diff --git a/java-datacatalog/pom.xml b/java-datacatalog/pom.xml index 0a64e1436a41..9a3f42379137 100644 --- a/java-datacatalog/pom.xml +++ b/java-datacatalog/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-datacatalog-parent pom - 1.34.0 + 1.35.0 Google Cloud Data Catalog Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-datacatalog-v1 - 1.34.0 + 1.35.0 com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 - 0.71.0 + 0.72.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1 - 1.34.0 + 1.35.0 com.google.api.grpc grpc-google-cloud-datacatalog-v1beta1 - 0.71.0 + 0.72.0 com.google.cloud google-cloud-datacatalog - 1.34.0 + 1.35.0 diff --git a/java-datacatalog/proto-google-cloud-datacatalog-v1/pom.xml b/java-datacatalog/proto-google-cloud-datacatalog-v1/pom.xml index b29a24a34722..aac13f9cb59e 100644 --- a/java-datacatalog/proto-google-cloud-datacatalog-v1/pom.xml +++ b/java-datacatalog/proto-google-cloud-datacatalog-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datacatalog-v1 - 1.34.0 + 1.35.0 proto-google-cloud-datacatalog-v1 PROTO library for proto-google-cloud-datacatalog-v1 com.google.cloud google-cloud-datacatalog-parent - 1.34.0 + 1.35.0 diff --git a/java-datacatalog/proto-google-cloud-datacatalog-v1beta1/pom.xml b/java-datacatalog/proto-google-cloud-datacatalog-v1beta1/pom.xml index 4ec7b1348cfc..d022239e84c2 100644 --- a/java-datacatalog/proto-google-cloud-datacatalog-v1beta1/pom.xml +++ b/java-datacatalog/proto-google-cloud-datacatalog-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datacatalog-v1beta1 - 0.71.0 + 0.72.0 proto-google-cloud-datacatalog-v1beta1 PROTO library for proto-google-cloud-datacatalog-v1beta1 com.google.cloud google-cloud-datacatalog-parent - 1.34.0 + 1.35.0 diff --git a/java-dataflow/CHANGELOG.md b/java-dataflow/CHANGELOG.md index 10765f0ea042..319a32d38660 100644 --- a/java-dataflow/CHANGELOG.md +++ b/java-dataflow/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.33.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.32.0 (2023-10-11) ### Dependencies diff --git a/java-dataflow/README.md b/java-dataflow/README.md index e9dc6daf3e64..24205cc9e0d6 100644 --- a/java-dataflow/README.md +++ b/java-dataflow/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dataflow - 0.32.0 + 0.33.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dataflow:0.32.0' +implementation 'com.google.cloud:google-cloud-dataflow:0.33.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataflow" % "0.32.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dataflow" % "0.33.0" ``` diff --git a/java-dataflow/google-cloud-dataflow-bom/pom.xml b/java-dataflow/google-cloud-dataflow-bom/pom.xml index a57a3542cf1d..bf4ecb4381d0 100644 --- a/java-dataflow/google-cloud-dataflow-bom/pom.xml +++ b/java-dataflow/google-cloud-dataflow-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dataflow-bom - 0.32.0 + 0.33.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-dataflow - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-dataflow-v1beta3 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-dataflow-v1beta3 - 0.32.0 + 0.33.0 diff --git a/java-dataflow/google-cloud-dataflow/pom.xml b/java-dataflow/google-cloud-dataflow/pom.xml index 258300ab3e7f..63030a96c605 100644 --- a/java-dataflow/google-cloud-dataflow/pom.xml +++ b/java-dataflow/google-cloud-dataflow/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dataflow - 0.32.0 + 0.33.0 jar Google Dataflow Dataflow is a managed service for executing a wide variety of data processing patterns. com.google.cloud google-cloud-dataflow-parent - 0.32.0 + 0.33.0 google-cloud-dataflow diff --git a/java-dataflow/grpc-google-cloud-dataflow-v1beta3/pom.xml b/java-dataflow/grpc-google-cloud-dataflow-v1beta3/pom.xml index b8b9acb41cd9..be965495862a 100644 --- a/java-dataflow/grpc-google-cloud-dataflow-v1beta3/pom.xml +++ b/java-dataflow/grpc-google-cloud-dataflow-v1beta3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataflow-v1beta3 - 0.32.0 + 0.33.0 grpc-google-cloud-dataflow-v1beta3 GRPC library for google-cloud-dataflow com.google.cloud google-cloud-dataflow-parent - 0.32.0 + 0.33.0 diff --git a/java-dataflow/pom.xml b/java-dataflow/pom.xml index db30e82d2e89..e7e29b1a6abe 100644 --- a/java-dataflow/pom.xml +++ b/java-dataflow/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dataflow-parent pom - 0.32.0 + 0.33.0 Google Dataflow Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-dataflow - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-dataflow-v1beta3 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-dataflow-v1beta3 - 0.32.0 + 0.33.0 diff --git a/java-dataflow/proto-google-cloud-dataflow-v1beta3/pom.xml b/java-dataflow/proto-google-cloud-dataflow-v1beta3/pom.xml index 1f946b242b02..a435b4134c55 100644 --- a/java-dataflow/proto-google-cloud-dataflow-v1beta3/pom.xml +++ b/java-dataflow/proto-google-cloud-dataflow-v1beta3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataflow-v1beta3 - 0.32.0 + 0.33.0 proto-google-cloud-dataflow-v1beta3 Proto library for google-cloud-dataflow com.google.cloud google-cloud-dataflow-parent - 0.32.0 + 0.33.0 diff --git a/java-dataform/CHANGELOG.md b/java-dataform/CHANGELOG.md index 879a47089c15..95b8b25d3ac5 100644 --- a/java-dataform/CHANGELOG.md +++ b/java-dataform/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.27.0 (2023-10-11) ### Dependencies diff --git a/java-dataform/README.md b/java-dataform/README.md index 2a28f038a350..e5a724ea6a71 100644 --- a/java-dataform/README.md +++ b/java-dataform/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dataform - 0.27.0 + 0.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dataform:0.27.0' +implementation 'com.google.cloud:google-cloud-dataform:0.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataform" % "0.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dataform" % "0.28.0" ``` diff --git a/java-dataform/google-cloud-dataform-bom/pom.xml b/java-dataform/google-cloud-dataform-bom/pom.xml index e5619f5a3217..5b4caee10b1e 100644 --- a/java-dataform/google-cloud-dataform-bom/pom.xml +++ b/java-dataform/google-cloud-dataform-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dataform-bom - 0.27.0 + 0.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-dataform - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-dataform-v1alpha2 - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-dataform-v1beta1 - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-dataform-v1alpha2 - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-dataform-v1beta1 - 0.27.0 + 0.28.0 diff --git a/java-dataform/google-cloud-dataform/pom.xml b/java-dataform/google-cloud-dataform/pom.xml index c2877bbcabcc..56dfb38c54fb 100644 --- a/java-dataform/google-cloud-dataform/pom.xml +++ b/java-dataform/google-cloud-dataform/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dataform - 0.27.0 + 0.28.0 jar Google Cloud Dataform Cloud Dataform Help analytics teams manage data inside BigQuery using SQL. com.google.cloud google-cloud-dataform-parent - 0.27.0 + 0.28.0 google-cloud-dataform diff --git a/java-dataform/grpc-google-cloud-dataform-v1alpha2/pom.xml b/java-dataform/grpc-google-cloud-dataform-v1alpha2/pom.xml index 37d32966c51b..f1e1407d1f81 100644 --- a/java-dataform/grpc-google-cloud-dataform-v1alpha2/pom.xml +++ b/java-dataform/grpc-google-cloud-dataform-v1alpha2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataform-v1alpha2 - 0.27.0 + 0.28.0 grpc-google-cloud-dataform-v1alpha2 GRPC library for google-cloud-dataform com.google.cloud google-cloud-dataform-parent - 0.27.0 + 0.28.0 diff --git a/java-dataform/grpc-google-cloud-dataform-v1beta1/pom.xml b/java-dataform/grpc-google-cloud-dataform-v1beta1/pom.xml index cb5d7859f289..14c80b756eea 100644 --- a/java-dataform/grpc-google-cloud-dataform-v1beta1/pom.xml +++ b/java-dataform/grpc-google-cloud-dataform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataform-v1beta1 - 0.27.0 + 0.28.0 grpc-google-cloud-dataform-v1beta1 GRPC library for google-cloud-dataform com.google.cloud google-cloud-dataform-parent - 0.27.0 + 0.28.0 diff --git a/java-dataform/pom.xml b/java-dataform/pom.xml index 6c2e0f5edfef..19f94eab54c2 100644 --- a/java-dataform/pom.xml +++ b/java-dataform/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dataform-parent pom - 0.27.0 + 0.28.0 Google Cloud Dataform Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-dataform - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-dataform-v1beta1 - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-dataform-v1beta1 - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-dataform-v1alpha2 - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-dataform-v1alpha2 - 0.27.0 + 0.28.0 diff --git a/java-dataform/proto-google-cloud-dataform-v1alpha2/pom.xml b/java-dataform/proto-google-cloud-dataform-v1alpha2/pom.xml index 150ef893fef0..482cb687dbe8 100644 --- a/java-dataform/proto-google-cloud-dataform-v1alpha2/pom.xml +++ b/java-dataform/proto-google-cloud-dataform-v1alpha2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataform-v1alpha2 - 0.27.0 + 0.28.0 proto-google-cloud-dataform-v1alpha2 Proto library for google-cloud-dataform com.google.cloud google-cloud-dataform-parent - 0.27.0 + 0.28.0 diff --git a/java-dataform/proto-google-cloud-dataform-v1beta1/pom.xml b/java-dataform/proto-google-cloud-dataform-v1beta1/pom.xml index 3abf7f880f36..64159fa22f40 100644 --- a/java-dataform/proto-google-cloud-dataform-v1beta1/pom.xml +++ b/java-dataform/proto-google-cloud-dataform-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataform-v1beta1 - 0.27.0 + 0.28.0 proto-google-cloud-dataform-v1beta1 Proto library for google-cloud-dataform com.google.cloud google-cloud-dataform-parent - 0.27.0 + 0.28.0 diff --git a/java-datalabeling/CHANGELOG.md b/java-datalabeling/CHANGELOG.md index 1d6edd075ea9..2136506dde61 100644 --- a/java-datalabeling/CHANGELOG.md +++ b/java-datalabeling/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.149.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.148.0 (2023-10-11) ### Dependencies diff --git a/java-datalabeling/README.md b/java-datalabeling/README.md index eff7bce3eada..7f7b97f04f37 100644 --- a/java-datalabeling/README.md +++ b/java-datalabeling/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-datalabeling - 0.148.0 + 0.149.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-datalabeling:0.148.0' +implementation 'com.google.cloud:google-cloud-datalabeling:0.149.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datalabeling" % "0.148.0" +libraryDependencies += "com.google.cloud" % "google-cloud-datalabeling" % "0.149.0" ``` diff --git a/java-datalabeling/google-cloud-datalabeling-bom/pom.xml b/java-datalabeling/google-cloud-datalabeling-bom/pom.xml index d6dd486b16ea..a6cd8f737e95 100644 --- a/java-datalabeling/google-cloud-datalabeling-bom/pom.xml +++ b/java-datalabeling/google-cloud-datalabeling-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-datalabeling-bom - 0.148.0 + 0.149.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-datalabeling - 0.148.0 + 0.149.0 com.google.api.grpc grpc-google-cloud-datalabeling-v1beta1 - 0.113.0 + 0.114.0 com.google.api.grpc proto-google-cloud-datalabeling-v1beta1 - 0.113.0 + 0.114.0 diff --git a/java-datalabeling/google-cloud-datalabeling/pom.xml b/java-datalabeling/google-cloud-datalabeling/pom.xml index 9f1ad8986713..e3bea0195317 100644 --- a/java-datalabeling/google-cloud-datalabeling/pom.xml +++ b/java-datalabeling/google-cloud-datalabeling/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-datalabeling - 0.148.0 + 0.149.0 jar Google Cloud Data Labeling Java idiomatic client for Google Cloud Data Labeling com.google.cloud google-cloud-datalabeling-parent - 0.148.0 + 0.149.0 google-cloud-datalabeling diff --git a/java-datalabeling/grpc-google-cloud-datalabeling-v1beta1/pom.xml b/java-datalabeling/grpc-google-cloud-datalabeling-v1beta1/pom.xml index 1cea327a212a..b75cdadf5bb3 100644 --- a/java-datalabeling/grpc-google-cloud-datalabeling-v1beta1/pom.xml +++ b/java-datalabeling/grpc-google-cloud-datalabeling-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datalabeling-v1beta1 - 0.113.0 + 0.114.0 grpc-google-cloud-datalabeling-v1beta1 GRPC library for grpc-google-cloud-datalabeling-v1beta1 com.google.cloud google-cloud-datalabeling-parent - 0.148.0 + 0.149.0 diff --git a/java-datalabeling/pom.xml b/java-datalabeling/pom.xml index b51edd95f72c..c92ff7d1a6b0 100644 --- a/java-datalabeling/pom.xml +++ b/java-datalabeling/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-datalabeling-parent pom - 0.148.0 + 0.149.0 Google Cloud Data Labeling Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-datalabeling-v1beta1 - 0.113.0 + 0.114.0 com.google.api.grpc grpc-google-cloud-datalabeling-v1beta1 - 0.113.0 + 0.114.0 com.google.cloud google-cloud-datalabeling - 0.148.0 + 0.149.0 diff --git a/java-datalabeling/proto-google-cloud-datalabeling-v1beta1/pom.xml b/java-datalabeling/proto-google-cloud-datalabeling-v1beta1/pom.xml index 74ec6d8da013..af9022947de7 100644 --- a/java-datalabeling/proto-google-cloud-datalabeling-v1beta1/pom.xml +++ b/java-datalabeling/proto-google-cloud-datalabeling-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datalabeling-v1beta1 - 0.113.0 + 0.114.0 proto-google-cloud-datalabeling-v1beta1 PROTO library for proto-google-cloud-datalabeling-v1beta1 com.google.cloud google-cloud-datalabeling-parent - 0.148.0 + 0.149.0 diff --git a/java-datalineage/CHANGELOG.md b/java-datalineage/CHANGELOG.md index b82b515d1f62..a27c3837871e 100644 --- a/java-datalineage/CHANGELOG.md +++ b/java-datalineage/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.21.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.20.0 (2023-10-11) ### Dependencies diff --git a/java-datalineage/README.md b/java-datalineage/README.md index d36b2416a7a4..261af451b4a6 100644 --- a/java-datalineage/README.md +++ b/java-datalineage/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-datalineage - 0.20.0 + 0.21.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-datalineage:0.20.0' +implementation 'com.google.cloud:google-cloud-datalineage:0.21.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datalineage" % "0.20.0" +libraryDependencies += "com.google.cloud" % "google-cloud-datalineage" % "0.21.0" ``` diff --git a/java-datalineage/google-cloud-datalineage-bom/pom.xml b/java-datalineage/google-cloud-datalineage-bom/pom.xml index bbbe09b595c1..e91e61d718e6 100644 --- a/java-datalineage/google-cloud-datalineage-bom/pom.xml +++ b/java-datalineage/google-cloud-datalineage-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-datalineage-bom - 0.20.0 + 0.21.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-datalineage - 0.20.0 + 0.21.0 com.google.api.grpc grpc-google-cloud-datalineage-v1 - 0.20.0 + 0.21.0 com.google.api.grpc proto-google-cloud-datalineage-v1 - 0.20.0 + 0.21.0 diff --git a/java-datalineage/google-cloud-datalineage/pom.xml b/java-datalineage/google-cloud-datalineage/pom.xml index c7cbd574bb9f..917abd5cfdfe 100644 --- a/java-datalineage/google-cloud-datalineage/pom.xml +++ b/java-datalineage/google-cloud-datalineage/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-datalineage - 0.20.0 + 0.21.0 jar Google Data Lineage Data Lineage Lineage is used to track data flows between assets over time. com.google.cloud google-cloud-datalineage-parent - 0.20.0 + 0.21.0 google-cloud-datalineage diff --git a/java-datalineage/grpc-google-cloud-datalineage-v1/pom.xml b/java-datalineage/grpc-google-cloud-datalineage-v1/pom.xml index ff4624fa5f19..ac15ae85f663 100644 --- a/java-datalineage/grpc-google-cloud-datalineage-v1/pom.xml +++ b/java-datalineage/grpc-google-cloud-datalineage-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datalineage-v1 - 0.20.0 + 0.21.0 grpc-google-cloud-datalineage-v1 GRPC library for google-cloud-datalineage com.google.cloud google-cloud-datalineage-parent - 0.20.0 + 0.21.0 diff --git a/java-datalineage/pom.xml b/java-datalineage/pom.xml index 4eac7110ffb6..f2d7fc3bd643 100644 --- a/java-datalineage/pom.xml +++ b/java-datalineage/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-datalineage-parent pom - 0.20.0 + 0.21.0 Google Data Lineage Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-datalineage - 0.20.0 + 0.21.0 com.google.api.grpc grpc-google-cloud-datalineage-v1 - 0.20.0 + 0.21.0 com.google.api.grpc proto-google-cloud-datalineage-v1 - 0.20.0 + 0.21.0 diff --git a/java-datalineage/proto-google-cloud-datalineage-v1/pom.xml b/java-datalineage/proto-google-cloud-datalineage-v1/pom.xml index c1e6794ef6c1..3e695b167de8 100644 --- a/java-datalineage/proto-google-cloud-datalineage-v1/pom.xml +++ b/java-datalineage/proto-google-cloud-datalineage-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datalineage-v1 - 0.20.0 + 0.21.0 proto-google-cloud-datalineage-v1 Proto library for google-cloud-datalineage com.google.cloud google-cloud-datalineage-parent - 0.20.0 + 0.21.0 diff --git a/java-dataplex/CHANGELOG.md b/java-dataplex/CHANGELOG.md index 16d5a63991aa..1610f73deb22 100644 --- a/java-dataplex/CHANGELOG.md +++ b/java-dataplex/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.26.0 (2023-10-11) ### Features diff --git a/java-dataplex/README.md b/java-dataplex/README.md index 179c169318ba..99403412c10a 100644 --- a/java-dataplex/README.md +++ b/java-dataplex/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dataplex - 1.26.0 + 1.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dataplex:1.26.0' +implementation 'com.google.cloud:google-cloud-dataplex:1.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataplex" % "1.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dataplex" % "1.27.0" ``` diff --git a/java-dataplex/google-cloud-dataplex-bom/pom.xml b/java-dataplex/google-cloud-dataplex-bom/pom.xml index b3856493f8f3..14dd7d6d2735 100644 --- a/java-dataplex/google-cloud-dataplex-bom/pom.xml +++ b/java-dataplex/google-cloud-dataplex-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dataplex-bom - 1.26.0 + 1.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-dataplex - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-dataplex-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-dataplex-v1 - 1.26.0 + 1.27.0 diff --git a/java-dataplex/google-cloud-dataplex/pom.xml b/java-dataplex/google-cloud-dataplex/pom.xml index 476fe2ebec45..332db4061b5c 100644 --- a/java-dataplex/google-cloud-dataplex/pom.xml +++ b/java-dataplex/google-cloud-dataplex/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dataplex - 1.26.0 + 1.27.0 jar Google Cloud Dataplex Cloud Dataplex provides intelligent data fabric that enables organizations to centrally manage, monitor, and govern their data across data lakes, data warehouses, and data marts with consistent controls, providing access to trusted data and powering analytics at scale. com.google.cloud google-cloud-dataplex-parent - 1.26.0 + 1.27.0 google-cloud-dataplex diff --git a/java-dataplex/grpc-google-cloud-dataplex-v1/pom.xml b/java-dataplex/grpc-google-cloud-dataplex-v1/pom.xml index ff9d53b967f4..a70d313ace90 100644 --- a/java-dataplex/grpc-google-cloud-dataplex-v1/pom.xml +++ b/java-dataplex/grpc-google-cloud-dataplex-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataplex-v1 - 1.26.0 + 1.27.0 grpc-google-cloud-dataplex-v1 GRPC library for google-cloud-dataplex com.google.cloud google-cloud-dataplex-parent - 1.26.0 + 1.27.0 diff --git a/java-dataplex/pom.xml b/java-dataplex/pom.xml index 6570dc14eda0..1b04fff56072 100644 --- a/java-dataplex/pom.xml +++ b/java-dataplex/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dataplex-parent pom - 1.26.0 + 1.27.0 Google Cloud Dataplex Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-dataplex - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-dataplex-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-dataplex-v1 - 1.26.0 + 1.27.0 diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/pom.xml b/java-dataplex/proto-google-cloud-dataplex-v1/pom.xml index bb1139edd0ee..5de925d68e98 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/pom.xml +++ b/java-dataplex/proto-google-cloud-dataplex-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataplex-v1 - 1.26.0 + 1.27.0 proto-google-cloud-dataplex-v1 Proto library for google-cloud-dataplex com.google.cloud google-cloud-dataplex-parent - 1.26.0 + 1.27.0 diff --git a/java-dataproc-metastore/CHANGELOG.md b/java-dataproc-metastore/CHANGELOG.md index 21a528e82ba3..6d4a86f5d826 100644 --- a/java-dataproc-metastore/CHANGELOG.md +++ b/java-dataproc-metastore/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-dataproc-metastore/README.md b/java-dataproc-metastore/README.md index 74341712c115..ce021a2d445d 100644 --- a/java-dataproc-metastore/README.md +++ b/java-dataproc-metastore/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dataproc-metastore - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dataproc-metastore:2.29.0' +implementation 'com.google.cloud:google-cloud-dataproc-metastore:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataproc-metastore" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dataproc-metastore" % "2.30.0" ``` diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore-bom/pom.xml b/java-dataproc-metastore/google-cloud-dataproc-metastore-bom/pom.xml index a2a58309f267..93dcfca15308 100644 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore-bom/pom.xml +++ b/java-dataproc-metastore/google-cloud-dataproc-metastore-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dataproc-metastore-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,37 +27,37 @@ com.google.cloud google-cloud-dataproc-metastore - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1beta - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1alpha - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1beta - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1alpha - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1 - 2.29.0 + 2.30.0 diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/pom.xml b/java-dataproc-metastore/google-cloud-dataproc-metastore/pom.xml index 6eedda267d70..b2c1c723cd9f 100644 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/pom.xml +++ b/java-dataproc-metastore/google-cloud-dataproc-metastore/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dataproc-metastore - 2.29.0 + 2.30.0 jar Google Dataproc Metastore is a fully managed, highly available, autoscaled, autohealing, OSS-native metastore service that greatly simplifies technical metadata management. Dataproc Metastore service is based on Apache Hive metastore and serves as a critical component towards enterprise data lakes. com.google.cloud google-cloud-dataproc-metastore-parent - 2.29.0 + 2.30.0 google-cloud-dataproc-metastore diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/pom.xml b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/pom.xml index 7070f30d4334..c08cfca7b1d6 100644 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/pom.xml +++ b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-dataproc-metastore-v1 GRPC library for google-cloud-dataproc-metastore com.google.cloud google-cloud-dataproc-metastore-parent - 2.29.0 + 2.30.0 diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/pom.xml b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/pom.xml index c062d213e00b..58c6ff63a9d9 100644 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/pom.xml +++ b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1alpha - 0.33.0 + 0.34.0 grpc-google-cloud-dataproc-metastore-v1alpha GRPC library for google-cloud-dataproc-metastore com.google.cloud google-cloud-dataproc-metastore-parent - 2.29.0 + 2.30.0 diff --git a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/pom.xml b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/pom.xml index e1a4e601e102..f301c8a22b4a 100644 --- a/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/pom.xml +++ b/java-dataproc-metastore/grpc-google-cloud-dataproc-metastore-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1beta - 0.33.0 + 0.34.0 grpc-google-cloud-dataproc-metastore-v1beta GRPC library for google-cloud-dataproc-metastore com.google.cloud google-cloud-dataproc-metastore-parent - 2.29.0 + 2.30.0 diff --git a/java-dataproc-metastore/pom.xml b/java-dataproc-metastore/pom.xml index 75506e67aeda..aaabcb68bcab 100644 --- a/java-dataproc-metastore/pom.xml +++ b/java-dataproc-metastore/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dataproc-metastore-parent pom - 2.29.0 + 2.30.0 Google Dataproc Metastore Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.cloud google-cloud-dataproc-metastore - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1beta - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1alpha - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-dataproc-metastore-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1beta - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1alpha - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1 - 2.29.0 + 2.30.0 diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/pom.xml b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/pom.xml index a89328ac774a..019666fa7c54 100644 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/pom.xml +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1 - 2.29.0 + 2.30.0 proto-google-cloud-dataproc-metastore-v1 Proto library for google-cloud-dataproc-metastore com.google.cloud google-cloud-dataproc-metastore-parent - 2.29.0 + 2.30.0 diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/pom.xml b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/pom.xml index 79699037a3ac..1f9f7bb387fb 100644 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/pom.xml +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1alpha - 0.33.0 + 0.34.0 proto-google-cloud-dataproc-metastore-v1alpha Proto library for google-cloud-dataproc-metastore com.google.cloud google-cloud-dataproc-metastore-parent - 2.29.0 + 2.30.0 diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/pom.xml b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/pom.xml index fc695ca9b55e..a81f2f259475 100644 --- a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/pom.xml +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataproc-metastore-v1beta - 0.33.0 + 0.34.0 proto-google-cloud-dataproc-metastore-v1beta Proto library for google-cloud-dataproc-metastore com.google.cloud google-cloud-dataproc-metastore-parent - 2.29.0 + 2.30.0 diff --git a/java-dataproc/CHANGELOG.md b/java-dataproc/CHANGELOG.md index cbaa9dddd885..7dd83db24001 100644 --- a/java-dataproc/CHANGELOG.md +++ b/java-dataproc/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.26.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 4.25.0 (2023-10-11) ### Dependencies diff --git a/java-dataproc/README.md b/java-dataproc/README.md index 15d5783ed640..69d0808a33f3 100644 --- a/java-dataproc/README.md +++ b/java-dataproc/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dataproc - 4.25.0 + 4.26.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dataproc:4.25.0' +implementation 'com.google.cloud:google-cloud-dataproc:4.26.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "4.25.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "4.26.0" ``` diff --git a/java-dataproc/google-cloud-dataproc-bom/pom.xml b/java-dataproc/google-cloud-dataproc-bom/pom.xml index cdd71631b228..e6dc612516dd 100644 --- a/java-dataproc/google-cloud-dataproc-bom/pom.xml +++ b/java-dataproc/google-cloud-dataproc-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dataproc-bom - 4.25.0 + 4.26.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-dataproc - 4.25.0 + 4.26.0 com.google.api.grpc grpc-google-cloud-dataproc-v1 - 4.25.0 + 4.26.0 com.google.api.grpc proto-google-cloud-dataproc-v1 - 4.25.0 + 4.26.0 diff --git a/java-dataproc/google-cloud-dataproc/pom.xml b/java-dataproc/google-cloud-dataproc/pom.xml index 2f095b0e02f3..d177f459c340 100644 --- a/java-dataproc/google-cloud-dataproc/pom.xml +++ b/java-dataproc/google-cloud-dataproc/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dataproc - 4.25.0 + 4.26.0 jar Google Cloud Dataproc Java idiomatic client for Google Cloud Dataproc com.google.cloud google-cloud-dataproc-parent - 4.25.0 + 4.26.0 google-cloud-dataproc diff --git a/java-dataproc/grpc-google-cloud-dataproc-v1/pom.xml b/java-dataproc/grpc-google-cloud-dataproc-v1/pom.xml index 836039f321ce..e2063151d6bd 100644 --- a/java-dataproc/grpc-google-cloud-dataproc-v1/pom.xml +++ b/java-dataproc/grpc-google-cloud-dataproc-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dataproc-v1 - 4.25.0 + 4.26.0 grpc-google-cloud-dataproc-v1 GRPC library for grpc-google-cloud-dataproc-v1 com.google.cloud google-cloud-dataproc-parent - 4.25.0 + 4.26.0 diff --git a/java-dataproc/pom.xml b/java-dataproc/pom.xml index 8ca82b34aeac..4334c130ec4e 100644 --- a/java-dataproc/pom.xml +++ b/java-dataproc/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dataproc-parent pom - 4.25.0 + 4.26.0 Google Cloud Dataproc Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-dataproc-v1 - 4.25.0 + 4.26.0 com.google.api.grpc grpc-google-cloud-dataproc-v1 - 4.25.0 + 4.26.0 com.google.cloud google-cloud-dataproc - 4.25.0 + 4.26.0 diff --git a/java-dataproc/proto-google-cloud-dataproc-v1/pom.xml b/java-dataproc/proto-google-cloud-dataproc-v1/pom.xml index a25a3f4382be..a55efd71dd9f 100644 --- a/java-dataproc/proto-google-cloud-dataproc-v1/pom.xml +++ b/java-dataproc/proto-google-cloud-dataproc-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dataproc-v1 - 4.25.0 + 4.26.0 proto-google-cloud-dataproc-v1 PROTO library for proto-google-cloud-dataproc-v1 com.google.cloud google-cloud-dataproc-parent - 4.25.0 + 4.26.0 diff --git a/java-datastream/CHANGELOG.md b/java-datastream/CHANGELOG.md index 5edab994fc65..c789c8552887 100644 --- a/java-datastream/CHANGELOG.md +++ b/java-datastream/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.27.0 (2023-10-11) ### Dependencies diff --git a/java-datastream/README.md b/java-datastream/README.md index a5aa0f67ebe5..f2fd7a1d5266 100644 --- a/java-datastream/README.md +++ b/java-datastream/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-datastream - 1.27.0 + 1.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-datastream:1.27.0' +implementation 'com.google.cloud:google-cloud-datastream:1.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-datastream" % "1.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-datastream" % "1.28.0" ``` diff --git a/java-datastream/google-cloud-datastream-bom/pom.xml b/java-datastream/google-cloud-datastream-bom/pom.xml index f9129689c5a4..f0362c762550 100644 --- a/java-datastream/google-cloud-datastream-bom/pom.xml +++ b/java-datastream/google-cloud-datastream-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-datastream-bom - 1.27.0 + 1.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-datastream - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-datastream-v1alpha1 - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-datastream-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-datastream-v1alpha1 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-datastream-v1 - 1.27.0 + 1.28.0 diff --git a/java-datastream/google-cloud-datastream/pom.xml b/java-datastream/google-cloud-datastream/pom.xml index f110bdaf01dd..48764fabd029 100644 --- a/java-datastream/google-cloud-datastream/pom.xml +++ b/java-datastream/google-cloud-datastream/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-datastream - 1.27.0 + 1.28.0 jar Google Datastream Datastream is a serverless and easy-to-use change data capture (CDC) and replication service. It allows you to synchronize data across heterogeneous databases and applications reliably, and with minimal latency and downtime. com.google.cloud google-cloud-datastream-parent - 1.27.0 + 1.28.0 google-cloud-datastream diff --git a/java-datastream/grpc-google-cloud-datastream-v1/pom.xml b/java-datastream/grpc-google-cloud-datastream-v1/pom.xml index bed5afd8984e..b3845cc14c76 100644 --- a/java-datastream/grpc-google-cloud-datastream-v1/pom.xml +++ b/java-datastream/grpc-google-cloud-datastream-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datastream-v1 - 1.27.0 + 1.28.0 grpc-google-cloud-datastream-v1 GRPC library for google-cloud-datastream com.google.cloud google-cloud-datastream-parent - 1.27.0 + 1.28.0 diff --git a/java-datastream/grpc-google-cloud-datastream-v1alpha1/pom.xml b/java-datastream/grpc-google-cloud-datastream-v1alpha1/pom.xml index 0d62ecffbc18..31ffd2e36a43 100644 --- a/java-datastream/grpc-google-cloud-datastream-v1alpha1/pom.xml +++ b/java-datastream/grpc-google-cloud-datastream-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-datastream-v1alpha1 - 0.32.0 + 0.33.0 grpc-google-cloud-datastream-v1alpha1 GRPC library for google-cloud-datastream com.google.cloud google-cloud-datastream-parent - 1.27.0 + 1.28.0 diff --git a/java-datastream/pom.xml b/java-datastream/pom.xml index b9bf7a5e19ad..525484b8aaf2 100644 --- a/java-datastream/pom.xml +++ b/java-datastream/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-datastream-parent pom - 1.27.0 + 1.28.0 Google Datastream Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-datastream - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-datastream-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-datastream-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-datastream-v1alpha1 - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-datastream-v1alpha1 - 0.32.0 + 0.33.0 diff --git a/java-datastream/proto-google-cloud-datastream-v1/pom.xml b/java-datastream/proto-google-cloud-datastream-v1/pom.xml index 89ad5516823d..3e4d8508cef0 100644 --- a/java-datastream/proto-google-cloud-datastream-v1/pom.xml +++ b/java-datastream/proto-google-cloud-datastream-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datastream-v1 - 1.27.0 + 1.28.0 proto-google-cloud-datastream-v1 Proto library for google-cloud-datastream com.google.cloud google-cloud-datastream-parent - 1.27.0 + 1.28.0 diff --git a/java-datastream/proto-google-cloud-datastream-v1alpha1/pom.xml b/java-datastream/proto-google-cloud-datastream-v1alpha1/pom.xml index bcb090044c6b..8fd81cc0aa95 100644 --- a/java-datastream/proto-google-cloud-datastream-v1alpha1/pom.xml +++ b/java-datastream/proto-google-cloud-datastream-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-datastream-v1alpha1 - 0.32.0 + 0.33.0 proto-google-cloud-datastream-v1alpha1 Proto library for google-cloud-datastream com.google.cloud google-cloud-datastream-parent - 1.27.0 + 1.28.0 diff --git a/java-debugger-client/CHANGELOG.md b/java-debugger-client/CHANGELOG.md index 0e854523c3d9..b98a7761ac86 100644 --- a/java-debugger-client/CHANGELOG.md +++ b/java-debugger-client/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-debugger-client/README.md b/java-debugger-client/README.md index b646a38a7577..ed6f11d4f600 100644 --- a/java-debugger-client/README.md +++ b/java-debugger-client/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-debugger-client - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-debugger-client:1.28.0' +implementation 'com.google.cloud:google-cloud-debugger-client:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-debugger-client" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-debugger-client" % "1.29.0" ``` diff --git a/java-debugger-client/google-cloud-debugger-client-bom/pom.xml b/java-debugger-client/google-cloud-debugger-client-bom/pom.xml index 6b456957dd19..bb728aff6215 100644 --- a/java-debugger-client/google-cloud-debugger-client-bom/pom.xml +++ b/java-debugger-client/google-cloud-debugger-client-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-debugger-client-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,22 +27,22 @@ com.google.cloud google-cloud-debugger-client - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-debugger-client-v2 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-debugger-client-v2 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-devtools-source-protos - 1.28.0 + 1.29.0 diff --git a/java-debugger-client/google-cloud-debugger-client/pom.xml b/java-debugger-client/google-cloud-debugger-client/pom.xml index 9d4fb6e6db50..8fa09259c3f7 100644 --- a/java-debugger-client/google-cloud-debugger-client/pom.xml +++ b/java-debugger-client/google-cloud-debugger-client/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-debugger-client - 1.28.0 + 1.29.0 jar Google Cloud Debugger Cloud Debugger is a feature of Google Cloud Platform that lets you inspect the state of an application, at any code location, without stopping or slowing down the running app. Cloud Debugger makes it easier to view the application state without adding logging statements. com.google.cloud google-cloud-debugger-client-parent - 1.28.0 + 1.29.0 google-cloud-debugger-client diff --git a/java-debugger-client/grpc-google-cloud-debugger-client-v2/pom.xml b/java-debugger-client/grpc-google-cloud-debugger-client-v2/pom.xml index 98d5683f09d0..5c50a0e74e76 100644 --- a/java-debugger-client/grpc-google-cloud-debugger-client-v2/pom.xml +++ b/java-debugger-client/grpc-google-cloud-debugger-client-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-debugger-client-v2 - 1.28.0 + 1.29.0 grpc-google-cloud-debugger-client-v2 GRPC library for google-cloud-debugger-client com.google.cloud google-cloud-debugger-client-parent - 1.28.0 + 1.29.0 diff --git a/java-debugger-client/pom.xml b/java-debugger-client/pom.xml index 8c6289adb62f..21da563e67c8 100644 --- a/java-debugger-client/pom.xml +++ b/java-debugger-client/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-debugger-client-parent pom - 1.28.0 + 1.29.0 Google Cloud Debugger Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,22 +29,22 @@ com.google.cloud google-cloud-debugger-client - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-debugger-client-v2 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-debugger-client-v2 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-devtools-source-protos - 1.28.0 + 1.29.0 diff --git a/java-debugger-client/proto-google-cloud-debugger-client-v2/pom.xml b/java-debugger-client/proto-google-cloud-debugger-client-v2/pom.xml index a8f472e6cdee..759f4e3e0d7d 100644 --- a/java-debugger-client/proto-google-cloud-debugger-client-v2/pom.xml +++ b/java-debugger-client/proto-google-cloud-debugger-client-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-debugger-client-v2 - 1.28.0 + 1.29.0 proto-google-cloud-debugger-client-v2 Proto library for google-cloud-debugger-client com.google.cloud google-cloud-debugger-client-parent - 1.28.0 + 1.29.0 diff --git a/java-debugger-client/proto-google-devtools-source-protos/pom.xml b/java-debugger-client/proto-google-devtools-source-protos/pom.xml index 6f23e8c6c12a..749146a70258 100644 --- a/java-debugger-client/proto-google-devtools-source-protos/pom.xml +++ b/java-debugger-client/proto-google-devtools-source-protos/pom.xml @@ -5,12 +5,12 @@ 4.0.0 com.google.api.grpc proto-google-devtools-source-protos - 1.28.0 + 1.29.0 proto-google-devtools-source-protos com.google.cloud google-cloud-debugger-client-parent - 1.28.0 + 1.29.0 diff --git a/java-deploy/CHANGELOG.md b/java-deploy/CHANGELOG.md index 523981ffacda..df5cd441cd64 100644 --- a/java-deploy/CHANGELOG.md +++ b/java-deploy/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 1.27.0 (2023-10-25) + +### Features + +* added platform log RolloutUpdateEvent ([#9979](https://github.com/googleapis/google-cloud-java/issues/9979)) ([ebdc309](https://github.com/googleapis/google-cloud-java/commit/ebdc30925e4bf247ede4f393fb268eaa8706eac0)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.26.0 (2023-10-11) ### Dependencies diff --git a/java-deploy/README.md b/java-deploy/README.md index 84b4c057836e..6a344b8746c6 100644 --- a/java-deploy/README.md +++ b/java-deploy/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-deploy - 1.26.0 + 1.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-deploy:1.26.0' +implementation 'com.google.cloud:google-cloud-deploy:1.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-deploy" % "1.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-deploy" % "1.27.0" ``` @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-deploy.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-deploy/1.22.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-deploy/1.26.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-deploy/google-cloud-deploy-bom/pom.xml b/java-deploy/google-cloud-deploy-bom/pom.xml index fc97ff3e9178..aa52ee7dd669 100644 --- a/java-deploy/google-cloud-deploy-bom/pom.xml +++ b/java-deploy/google-cloud-deploy-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-deploy-bom - 1.26.0 + 1.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-deploy - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-deploy-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-deploy-v1 - 1.26.0 + 1.27.0 diff --git a/java-deploy/google-cloud-deploy/pom.xml b/java-deploy/google-cloud-deploy/pom.xml index f608c5a67fec..708ad1dadc39 100644 --- a/java-deploy/google-cloud-deploy/pom.xml +++ b/java-deploy/google-cloud-deploy/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-deploy - 1.26.0 + 1.27.0 jar Google Google CLoud Deploy Google CLoud Deploy is a service that automates delivery of your applications to a series of target environments in a defined sequence com.google.cloud google-cloud-deploy-parent - 1.26.0 + 1.27.0 google-cloud-deploy diff --git a/java-deploy/grpc-google-cloud-deploy-v1/pom.xml b/java-deploy/grpc-google-cloud-deploy-v1/pom.xml index 4260fba3c899..9ede4163516b 100644 --- a/java-deploy/grpc-google-cloud-deploy-v1/pom.xml +++ b/java-deploy/grpc-google-cloud-deploy-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-deploy-v1 - 1.26.0 + 1.27.0 grpc-google-cloud-deploy-v1 GRPC library for google-cloud-deploy com.google.cloud google-cloud-deploy-parent - 1.26.0 + 1.27.0 diff --git a/java-deploy/pom.xml b/java-deploy/pom.xml index b7de43b51765..1ccb5281a3a2 100644 --- a/java-deploy/pom.xml +++ b/java-deploy/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-deploy-parent pom - 1.26.0 + 1.27.0 Google Google CLoud Deploy Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-deploy - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-deploy-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-deploy-v1 - 1.26.0 + 1.27.0 diff --git a/java-deploy/proto-google-cloud-deploy-v1/pom.xml b/java-deploy/proto-google-cloud-deploy-v1/pom.xml index 654b837e3599..34bff1af0433 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/pom.xml +++ b/java-deploy/proto-google-cloud-deploy-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-deploy-v1 - 1.26.0 + 1.27.0 proto-google-cloud-deploy-v1 Proto library for google-cloud-deploy com.google.cloud google-cloud-deploy-parent - 1.26.0 + 1.27.0 diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/LogEnumsProto.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/LogEnumsProto.java index 5e4bc3a171d0..18404d2bc194 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/LogEnumsProto.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/LogEnumsProto.java @@ -36,15 +36,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n&google/cloud/deploy/v1/log_enums.proto" - + "\022\026google.cloud.deploy.v1*\332\001\n\004Type\022\024\n\020TYP" + + "\022\026google.cloud.deploy.v1*\363\001\n\004Type\022\024\n\020TYP" + "E_UNSPECIFIED\020\000\022$\n TYPE_PUBSUB_NOTIFICAT" + "ION_FAILURE\020\001\022\036\n\032TYPE_RESOURCE_STATE_CHA" + "NGE\020\003\022\030\n\024TYPE_PROCESS_ABORTED\020\004\022\035\n\031TYPE_" + "RESTRICTION_VIOLATED\020\005\022\031\n\025TYPE_RESOURCE_" - + "DELETED\020\006\022\"\n\032TYPE_RENDER_STATUES_CHANGE\020" - + "\002\032\002\010\001Ba\n\032com.google.cloud.deploy.v1B\rLog" - + "EnumsProtoP\001Z2cloud.google.com/go/deploy" - + "/apiv1/deploypb;deploypbb\006proto3" + + "DELETED\020\006\022\027\n\023TYPE_ROLLOUT_UPDATE\020\007\022\"\n\032TY" + + "PE_RENDER_STATUES_CHANGE\020\002\032\002\010\001Ba\n\032com.go" + + "ogle.cloud.deploy.v1B\rLogEnumsProtoP\001Z2c" + + "loud.google.com/go/deploy/apiv1/deploypb" + + ";deploypbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Type.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Type.java index 74415b3bd17b..d7372ffc43e1 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Type.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Type.java @@ -88,6 +88,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * TYPE_RESOURCE_DELETED = 6; */ TYPE_RESOURCE_DELETED(6), + /** + * + * + *
+   * Rollout updated.
+   * 
+ * + * TYPE_ROLLOUT_UPDATE = 7; + */ + TYPE_ROLLOUT_UPDATE(7), /** * * @@ -162,6 +172,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * TYPE_RESOURCE_DELETED = 6; */ public static final int TYPE_RESOURCE_DELETED_VALUE = 6; + /** + * + * + *
+   * Rollout updated.
+   * 
+ * + * TYPE_ROLLOUT_UPDATE = 7; + */ + public static final int TYPE_ROLLOUT_UPDATE_VALUE = 7; /** * * @@ -209,6 +229,8 @@ public static Type forNumber(int value) { return TYPE_RESTRICTION_VIOLATED; case 6: return TYPE_RESOURCE_DELETED; + case 7: + return TYPE_ROLLOUT_UPDATE; case 2: return TYPE_RENDER_STATUES_CHANGE; default: diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/log_enums.proto b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/log_enums.proto index 9c09cb286e3e..ab9dcb20913f 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/log_enums.proto +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/log_enums.proto @@ -41,6 +41,9 @@ enum Type { // Resource deleted. TYPE_RESOURCE_DELETED = 6; + // Rollout updated. + TYPE_ROLLOUT_UPDATE = 7; + // Deprecated: This field is never used. Use release_render log type instead. TYPE_RENDER_STATUES_CHANGE = 2 [deprecated = true]; } diff --git a/java-dialogflow-cx/CHANGELOG.md b/java-dialogflow-cx/CHANGELOG.md index 5b177a93275a..a2ed80ba8acb 100644 --- a/java-dialogflow-cx/CHANGELOG.md +++ b/java-dialogflow-cx/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.40.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.39.0 (2023-10-11) ### Dependencies diff --git a/java-dialogflow-cx/README.md b/java-dialogflow-cx/README.md index cdb90dfb8f21..465c283ca46b 100644 --- a/java-dialogflow-cx/README.md +++ b/java-dialogflow-cx/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dialogflow-cx - 0.39.0 + 0.40.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.39.0' +implementation 'com.google.cloud:google-cloud-dialogflow-cx:0.40.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.39.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow-cx" % "0.40.0" ``` diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx-bom/pom.xml b/java-dialogflow-cx/google-cloud-dialogflow-cx-bom/pom.xml index 64cc15f7e968..8308bf015dd8 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx-bom/pom.xml +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dialogflow-cx-bom - 0.39.0 + 0.40.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-dialogflow-cx - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-cloud-dialogflow-cx-v3beta1 - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-cloud-dialogflow-cx-v3 - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-cloud-dialogflow-cx-v3beta1 - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-cloud-dialogflow-cx-v3 - 0.39.0 + 0.40.0
diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/pom.xml b/java-dialogflow-cx/google-cloud-dialogflow-cx/pom.xml index 638dc600e928..280933f8d24d 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/pom.xml +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dialogflow-cx - 0.39.0 + 0.40.0 jar Google Dialogflow CX provides a new way of designing agents, taking a state machine approach to agent design. This gives you clear and explicit control over a conversation, a better end-user experience, and a better development workflow. com.google.cloud google-cloud-dialogflow-cx-parent - 0.39.0 + 0.40.0 google-cloud-dialogflow-cx diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/pom.xml b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/pom.xml index 2913189241f9..3852bad4e155 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/pom.xml +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dialogflow-cx-v3 - 0.39.0 + 0.40.0 grpc-google-cloud-dialogflow-cx-v3 GRPC library for grpc-google-cloud-dialogflow-cx-v3 com.google.cloud google-cloud-dialogflow-cx-parent - 0.39.0 + 0.40.0 diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/pom.xml b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/pom.xml index 3b9dd1be01bb..b2fd8af0c2f0 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/pom.xml +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dialogflow-cx-v3beta1 - 0.39.0 + 0.40.0 grpc-google-cloud-dialogflow-cx-v3beta1 GRPC library for grpc-google-cloud-dialogflow-cx-v3beta1 com.google.cloud google-cloud-dialogflow-cx-parent - 0.39.0 + 0.40.0 diff --git a/java-dialogflow-cx/pom.xml b/java-dialogflow-cx/pom.xml index ac404e2fa984..ac5574e06159 100644 --- a/java-dialogflow-cx/pom.xml +++ b/java-dialogflow-cx/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dialogflow-cx-parent pom - 0.39.0 + 0.40.0 Google Dialogflow CX Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-dialogflow-cx - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-cloud-dialogflow-cx-v3beta1 - 0.39.0 + 0.40.0 com.google.api.grpc proto-google-cloud-dialogflow-cx-v3 - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-cloud-dialogflow-cx-v3beta1 - 0.39.0 + 0.40.0 com.google.api.grpc grpc-google-cloud-dialogflow-cx-v3 - 0.39.0 + 0.40.0 diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/pom.xml b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/pom.xml index c0a56ce9f3dc..e4f9b4d482e6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/pom.xml +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dialogflow-cx-v3 - 0.39.0 + 0.40.0 proto-google-cloud-dialogflow-cx-v3 PROTO library for proto-google-cloud-dialogflow-cx-v3 com.google.cloud google-cloud-dialogflow-cx-parent - 0.39.0 + 0.40.0 diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/pom.xml b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/pom.xml index 047e2ccccb2c..2e62a96f65c1 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/pom.xml +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dialogflow-cx-v3beta1 - 0.39.0 + 0.40.0 proto-google-cloud-dialogflow-cx-v3beta1 PROTO library for proto-google-cloud-dialogflow-cx-v3beta1 com.google.cloud google-cloud-dialogflow-cx-parent - 0.39.0 + 0.40.0 diff --git a/java-dialogflow/CHANGELOG.md b/java-dialogflow/CHANGELOG.md index d8629fdb4031..e76751369102 100644 --- a/java-dialogflow/CHANGELOG.md +++ b/java-dialogflow/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.35.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 4.34.0 (2023-10-11) ### Features diff --git a/java-dialogflow/README.md b/java-dialogflow/README.md index b78c4943c36c..21ca98de5974 100644 --- a/java-dialogflow/README.md +++ b/java-dialogflow/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dialogflow - 4.34.0 + 4.35.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dialogflow:4.34.0' +implementation 'com.google.cloud:google-cloud-dialogflow:4.35.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "4.34.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dialogflow" % "4.35.0" ``` diff --git a/java-dialogflow/google-cloud-dialogflow-bom/pom.xml b/java-dialogflow/google-cloud-dialogflow-bom/pom.xml index ada36e6c4a01..07ef4ae5ac61 100644 --- a/java-dialogflow/google-cloud-dialogflow-bom/pom.xml +++ b/java-dialogflow/google-cloud-dialogflow-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dialogflow-bom - 4.34.0 + 4.35.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-dialogflow - 4.34.0 + 4.35.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2 - 4.34.0 + 4.35.0 com.google.api.grpc proto-google-cloud-dialogflow-v2 - 4.34.0 + 4.35.0 com.google.api.grpc proto-google-cloud-dialogflow-v2beta1 - 0.132.0 + 0.133.0 diff --git a/java-dialogflow/google-cloud-dialogflow/pom.xml b/java-dialogflow/google-cloud-dialogflow/pom.xml index 2acacfe06016..5a66ec77780c 100644 --- a/java-dialogflow/google-cloud-dialogflow/pom.xml +++ b/java-dialogflow/google-cloud-dialogflow/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dialogflow - 4.34.0 + 4.35.0 jar Google Cloud Dialog Flow API Java idiomatic client for Google Cloud Dialog Flow API com.google.cloud google-cloud-dialogflow-parent - 4.34.0 + 4.35.0 google-cloud-dialogflow diff --git a/java-dialogflow/grpc-google-cloud-dialogflow-v2/pom.xml b/java-dialogflow/grpc-google-cloud-dialogflow-v2/pom.xml index 82f9ad9eebd8..01b76d9c2e07 100644 --- a/java-dialogflow/grpc-google-cloud-dialogflow-v2/pom.xml +++ b/java-dialogflow/grpc-google-cloud-dialogflow-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2 - 4.34.0 + 4.35.0 grpc-google-cloud-dialogflow-v2 GRPC library for grpc-google-cloud-dialogflow-v2 com.google.cloud google-cloud-dialogflow-parent - 4.34.0 + 4.35.0 diff --git a/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/pom.xml b/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/pom.xml index 48a5f975a645..b6b827d3844f 100644 --- a/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/pom.xml +++ b/java-dialogflow/grpc-google-cloud-dialogflow-v2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2beta1 - 0.132.0 + 0.133.0 grpc-google-cloud-dialogflow-v2beta1 GRPC library for grpc-google-cloud-dialogflow-v2beta1 com.google.cloud google-cloud-dialogflow-parent - 4.34.0 + 4.35.0 diff --git a/java-dialogflow/pom.xml b/java-dialogflow/pom.xml index f8ec6b44adcf..c12af3a00a82 100644 --- a/java-dialogflow/pom.xml +++ b/java-dialogflow/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dialogflow-parent pom - 4.34.0 + 4.35.0 Google Cloud Dialog Flow API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-dialogflow-v2 - 4.34.0 + 4.35.0 com.google.api.grpc proto-google-cloud-dialogflow-v2beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2beta1 - 0.132.0 + 0.133.0 com.google.api.grpc grpc-google-cloud-dialogflow-v2 - 4.34.0 + 4.35.0 com.google.cloud google-cloud-dialogflow - 4.34.0 + 4.35.0 diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2/pom.xml b/java-dialogflow/proto-google-cloud-dialogflow-v2/pom.xml index 8a4ca6affc45..dd79fc0cd5aa 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2/pom.xml +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dialogflow-v2 - 4.34.0 + 4.35.0 proto-google-cloud-dialogflow-v2 PROTO library for proto-google-cloud-dialogflow-v2 com.google.cloud google-cloud-dialogflow-parent - 4.34.0 + 4.35.0 diff --git a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/pom.xml b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/pom.xml index 5ff4a43740e7..7adc6a4a340c 100644 --- a/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/pom.xml +++ b/java-dialogflow/proto-google-cloud-dialogflow-v2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dialogflow-v2beta1 - 0.132.0 + 0.133.0 proto-google-cloud-dialogflow-v2beta1 PROTO library for proto-google-cloud-dialogflow-v2beta1 com.google.cloud google-cloud-dialogflow-parent - 4.34.0 + 4.35.0 diff --git a/java-discoveryengine/CHANGELOG.md b/java-discoveryengine/CHANGELOG.md index c88f7caae38f..345cd45effbb 100644 --- a/java-discoveryengine/CHANGELOG.md +++ b/java-discoveryengine/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 0.25.0 (2023-10-25) + +### Features + +* add v1alpha public library for discoveryengine ([#9953](https://github.com/googleapis/google-cloud-java/issues/9953)) ([f4b2dda](https://github.com/googleapis/google-cloud-java/commit/f4b2dda909a384ffcbe55b1498fe4e0259d09bcf)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.24.0 (2023-10-11) ### Dependencies diff --git a/java-discoveryengine/README.md b/java-discoveryengine/README.md index 6691cf190fae..3469f80e8bb1 100644 --- a/java-discoveryengine/README.md +++ b/java-discoveryengine/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-discoveryengine - 0.24.0 + 0.25.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-discoveryengine:0.24.0' +implementation 'com.google.cloud:google-cloud-discoveryengine:0.25.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-discoveryengine" % "0.24.0" +libraryDependencies += "com.google.cloud" % "google-cloud-discoveryengine" % "0.25.0" ``` @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-discoveryengine.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-discoveryengine/0.20.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-discoveryengine/0.24.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-discoveryengine/google-cloud-discoveryengine-bom/pom.xml b/java-discoveryengine/google-cloud-discoveryengine-bom/pom.xml index 17a0ce7b7dfe..db27106a8712 100644 --- a/java-discoveryengine/google-cloud-discoveryengine-bom/pom.xml +++ b/java-discoveryengine/google-cloud-discoveryengine-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-discoveryengine-bom - 0.24.0 + 0.25.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,37 @@ com.google.cloud google-cloud-discoveryengine - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-discoveryengine-v1beta - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-discoveryengine-v1 - 0.24.0 + 0.25.0 + + + com.google.api.grpc + grpc-google-cloud-discoveryengine-v1alpha + 0.25.0 com.google.api.grpc proto-google-cloud-discoveryengine-v1beta - 0.24.0 + 0.25.0 com.google.api.grpc proto-google-cloud-discoveryengine-v1 - 0.24.0 + 0.25.0 + + + com.google.api.grpc + proto-google-cloud-discoveryengine-v1alpha + 0.25.0 diff --git a/java-discoveryengine/google-cloud-discoveryengine/pom.xml b/java-discoveryengine/google-cloud-discoveryengine/pom.xml index d3245eb95679..4236b17d0389 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/pom.xml +++ b/java-discoveryengine/google-cloud-discoveryengine/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-discoveryengine - 0.24.0 + 0.25.0 jar Google Discovery Engine API Discovery Engine API A Cloud API that offers search and recommendation discoverability for documents from different industry verticals (e.g. media, retail, etc.). com.google.cloud google-cloud-discoveryengine-parent - 0.24.0 + 0.25.0 google-cloud-discoveryengine @@ -41,6 +41,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-discoveryengine-v1alpha + com.google.api.grpc proto-google-cloud-discoveryengine-v1 @@ -69,6 +73,11 @@ com.google.api.grpc grpc-google-common-protos + + com.google.api.grpc + grpc-google-cloud-discoveryengine-v1alpha + test + com.google.api.grpc grpc-google-cloud-discoveryengine-v1 diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClient.java new file mode 100644 index 000000000000..0c20f2a232ab --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClient.java @@ -0,0 +1,281 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.CompletionServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.CompletionServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for Auto-Completion. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
+ *   CompleteQueryRequest request =
+ *       CompleteQueryRequest.newBuilder()
+ *           .setDataStore(
+ *               DataStoreName.ofProjectLocationDataStoreName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ *                   .toString())
+ *           .setQuery("query107944136")
+ *           .setQueryModel("queryModel-184930495")
+ *           .setUserPseudoId("userPseudoId-1155274652")
+ *           .setIncludeTailSuggestions(true)
+ *           .build();
+ *   CompleteQueryResponse response = completionServiceClient.completeQuery(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the CompletionServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of CompletionServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CompletionServiceSettings completionServiceSettings =
+ *     CompletionServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CompletionServiceClient completionServiceClient =
+ *     CompletionServiceClient.create(completionServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CompletionServiceSettings completionServiceSettings =
+ *     CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CompletionServiceClient completionServiceClient =
+ *     CompletionServiceClient.create(completionServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CompletionServiceSettings completionServiceSettings =
+ *     CompletionServiceSettings.newHttpJsonBuilder().build();
+ * CompletionServiceClient completionServiceClient =
+ *     CompletionServiceClient.create(completionServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class CompletionServiceClient implements BackgroundResource { + private final CompletionServiceSettings settings; + private final CompletionServiceStub stub; + + /** Constructs an instance of CompletionServiceClient with default settings. */ + public static final CompletionServiceClient create() throws IOException { + return create(CompletionServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CompletionServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final CompletionServiceClient create(CompletionServiceSettings settings) + throws IOException { + return new CompletionServiceClient(settings); + } + + /** + * Constructs an instance of CompletionServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(CompletionServiceSettings). + */ + public static final CompletionServiceClient create(CompletionServiceStub stub) { + return new CompletionServiceClient(stub); + } + + /** + * Constructs an instance of CompletionServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected CompletionServiceClient(CompletionServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CompletionServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected CompletionServiceClient(CompletionServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final CompletionServiceSettings getSettings() { + return settings; + } + + public CompletionServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Completes the specified user input with keyword suggestions. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
+   *   CompleteQueryRequest request =
+   *       CompleteQueryRequest.newBuilder()
+   *           .setDataStore(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setQuery("query107944136")
+   *           .setQueryModel("queryModel-184930495")
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .setIncludeTailSuggestions(true)
+   *           .build();
+   *   CompleteQueryResponse response = completionServiceClient.completeQuery(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) { + return completeQueryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Completes the specified user input with keyword suggestions. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
+   *   CompleteQueryRequest request =
+   *       CompleteQueryRequest.newBuilder()
+   *           .setDataStore(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setQuery("query107944136")
+   *           .setQueryModel("queryModel-184930495")
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .setIncludeTailSuggestions(true)
+   *           .build();
+   *   ApiFuture future =
+   *       completionServiceClient.completeQueryCallable().futureCall(request);
+   *   // Do something.
+   *   CompleteQueryResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable completeQueryCallable() { + return stub.completeQueryCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceSettings.java new file mode 100644 index 000000000000..114edc76e496 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceSettings.java @@ -0,0 +1,208 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.CompletionServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CompletionServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of completeQuery to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CompletionServiceSettings.Builder completionServiceSettingsBuilder =
+ *     CompletionServiceSettings.newBuilder();
+ * completionServiceSettingsBuilder
+ *     .completeQuerySettings()
+ *     .setRetrySettings(
+ *         completionServiceSettingsBuilder
+ *             .completeQuerySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class CompletionServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to completeQuery. */ + public UnaryCallSettings completeQuerySettings() { + return ((CompletionServiceStubSettings) getStubSettings()).completeQuerySettings(); + } + + public static final CompletionServiceSettings create(CompletionServiceStubSettings stub) + throws IOException { + return new CompletionServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CompletionServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CompletionServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CompletionServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CompletionServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CompletionServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return CompletionServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CompletionServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CompletionServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CompletionServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CompletionServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CompletionServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(CompletionServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CompletionServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CompletionServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(CompletionServiceStubSettings.newHttpJsonBuilder()); + } + + public CompletionServiceStubSettings.Builder getStubSettingsBuilder() { + return ((CompletionServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to completeQuery. */ + public UnaryCallSettings.Builder + completeQuerySettings() { + return getStubSettingsBuilder().completeQuerySettings(); + } + + @Override + public CompletionServiceSettings build() throws IOException { + return new CompletionServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClient.java new file mode 100644 index 000000000000..275691b6c8e6 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClient.java @@ -0,0 +1,1193 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.ConversationalSearchServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.ConversationalSearchServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for conversational search. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ *     ConversationalSearchServiceClient.create()) {
+ *   ConversationName name =
+ *       ConversationName.ofProjectLocationDataStoreConversationName(
+ *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+ *   TextInput query = TextInput.newBuilder().build();
+ *   ConverseConversationResponse response =
+ *       conversationalSearchServiceClient.converseConversation(name, query);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ConversationalSearchServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * ConversationalSearchServiceSettings to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ *     ConversationalSearchServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ConversationalSearchServiceClient conversationalSearchServiceClient =
+ *     ConversationalSearchServiceClient.create(conversationalSearchServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ *     ConversationalSearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ConversationalSearchServiceClient conversationalSearchServiceClient =
+ *     ConversationalSearchServiceClient.create(conversationalSearchServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ *     ConversationalSearchServiceSettings.newHttpJsonBuilder().build();
+ * ConversationalSearchServiceClient conversationalSearchServiceClient =
+ *     ConversationalSearchServiceClient.create(conversationalSearchServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ConversationalSearchServiceClient implements BackgroundResource { + private final ConversationalSearchServiceSettings settings; + private final ConversationalSearchServiceStub stub; + + /** Constructs an instance of ConversationalSearchServiceClient with default settings. */ + public static final ConversationalSearchServiceClient create() throws IOException { + return create(ConversationalSearchServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ConversationalSearchServiceClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final ConversationalSearchServiceClient create( + ConversationalSearchServiceSettings settings) throws IOException { + return new ConversationalSearchServiceClient(settings); + } + + /** + * Constructs an instance of ConversationalSearchServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(ConversationalSearchServiceSettings). + */ + public static final ConversationalSearchServiceClient create( + ConversationalSearchServiceStub stub) { + return new ConversationalSearchServiceClient(stub); + } + + /** + * Constructs an instance of ConversationalSearchServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected ConversationalSearchServiceClient(ConversationalSearchServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((ConversationalSearchServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected ConversationalSearchServiceClient(ConversationalSearchServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ConversationalSearchServiceSettings getSettings() { + return settings; + } + + public ConversationalSearchServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Converses a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ConversationName name =
+   *       ConversationName.ofProjectLocationDataStoreConversationName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+   *   TextInput query = TextInput.newBuilder().build();
+   *   ConverseConversationResponse response =
+   *       conversationalSearchServiceClient.converseConversation(name, query);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + * Use + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + * to activate auto session mode, which automatically creates a new conversation inside a + * ConverseConversation session. + * @param query Required. Current user input. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConverseConversationResponse converseConversation( + ConversationName name, TextInput query) { + ConverseConversationRequest request = + ConverseConversationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setQuery(query) + .build(); + return converseConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Converses a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   String name =
+   *       ConversationName.ofProjectLocationDataStoreConversationName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *           .toString();
+   *   TextInput query = TextInput.newBuilder().build();
+   *   ConverseConversationResponse response =
+   *       conversationalSearchServiceClient.converseConversation(name, query);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + * Use + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + * to activate auto session mode, which automatically creates a new conversation inside a + * ConverseConversation session. + * @param query Required. Current user input. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConverseConversationResponse converseConversation(String name, TextInput query) { + ConverseConversationRequest request = + ConverseConversationRequest.newBuilder().setName(name).setQuery(query).build(); + return converseConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Converses a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ConverseConversationRequest request =
+   *       ConverseConversationRequest.newBuilder()
+   *           .setName(
+   *               ConversationName.ofProjectLocationDataStoreConversationName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setQuery(TextInput.newBuilder().build())
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .setSafeSearch(true)
+   *           .putAllUserLabels(new HashMap())
+   *           .setSummarySpec(SearchRequest.ContentSearchSpec.SummarySpec.newBuilder().build())
+   *           .build();
+   *   ConverseConversationResponse response =
+   *       conversationalSearchServiceClient.converseConversation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ConverseConversationResponse converseConversation( + ConverseConversationRequest request) { + return converseConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Converses a conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ConverseConversationRequest request =
+   *       ConverseConversationRequest.newBuilder()
+   *           .setName(
+   *               ConversationName.ofProjectLocationDataStoreConversationName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setQuery(TextInput.newBuilder().build())
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .setSafeSearch(true)
+   *           .putAllUserLabels(new HashMap())
+   *           .setSummarySpec(SearchRequest.ContentSearchSpec.SummarySpec.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       conversationalSearchServiceClient.converseConversationCallable().futureCall(request);
+   *   // Do something.
+   *   ConverseConversationResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + converseConversationCallable() { + return stub.converseConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already + * exists, an ALREADY_EXISTS error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   DataStoreName parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+   *   Conversation conversation = Conversation.newBuilder().build();
+   *   Conversation response =
+   *       conversationalSearchServiceClient.createConversation(parent, conversation);
+   * }
+   * }
+ * + * @param parent Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @param conversation Required. The conversation to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation createConversation(DataStoreName parent, Conversation conversation) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConversation(conversation) + .build(); + return createConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already + * exists, an ALREADY_EXISTS error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   String parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *           .toString();
+   *   Conversation conversation = Conversation.newBuilder().build();
+   *   Conversation response =
+   *       conversationalSearchServiceClient.createConversation(parent, conversation);
+   * }
+   * }
+ * + * @param parent Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @param conversation Required. The conversation to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation createConversation(String parent, Conversation conversation) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent(parent) + .setConversation(conversation) + .build(); + return createConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already + * exists, an ALREADY_EXISTS error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   CreateConversationRequest request =
+   *       CreateConversationRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .build();
+   *   Conversation response = conversationalSearchServiceClient.createConversation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation createConversation(CreateConversationRequest request) { + return createConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already + * exists, an ALREADY_EXISTS error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   CreateConversationRequest request =
+   *       CreateConversationRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       conversationalSearchServiceClient.createConversationCallable().futureCall(request);
+   *   // Do something.
+   *   Conversation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createConversationCallable() { + return stub.createConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not + * exist, a NOT_FOUND error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ConversationName name =
+   *       ConversationName.ofProjectLocationDataStoreConversationName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+   *   conversationalSearchServiceClient.deleteConversation(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Conversation to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversation(ConversationName name) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not + * exist, a NOT_FOUND error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   String name =
+   *       ConversationName.ofProjectLocationDataStoreConversationName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *           .toString();
+   *   conversationalSearchServiceClient.deleteConversation(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Conversation to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversation(String name) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder().setName(name).build(); + deleteConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not + * exist, a NOT_FOUND error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   DeleteConversationRequest request =
+   *       DeleteConversationRequest.newBuilder()
+   *           .setName(
+   *               ConversationName.ofProjectLocationDataStoreConversationName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *                   .toString())
+   *           .build();
+   *   conversationalSearchServiceClient.deleteConversation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConversation(DeleteConversationRequest request) { + deleteConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Conversation. + * + *

If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not + * exist, a NOT_FOUND error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   DeleteConversationRequest request =
+   *       DeleteConversationRequest.newBuilder()
+   *           .setName(
+   *               ConversationName.ofProjectLocationDataStoreConversationName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       conversationalSearchServiceClient.deleteConversationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteConversationCallable() { + return stub.deleteConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Conversation. + * + *

[Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action type cannot be + * changed. If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update + * does not exist, a NOT_FOUND error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   Conversation conversation = Conversation.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Conversation response =
+   *       conversationalSearchServiceClient.updateConversation(conversation, updateMask);
+   * }
+   * }
+ * + * @param conversation Required. The Conversation to update. + * @param updateMask Indicates which fields in the provided + * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update. The following + * are NOT supported: + *
    + *
  • [conversation.name][] + *
+ *

If not set or empty, all supported fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation updateConversation(Conversation conversation, FieldMask updateMask) { + UpdateConversationRequest request = + UpdateConversationRequest.newBuilder() + .setConversation(conversation) + .setUpdateMask(updateMask) + .build(); + return updateConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Conversation. + * + *

[Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action type cannot be + * changed. If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update + * does not exist, a NOT_FOUND error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   UpdateConversationRequest request =
+   *       UpdateConversationRequest.newBuilder()
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Conversation response = conversationalSearchServiceClient.updateConversation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation updateConversation(UpdateConversationRequest request) { + return updateConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Conversation. + * + *

[Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action type cannot be + * changed. If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update + * does not exist, a NOT_FOUND error is returned. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   UpdateConversationRequest request =
+   *       UpdateConversationRequest.newBuilder()
+   *           .setConversation(Conversation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       conversationalSearchServiceClient.updateConversationCallable().futureCall(request);
+   *   // Do something.
+   *   Conversation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateConversationCallable() { + return stub.updateConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ConversationName name =
+   *       ConversationName.ofProjectLocationDataStoreConversationName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+   *   Conversation response = conversationalSearchServiceClient.getConversation(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation getConversation(ConversationName name) { + GetConversationRequest request = + GetConversationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   String name =
+   *       ConversationName.ofProjectLocationDataStoreConversationName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *           .toString();
+   *   Conversation response = conversationalSearchServiceClient.getConversation(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Conversation to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation getConversation(String name) { + GetConversationRequest request = GetConversationRequest.newBuilder().setName(name).build(); + return getConversation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   GetConversationRequest request =
+   *       GetConversationRequest.newBuilder()
+   *           .setName(
+   *               ConversationName.ofProjectLocationDataStoreConversationName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *                   .toString())
+   *           .build();
+   *   Conversation response = conversationalSearchServiceClient.getConversation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Conversation getConversation(GetConversationRequest request) { + return getConversationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Conversation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   GetConversationRequest request =
+   *       GetConversationRequest.newBuilder()
+   *           .setName(
+   *               ConversationName.ofProjectLocationDataStoreConversationName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       conversationalSearchServiceClient.getConversationCallable().futureCall(request);
+   *   // Do something.
+   *   Conversation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getConversationCallable() { + return stub.getConversationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Conversations by their parent + * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   DataStoreName parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+   *   for (Conversation element :
+   *       conversationalSearchServiceClient.listConversations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversationsPagedResponse listConversations(DataStoreName parent) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listConversations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Conversations by their parent + * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   String parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *           .toString();
+   *   for (Conversation element :
+   *       conversationalSearchServiceClient.listConversations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversationsPagedResponse listConversations(String parent) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder().setParent(parent).build(); + return listConversations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Conversations by their parent + * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ListConversationsRequest request =
+   *       ListConversationsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Conversation element :
+   *       conversationalSearchServiceClient.listConversations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConversationsPagedResponse listConversations(ListConversationsRequest request) { + return listConversationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Conversations by their parent + * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ListConversationsRequest request =
+   *       ListConversationsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       conversationalSearchServiceClient.listConversationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Conversation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConversationsPagedCallable() { + return stub.listConversationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Conversations by their parent + * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   ListConversationsRequest request =
+   *       ListConversationsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListConversationsResponse response =
+   *         conversationalSearchServiceClient.listConversationsCallable().call(request);
+   *     for (Conversation element : response.getConversationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConversationsCallable() { + return stub.listConversationsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListConversationsPagedResponse + extends AbstractPagedListResponse< + ListConversationsRequest, + ListConversationsResponse, + Conversation, + ListConversationsPage, + ListConversationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListConversationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListConversationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListConversationsPagedResponse(ListConversationsPage page) { + super(page, ListConversationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListConversationsPage + extends AbstractPage< + ListConversationsRequest, + ListConversationsResponse, + Conversation, + ListConversationsPage> { + + private ListConversationsPage( + PageContext context, + ListConversationsResponse response) { + super(context, response); + } + + private static ListConversationsPage createEmptyPage() { + return new ListConversationsPage(null, null); + } + + @Override + protected ListConversationsPage createPage( + PageContext context, + ListConversationsResponse response) { + return new ListConversationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListConversationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListConversationsRequest, + ListConversationsResponse, + Conversation, + ListConversationsPage, + ListConversationsFixedSizeCollection> { + + private ListConversationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListConversationsFixedSizeCollection createEmptyCollection() { + return new ListConversationsFixedSizeCollection(null, 0); + } + + @Override + protected ListConversationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListConversationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceSettings.java new file mode 100644 index 000000000000..182a146b889c --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceSettings.java @@ -0,0 +1,279 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient.ListConversationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.ConversationalSearchServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ConversationalSearchServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of converseConversation to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceSettings.Builder conversationalSearchServiceSettingsBuilder =
+ *     ConversationalSearchServiceSettings.newBuilder();
+ * conversationalSearchServiceSettingsBuilder
+ *     .converseConversationSettings()
+ *     .setRetrySettings(
+ *         conversationalSearchServiceSettingsBuilder
+ *             .converseConversationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ *     conversationalSearchServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ConversationalSearchServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to converseConversation. */ + public UnaryCallSettings + converseConversationSettings() { + return ((ConversationalSearchServiceStubSettings) getStubSettings()) + .converseConversationSettings(); + } + + /** Returns the object with the settings used for calls to createConversation. */ + public UnaryCallSettings createConversationSettings() { + return ((ConversationalSearchServiceStubSettings) getStubSettings()) + .createConversationSettings(); + } + + /** Returns the object with the settings used for calls to deleteConversation. */ + public UnaryCallSettings deleteConversationSettings() { + return ((ConversationalSearchServiceStubSettings) getStubSettings()) + .deleteConversationSettings(); + } + + /** Returns the object with the settings used for calls to updateConversation. */ + public UnaryCallSettings updateConversationSettings() { + return ((ConversationalSearchServiceStubSettings) getStubSettings()) + .updateConversationSettings(); + } + + /** Returns the object with the settings used for calls to getConversation. */ + public UnaryCallSettings getConversationSettings() { + return ((ConversationalSearchServiceStubSettings) getStubSettings()).getConversationSettings(); + } + + /** Returns the object with the settings used for calls to listConversations. */ + public PagedCallSettings< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return ((ConversationalSearchServiceStubSettings) getStubSettings()) + .listConversationsSettings(); + } + + public static final ConversationalSearchServiceSettings create( + ConversationalSearchServiceStubSettings stub) throws IOException { + return new ConversationalSearchServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ConversationalSearchServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ConversationalSearchServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ConversationalSearchServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ConversationalSearchServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ConversationalSearchServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ConversationalSearchServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ConversationalSearchServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ConversationalSearchServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ConversationalSearchServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ConversationalSearchServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ConversationalSearchServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ConversationalSearchServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ConversationalSearchServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ConversationalSearchServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ConversationalSearchServiceStubSettings.newHttpJsonBuilder()); + } + + public ConversationalSearchServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ConversationalSearchServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to converseConversation. */ + public UnaryCallSettings.Builder + converseConversationSettings() { + return getStubSettingsBuilder().converseConversationSettings(); + } + + /** Returns the builder for the settings used for calls to createConversation. */ + public UnaryCallSettings.Builder + createConversationSettings() { + return getStubSettingsBuilder().createConversationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConversation. */ + public UnaryCallSettings.Builder + deleteConversationSettings() { + return getStubSettingsBuilder().deleteConversationSettings(); + } + + /** Returns the builder for the settings used for calls to updateConversation. */ + public UnaryCallSettings.Builder + updateConversationSettings() { + return getStubSettingsBuilder().updateConversationSettings(); + } + + /** Returns the builder for the settings used for calls to getConversation. */ + public UnaryCallSettings.Builder + getConversationSettings() { + return getStubSettingsBuilder().getConversationSettings(); + } + + /** Returns the builder for the settings used for calls to listConversations. */ + public PagedCallSettings.Builder< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return getStubSettingsBuilder().listConversationsSettings(); + } + + @Override + public ConversationalSearchServiceSettings build() throws IOException { + return new ConversationalSearchServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClient.java new file mode 100644 index 000000000000..2a5837e9c27c --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClient.java @@ -0,0 +1,1257 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.DocumentServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.DocumentServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for ingesting + * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the customer's website. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ *   DocumentName name =
+ *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+ *   Document response = documentServiceClient.getDocument(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the DocumentServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of DocumentServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DocumentServiceSettings documentServiceSettings =
+ *     DocumentServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DocumentServiceClient documentServiceClient =
+ *     DocumentServiceClient.create(documentServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DocumentServiceSettings documentServiceSettings =
+ *     DocumentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DocumentServiceClient documentServiceClient =
+ *     DocumentServiceClient.create(documentServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DocumentServiceSettings documentServiceSettings =
+ *     DocumentServiceSettings.newHttpJsonBuilder().build();
+ * DocumentServiceClient documentServiceClient =
+ *     DocumentServiceClient.create(documentServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DocumentServiceClient implements BackgroundResource { + private final DocumentServiceSettings settings; + private final DocumentServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of DocumentServiceClient with default settings. */ + public static final DocumentServiceClient create() throws IOException { + return create(DocumentServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DocumentServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DocumentServiceClient create(DocumentServiceSettings settings) + throws IOException { + return new DocumentServiceClient(settings); + } + + /** + * Constructs an instance of DocumentServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(DocumentServiceSettings). + */ + public static final DocumentServiceClient create(DocumentServiceStub stub) { + return new DocumentServiceClient(stub); + } + + /** + * Constructs an instance of DocumentServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected DocumentServiceClient(DocumentServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DocumentServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected DocumentServiceClient(DocumentServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final DocumentServiceSettings getSettings() { + return settings; + } + + public DocumentServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   DocumentName name =
+   *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+   *   Document response = documentServiceClient.getDocument(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1alpha.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + *

If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] does not + * exist, a `NOT_FOUND` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Document getDocument(DocumentName name) { + GetDocumentRequest request = + GetDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String name =
+   *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *           .toString();
+   *   Document response = documentServiceClient.getDocument(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1alpha.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + *

If the caller does not have permission to access the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] does not + * exist, a `NOT_FOUND` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Document getDocument(String name) { + GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name).build(); + return getDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   GetDocumentRequest request =
+   *       GetDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *                   .toString())
+   *           .build();
+   *   Document response = documentServiceClient.getDocument(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Document getDocument(GetDocumentRequest request) { + return getDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   GetDocumentRequest request =
+   *       GetDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = documentServiceClient.getDocumentCallable().futureCall(request);
+   *   // Do something.
+   *   Document response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDocumentCallable() { + return stub.getDocumentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   BranchName parent =
+   *       BranchName.ofProjectLocationDataStoreBranchName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]");
+   *   for (Document element : documentServiceClient.listDocuments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default branch. + *

If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this branch, regardless of + * whether or not this branch exists, a `PERMISSION_DENIED` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDocumentsPagedResponse listDocuments(BranchName parent) { + ListDocumentsRequest request = + ListDocumentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDocuments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String parent =
+   *       BranchName.ofProjectLocationDataStoreBranchName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *           .toString();
+   *   for (Document element : documentServiceClient.listDocuments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * Use `default_branch` as the branch ID, to list documents under the default branch. + *

If the caller does not have permission to list + * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this branch, regardless of + * whether or not this branch exists, a `PERMISSION_DENIED` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDocumentsPagedResponse listDocuments(String parent) { + ListDocumentsRequest request = ListDocumentsRequest.newBuilder().setParent(parent).build(); + return listDocuments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ListDocumentsRequest request =
+   *       ListDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Document element : documentServiceClient.listDocuments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDocumentsPagedResponse listDocuments(ListDocumentsRequest request) { + return listDocumentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ListDocumentsRequest request =
+   *       ListDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.listDocumentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Document element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDocumentsPagedCallable() { + return stub.listDocumentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ListDocumentsRequest request =
+   *       ListDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDocumentsResponse response =
+   *         documentServiceClient.listDocumentsCallable().call(request);
+   *     for (Document element : response.getDocumentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listDocumentsCallable() { + return stub.listDocumentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   BranchName parent =
+   *       BranchName.ofProjectLocationDataStoreBranchName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]");
+   *   Document document = Document.newBuilder().build();
+   *   String documentId = "documentId-814940266";
+   *   Document response = documentServiceClient.createDocument(parent, document, documentId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * @param document Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to + * create. + * @param documentId Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1alpha.Document], which will become the final + * component of the [Document.name][google.cloud.discoveryengine.v1alpha.Document.name]. + *

If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

This field must be unique among all + * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same + * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. Otherwise, an + * `ALREADY_EXISTS` error is returned. + *

This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with + * a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Document createDocument(BranchName parent, Document document, String documentId) { + CreateDocumentRequest request = + CreateDocumentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDocument(document) + .setDocumentId(documentId) + .build(); + return createDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String parent =
+   *       BranchName.ofProjectLocationDataStoreBranchName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *           .toString();
+   *   Document document = Document.newBuilder().build();
+   *   String documentId = "documentId-814940266";
+   *   Document response = documentServiceClient.createDocument(parent, document, documentId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * @param document Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to + * create. + * @param documentId Required. The ID to use for the + * [Document][google.cloud.discoveryengine.v1alpha.Document], which will become the final + * component of the [Document.name][google.cloud.discoveryengine.v1alpha.Document.name]. + *

If the caller does not have permission to create the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

This field must be unique among all + * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same + * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. Otherwise, an + * `ALREADY_EXISTS` error is returned. + *

This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with + * a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Document createDocument(String parent, Document document, String documentId) { + CreateDocumentRequest request = + CreateDocumentRequest.newBuilder() + .setParent(parent) + .setDocument(document) + .setDocumentId(documentId) + .build(); + return createDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   CreateDocumentRequest request =
+   *       CreateDocumentRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setDocument(Document.newBuilder().build())
+   *           .setDocumentId("documentId-814940266")
+   *           .build();
+   *   Document response = documentServiceClient.createDocument(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Document createDocument(CreateDocumentRequest request) { + return createDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   CreateDocumentRequest request =
+   *       CreateDocumentRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setDocument(Document.newBuilder().build())
+   *           .setDocumentId("documentId-814940266")
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.createDocumentCallable().futureCall(request);
+   *   // Do something.
+   *   Document response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDocumentCallable() { + return stub.createDocumentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   UpdateDocumentRequest request =
+   *       UpdateDocumentRequest.newBuilder()
+   *           .setDocument(Document.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   Document response = documentServiceClient.updateDocument(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Document updateDocument(UpdateDocumentRequest request) { + return updateDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   UpdateDocumentRequest request =
+   *       UpdateDocumentRequest.newBuilder()
+   *           .setDocument(Document.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.updateDocumentCallable().futureCall(request);
+   *   // Do something.
+   *   Document response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDocumentCallable() { + return stub.updateDocumentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   DocumentName name =
+   *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+   *   documentServiceClient.deleteDocument(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1alpha.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + *

If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete does not + * exist, a `NOT_FOUND` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDocument(DocumentName name) { + DeleteDocumentRequest request = + DeleteDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   String name =
+   *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *           .toString();
+   *   documentServiceClient.deleteDocument(name);
+   * }
+   * }
+ * + * @param name Required. Full resource name of + * [Document][google.cloud.discoveryengine.v1alpha.Document], such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + *

If the caller does not have permission to delete the + * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it + * exists, a `PERMISSION_DENIED` error is returned. + *

If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete does not + * exist, a `NOT_FOUND` error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDocument(String name) { + DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build(); + deleteDocument(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   DeleteDocumentRequest request =
+   *       DeleteDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *                   .toString())
+   *           .build();
+   *   documentServiceClient.deleteDocument(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDocument(DeleteDocumentRequest request) { + deleteDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   DeleteDocumentRequest request =
+   *       DeleteDocumentRequest.newBuilder()
+   *           .setName(
+   *               DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = documentServiceClient.deleteDocumentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDocumentCallable() { + return stub.deleteDocumentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk import of multiple [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request + * processing may be synchronous. Non-existing items will be created. + * + *

Note: It is possible for a subset of the + * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be successfully updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ImportDocumentsRequest request =
+   *       ImportDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setErrorConfig(ImportErrorConfig.newBuilder().build())
+   *           .setAutoGenerateIds(true)
+   *           .setIdField("idField1629396127")
+   *           .build();
+   *   ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importDocumentsAsync(ImportDocumentsRequest request) { + return importDocumentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk import of multiple [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request + * processing may be synchronous. Non-existing items will be created. + * + *

Note: It is possible for a subset of the + * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be successfully updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ImportDocumentsRequest request =
+   *       ImportDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setErrorConfig(ImportErrorConfig.newBuilder().build())
+   *           .setAutoGenerateIds(true)
+   *           .setIdField("idField1629396127")
+   *           .build();
+   *   OperationFuture future =
+   *       documentServiceClient.importDocumentsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportDocumentsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationCallable() { + return stub.importDocumentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk import of multiple [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request + * processing may be synchronous. Non-existing items will be created. + * + *

Note: It is possible for a subset of the + * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be successfully updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   ImportDocumentsRequest request =
+   *       ImportDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setErrorConfig(ImportErrorConfig.newBuilder().build())
+   *           .setAutoGenerateIds(true)
+   *           .setIdField("idField1629396127")
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.importDocumentsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importDocumentsCallable() { + return stub.importDocumentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Document][google.cloud.discoveryengine.v1alpha.Document]s in + * a branch. + * + *

This process is asynchronous. Depending on the number of + * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, this operation can + * take hours to complete. Before the delete operation completes, some + * [Document][google.cloud.discoveryengine.v1alpha.Document]s might still be returned by + * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + * or + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + * + *

To get a list of the [Document][google.cloud.discoveryengine.v1alpha.Document]s to be + * deleted, set + * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + * to false. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   PurgeDocumentsRequest request =
+   *       PurgeDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   PurgeDocumentsResponse response = documentServiceClient.purgeDocumentsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture purgeDocumentsAsync( + PurgeDocumentsRequest request) { + return purgeDocumentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Document][google.cloud.discoveryengine.v1alpha.Document]s in + * a branch. + * + *

This process is asynchronous. Depending on the number of + * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, this operation can + * take hours to complete. Before the delete operation completes, some + * [Document][google.cloud.discoveryengine.v1alpha.Document]s might still be returned by + * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + * or + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + * + *

To get a list of the [Document][google.cloud.discoveryengine.v1alpha.Document]s to be + * deleted, set + * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + * to false. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   PurgeDocumentsRequest request =
+   *       PurgeDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       documentServiceClient.purgeDocumentsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PurgeDocumentsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationCallable() { + return stub.purgeDocumentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes all selected [Document][google.cloud.discoveryengine.v1alpha.Document]s in + * a branch. + * + *

This process is asynchronous. Depending on the number of + * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, this operation can + * take hours to complete. Before the delete operation completes, some + * [Document][google.cloud.discoveryengine.v1alpha.Document]s might still be returned by + * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + * or + * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + * + *

To get a list of the [Document][google.cloud.discoveryengine.v1alpha.Document]s to be + * deleted, set + * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + * to false. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+   *   PurgeDocumentsRequest request =
+   *       PurgeDocumentsRequest.newBuilder()
+   *           .setParent(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       documentServiceClient.purgeDocumentsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable purgeDocumentsCallable() { + return stub.purgeDocumentsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListDocumentsPagedResponse + extends AbstractPagedListResponse< + ListDocumentsRequest, + ListDocumentsResponse, + Document, + ListDocumentsPage, + ListDocumentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDocumentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDocumentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDocumentsPagedResponse(ListDocumentsPage page) { + super(page, ListDocumentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDocumentsPage + extends AbstractPage< + ListDocumentsRequest, ListDocumentsResponse, Document, ListDocumentsPage> { + + private ListDocumentsPage( + PageContext context, + ListDocumentsResponse response) { + super(context, response); + } + + private static ListDocumentsPage createEmptyPage() { + return new ListDocumentsPage(null, null); + } + + @Override + protected ListDocumentsPage createPage( + PageContext context, + ListDocumentsResponse response) { + return new ListDocumentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDocumentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDocumentsRequest, + ListDocumentsResponse, + Document, + ListDocumentsPage, + ListDocumentsFixedSizeCollection> { + + private ListDocumentsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDocumentsFixedSizeCollection createEmptyCollection() { + return new ListDocumentsFixedSizeCollection(null, 0); + } + + @Override + protected ListDocumentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDocumentsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceSettings.java new file mode 100644 index 000000000000..335cbe253f7b --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceSettings.java @@ -0,0 +1,304 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient.ListDocumentsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.DocumentServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DocumentServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getDocument to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DocumentServiceSettings.Builder documentServiceSettingsBuilder =
+ *     DocumentServiceSettings.newBuilder();
+ * documentServiceSettingsBuilder
+ *     .getDocumentSettings()
+ *     .setRetrySettings(
+ *         documentServiceSettingsBuilder
+ *             .getDocumentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DocumentServiceSettings documentServiceSettings = documentServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DocumentServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getDocument. */ + public UnaryCallSettings getDocumentSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).getDocumentSettings(); + } + + /** Returns the object with the settings used for calls to listDocuments. */ + public PagedCallSettings + listDocumentsSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).listDocumentsSettings(); + } + + /** Returns the object with the settings used for calls to createDocument. */ + public UnaryCallSettings createDocumentSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).createDocumentSettings(); + } + + /** Returns the object with the settings used for calls to updateDocument. */ + public UnaryCallSettings updateDocumentSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).updateDocumentSettings(); + } + + /** Returns the object with the settings used for calls to deleteDocument. */ + public UnaryCallSettings deleteDocumentSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).deleteDocumentSettings(); + } + + /** Returns the object with the settings used for calls to importDocuments. */ + public UnaryCallSettings importDocumentsSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).importDocumentsSettings(); + } + + /** Returns the object with the settings used for calls to importDocuments. */ + public OperationCallSettings< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).importDocumentsOperationSettings(); + } + + /** Returns the object with the settings used for calls to purgeDocuments. */ + public UnaryCallSettings purgeDocumentsSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).purgeDocumentsSettings(); + } + + /** Returns the object with the settings used for calls to purgeDocuments. */ + public OperationCallSettings< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationSettings() { + return ((DocumentServiceStubSettings) getStubSettings()).purgeDocumentsOperationSettings(); + } + + public static final DocumentServiceSettings create(DocumentServiceStubSettings stub) + throws IOException { + return new DocumentServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DocumentServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DocumentServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DocumentServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DocumentServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DocumentServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DocumentServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DocumentServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DocumentServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DocumentServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DocumentServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DocumentServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DocumentServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DocumentServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DocumentServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DocumentServiceStubSettings.newHttpJsonBuilder()); + } + + public DocumentServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DocumentServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getDocument. */ + public UnaryCallSettings.Builder getDocumentSettings() { + return getStubSettingsBuilder().getDocumentSettings(); + } + + /** Returns the builder for the settings used for calls to listDocuments. */ + public PagedCallSettings.Builder< + ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse> + listDocumentsSettings() { + return getStubSettingsBuilder().listDocumentsSettings(); + } + + /** Returns the builder for the settings used for calls to createDocument. */ + public UnaryCallSettings.Builder createDocumentSettings() { + return getStubSettingsBuilder().createDocumentSettings(); + } + + /** Returns the builder for the settings used for calls to updateDocument. */ + public UnaryCallSettings.Builder updateDocumentSettings() { + return getStubSettingsBuilder().updateDocumentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDocument. */ + public UnaryCallSettings.Builder deleteDocumentSettings() { + return getStubSettingsBuilder().deleteDocumentSettings(); + } + + /** Returns the builder for the settings used for calls to importDocuments. */ + public UnaryCallSettings.Builder importDocumentsSettings() { + return getStubSettingsBuilder().importDocumentsSettings(); + } + + /** Returns the builder for the settings used for calls to importDocuments. */ + public OperationCallSettings.Builder< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationSettings() { + return getStubSettingsBuilder().importDocumentsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to purgeDocuments. */ + public UnaryCallSettings.Builder purgeDocumentsSettings() { + return getStubSettingsBuilder().purgeDocumentsSettings(); + } + + /** Returns the builder for the settings used for calls to purgeDocuments. */ + public OperationCallSettings.Builder< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationSettings() { + return getStubSettingsBuilder().purgeDocumentsOperationSettings(); + } + + @Override + public DocumentServiceSettings build() throws IOException { + return new DocumentServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClient.java new file mode 100644 index 000000000000..a5cee701a056 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClient.java @@ -0,0 +1,290 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.RecommendationServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.RecommendationServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for making recommendations. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RecommendationServiceClient recommendationServiceClient =
+ *     RecommendationServiceClient.create()) {
+ *   RecommendRequest request =
+ *       RecommendRequest.newBuilder()
+ *           .setServingConfig(
+ *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ *                   .toString())
+ *           .setUserEvent(UserEvent.newBuilder().build())
+ *           .setPageSize(883849137)
+ *           .setFilter("filter-1274492040")
+ *           .setValidateOnly(true)
+ *           .putAllParams(new HashMap())
+ *           .putAllUserLabels(new HashMap())
+ *           .build();
+ *   RecommendResponse response = recommendationServiceClient.recommend(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the RecommendationServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of RecommendationServiceSettings + * to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceSettings recommendationServiceSettings =
+ *     RecommendationServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * RecommendationServiceClient recommendationServiceClient =
+ *     RecommendationServiceClient.create(recommendationServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceSettings recommendationServiceSettings =
+ *     RecommendationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RecommendationServiceClient recommendationServiceClient =
+ *     RecommendationServiceClient.create(recommendationServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceSettings recommendationServiceSettings =
+ *     RecommendationServiceSettings.newHttpJsonBuilder().build();
+ * RecommendationServiceClient recommendationServiceClient =
+ *     RecommendationServiceClient.create(recommendationServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class RecommendationServiceClient implements BackgroundResource { + private final RecommendationServiceSettings settings; + private final RecommendationServiceStub stub; + + /** Constructs an instance of RecommendationServiceClient with default settings. */ + public static final RecommendationServiceClient create() throws IOException { + return create(RecommendationServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of RecommendationServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final RecommendationServiceClient create(RecommendationServiceSettings settings) + throws IOException { + return new RecommendationServiceClient(settings); + } + + /** + * Constructs an instance of RecommendationServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(RecommendationServiceSettings). + */ + public static final RecommendationServiceClient create(RecommendationServiceStub stub) { + return new RecommendationServiceClient(stub); + } + + /** + * Constructs an instance of RecommendationServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected RecommendationServiceClient(RecommendationServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((RecommendationServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected RecommendationServiceClient(RecommendationServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final RecommendationServiceSettings getSettings() { + return settings; + } + + public RecommendationServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes a recommendation, which requires a contextual user event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecommendationServiceClient recommendationServiceClient =
+   *     RecommendationServiceClient.create()) {
+   *   RecommendRequest request =
+   *       RecommendRequest.newBuilder()
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setUserEvent(UserEvent.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setFilter("filter-1274492040")
+   *           .setValidateOnly(true)
+   *           .putAllParams(new HashMap())
+   *           .putAllUserLabels(new HashMap())
+   *           .build();
+   *   RecommendResponse response = recommendationServiceClient.recommend(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RecommendResponse recommend(RecommendRequest request) { + return recommendCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes a recommendation, which requires a contextual user event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RecommendationServiceClient recommendationServiceClient =
+   *     RecommendationServiceClient.create()) {
+   *   RecommendRequest request =
+   *       RecommendRequest.newBuilder()
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setUserEvent(UserEvent.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setFilter("filter-1274492040")
+   *           .setValidateOnly(true)
+   *           .putAllParams(new HashMap())
+   *           .putAllUserLabels(new HashMap())
+   *           .build();
+   *   ApiFuture future =
+   *       recommendationServiceClient.recommendCallable().futureCall(request);
+   *   // Do something.
+   *   RecommendResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable recommendCallable() { + return stub.recommendCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceSettings.java new file mode 100644 index 000000000000..4a3324e08812 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceSettings.java @@ -0,0 +1,209 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.RecommendationServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RecommendationServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of recommend to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceSettings.Builder recommendationServiceSettingsBuilder =
+ *     RecommendationServiceSettings.newBuilder();
+ * recommendationServiceSettingsBuilder
+ *     .recommendSettings()
+ *     .setRetrySettings(
+ *         recommendationServiceSettingsBuilder
+ *             .recommendSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * RecommendationServiceSettings recommendationServiceSettings =
+ *     recommendationServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class RecommendationServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to recommend. */ + public UnaryCallSettings recommendSettings() { + return ((RecommendationServiceStubSettings) getStubSettings()).recommendSettings(); + } + + public static final RecommendationServiceSettings create(RecommendationServiceStubSettings stub) + throws IOException { + return new RecommendationServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return RecommendationServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return RecommendationServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return RecommendationServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return RecommendationServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return RecommendationServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return RecommendationServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return RecommendationServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RecommendationServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected RecommendationServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for RecommendationServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(RecommendationServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(RecommendationServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(RecommendationServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(RecommendationServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(RecommendationServiceStubSettings.newHttpJsonBuilder()); + } + + public RecommendationServiceStubSettings.Builder getStubSettingsBuilder() { + return ((RecommendationServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to recommend. */ + public UnaryCallSettings.Builder recommendSettings() { + return getStubSettingsBuilder().recommendSettings(); + } + + @Override + public RecommendationServiceSettings build() throws IOException { + return new RecommendationServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClient.java new file mode 100644 index 000000000000..92ab547720c8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClient.java @@ -0,0 +1,1033 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.SchemaServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.SchemaServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ *   SchemaName name =
+ *       SchemaName.ofProjectLocationDataStoreSchemaName(
+ *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+ *   Schema response = schemaServiceClient.getSchema(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the SchemaServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of SchemaServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SchemaServiceSettings schemaServiceSettings =
+ *     SchemaServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SchemaServiceSettings schemaServiceSettings =
+ *     SchemaServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SchemaServiceSettings schemaServiceSettings =
+ *     SchemaServiceSettings.newHttpJsonBuilder().build();
+ * SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class SchemaServiceClient implements BackgroundResource { + private final SchemaServiceSettings settings; + private final SchemaServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of SchemaServiceClient with default settings. */ + public static final SchemaServiceClient create() throws IOException { + return create(SchemaServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SchemaServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final SchemaServiceClient create(SchemaServiceSettings settings) + throws IOException { + return new SchemaServiceClient(settings); + } + + /** + * Constructs an instance of SchemaServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(SchemaServiceSettings). + */ + public static final SchemaServiceClient create(SchemaServiceStub stub) { + return new SchemaServiceClient(stub); + } + + /** + * Constructs an instance of SchemaServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected SchemaServiceClient(SchemaServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((SchemaServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected SchemaServiceClient(SchemaServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final SchemaServiceSettings getSettings() { + return settings; + } + + public SchemaServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   SchemaName name =
+   *       SchemaName.ofProjectLocationDataStoreSchemaName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+   *   Schema response = schemaServiceClient.getSchema(name);
+   * }
+   * }
+ * + * @param name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Schema getSchema(SchemaName name) { + GetSchemaRequest request = + GetSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   String name =
+   *       SchemaName.ofProjectLocationDataStoreSchemaName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+   *           .toString();
+   *   Schema response = schemaServiceClient.getSchema(name);
+   * }
+   * }
+ * + * @param name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Schema getSchema(String name) { + GetSchemaRequest request = GetSchemaRequest.newBuilder().setName(name).build(); + return getSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   GetSchemaRequest request =
+   *       GetSchemaRequest.newBuilder()
+   *           .setName(
+   *               SchemaName.ofProjectLocationDataStoreSchemaName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   Schema response = schemaServiceClient.getSchema(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Schema getSchema(GetSchemaRequest request) { + return getSchemaCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   GetSchemaRequest request =
+   *       GetSchemaRequest.newBuilder()
+   *           .setName(
+   *               SchemaName.ofProjectLocationDataStoreSchemaName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = schemaServiceClient.getSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   Schema response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSchemaCallable() { + return stub.getSchemaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   DataStoreName parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+   *   for (Schema element : schemaServiceClient.listSchemas(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchemasPagedResponse listSchemas(DataStoreName parent) { + ListSchemasRequest request = + ListSchemasRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSchemas(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   String parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *           .toString();
+   *   for (Schema element : schemaServiceClient.listSchemas(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchemasPagedResponse listSchemas(String parent) { + ListSchemasRequest request = ListSchemasRequest.newBuilder().setParent(parent).build(); + return listSchemas(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   ListSchemasRequest request =
+   *       ListSchemasRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Schema element : schemaServiceClient.listSchemas(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) { + return listSchemasPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   ListSchemasRequest request =
+   *       ListSchemasRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = schemaServiceClient.listSchemasPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Schema element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSchemasPagedCallable() { + return stub.listSchemasPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   ListSchemasRequest request =
+   *       ListSchemasRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListSchemasResponse response = schemaServiceClient.listSchemasCallable().call(request);
+   *     for (Schema element : response.getSchemasList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSchemasCallable() { + return stub.listSchemasCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   DataStoreName parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+   *   Schema schema = Schema.newBuilder().build();
+   *   String schemaId = "schemaId-697673060";
+   *   Schema response = schemaServiceClient.createSchemaAsync(parent, schema, schemaId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @param schema Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to create. + * @param schemaId Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become the final + * component of the [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name]. + *

This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard + * with a length limit of 63 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSchemaAsync( + DataStoreName parent, Schema schema, String schemaId) { + CreateSchemaRequest request = + CreateSchemaRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSchema(schema) + .setSchemaId(schemaId) + .build(); + return createSchemaAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   String parent =
+   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *           .toString();
+   *   Schema schema = Schema.newBuilder().build();
+   *   String schemaId = "schemaId-697673060";
+   *   Schema response = schemaServiceClient.createSchemaAsync(parent, schema, schemaId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @param schema Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to create. + * @param schemaId Required. The ID to use for the + * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become the final + * component of the [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name]. + *

This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard + * with a length limit of 63 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSchemaAsync( + String parent, Schema schema, String schemaId) { + CreateSchemaRequest request = + CreateSchemaRequest.newBuilder() + .setParent(parent) + .setSchema(schema) + .setSchemaId(schemaId) + .build(); + return createSchemaAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   CreateSchemaRequest request =
+   *       CreateSchemaRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setSchema(Schema.newBuilder().build())
+   *           .setSchemaId("schemaId-697673060")
+   *           .build();
+   *   Schema response = schemaServiceClient.createSchemaAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSchemaAsync( + CreateSchemaRequest request) { + return createSchemaOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   CreateSchemaRequest request =
+   *       CreateSchemaRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setSchema(Schema.newBuilder().build())
+   *           .setSchemaId("schemaId-697673060")
+   *           .build();
+   *   OperationFuture future =
+   *       schemaServiceClient.createSchemaOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Schema response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createSchemaOperationCallable() { + return stub.createSchemaOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   CreateSchemaRequest request =
+   *       CreateSchemaRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setSchema(Schema.newBuilder().build())
+   *           .setSchemaId("schemaId-697673060")
+   *           .build();
+   *   ApiFuture future = schemaServiceClient.createSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSchemaCallable() { + return stub.createSchemaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   UpdateSchemaRequest request =
+   *       UpdateSchemaRequest.newBuilder()
+   *           .setSchema(Schema.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   Schema response = schemaServiceClient.updateSchemaAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSchemaAsync( + UpdateSchemaRequest request) { + return updateSchemaOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   UpdateSchemaRequest request =
+   *       UpdateSchemaRequest.newBuilder()
+   *           .setSchema(Schema.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       schemaServiceClient.updateSchemaOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Schema response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateSchemaOperationCallable() { + return stub.updateSchemaOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   UpdateSchemaRequest request =
+   *       UpdateSchemaRequest.newBuilder()
+   *           .setSchema(Schema.newBuilder().build())
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = schemaServiceClient.updateSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSchemaCallable() { + return stub.updateSchemaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   SchemaName name =
+   *       SchemaName.ofProjectLocationDataStoreSchemaName(
+   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+   *   schemaServiceClient.deleteSchemaAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSchemaAsync(SchemaName name) { + DeleteSchemaRequest request = + DeleteSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteSchemaAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   String name =
+   *       SchemaName.ofProjectLocationDataStoreSchemaName(
+   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+   *           .toString();
+   *   schemaServiceClient.deleteSchemaAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSchemaAsync(String name) { + DeleteSchemaRequest request = DeleteSchemaRequest.newBuilder().setName(name).build(); + return deleteSchemaAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   DeleteSchemaRequest request =
+   *       DeleteSchemaRequest.newBuilder()
+   *           .setName(
+   *               SchemaName.ofProjectLocationDataStoreSchemaName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   schemaServiceClient.deleteSchemaAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSchemaAsync( + DeleteSchemaRequest request) { + return deleteSchemaOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   DeleteSchemaRequest request =
+   *       DeleteSchemaRequest.newBuilder()
+   *           .setName(
+   *               SchemaName.ofProjectLocationDataStoreSchemaName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       schemaServiceClient.deleteSchemaOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteSchemaOperationCallable() { + return stub.deleteSchemaOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+   *   DeleteSchemaRequest request =
+   *       DeleteSchemaRequest.newBuilder()
+   *           .setName(
+   *               SchemaName.ofProjectLocationDataStoreSchemaName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = schemaServiceClient.deleteSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSchemaCallable() { + return stub.deleteSchemaCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListSchemasPagedResponse + extends AbstractPagedListResponse< + ListSchemasRequest, + ListSchemasResponse, + Schema, + ListSchemasPage, + ListSchemasFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSchemasPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSchemasPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSchemasPagedResponse(ListSchemasPage page) { + super(page, ListSchemasFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSchemasPage + extends AbstractPage { + + private ListSchemasPage( + PageContext context, + ListSchemasResponse response) { + super(context, response); + } + + private static ListSchemasPage createEmptyPage() { + return new ListSchemasPage(null, null); + } + + @Override + protected ListSchemasPage createPage( + PageContext context, + ListSchemasResponse response) { + return new ListSchemasPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSchemasFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSchemasRequest, + ListSchemasResponse, + Schema, + ListSchemasPage, + ListSchemasFixedSizeCollection> { + + private ListSchemasFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSchemasFixedSizeCollection createEmptyCollection() { + return new ListSchemasFixedSizeCollection(null, 0); + } + + @Override + protected ListSchemasFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSchemasFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceSettings.java new file mode 100644 index 000000000000..3ef01f326c1a --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceSettings.java @@ -0,0 +1,291 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient.ListSchemasPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.SchemaServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SchemaServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getSchema to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SchemaServiceSettings.Builder schemaServiceSettingsBuilder = SchemaServiceSettings.newBuilder();
+ * schemaServiceSettingsBuilder
+ *     .getSchemaSettings()
+ *     .setRetrySettings(
+ *         schemaServiceSettingsBuilder
+ *             .getSchemaSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SchemaServiceSettings schemaServiceSettings = schemaServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SchemaServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getSchema. */ + public UnaryCallSettings getSchemaSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).getSchemaSettings(); + } + + /** Returns the object with the settings used for calls to listSchemas. */ + public PagedCallSettings + listSchemasSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).listSchemasSettings(); + } + + /** Returns the object with the settings used for calls to createSchema. */ + public UnaryCallSettings createSchemaSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).createSchemaSettings(); + } + + /** Returns the object with the settings used for calls to createSchema. */ + public OperationCallSettings + createSchemaOperationSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).createSchemaOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSchema. */ + public UnaryCallSettings updateSchemaSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).updateSchemaSettings(); + } + + /** Returns the object with the settings used for calls to updateSchema. */ + public OperationCallSettings + updateSchemaOperationSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).updateSchemaOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteSchema. */ + public UnaryCallSettings deleteSchemaSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).deleteSchemaSettings(); + } + + /** Returns the object with the settings used for calls to deleteSchema. */ + public OperationCallSettings + deleteSchemaOperationSettings() { + return ((SchemaServiceStubSettings) getStubSettings()).deleteSchemaOperationSettings(); + } + + public static final SchemaServiceSettings create(SchemaServiceStubSettings stub) + throws IOException { + return new SchemaServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SchemaServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SchemaServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SchemaServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SchemaServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SchemaServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return SchemaServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SchemaServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SchemaServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SchemaServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SchemaServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SchemaServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(SchemaServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(SchemaServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(SchemaServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(SchemaServiceStubSettings.newHttpJsonBuilder()); + } + + public SchemaServiceStubSettings.Builder getStubSettingsBuilder() { + return ((SchemaServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getSchema. */ + public UnaryCallSettings.Builder getSchemaSettings() { + return getStubSettingsBuilder().getSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to listSchemas. */ + public PagedCallSettings.Builder< + ListSchemasRequest, ListSchemasResponse, ListSchemasPagedResponse> + listSchemasSettings() { + return getStubSettingsBuilder().listSchemasSettings(); + } + + /** Returns the builder for the settings used for calls to createSchema. */ + public UnaryCallSettings.Builder createSchemaSettings() { + return getStubSettingsBuilder().createSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to createSchema. */ + public OperationCallSettings.Builder + createSchemaOperationSettings() { + return getStubSettingsBuilder().createSchemaOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSchema. */ + public UnaryCallSettings.Builder updateSchemaSettings() { + return getStubSettingsBuilder().updateSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to updateSchema. */ + public OperationCallSettings.Builder + updateSchemaOperationSettings() { + return getStubSettingsBuilder().updateSchemaOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSchema. */ + public UnaryCallSettings.Builder deleteSchemaSettings() { + return getStubSettingsBuilder().deleteSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSchema. */ + public OperationCallSettings.Builder + deleteSchemaOperationSettings() { + return getStubSettingsBuilder().deleteSchemaOperationSettings(); + } + + @Override + public SchemaServiceSettings build() throws IOException { + return new SchemaServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClient.java new file mode 100644 index 000000000000..029d5edd69d8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClient.java @@ -0,0 +1,483 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.SearchServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.SearchServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for search. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+ *   SearchRequest request =
+ *       SearchRequest.newBuilder()
+ *           .setServingConfig(
+ *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ *                   .toString())
+ *           .setBranch(
+ *               BranchName.ofProjectLocationDataStoreBranchName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ *                   .toString())
+ *           .setQuery("query107944136")
+ *           .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+ *           .setPageSize(883849137)
+ *           .setPageToken("pageToken873572522")
+ *           .setOffset(-1019779949)
+ *           .setFilter("filter-1274492040")
+ *           .setOrderBy("orderBy-1207110587")
+ *           .setUserInfo(UserInfo.newBuilder().build())
+ *           .addAllFacetSpecs(new ArrayList())
+ *           .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build())
+ *           .putAllParams(new HashMap())
+ *           .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build())
+ *           .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build())
+ *           .setUserPseudoId("userPseudoId-1155274652")
+ *           .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build())
+ *           .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build())
+ *           .setRankingExpression("rankingExpression2110320494")
+ *           .setSafeSearch(true)
+ *           .putAllUserLabels(new HashMap())
+ *           .build();
+ *   for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

Note: close() needs to be called on the SearchServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of SearchServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings searchServiceSettings =
+ *     SearchServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings searchServiceSettings =
+ *     SearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings searchServiceSettings =
+ *     SearchServiceSettings.newHttpJsonBuilder().build();
+ * SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class SearchServiceClient implements BackgroundResource { + private final SearchServiceSettings settings; + private final SearchServiceStub stub; + + /** Constructs an instance of SearchServiceClient with default settings. */ + public static final SearchServiceClient create() throws IOException { + return create(SearchServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SearchServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final SearchServiceClient create(SearchServiceSettings settings) + throws IOException { + return new SearchServiceClient(settings); + } + + /** + * Constructs an instance of SearchServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(SearchServiceSettings). + */ + public static final SearchServiceClient create(SearchServiceStub stub) { + return new SearchServiceClient(stub); + } + + /** + * Constructs an instance of SearchServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected SearchServiceClient(SearchServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((SearchServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected SearchServiceClient(SearchServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final SearchServiceSettings getSettings() { + return settings; + } + + public SearchServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Performs a search. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+   *   SearchRequest request =
+   *       SearchRequest.newBuilder()
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setBranch(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setQuery("query107944136")
+   *           .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOffset(-1019779949)
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setUserInfo(UserInfo.newBuilder().build())
+   *           .addAllFacetSpecs(new ArrayList())
+   *           .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build())
+   *           .putAllParams(new HashMap())
+   *           .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build())
+   *           .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build())
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build())
+   *           .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build())
+   *           .setRankingExpression("rankingExpression2110320494")
+   *           .setSafeSearch(true)
+   *           .putAllUserLabels(new HashMap())
+   *           .build();
+   *   for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPagedResponse search(SearchRequest request) { + return searchPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Performs a search. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+   *   SearchRequest request =
+   *       SearchRequest.newBuilder()
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setBranch(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setQuery("query107944136")
+   *           .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOffset(-1019779949)
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setUserInfo(UserInfo.newBuilder().build())
+   *           .addAllFacetSpecs(new ArrayList())
+   *           .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build())
+   *           .putAllParams(new HashMap())
+   *           .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build())
+   *           .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build())
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build())
+   *           .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build())
+   *           .setRankingExpression("rankingExpression2110320494")
+   *           .setSafeSearch(true)
+   *           .putAllUserLabels(new HashMap())
+   *           .build();
+   *   ApiFuture future =
+   *       searchServiceClient.searchPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SearchResponse.SearchResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchPagedCallable() { + return stub.searchPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Performs a search. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+   *   SearchRequest request =
+   *       SearchRequest.newBuilder()
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setBranch(
+   *               BranchName.ofProjectLocationDataStoreBranchName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+   *                   .toString())
+   *           .setQuery("query107944136")
+   *           .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOffset(-1019779949)
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setUserInfo(UserInfo.newBuilder().build())
+   *           .addAllFacetSpecs(new ArrayList())
+   *           .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build())
+   *           .putAllParams(new HashMap())
+   *           .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build())
+   *           .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build())
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build())
+   *           .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build())
+   *           .setRankingExpression("rankingExpression2110320494")
+   *           .setSafeSearch(true)
+   *           .putAllUserLabels(new HashMap())
+   *           .build();
+   *   while (true) {
+   *     SearchResponse response = searchServiceClient.searchCallable().call(request);
+   *     for (SearchResponse.SearchResult element : response.getResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchCallable() { + return stub.searchCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class SearchPagedResponse + extends AbstractPagedListResponse< + SearchRequest, + SearchResponse, + SearchResponse.SearchResult, + SearchPage, + SearchFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new SearchPagedResponse(input), MoreExecutors.directExecutor()); + } + + private SearchPagedResponse(SearchPage page) { + super(page, SearchFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchPage + extends AbstractPage { + + private SearchPage( + PageContext context, + SearchResponse response) { + super(context, response); + } + + private static SearchPage createEmptyPage() { + return new SearchPage(null, null); + } + + @Override + protected SearchPage createPage( + PageContext context, + SearchResponse response) { + return new SearchPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchRequest, + SearchResponse, + SearchResponse.SearchResult, + SearchPage, + SearchFixedSizeCollection> { + + private SearchFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchFixedSizeCollection createEmptyCollection() { + return new SearchFixedSizeCollection(null, 0); + } + + @Override + protected SearchFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceSettings.java new file mode 100644 index 000000000000..89d1e0bf357d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceSettings.java @@ -0,0 +1,210 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.SearchServiceClient.SearchPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.SearchServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SearchServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of search to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
+ * searchServiceSettingsBuilder
+ *     .searchSettings()
+ *     .setRetrySettings(
+ *         searchServiceSettingsBuilder
+ *             .searchSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SearchServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to search. */ + public PagedCallSettings searchSettings() { + return ((SearchServiceStubSettings) getStubSettings()).searchSettings(); + } + + public static final SearchServiceSettings create(SearchServiceStubSettings stub) + throws IOException { + return new SearchServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SearchServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SearchServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SearchServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SearchServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SearchServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return SearchServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SearchServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SearchServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SearchServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SearchServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SearchServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(SearchServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(SearchServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(SearchServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(SearchServiceStubSettings.newHttpJsonBuilder()); + } + + public SearchServiceStubSettings.Builder getStubSettingsBuilder() { + return ((SearchServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to search. */ + public PagedCallSettings.Builder + searchSettings() { + return getStubSettingsBuilder().searchSettings(); + } + + @Override + public SearchServiceSettings build() throws IOException { + return new SearchServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClient.java new file mode 100644 index 000000000000..db704d2a47fc --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClient.java @@ -0,0 +1,340 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.SiteSearchEngineServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.SiteSearchEngineServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing site search related resources. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ *     SiteSearchEngineServiceClient.create()) {
+ *   RecrawlUrisRequest request =
+ *       RecrawlUrisRequest.newBuilder()
+ *           .setSiteSearchEngine(
+ *               SiteSearchEngineName.ofProjectLocationDataStoreName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ *                   .toString())
+ *           .addAllUris(new ArrayList())
+ *           .build();
+ *   RecrawlUrisResponse response = siteSearchEngineServiceClient.recrawlUrisAsync(request).get();
+ * }
+ * }
+ * + *

Note: close() needs to be called on the SiteSearchEngineServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * SiteSearchEngineServiceSettings to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ *     SiteSearchEngineServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ *     SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ *     SiteSearchEngineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ *     SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ *     SiteSearchEngineServiceSettings.newHttpJsonBuilder().build();
+ * SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ *     SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class SiteSearchEngineServiceClient implements BackgroundResource { + private final SiteSearchEngineServiceSettings settings; + private final SiteSearchEngineServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of SiteSearchEngineServiceClient with default settings. */ + public static final SiteSearchEngineServiceClient create() throws IOException { + return create(SiteSearchEngineServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SiteSearchEngineServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final SiteSearchEngineServiceClient create(SiteSearchEngineServiceSettings settings) + throws IOException { + return new SiteSearchEngineServiceClient(settings); + } + + /** + * Constructs an instance of SiteSearchEngineServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(SiteSearchEngineServiceSettings). + */ + public static final SiteSearchEngineServiceClient create(SiteSearchEngineServiceStub stub) { + return new SiteSearchEngineServiceClient(stub); + } + + /** + * Constructs an instance of SiteSearchEngineServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected SiteSearchEngineServiceClient(SiteSearchEngineServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((SiteSearchEngineServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected SiteSearchEngineServiceClient(SiteSearchEngineServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final SiteSearchEngineServiceSettings getSettings() { + return settings; + } + + public SiteSearchEngineServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Request on-demand recrawl for a list of URIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+   *     SiteSearchEngineServiceClient.create()) {
+   *   RecrawlUrisRequest request =
+   *       RecrawlUrisRequest.newBuilder()
+   *           .setSiteSearchEngine(
+   *               SiteSearchEngineName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .addAllUris(new ArrayList())
+   *           .build();
+   *   RecrawlUrisResponse response = siteSearchEngineServiceClient.recrawlUrisAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture recrawlUrisAsync( + RecrawlUrisRequest request) { + return recrawlUrisOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Request on-demand recrawl for a list of URIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+   *     SiteSearchEngineServiceClient.create()) {
+   *   RecrawlUrisRequest request =
+   *       RecrawlUrisRequest.newBuilder()
+   *           .setSiteSearchEngine(
+   *               SiteSearchEngineName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .addAllUris(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       siteSearchEngineServiceClient.recrawlUrisOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RecrawlUrisResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + recrawlUrisOperationCallable() { + return stub.recrawlUrisOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Request on-demand recrawl for a list of URIs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+   *     SiteSearchEngineServiceClient.create()) {
+   *   RecrawlUrisRequest request =
+   *       RecrawlUrisRequest.newBuilder()
+   *           .setSiteSearchEngine(
+   *               SiteSearchEngineName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .addAllUris(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       siteSearchEngineServiceClient.recrawlUrisCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable recrawlUrisCallable() { + return stub.recrawlUrisCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceSettings.java new file mode 100644 index 000000000000..c2a85f5ad564 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceSettings.java @@ -0,0 +1,225 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.SiteSearchEngineServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SiteSearchEngineServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of recrawlUris to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings.Builder siteSearchEngineServiceSettingsBuilder =
+ *     SiteSearchEngineServiceSettings.newBuilder();
+ * siteSearchEngineServiceSettingsBuilder
+ *     .recrawlUrisSettings()
+ *     .setRetrySettings(
+ *         siteSearchEngineServiceSettingsBuilder
+ *             .recrawlUrisSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ *     siteSearchEngineServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SiteSearchEngineServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to recrawlUris. */ + public UnaryCallSettings recrawlUrisSettings() { + return ((SiteSearchEngineServiceStubSettings) getStubSettings()).recrawlUrisSettings(); + } + + /** Returns the object with the settings used for calls to recrawlUris. */ + public OperationCallSettings + recrawlUrisOperationSettings() { + return ((SiteSearchEngineServiceStubSettings) getStubSettings()).recrawlUrisOperationSettings(); + } + + public static final SiteSearchEngineServiceSettings create( + SiteSearchEngineServiceStubSettings stub) throws IOException { + return new SiteSearchEngineServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SiteSearchEngineServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SiteSearchEngineServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SiteSearchEngineServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SiteSearchEngineServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SiteSearchEngineServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return SiteSearchEngineServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SiteSearchEngineServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SiteSearchEngineServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SiteSearchEngineServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SiteSearchEngineServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SiteSearchEngineServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(SiteSearchEngineServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(SiteSearchEngineServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(SiteSearchEngineServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(SiteSearchEngineServiceStubSettings.newHttpJsonBuilder()); + } + + public SiteSearchEngineServiceStubSettings.Builder getStubSettingsBuilder() { + return ((SiteSearchEngineServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to recrawlUris. */ + public UnaryCallSettings.Builder recrawlUrisSettings() { + return getStubSettingsBuilder().recrawlUrisSettings(); + } + + /** Returns the builder for the settings used for calls to recrawlUris. */ + public OperationCallSettings.Builder< + RecrawlUrisRequest, RecrawlUrisResponse, RecrawlUrisMetadata> + recrawlUrisOperationSettings() { + return getStubSettingsBuilder().recrawlUrisOperationSettings(); + } + + @Override + public SiteSearchEngineServiceSettings build() throws IOException { + return new SiteSearchEngineServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClient.java new file mode 100644 index 000000000000..3b11b210073e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClient.java @@ -0,0 +1,598 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.HttpBody; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.stub.UserEventServiceStub; +import com.google.cloud.discoveryengine.v1alpha.stub.UserEventServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for ingesting end user actions on a website to Discovery Engine API. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ *   WriteUserEventRequest request =
+ *       WriteUserEventRequest.newBuilder()
+ *           .setParent(
+ *               DataStoreName.ofProjectLocationDataStoreName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ *                   .toString())
+ *           .setUserEvent(UserEvent.newBuilder().build())
+ *           .build();
+ *   UserEvent response = userEventServiceClient.writeUserEvent(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the UserEventServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of UserEventServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceSettings userEventServiceSettings =
+ *     UserEventServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * UserEventServiceClient userEventServiceClient =
+ *     UserEventServiceClient.create(userEventServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceSettings userEventServiceSettings =
+ *     UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * UserEventServiceClient userEventServiceClient =
+ *     UserEventServiceClient.create(userEventServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceSettings userEventServiceSettings =
+ *     UserEventServiceSettings.newHttpJsonBuilder().build();
+ * UserEventServiceClient userEventServiceClient =
+ *     UserEventServiceClient.create(userEventServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class UserEventServiceClient implements BackgroundResource { + private final UserEventServiceSettings settings; + private final UserEventServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of UserEventServiceClient with default settings. */ + public static final UserEventServiceClient create() throws IOException { + return create(UserEventServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of UserEventServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final UserEventServiceClient create(UserEventServiceSettings settings) + throws IOException { + return new UserEventServiceClient(settings); + } + + /** + * Constructs an instance of UserEventServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(UserEventServiceSettings). + */ + public static final UserEventServiceClient create(UserEventServiceStub stub) { + return new UserEventServiceClient(stub); + } + + /** + * Constructs an instance of UserEventServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected UserEventServiceClient(UserEventServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((UserEventServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected UserEventServiceClient(UserEventServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final UserEventServiceSettings getSettings() { + return settings; + } + + public UserEventServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes a single user event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   WriteUserEventRequest request =
+   *       WriteUserEventRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setUserEvent(UserEvent.newBuilder().build())
+   *           .build();
+   *   UserEvent response = userEventServiceClient.writeUserEvent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserEvent writeUserEvent(WriteUserEventRequest request) { + return writeUserEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes a single user event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   WriteUserEventRequest request =
+   *       WriteUserEventRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setUserEvent(UserEvent.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       userEventServiceClient.writeUserEventCallable().futureCall(request);
+   *   // Do something.
+   *   UserEvent response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable writeUserEventCallable() { + return stub.writeUserEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes a single user event from the browser. This uses a GET request to due to browser + * restriction of POST-ing to a third-party domain. + * + *

This method is used only by the Discovery Engine API JavaScript pixel and Google Tag + * Manager. Users should not call this method directly. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   CollectUserEventRequest request =
+   *       CollectUserEventRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setUserEvent("userEvent315571599")
+   *           .setUri("uri116076")
+   *           .setEts(100772)
+   *           .build();
+   *   HttpBody response = userEventServiceClient.collectUserEvent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HttpBody collectUserEvent(CollectUserEventRequest request) { + return collectUserEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Writes a single user event from the browser. This uses a GET request to due to browser + * restriction of POST-ing to a third-party domain. + * + *

This method is used only by the Discovery Engine API JavaScript pixel and Google Tag + * Manager. Users should not call this method directly. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   CollectUserEventRequest request =
+   *       CollectUserEventRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setUserEvent("userEvent315571599")
+   *           .setUri("uri116076")
+   *           .setEts(100772)
+   *           .build();
+   *   ApiFuture future =
+   *       userEventServiceClient.collectUserEventCallable().futureCall(request);
+   *   // Do something.
+   *   HttpBody response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable collectUserEventCallable() { + return stub.collectUserEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes permanently all user events specified by the filter provided. Depending on the number + * of events specified by the filter, this operation could take hours or days to complete. To test + * a filter, use the list command first. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   PurgeUserEventsRequest request =
+   *       PurgeUserEventsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   PurgeUserEventsResponse response = userEventServiceClient.purgeUserEventsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + purgeUserEventsAsync(PurgeUserEventsRequest request) { + return purgeUserEventsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes permanently all user events specified by the filter provided. Depending on the number + * of events specified by the filter, this operation could take hours or days to complete. To test + * a filter, use the list command first. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   PurgeUserEventsRequest request =
+   *       PurgeUserEventsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       userEventServiceClient.purgeUserEventsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   PurgeUserEventsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationCallable() { + return stub.purgeUserEventsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes permanently all user events specified by the filter provided. Depending on the number + * of events specified by the filter, this operation could take hours or days to complete. To test + * a filter, use the list command first. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   PurgeUserEventsRequest request =
+   *       PurgeUserEventsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setFilter("filter-1274492040")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       userEventServiceClient.purgeUserEventsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable purgeUserEventsCallable() { + return stub.purgeUserEventsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk import of User events. Request processing might be synchronous. Events that already exist + * are skipped. Use this method for backfilling historical user events. + * + *

Operation.response is of type ImportResponse. Note that it is possible for a subset of the + * items to be successfully inserted. Operation.metadata is of type ImportMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   ImportUserEventsRequest request =
+   *       ImportUserEventsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setErrorConfig(ImportErrorConfig.newBuilder().build())
+   *           .build();
+   *   ImportUserEventsResponse response =
+   *       userEventServiceClient.importUserEventsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importUserEventsAsync(ImportUserEventsRequest request) { + return importUserEventsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk import of User events. Request processing might be synchronous. Events that already exist + * are skipped. Use this method for backfilling historical user events. + * + *

Operation.response is of type ImportResponse. Note that it is possible for a subset of the + * items to be successfully inserted. Operation.metadata is of type ImportMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   ImportUserEventsRequest request =
+   *       ImportUserEventsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setErrorConfig(ImportErrorConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       userEventServiceClient.importUserEventsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportUserEventsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationCallable() { + return stub.importUserEventsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk import of User events. Request processing might be synchronous. Events that already exist + * are skipped. Use this method for backfilling historical user events. + * + *

Operation.response is of type ImportResponse. Note that it is possible for a subset of the + * items to be successfully inserted. Operation.metadata is of type ImportMetadata. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+   *   ImportUserEventsRequest request =
+   *       ImportUserEventsRequest.newBuilder()
+   *           .setParent(
+   *               DataStoreName.ofProjectLocationDataStoreName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+   *                   .toString())
+   *           .setErrorConfig(ImportErrorConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       userEventServiceClient.importUserEventsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importUserEventsCallable() { + return stub.importUserEventsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceSettings.java new file mode 100644 index 000000000000..c1cb18161a0d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceSettings.java @@ -0,0 +1,269 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.HttpBody; +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.stub.UserEventServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link UserEventServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of writeUserEvent to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
+ *     UserEventServiceSettings.newBuilder();
+ * userEventServiceSettingsBuilder
+ *     .writeUserEventSettings()
+ *     .setRetrySettings(
+ *         userEventServiceSettingsBuilder
+ *             .writeUserEventSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class UserEventServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to writeUserEvent. */ + public UnaryCallSettings writeUserEventSettings() { + return ((UserEventServiceStubSettings) getStubSettings()).writeUserEventSettings(); + } + + /** Returns the object with the settings used for calls to collectUserEvent. */ + public UnaryCallSettings collectUserEventSettings() { + return ((UserEventServiceStubSettings) getStubSettings()).collectUserEventSettings(); + } + + /** Returns the object with the settings used for calls to purgeUserEvents. */ + public UnaryCallSettings purgeUserEventsSettings() { + return ((UserEventServiceStubSettings) getStubSettings()).purgeUserEventsSettings(); + } + + /** Returns the object with the settings used for calls to purgeUserEvents. */ + public OperationCallSettings< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationSettings() { + return ((UserEventServiceStubSettings) getStubSettings()).purgeUserEventsOperationSettings(); + } + + /** Returns the object with the settings used for calls to importUserEvents. */ + public UnaryCallSettings importUserEventsSettings() { + return ((UserEventServiceStubSettings) getStubSettings()).importUserEventsSettings(); + } + + /** Returns the object with the settings used for calls to importUserEvents. */ + public OperationCallSettings< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationSettings() { + return ((UserEventServiceStubSettings) getStubSettings()).importUserEventsOperationSettings(); + } + + public static final UserEventServiceSettings create(UserEventServiceStubSettings stub) + throws IOException { + return new UserEventServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return UserEventServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return UserEventServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return UserEventServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return UserEventServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return UserEventServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return UserEventServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return UserEventServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return UserEventServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected UserEventServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for UserEventServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(UserEventServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(UserEventServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(UserEventServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(UserEventServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(UserEventServiceStubSettings.newHttpJsonBuilder()); + } + + public UserEventServiceStubSettings.Builder getStubSettingsBuilder() { + return ((UserEventServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to writeUserEvent. */ + public UnaryCallSettings.Builder writeUserEventSettings() { + return getStubSettingsBuilder().writeUserEventSettings(); + } + + /** Returns the builder for the settings used for calls to collectUserEvent. */ + public UnaryCallSettings.Builder collectUserEventSettings() { + return getStubSettingsBuilder().collectUserEventSettings(); + } + + /** Returns the builder for the settings used for calls to purgeUserEvents. */ + public UnaryCallSettings.Builder purgeUserEventsSettings() { + return getStubSettingsBuilder().purgeUserEventsSettings(); + } + + /** Returns the builder for the settings used for calls to purgeUserEvents. */ + public OperationCallSettings.Builder< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationSettings() { + return getStubSettingsBuilder().purgeUserEventsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to importUserEvents. */ + public UnaryCallSettings.Builder + importUserEventsSettings() { + return getStubSettingsBuilder().importUserEventsSettings(); + } + + /** Returns the builder for the settings used for calls to importUserEvents. */ + public OperationCallSettings.Builder< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationSettings() { + return getStubSettingsBuilder().importUserEventsOperationSettings(); + } + + @Override + public UserEventServiceSettings build() throws IOException { + return new UserEventServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/gapic_metadata.json b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..482a49faa432 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/gapic_metadata.json @@ -0,0 +1,159 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.discoveryengine.v1alpha", + "libraryPackage": "com.google.cloud.discoveryengine.v1alpha", + "services": { + "CompletionService": { + "clients": { + "grpc": { + "libraryClient": "CompletionServiceClient", + "rpcs": { + "CompleteQuery": { + "methods": ["completeQuery", "completeQueryCallable"] + } + } + } + } + }, + "ConversationalSearchService": { + "clients": { + "grpc": { + "libraryClient": "ConversationalSearchServiceClient", + "rpcs": { + "ConverseConversation": { + "methods": ["converseConversation", "converseConversation", "converseConversation", "converseConversationCallable"] + }, + "CreateConversation": { + "methods": ["createConversation", "createConversation", "createConversation", "createConversationCallable"] + }, + "DeleteConversation": { + "methods": ["deleteConversation", "deleteConversation", "deleteConversation", "deleteConversationCallable"] + }, + "GetConversation": { + "methods": ["getConversation", "getConversation", "getConversation", "getConversationCallable"] + }, + "ListConversations": { + "methods": ["listConversations", "listConversations", "listConversations", "listConversationsPagedCallable", "listConversationsCallable"] + }, + "UpdateConversation": { + "methods": ["updateConversation", "updateConversation", "updateConversationCallable"] + } + } + } + } + }, + "DocumentService": { + "clients": { + "grpc": { + "libraryClient": "DocumentServiceClient", + "rpcs": { + "CreateDocument": { + "methods": ["createDocument", "createDocument", "createDocument", "createDocumentCallable"] + }, + "DeleteDocument": { + "methods": ["deleteDocument", "deleteDocument", "deleteDocument", "deleteDocumentCallable"] + }, + "GetDocument": { + "methods": ["getDocument", "getDocument", "getDocument", "getDocumentCallable"] + }, + "ImportDocuments": { + "methods": ["importDocumentsAsync", "importDocumentsOperationCallable", "importDocumentsCallable"] + }, + "ListDocuments": { + "methods": ["listDocuments", "listDocuments", "listDocuments", "listDocumentsPagedCallable", "listDocumentsCallable"] + }, + "PurgeDocuments": { + "methods": ["purgeDocumentsAsync", "purgeDocumentsOperationCallable", "purgeDocumentsCallable"] + }, + "UpdateDocument": { + "methods": ["updateDocument", "updateDocumentCallable"] + } + } + } + } + }, + "RecommendationService": { + "clients": { + "grpc": { + "libraryClient": "RecommendationServiceClient", + "rpcs": { + "Recommend": { + "methods": ["recommend", "recommendCallable"] + } + } + } + } + }, + "SchemaService": { + "clients": { + "grpc": { + "libraryClient": "SchemaServiceClient", + "rpcs": { + "CreateSchema": { + "methods": ["createSchemaAsync", "createSchemaAsync", "createSchemaAsync", "createSchemaOperationCallable", "createSchemaCallable"] + }, + "DeleteSchema": { + "methods": ["deleteSchemaAsync", "deleteSchemaAsync", "deleteSchemaAsync", "deleteSchemaOperationCallable", "deleteSchemaCallable"] + }, + "GetSchema": { + "methods": ["getSchema", "getSchema", "getSchema", "getSchemaCallable"] + }, + "ListSchemas": { + "methods": ["listSchemas", "listSchemas", "listSchemas", "listSchemasPagedCallable", "listSchemasCallable"] + }, + "UpdateSchema": { + "methods": ["updateSchemaAsync", "updateSchemaOperationCallable", "updateSchemaCallable"] + } + } + } + } + }, + "SearchService": { + "clients": { + "grpc": { + "libraryClient": "SearchServiceClient", + "rpcs": { + "Search": { + "methods": ["search", "searchPagedCallable", "searchCallable"] + } + } + } + } + }, + "SiteSearchEngineService": { + "clients": { + "grpc": { + "libraryClient": "SiteSearchEngineServiceClient", + "rpcs": { + "RecrawlUris": { + "methods": ["recrawlUrisAsync", "recrawlUrisOperationCallable", "recrawlUrisCallable"] + } + } + } + } + }, + "UserEventService": { + "clients": { + "grpc": { + "libraryClient": "UserEventServiceClient", + "rpcs": { + "CollectUserEvent": { + "methods": ["collectUserEvent", "collectUserEventCallable"] + }, + "ImportUserEvents": { + "methods": ["importUserEventsAsync", "importUserEventsOperationCallable", "importUserEventsCallable"] + }, + "PurgeUserEvents": { + "methods": ["purgeUserEventsAsync", "purgeUserEventsOperationCallable", "purgeUserEventsCallable"] + }, + "WriteUserEvent": { + "methods": ["writeUserEvent", "writeUserEventCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/package-info.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/package-info.java new file mode 100644 index 000000000000..a2db6dca5faa --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/package-info.java @@ -0,0 +1,250 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Discovery Engine API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= CompletionServiceClient ======================= + * + *

Service Description: Service for Auto-Completion. + * + *

Sample for CompletionServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
+ *   CompleteQueryRequest request =
+ *       CompleteQueryRequest.newBuilder()
+ *           .setDataStore(
+ *               DataStoreName.ofProjectLocationDataStoreName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ *                   .toString())
+ *           .setQuery("query107944136")
+ *           .setQueryModel("queryModel-184930495")
+ *           .setUserPseudoId("userPseudoId-1155274652")
+ *           .setIncludeTailSuggestions(true)
+ *           .build();
+ *   CompleteQueryResponse response = completionServiceClient.completeQuery(request);
+ * }
+ * }
+ * + *

======================= ConversationalSearchServiceClient ======================= + * + *

Service Description: Service for conversational search. + * + *

Sample for ConversationalSearchServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ *     ConversationalSearchServiceClient.create()) {
+ *   ConversationName name =
+ *       ConversationName.ofProjectLocationDataStoreConversationName(
+ *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+ *   TextInput query = TextInput.newBuilder().build();
+ *   ConverseConversationResponse response =
+ *       conversationalSearchServiceClient.converseConversation(name, query);
+ * }
+ * }
+ * + *

======================= DocumentServiceClient ======================= + * + *

Service Description: Service for ingesting + * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the customer's website. + * + *

Sample for DocumentServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ *   DocumentName name =
+ *       DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+ *   Document response = documentServiceClient.getDocument(name);
+ * }
+ * }
+ * + *

======================= RecommendationServiceClient ======================= + * + *

Service Description: Service for making recommendations. + * + *

Sample for RecommendationServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RecommendationServiceClient recommendationServiceClient =
+ *     RecommendationServiceClient.create()) {
+ *   RecommendRequest request =
+ *       RecommendRequest.newBuilder()
+ *           .setServingConfig(
+ *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ *                   .toString())
+ *           .setUserEvent(UserEvent.newBuilder().build())
+ *           .setPageSize(883849137)
+ *           .setFilter("filter-1274492040")
+ *           .setValidateOnly(true)
+ *           .putAllParams(new HashMap())
+ *           .putAllUserLabels(new HashMap())
+ *           .build();
+ *   RecommendResponse response = recommendationServiceClient.recommend(request);
+ * }
+ * }
+ * + *

======================= SchemaServiceClient ======================= + * + *

Service Description: Service for managing + * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + * + *

Sample for SchemaServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ *   SchemaName name =
+ *       SchemaName.ofProjectLocationDataStoreSchemaName(
+ *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+ *   Schema response = schemaServiceClient.getSchema(name);
+ * }
+ * }
+ * + *

======================= SearchServiceClient ======================= + * + *

Service Description: Service for search. + * + *

Sample for SearchServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+ *   SearchRequest request =
+ *       SearchRequest.newBuilder()
+ *           .setServingConfig(
+ *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ *                   .toString())
+ *           .setBranch(
+ *               BranchName.ofProjectLocationDataStoreBranchName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ *                   .toString())
+ *           .setQuery("query107944136")
+ *           .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+ *           .setPageSize(883849137)
+ *           .setPageToken("pageToken873572522")
+ *           .setOffset(-1019779949)
+ *           .setFilter("filter-1274492040")
+ *           .setOrderBy("orderBy-1207110587")
+ *           .setUserInfo(UserInfo.newBuilder().build())
+ *           .addAllFacetSpecs(new ArrayList())
+ *           .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build())
+ *           .putAllParams(new HashMap())
+ *           .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build())
+ *           .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build())
+ *           .setUserPseudoId("userPseudoId-1155274652")
+ *           .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build())
+ *           .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build())
+ *           .setRankingExpression("rankingExpression2110320494")
+ *           .setSafeSearch(true)
+ *           .putAllUserLabels(new HashMap())
+ *           .build();
+ *   for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

======================= SiteSearchEngineServiceClient ======================= + * + *

Service Description: Service for managing site search related resources. + * + *

Sample for SiteSearchEngineServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ *     SiteSearchEngineServiceClient.create()) {
+ *   RecrawlUrisRequest request =
+ *       RecrawlUrisRequest.newBuilder()
+ *           .setSiteSearchEngine(
+ *               SiteSearchEngineName.ofProjectLocationDataStoreName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ *                   .toString())
+ *           .addAllUris(new ArrayList())
+ *           .build();
+ *   RecrawlUrisResponse response = siteSearchEngineServiceClient.recrawlUrisAsync(request).get();
+ * }
+ * }
+ * + *

======================= UserEventServiceClient ======================= + * + *

Service Description: Service for ingesting end user actions on a website to Discovery Engine + * API. + * + *

Sample for UserEventServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ *   WriteUserEventRequest request =
+ *       WriteUserEventRequest.newBuilder()
+ *           .setParent(
+ *               DataStoreName.ofProjectLocationDataStoreName(
+ *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ *                   .toString())
+ *           .setUserEvent(UserEvent.newBuilder().build())
+ *           .build();
+ *   UserEvent response = userEventServiceClient.writeUserEvent(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.discoveryengine.v1alpha; + +import javax.annotation.Generated; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStub.java new file mode 100644 index 000000000000..3ca327a6e9e9 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStub.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the CompletionService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class CompletionServiceStub implements BackgroundResource { + + public UnaryCallable completeQueryCallable() { + throw new UnsupportedOperationException("Not implemented: completeQueryCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStubSettings.java new file mode 100644 index 000000000000..7974040d21d9 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStubSettings.java @@ -0,0 +1,331 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CompletionServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of completeQuery to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
+ *     CompletionServiceStubSettings.newBuilder();
+ * completionServiceSettingsBuilder
+ *     .completeQuerySettings()
+ *     .setRetrySettings(
+ *         completionServiceSettingsBuilder
+ *             .completeQuerySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CompletionServiceStubSettings completionServiceSettings =
+ *     completionServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class CompletionServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + completeQuerySettings; + + /** Returns the object with the settings used for calls to completeQuery. */ + public UnaryCallSettings completeQuerySettings() { + return completeQuerySettings; + } + + public CompletionServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCompletionServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonCompletionServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CompletionServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CompletionServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CompletionServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CompletionServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + completeQuerySettings = settingsBuilder.completeQuerySettings().build(); + } + + /** Builder for CompletionServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + completeQuerySettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ofMillis(5000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(5000L)) + .setTotalTimeout(Duration.ofMillis(5000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + completeQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(completeQuerySettings); + initDefaults(this); + } + + protected Builder(CompletionServiceStubSettings settings) { + super(settings); + + completeQuerySettings = settings.completeQuerySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(completeQuerySettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .completeQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to completeQuery. */ + public UnaryCallSettings.Builder + completeQuerySettings() { + return completeQuerySettings; + } + + @Override + public CompletionServiceStubSettings build() throws IOException { + return new CompletionServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/ConversationalSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/ConversationalSearchServiceStub.java new file mode 100644 index 000000000000..1c5d89620703 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/ConversationalSearchServiceStub.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient.ListConversationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.GetConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ConversationalSearchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ConversationalSearchServiceStub implements BackgroundResource { + + public UnaryCallable + converseConversationCallable() { + throw new UnsupportedOperationException("Not implemented: converseConversationCallable()"); + } + + public UnaryCallable createConversationCallable() { + throw new UnsupportedOperationException("Not implemented: createConversationCallable()"); + } + + public UnaryCallable deleteConversationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConversationCallable()"); + } + + public UnaryCallable updateConversationCallable() { + throw new UnsupportedOperationException("Not implemented: updateConversationCallable()"); + } + + public UnaryCallable getConversationCallable() { + throw new UnsupportedOperationException("Not implemented: getConversationCallable()"); + } + + public UnaryCallable + listConversationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listConversationsPagedCallable()"); + } + + public UnaryCallable + listConversationsCallable() { + throw new UnsupportedOperationException("Not implemented: listConversationsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/ConversationalSearchServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/ConversationalSearchServiceStubSettings.java new file mode 100644 index 000000000000..09186a35d10b --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/ConversationalSearchServiceStubSettings.java @@ -0,0 +1,543 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient.ListConversationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.GetConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ConversationalSearchServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of converseConversation to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceStubSettings.Builder conversationalSearchServiceSettingsBuilder =
+ *     ConversationalSearchServiceStubSettings.newBuilder();
+ * conversationalSearchServiceSettingsBuilder
+ *     .converseConversationSettings()
+ *     .setRetrySettings(
+ *         conversationalSearchServiceSettingsBuilder
+ *             .converseConversationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ConversationalSearchServiceStubSettings conversationalSearchServiceSettings =
+ *     conversationalSearchServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ConversationalSearchServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + converseConversationSettings; + private final UnaryCallSettings + createConversationSettings; + private final UnaryCallSettings deleteConversationSettings; + private final UnaryCallSettings + updateConversationSettings; + private final UnaryCallSettings getConversationSettings; + private final PagedCallSettings< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings; + + private static final PagedListDescriptor< + ListConversationsRequest, ListConversationsResponse, Conversation> + LIST_CONVERSATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListConversationsRequest, ListConversationsResponse, Conversation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListConversationsRequest injectToken( + ListConversationsRequest payload, String token) { + return ListConversationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListConversationsRequest injectPageSize( + ListConversationsRequest payload, int pageSize) { + return ListConversationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListConversationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListConversationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListConversationsResponse payload) { + return payload.getConversationsList() == null + ? ImmutableList.of() + : payload.getConversationsList(); + } + }; + + private static final PagedListResponseFactory< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + LIST_CONVERSATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListConversationsRequest, + ListConversationsResponse, + ListConversationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListConversationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CONVERSATIONS_PAGE_STR_DESC, request, context); + return ListConversationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to converseConversation. */ + public UnaryCallSettings + converseConversationSettings() { + return converseConversationSettings; + } + + /** Returns the object with the settings used for calls to createConversation. */ + public UnaryCallSettings createConversationSettings() { + return createConversationSettings; + } + + /** Returns the object with the settings used for calls to deleteConversation. */ + public UnaryCallSettings deleteConversationSettings() { + return deleteConversationSettings; + } + + /** Returns the object with the settings used for calls to updateConversation. */ + public UnaryCallSettings updateConversationSettings() { + return updateConversationSettings; + } + + /** Returns the object with the settings used for calls to getConversation. */ + public UnaryCallSettings getConversationSettings() { + return getConversationSettings; + } + + /** Returns the object with the settings used for calls to listConversations. */ + public PagedCallSettings< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return listConversationsSettings; + } + + public ConversationalSearchServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcConversationalSearchServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonConversationalSearchServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ConversationalSearchServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ConversationalSearchServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ConversationalSearchServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ConversationalSearchServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + converseConversationSettings = settingsBuilder.converseConversationSettings().build(); + createConversationSettings = settingsBuilder.createConversationSettings().build(); + deleteConversationSettings = settingsBuilder.deleteConversationSettings().build(); + updateConversationSettings = settingsBuilder.updateConversationSettings().build(); + getConversationSettings = settingsBuilder.getConversationSettings().build(); + listConversationsSettings = settingsBuilder.listConversationsSettings().build(); + } + + /** Builder for ConversationalSearchServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder< + ConverseConversationRequest, ConverseConversationResponse> + converseConversationSettings; + private final UnaryCallSettings.Builder + createConversationSettings; + private final UnaryCallSettings.Builder + deleteConversationSettings; + private final UnaryCallSettings.Builder + updateConversationSettings; + private final UnaryCallSettings.Builder + getConversationSettings; + private final PagedCallSettings.Builder< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + converseConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listConversationsSettings = PagedCallSettings.newBuilder(LIST_CONVERSATIONS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + converseConversationSettings, + createConversationSettings, + deleteConversationSettings, + updateConversationSettings, + getConversationSettings, + listConversationsSettings); + initDefaults(this); + } + + protected Builder(ConversationalSearchServiceStubSettings settings) { + super(settings); + + converseConversationSettings = settings.converseConversationSettings.toBuilder(); + createConversationSettings = settings.createConversationSettings.toBuilder(); + deleteConversationSettings = settings.deleteConversationSettings.toBuilder(); + updateConversationSettings = settings.updateConversationSettings.toBuilder(); + getConversationSettings = settings.getConversationSettings.toBuilder(); + listConversationsSettings = settings.listConversationsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + converseConversationSettings, + createConversationSettings, + deleteConversationSettings, + updateConversationSettings, + getConversationSettings, + listConversationsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .converseConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .getConversationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listConversationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to converseConversation. */ + public UnaryCallSettings.Builder + converseConversationSettings() { + return converseConversationSettings; + } + + /** Returns the builder for the settings used for calls to createConversation. */ + public UnaryCallSettings.Builder + createConversationSettings() { + return createConversationSettings; + } + + /** Returns the builder for the settings used for calls to deleteConversation. */ + public UnaryCallSettings.Builder + deleteConversationSettings() { + return deleteConversationSettings; + } + + /** Returns the builder for the settings used for calls to updateConversation. */ + public UnaryCallSettings.Builder + updateConversationSettings() { + return updateConversationSettings; + } + + /** Returns the builder for the settings used for calls to getConversation. */ + public UnaryCallSettings.Builder + getConversationSettings() { + return getConversationSettings; + } + + /** Returns the builder for the settings used for calls to listConversations. */ + public PagedCallSettings.Builder< + ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> + listConversationsSettings() { + return listConversationsSettings; + } + + @Override + public ConversationalSearchServiceStubSettings build() throws IOException { + return new ConversationalSearchServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStub.java new file mode 100644 index 000000000000..ff2de0513c05 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStub.java @@ -0,0 +1,106 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient.ListDocumentsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DocumentService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class DocumentServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable getDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: getDocumentCallable()"); + } + + public UnaryCallable + listDocumentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDocumentsPagedCallable()"); + } + + public UnaryCallable listDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: listDocumentsCallable()"); + } + + public UnaryCallable createDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: createDocumentCallable()"); + } + + public UnaryCallable updateDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: updateDocumentCallable()"); + } + + public UnaryCallable deleteDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDocumentCallable()"); + } + + public OperationCallable + importDocumentsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importDocumentsOperationCallable()"); + } + + public UnaryCallable importDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()"); + } + + public OperationCallable + purgeDocumentsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: purgeDocumentsOperationCallable()"); + } + + public UnaryCallable purgeDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: purgeDocumentsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStubSettings.java new file mode 100644 index 000000000000..13c5df0060bb --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DocumentServiceStubSettings.java @@ -0,0 +1,661 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient.ListDocumentsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DocumentServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getDocument to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DocumentServiceStubSettings.Builder documentServiceSettingsBuilder =
+ *     DocumentServiceStubSettings.newBuilder();
+ * documentServiceSettingsBuilder
+ *     .getDocumentSettings()
+ *     .setRetrySettings(
+ *         documentServiceSettingsBuilder
+ *             .getDocumentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DocumentServiceStubSettings documentServiceSettings = documentServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DocumentServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings getDocumentSettings; + private final PagedCallSettings< + ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse> + listDocumentsSettings; + private final UnaryCallSettings createDocumentSettings; + private final UnaryCallSettings updateDocumentSettings; + private final UnaryCallSettings deleteDocumentSettings; + private final UnaryCallSettings importDocumentsSettings; + private final OperationCallSettings< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationSettings; + private final UnaryCallSettings purgeDocumentsSettings; + private final OperationCallSettings< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationSettings; + + private static final PagedListDescriptor + LIST_DOCUMENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDocumentsRequest injectToken(ListDocumentsRequest payload, String token) { + return ListDocumentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDocumentsRequest injectPageSize(ListDocumentsRequest payload, int pageSize) { + return ListDocumentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDocumentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDocumentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDocumentsResponse payload) { + return payload.getDocumentsList() == null + ? ImmutableList.of() + : payload.getDocumentsList(); + } + }; + + private static final PagedListResponseFactory< + ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse> + LIST_DOCUMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDocumentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DOCUMENTS_PAGE_STR_DESC, request, context); + return ListDocumentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getDocument. */ + public UnaryCallSettings getDocumentSettings() { + return getDocumentSettings; + } + + /** Returns the object with the settings used for calls to listDocuments. */ + public PagedCallSettings + listDocumentsSettings() { + return listDocumentsSettings; + } + + /** Returns the object with the settings used for calls to createDocument. */ + public UnaryCallSettings createDocumentSettings() { + return createDocumentSettings; + } + + /** Returns the object with the settings used for calls to updateDocument. */ + public UnaryCallSettings updateDocumentSettings() { + return updateDocumentSettings; + } + + /** Returns the object with the settings used for calls to deleteDocument. */ + public UnaryCallSettings deleteDocumentSettings() { + return deleteDocumentSettings; + } + + /** Returns the object with the settings used for calls to importDocuments. */ + public UnaryCallSettings importDocumentsSettings() { + return importDocumentsSettings; + } + + /** Returns the object with the settings used for calls to importDocuments. */ + public OperationCallSettings< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationSettings() { + return importDocumentsOperationSettings; + } + + /** Returns the object with the settings used for calls to purgeDocuments. */ + public UnaryCallSettings purgeDocumentsSettings() { + return purgeDocumentsSettings; + } + + /** Returns the object with the settings used for calls to purgeDocuments. */ + public OperationCallSettings< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationSettings() { + return purgeDocumentsOperationSettings; + } + + public DocumentServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDocumentServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDocumentServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DocumentServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DocumentServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DocumentServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DocumentServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getDocumentSettings = settingsBuilder.getDocumentSettings().build(); + listDocumentsSettings = settingsBuilder.listDocumentsSettings().build(); + createDocumentSettings = settingsBuilder.createDocumentSettings().build(); + updateDocumentSettings = settingsBuilder.updateDocumentSettings().build(); + deleteDocumentSettings = settingsBuilder.deleteDocumentSettings().build(); + importDocumentsSettings = settingsBuilder.importDocumentsSettings().build(); + importDocumentsOperationSettings = settingsBuilder.importDocumentsOperationSettings().build(); + purgeDocumentsSettings = settingsBuilder.purgeDocumentsSettings().build(); + purgeDocumentsOperationSettings = settingsBuilder.purgeDocumentsOperationSettings().build(); + } + + /** Builder for DocumentServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getDocumentSettings; + private final PagedCallSettings.Builder< + ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse> + listDocumentsSettings; + private final UnaryCallSettings.Builder createDocumentSettings; + private final UnaryCallSettings.Builder updateDocumentSettings; + private final UnaryCallSettings.Builder deleteDocumentSettings; + private final UnaryCallSettings.Builder + importDocumentsSettings; + private final OperationCallSettings.Builder< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationSettings; + private final UnaryCallSettings.Builder + purgeDocumentsSettings; + private final OperationCallSettings.Builder< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(30000L)) + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDocumentsSettings = PagedCallSettings.newBuilder(LIST_DOCUMENTS_PAGE_STR_FACT); + createDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importDocumentsOperationSettings = OperationCallSettings.newBuilder(); + purgeDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + purgeDocumentsOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getDocumentSettings, + listDocumentsSettings, + createDocumentSettings, + updateDocumentSettings, + deleteDocumentSettings, + importDocumentsSettings, + purgeDocumentsSettings); + initDefaults(this); + } + + protected Builder(DocumentServiceStubSettings settings) { + super(settings); + + getDocumentSettings = settings.getDocumentSettings.toBuilder(); + listDocumentsSettings = settings.listDocumentsSettings.toBuilder(); + createDocumentSettings = settings.createDocumentSettings.toBuilder(); + updateDocumentSettings = settings.updateDocumentSettings.toBuilder(); + deleteDocumentSettings = settings.deleteDocumentSettings.toBuilder(); + importDocumentsSettings = settings.importDocumentsSettings.toBuilder(); + importDocumentsOperationSettings = settings.importDocumentsOperationSettings.toBuilder(); + purgeDocumentsSettings = settings.purgeDocumentsSettings.toBuilder(); + purgeDocumentsOperationSettings = settings.purgeDocumentsOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getDocumentSettings, + listDocumentsSettings, + createDocumentSettings, + updateDocumentSettings, + deleteDocumentSettings, + importDocumentsSettings, + purgeDocumentsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getDocumentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listDocumentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createDocumentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateDocumentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteDocumentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .importDocumentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .purgeDocumentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .importDocumentsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportDocumentsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ImportDocumentsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .purgeDocumentsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PurgeDocumentsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PurgeDocumentsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getDocument. */ + public UnaryCallSettings.Builder getDocumentSettings() { + return getDocumentSettings; + } + + /** Returns the builder for the settings used for calls to listDocuments. */ + public PagedCallSettings.Builder< + ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse> + listDocumentsSettings() { + return listDocumentsSettings; + } + + /** Returns the builder for the settings used for calls to createDocument. */ + public UnaryCallSettings.Builder createDocumentSettings() { + return createDocumentSettings; + } + + /** Returns the builder for the settings used for calls to updateDocument. */ + public UnaryCallSettings.Builder updateDocumentSettings() { + return updateDocumentSettings; + } + + /** Returns the builder for the settings used for calls to deleteDocument. */ + public UnaryCallSettings.Builder deleteDocumentSettings() { + return deleteDocumentSettings; + } + + /** Returns the builder for the settings used for calls to importDocuments. */ + public UnaryCallSettings.Builder importDocumentsSettings() { + return importDocumentsSettings; + } + + /** Returns the builder for the settings used for calls to importDocuments. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationSettings() { + return importDocumentsOperationSettings; + } + + /** Returns the builder for the settings used for calls to purgeDocuments. */ + public UnaryCallSettings.Builder purgeDocumentsSettings() { + return purgeDocumentsSettings; + } + + /** Returns the builder for the settings used for calls to purgeDocuments. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationSettings() { + return purgeDocumentsOperationSettings; + } + + @Override + public DocumentServiceStubSettings build() throws IOException { + return new DocumentServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcCompletionServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcCompletionServiceCallableFactory.java new file mode 100644 index 000000000000..020b0b906da2 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcCompletionServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the CompletionService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCompletionServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcCompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcCompletionServiceStub.java new file mode 100644 index 000000000000..b065e19f9896 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcCompletionServiceStub.java @@ -0,0 +1,166 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the CompletionService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCompletionServiceStub extends CompletionServiceStub { + private static final MethodDescriptor + completeQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.CompletionService/CompleteQuery") + .setRequestMarshaller( + ProtoUtils.marshaller(CompleteQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CompleteQueryResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable completeQueryCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCompletionServiceStub create(CompletionServiceStubSettings settings) + throws IOException { + return new GrpcCompletionServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCompletionServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcCompletionServiceStub( + CompletionServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCompletionServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCompletionServiceStub( + CompletionServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCompletionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcCompletionServiceStub( + CompletionServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcCompletionServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcCompletionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcCompletionServiceStub( + CompletionServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings completeQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(completeQueryMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_store", String.valueOf(request.getDataStore())); + return builder.build(); + }) + .build(); + + this.completeQueryCallable = + callableFactory.createUnaryCallable( + completeQueryTransportSettings, settings.completeQuerySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable completeQueryCallable() { + return completeQueryCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcConversationalSearchServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcConversationalSearchServiceCallableFactory.java new file mode 100644 index 000000000000..5d2327263815 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcConversationalSearchServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ConversationalSearchService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcConversationalSearchServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcConversationalSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcConversationalSearchServiceStub.java new file mode 100644 index 000000000000..94c2d0f55c9d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcConversationalSearchServiceStub.java @@ -0,0 +1,360 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient.ListConversationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.GetConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ConversationalSearchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcConversationalSearchServiceStub extends ConversationalSearchServiceStub { + private static final MethodDescriptor + converseConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/ConverseConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(ConverseConversationRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ConverseConversationResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/CreateConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateConversationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Conversation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/DeleteConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteConversationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/UpdateConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateConversationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Conversation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getConversationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/GetConversation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetConversationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Conversation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listConversationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/ListConversations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListConversationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListConversationsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + converseConversationCallable; + private final UnaryCallable createConversationCallable; + private final UnaryCallable deleteConversationCallable; + private final UnaryCallable updateConversationCallable; + private final UnaryCallable getConversationCallable; + private final UnaryCallable + listConversationsCallable; + private final UnaryCallable + listConversationsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcConversationalSearchServiceStub create( + ConversationalSearchServiceStubSettings settings) throws IOException { + return new GrpcConversationalSearchServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcConversationalSearchServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcConversationalSearchServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcConversationalSearchServiceStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcConversationalSearchServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcConversationalSearchServiceStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + converseConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(converseConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "conversation.name", String.valueOf(request.getConversation().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getConversationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConversationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listConversationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listConversationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.converseConversationCallable = + callableFactory.createUnaryCallable( + converseConversationTransportSettings, + settings.converseConversationSettings(), + clientContext); + this.createConversationCallable = + callableFactory.createUnaryCallable( + createConversationTransportSettings, + settings.createConversationSettings(), + clientContext); + this.deleteConversationCallable = + callableFactory.createUnaryCallable( + deleteConversationTransportSettings, + settings.deleteConversationSettings(), + clientContext); + this.updateConversationCallable = + callableFactory.createUnaryCallable( + updateConversationTransportSettings, + settings.updateConversationSettings(), + clientContext); + this.getConversationCallable = + callableFactory.createUnaryCallable( + getConversationTransportSettings, settings.getConversationSettings(), clientContext); + this.listConversationsCallable = + callableFactory.createUnaryCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + this.listConversationsPagedCallable = + callableFactory.createPagedCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + converseConversationCallable() { + return converseConversationCallable; + } + + @Override + public UnaryCallable createConversationCallable() { + return createConversationCallable; + } + + @Override + public UnaryCallable deleteConversationCallable() { + return deleteConversationCallable; + } + + @Override + public UnaryCallable updateConversationCallable() { + return updateConversationCallable; + } + + @Override + public UnaryCallable getConversationCallable() { + return getConversationCallable; + } + + @Override + public UnaryCallable + listConversationsCallable() { + return listConversationsCallable; + } + + @Override + public UnaryCallable + listConversationsPagedCallable() { + return listConversationsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceCallableFactory.java new file mode 100644 index 000000000000..1c718e1f76bc --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the DocumentService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDocumentServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceStub.java new file mode 100644 index 000000000000..22ff0ba42656 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcDocumentServiceStub.java @@ -0,0 +1,400 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient.ListDocumentsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DocumentService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDocumentServiceStub extends DocumentServiceStub { + private static final MethodDescriptor getDocumentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.DocumentService/GetDocument") + .setRequestMarshaller(ProtoUtils.marshaller(GetDocumentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDocumentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/ListDocuments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDocumentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDocumentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDocumentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/CreateDocument") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDocumentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDocumentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/UpdateDocument") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDocumentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDocumentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/DeleteDocument") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDocumentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importDocumentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/ImportDocuments") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportDocumentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + purgeDocumentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/PurgeDocuments") + .setRequestMarshaller( + ProtoUtils.marshaller(PurgeDocumentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable getDocumentCallable; + private final UnaryCallable listDocumentsCallable; + private final UnaryCallable + listDocumentsPagedCallable; + private final UnaryCallable createDocumentCallable; + private final UnaryCallable updateDocumentCallable; + private final UnaryCallable deleteDocumentCallable; + private final UnaryCallable importDocumentsCallable; + private final OperationCallable< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationCallable; + private final UnaryCallable purgeDocumentsCallable; + private final OperationCallable< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDocumentServiceStub create(DocumentServiceStubSettings settings) + throws IOException { + return new GrpcDocumentServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDocumentServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDocumentServiceStub( + DocumentServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDocumentServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDocumentServiceStub( + DocumentServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDocumentServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDocumentServiceStub( + DocumentServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDocumentServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDocumentServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDocumentServiceStub( + DocumentServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getDocumentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDocumentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listDocumentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDocumentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createDocumentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDocumentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDocumentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDocumentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("document.name", String.valueOf(request.getDocument().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDocumentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDocumentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings importDocumentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importDocumentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings purgeDocumentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeDocumentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.getDocumentCallable = + callableFactory.createUnaryCallable( + getDocumentTransportSettings, settings.getDocumentSettings(), clientContext); + this.listDocumentsCallable = + callableFactory.createUnaryCallable( + listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext); + this.listDocumentsPagedCallable = + callableFactory.createPagedCallable( + listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext); + this.createDocumentCallable = + callableFactory.createUnaryCallable( + createDocumentTransportSettings, settings.createDocumentSettings(), clientContext); + this.updateDocumentCallable = + callableFactory.createUnaryCallable( + updateDocumentTransportSettings, settings.updateDocumentSettings(), clientContext); + this.deleteDocumentCallable = + callableFactory.createUnaryCallable( + deleteDocumentTransportSettings, settings.deleteDocumentSettings(), clientContext); + this.importDocumentsCallable = + callableFactory.createUnaryCallable( + importDocumentsTransportSettings, settings.importDocumentsSettings(), clientContext); + this.importDocumentsOperationCallable = + callableFactory.createOperationCallable( + importDocumentsTransportSettings, + settings.importDocumentsOperationSettings(), + clientContext, + operationsStub); + this.purgeDocumentsCallable = + callableFactory.createUnaryCallable( + purgeDocumentsTransportSettings, settings.purgeDocumentsSettings(), clientContext); + this.purgeDocumentsOperationCallable = + callableFactory.createOperationCallable( + purgeDocumentsTransportSettings, + settings.purgeDocumentsOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getDocumentCallable() { + return getDocumentCallable; + } + + @Override + public UnaryCallable listDocumentsCallable() { + return listDocumentsCallable; + } + + @Override + public UnaryCallable + listDocumentsPagedCallable() { + return listDocumentsPagedCallable; + } + + @Override + public UnaryCallable createDocumentCallable() { + return createDocumentCallable; + } + + @Override + public UnaryCallable updateDocumentCallable() { + return updateDocumentCallable; + } + + @Override + public UnaryCallable deleteDocumentCallable() { + return deleteDocumentCallable; + } + + @Override + public UnaryCallable importDocumentsCallable() { + return importDocumentsCallable; + } + + @Override + public OperationCallable + importDocumentsOperationCallable() { + return importDocumentsOperationCallable; + } + + @Override + public UnaryCallable purgeDocumentsCallable() { + return purgeDocumentsCallable; + } + + @Override + public OperationCallable + purgeDocumentsOperationCallable() { + return purgeDocumentsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRecommendationServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRecommendationServiceCallableFactory.java new file mode 100644 index 000000000000..beae336b94b8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRecommendationServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the RecommendationService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcRecommendationServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRecommendationServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRecommendationServiceStub.java new file mode 100644 index 000000000000..efabaf4123cf --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcRecommendationServiceStub.java @@ -0,0 +1,164 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RecommendRequest; +import com.google.cloud.discoveryengine.v1alpha.RecommendResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the RecommendationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcRecommendationServiceStub extends RecommendationServiceStub { + private static final MethodDescriptor + recommendMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.RecommendationService/Recommend") + .setRequestMarshaller(ProtoUtils.marshaller(RecommendRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RecommendResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable recommendCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcRecommendationServiceStub create( + RecommendationServiceStubSettings settings) throws IOException { + return new GrpcRecommendationServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcRecommendationServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcRecommendationServiceStub( + RecommendationServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcRecommendationServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcRecommendationServiceStub( + RecommendationServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcRecommendationServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcRecommendationServiceStub( + RecommendationServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcRecommendationServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcRecommendationServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcRecommendationServiceStub( + RecommendationServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings recommendTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(recommendMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("serving_config", String.valueOf(request.getServingConfig())); + return builder.build(); + }) + .build(); + + this.recommendCallable = + callableFactory.createUnaryCallable( + recommendTransportSettings, settings.recommendSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable recommendCallable() { + return recommendCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSchemaServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSchemaServiceCallableFactory.java new file mode 100644 index 000000000000..04dcbe7649b1 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSchemaServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SchemaService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSchemaServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSchemaServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSchemaServiceStub.java new file mode 100644 index 000000000000..39f3a563d410 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSchemaServiceStub.java @@ -0,0 +1,338 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient.ListSchemasPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SchemaService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSchemaServiceStub extends SchemaServiceStub { + private static final MethodDescriptor getSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/GetSchema") + .setRequestMarshaller(ProtoUtils.marshaller(GetSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSchemasMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/ListSchemas") + .setRequestMarshaller(ProtoUtils.marshaller(ListSchemasRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSchemasResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/CreateSchema") + .setRequestMarshaller(ProtoUtils.marshaller(CreateSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/UpdateSchema") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/DeleteSchema") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable getSchemaCallable; + private final UnaryCallable listSchemasCallable; + private final UnaryCallable + listSchemasPagedCallable; + private final UnaryCallable createSchemaCallable; + private final OperationCallable + createSchemaOperationCallable; + private final UnaryCallable updateSchemaCallable; + private final OperationCallable + updateSchemaOperationCallable; + private final UnaryCallable deleteSchemaCallable; + private final OperationCallable + deleteSchemaOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcSchemaServiceStub create(SchemaServiceStubSettings settings) + throws IOException { + return new GrpcSchemaServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcSchemaServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcSchemaServiceStub(SchemaServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSchemaServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSchemaServiceStub( + SchemaServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSchemaServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcSchemaServiceStub(SchemaServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcSchemaServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcSchemaServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcSchemaServiceStub( + SchemaServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSchemasTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSchemasMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("schema.name", String.valueOf(request.getSchema().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.getSchemaCallable = + callableFactory.createUnaryCallable( + getSchemaTransportSettings, settings.getSchemaSettings(), clientContext); + this.listSchemasCallable = + callableFactory.createUnaryCallable( + listSchemasTransportSettings, settings.listSchemasSettings(), clientContext); + this.listSchemasPagedCallable = + callableFactory.createPagedCallable( + listSchemasTransportSettings, settings.listSchemasSettings(), clientContext); + this.createSchemaCallable = + callableFactory.createUnaryCallable( + createSchemaTransportSettings, settings.createSchemaSettings(), clientContext); + this.createSchemaOperationCallable = + callableFactory.createOperationCallable( + createSchemaTransportSettings, + settings.createSchemaOperationSettings(), + clientContext, + operationsStub); + this.updateSchemaCallable = + callableFactory.createUnaryCallable( + updateSchemaTransportSettings, settings.updateSchemaSettings(), clientContext); + this.updateSchemaOperationCallable = + callableFactory.createOperationCallable( + updateSchemaTransportSettings, + settings.updateSchemaOperationSettings(), + clientContext, + operationsStub); + this.deleteSchemaCallable = + callableFactory.createUnaryCallable( + deleteSchemaTransportSettings, settings.deleteSchemaSettings(), clientContext); + this.deleteSchemaOperationCallable = + callableFactory.createOperationCallable( + deleteSchemaTransportSettings, + settings.deleteSchemaOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getSchemaCallable() { + return getSchemaCallable; + } + + @Override + public UnaryCallable listSchemasCallable() { + return listSchemasCallable; + } + + @Override + public UnaryCallable listSchemasPagedCallable() { + return listSchemasPagedCallable; + } + + @Override + public UnaryCallable createSchemaCallable() { + return createSchemaCallable; + } + + @Override + public OperationCallable + createSchemaOperationCallable() { + return createSchemaOperationCallable; + } + + @Override + public UnaryCallable updateSchemaCallable() { + return updateSchemaCallable; + } + + @Override + public OperationCallable + updateSchemaOperationCallable() { + return updateSchemaOperationCallable; + } + + @Override + public UnaryCallable deleteSchemaCallable() { + return deleteSchemaCallable; + } + + @Override + public OperationCallable + deleteSchemaOperationCallable() { + return deleteSchemaOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSearchServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSearchServiceCallableFactory.java new file mode 100644 index 000000000000..313ce9d20149 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSearchServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SearchService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSearchServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSearchServiceStub.java new file mode 100644 index 000000000000..e67789d8c522 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSearchServiceStub.java @@ -0,0 +1,171 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SearchServiceClient.SearchPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.SearchResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SearchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSearchServiceStub extends SearchServiceStub { + private static final MethodDescriptor searchMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SearchService/Search") + .setRequestMarshaller(ProtoUtils.marshaller(SearchRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable searchCallable; + private final UnaryCallable searchPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcSearchServiceStub create(SearchServiceStubSettings settings) + throws IOException { + return new GrpcSearchServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcSearchServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcSearchServiceStub(SearchServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSearchServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSearchServiceStub( + SearchServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSearchServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcSearchServiceStub(SearchServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcSearchServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcSearchServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcSearchServiceStub( + SearchServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings searchTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("serving_config", String.valueOf(request.getServingConfig())); + return builder.build(); + }) + .build(); + + this.searchCallable = + callableFactory.createUnaryCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + this.searchPagedCallable = + callableFactory.createPagedCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable searchCallable() { + return searchCallable; + } + + @Override + public UnaryCallable searchPagedCallable() { + return searchPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSiteSearchEngineServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSiteSearchEngineServiceCallableFactory.java new file mode 100644 index 000000000000..dfa3fbe9d4f2 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSiteSearchEngineServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SiteSearchEngineService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSiteSearchEngineServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSiteSearchEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSiteSearchEngineServiceStub.java new file mode 100644 index 000000000000..0f2dc004ab09 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcSiteSearchEngineServiceStub.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SiteSearchEngineService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSiteSearchEngineServiceStub extends SiteSearchEngineServiceStub { + private static final MethodDescriptor recrawlUrisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.SiteSearchEngineService/RecrawlUris") + .setRequestMarshaller(ProtoUtils.marshaller(RecrawlUrisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable recrawlUrisCallable; + private final OperationCallable + recrawlUrisOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcSiteSearchEngineServiceStub create( + SiteSearchEngineServiceStubSettings settings) throws IOException { + return new GrpcSiteSearchEngineServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcSiteSearchEngineServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSiteSearchEngineServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSiteSearchEngineServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcSiteSearchEngineServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcSiteSearchEngineServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings recrawlUrisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(recrawlUrisMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("site_search_engine", String.valueOf(request.getSiteSearchEngine())); + return builder.build(); + }) + .build(); + + this.recrawlUrisCallable = + callableFactory.createUnaryCallable( + recrawlUrisTransportSettings, settings.recrawlUrisSettings(), clientContext); + this.recrawlUrisOperationCallable = + callableFactory.createOperationCallable( + recrawlUrisTransportSettings, + settings.recrawlUrisOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable recrawlUrisCallable() { + return recrawlUrisCallable; + } + + @Override + public OperationCallable + recrawlUrisOperationCallable() { + return recrawlUrisOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcUserEventServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcUserEventServiceCallableFactory.java new file mode 100644 index 000000000000..0710a2d938e9 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcUserEventServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the UserEventService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcUserEventServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcUserEventServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcUserEventServiceStub.java new file mode 100644 index 000000000000..3f9e80585a89 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/GrpcUserEventServiceStub.java @@ -0,0 +1,296 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.HttpBody; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the UserEventService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcUserEventServiceStub extends UserEventServiceStub { + private static final MethodDescriptor + writeUserEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/WriteUserEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(WriteUserEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserEvent.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + collectUserEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/CollectUserEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(CollectUserEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + purgeUserEventsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/PurgeUserEvents") + .setRequestMarshaller( + ProtoUtils.marshaller(PurgeUserEventsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importUserEventsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/ImportUserEvents") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportUserEventsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable writeUserEventCallable; + private final UnaryCallable collectUserEventCallable; + private final UnaryCallable purgeUserEventsCallable; + private final OperationCallable< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationCallable; + private final UnaryCallable importUserEventsCallable; + private final OperationCallable< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcUserEventServiceStub create(UserEventServiceStubSettings settings) + throws IOException { + return new GrpcUserEventServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcUserEventServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcUserEventServiceStub( + UserEventServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcUserEventServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcUserEventServiceStub( + UserEventServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcUserEventServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcUserEventServiceStub( + UserEventServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcUserEventServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcUserEventServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcUserEventServiceStub( + UserEventServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings writeUserEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(writeUserEventMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings collectUserEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(collectUserEventMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings purgeUserEventsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeUserEventsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings importUserEventsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importUserEventsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.writeUserEventCallable = + callableFactory.createUnaryCallable( + writeUserEventTransportSettings, settings.writeUserEventSettings(), clientContext); + this.collectUserEventCallable = + callableFactory.createUnaryCallable( + collectUserEventTransportSettings, settings.collectUserEventSettings(), clientContext); + this.purgeUserEventsCallable = + callableFactory.createUnaryCallable( + purgeUserEventsTransportSettings, settings.purgeUserEventsSettings(), clientContext); + this.purgeUserEventsOperationCallable = + callableFactory.createOperationCallable( + purgeUserEventsTransportSettings, + settings.purgeUserEventsOperationSettings(), + clientContext, + operationsStub); + this.importUserEventsCallable = + callableFactory.createUnaryCallable( + importUserEventsTransportSettings, settings.importUserEventsSettings(), clientContext); + this.importUserEventsOperationCallable = + callableFactory.createOperationCallable( + importUserEventsTransportSettings, + settings.importUserEventsOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable writeUserEventCallable() { + return writeUserEventCallable; + } + + @Override + public UnaryCallable collectUserEventCallable() { + return collectUserEventCallable; + } + + @Override + public UnaryCallable purgeUserEventsCallable() { + return purgeUserEventsCallable; + } + + @Override + public OperationCallable + purgeUserEventsOperationCallable() { + return purgeUserEventsOperationCallable; + } + + @Override + public UnaryCallable importUserEventsCallable() { + return importUserEventsCallable; + } + + @Override + public OperationCallable< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationCallable() { + return importUserEventsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceCallableFactory.java new file mode 100644 index 000000000000..911d0b88dc8d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the CompletionService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCompletionServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceStub.java new file mode 100644 index 000000000000..a8a8e87d5385 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonCompletionServiceStub.java @@ -0,0 +1,211 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the CompletionService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCompletionServiceStub extends CompletionServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + completeQueryMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.CompletionService/CompleteQuery") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{dataStore=projects/*/locations/*/dataStores/*}:completeQuery", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "dataStore", request.getDataStore()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{dataStore=projects/*/locations/*/collections/*/dataStores/*}:completeQuery") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, + "includeTailSuggestions", + request.getIncludeTailSuggestions()); + serializer.putQueryParam(fields, "query", request.getQuery()); + serializer.putQueryParam(fields, "queryModel", request.getQueryModel()); + serializer.putQueryParam( + fields, "userPseudoId", request.getUserPseudoId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CompleteQueryResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable completeQueryCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonCompletionServiceStub create(CompletionServiceStubSettings settings) + throws IOException { + return new HttpJsonCompletionServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonCompletionServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonCompletionServiceStub( + CompletionServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonCompletionServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonCompletionServiceStub( + CompletionServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonCompletionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonCompletionServiceStub( + CompletionServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonCompletionServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonCompletionServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonCompletionServiceStub( + CompletionServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + completeQueryTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(completeQueryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_store", String.valueOf(request.getDataStore())); + return builder.build(); + }) + .build(); + + this.completeQueryCallable = + callableFactory.createUnaryCallable( + completeQueryTransportSettings, settings.completeQuerySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(completeQueryMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable completeQueryCallable() { + return completeQueryCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonConversationalSearchServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonConversationalSearchServiceCallableFactory.java new file mode 100644 index 000000000000..3a1fd9834e7b --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonConversationalSearchServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ConversationalSearchService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonConversationalSearchServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonConversationalSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonConversationalSearchServiceStub.java new file mode 100644 index 000000000000..f704a254128e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonConversationalSearchServiceStub.java @@ -0,0 +1,555 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient.ListConversationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.GetConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ConversationalSearchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonConversationalSearchServiceStub extends ConversationalSearchServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor< + ConverseConversationRequest, ConverseConversationResponse> + converseConversationMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/ConverseConversation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ConverseConversationResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createConversationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/CreateConversation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/conversations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("conversation", request.getConversation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Conversation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteConversationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/DeleteConversation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/conversations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateConversationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/UpdateConversation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "conversation.name", request.getConversation().getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("conversation", request.getConversation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Conversation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getConversationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/GetConversation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/conversations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Conversation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listConversationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService/ListConversations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/conversations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListConversationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + converseConversationCallable; + private final UnaryCallable createConversationCallable; + private final UnaryCallable deleteConversationCallable; + private final UnaryCallable updateConversationCallable; + private final UnaryCallable getConversationCallable; + private final UnaryCallable + listConversationsCallable; + private final UnaryCallable + listConversationsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonConversationalSearchServiceStub create( + ConversationalSearchServiceStubSettings settings) throws IOException { + return new HttpJsonConversationalSearchServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonConversationalSearchServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonConversationalSearchServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonConversationalSearchServiceStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected HttpJsonConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonConversationalSearchServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonConversationalSearchServiceStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected HttpJsonConversationalSearchServiceStub( + ConversationalSearchServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + converseConversationTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(converseConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createConversationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteConversationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateConversationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "conversation.name", String.valueOf(request.getConversation().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getConversationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getConversationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listConversationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listConversationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.converseConversationCallable = + callableFactory.createUnaryCallable( + converseConversationTransportSettings, + settings.converseConversationSettings(), + clientContext); + this.createConversationCallable = + callableFactory.createUnaryCallable( + createConversationTransportSettings, + settings.createConversationSettings(), + clientContext); + this.deleteConversationCallable = + callableFactory.createUnaryCallable( + deleteConversationTransportSettings, + settings.deleteConversationSettings(), + clientContext); + this.updateConversationCallable = + callableFactory.createUnaryCallable( + updateConversationTransportSettings, + settings.updateConversationSettings(), + clientContext); + this.getConversationCallable = + callableFactory.createUnaryCallable( + getConversationTransportSettings, settings.getConversationSettings(), clientContext); + this.listConversationsCallable = + callableFactory.createUnaryCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + this.listConversationsPagedCallable = + callableFactory.createPagedCallable( + listConversationsTransportSettings, + settings.listConversationsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(converseConversationMethodDescriptor); + methodDescriptors.add(createConversationMethodDescriptor); + methodDescriptors.add(deleteConversationMethodDescriptor); + methodDescriptors.add(updateConversationMethodDescriptor); + methodDescriptors.add(getConversationMethodDescriptor); + methodDescriptors.add(listConversationsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + converseConversationCallable() { + return converseConversationCallable; + } + + @Override + public UnaryCallable createConversationCallable() { + return createConversationCallable; + } + + @Override + public UnaryCallable deleteConversationCallable() { + return deleteConversationCallable; + } + + @Override + public UnaryCallable updateConversationCallable() { + return updateConversationCallable; + } + + @Override + public UnaryCallable getConversationCallable() { + return getConversationCallable; + } + + @Override + public UnaryCallable + listConversationsCallable() { + return listConversationsCallable; + } + + @Override + public UnaryCallable + listConversationsPagedCallable() { + return listConversationsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceCallableFactory.java new file mode 100644 index 000000000000..9058b11951e0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the DocumentService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonDocumentServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceStub.java new file mode 100644 index 000000000000..4dd7d91f6735 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonDocumentServiceStub.java @@ -0,0 +1,781 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient.ListDocumentsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DocumentService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonDocumentServiceStub extends DocumentServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(PurgeDocumentsMetadata.getDescriptor()) + .add(PurgeDocumentsResponse.getDescriptor()) + .add(ImportDocumentsResponse.getDescriptor()) + .add(ImportDocumentsMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + getDocumentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.DocumentService/GetDocument") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Document.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listDocumentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/ListDocuments") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDocumentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDocumentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/CreateDocument") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "documentId", request.getDocumentId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("document", request.getDocument(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Document.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateDocumentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/UpdateDocument") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "document.name", request.getDocument().getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("document", request.getDocument(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Document.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteDocumentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/DeleteDocument") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + importDocumentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/ImportDocuments") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportDocumentsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + purgeDocumentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.DocumentService/PurgeDocuments") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (PurgeDocumentsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable getDocumentCallable; + private final UnaryCallable listDocumentsCallable; + private final UnaryCallable + listDocumentsPagedCallable; + private final UnaryCallable createDocumentCallable; + private final UnaryCallable updateDocumentCallable; + private final UnaryCallable deleteDocumentCallable; + private final UnaryCallable importDocumentsCallable; + private final OperationCallable< + ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata> + importDocumentsOperationCallable; + private final UnaryCallable purgeDocumentsCallable; + private final OperationCallable< + PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata> + purgeDocumentsOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDocumentServiceStub create(DocumentServiceStubSettings settings) + throws IOException { + return new HttpJsonDocumentServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDocumentServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDocumentServiceStub( + DocumentServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDocumentServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDocumentServiceStub( + DocumentServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDocumentServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonDocumentServiceStub( + DocumentServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDocumentServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDocumentServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonDocumentServiceStub( + DocumentServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings getDocumentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDocumentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listDocumentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDocumentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createDocumentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDocumentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateDocumentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDocumentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("document.name", String.valueOf(request.getDocument().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteDocumentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDocumentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings importDocumentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importDocumentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings purgeDocumentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(purgeDocumentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.getDocumentCallable = + callableFactory.createUnaryCallable( + getDocumentTransportSettings, settings.getDocumentSettings(), clientContext); + this.listDocumentsCallable = + callableFactory.createUnaryCallable( + listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext); + this.listDocumentsPagedCallable = + callableFactory.createPagedCallable( + listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext); + this.createDocumentCallable = + callableFactory.createUnaryCallable( + createDocumentTransportSettings, settings.createDocumentSettings(), clientContext); + this.updateDocumentCallable = + callableFactory.createUnaryCallable( + updateDocumentTransportSettings, settings.updateDocumentSettings(), clientContext); + this.deleteDocumentCallable = + callableFactory.createUnaryCallable( + deleteDocumentTransportSettings, settings.deleteDocumentSettings(), clientContext); + this.importDocumentsCallable = + callableFactory.createUnaryCallable( + importDocumentsTransportSettings, settings.importDocumentsSettings(), clientContext); + this.importDocumentsOperationCallable = + callableFactory.createOperationCallable( + importDocumentsTransportSettings, + settings.importDocumentsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.purgeDocumentsCallable = + callableFactory.createUnaryCallable( + purgeDocumentsTransportSettings, settings.purgeDocumentsSettings(), clientContext); + this.purgeDocumentsOperationCallable = + callableFactory.createOperationCallable( + purgeDocumentsTransportSettings, + settings.purgeDocumentsOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getDocumentMethodDescriptor); + methodDescriptors.add(listDocumentsMethodDescriptor); + methodDescriptors.add(createDocumentMethodDescriptor); + methodDescriptors.add(updateDocumentMethodDescriptor); + methodDescriptors.add(deleteDocumentMethodDescriptor); + methodDescriptors.add(importDocumentsMethodDescriptor); + methodDescriptors.add(purgeDocumentsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable getDocumentCallable() { + return getDocumentCallable; + } + + @Override + public UnaryCallable listDocumentsCallable() { + return listDocumentsCallable; + } + + @Override + public UnaryCallable + listDocumentsPagedCallable() { + return listDocumentsPagedCallable; + } + + @Override + public UnaryCallable createDocumentCallable() { + return createDocumentCallable; + } + + @Override + public UnaryCallable updateDocumentCallable() { + return updateDocumentCallable; + } + + @Override + public UnaryCallable deleteDocumentCallable() { + return deleteDocumentCallable; + } + + @Override + public UnaryCallable importDocumentsCallable() { + return importDocumentsCallable; + } + + @Override + public OperationCallable + importDocumentsOperationCallable() { + return importDocumentsOperationCallable; + } + + @Override + public UnaryCallable purgeDocumentsCallable() { + return purgeDocumentsCallable; + } + + @Override + public OperationCallable + purgeDocumentsOperationCallable() { + return purgeDocumentsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRecommendationServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRecommendationServiceCallableFactory.java new file mode 100644 index 000000000000..6b91badbfbb5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRecommendationServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the RecommendationService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonRecommendationServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRecommendationServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRecommendationServiceStub.java new file mode 100644 index 000000000000..784382f09196 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonRecommendationServiceStub.java @@ -0,0 +1,210 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RecommendRequest; +import com.google.cloud.discoveryengine.v1alpha.RecommendResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the RecommendationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonRecommendationServiceStub extends RecommendationServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + recommendMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.RecommendationService/Recommend") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{servingConfig=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "servingConfig", request.getServingConfig()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{servingConfig=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:recommend", + "/v1alpha/{servingConfig=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:recommend") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearServingConfig().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RecommendResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable recommendCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonRecommendationServiceStub create( + RecommendationServiceStubSettings settings) throws IOException { + return new HttpJsonRecommendationServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonRecommendationServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonRecommendationServiceStub( + RecommendationServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonRecommendationServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonRecommendationServiceStub( + RecommendationServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonRecommendationServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonRecommendationServiceStub( + RecommendationServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonRecommendationServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonRecommendationServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonRecommendationServiceStub( + RecommendationServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings recommendTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(recommendMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("serving_config", String.valueOf(request.getServingConfig())); + return builder.build(); + }) + .build(); + + this.recommendCallable = + callableFactory.createUnaryCallable( + recommendTransportSettings, settings.recommendSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(recommendMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable recommendCallable() { + return recommendCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceCallableFactory.java new file mode 100644 index 000000000000..2f6f25e0c6a0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the SchemaService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSchemaServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceStub.java new file mode 100644 index 000000000000..65efc97161d5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSchemaServiceStub.java @@ -0,0 +1,665 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient.ListSchemasPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the SchemaService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSchemaServiceStub extends SchemaServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Schema.getDescriptor()) + .add(Empty.getDescriptor()) + .add(UpdateSchemaMetadata.getDescriptor()) + .add(DeleteSchemaMetadata.getDescriptor()) + .add(CreateSchemaMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor getSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/GetSchema") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/schemas/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Schema.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSchemasMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/ListSchemas") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/schemas", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSchemasResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/CreateSchema") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/schemas", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "schemaId", request.getSchemaId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("schema", request.getSchema(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateSchemaRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/UpdateSchema") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "schema.name", request.getSchema().getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("schema", request.getSchema(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateSchemaRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SchemaService/DeleteSchema") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/schemas/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteSchemaRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable getSchemaCallable; + private final UnaryCallable listSchemasCallable; + private final UnaryCallable + listSchemasPagedCallable; + private final UnaryCallable createSchemaCallable; + private final OperationCallable + createSchemaOperationCallable; + private final UnaryCallable updateSchemaCallable; + private final OperationCallable + updateSchemaOperationCallable; + private final UnaryCallable deleteSchemaCallable; + private final OperationCallable + deleteSchemaOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonSchemaServiceStub create(SchemaServiceStubSettings settings) + throws IOException { + return new HttpJsonSchemaServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonSchemaServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonSchemaServiceStub( + SchemaServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonSchemaServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonSchemaServiceStub( + SchemaServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonSchemaServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSchemaServiceStub( + SchemaServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonSchemaServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonSchemaServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSchemaServiceStub( + SchemaServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings getSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSchemasTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSchemasMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("schema.name", String.valueOf(request.getSchema().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.getSchemaCallable = + callableFactory.createUnaryCallable( + getSchemaTransportSettings, settings.getSchemaSettings(), clientContext); + this.listSchemasCallable = + callableFactory.createUnaryCallable( + listSchemasTransportSettings, settings.listSchemasSettings(), clientContext); + this.listSchemasPagedCallable = + callableFactory.createPagedCallable( + listSchemasTransportSettings, settings.listSchemasSettings(), clientContext); + this.createSchemaCallable = + callableFactory.createUnaryCallable( + createSchemaTransportSettings, settings.createSchemaSettings(), clientContext); + this.createSchemaOperationCallable = + callableFactory.createOperationCallable( + createSchemaTransportSettings, + settings.createSchemaOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateSchemaCallable = + callableFactory.createUnaryCallable( + updateSchemaTransportSettings, settings.updateSchemaSettings(), clientContext); + this.updateSchemaOperationCallable = + callableFactory.createOperationCallable( + updateSchemaTransportSettings, + settings.updateSchemaOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteSchemaCallable = + callableFactory.createUnaryCallable( + deleteSchemaTransportSettings, settings.deleteSchemaSettings(), clientContext); + this.deleteSchemaOperationCallable = + callableFactory.createOperationCallable( + deleteSchemaTransportSettings, + settings.deleteSchemaOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getSchemaMethodDescriptor); + methodDescriptors.add(listSchemasMethodDescriptor); + methodDescriptors.add(createSchemaMethodDescriptor); + methodDescriptors.add(updateSchemaMethodDescriptor); + methodDescriptors.add(deleteSchemaMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable getSchemaCallable() { + return getSchemaCallable; + } + + @Override + public UnaryCallable listSchemasCallable() { + return listSchemasCallable; + } + + @Override + public UnaryCallable listSchemasPagedCallable() { + return listSchemasPagedCallable; + } + + @Override + public UnaryCallable createSchemaCallable() { + return createSchemaCallable; + } + + @Override + public OperationCallable + createSchemaOperationCallable() { + return createSchemaOperationCallable; + } + + @Override + public UnaryCallable updateSchemaCallable() { + return updateSchemaCallable; + } + + @Override + public OperationCallable + updateSchemaOperationCallable() { + return updateSchemaOperationCallable; + } + + @Override + public UnaryCallable deleteSchemaCallable() { + return deleteSchemaCallable; + } + + @Override + public OperationCallable + deleteSchemaOperationCallable() { + return deleteSchemaOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchServiceCallableFactory.java new file mode 100644 index 000000000000..f6502a58163c --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the SearchService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSearchServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchServiceStub.java new file mode 100644 index 000000000000..a94ad1f65b6d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSearchServiceStub.java @@ -0,0 +1,216 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SearchServiceClient.SearchPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.SearchResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the SearchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSearchServiceStub extends SearchServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor searchMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1alpha.SearchService/Search") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{servingConfig=projects/*/locations/*/dataStores/*/servingConfigs/*}:search", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "servingConfig", request.getServingConfig()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{servingConfig=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search", + "/v1alpha/{servingConfig=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearServingConfig().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable searchCallable; + private final UnaryCallable searchPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonSearchServiceStub create(SearchServiceStubSettings settings) + throws IOException { + return new HttpJsonSearchServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonSearchServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonSearchServiceStub( + SearchServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonSearchServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonSearchServiceStub( + SearchServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonSearchServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSearchServiceStub( + SearchServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonSearchServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonSearchServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSearchServiceStub( + SearchServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings searchTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("serving_config", String.valueOf(request.getServingConfig())); + return builder.build(); + }) + .build(); + + this.searchCallable = + callableFactory.createUnaryCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + this.searchPagedCallable = + callableFactory.createPagedCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(searchMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable searchCallable() { + return searchCallable; + } + + @Override + public UnaryCallable searchPagedCallable() { + return searchPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceCallableFactory.java new file mode 100644 index 000000000000..4c7407be8088 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the SiteSearchEngineService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSiteSearchEngineServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceStub.java new file mode 100644 index 000000000000..596469d00307 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonSiteSearchEngineServiceStub.java @@ -0,0 +1,380 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the SiteSearchEngineService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSiteSearchEngineServiceStub extends SiteSearchEngineServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(RecrawlUrisResponse.getDescriptor()) + .add(RecrawlUrisMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + recrawlUrisMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.SiteSearchEngineService/RecrawlUris") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{siteSearchEngine=projects/*/locations/*/dataStores/*/siteSearchEngine}:recrawlUris", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "siteSearchEngine", request.getSiteSearchEngine()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{siteSearchEngine=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}:recrawlUris") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearSiteSearchEngine().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RecrawlUrisRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable recrawlUrisCallable; + private final OperationCallable + recrawlUrisOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonSiteSearchEngineServiceStub create( + SiteSearchEngineServiceStubSettings settings) throws IOException { + return new HttpJsonSiteSearchEngineServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonSiteSearchEngineServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonSiteSearchEngineServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonSiteSearchEngineServiceStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonSiteSearchEngineServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonSiteSearchEngineServiceStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonSiteSearchEngineServiceStub( + SiteSearchEngineServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings recrawlUrisTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(recrawlUrisMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("site_search_engine", String.valueOf(request.getSiteSearchEngine())); + return builder.build(); + }) + .build(); + + this.recrawlUrisCallable = + callableFactory.createUnaryCallable( + recrawlUrisTransportSettings, settings.recrawlUrisSettings(), clientContext); + this.recrawlUrisOperationCallable = + callableFactory.createOperationCallable( + recrawlUrisTransportSettings, + settings.recrawlUrisOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(recrawlUrisMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable recrawlUrisCallable() { + return recrawlUrisCallable; + } + + @Override + public OperationCallable + recrawlUrisOperationCallable() { + return recrawlUrisOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceCallableFactory.java new file mode 100644 index 000000000000..cf9fb0fbb6f8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the UserEventService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonUserEventServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceStub.java new file mode 100644 index 000000000000..507977394f2d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/HttpJsonUserEventServiceStub.java @@ -0,0 +1,589 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.HttpBody; +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the UserEventService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonUserEventServiceStub extends UserEventServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ImportUserEventsResponse.getDescriptor()) + .add(PurgeUserEventsResponse.getDescriptor()) + .add(PurgeUserEventsMetadata.getDescriptor()) + .add(ImportUserEventsMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + writeUserEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/WriteUserEvent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:write", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("userEvent", request.getUserEvent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserEvent.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + collectUserEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/CollectUserEvent") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + if (request.hasEts()) { + serializer.putQueryParam(fields, "ets", request.getEts()); + } + if (request.hasUri()) { + serializer.putQueryParam(fields, "uri", request.getUri()); + } + serializer.putQueryParam(fields, "userEvent", request.getUserEvent()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(HttpBody.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + purgeUserEventsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/PurgeUserEvents") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:purge", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:purge") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (PurgeUserEventsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + importUserEventsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1alpha.UserEventService/ImportUserEvents") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportUserEventsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable writeUserEventCallable; + private final UnaryCallable collectUserEventCallable; + private final UnaryCallable purgeUserEventsCallable; + private final OperationCallable< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationCallable; + private final UnaryCallable importUserEventsCallable; + private final OperationCallable< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonUserEventServiceStub create(UserEventServiceStubSettings settings) + throws IOException { + return new HttpJsonUserEventServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonUserEventServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonUserEventServiceStub( + UserEventServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonUserEventServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonUserEventServiceStub( + UserEventServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonUserEventServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonUserEventServiceStub( + UserEventServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonUserEventServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonUserEventServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonUserEventServiceStub( + UserEventServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/collections/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings writeUserEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(writeUserEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings collectUserEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(collectUserEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings purgeUserEventsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(purgeUserEventsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings importUserEventsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importUserEventsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.writeUserEventCallable = + callableFactory.createUnaryCallable( + writeUserEventTransportSettings, settings.writeUserEventSettings(), clientContext); + this.collectUserEventCallable = + callableFactory.createUnaryCallable( + collectUserEventTransportSettings, settings.collectUserEventSettings(), clientContext); + this.purgeUserEventsCallable = + callableFactory.createUnaryCallable( + purgeUserEventsTransportSettings, settings.purgeUserEventsSettings(), clientContext); + this.purgeUserEventsOperationCallable = + callableFactory.createOperationCallable( + purgeUserEventsTransportSettings, + settings.purgeUserEventsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.importUserEventsCallable = + callableFactory.createUnaryCallable( + importUserEventsTransportSettings, settings.importUserEventsSettings(), clientContext); + this.importUserEventsOperationCallable = + callableFactory.createOperationCallable( + importUserEventsTransportSettings, + settings.importUserEventsOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(writeUserEventMethodDescriptor); + methodDescriptors.add(collectUserEventMethodDescriptor); + methodDescriptors.add(purgeUserEventsMethodDescriptor); + methodDescriptors.add(importUserEventsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable writeUserEventCallable() { + return writeUserEventCallable; + } + + @Override + public UnaryCallable collectUserEventCallable() { + return collectUserEventCallable; + } + + @Override + public UnaryCallable purgeUserEventsCallable() { + return purgeUserEventsCallable; + } + + @Override + public OperationCallable + purgeUserEventsOperationCallable() { + return purgeUserEventsOperationCallable; + } + + @Override + public UnaryCallable importUserEventsCallable() { + return importUserEventsCallable; + } + + @Override + public OperationCallable< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationCallable() { + return importUserEventsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RecommendationServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RecommendationServiceStub.java new file mode 100644 index 000000000000..076005630ef0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RecommendationServiceStub.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RecommendRequest; +import com.google.cloud.discoveryengine.v1alpha.RecommendResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the RecommendationService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class RecommendationServiceStub implements BackgroundResource { + + public UnaryCallable recommendCallable() { + throw new UnsupportedOperationException("Not implemented: recommendCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RecommendationServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RecommendationServiceStubSettings.java new file mode 100644 index 000000000000..6fe86c730d71 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/RecommendationServiceStubSettings.java @@ -0,0 +1,330 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.RecommendRequest; +import com.google.cloud.discoveryengine.v1alpha.RecommendResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RecommendationServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of recommend to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceStubSettings.Builder recommendationServiceSettingsBuilder =
+ *     RecommendationServiceStubSettings.newBuilder();
+ * recommendationServiceSettingsBuilder
+ *     .recommendSettings()
+ *     .setRetrySettings(
+ *         recommendationServiceSettingsBuilder
+ *             .recommendSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * RecommendationServiceStubSettings recommendationServiceSettings =
+ *     recommendationServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class RecommendationServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings recommendSettings; + + /** Returns the object with the settings used for calls to recommend. */ + public UnaryCallSettings recommendSettings() { + return recommendSettings; + } + + public RecommendationServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcRecommendationServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonRecommendationServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(RecommendationServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(RecommendationServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RecommendationServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected RecommendationServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + recommendSettings = settingsBuilder.recommendSettings().build(); + } + + /** Builder for RecommendationServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder recommendSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ofMillis(5000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(5000L)) + .setTotalTimeout(Duration.ofMillis(5000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + recommendSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(recommendSettings); + initDefaults(this); + } + + protected Builder(RecommendationServiceStubSettings settings) { + super(settings); + + recommendSettings = settings.recommendSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(recommendSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .recommendSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to recommend. */ + public UnaryCallSettings.Builder recommendSettings() { + return recommendSettings; + } + + @Override + public RecommendationServiceStubSettings build() throws IOException { + return new RecommendationServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SchemaServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SchemaServiceStub.java new file mode 100644 index 000000000000..816101945e8f --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SchemaServiceStub.java @@ -0,0 +1,99 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient.ListSchemasPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SchemaService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class SchemaServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable getSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: getSchemaCallable()"); + } + + public UnaryCallable listSchemasPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSchemasPagedCallable()"); + } + + public UnaryCallable listSchemasCallable() { + throw new UnsupportedOperationException("Not implemented: listSchemasCallable()"); + } + + public OperationCallable + createSchemaOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createSchemaOperationCallable()"); + } + + public UnaryCallable createSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: createSchemaCallable()"); + } + + public OperationCallable + updateSchemaOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSchemaOperationCallable()"); + } + + public UnaryCallable updateSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: updateSchemaCallable()"); + } + + public OperationCallable + deleteSchemaOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSchemaOperationCallable()"); + } + + public UnaryCallable deleteSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSchemaCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SchemaServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SchemaServiceStubSettings.java new file mode 100644 index 000000000000..ebae00c56240 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SchemaServiceStubSettings.java @@ -0,0 +1,634 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient.ListSchemasPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SchemaServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getSchema to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SchemaServiceStubSettings.Builder schemaServiceSettingsBuilder =
+ *     SchemaServiceStubSettings.newBuilder();
+ * schemaServiceSettingsBuilder
+ *     .getSchemaSettings()
+ *     .setRetrySettings(
+ *         schemaServiceSettingsBuilder
+ *             .getSchemaSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SchemaServiceStubSettings schemaServiceSettings = schemaServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SchemaServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings getSchemaSettings; + private final PagedCallSettings + listSchemasSettings; + private final UnaryCallSettings createSchemaSettings; + private final OperationCallSettings + createSchemaOperationSettings; + private final UnaryCallSettings updateSchemaSettings; + private final OperationCallSettings + updateSchemaOperationSettings; + private final UnaryCallSettings deleteSchemaSettings; + private final OperationCallSettings + deleteSchemaOperationSettings; + + private static final PagedListDescriptor + LIST_SCHEMAS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSchemasRequest injectToken(ListSchemasRequest payload, String token) { + return ListSchemasRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSchemasRequest injectPageSize(ListSchemasRequest payload, int pageSize) { + return ListSchemasRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSchemasRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSchemasResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSchemasResponse payload) { + return payload.getSchemasList() == null + ? ImmutableList.of() + : payload.getSchemasList(); + } + }; + + private static final PagedListResponseFactory< + ListSchemasRequest, ListSchemasResponse, ListSchemasPagedResponse> + LIST_SCHEMAS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSchemasRequest, ListSchemasResponse, ListSchemasPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSchemasRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SCHEMAS_PAGE_STR_DESC, request, context); + return ListSchemasPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getSchema. */ + public UnaryCallSettings getSchemaSettings() { + return getSchemaSettings; + } + + /** Returns the object with the settings used for calls to listSchemas. */ + public PagedCallSettings + listSchemasSettings() { + return listSchemasSettings; + } + + /** Returns the object with the settings used for calls to createSchema. */ + public UnaryCallSettings createSchemaSettings() { + return createSchemaSettings; + } + + /** Returns the object with the settings used for calls to createSchema. */ + public OperationCallSettings + createSchemaOperationSettings() { + return createSchemaOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSchema. */ + public UnaryCallSettings updateSchemaSettings() { + return updateSchemaSettings; + } + + /** Returns the object with the settings used for calls to updateSchema. */ + public OperationCallSettings + updateSchemaOperationSettings() { + return updateSchemaOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteSchema. */ + public UnaryCallSettings deleteSchemaSettings() { + return deleteSchemaSettings; + } + + /** Returns the object with the settings used for calls to deleteSchema. */ + public OperationCallSettings + deleteSchemaOperationSettings() { + return deleteSchemaOperationSettings; + } + + public SchemaServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSchemaServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonSchemaServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SchemaServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SchemaServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SchemaServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SchemaServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getSchemaSettings = settingsBuilder.getSchemaSettings().build(); + listSchemasSettings = settingsBuilder.listSchemasSettings().build(); + createSchemaSettings = settingsBuilder.createSchemaSettings().build(); + createSchemaOperationSettings = settingsBuilder.createSchemaOperationSettings().build(); + updateSchemaSettings = settingsBuilder.updateSchemaSettings().build(); + updateSchemaOperationSettings = settingsBuilder.updateSchemaOperationSettings().build(); + deleteSchemaSettings = settingsBuilder.deleteSchemaSettings().build(); + deleteSchemaOperationSettings = settingsBuilder.deleteSchemaOperationSettings().build(); + } + + /** Builder for SchemaServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getSchemaSettings; + private final PagedCallSettings.Builder< + ListSchemasRequest, ListSchemasResponse, ListSchemasPagedResponse> + listSchemasSettings; + private final UnaryCallSettings.Builder createSchemaSettings; + private final OperationCallSettings.Builder + createSchemaOperationSettings; + private final UnaryCallSettings.Builder updateSchemaSettings; + private final OperationCallSettings.Builder + updateSchemaOperationSettings; + private final UnaryCallSettings.Builder deleteSchemaSettings; + private final OperationCallSettings.Builder + deleteSchemaOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSchemasSettings = PagedCallSettings.newBuilder(LIST_SCHEMAS_PAGE_STR_FACT); + createSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSchemaOperationSettings = OperationCallSettings.newBuilder(); + updateSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSchemaOperationSettings = OperationCallSettings.newBuilder(); + deleteSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSchemaOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getSchemaSettings, + listSchemasSettings, + createSchemaSettings, + updateSchemaSettings, + deleteSchemaSettings); + initDefaults(this); + } + + protected Builder(SchemaServiceStubSettings settings) { + super(settings); + + getSchemaSettings = settings.getSchemaSettings.toBuilder(); + listSchemasSettings = settings.listSchemasSettings.toBuilder(); + createSchemaSettings = settings.createSchemaSettings.toBuilder(); + createSchemaOperationSettings = settings.createSchemaOperationSettings.toBuilder(); + updateSchemaSettings = settings.updateSchemaSettings.toBuilder(); + updateSchemaOperationSettings = settings.updateSchemaOperationSettings.toBuilder(); + deleteSchemaSettings = settings.deleteSchemaSettings.toBuilder(); + deleteSchemaOperationSettings = settings.deleteSchemaOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getSchemaSettings, + listSchemasSettings, + createSchemaSettings, + updateSchemaSettings, + deleteSchemaSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listSchemasSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createSchemaOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Schema.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateSchemaMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateSchemaOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Schema.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(UpdateSchemaMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteSchemaOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteSchemaMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getSchema. */ + public UnaryCallSettings.Builder getSchemaSettings() { + return getSchemaSettings; + } + + /** Returns the builder for the settings used for calls to listSchemas. */ + public PagedCallSettings.Builder< + ListSchemasRequest, ListSchemasResponse, ListSchemasPagedResponse> + listSchemasSettings() { + return listSchemasSettings; + } + + /** Returns the builder for the settings used for calls to createSchema. */ + public UnaryCallSettings.Builder createSchemaSettings() { + return createSchemaSettings; + } + + /** Returns the builder for the settings used for calls to createSchema. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createSchemaOperationSettings() { + return createSchemaOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSchema. */ + public UnaryCallSettings.Builder updateSchemaSettings() { + return updateSchemaSettings; + } + + /** Returns the builder for the settings used for calls to updateSchema. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateSchemaOperationSettings() { + return updateSchemaOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteSchema. */ + public UnaryCallSettings.Builder deleteSchemaSettings() { + return deleteSchemaSettings; + } + + /** Returns the builder for the settings used for calls to deleteSchema. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteSchemaOperationSettings() { + return deleteSchemaOperationSettings; + } + + @Override + public SchemaServiceStubSettings build() throws IOException { + return new SchemaServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SearchServiceStub.java new file mode 100644 index 000000000000..80ac367546ab --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SearchServiceStub.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SearchServiceClient.SearchPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.SearchResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SearchService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class SearchServiceStub implements BackgroundResource { + + public UnaryCallable searchPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchPagedCallable()"); + } + + public UnaryCallable searchCallable() { + throw new UnsupportedOperationException("Not implemented: searchCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SearchServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SearchServiceStubSettings.java new file mode 100644 index 000000000000..67d10a2e3496 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SearchServiceStubSettings.java @@ -0,0 +1,391 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import static com.google.cloud.discoveryengine.v1alpha.SearchServiceClient.SearchPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.SearchResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SearchServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of search to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceStubSettings.Builder searchServiceSettingsBuilder =
+ *     SearchServiceStubSettings.newBuilder();
+ * searchServiceSettingsBuilder
+ *     .searchSettings()
+ *     .setRetrySettings(
+ *         searchServiceSettingsBuilder
+ *             .searchSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SearchServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings + searchSettings; + + private static final PagedListDescriptor< + SearchRequest, SearchResponse, SearchResponse.SearchResult> + SEARCH_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchRequest injectToken(SearchRequest payload, String token) { + return SearchRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchRequest injectPageSize(SearchRequest payload, int pageSize) { + return SearchRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchResponse payload) { + return payload.getResultsList() == null + ? ImmutableList.of() + : payload.getResultsList(); + } + }; + + private static final PagedListResponseFactory + SEARCH_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_PAGE_STR_DESC, request, context); + return SearchPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to search. */ + public PagedCallSettings searchSettings() { + return searchSettings; + } + + public SearchServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSearchServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonSearchServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SearchServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SearchServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SearchServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SearchServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + searchSettings = settingsBuilder.searchSettings().build(); + } + + /** Builder for SearchServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder + searchSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ofMillis(5000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(5000L)) + .setTotalTimeout(Duration.ofMillis(5000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + searchSettings = PagedCallSettings.newBuilder(SEARCH_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchSettings); + initDefaults(this); + } + + protected Builder(SearchServiceStubSettings settings) { + super(settings); + + searchSettings = settings.searchSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .searchSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to search. */ + public PagedCallSettings.Builder + searchSettings() { + return searchSettings; + } + + @Override + public SearchServiceStubSettings build() throws IOException { + return new SearchServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SiteSearchEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SiteSearchEngineServiceStub.java new file mode 100644 index 000000000000..ae9c6cdfc3f7 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SiteSearchEngineServiceStub.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SiteSearchEngineService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class SiteSearchEngineServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + recrawlUrisOperationCallable() { + throw new UnsupportedOperationException("Not implemented: recrawlUrisOperationCallable()"); + } + + public UnaryCallable recrawlUrisCallable() { + throw new UnsupportedOperationException("Not implemented: recrawlUrisCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SiteSearchEngineServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SiteSearchEngineServiceStubSettings.java new file mode 100644 index 000000000000..6262b86978e9 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/SiteSearchEngineServiceStubSettings.java @@ -0,0 +1,371 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SiteSearchEngineServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of recrawlUris to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceStubSettings.Builder siteSearchEngineServiceSettingsBuilder =
+ *     SiteSearchEngineServiceStubSettings.newBuilder();
+ * siteSearchEngineServiceSettingsBuilder
+ *     .recrawlUrisSettings()
+ *     .setRetrySettings(
+ *         siteSearchEngineServiceSettingsBuilder
+ *             .recrawlUrisSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SiteSearchEngineServiceStubSettings siteSearchEngineServiceSettings =
+ *     siteSearchEngineServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SiteSearchEngineServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings recrawlUrisSettings; + private final OperationCallSettings + recrawlUrisOperationSettings; + + /** Returns the object with the settings used for calls to recrawlUris. */ + public UnaryCallSettings recrawlUrisSettings() { + return recrawlUrisSettings; + } + + /** Returns the object with the settings used for calls to recrawlUris. */ + public OperationCallSettings + recrawlUrisOperationSettings() { + return recrawlUrisOperationSettings; + } + + public SiteSearchEngineServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSiteSearchEngineServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonSiteSearchEngineServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SiteSearchEngineServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SiteSearchEngineServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SiteSearchEngineServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SiteSearchEngineServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + recrawlUrisSettings = settingsBuilder.recrawlUrisSettings().build(); + recrawlUrisOperationSettings = settingsBuilder.recrawlUrisOperationSettings().build(); + } + + /** Builder for SiteSearchEngineServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder recrawlUrisSettings; + private final OperationCallSettings.Builder< + RecrawlUrisRequest, RecrawlUrisResponse, RecrawlUrisMetadata> + recrawlUrisOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + recrawlUrisSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + recrawlUrisOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(recrawlUrisSettings); + initDefaults(this); + } + + protected Builder(SiteSearchEngineServiceStubSettings settings) { + super(settings); + + recrawlUrisSettings = settings.recrawlUrisSettings.toBuilder(); + recrawlUrisOperationSettings = settings.recrawlUrisOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(recrawlUrisSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .recrawlUrisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .recrawlUrisOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RecrawlUrisResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(RecrawlUrisMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to recrawlUris. */ + public UnaryCallSettings.Builder recrawlUrisSettings() { + return recrawlUrisSettings; + } + + /** Returns the builder for the settings used for calls to recrawlUris. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RecrawlUrisRequest, RecrawlUrisResponse, RecrawlUrisMetadata> + recrawlUrisOperationSettings() { + return recrawlUrisOperationSettings; + } + + @Override + public SiteSearchEngineServiceStubSettings build() throws IOException { + return new SiteSearchEngineServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/UserEventServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/UserEventServiceStub.java new file mode 100644 index 000000000000..1a841f32c1f3 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/UserEventServiceStub.java @@ -0,0 +1,84 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.HttpBody; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the UserEventService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class UserEventServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable writeUserEventCallable() { + throw new UnsupportedOperationException("Not implemented: writeUserEventCallable()"); + } + + public UnaryCallable collectUserEventCallable() { + throw new UnsupportedOperationException("Not implemented: collectUserEventCallable()"); + } + + public OperationCallable + purgeUserEventsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: purgeUserEventsOperationCallable()"); + } + + public UnaryCallable purgeUserEventsCallable() { + throw new UnsupportedOperationException("Not implemented: purgeUserEventsCallable()"); + } + + public OperationCallable< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importUserEventsOperationCallable()"); + } + + public UnaryCallable importUserEventsCallable() { + throw new UnsupportedOperationException("Not implemented: importUserEventsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/UserEventServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/UserEventServiceStubSettings.java new file mode 100644 index 000000000000..fe006d0717bd --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/UserEventServiceStubSettings.java @@ -0,0 +1,525 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub; + +import com.google.api.HttpBody; +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link UserEventServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of writeUserEvent to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder =
+ *     UserEventServiceStubSettings.newBuilder();
+ * userEventServiceSettingsBuilder
+ *     .writeUserEventSettings()
+ *     .setRetrySettings(
+ *         userEventServiceSettingsBuilder
+ *             .writeUserEventSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class UserEventServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings writeUserEventSettings; + private final UnaryCallSettings collectUserEventSettings; + private final UnaryCallSettings purgeUserEventsSettings; + private final OperationCallSettings< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationSettings; + private final UnaryCallSettings importUserEventsSettings; + private final OperationCallSettings< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationSettings; + + /** Returns the object with the settings used for calls to writeUserEvent. */ + public UnaryCallSettings writeUserEventSettings() { + return writeUserEventSettings; + } + + /** Returns the object with the settings used for calls to collectUserEvent. */ + public UnaryCallSettings collectUserEventSettings() { + return collectUserEventSettings; + } + + /** Returns the object with the settings used for calls to purgeUserEvents. */ + public UnaryCallSettings purgeUserEventsSettings() { + return purgeUserEventsSettings; + } + + /** Returns the object with the settings used for calls to purgeUserEvents. */ + public OperationCallSettings< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationSettings() { + return purgeUserEventsOperationSettings; + } + + /** Returns the object with the settings used for calls to importUserEvents. */ + public UnaryCallSettings importUserEventsSettings() { + return importUserEventsSettings; + } + + /** Returns the object with the settings used for calls to importUserEvents. */ + public OperationCallSettings< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationSettings() { + return importUserEventsOperationSettings; + } + + public UserEventServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcUserEventServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonUserEventServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(UserEventServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(UserEventServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return UserEventServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected UserEventServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + writeUserEventSettings = settingsBuilder.writeUserEventSettings().build(); + collectUserEventSettings = settingsBuilder.collectUserEventSettings().build(); + purgeUserEventsSettings = settingsBuilder.purgeUserEventsSettings().build(); + purgeUserEventsOperationSettings = settingsBuilder.purgeUserEventsOperationSettings().build(); + importUserEventsSettings = settingsBuilder.importUserEventsSettings().build(); + importUserEventsOperationSettings = settingsBuilder.importUserEventsOperationSettings().build(); + } + + /** Builder for UserEventServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + writeUserEventSettings; + private final UnaryCallSettings.Builder + collectUserEventSettings; + private final UnaryCallSettings.Builder + purgeUserEventsSettings; + private final OperationCallSettings.Builder< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationSettings; + private final UnaryCallSettings.Builder + importUserEventsSettings; + private final OperationCallSettings.Builder< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(30000L)) + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + writeUserEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + collectUserEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + purgeUserEventsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + purgeUserEventsOperationSettings = OperationCallSettings.newBuilder(); + importUserEventsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importUserEventsOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + writeUserEventSettings, + collectUserEventSettings, + purgeUserEventsSettings, + importUserEventsSettings); + initDefaults(this); + } + + protected Builder(UserEventServiceStubSettings settings) { + super(settings); + + writeUserEventSettings = settings.writeUserEventSettings.toBuilder(); + collectUserEventSettings = settings.collectUserEventSettings.toBuilder(); + purgeUserEventsSettings = settings.purgeUserEventsSettings.toBuilder(); + purgeUserEventsOperationSettings = settings.purgeUserEventsOperationSettings.toBuilder(); + importUserEventsSettings = settings.importUserEventsSettings.toBuilder(); + importUserEventsOperationSettings = settings.importUserEventsOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + writeUserEventSettings, + collectUserEventSettings, + purgeUserEventsSettings, + importUserEventsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .writeUserEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .collectUserEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .purgeUserEventsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .importUserEventsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .purgeUserEventsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PurgeUserEventsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(PurgeUserEventsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .importUserEventsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportUserEventsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ImportUserEventsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to writeUserEvent. */ + public UnaryCallSettings.Builder writeUserEventSettings() { + return writeUserEventSettings; + } + + /** Returns the builder for the settings used for calls to collectUserEvent. */ + public UnaryCallSettings.Builder collectUserEventSettings() { + return collectUserEventSettings; + } + + /** Returns the builder for the settings used for calls to purgeUserEvents. */ + public UnaryCallSettings.Builder purgeUserEventsSettings() { + return purgeUserEventsSettings; + } + + /** Returns the builder for the settings used for calls to purgeUserEvents. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata> + purgeUserEventsOperationSettings() { + return purgeUserEventsOperationSettings; + } + + /** Returns the builder for the settings used for calls to importUserEvents. */ + public UnaryCallSettings.Builder + importUserEventsSettings() { + return importUserEventsSettings; + } + + /** Returns the builder for the settings used for calls to importUserEvents. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata> + importUserEventsOperationSettings() { + return importUserEventsOperationSettings; + } + + @Override + public UserEventServiceStubSettings build() throws IOException { + return new UserEventServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1alpha/reflect-config.json b/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1alpha/reflect-config.json new file mode 100644 index 000000000000..40bd3fb7ed9a --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1alpha/reflect-config.json @@ -0,0 +1,3305 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpBody", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpBody$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigQuerySource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.BigQuerySource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse$QuerySuggestion", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse$QuerySuggestion$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompletionInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CompletionInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Conversation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Conversation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Conversation$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConversationContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConversationContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConversationMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConversationMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CustomAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.CustomAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Document", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Document$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Document$Content", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Document$Content$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DocumentInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DocumentInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DoubleList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.DoubleList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$CompletableOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$DynamicFacetableOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$FieldType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$FilterableOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$IndexableOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$RetrievableOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.FieldConfig$SearchableOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GcsSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GcsSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest$ReconciliationMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Interval", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Interval$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.MediaInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.MediaInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PageInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PageInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PanelInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PanelInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecommendRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecommendRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecommendResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecommendResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecommendResponse$RecommendationResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecommendResponse$RecommendationResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse$FailureInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse$FailureInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse$FailureInfo$FailureReason", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse$FailureInfo$FailureReason$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse$FailureInfo$FailureReason$CorpusType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Reply", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Reply$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Reply$Reference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Reply$Reference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Schema", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.Schema$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$BoostSpec$ConditionBoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$ExtractiveContentSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$ExtractiveContentSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$SnippetSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$SnippetSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$SummarySpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ContentSearchSpec$SummarySpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$EmbeddingSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$EmbeddingSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$EmbeddingSpec$EmbeddingVector", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$EmbeddingSpec$EmbeddingVector$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$FacetSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$FacetSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$FacetSpec$FacetKey", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$FacetSpec$FacetKey$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ImageQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$ImageQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$QueryExpansionSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$QueryExpansionSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$QueryExpansionSpec$Condition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$SpellCorrectionSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$SpellCorrectionSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchRequest$SpellCorrectionSpec$Mode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Facet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Facet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Facet$FacetValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Facet$FacetValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$GeoSearchDebugInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$GeoSearchDebugInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$GuidedSearchResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$GuidedSearchResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$GuidedSearchResult$RefinementAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$GuidedSearchResult$RefinementAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$QueryExpansionInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$QueryExpansionInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$SearchResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$SearchResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary$SafetyAttributes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary$SafetyAttributes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SearchResponse$Summary$SummarySkippedReason", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.SolutionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.TextInput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.TextInput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.TransactionInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.TransactionInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UserEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UserEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UserInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.UserInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Date", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Date$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..96045f6fc1c0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClientHttpJsonTest.java @@ -0,0 +1,139 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonCompletionServiceStub; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CompletionServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static CompletionServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonCompletionServiceStub.getMethodDescriptors(), + CompletionServiceSettings.getDefaultEndpoint()); + CompletionServiceSettings settings = + CompletionServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + CompletionServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CompletionServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void completeQueryTest() throws Exception { + CompleteQueryResponse expectedResponse = + CompleteQueryResponse.newBuilder() + .addAllQuerySuggestions(new ArrayList()) + .setTailMatchTriggered(true) + .build(); + mockService.addResponse(expectedResponse); + + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setDataStore( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setQuery("query107944136") + .setQueryModel("queryModel-184930495") + .setUserPseudoId("userPseudoId-1155274652") + .setIncludeTailSuggestions(true) + .build(); + + CompleteQueryResponse actualResponse = client.completeQuery(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void completeQueryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setDataStore( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setQuery("query107944136") + .setQueryModel("queryModel-184930495") + .setUserPseudoId("userPseudoId-1155274652") + .setIncludeTailSuggestions(true) + .build(); + client.completeQuery(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClientTest.java new file mode 100644 index 000000000000..77009c130481 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceClientTest.java @@ -0,0 +1,145 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CompletionServiceClientTest { + private static MockCompletionService mockCompletionService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CompletionServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockCompletionService = new MockCompletionService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockCompletionService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CompletionServiceSettings settings = + CompletionServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CompletionServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void completeQueryTest() throws Exception { + CompleteQueryResponse expectedResponse = + CompleteQueryResponse.newBuilder() + .addAllQuerySuggestions(new ArrayList()) + .setTailMatchTriggered(true) + .build(); + mockCompletionService.addResponse(expectedResponse); + + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setDataStore( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setQuery("query107944136") + .setQueryModel("queryModel-184930495") + .setUserPseudoId("userPseudoId-1155274652") + .setIncludeTailSuggestions(true) + .build(); + + CompleteQueryResponse actualResponse = client.completeQuery(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCompletionService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CompleteQueryRequest actualRequest = ((CompleteQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getDataStore(), actualRequest.getDataStore()); + Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertEquals(request.getQueryModel(), actualRequest.getQueryModel()); + Assert.assertEquals(request.getUserPseudoId(), actualRequest.getUserPseudoId()); + Assert.assertEquals( + request.getIncludeTailSuggestions(), actualRequest.getIncludeTailSuggestions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void completeQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCompletionService.addException(exception); + + try { + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setDataStore( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setQuery("query107944136") + .setQueryModel("queryModel-184930495") + .setUserPseudoId("userPseudoId-1155274652") + .setIncludeTailSuggestions(true) + .build(); + client.completeQuery(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..4f264c631d68 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClientHttpJsonTest.java @@ -0,0 +1,662 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient.ListConversationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonConversationalSearchServiceStub; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ConversationalSearchServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static ConversationalSearchServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonConversationalSearchServiceStub.getMethodDescriptors(), + ConversationalSearchServiceSettings.getDefaultEndpoint()); + ConversationalSearchServiceSettings settings = + ConversationalSearchServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ConversationalSearchServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ConversationalSearchServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void converseConversationTest() throws Exception { + ConverseConversationResponse expectedResponse = + ConverseConversationResponse.newBuilder() + .setReply(Reply.newBuilder().build()) + .setConversation(Conversation.newBuilder().build()) + .addAllRelatedQuestions(new ArrayList()) + .addAllSearchResults(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + TextInput query = TextInput.newBuilder().build(); + + ConverseConversationResponse actualResponse = client.converseConversation(name, query); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void converseConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + TextInput query = TextInput.newBuilder().build(); + client.converseConversation(name, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void converseConversationTest2() throws Exception { + ConverseConversationResponse expectedResponse = + ConverseConversationResponse.newBuilder() + .setReply(Reply.newBuilder().build()) + .setConversation(Conversation.newBuilder().build()) + .addAllRelatedQuestions(new ArrayList()) + .addAllSearchResults(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1064/locations/location-1064/dataStores/dataStore-1064/conversations/conversation-1064"; + TextInput query = TextInput.newBuilder().build(); + + ConverseConversationResponse actualResponse = client.converseConversation(name, query); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void converseConversationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1064/locations/location-1064/dataStores/dataStore-1064/conversations/conversation-1064"; + TextInput query = TextInput.newBuilder().build(); + client.converseConversation(name, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Conversation conversation = Conversation.newBuilder().build(); + + Conversation actualResponse = client.createConversation(parent, conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Conversation conversation = Conversation.newBuilder().build(); + client.createConversation(parent, conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + Conversation conversation = Conversation.newBuilder().build(); + + Conversation actualResponse = client.createConversation(parent, conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createConversationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + Conversation conversation = Conversation.newBuilder().build(); + client.createConversation(parent, conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + + client.deleteConversation(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1064/locations/location-1064/dataStores/dataStore-1064/conversations/conversation-1064"; + + client.deleteConversation(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConversationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1064/locations/location-1064/dataStores/dataStore-1064/conversations/conversation-1064"; + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Conversation conversation = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Conversation actualResponse = client.updateConversation(conversation, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Conversation conversation = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateConversation(conversation, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getConversationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1064/locations/location-1064/dataStores/dataStore-1064/conversations/conversation-1064"; + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getConversationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1064/locations/location-1064/dataStores/dataStore-1064/conversations/conversation-1064"; + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listConversationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest2() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listConversationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClientTest.java new file mode 100644 index 000000000000..6a14197a9979 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceClientTest.java @@ -0,0 +1,583 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient.ListConversationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ConversationalSearchServiceClientTest { + private static MockConversationalSearchService mockConversationalSearchService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ConversationalSearchServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockConversationalSearchService = new MockConversationalSearchService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockConversationalSearchService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ConversationalSearchServiceSettings settings = + ConversationalSearchServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ConversationalSearchServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void converseConversationTest() throws Exception { + ConverseConversationResponse expectedResponse = + ConverseConversationResponse.newBuilder() + .setReply(Reply.newBuilder().build()) + .setConversation(Conversation.newBuilder().build()) + .addAllRelatedQuestions(new ArrayList()) + .addAllSearchResults(new ArrayList()) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + TextInput query = TextInput.newBuilder().build(); + + ConverseConversationResponse actualResponse = client.converseConversation(name, query); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ConverseConversationRequest actualRequest = + ((ConverseConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void converseConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + TextInput query = TextInput.newBuilder().build(); + client.converseConversation(name, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void converseConversationTest2() throws Exception { + ConverseConversationResponse expectedResponse = + ConverseConversationResponse.newBuilder() + .setReply(Reply.newBuilder().build()) + .setConversation(Conversation.newBuilder().build()) + .addAllRelatedQuestions(new ArrayList()) + .addAllSearchResults(new ArrayList()) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + String name = "name3373707"; + TextInput query = TextInput.newBuilder().build(); + + ConverseConversationResponse actualResponse = client.converseConversation(name, query); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ConverseConversationRequest actualRequest = + ((ConverseConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void converseConversationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + String name = "name3373707"; + TextInput query = TextInput.newBuilder().build(); + client.converseConversation(name, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Conversation conversation = Conversation.newBuilder().build(); + + Conversation actualResponse = client.createConversation(parent, conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConversationRequest actualRequest = ((CreateConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(conversation, actualRequest.getConversation()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Conversation conversation = Conversation.newBuilder().build(); + client.createConversation(parent, conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Conversation conversation = Conversation.newBuilder().build(); + + Conversation actualResponse = client.createConversation(parent, conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConversationRequest actualRequest = ((CreateConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(conversation, actualRequest.getConversation()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConversationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + String parent = "parent-995424086"; + Conversation conversation = Conversation.newBuilder().build(); + client.createConversation(parent, conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockConversationalSearchService.addResponse(expectedResponse); + + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + + client.deleteConversation(name); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversationRequest actualRequest = ((DeleteConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteConversationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockConversationalSearchService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteConversation(name); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConversationRequest actualRequest = ((DeleteConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConversationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + String name = "name3373707"; + client.deleteConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + Conversation conversation = Conversation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Conversation actualResponse = client.updateConversation(conversation, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateConversationRequest actualRequest = ((UpdateConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(conversation, actualRequest.getConversation()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + Conversation conversation = Conversation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateConversation(conversation, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConversationRequest actualRequest = ((GetConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConversationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConversationTest2() throws Exception { + Conversation expectedResponse = + Conversation.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .addAllMessages(new ArrayList()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + String name = "name3373707"; + + Conversation actualResponse = client.getConversation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConversationRequest actualRequest = ((GetConversationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConversationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + String name = "name3373707"; + client.getConversation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConversationsRequest actualRequest = ((ListConversationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConversationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConversationsTest2() throws Exception { + Conversation responsesElement = Conversation.newBuilder().build(); + ListConversationsResponse expectedResponse = + ListConversationsResponse.newBuilder() + .setNextPageToken("") + .addAllConversations(Arrays.asList(responsesElement)) + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListConversationsPagedResponse pagedListResponse = client.listConversations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConversationsList().get(0), resources.get(0)); + + List actualRequests = mockConversationalSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConversationsRequest actualRequest = ((ListConversationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConversationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listConversations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..094d0e58117e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientHttpJsonTest.java @@ -0,0 +1,724 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient.ListDocumentsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonDocumentServiceStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Struct; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DocumentServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DocumentServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDocumentServiceStub.getMethodDescriptors(), + DocumentServiceSettings.getDefaultEndpoint()); + DocumentServiceSettings settings = + DocumentServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DocumentServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DocumentServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getDocumentTest() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + + Document actualResponse = client.getDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDocumentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + client.getDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDocumentTest2() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2446/locations/location-2446/dataStores/dataStore-2446/branches/branche-2446/documents/document-2446"; + + Document actualResponse = client.getDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDocumentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2446/locations/location-2446/dataStores/dataStore-2446/branches/branche-2446/documents/document-2446"; + client.getDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDocumentsTest() throws Exception { + Document responsesElement = Document.newBuilder().build(); + ListDocumentsResponse expectedResponse = + ListDocumentsResponse.newBuilder() + .setNextPageToken("") + .addAllDocuments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + + ListDocumentsPagedResponse pagedListResponse = client.listDocuments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDocumentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDocumentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + client.listDocuments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDocumentsTest2() throws Exception { + Document responsesElement = Document.newBuilder().build(); + ListDocumentsResponse expectedResponse = + ListDocumentsResponse.newBuilder() + .setNextPageToken("") + .addAllDocuments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-3187/locations/location-3187/dataStores/dataStore-3187/branches/branche-3187"; + + ListDocumentsPagedResponse pagedListResponse = client.listDocuments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDocumentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDocumentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-3187/locations/location-3187/dataStores/dataStore-3187/branches/branche-3187"; + client.listDocuments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDocumentTest() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + + Document actualResponse = client.createDocument(parent, document, documentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDocumentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + client.createDocument(parent, document, documentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDocumentTest2() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-3187/locations/location-3187/dataStores/dataStore-3187/branches/branche-3187"; + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + + Document actualResponse = client.createDocument(parent, document, documentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDocumentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-3187/locations/location-3187/dataStores/dataStore-3187/branches/branche-3187"; + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + client.createDocument(parent, document, documentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDocumentTest() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + UpdateDocumentRequest request = + UpdateDocumentRequest.newBuilder() + .setDocument( + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build()) + .setAllowMissing(true) + .build(); + + Document actualResponse = client.updateDocument(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDocumentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UpdateDocumentRequest request = + UpdateDocumentRequest.newBuilder() + .setDocument( + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", + "[LOCATION]", + "[DATA_STORE]", + "[BRANCH]", + "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build()) + .setAllowMissing(true) + .build(); + client.updateDocument(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDocumentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + + client.deleteDocument(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDocumentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + client.deleteDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDocumentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2446/locations/location-2446/dataStores/dataStore-2446/branches/branche-2446/documents/document-2446"; + + client.deleteDocument(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDocumentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2446/locations/location-2446/dataStores/dataStore-2446/branches/branche-2446/documents/document-2446"; + client.deleteDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importDocumentsTest() throws Exception { + ImportDocumentsResponse expectedResponse = + ImportDocumentsResponse.newBuilder() + .addAllErrorSamples(new ArrayList()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setAutoGenerateIds(true) + .setIdField("idField1629396127") + .build(); + + ImportDocumentsResponse actualResponse = client.importDocumentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importDocumentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setAutoGenerateIds(true) + .setIdField("idField1629396127") + .build(); + client.importDocumentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void purgeDocumentsTest() throws Exception { + PurgeDocumentsResponse expectedResponse = + PurgeDocumentsResponse.newBuilder() + .setPurgeCount(575305851) + .addAllPurgeSample(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PurgeDocumentsRequest request = + PurgeDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeDocumentsResponse actualResponse = client.purgeDocumentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeDocumentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PurgeDocumentsRequest request = + PurgeDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeDocumentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientTest.java new file mode 100644 index 000000000000..8be0bbcc9d84 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceClientTest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient.ListDocumentsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Struct; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DocumentServiceClientTest { + private static MockDocumentService mockDocumentService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DocumentServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDocumentService = new MockDocumentService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDocumentService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DocumentServiceSettings settings = + DocumentServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DocumentServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getDocumentTest() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockDocumentService.addResponse(expectedResponse); + + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + + Document actualResponse = client.getDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDocumentRequest actualRequest = ((GetDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDocumentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + client.getDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDocumentTest2() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockDocumentService.addResponse(expectedResponse); + + String name = "name3373707"; + + Document actualResponse = client.getDocument(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDocumentRequest actualRequest = ((GetDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDocumentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + String name = "name3373707"; + client.getDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDocumentsTest() throws Exception { + Document responsesElement = Document.newBuilder().build(); + ListDocumentsResponse expectedResponse = + ListDocumentsResponse.newBuilder() + .setNextPageToken("") + .addAllDocuments(Arrays.asList(responsesElement)) + .build(); + mockDocumentService.addResponse(expectedResponse); + + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + + ListDocumentsPagedResponse pagedListResponse = client.listDocuments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDocumentsList().get(0), resources.get(0)); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDocumentsRequest actualRequest = ((ListDocumentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDocumentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + client.listDocuments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDocumentsTest2() throws Exception { + Document responsesElement = Document.newBuilder().build(); + ListDocumentsResponse expectedResponse = + ListDocumentsResponse.newBuilder() + .setNextPageToken("") + .addAllDocuments(Arrays.asList(responsesElement)) + .build(); + mockDocumentService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDocumentsPagedResponse pagedListResponse = client.listDocuments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDocumentsList().get(0), resources.get(0)); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDocumentsRequest actualRequest = ((ListDocumentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDocumentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDocuments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDocumentTest() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockDocumentService.addResponse(expectedResponse); + + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + + Document actualResponse = client.createDocument(parent, document, documentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDocumentRequest actualRequest = ((CreateDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(document, actualRequest.getDocument()); + Assert.assertEquals(documentId, actualRequest.getDocumentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDocumentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + client.createDocument(parent, document, documentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDocumentTest2() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockDocumentService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + + Document actualResponse = client.createDocument(parent, document, documentId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDocumentRequest actualRequest = ((CreateDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(document, actualRequest.getDocument()); + Assert.assertEquals(documentId, actualRequest.getDocumentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDocumentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + String parent = "parent-995424086"; + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + client.createDocument(parent, document, documentId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDocumentTest() throws Exception { + Document expectedResponse = + Document.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .setId("id3355") + .setSchemaId("schemaId-697673060") + .setContent(Document.Content.newBuilder().build()) + .setParentDocumentId("parentDocumentId1990105056") + .setDerivedStructData(Struct.newBuilder().build()) + .build(); + mockDocumentService.addResponse(expectedResponse); + + UpdateDocumentRequest request = + UpdateDocumentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setAllowMissing(true) + .build(); + + Document actualResponse = client.updateDocument(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDocumentRequest actualRequest = ((UpdateDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getDocument(), actualRequest.getDocument()); + Assert.assertEquals(request.getAllowMissing(), actualRequest.getAllowMissing()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDocumentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + UpdateDocumentRequest request = + UpdateDocumentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setAllowMissing(true) + .build(); + client.updateDocument(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDocumentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDocumentService.addResponse(expectedResponse); + + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + + client.deleteDocument(name); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDocumentRequest actualRequest = ((DeleteDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDocumentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + client.deleteDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDocumentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDocumentService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteDocument(name); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDocumentRequest actualRequest = ((DeleteDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDocumentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDocument(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importDocumentsTest() throws Exception { + ImportDocumentsResponse expectedResponse = + ImportDocumentsResponse.newBuilder() + .addAllErrorSamples(new ArrayList()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDocumentService.addResponse(resultOperation); + + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setAutoGenerateIds(true) + .setIdField("idField1629396127") + .build(); + + ImportDocumentsResponse actualResponse = client.importDocumentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportDocumentsRequest actualRequest = ((ImportDocumentsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInlineSource(), actualRequest.getInlineSource()); + Assert.assertEquals(request.getGcsSource(), actualRequest.getGcsSource()); + Assert.assertEquals(request.getBigquerySource(), actualRequest.getBigquerySource()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getErrorConfig(), actualRequest.getErrorConfig()); + Assert.assertEquals(request.getReconciliationMode(), actualRequest.getReconciliationMode()); + Assert.assertEquals(request.getAutoGenerateIds(), actualRequest.getAutoGenerateIds()); + Assert.assertEquals(request.getIdField(), actualRequest.getIdField()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importDocumentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setAutoGenerateIds(true) + .setIdField("idField1629396127") + .build(); + client.importDocumentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void purgeDocumentsTest() throws Exception { + PurgeDocumentsResponse expectedResponse = + PurgeDocumentsResponse.newBuilder() + .setPurgeCount(575305851) + .addAllPurgeSample(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDocumentService.addResponse(resultOperation); + + PurgeDocumentsRequest request = + PurgeDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeDocumentsResponse actualResponse = client.purgeDocumentsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDocumentService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeDocumentsRequest actualRequest = ((PurgeDocumentsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getForce(), actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeDocumentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDocumentService.addException(exception); + + try { + PurgeDocumentsRequest request = + PurgeDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeDocumentsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockCompletionService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockCompletionService.java new file mode 100644 index 000000000000..837400c14512 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockCompletionService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCompletionService implements MockGrpcService { + private final MockCompletionServiceImpl serviceImpl; + + public MockCompletionService() { + serviceImpl = new MockCompletionServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockCompletionServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockCompletionServiceImpl.java new file mode 100644 index 000000000000..8dffd0153aed --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockCompletionServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceGrpc.CompletionServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCompletionServiceImpl extends CompletionServiceImplBase { + private List requests; + private Queue responses; + + public MockCompletionServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void completeQuery( + CompleteQueryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CompleteQueryResponse) { + requests.add(request); + responseObserver.onNext(((CompleteQueryResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CompleteQuery, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CompleteQueryResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockConversationalSearchService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockConversationalSearchService.java new file mode 100644 index 000000000000..8133e46f908e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockConversationalSearchService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockConversationalSearchService implements MockGrpcService { + private final MockConversationalSearchServiceImpl serviceImpl; + + public MockConversationalSearchService() { + serviceImpl = new MockConversationalSearchServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockConversationalSearchServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockConversationalSearchServiceImpl.java new file mode 100644 index 000000000000..e9ae1cd46475 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockConversationalSearchServiceImpl.java @@ -0,0 +1,189 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceGrpc.ConversationalSearchServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockConversationalSearchServiceImpl extends ConversationalSearchServiceImplBase { + private List requests; + private Queue responses; + + public MockConversationalSearchServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void converseConversation( + ConverseConversationRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ConverseConversationResponse) { + requests.add(request); + responseObserver.onNext(((ConverseConversationResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ConverseConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ConverseConversationResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createConversation( + CreateConversationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Conversation) { + requests.add(request); + responseObserver.onNext(((Conversation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Conversation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteConversation( + DeleteConversationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateConversation( + UpdateConversationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Conversation) { + requests.add(request); + responseObserver.onNext(((Conversation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Conversation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConversation( + GetConversationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Conversation) { + requests.add(request); + responseObserver.onNext(((Conversation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetConversation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Conversation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listConversations( + ListConversationsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListConversationsResponse) { + requests.add(request); + responseObserver.onNext(((ListConversationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListConversations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListConversationsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentService.java new file mode 100644 index 000000000000..7d88a818dfa5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDocumentService implements MockGrpcService { + private final MockDocumentServiceImpl serviceImpl; + + public MockDocumentService() { + serviceImpl = new MockDocumentServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentServiceImpl.java new file mode 100644 index 000000000000..3b689fbeef9f --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockDocumentServiceImpl.java @@ -0,0 +1,208 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceGrpc.DocumentServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDocumentServiceImpl extends DocumentServiceImplBase { + private List requests; + private Queue responses; + + public MockDocumentServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getDocument(GetDocumentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Document) { + requests.add(request); + responseObserver.onNext(((Document) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDocument, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Document.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDocuments( + ListDocumentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDocumentsResponse) { + requests.add(request); + responseObserver.onNext(((ListDocumentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDocuments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDocumentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDocument( + CreateDocumentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Document) { + requests.add(request); + responseObserver.onNext(((Document) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDocument, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Document.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDocument( + UpdateDocumentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Document) { + requests.add(request); + responseObserver.onNext(((Document) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDocument, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Document.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDocument( + DeleteDocumentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDocument, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importDocuments( + ImportDocumentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportDocuments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void purgeDocuments( + PurgeDocumentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PurgeDocuments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockLocations.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockLocations.java new file mode 100644 index 000000000000..ac060053b6ff --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockLocationsImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockLocationsImpl.java new file mode 100644 index 000000000000..04e096fe94a2 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockLocationsImpl.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRecommendationService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRecommendationService.java new file mode 100644 index 000000000000..885d36476ddc --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRecommendationService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockRecommendationService implements MockGrpcService { + private final MockRecommendationServiceImpl serviceImpl; + + public MockRecommendationService() { + serviceImpl = new MockRecommendationServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRecommendationServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRecommendationServiceImpl.java new file mode 100644 index 000000000000..226f83e03fa5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockRecommendationServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceGrpc.RecommendationServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockRecommendationServiceImpl extends RecommendationServiceImplBase { + private List requests; + private Queue responses; + + public MockRecommendationServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void recommend( + RecommendRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RecommendResponse) { + requests.add(request); + responseObserver.onNext(((RecommendResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Recommend, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RecommendResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSchemaService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSchemaService.java new file mode 100644 index 000000000000..5f300d509dd3 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSchemaService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSchemaService implements MockGrpcService { + private final MockSchemaServiceImpl serviceImpl; + + public MockSchemaService() { + serviceImpl = new MockSchemaServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSchemaServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSchemaServiceImpl.java new file mode 100644 index 000000000000..c8d2aa59e1a6 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSchemaServiceImpl.java @@ -0,0 +1,165 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceGrpc.SchemaServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSchemaServiceImpl extends SchemaServiceImplBase { + private List requests; + private Queue responses; + + public MockSchemaServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getSchema(GetSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Schema) { + requests.add(request); + responseObserver.onNext(((Schema) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Schema.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSchemas( + ListSchemasRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSchemasResponse) { + requests.add(request); + responseObserver.onNext(((ListSchemasResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSchemas, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSchemasResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSchema( + CreateSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSchema( + UpdateSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSchema( + DeleteSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSearchService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSearchService.java new file mode 100644 index 000000000000..1d1e77fabf4b --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSearchService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSearchService implements MockGrpcService { + private final MockSearchServiceImpl serviceImpl; + + public MockSearchService() { + serviceImpl = new MockSearchServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSearchServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSearchServiceImpl.java new file mode 100644 index 000000000000..0536c804b6d5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSearchServiceImpl.java @@ -0,0 +1,80 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceGrpc.SearchServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSearchServiceImpl extends SearchServiceImplBase { + private List requests; + private Queue responses; + + public MockSearchServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void search(SearchRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchResponse) { + requests.add(request); + responseObserver.onNext(((SearchResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method Search, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSiteSearchEngineService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSiteSearchEngineService.java new file mode 100644 index 000000000000..409f3128f5f2 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSiteSearchEngineService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSiteSearchEngineService implements MockGrpcService { + private final MockSiteSearchEngineServiceImpl serviceImpl; + + public MockSiteSearchEngineService() { + serviceImpl = new MockSiteSearchEngineServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSiteSearchEngineServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSiteSearchEngineServiceImpl.java new file mode 100644 index 000000000000..f2c17b7947d3 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockSiteSearchEngineServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceGrpc.SiteSearchEngineServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSiteSearchEngineServiceImpl extends SiteSearchEngineServiceImplBase { + private List requests; + private Queue responses; + + public MockSiteSearchEngineServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void recrawlUris(RecrawlUrisRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RecrawlUris, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockUserEventService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockUserEventService.java new file mode 100644 index 000000000000..f628243f043d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockUserEventService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockUserEventService implements MockGrpcService { + private final MockUserEventServiceImpl serviceImpl; + + public MockUserEventService() { + serviceImpl = new MockUserEventServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockUserEventServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockUserEventServiceImpl.java new file mode 100644 index 000000000000..05454bf4bcd8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/MockUserEventServiceImpl.java @@ -0,0 +1,146 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.HttpBody; +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceGrpc.UserEventServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockUserEventServiceImpl extends UserEventServiceImplBase { + private List requests; + private Queue responses; + + public MockUserEventServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void writeUserEvent( + WriteUserEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserEvent) { + requests.add(request); + responseObserver.onNext(((UserEvent) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method WriteUserEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserEvent.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void collectUserEvent( + CollectUserEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HttpBody) { + requests.add(request); + responseObserver.onNext(((HttpBody) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CollectUserEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HttpBody.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void purgeUserEvents( + PurgeUserEventsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PurgeUserEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importUserEvents( + ImportUserEventsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportUserEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..f93784ae3858 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClientHttpJsonTest.java @@ -0,0 +1,147 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonRecommendationServiceStub; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class RecommendationServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static RecommendationServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonRecommendationServiceStub.getMethodDescriptors(), + RecommendationServiceSettings.getDefaultEndpoint()); + RecommendationServiceSettings settings = + RecommendationServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + RecommendationServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RecommendationServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void recommendTest() throws Exception { + RecommendResponse expectedResponse = + RecommendResponse.newBuilder() + .addAllResults(new ArrayList()) + .setAttributionToken("attributionToken104706234") + .addAllMissingIds(new ArrayList()) + .setValidateOnly(true) + .build(); + mockService.addResponse(expectedResponse); + + RecommendRequest request = + RecommendRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .setPageSize(883849137) + .setFilter("filter-1274492040") + .setValidateOnly(true) + .putAllParams(new HashMap()) + .putAllUserLabels(new HashMap()) + .build(); + + RecommendResponse actualResponse = client.recommend(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void recommendExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RecommendRequest request = + RecommendRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .setPageSize(883849137) + .setFilter("filter-1274492040") + .setValidateOnly(true) + .putAllParams(new HashMap()) + .putAllUserLabels(new HashMap()) + .build(); + client.recommend(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClientTest.java new file mode 100644 index 000000000000..702f4fb87584 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceClientTest.java @@ -0,0 +1,154 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Value; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class RecommendationServiceClientTest { + private static MockLocations mockLocations; + private static MockRecommendationService mockRecommendationService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private RecommendationServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockRecommendationService = new MockRecommendationService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockRecommendationService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + RecommendationServiceSettings settings = + RecommendationServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RecommendationServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void recommendTest() throws Exception { + RecommendResponse expectedResponse = + RecommendResponse.newBuilder() + .addAllResults(new ArrayList()) + .setAttributionToken("attributionToken104706234") + .addAllMissingIds(new ArrayList()) + .setValidateOnly(true) + .build(); + mockRecommendationService.addResponse(expectedResponse); + + RecommendRequest request = + RecommendRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .setPageSize(883849137) + .setFilter("filter-1274492040") + .setValidateOnly(true) + .putAllParams(new HashMap()) + .putAllUserLabels(new HashMap()) + .build(); + + RecommendResponse actualResponse = client.recommend(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRecommendationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RecommendRequest actualRequest = ((RecommendRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getServingConfig(), actualRequest.getServingConfig()); + Assert.assertEquals(request.getUserEvent(), actualRequest.getUserEvent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getValidateOnly(), actualRequest.getValidateOnly()); + Assert.assertEquals(request.getParamsMap(), actualRequest.getParamsMap()); + Assert.assertEquals(request.getUserLabelsMap(), actualRequest.getUserLabelsMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void recommendExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRecommendationService.addException(exception); + + try { + RecommendRequest request = + RecommendRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .setPageSize(883849137) + .setFilter("filter-1274492040") + .setValidateOnly(true) + .putAllParams(new HashMap()) + .putAllUserLabels(new HashMap()) + .build(); + client.recommend(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..4db472bf664d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClientHttpJsonTest.java @@ -0,0 +1,573 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient.ListSchemasPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonSchemaServiceStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SchemaServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static SchemaServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonSchemaServiceStub.getMethodDescriptors(), + SchemaServiceSettings.getDefaultEndpoint()); + SchemaServiceSettings settings = + SchemaServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + SchemaServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SchemaServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getSchemaTest() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + + Schema actualResponse = client.getSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + client.getSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSchemaTest2() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3094/locations/location-3094/dataStores/dataStore-3094/schemas/schema-3094"; + + Schema actualResponse = client.getSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSchemaExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3094/locations/location-3094/dataStores/dataStore-3094/schemas/schema-3094"; + client.getSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSchemasTest() throws Exception { + Schema responsesElement = Schema.newBuilder().build(); + ListSchemasResponse expectedResponse = + ListSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllSchemas(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + + ListSchemasPagedResponse pagedListResponse = client.listSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchemasList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSchemasExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + client.listSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSchemasTest2() throws Exception { + Schema responsesElement = Schema.newBuilder().build(); + ListSchemasResponse expectedResponse = + ListSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllSchemas(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + + ListSchemasPagedResponse pagedListResponse = client.listSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchemasList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSchemasExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + client.listSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSchemaTest() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + + Schema actualResponse = client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createSchemaTest2() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + + Schema actualResponse = client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSchemaExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateSchemaTest() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UpdateSchemaRequest request = + UpdateSchemaRequest.newBuilder() + .setSchema( + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build()) + .setAllowMissing(true) + .build(); + + Schema actualResponse = client.updateSchemaAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UpdateSchemaRequest request = + UpdateSchemaRequest.newBuilder() + .setSchema( + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build()) + .setAllowMissing(true) + .build(); + client.updateSchemaAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSchemaTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + + client.deleteSchemaAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + client.deleteSchemaAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSchemaTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-3094/locations/location-3094/dataStores/dataStore-3094/schemas/schema-3094"; + + client.deleteSchemaAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSchemaExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3094/locations/location-3094/dataStores/dataStore-3094/schemas/schema-3094"; + client.deleteSchemaAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClientTest.java new file mode 100644 index 000000000000..b20c3f594d38 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceClientTest.java @@ -0,0 +1,528 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient.ListSchemasPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SchemaServiceClientTest { + private static MockLocations mockLocations; + private static MockSchemaService mockSchemaService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private SchemaServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockSchemaService = new MockSchemaService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockSchemaService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SchemaServiceSettings settings = + SchemaServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SchemaServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getSchemaTest() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + mockSchemaService.addResponse(expectedResponse); + + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + + Schema actualResponse = client.getSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSchemaRequest actualRequest = ((GetSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + client.getSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSchemaTest2() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + mockSchemaService.addResponse(expectedResponse); + + String name = "name3373707"; + + Schema actualResponse = client.getSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSchemaRequest actualRequest = ((GetSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSchemaExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + String name = "name3373707"; + client.getSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSchemasTest() throws Exception { + Schema responsesElement = Schema.newBuilder().build(); + ListSchemasResponse expectedResponse = + ListSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllSchemas(Arrays.asList(responsesElement)) + .build(); + mockSchemaService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + + ListSchemasPagedResponse pagedListResponse = client.listSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchemasList().get(0), resources.get(0)); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSchemasRequest actualRequest = ((ListSchemasRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSchemasExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + client.listSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSchemasTest2() throws Exception { + Schema responsesElement = Schema.newBuilder().build(); + ListSchemasResponse expectedResponse = + ListSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllSchemas(Arrays.asList(responsesElement)) + .build(); + mockSchemaService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSchemasPagedResponse pagedListResponse = client.listSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchemasList().get(0), resources.get(0)); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSchemasRequest actualRequest = ((ListSchemasRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSchemasExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSchemaTest() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSchemaService.addResponse(resultOperation); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + + Schema actualResponse = client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSchemaRequest actualRequest = ((CreateSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(schema, actualRequest.getSchema()); + Assert.assertEquals(schemaId, actualRequest.getSchemaId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createSchemaTest2() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSchemaService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + + Schema actualResponse = client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSchemaRequest actualRequest = ((CreateSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(schema, actualRequest.getSchema()); + Assert.assertEquals(schemaId, actualRequest.getSchemaId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSchemaExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + String parent = "parent-995424086"; + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + client.createSchemaAsync(parent, schema, schemaId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateSchemaTest() throws Exception { + Schema expectedResponse = + Schema.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .addAllFieldConfigs(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSchemaService.addResponse(resultOperation); + + UpdateSchemaRequest request = + UpdateSchemaRequest.newBuilder() + .setSchema(Schema.newBuilder().build()) + .setAllowMissing(true) + .build(); + + Schema actualResponse = client.updateSchemaAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSchemaRequest actualRequest = ((UpdateSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getSchema(), actualRequest.getSchema()); + Assert.assertEquals(request.getAllowMissing(), actualRequest.getAllowMissing()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + UpdateSchemaRequest request = + UpdateSchemaRequest.newBuilder() + .setSchema(Schema.newBuilder().build()) + .setAllowMissing(true) + .build(); + client.updateSchemaAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteSchemaTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSchemaService.addResponse(resultOperation); + + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + + client.deleteSchemaAsync(name).get(); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSchemaRequest actualRequest = ((DeleteSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + client.deleteSchemaAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteSchemaTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSchemaTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSchemaService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteSchemaAsync(name).get(); + + List actualRequests = mockSchemaService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSchemaRequest actualRequest = ((DeleteSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSchemaExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSchemaService.addException(exception); + + try { + String name = "name3373707"; + client.deleteSchemaAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..c47deb53a682 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClientHttpJsonTest.java @@ -0,0 +1,189 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.SearchServiceClient.SearchPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonSearchServiceStub; +import com.google.common.collect.Lists; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SearchServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static SearchServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonSearchServiceStub.getMethodDescriptors(), + SearchServiceSettings.getDefaultEndpoint()); + SearchServiceSettings settings = + SearchServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + SearchServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SearchServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void searchTest() throws Exception { + SearchResponse.SearchResult responsesElement = SearchResponse.SearchResult.newBuilder().build(); + SearchResponse expectedResponse = + SearchResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SearchRequest request = + SearchRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setBranch( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setQuery("query107944136") + .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOffset(-1019779949) + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setUserInfo(UserInfo.newBuilder().build()) + .addAllFacetSpecs(new ArrayList()) + .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build()) + .putAllParams(new HashMap()) + .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) + .setUserPseudoId("userPseudoId-1155274652") + .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build()) + .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .build(); + + SearchPagedResponse pagedListResponse = client.search(request); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchRequest request = + SearchRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setBranch( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setQuery("query107944136") + .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOffset(-1019779949) + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setUserInfo(UserInfo.newBuilder().build()) + .addAllFacetSpecs(new ArrayList()) + .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build()) + .putAllParams(new HashMap()) + .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) + .setUserPseudoId("userPseudoId-1155274652") + .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build()) + .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .build(); + client.search(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClientTest.java new file mode 100644 index 000000000000..426aab56f828 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceClientTest.java @@ -0,0 +1,209 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import static com.google.cloud.discoveryengine.v1alpha.SearchServiceClient.SearchPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Value; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SearchServiceClientTest { + private static MockLocations mockLocations; + private static MockSearchService mockSearchService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private SearchServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockSearchService = new MockSearchService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockSearchService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SearchServiceSettings settings = + SearchServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SearchServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void searchTest() throws Exception { + SearchResponse.SearchResult responsesElement = SearchResponse.SearchResult.newBuilder().build(); + SearchResponse expectedResponse = + SearchResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockSearchService.addResponse(expectedResponse); + + SearchRequest request = + SearchRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setBranch( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setQuery("query107944136") + .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOffset(-1019779949) + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setUserInfo(UserInfo.newBuilder().build()) + .addAllFacetSpecs(new ArrayList()) + .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build()) + .putAllParams(new HashMap()) + .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) + .setUserPseudoId("userPseudoId-1155274652") + .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build()) + .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .build(); + + SearchPagedResponse pagedListResponse = client.search(request); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockSearchService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchRequest actualRequest = ((SearchRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getServingConfig(), actualRequest.getServingConfig()); + Assert.assertEquals(request.getBranch(), actualRequest.getBranch()); + Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertEquals(request.getImageQuery(), actualRequest.getImageQuery()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getOffset(), actualRequest.getOffset()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); + Assert.assertEquals(request.getUserInfo(), actualRequest.getUserInfo()); + Assert.assertEquals(request.getFacetSpecsList(), actualRequest.getFacetSpecsList()); + Assert.assertEquals(request.getBoostSpec(), actualRequest.getBoostSpec()); + Assert.assertEquals(request.getParamsMap(), actualRequest.getParamsMap()); + Assert.assertEquals(request.getQueryExpansionSpec(), actualRequest.getQueryExpansionSpec()); + Assert.assertEquals(request.getSpellCorrectionSpec(), actualRequest.getSpellCorrectionSpec()); + Assert.assertEquals(request.getUserPseudoId(), actualRequest.getUserPseudoId()); + Assert.assertEquals(request.getContentSearchSpec(), actualRequest.getContentSearchSpec()); + Assert.assertEquals(request.getEmbeddingSpec(), actualRequest.getEmbeddingSpec()); + Assert.assertEquals(request.getRankingExpression(), actualRequest.getRankingExpression()); + Assert.assertEquals(request.getSafeSearch(), actualRequest.getSafeSearch()); + Assert.assertEquals(request.getUserLabelsMap(), actualRequest.getUserLabelsMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSearchService.addException(exception); + + try { + SearchRequest request = + SearchRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setBranch( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setQuery("query107944136") + .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOffset(-1019779949) + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setUserInfo(UserInfo.newBuilder().build()) + .addAllFacetSpecs(new ArrayList()) + .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build()) + .putAllParams(new HashMap()) + .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) + .setUserPseudoId("userPseudoId-1155274652") + .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build()) + .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .build(); + client.search(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..2844e1d5bafc --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClientHttpJsonTest.java @@ -0,0 +1,140 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonSiteSearchEngineServiceStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SiteSearchEngineServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static SiteSearchEngineServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonSiteSearchEngineServiceStub.getMethodDescriptors(), + SiteSearchEngineServiceSettings.getDefaultEndpoint()); + SiteSearchEngineServiceSettings settings = + SiteSearchEngineServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + SiteSearchEngineServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SiteSearchEngineServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void recrawlUrisTest() throws Exception { + RecrawlUrisResponse expectedResponse = + RecrawlUrisResponse.newBuilder() + .addAllFailureSamples(new ArrayList()) + .addAllFailedUris(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("recrawlUrisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + RecrawlUrisRequest request = + RecrawlUrisRequest.newBuilder() + .setSiteSearchEngine( + SiteSearchEngineName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .addAllUris(new ArrayList()) + .build(); + + RecrawlUrisResponse actualResponse = client.recrawlUrisAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void recrawlUrisExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RecrawlUrisRequest request = + RecrawlUrisRequest.newBuilder() + .setSiteSearchEngine( + SiteSearchEngineName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .addAllUris(new ArrayList()) + .build(); + client.recrawlUrisAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClientTest.java new file mode 100644 index 000000000000..6307a473e5d0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceClientTest.java @@ -0,0 +1,147 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SiteSearchEngineServiceClientTest { + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockSiteSearchEngineService mockSiteSearchEngineService; + private LocalChannelProvider channelProvider; + private SiteSearchEngineServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockSiteSearchEngineService = new MockSiteSearchEngineService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockSiteSearchEngineService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SiteSearchEngineServiceSettings settings = + SiteSearchEngineServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SiteSearchEngineServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void recrawlUrisTest() throws Exception { + RecrawlUrisResponse expectedResponse = + RecrawlUrisResponse.newBuilder() + .addAllFailureSamples(new ArrayList()) + .addAllFailedUris(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("recrawlUrisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockSiteSearchEngineService.addResponse(resultOperation); + + RecrawlUrisRequest request = + RecrawlUrisRequest.newBuilder() + .setSiteSearchEngine( + SiteSearchEngineName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .addAllUris(new ArrayList()) + .build(); + + RecrawlUrisResponse actualResponse = client.recrawlUrisAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSiteSearchEngineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RecrawlUrisRequest actualRequest = ((RecrawlUrisRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getSiteSearchEngine(), actualRequest.getSiteSearchEngine()); + Assert.assertEquals(request.getUrisList(), actualRequest.getUrisList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void recrawlUrisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSiteSearchEngineService.addException(exception); + + try { + RecrawlUrisRequest request = + RecrawlUrisRequest.newBuilder() + .setSiteSearchEngine( + SiteSearchEngineName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .addAllUris(new ArrayList()) + .build(); + client.recrawlUrisAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..3cdebe60a875 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClientHttpJsonTest.java @@ -0,0 +1,350 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.HttpBody; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1alpha.stub.HttpJsonUserEventServiceStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class UserEventServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static UserEventServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonUserEventServiceStub.getMethodDescriptors(), + UserEventServiceSettings.getDefaultEndpoint()); + UserEventServiceSettings settings = + UserEventServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + UserEventServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = UserEventServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void writeUserEventTest() throws Exception { + UserEvent expectedResponse = + UserEvent.newBuilder() + .setEventType("eventType31430900") + .setUserPseudoId("userPseudoId-1155274652") + .setEventTime(Timestamp.newBuilder().build()) + .setUserInfo(UserInfo.newBuilder().build()) + .setDirectUserRequest(true) + .setSessionId("sessionId607796817") + .setPageInfo(PageInfo.newBuilder().build()) + .setAttributionToken("attributionToken104706234") + .setFilter("filter-1274492040") + .addAllDocuments(new ArrayList()) + .setPanel(PanelInfo.newBuilder().build()) + .setSearchInfo(SearchInfo.newBuilder().build()) + .setCompletionInfo(CompletionInfo.newBuilder().build()) + .setTransactionInfo(TransactionInfo.newBuilder().build()) + .addAllTagIds(new ArrayList()) + .addAllPromotionIds(new ArrayList()) + .putAllAttributes(new HashMap()) + .setMediaInfo(MediaInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + WriteUserEventRequest request = + WriteUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .build(); + + UserEvent actualResponse = client.writeUserEvent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void writeUserEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WriteUserEventRequest request = + WriteUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .build(); + client.writeUserEvent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void collectUserEventTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + CollectUserEventRequest request = + CollectUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent("userEvent315571599") + .setUri("uri116076") + .setEts(100772) + .build(); + + HttpBody actualResponse = client.collectUserEvent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void collectUserEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CollectUserEventRequest request = + CollectUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent("userEvent315571599") + .setUri("uri116076") + .setEts(100772) + .build(); + client.collectUserEvent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void purgeUserEventsTest() throws Exception { + PurgeUserEventsResponse expectedResponse = + PurgeUserEventsResponse.newBuilder().setPurgeCount(575305851).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeUserEventsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PurgeUserEventsRequest request = + PurgeUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeUserEventsResponse actualResponse = client.purgeUserEventsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeUserEventsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PurgeUserEventsRequest request = + PurgeUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeUserEventsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importUserEventsTest() throws Exception { + ImportUserEventsResponse expectedResponse = + ImportUserEventsResponse.newBuilder() + .addAllErrorSamples(new ArrayList()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setJoinedEventsCount(-720068705) + .setUnjoinedEventsCount(512159846) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importUserEventsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportUserEventsRequest request = + ImportUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + + ImportUserEventsResponse actualResponse = client.importUserEventsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importUserEventsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportUserEventsRequest request = + ImportUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + client.importUserEventsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClientTest.java new file mode 100644 index 000000000000..29ac02c829b4 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceClientTest.java @@ -0,0 +1,350 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.HttpBody; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class UserEventServiceClientTest { + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockUserEventService mockUserEventService; + private LocalChannelProvider channelProvider; + private UserEventServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockUserEventService = new MockUserEventService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockUserEventService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + UserEventServiceSettings settings = + UserEventServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = UserEventServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void writeUserEventTest() throws Exception { + UserEvent expectedResponse = + UserEvent.newBuilder() + .setEventType("eventType31430900") + .setUserPseudoId("userPseudoId-1155274652") + .setEventTime(Timestamp.newBuilder().build()) + .setUserInfo(UserInfo.newBuilder().build()) + .setDirectUserRequest(true) + .setSessionId("sessionId607796817") + .setPageInfo(PageInfo.newBuilder().build()) + .setAttributionToken("attributionToken104706234") + .setFilter("filter-1274492040") + .addAllDocuments(new ArrayList()) + .setPanel(PanelInfo.newBuilder().build()) + .setSearchInfo(SearchInfo.newBuilder().build()) + .setCompletionInfo(CompletionInfo.newBuilder().build()) + .setTransactionInfo(TransactionInfo.newBuilder().build()) + .addAllTagIds(new ArrayList()) + .addAllPromotionIds(new ArrayList()) + .putAllAttributes(new HashMap()) + .setMediaInfo(MediaInfo.newBuilder().build()) + .build(); + mockUserEventService.addResponse(expectedResponse); + + WriteUserEventRequest request = + WriteUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .build(); + + UserEvent actualResponse = client.writeUserEvent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserEventService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + WriteUserEventRequest actualRequest = ((WriteUserEventRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getUserEvent(), actualRequest.getUserEvent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void writeUserEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserEventService.addException(exception); + + try { + WriteUserEventRequest request = + WriteUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .build(); + client.writeUserEvent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void collectUserEventTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockUserEventService.addResponse(expectedResponse); + + CollectUserEventRequest request = + CollectUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent("userEvent315571599") + .setUri("uri116076") + .setEts(100772) + .build(); + + HttpBody actualResponse = client.collectUserEvent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserEventService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CollectUserEventRequest actualRequest = ((CollectUserEventRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getUserEvent(), actualRequest.getUserEvent()); + Assert.assertEquals(request.getUri(), actualRequest.getUri()); + Assert.assertEquals(request.getEts(), actualRequest.getEts()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void collectUserEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserEventService.addException(exception); + + try { + CollectUserEventRequest request = + CollectUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent("userEvent315571599") + .setUri("uri116076") + .setEts(100772) + .build(); + client.collectUserEvent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void purgeUserEventsTest() throws Exception { + PurgeUserEventsResponse expectedResponse = + PurgeUserEventsResponse.newBuilder().setPurgeCount(575305851).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeUserEventsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockUserEventService.addResponse(resultOperation); + + PurgeUserEventsRequest request = + PurgeUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + PurgeUserEventsResponse actualResponse = client.purgeUserEventsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserEventService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeUserEventsRequest actualRequest = ((PurgeUserEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getForce(), actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeUserEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserEventService.addException(exception); + + try { + PurgeUserEventsRequest request = + PurgeUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeUserEventsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importUserEventsTest() throws Exception { + ImportUserEventsResponse expectedResponse = + ImportUserEventsResponse.newBuilder() + .addAllErrorSamples(new ArrayList()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setJoinedEventsCount(-720068705) + .setUnjoinedEventsCount(512159846) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importUserEventsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockUserEventService.addResponse(resultOperation); + + ImportUserEventsRequest request = + ImportUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + + ImportUserEventsResponse actualResponse = client.importUserEventsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserEventService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportUserEventsRequest actualRequest = ((ImportUserEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInlineSource(), actualRequest.getInlineSource()); + Assert.assertEquals(request.getGcsSource(), actualRequest.getGcsSource()); + Assert.assertEquals(request.getBigquerySource(), actualRequest.getBigquerySource()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getErrorConfig(), actualRequest.getErrorConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importUserEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserEventService.addException(exception); + + try { + ImportUserEventsRequest request = + ImportUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + client.importUserEventsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1/pom.xml b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1/pom.xml index 81d11af1e533..955763037389 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1/pom.xml +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-discoveryengine-v1 - 0.24.0 + 0.25.0 grpc-google-cloud-discoveryengine-v1 GRPC library for google-cloud-discoveryengine com.google.cloud google-cloud-discoveryengine-parent - 0.24.0 + 0.25.0 diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/pom.xml b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/pom.xml new file mode 100644 index 000000000000..dd0f62a752b0 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-discoveryengine-v1alpha + 0.25.0 + grpc-google-cloud-discoveryengine-v1alpha + GRPC library for google-cloud-discoveryengine + + com.google.cloud + google-cloud-discoveryengine-parent + 0.25.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-discoveryengine-v1alpha + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceGrpc.java new file mode 100644 index 000000000000..99a72be8814c --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceGrpc.java @@ -0,0 +1,382 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for Auto-Completion.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/completion_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class CompletionServiceGrpc { + + private CompletionServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.CompletionService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse> + getCompleteQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CompleteQuery", + requestType = com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse> + getCompleteQueryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse> + getCompleteQueryMethod; + if ((getCompleteQueryMethod = CompletionServiceGrpc.getCompleteQueryMethod) == null) { + synchronized (CompletionServiceGrpc.class) { + if ((getCompleteQueryMethod = CompletionServiceGrpc.getCompleteQueryMethod) == null) { + CompletionServiceGrpc.getCompleteQueryMethod = + getCompleteQueryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CompleteQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CompletionServiceMethodDescriptorSupplier("CompleteQuery")) + .build(); + } + } + } + return getCompleteQueryMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CompletionServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionServiceStub(channel, callOptions); + } + }; + return CompletionServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CompletionServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionServiceBlockingStub(channel, callOptions); + } + }; + return CompletionServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CompletionServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CompletionServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionServiceFutureStub(channel, callOptions); + } + }; + return CompletionServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for Auto-Completion.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Completes the specified user input with keyword suggestions.
+     * 
+ */ + default void completeQuery( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCompleteQueryMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service CompletionService. + * + *
+   * Service for Auto-Completion.
+   * 
+ */ + public abstract static class CompletionServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return CompletionServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service CompletionService. + * + *
+   * Service for Auto-Completion.
+   * 
+ */ + public static final class CompletionServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private CompletionServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompletionServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Completes the specified user input with keyword suggestions.
+     * 
+ */ + public void completeQuery( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCompleteQueryMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service CompletionService. + * + *
+   * Service for Auto-Completion.
+   * 
+ */ + public static final class CompletionServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CompletionServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompletionServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Completes the specified user input with keyword suggestions.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse completeQuery( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCompleteQueryMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service CompletionService. + * + *
+   * Service for Auto-Completion.
+   * 
+ */ + public static final class CompletionServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CompletionServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CompletionServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CompletionServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Completes the specified user input with keyword suggestions.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse> + completeQuery(com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCompleteQueryMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_COMPLETE_QUERY = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_COMPLETE_QUERY: + serviceImpl.completeQuery( + (com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCompleteQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse>( + service, METHODID_COMPLETE_QUERY))) + .build(); + } + + private abstract static class CompletionServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CompletionServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CompletionService"); + } + } + + private static final class CompletionServiceFileDescriptorSupplier + extends CompletionServiceBaseDescriptorSupplier { + CompletionServiceFileDescriptorSupplier() {} + } + + private static final class CompletionServiceMethodDescriptorSupplier + extends CompletionServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + CompletionServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (CompletionServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CompletionServiceFileDescriptorSupplier()) + .addMethod(getCompleteQueryMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceGrpc.java new file mode 100644 index 000000000000..bacf8e915512 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceGrpc.java @@ -0,0 +1,1057 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for conversational search.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ConversationalSearchServiceGrpc { + + private ConversationalSearchServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.ConversationalSearchService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse> + getConverseConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ConverseConversation", + requestType = com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse> + getConverseConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse> + getConverseConversationMethod; + if ((getConverseConversationMethod = + ConversationalSearchServiceGrpc.getConverseConversationMethod) + == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + if ((getConverseConversationMethod = + ConversationalSearchServiceGrpc.getConverseConversationMethod) + == null) { + ConversationalSearchServiceGrpc.getConverseConversationMethod = + getConverseConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ConverseConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationalSearchServiceMethodDescriptorSupplier( + "ConverseConversation")) + .build(); + } + } + } + return getConverseConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getCreateConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateConversation", + requestType = com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.Conversation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getCreateConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getCreateConversationMethod; + if ((getCreateConversationMethod = ConversationalSearchServiceGrpc.getCreateConversationMethod) + == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + if ((getCreateConversationMethod = + ConversationalSearchServiceGrpc.getCreateConversationMethod) + == null) { + ConversationalSearchServiceGrpc.getCreateConversationMethod = + getCreateConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.Conversation + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationalSearchServiceMethodDescriptorSupplier( + "CreateConversation")) + .build(); + } + } + } + return getCreateConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest, + com.google.protobuf.Empty> + getDeleteConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteConversation", + requestType = com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest, + com.google.protobuf.Empty> + getDeleteConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest, + com.google.protobuf.Empty> + getDeleteConversationMethod; + if ((getDeleteConversationMethod = ConversationalSearchServiceGrpc.getDeleteConversationMethod) + == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + if ((getDeleteConversationMethod = + ConversationalSearchServiceGrpc.getDeleteConversationMethod) + == null) { + ConversationalSearchServiceGrpc.getDeleteConversationMethod = + getDeleteConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ConversationalSearchServiceMethodDescriptorSupplier( + "DeleteConversation")) + .build(); + } + } + } + return getDeleteConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getUpdateConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateConversation", + requestType = com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.Conversation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getUpdateConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getUpdateConversationMethod; + if ((getUpdateConversationMethod = ConversationalSearchServiceGrpc.getUpdateConversationMethod) + == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + if ((getUpdateConversationMethod = + ConversationalSearchServiceGrpc.getUpdateConversationMethod) + == null) { + ConversationalSearchServiceGrpc.getUpdateConversationMethod = + getUpdateConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.Conversation + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationalSearchServiceMethodDescriptorSupplier( + "UpdateConversation")) + .build(); + } + } + } + return getUpdateConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getGetConversationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConversation", + requestType = com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.Conversation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getGetConversationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation> + getGetConversationMethod; + if ((getGetConversationMethod = ConversationalSearchServiceGrpc.getGetConversationMethod) + == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + if ((getGetConversationMethod = ConversationalSearchServiceGrpc.getGetConversationMethod) + == null) { + ConversationalSearchServiceGrpc.getGetConversationMethod = + getGetConversationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConversation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.Conversation + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationalSearchServiceMethodDescriptorSupplier( + "GetConversation")) + .build(); + } + } + } + return getGetConversationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest, + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse> + getListConversationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListConversations", + requestType = com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest, + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse> + getListConversationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest, + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse> + getListConversationsMethod; + if ((getListConversationsMethod = ConversationalSearchServiceGrpc.getListConversationsMethod) + == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + if ((getListConversationsMethod = + ConversationalSearchServiceGrpc.getListConversationsMethod) + == null) { + ConversationalSearchServiceGrpc.getListConversationsMethod = + getListConversationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConversations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationalSearchServiceMethodDescriptorSupplier( + "ListConversations")) + .build(); + } + } + } + return getListConversationsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ConversationalSearchServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConversationalSearchServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConversationalSearchServiceStub(channel, callOptions); + } + }; + return ConversationalSearchServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ConversationalSearchServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConversationalSearchServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConversationalSearchServiceBlockingStub(channel, callOptions); + } + }; + return ConversationalSearchServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ConversationalSearchServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConversationalSearchServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConversationalSearchServiceFutureStub(channel, callOptions); + } + }; + return ConversationalSearchServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for conversational search.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Converses a conversation.
+     * 
+ */ + default void converseConversation( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getConverseConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * create already exists, an ALREADY_EXISTS error is returned.
+     * 
+ */ + default void createConversation( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * delete does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + default void deleteConversation( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a Conversation.
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action
+     * type cannot be changed. If the
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + default void updateConversation( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a Conversation.
+     * 
+ */ + default void getConversation( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetConversationMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all Conversations by their parent
+     * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
+     * 
+ */ + default void listConversations( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListConversationsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service ConversationalSearchService. + * + *
+   * Service for conversational search.
+   * 
+ */ + public abstract static class ConversationalSearchServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ConversationalSearchServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service ConversationalSearchService. + * + *
+   * Service for conversational search.
+   * 
+ */ + public static final class ConversationalSearchServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ConversationalSearchServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ConversationalSearchServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConversationalSearchServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Converses a conversation.
+     * 
+ */ + public void converseConversation( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getConverseConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * create already exists, an ALREADY_EXISTS error is returned.
+     * 
+ */ + public void createConversation( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * delete does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + public void deleteConversation( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a Conversation.
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action
+     * type cannot be changed. If the
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + public void updateConversation( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a Conversation.
+     * 
+ */ + public void getConversation( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConversationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all Conversations by their parent
+     * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
+     * 
+ */ + public void listConversations( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListConversationsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service ConversationalSearchService. + * + *
+   * Service for conversational search.
+   * 
+ */ + public static final class ConversationalSearchServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ConversationalSearchServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ConversationalSearchServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConversationalSearchServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Converses a conversation.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + converseConversation( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getConverseConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * create already exists, an ALREADY_EXISTS error is returned.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.Conversation createConversation( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * delete does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + public com.google.protobuf.Empty deleteConversation( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a Conversation.
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action
+     * type cannot be changed. If the
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.Conversation updateConversation( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a Conversation.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConversationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all Conversations by their parent
+     * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse listConversations( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConversationsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * ConversationalSearchService. + * + *
+   * Service for conversational search.
+   * 
+ */ + public static final class ConversationalSearchServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ConversationalSearchServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ConversationalSearchServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConversationalSearchServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Converses a conversation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse> + converseConversation( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getConverseConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * create already exists, an ALREADY_EXISTS error is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.Conversation> + createConversation( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Conversation.
+     * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * delete does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteConversation( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a Conversation.
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action
+     * type cannot be changed. If the
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update
+     * does not exist, a NOT_FOUND error is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.Conversation> + updateConversation( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a Conversation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.Conversation> + getConversation(com.google.cloud.discoveryengine.v1alpha.GetConversationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConversationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all Conversations by their parent
+     * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse> + listConversations( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListConversationsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CONVERSE_CONVERSATION = 0; + private static final int METHODID_CREATE_CONVERSATION = 1; + private static final int METHODID_DELETE_CONVERSATION = 2; + private static final int METHODID_UPDATE_CONVERSATION = 3; + private static final int METHODID_GET_CONVERSATION = 4; + private static final int METHODID_LIST_CONVERSATIONS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CONVERSE_CONVERSATION: + serviceImpl.converseConversation( + (com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse>) + responseObserver); + break; + case METHODID_CREATE_CONVERSATION: + serviceImpl.createConversation( + (com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_CONVERSATION: + serviceImpl.deleteConversation( + (com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CONVERSATION: + serviceImpl.updateConversation( + (com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_CONVERSATION: + serviceImpl.getConversation( + (com.google.cloud.discoveryengine.v1alpha.GetConversationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CONVERSATIONS: + serviceImpl.listConversations( + (com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getConverseConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse>( + service, METHODID_CONVERSE_CONVERSATION))) + .addMethod( + getCreateConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation>( + service, METHODID_CREATE_CONVERSATION))) + .addMethod( + getDeleteConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_CONVERSATION))) + .addMethod( + getUpdateConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation>( + service, METHODID_UPDATE_CONVERSATION))) + .addMethod( + getGetConversationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest, + com.google.cloud.discoveryengine.v1alpha.Conversation>( + service, METHODID_GET_CONVERSATION))) + .addMethod( + getListConversationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest, + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse>( + service, METHODID_LIST_CONVERSATIONS))) + .build(); + } + + private abstract static class ConversationalSearchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ConversationalSearchServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ConversationalSearchService"); + } + } + + private static final class ConversationalSearchServiceFileDescriptorSupplier + extends ConversationalSearchServiceBaseDescriptorSupplier { + ConversationalSearchServiceFileDescriptorSupplier() {} + } + + private static final class ConversationalSearchServiceMethodDescriptorSupplier + extends ConversationalSearchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ConversationalSearchServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ConversationalSearchServiceFileDescriptorSupplier()) + .addMethod(getConverseConversationMethod()) + .addMethod(getCreateConversationMethod()) + .addMethod(getDeleteConversationMethod()) + .addMethod(getUpdateConversationMethod()) + .addMethod(getGetConversationMethod()) + .addMethod(getListConversationsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceGrpc.java new file mode 100644 index 000000000000..d5a97f9787ae --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceGrpc.java @@ -0,0 +1,1174 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for ingesting
+ * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the
+ * customer's website.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/document_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DocumentServiceGrpc { + + private DocumentServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.DocumentService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getGetDocumentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDocument", + requestType = com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.Document.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getGetDocumentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getGetDocumentMethod; + if ((getGetDocumentMethod = DocumentServiceGrpc.getGetDocumentMethod) == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getGetDocumentMethod = DocumentServiceGrpc.getGetDocumentMethod) == null) { + DocumentServiceGrpc.getGetDocumentMethod = + getGetDocumentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDocument")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.Document + .getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("GetDocument")) + .build(); + } + } + } + return getGetDocumentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse> + getListDocumentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDocuments", + requestType = com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse> + getListDocumentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse> + getListDocumentsMethod; + if ((getListDocumentsMethod = DocumentServiceGrpc.getListDocumentsMethod) == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getListDocumentsMethod = DocumentServiceGrpc.getListDocumentsMethod) == null) { + DocumentServiceGrpc.getListDocumentsMethod = + getListDocumentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDocuments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("ListDocuments")) + .build(); + } + } + } + return getListDocumentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getCreateDocumentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDocument", + requestType = com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.Document.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getCreateDocumentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getCreateDocumentMethod; + if ((getCreateDocumentMethod = DocumentServiceGrpc.getCreateDocumentMethod) == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getCreateDocumentMethod = DocumentServiceGrpc.getCreateDocumentMethod) == null) { + DocumentServiceGrpc.getCreateDocumentMethod = + getCreateDocumentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDocument")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.Document + .getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("CreateDocument")) + .build(); + } + } + } + return getCreateDocumentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getUpdateDocumentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDocument", + requestType = com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.Document.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getUpdateDocumentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document> + getUpdateDocumentMethod; + if ((getUpdateDocumentMethod = DocumentServiceGrpc.getUpdateDocumentMethod) == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getUpdateDocumentMethod = DocumentServiceGrpc.getUpdateDocumentMethod) == null) { + DocumentServiceGrpc.getUpdateDocumentMethod = + getUpdateDocumentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDocument")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.Document + .getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("UpdateDocument")) + .build(); + } + } + } + return getUpdateDocumentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest, com.google.protobuf.Empty> + getDeleteDocumentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDocument", + requestType = com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest, com.google.protobuf.Empty> + getDeleteDocumentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest, + com.google.protobuf.Empty> + getDeleteDocumentMethod; + if ((getDeleteDocumentMethod = DocumentServiceGrpc.getDeleteDocumentMethod) == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getDeleteDocumentMethod = DocumentServiceGrpc.getDeleteDocumentMethod) == null) { + DocumentServiceGrpc.getDeleteDocumentMethod = + getDeleteDocumentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDocument")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("DeleteDocument")) + .build(); + } + } + } + return getDeleteDocumentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest, + com.google.longrunning.Operation> + getImportDocumentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportDocuments", + requestType = com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest, + com.google.longrunning.Operation> + getImportDocumentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest, + com.google.longrunning.Operation> + getImportDocumentsMethod; + if ((getImportDocumentsMethod = DocumentServiceGrpc.getImportDocumentsMethod) == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getImportDocumentsMethod = DocumentServiceGrpc.getImportDocumentsMethod) == null) { + DocumentServiceGrpc.getImportDocumentsMethod = + getImportDocumentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportDocuments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("ImportDocuments")) + .build(); + } + } + } + return getImportDocumentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest, + com.google.longrunning.Operation> + getPurgeDocumentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PurgeDocuments", + requestType = com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest, + com.google.longrunning.Operation> + getPurgeDocumentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest, + com.google.longrunning.Operation> + getPurgeDocumentsMethod; + if ((getPurgeDocumentsMethod = DocumentServiceGrpc.getPurgeDocumentsMethod) == null) { + synchronized (DocumentServiceGrpc.class) { + if ((getPurgeDocumentsMethod = DocumentServiceGrpc.getPurgeDocumentsMethod) == null) { + DocumentServiceGrpc.getPurgeDocumentsMethod = + getPurgeDocumentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeDocuments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DocumentServiceMethodDescriptorSupplier("PurgeDocuments")) + .build(); + } + } + } + return getPurgeDocumentsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DocumentServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DocumentServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DocumentServiceStub(channel, callOptions); + } + }; + return DocumentServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DocumentServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DocumentServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DocumentServiceBlockingStub(channel, callOptions); + } + }; + return DocumentServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DocumentServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DocumentServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DocumentServiceFutureStub(channel, callOptions); + } + }; + return DocumentServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for ingesting
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the
+   * customer's website.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + default void getDocument( + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDocumentMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ */ + default void listDocuments( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDocumentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + default void createDocument( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDocumentMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + default void updateDocument( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDocumentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + default void deleteDocument( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDocumentMethod(), responseObserver); + } + + /** + * + * + *
+     * Bulk import of multiple
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request
+     * processing may be synchronous. Non-existing items will be created.
+     * Note: It is possible for a subset of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
+     * successfully updated.
+     * 
+ */ + default void importDocuments( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportDocumentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Permanently deletes all selected
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s in a branch.
+     * This process is asynchronous. Depending on the number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * this operation can take hours to complete. Before the delete operation
+     * completes, some [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * might still be returned by
+     * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+     * or
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
+     * To get a list of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * set
+     * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
+     * to false.
+     * 
+ */ + default void purgeDocuments( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPurgeDocumentsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DocumentService. + * + *
+   * Service for ingesting
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the
+   * customer's website.
+   * 
+ */ + public abstract static class DocumentServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DocumentServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DocumentService. + * + *
+   * Service for ingesting
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the
+   * customer's website.
+   * 
+ */ + public static final class DocumentServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DocumentServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DocumentServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DocumentServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public void getDocument( + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDocumentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ */ + public void listDocuments( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDocumentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public void createDocument( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDocumentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public void updateDocument( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDocumentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public void deleteDocument( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDocumentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Bulk import of multiple
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request
+     * processing may be synchronous. Non-existing items will be created.
+     * Note: It is possible for a subset of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
+     * successfully updated.
+     * 
+ */ + public void importDocuments( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportDocumentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Permanently deletes all selected
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s in a branch.
+     * This process is asynchronous. Depending on the number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * this operation can take hours to complete. Before the delete operation
+     * completes, some [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * might still be returned by
+     * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+     * or
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
+     * To get a list of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * set
+     * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
+     * to false.
+     * 
+ */ + public void purgeDocuments( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPurgeDocumentsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DocumentService. + * + *
+   * Service for ingesting
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the
+   * customer's website.
+   * 
+ */ + public static final class DocumentServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DocumentServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DocumentServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DocumentServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.Document getDocument( + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse listDocuments( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.Document createDocument( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.Document updateDocument( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.protobuf.Empty deleteDocument( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDocumentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Bulk import of multiple
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request
+     * processing may be synchronous. Non-existing items will be created.
+     * Note: It is possible for a subset of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
+     * successfully updated.
+     * 
+ */ + public com.google.longrunning.Operation importDocuments( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportDocumentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Permanently deletes all selected
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s in a branch.
+     * This process is asynchronous. Depending on the number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * this operation can take hours to complete. Before the delete operation
+     * completes, some [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * might still be returned by
+     * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+     * or
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
+     * To get a list of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * set
+     * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
+     * to false.
+     * 
+ */ + public com.google.longrunning.Operation purgeDocuments( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPurgeDocumentsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DocumentService. + * + *
+   * Service for ingesting
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the
+   * customer's website.
+   * 
+ */ + public static final class DocumentServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DocumentServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DocumentServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DocumentServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.Document> + getDocument(com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDocumentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse> + listDocuments(com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDocumentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.Document> + createDocument(com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDocumentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.Document> + updateDocument(com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDocumentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDocument(com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDocumentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Bulk import of multiple
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request
+     * processing may be synchronous. Non-existing items will be created.
+     * Note: It is possible for a subset of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
+     * successfully updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importDocuments(com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportDocumentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Permanently deletes all selected
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s in a branch.
+     * This process is asynchronous. Depending on the number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * this operation can take hours to complete. Before the delete operation
+     * completes, some [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * might still be returned by
+     * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+     * or
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
+     * To get a list of the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
+     * set
+     * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
+     * to false.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + purgeDocuments(com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPurgeDocumentsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_DOCUMENT = 0; + private static final int METHODID_LIST_DOCUMENTS = 1; + private static final int METHODID_CREATE_DOCUMENT = 2; + private static final int METHODID_UPDATE_DOCUMENT = 3; + private static final int METHODID_DELETE_DOCUMENT = 4; + private static final int METHODID_IMPORT_DOCUMENTS = 5; + private static final int METHODID_PURGE_DOCUMENTS = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_DOCUMENT: + serviceImpl.getDocument( + (com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DOCUMENTS: + serviceImpl.listDocuments( + (com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse>) + responseObserver); + break; + case METHODID_CREATE_DOCUMENT: + serviceImpl.createDocument( + (com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DOCUMENT: + serviceImpl.updateDocument( + (com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_DOCUMENT: + serviceImpl.deleteDocument( + (com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_DOCUMENTS: + serviceImpl.importDocuments( + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PURGE_DOCUMENTS: + serviceImpl.purgeDocuments( + (com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetDocumentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document>( + service, METHODID_GET_DOCUMENT))) + .addMethod( + getListDocumentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse>( + service, METHODID_LIST_DOCUMENTS))) + .addMethod( + getCreateDocumentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document>( + service, METHODID_CREATE_DOCUMENT))) + .addMethod( + getUpdateDocumentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest, + com.google.cloud.discoveryengine.v1alpha.Document>( + service, METHODID_UPDATE_DOCUMENT))) + .addMethod( + getDeleteDocumentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_DOCUMENT))) + .addMethod( + getImportDocumentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_DOCUMENTS))) + .addMethod( + getPurgeDocumentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest, + com.google.longrunning.Operation>(service, METHODID_PURGE_DOCUMENTS))) + .build(); + } + + private abstract static class DocumentServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DocumentServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DocumentService"); + } + } + + private static final class DocumentServiceFileDescriptorSupplier + extends DocumentServiceBaseDescriptorSupplier { + DocumentServiceFileDescriptorSupplier() {} + } + + private static final class DocumentServiceMethodDescriptorSupplier + extends DocumentServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DocumentServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DocumentServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DocumentServiceFileDescriptorSupplier()) + .addMethod(getGetDocumentMethod()) + .addMethod(getListDocumentsMethod()) + .addMethod(getCreateDocumentMethod()) + .addMethod(getUpdateDocumentMethod()) + .addMethod(getDeleteDocumentMethod()) + .addMethod(getImportDocumentsMethod()) + .addMethod(getPurgeDocumentsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceGrpc.java new file mode 100644 index 000000000000..e4682b4a6e2a --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceGrpc.java @@ -0,0 +1,381 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for making recommendations.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/recommendation_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class RecommendationServiceGrpc { + + private RecommendationServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.RecommendationService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RecommendRequest, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse> + getRecommendMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Recommend", + requestType = com.google.cloud.discoveryengine.v1alpha.RecommendRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.RecommendResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RecommendRequest, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse> + getRecommendMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RecommendRequest, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse> + getRecommendMethod; + if ((getRecommendMethod = RecommendationServiceGrpc.getRecommendMethod) == null) { + synchronized (RecommendationServiceGrpc.class) { + if ((getRecommendMethod = RecommendationServiceGrpc.getRecommendMethod) == null) { + RecommendationServiceGrpc.getRecommendMethod = + getRecommendMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Recommend")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.RecommendRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new RecommendationServiceMethodDescriptorSupplier("Recommend")) + .build(); + } + } + } + return getRecommendMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static RecommendationServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RecommendationServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RecommendationServiceStub(channel, callOptions); + } + }; + return RecommendationServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static RecommendationServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RecommendationServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RecommendationServiceBlockingStub(channel, callOptions); + } + }; + return RecommendationServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static RecommendationServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RecommendationServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RecommendationServiceFutureStub(channel, callOptions); + } + }; + return RecommendationServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for making recommendations.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Makes a recommendation, which requires a contextual user event.
+     * 
+ */ + default void recommend( + com.google.cloud.discoveryengine.v1alpha.RecommendRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecommendMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service RecommendationService. + * + *
+   * Service for making recommendations.
+   * 
+ */ + public abstract static class RecommendationServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return RecommendationServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service RecommendationService. + * + *
+   * Service for making recommendations.
+   * 
+ */ + public static final class RecommendationServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private RecommendationServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RecommendationServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RecommendationServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Makes a recommendation, which requires a contextual user event.
+     * 
+ */ + public void recommend( + com.google.cloud.discoveryengine.v1alpha.RecommendRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRecommendMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service RecommendationService. + * + *
+   * Service for making recommendations.
+   * 
+ */ + public static final class RecommendationServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private RecommendationServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RecommendationServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RecommendationServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Makes a recommendation, which requires a contextual user event.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse recommend( + com.google.cloud.discoveryengine.v1alpha.RecommendRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRecommendMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * RecommendationService. + * + *
+   * Service for making recommendations.
+   * 
+ */ + public static final class RecommendationServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private RecommendationServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RecommendationServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RecommendationServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Makes a recommendation, which requires a contextual user event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse> + recommend(com.google.cloud.discoveryengine.v1alpha.RecommendRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRecommendMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_RECOMMEND = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_RECOMMEND: + serviceImpl.recommend( + (com.google.cloud.discoveryengine.v1alpha.RecommendRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getRecommendMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.RecommendRequest, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse>( + service, METHODID_RECOMMEND))) + .build(); + } + + private abstract static class RecommendationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + RecommendationServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("RecommendationService"); + } + } + + private static final class RecommendationServiceFileDescriptorSupplier + extends RecommendationServiceBaseDescriptorSupplier { + RecommendationServiceFileDescriptorSupplier() {} + } + + private static final class RecommendationServiceMethodDescriptorSupplier + extends RecommendationServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + RecommendationServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (RecommendationServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new RecommendationServiceFileDescriptorSupplier()) + .addMethod(getRecommendMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceGrpc.java new file mode 100644 index 000000000000..f25ab18538e6 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceGrpc.java @@ -0,0 +1,839 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/schema_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SchemaServiceGrpc { + + private SchemaServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.SchemaService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest, + com.google.cloud.discoveryengine.v1alpha.Schema> + getGetSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSchema", + requestType = com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.Schema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest, + com.google.cloud.discoveryengine.v1alpha.Schema> + getGetSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest, + com.google.cloud.discoveryengine.v1alpha.Schema> + getGetSchemaMethod; + if ((getGetSchemaMethod = SchemaServiceGrpc.getGetSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getGetSchemaMethod = SchemaServiceGrpc.getGetSchemaMethod) == null) { + SchemaServiceGrpc.getGetSchemaMethod = + getGetSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("GetSchema")) + .build(); + } + } + } + return getGetSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest, + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse> + getListSchemasMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSchemas", + requestType = com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest, + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse> + getListSchemasMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest, + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse> + getListSchemasMethod; + if ((getListSchemasMethod = SchemaServiceGrpc.getListSchemasMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getListSchemasMethod = SchemaServiceGrpc.getListSchemasMethod) == null) { + SchemaServiceGrpc.getListSchemasMethod = + getListSchemasMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSchemas")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse + .getDefaultInstance())) + .setSchemaDescriptor(new SchemaServiceMethodDescriptorSupplier("ListSchemas")) + .build(); + } + } + } + return getListSchemasMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest, + com.google.longrunning.Operation> + getCreateSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSchema", + requestType = com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest, + com.google.longrunning.Operation> + getCreateSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest, + com.google.longrunning.Operation> + getCreateSchemaMethod; + if ((getCreateSchemaMethod = SchemaServiceGrpc.getCreateSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getCreateSchemaMethod = SchemaServiceGrpc.getCreateSchemaMethod) == null) { + SchemaServiceGrpc.getCreateSchemaMethod = + getCreateSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new SchemaServiceMethodDescriptorSupplier("CreateSchema")) + .build(); + } + } + } + return getCreateSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest, + com.google.longrunning.Operation> + getUpdateSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSchema", + requestType = com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest, + com.google.longrunning.Operation> + getUpdateSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest, + com.google.longrunning.Operation> + getUpdateSchemaMethod; + if ((getUpdateSchemaMethod = SchemaServiceGrpc.getUpdateSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getUpdateSchemaMethod = SchemaServiceGrpc.getUpdateSchemaMethod) == null) { + SchemaServiceGrpc.getUpdateSchemaMethod = + getUpdateSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new SchemaServiceMethodDescriptorSupplier("UpdateSchema")) + .build(); + } + } + } + return getUpdateSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest, + com.google.longrunning.Operation> + getDeleteSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSchema", + requestType = com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest, + com.google.longrunning.Operation> + getDeleteSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest, + com.google.longrunning.Operation> + getDeleteSchemaMethod; + if ((getDeleteSchemaMethod = SchemaServiceGrpc.getDeleteSchemaMethod) == null) { + synchronized (SchemaServiceGrpc.class) { + if ((getDeleteSchemaMethod = SchemaServiceGrpc.getDeleteSchemaMethod) == null) { + SchemaServiceGrpc.getDeleteSchemaMethod = + getDeleteSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new SchemaServiceMethodDescriptorSupplier("DeleteSchema")) + .build(); + } + } + } + return getDeleteSchemaMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SchemaServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceStub(channel, callOptions); + } + }; + return SchemaServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SchemaServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingStub(channel, callOptions); + } + }; + return SchemaServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SchemaServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SchemaServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceFutureStub(channel, callOptions); + } + }; + return SchemaServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + default void getSchema( + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSchemaMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+     * 
+ */ + default void listSchemas( + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSchemasMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + default void createSchema( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSchemaMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + default void updateSchema( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSchemaMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + default void deleteSchema( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSchemaMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SchemaService. + * + *
+   * Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ */ + public abstract static class SchemaServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return SchemaServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SchemaService. + * + *
+   * Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ */ + public static final class SchemaServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private SchemaServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public void getSchema( + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSchemaMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+     * 
+ */ + public void listSchemas( + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSchemasMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public void createSchema( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSchemaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public void updateSchema( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSchemaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public void deleteSchema( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSchemaMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SchemaService. + * + *
+   * Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ */ + public static final class SchemaServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SchemaServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.Schema getSchema( + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse listSchemas( + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSchemasMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.longrunning.Operation createSchema( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.longrunning.Operation updateSchema( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.longrunning.Operation deleteSchema( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSchemaMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SchemaService. + * + *
+   * Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ */ + public static final class SchemaServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SchemaServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SchemaServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SchemaServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.Schema> + getSchema(com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSchemaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse> + listSchemas(com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSchemasMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSchema(com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSchemaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSchema(com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSchemaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSchema(com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSchemaMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_SCHEMA = 0; + private static final int METHODID_LIST_SCHEMAS = 1; + private static final int METHODID_CREATE_SCHEMA = 2; + private static final int METHODID_UPDATE_SCHEMA = 3; + private static final int METHODID_DELETE_SCHEMA = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_SCHEMA: + serviceImpl.getSchema( + (com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SCHEMAS: + serviceImpl.listSchemas( + (com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse>) + responseObserver); + break; + case METHODID_CREATE_SCHEMA: + serviceImpl.createSchema( + (com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SCHEMA: + serviceImpl.updateSchema( + (com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SCHEMA: + serviceImpl.deleteSchema( + (com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest, + com.google.cloud.discoveryengine.v1alpha.Schema>(service, METHODID_GET_SCHEMA))) + .addMethod( + getListSchemasMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest, + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse>( + service, METHODID_LIST_SCHEMAS))) + .addMethod( + getCreateSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SCHEMA))) + .addMethod( + getUpdateSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SCHEMA))) + .addMethod( + getDeleteSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_SCHEMA))) + .build(); + } + + private abstract static class SchemaServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SchemaServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SchemaService"); + } + } + + private static final class SchemaServiceFileDescriptorSupplier + extends SchemaServiceBaseDescriptorSupplier { + SchemaServiceFileDescriptorSupplier() {} + } + + private static final class SchemaServiceMethodDescriptorSupplier + extends SchemaServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SchemaServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SchemaServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SchemaServiceFileDescriptorSupplier()) + .addMethod(getGetSchemaMethod()) + .addMethod(getListSchemasMethod()) + .addMethod(getCreateSchemaMethod()) + .addMethod(getUpdateSchemaMethod()) + .addMethod(getDeleteSchemaMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceGrpc.java new file mode 100644 index 000000000000..a3e3a5d13cb2 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceGrpc.java @@ -0,0 +1,375 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for search.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/search_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SearchServiceGrpc { + + private SearchServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.SearchService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.SearchRequest, + com.google.cloud.discoveryengine.v1alpha.SearchResponse> + getSearchMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Search", + requestType = com.google.cloud.discoveryengine.v1alpha.SearchRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.SearchResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.SearchRequest, + com.google.cloud.discoveryengine.v1alpha.SearchResponse> + getSearchMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.SearchRequest, + com.google.cloud.discoveryengine.v1alpha.SearchResponse> + getSearchMethod; + if ((getSearchMethod = SearchServiceGrpc.getSearchMethod) == null) { + synchronized (SearchServiceGrpc.class) { + if ((getSearchMethod = SearchServiceGrpc.getSearchMethod) == null) { + SearchServiceGrpc.getSearchMethod = + getSearchMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Search")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.SearchRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.SearchResponse + .getDefaultInstance())) + .setSchemaDescriptor(new SearchServiceMethodDescriptorSupplier("Search")) + .build(); + } + } + } + return getSearchMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SearchServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SearchServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SearchServiceStub(channel, callOptions); + } + }; + return SearchServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SearchServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SearchServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SearchServiceBlockingStub(channel, callOptions); + } + }; + return SearchServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SearchServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SearchServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SearchServiceFutureStub(channel, callOptions); + } + }; + return SearchServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for search.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Performs a search.
+     * 
+ */ + default void search( + com.google.cloud.discoveryengine.v1alpha.SearchRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SearchService. + * + *
+   * Service for search.
+   * 
+ */ + public abstract static class SearchServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return SearchServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SearchService. + * + *
+   * Service for search.
+   * 
+ */ + public static final class SearchServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private SearchServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SearchServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SearchServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Performs a search.
+     * 
+ */ + public void search( + com.google.cloud.discoveryengine.v1alpha.SearchRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SearchService. + * + *
+   * Service for search.
+   * 
+ */ + public static final class SearchServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SearchServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SearchServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SearchServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Performs a search.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse search( + com.google.cloud.discoveryengine.v1alpha.SearchRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SearchService. + * + *
+   * Service for search.
+   * 
+ */ + public static final class SearchServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SearchServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SearchServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SearchServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Performs a search.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.SearchResponse> + search(com.google.cloud.discoveryengine.v1alpha.SearchRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SEARCH = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SEARCH: + serviceImpl.search( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSearchMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.SearchRequest, + com.google.cloud.discoveryengine.v1alpha.SearchResponse>( + service, METHODID_SEARCH))) + .build(); + } + + private abstract static class SearchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SearchServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SearchService"); + } + } + + private static final class SearchServiceFileDescriptorSupplier + extends SearchServiceBaseDescriptorSupplier { + SearchServiceFileDescriptorSupplier() {} + } + + private static final class SearchServiceMethodDescriptorSupplier + extends SearchServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SearchServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SearchServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SearchServiceFileDescriptorSupplier()) + .addMethod(getSearchMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceGrpc.java new file mode 100644 index 000000000000..6467d5cb624c --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceGrpc.java @@ -0,0 +1,377 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing site search related resources.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SiteSearchEngineServiceGrpc { + + private SiteSearchEngineServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.SiteSearchEngineService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest, + com.google.longrunning.Operation> + getRecrawlUrisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RecrawlUris", + requestType = com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest, + com.google.longrunning.Operation> + getRecrawlUrisMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest, + com.google.longrunning.Operation> + getRecrawlUrisMethod; + if ((getRecrawlUrisMethod = SiteSearchEngineServiceGrpc.getRecrawlUrisMethod) == null) { + synchronized (SiteSearchEngineServiceGrpc.class) { + if ((getRecrawlUrisMethod = SiteSearchEngineServiceGrpc.getRecrawlUrisMethod) == null) { + SiteSearchEngineServiceGrpc.getRecrawlUrisMethod = + getRecrawlUrisMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecrawlUris")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new SiteSearchEngineServiceMethodDescriptorSupplier("RecrawlUris")) + .build(); + } + } + } + return getRecrawlUrisMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SiteSearchEngineServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SiteSearchEngineServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SiteSearchEngineServiceStub(channel, callOptions); + } + }; + return SiteSearchEngineServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SiteSearchEngineServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SiteSearchEngineServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SiteSearchEngineServiceBlockingStub(channel, callOptions); + } + }; + return SiteSearchEngineServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SiteSearchEngineServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SiteSearchEngineServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SiteSearchEngineServiceFutureStub(channel, callOptions); + } + }; + return SiteSearchEngineServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing site search related resources.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Request on-demand recrawl for a list of URIs.
+     * 
+ */ + default void recrawlUris( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRecrawlUrisMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SiteSearchEngineService. + * + *
+   * Service for managing site search related resources.
+   * 
+ */ + public abstract static class SiteSearchEngineServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return SiteSearchEngineServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SiteSearchEngineService. + * + *
+   * Service for managing site search related resources.
+   * 
+ */ + public static final class SiteSearchEngineServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private SiteSearchEngineServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SiteSearchEngineServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SiteSearchEngineServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Request on-demand recrawl for a list of URIs.
+     * 
+ */ + public void recrawlUris( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRecrawlUrisMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SiteSearchEngineService. + * + *
+   * Service for managing site search related resources.
+   * 
+ */ + public static final class SiteSearchEngineServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SiteSearchEngineServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SiteSearchEngineServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SiteSearchEngineServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Request on-demand recrawl for a list of URIs.
+     * 
+ */ + public com.google.longrunning.Operation recrawlUris( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRecrawlUrisMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * SiteSearchEngineService. + * + *
+   * Service for managing site search related resources.
+   * 
+ */ + public static final class SiteSearchEngineServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SiteSearchEngineServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SiteSearchEngineServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SiteSearchEngineServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Request on-demand recrawl for a list of URIs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + recrawlUris(com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRecrawlUrisMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_RECRAWL_URIS = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_RECRAWL_URIS: + serviceImpl.recrawlUris( + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getRecrawlUrisMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest, + com.google.longrunning.Operation>(service, METHODID_RECRAWL_URIS))) + .build(); + } + + private abstract static class SiteSearchEngineServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SiteSearchEngineServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SiteSearchEngineService"); + } + } + + private static final class SiteSearchEngineServiceFileDescriptorSupplier + extends SiteSearchEngineServiceBaseDescriptorSupplier { + SiteSearchEngineServiceFileDescriptorSupplier() {} + } + + private static final class SiteSearchEngineServiceMethodDescriptorSupplier + extends SiteSearchEngineServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SiteSearchEngineServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SiteSearchEngineServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SiteSearchEngineServiceFileDescriptorSupplier()) + .addMethod(getRecrawlUrisMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceGrpc.java new file mode 100644 index 000000000000..3db044fe9bec --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceGrpc.java @@ -0,0 +1,766 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.discoveryengine.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for ingesting end user actions on a website to Discovery Engine API.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/discoveryengine/v1alpha/user_event_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class UserEventServiceGrpc { + + private UserEventServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1alpha.UserEventService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest, + com.google.cloud.discoveryengine.v1alpha.UserEvent> + getWriteUserEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "WriteUserEvent", + requestType = com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.class, + responseType = com.google.cloud.discoveryengine.v1alpha.UserEvent.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest, + com.google.cloud.discoveryengine.v1alpha.UserEvent> + getWriteUserEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest, + com.google.cloud.discoveryengine.v1alpha.UserEvent> + getWriteUserEventMethod; + if ((getWriteUserEventMethod = UserEventServiceGrpc.getWriteUserEventMethod) == null) { + synchronized (UserEventServiceGrpc.class) { + if ((getWriteUserEventMethod = UserEventServiceGrpc.getWriteUserEventMethod) == null) { + UserEventServiceGrpc.getWriteUserEventMethod = + getWriteUserEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "WriteUserEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.UserEvent + .getDefaultInstance())) + .setSchemaDescriptor( + new UserEventServiceMethodDescriptorSupplier("WriteUserEvent")) + .build(); + } + } + } + return getWriteUserEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest, com.google.api.HttpBody> + getCollectUserEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CollectUserEvent", + requestType = com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.class, + responseType = com.google.api.HttpBody.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest, com.google.api.HttpBody> + getCollectUserEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest, + com.google.api.HttpBody> + getCollectUserEventMethod; + if ((getCollectUserEventMethod = UserEventServiceGrpc.getCollectUserEventMethod) == null) { + synchronized (UserEventServiceGrpc.class) { + if ((getCollectUserEventMethod = UserEventServiceGrpc.getCollectUserEventMethod) == null) { + UserEventServiceGrpc.getCollectUserEventMethod = + getCollectUserEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CollectUserEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.HttpBody.getDefaultInstance())) + .setSchemaDescriptor( + new UserEventServiceMethodDescriptorSupplier("CollectUserEvent")) + .build(); + } + } + } + return getCollectUserEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest, + com.google.longrunning.Operation> + getPurgeUserEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PurgeUserEvents", + requestType = com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest, + com.google.longrunning.Operation> + getPurgeUserEventsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest, + com.google.longrunning.Operation> + getPurgeUserEventsMethod; + if ((getPurgeUserEventsMethod = UserEventServiceGrpc.getPurgeUserEventsMethod) == null) { + synchronized (UserEventServiceGrpc.class) { + if ((getPurgeUserEventsMethod = UserEventServiceGrpc.getPurgeUserEventsMethod) == null) { + UserEventServiceGrpc.getPurgeUserEventsMethod = + getPurgeUserEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeUserEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new UserEventServiceMethodDescriptorSupplier("PurgeUserEvents")) + .build(); + } + } + } + return getPurgeUserEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest, + com.google.longrunning.Operation> + getImportUserEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportUserEvents", + requestType = com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest, + com.google.longrunning.Operation> + getImportUserEventsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest, + com.google.longrunning.Operation> + getImportUserEventsMethod; + if ((getImportUserEventsMethod = UserEventServiceGrpc.getImportUserEventsMethod) == null) { + synchronized (UserEventServiceGrpc.class) { + if ((getImportUserEventsMethod = UserEventServiceGrpc.getImportUserEventsMethod) == null) { + UserEventServiceGrpc.getImportUserEventsMethod = + getImportUserEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportUserEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new UserEventServiceMethodDescriptorSupplier("ImportUserEvents")) + .build(); + } + } + } + return getImportUserEventsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static UserEventServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserEventServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserEventServiceStub(channel, callOptions); + } + }; + return UserEventServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static UserEventServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserEventServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserEventServiceBlockingStub(channel, callOptions); + } + }; + return UserEventServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static UserEventServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserEventServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserEventServiceFutureStub(channel, callOptions); + } + }; + return UserEventServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for ingesting end user actions on a website to Discovery Engine API.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Writes a single user event.
+     * 
+ */ + default void writeUserEvent( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getWriteUserEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Writes a single user event from the browser. This uses a GET request to
+     * due to browser restriction of POST-ing to a third-party domain.
+     * This method is used only by the Discovery Engine API JavaScript pixel and
+     * Google Tag Manager. Users should not call this method directly.
+     * 
+ */ + default void collectUserEvent( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCollectUserEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes permanently all user events specified by the filter provided.
+     * Depending on the number of events specified by the filter, this operation
+     * could take hours or days to complete. To test a filter, use the list
+     * command first.
+     * 
+ */ + default void purgeUserEvents( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPurgeUserEventsMethod(), responseObserver); + } + + /** + * + * + *
+     * Bulk import of User events. Request processing might be
+     * synchronous. Events that already exist are skipped.
+     * Use this method for backfilling historical user events.
+     * Operation.response is of type ImportResponse. Note that it is
+     * possible for a subset of the items to be successfully inserted.
+     * Operation.metadata is of type ImportMetadata.
+     * 
+ */ + default void importUserEvents( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportUserEventsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service UserEventService. + * + *
+   * Service for ingesting end user actions on a website to Discovery Engine API.
+   * 
+ */ + public abstract static class UserEventServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return UserEventServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service UserEventService. + * + *
+   * Service for ingesting end user actions on a website to Discovery Engine API.
+   * 
+ */ + public static final class UserEventServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private UserEventServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserEventServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserEventServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Writes a single user event.
+     * 
+ */ + public void writeUserEvent( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getWriteUserEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Writes a single user event from the browser. This uses a GET request to
+     * due to browser restriction of POST-ing to a third-party domain.
+     * This method is used only by the Discovery Engine API JavaScript pixel and
+     * Google Tag Manager. Users should not call this method directly.
+     * 
+ */ + public void collectUserEvent( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCollectUserEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes permanently all user events specified by the filter provided.
+     * Depending on the number of events specified by the filter, this operation
+     * could take hours or days to complete. To test a filter, use the list
+     * command first.
+     * 
+ */ + public void purgeUserEvents( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPurgeUserEventsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Bulk import of User events. Request processing might be
+     * synchronous. Events that already exist are skipped.
+     * Use this method for backfilling historical user events.
+     * Operation.response is of type ImportResponse. Note that it is
+     * possible for a subset of the items to be successfully inserted.
+     * Operation.metadata is of type ImportMetadata.
+     * 
+ */ + public void importUserEvents( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportUserEventsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service UserEventService. + * + *
+   * Service for ingesting end user actions on a website to Discovery Engine API.
+   * 
+ */ + public static final class UserEventServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private UserEventServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserEventServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserEventServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Writes a single user event.
+     * 
+ */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent writeUserEvent( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getWriteUserEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Writes a single user event from the browser. This uses a GET request to
+     * due to browser restriction of POST-ing to a third-party domain.
+     * This method is used only by the Discovery Engine API JavaScript pixel and
+     * Google Tag Manager. Users should not call this method directly.
+     * 
+ */ + public com.google.api.HttpBody collectUserEvent( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCollectUserEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes permanently all user events specified by the filter provided.
+     * Depending on the number of events specified by the filter, this operation
+     * could take hours or days to complete. To test a filter, use the list
+     * command first.
+     * 
+ */ + public com.google.longrunning.Operation purgeUserEvents( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPurgeUserEventsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Bulk import of User events. Request processing might be
+     * synchronous. Events that already exist are skipped.
+     * Use this method for backfilling historical user events.
+     * Operation.response is of type ImportResponse. Note that it is
+     * possible for a subset of the items to be successfully inserted.
+     * Operation.metadata is of type ImportMetadata.
+     * 
+ */ + public com.google.longrunning.Operation importUserEvents( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportUserEventsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service UserEventService. + * + *
+   * Service for ingesting end user actions on a website to Discovery Engine API.
+   * 
+ */ + public static final class UserEventServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private UserEventServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserEventServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserEventServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Writes a single user event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1alpha.UserEvent> + writeUserEvent(com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getWriteUserEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Writes a single user event from the browser. This uses a GET request to
+     * due to browser restriction of POST-ing to a third-party domain.
+     * This method is used only by the Discovery Engine API JavaScript pixel and
+     * Google Tag Manager. Users should not call this method directly.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + collectUserEvent(com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCollectUserEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes permanently all user events specified by the filter provided.
+     * Depending on the number of events specified by the filter, this operation
+     * could take hours or days to complete. To test a filter, use the list
+     * command first.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + purgeUserEvents(com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPurgeUserEventsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Bulk import of User events. Request processing might be
+     * synchronous. Events that already exist are skipped.
+     * Use this method for backfilling historical user events.
+     * Operation.response is of type ImportResponse. Note that it is
+     * possible for a subset of the items to be successfully inserted.
+     * Operation.metadata is of type ImportMetadata.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importUserEvents(com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportUserEventsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_WRITE_USER_EVENT = 0; + private static final int METHODID_COLLECT_USER_EVENT = 1; + private static final int METHODID_PURGE_USER_EVENTS = 2; + private static final int METHODID_IMPORT_USER_EVENTS = 3; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_WRITE_USER_EVENT: + serviceImpl.writeUserEvent( + (com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_COLLECT_USER_EVENT: + serviceImpl.collectUserEvent( + (com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PURGE_USER_EVENTS: + serviceImpl.purgeUserEvents( + (com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_USER_EVENTS: + serviceImpl.importUserEvents( + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getWriteUserEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest, + com.google.cloud.discoveryengine.v1alpha.UserEvent>( + service, METHODID_WRITE_USER_EVENT))) + .addMethod( + getCollectUserEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest, + com.google.api.HttpBody>(service, METHODID_COLLECT_USER_EVENT))) + .addMethod( + getPurgeUserEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest, + com.google.longrunning.Operation>(service, METHODID_PURGE_USER_EVENTS))) + .addMethod( + getImportUserEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_USER_EVENTS))) + .build(); + } + + private abstract static class UserEventServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + UserEventServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("UserEventService"); + } + } + + private static final class UserEventServiceFileDescriptorSupplier + extends UserEventServiceBaseDescriptorSupplier { + UserEventServiceFileDescriptorSupplier() {} + } + + private static final class UserEventServiceMethodDescriptorSupplier + extends UserEventServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + UserEventServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (UserEventServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new UserEventServiceFileDescriptorSupplier()) + .addMethod(getWriteUserEventMethod()) + .addMethod(getCollectUserEventMethod()) + .addMethod(getPurgeUserEventsMethod()) + .addMethod(getImportUserEventsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/pom.xml b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/pom.xml index aedb14b9db6c..602fa6c27685 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/pom.xml +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-discoveryengine-v1beta - 0.24.0 + 0.25.0 grpc-google-cloud-discoveryengine-v1beta GRPC library for google-cloud-discoveryengine com.google.cloud google-cloud-discoveryengine-parent - 0.24.0 + 0.25.0 diff --git a/java-discoveryengine/pom.xml b/java-discoveryengine/pom.xml index 710a15d83d49..a86e5702430b 100644 --- a/java-discoveryengine/pom.xml +++ b/java-discoveryengine/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-discoveryengine-parent pom - 0.24.0 + 0.25.0 Google Discovery Engine API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,37 @@ com.google.cloud google-cloud-discoveryengine - 0.24.0 + 0.25.0 + + + com.google.api.grpc + proto-google-cloud-discoveryengine-v1alpha + 0.25.0 + + + com.google.api.grpc + grpc-google-cloud-discoveryengine-v1alpha + 0.25.0 com.google.api.grpc proto-google-cloud-discoveryengine-v1 - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-discoveryengine-v1 - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-discoveryengine-v1beta - 0.24.0 + 0.25.0 com.google.api.grpc proto-google-cloud-discoveryengine-v1beta - 0.24.0 + 0.25.0 @@ -58,8 +68,10 @@ google-cloud-discoveryengine grpc-google-cloud-discoveryengine-v1beta grpc-google-cloud-discoveryengine-v1 + grpc-google-cloud-discoveryengine-v1alpha proto-google-cloud-discoveryengine-v1beta proto-google-cloud-discoveryengine-v1 + proto-google-cloud-discoveryengine-v1alpha google-cloud-discoveryengine-bom diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/pom.xml b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/pom.xml index 4bccf1af7a1f..d41c3d9b7a0d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1/pom.xml +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-discoveryengine-v1 - 0.24.0 + 0.25.0 proto-google-cloud-discoveryengine-v1 Proto library for google-cloud-discoveryengine com.google.cloud google-cloud-discoveryengine-parent - 0.24.0 + 0.25.0 diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/clirr-ignored-differences.xml b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/clirr-ignored-differences.xml new file mode 100644 index 000000000000..69e4c6594cee --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/discoveryengine/v1alpha/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/discoveryengine/v1alpha/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/discoveryengine/v1alpha/*OrBuilder + boolean has*(*) + + diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/pom.xml b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/pom.xml new file mode 100644 index 000000000000..d8fcdb6a2fb5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-discoveryengine-v1alpha + 0.25.0 + proto-google-cloud-discoveryengine-v1alpha + Proto library for google-cloud-discoveryengine + + com.google.cloud + google-cloud-discoveryengine-parent + 0.25.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigQuerySource.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigQuerySource.java new file mode 100644 index 000000000000..131f6058646e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigQuerySource.java @@ -0,0 +1,1893 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * BigQuery source import data from.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigQuerySource} + */ +public final class BigQuerySource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.BigQuerySource) + BigQuerySourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQuerySource.newBuilder() to construct. + private BigQuerySource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQuerySource() { + projectId_ = ""; + datasetId_ = ""; + tableId_ = ""; + gcsStagingDir_ = ""; + dataSchema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQuerySource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.class, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder.class); + } + + private int partitionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object partition_; + + public enum PartitionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PARTITION_DATE(5), + PARTITION_NOT_SET(0); + private final int value; + + private PartitionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PartitionCase valueOf(int value) { + return forNumber(value); + } + + public static PartitionCase forNumber(int value) { + switch (value) { + case 5: + return PARTITION_DATE; + case 0: + return PARTITION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PartitionCase getPartitionCase() { + return PartitionCase.forNumber(partitionCase_); + } + + public static final int PARTITION_DATE_FIELD_NUMBER = 5; + /** + * + * + *
+   * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+   * 
+ * + * .google.type.Date partition_date = 5; + * + * @return Whether the partitionDate field is set. + */ + @java.lang.Override + public boolean hasPartitionDate() { + return partitionCase_ == 5; + } + /** + * + * + *
+   * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+   * 
+ * + * .google.type.Date partition_date = 5; + * + * @return The partitionDate. + */ + @java.lang.Override + public com.google.type.Date getPartitionDate() { + if (partitionCase_ == 5) { + return (com.google.type.Date) partition_; + } + return com.google.type.Date.getDefaultInstance(); + } + /** + * + * + *
+   * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+   * 
+ * + * .google.type.Date partition_date = 5; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getPartitionDateOrBuilder() { + if (partitionCase_ == 5) { + return (com.google.type.Date) partition_; + } + return com.google.type.Date.getDefaultInstance(); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * The project ID (can be project # or ID) that the BigQuery source is in with
+   * a length limit of 128 characters. If not specified, inherits the project
+   * ID from the parent request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * The project ID (can be project # or ID) that the BigQuery source is in with
+   * a length limit of 128 characters. If not specified, inherits the project
+   * ID from the parent request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object datasetId_ = ""; + /** + * + * + *
+   * Required. The BigQuery data set to copy the data from with a length limit
+   * of 1,024 characters.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The BigQuery data set to copy the data from with a length limit
+   * of 1,024 characters.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object tableId_ = ""; + /** + * + * + *
+   * Required. The BigQuery table to copy the data from with a length limit of
+   * 1,024 characters.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The BigQuery table to copy the data from with a length limit of
+   * 1,024 characters.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_STAGING_DIR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsStagingDir_ = ""; + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * BigQuery export to a specific Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The gcsStagingDir. + */ + @java.lang.Override + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsStagingDir_ = s; + return s; + } + } + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * BigQuery export to a specific Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The bytes for gcsStagingDir. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsStagingDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SCHEMA_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSchema_ = ""; + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for user event imports:
+   *
+   * * `user_event` (default): One
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+   *   row. Each document must have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+   *   of
+   *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+   *   or
+   *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+   * * `custom`: One custom data per row in arbitrary format that conforms to
+   *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. This can only be used by Gen App Builder.
+   * 
+ * + * string data_schema = 6; + * + * @return The dataSchema. + */ + @java.lang.Override + public java.lang.String getDataSchema() { + java.lang.Object ref = dataSchema_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSchema_ = s; + return s; + } + } + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for user event imports:
+   *
+   * * `user_event` (default): One
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+   *   row. Each document must have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+   *   of
+   *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+   *   or
+   *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+   * * `custom`: One custom data per row in arbitrary format that conforms to
+   *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. This can only be used by Gen App Builder.
+   * 
+ * + * string data_schema = 6; + * + * @return The bytes for dataSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSchemaBytes() { + java.lang.Object ref = dataSchema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, gcsStagingDir_); + } + if (partitionCase_ == 5) { + output.writeMessage(5, (com.google.type.Date) partition_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, dataSchema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsStagingDir_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, gcsStagingDir_); + } + if (partitionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.type.Date) partition_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, dataSchema_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.BigQuerySource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.BigQuerySource other = + (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatasetId().equals(other.getDatasetId())) return false; + if (!getTableId().equals(other.getTableId())) return false; + if (!getGcsStagingDir().equals(other.getGcsStagingDir())) return false; + if (!getDataSchema().equals(other.getDataSchema())) return false; + if (!getPartitionCase().equals(other.getPartitionCase())) return false; + switch (partitionCase_) { + case 5: + if (!getPartitionDate().equals(other.getPartitionDate())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + hash = (37 * hash) + GCS_STAGING_DIR_FIELD_NUMBER; + hash = (53 * hash) + getGcsStagingDir().hashCode(); + hash = (37 * hash) + DATA_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getDataSchema().hashCode(); + switch (partitionCase_) { + case 5: + hash = (37 * hash) + PARTITION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getPartitionDate().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * BigQuery source import data from.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.BigQuerySource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.BigQuerySource) + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.class, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.BigQuerySource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (partitionDateBuilder_ != null) { + partitionDateBuilder_.clear(); + } + projectId_ = ""; + datasetId_ = ""; + tableId_ = ""; + gcsStagingDir_ = ""; + dataSchema_ = ""; + partitionCase_ = 0; + partition_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource build() { + com.google.cloud.discoveryengine.v1alpha.BigQuerySource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource buildPartial() { + com.google.cloud.discoveryengine.v1alpha.BigQuerySource result = + new com.google.cloud.discoveryengine.v1alpha.BigQuerySource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.BigQuerySource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.datasetId_ = datasetId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tableId_ = tableId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.gcsStagingDir_ = gcsStagingDir_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dataSchema_ = dataSchema_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource result) { + result.partitionCase_ = partitionCase_; + result.partition_ = this.partition_; + if (partitionCase_ == 5 && partitionDateBuilder_ != null) { + result.partition_ = partitionDateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.BigQuerySource) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.BigQuerySource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.BigQuerySource other) { + if (other == com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getGcsStagingDir().isEmpty()) { + gcsStagingDir_ = other.gcsStagingDir_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDataSchema().isEmpty()) { + dataSchema_ = other.dataSchema_; + bitField0_ |= 0x00000020; + onChanged(); + } + switch (other.getPartitionCase()) { + case PARTITION_DATE: + { + mergePartitionDate(other.getPartitionDate()); + break; + } + case PARTITION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + datasetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + tableId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + gcsStagingDir_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + input.readMessage(getPartitionDateFieldBuilder().getBuilder(), extensionRegistry); + partitionCase_ = 5; + break; + } // case 42 + case 50: + { + dataSchema_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int partitionCase_ = 0; + private java.lang.Object partition_; + + public PartitionCase getPartitionCase() { + return PartitionCase.forNumber(partitionCase_); + } + + public Builder clearPartition() { + partitionCase_ = 0; + partition_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + partitionDateBuilder_; + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + * + * @return Whether the partitionDate field is set. + */ + @java.lang.Override + public boolean hasPartitionDate() { + return partitionCase_ == 5; + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + * + * @return The partitionDate. + */ + @java.lang.Override + public com.google.type.Date getPartitionDate() { + if (partitionDateBuilder_ == null) { + if (partitionCase_ == 5) { + return (com.google.type.Date) partition_; + } + return com.google.type.Date.getDefaultInstance(); + } else { + if (partitionCase_ == 5) { + return partitionDateBuilder_.getMessage(); + } + return com.google.type.Date.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + */ + public Builder setPartitionDate(com.google.type.Date value) { + if (partitionDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partition_ = value; + onChanged(); + } else { + partitionDateBuilder_.setMessage(value); + } + partitionCase_ = 5; + return this; + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + */ + public Builder setPartitionDate(com.google.type.Date.Builder builderForValue) { + if (partitionDateBuilder_ == null) { + partition_ = builderForValue.build(); + onChanged(); + } else { + partitionDateBuilder_.setMessage(builderForValue.build()); + } + partitionCase_ = 5; + return this; + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + */ + public Builder mergePartitionDate(com.google.type.Date value) { + if (partitionDateBuilder_ == null) { + if (partitionCase_ == 5 && partition_ != com.google.type.Date.getDefaultInstance()) { + partition_ = + com.google.type.Date.newBuilder((com.google.type.Date) partition_) + .mergeFrom(value) + .buildPartial(); + } else { + partition_ = value; + } + onChanged(); + } else { + if (partitionCase_ == 5) { + partitionDateBuilder_.mergeFrom(value); + } else { + partitionDateBuilder_.setMessage(value); + } + } + partitionCase_ = 5; + return this; + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + */ + public Builder clearPartitionDate() { + if (partitionDateBuilder_ == null) { + if (partitionCase_ == 5) { + partitionCase_ = 0; + partition_ = null; + onChanged(); + } + } else { + if (partitionCase_ == 5) { + partitionCase_ = 0; + partition_ = null; + } + partitionDateBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + */ + public com.google.type.Date.Builder getPartitionDateBuilder() { + return getPartitionDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getPartitionDateOrBuilder() { + if ((partitionCase_ == 5) && (partitionDateBuilder_ != null)) { + return partitionDateBuilder_.getMessageOrBuilder(); + } else { + if (partitionCase_ == 5) { + return (com.google.type.Date) partition_; + } + return com.google.type.Date.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+     * 
+ * + * .google.type.Date partition_date = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getPartitionDateFieldBuilder() { + if (partitionDateBuilder_ == null) { + if (!(partitionCase_ == 5)) { + partition_ = com.google.type.Date.getDefaultInstance(); + } + partitionDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + (com.google.type.Date) partition_, getParentForChildren(), isClean()); + partition_ = null; + } + partitionCase_ = 5; + onChanged(); + return partitionDateBuilder_; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * The project ID (can be project # or ID) that the BigQuery source is in with
+     * a length limit of 128 characters. If not specified, inherits the project
+     * ID from the parent request.
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The project ID (can be project # or ID) that the BigQuery source is in with
+     * a length limit of 128 characters. If not specified, inherits the project
+     * ID from the parent request.
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The project ID (can be project # or ID) that the BigQuery source is in with
+     * a length limit of 128 characters. If not specified, inherits the project
+     * ID from the parent request.
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID (can be project # or ID) that the BigQuery source is in with
+     * a length limit of 128 characters. If not specified, inherits the project
+     * ID from the parent request.
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The project ID (can be project # or ID) that the BigQuery source is in with
+     * a length limit of 128 characters. If not specified, inherits the project
+     * ID from the parent request.
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object datasetId_ = ""; + /** + * + * + *
+     * Required. The BigQuery data set to copy the data from with a length limit
+     * of 1,024 characters.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery data set to copy the data from with a length limit
+     * of 1,024 characters.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery data set to copy the data from with a length limit
+     * of 1,024 characters.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + datasetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery data set to copy the data from with a length limit
+     * of 1,024 characters.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + datasetId_ = getDefaultInstance().getDatasetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery data set to copy the data from with a length limit
+     * of 1,024 characters.
+     * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + datasetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + * + * + *
+     * Required. The BigQuery table to copy the data from with a length limit of
+     * 1,024 characters.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery table to copy the data from with a length limit of
+     * 1,024 characters.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The BigQuery table to copy the data from with a length limit of
+     * 1,024 characters.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tableId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery table to copy the data from with a length limit of
+     * 1,024 characters.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTableId() { + tableId_ = getDefaultInstance().getTableId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The BigQuery table to copy the data from with a length limit of
+     * 1,024 characters.
+     * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object gcsStagingDir_ = ""; + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * BigQuery export to a specific Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @return The gcsStagingDir. + */ + public java.lang.String getGcsStagingDir() { + java.lang.Object ref = gcsStagingDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsStagingDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * BigQuery export to a specific Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @return The bytes for gcsStagingDir. + */ + public com.google.protobuf.ByteString getGcsStagingDirBytes() { + java.lang.Object ref = gcsStagingDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsStagingDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * BigQuery export to a specific Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @param value The gcsStagingDir to set. + * @return This builder for chaining. + */ + public Builder setGcsStagingDir(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsStagingDir_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * BigQuery export to a specific Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @return This builder for chaining. + */ + public Builder clearGcsStagingDir() { + gcsStagingDir_ = getDefaultInstance().getGcsStagingDir(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Intermediate Cloud Storage directory used for the import with a length
+     * limit of 2,000 characters. Can be specified if one wants to have the
+     * BigQuery export to a specific Cloud Storage directory.
+     * 
+ * + * string gcs_staging_dir = 4; + * + * @param value The bytes for gcsStagingDir to set. + * @return This builder for chaining. + */ + public Builder setGcsStagingDirBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsStagingDir_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object dataSchema_ = ""; + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for user event imports:
+     *
+     * * `user_event` (default): One
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+     *   row. Each document must have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+     *   of
+     *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+     *   or
+     *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+     * * `custom`: One custom data per row in arbitrary format that conforms to
+     *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. This can only be used by Gen App Builder.
+     * 
+ * + * string data_schema = 6; + * + * @return The dataSchema. + */ + public java.lang.String getDataSchema() { + java.lang.Object ref = dataSchema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSchema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for user event imports:
+     *
+     * * `user_event` (default): One
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+     *   row. Each document must have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+     *   of
+     *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+     *   or
+     *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+     * * `custom`: One custom data per row in arbitrary format that conforms to
+     *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. This can only be used by Gen App Builder.
+     * 
+ * + * string data_schema = 6; + * + * @return The bytes for dataSchema. + */ + public com.google.protobuf.ByteString getDataSchemaBytes() { + java.lang.Object ref = dataSchema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for user event imports:
+     *
+     * * `user_event` (default): One
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+     *   row. Each document must have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+     *   of
+     *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+     *   or
+     *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+     * * `custom`: One custom data per row in arbitrary format that conforms to
+     *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. This can only be used by Gen App Builder.
+     * 
+ * + * string data_schema = 6; + * + * @param value The dataSchema to set. + * @return This builder for chaining. + */ + public Builder setDataSchema(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSchema_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for user event imports:
+     *
+     * * `user_event` (default): One
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+     *   row. Each document must have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+     *   of
+     *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+     *   or
+     *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+     * * `custom`: One custom data per row in arbitrary format that conforms to
+     *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. This can only be used by Gen App Builder.
+     * 
+ * + * string data_schema = 6; + * + * @return This builder for chaining. + */ + public Builder clearDataSchema() { + dataSchema_ = getDefaultInstance().getDataSchema(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for user event imports:
+     *
+     * * `user_event` (default): One
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+     *   row. Each document must have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+     *   of
+     *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+     *   or
+     *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+     * * `custom`: One custom data per row in arbitrary format that conforms to
+     *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. This can only be used by Gen App Builder.
+     * 
+ * + * string data_schema = 6; + * + * @param value The bytes for dataSchema to set. + * @return This builder for chaining. + */ + public Builder setDataSchemaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSchema_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.BigQuerySource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.BigQuerySource) + private static final com.google.cloud.discoveryengine.v1alpha.BigQuerySource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.BigQuerySource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.BigQuerySource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQuerySource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigQuerySourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigQuerySourceOrBuilder.java new file mode 100644 index 000000000000..3131a1b4fd9b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BigQuerySourceOrBuilder.java @@ -0,0 +1,237 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface BigQuerySourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.BigQuerySource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+   * 
+ * + * .google.type.Date partition_date = 5; + * + * @return Whether the partitionDate field is set. + */ + boolean hasPartitionDate(); + /** + * + * + *
+   * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+   * 
+ * + * .google.type.Date partition_date = 5; + * + * @return The partitionDate. + */ + com.google.type.Date getPartitionDate(); + /** + * + * + *
+   * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+   * 
+ * + * .google.type.Date partition_date = 5; + */ + com.google.type.DateOrBuilder getPartitionDateOrBuilder(); + + /** + * + * + *
+   * The project ID (can be project # or ID) that the BigQuery source is in with
+   * a length limit of 128 characters. If not specified, inherits the project
+   * ID from the parent request.
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * The project ID (can be project # or ID) that the BigQuery source is in with
+   * a length limit of 128 characters. If not specified, inherits the project
+   * ID from the parent request.
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. The BigQuery data set to copy the data from with a length limit
+   * of 1,024 characters.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datasetId. + */ + java.lang.String getDatasetId(); + /** + * + * + *
+   * Required. The BigQuery data set to copy the data from with a length limit
+   * of 1,024 characters.
+   * 
+ * + * string dataset_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString getDatasetIdBytes(); + + /** + * + * + *
+   * Required. The BigQuery table to copy the data from with a length limit of
+   * 1,024 characters.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tableId. + */ + java.lang.String getTableId(); + /** + * + * + *
+   * Required. The BigQuery table to copy the data from with a length limit of
+   * 1,024 characters.
+   * 
+ * + * string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString getTableIdBytes(); + + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * BigQuery export to a specific Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The gcsStagingDir. + */ + java.lang.String getGcsStagingDir(); + /** + * + * + *
+   * Intermediate Cloud Storage directory used for the import with a length
+   * limit of 2,000 characters. Can be specified if one wants to have the
+   * BigQuery export to a specific Cloud Storage directory.
+   * 
+ * + * string gcs_staging_dir = 4; + * + * @return The bytes for gcsStagingDir. + */ + com.google.protobuf.ByteString getGcsStagingDirBytes(); + + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for user event imports:
+   *
+   * * `user_event` (default): One
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+   *   row. Each document must have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+   *   of
+   *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+   *   or
+   *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+   * * `custom`: One custom data per row in arbitrary format that conforms to
+   *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. This can only be used by Gen App Builder.
+   * 
+ * + * string data_schema = 6; + * + * @return The dataSchema. + */ + java.lang.String getDataSchema(); + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for user event imports:
+   *
+   * * `user_event` (default): One
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] format per
+   *   row. Each document must have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
+   *   of
+   *   [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
+   *   or
+   *   [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
+   * * `custom`: One custom data per row in arbitrary format that conforms to
+   *   the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. This can only be used by Gen App Builder.
+   * 
+ * + * string data_schema = 6; + * + * @return The bytes for dataSchema. + */ + com.google.protobuf.ByteString getDataSchemaBytes(); + + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.PartitionCase getPartitionCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BranchName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BranchName.java new file mode 100644 index 000000000000..008ec59de27a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/BranchName.java @@ -0,0 +1,427 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class BranchName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_STORE_BRANCH = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String dataStore; + private final String branch; + private final String collection; + + @Deprecated + protected BranchName() { + project = null; + location = null; + dataStore = null; + branch = null; + collection = null; + } + + private BranchName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + branch = Preconditions.checkNotNull(builder.getBranch()); + collection = null; + pathTemplate = PROJECT_LOCATION_DATA_STORE_BRANCH; + } + + private BranchName(ProjectLocationCollectionDataStoreBranchBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + branch = Preconditions.checkNotNull(builder.getBranch()); + pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getBranch() { + return branch; + } + + public String getCollection() { + return collection; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationDataStoreBranchBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionDataStoreBranchBuilder + newProjectLocationCollectionDataStoreBranchBuilder() { + return new ProjectLocationCollectionDataStoreBranchBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BranchName of(String project, String location, String dataStore, String branch) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static BranchName ofProjectLocationDataStoreBranchName( + String project, String location, String dataStore, String branch) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static BranchName ofProjectLocationCollectionDataStoreBranchName( + String project, String location, String collection, String dataStore, String branch) { + return newProjectLocationCollectionDataStoreBranchBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setBranch(branch) + .build(); + } + + public static String format(String project, String location, String dataStore, String branch) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDataStoreBranchName( + String project, String location, String dataStore, String branch) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionDataStoreBranchName( + String project, String location, String collection, String dataStore, String branch) { + return newProjectLocationCollectionDataStoreBranchBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setBranch(branch) + .build() + .toString(); + } + + public static BranchName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_DATA_STORE_BRANCH.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_DATA_STORE_BRANCH.match(formattedString); + return ofProjectLocationDataStoreBranchName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("data_store"), + matchMap.get("branch")); + } else if (PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH.match(formattedString); + return ofProjectLocationCollectionDataStoreBranchName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("data_store"), + matchMap.get("branch")); + } + throw new ValidationException("BranchName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (BranchName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_STORE_BRANCH.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataStore != null) { + fieldMapBuilder.put("data_store", dataStore); + } + if (branch != null) { + fieldMapBuilder.put("branch", branch); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BranchName that = ((BranchName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataStore, that.dataStore) + && Objects.equals(this.branch, that.branch) + && Objects.equals(this.collection, that.collection); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataStore); + h *= 1000003; + h ^= Objects.hashCode(branch); + h *= 1000003; + h ^= Objects.hashCode(collection); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}. + */ + public static class Builder { + private String project; + private String location; + private String dataStore; + private String branch; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getBranch() { + return branch; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public Builder setBranch(String branch) { + this.branch = branch; + return this; + } + + private Builder(BranchName branchName) { + Preconditions.checkArgument( + Objects.equals(branchName.pathTemplate, PROJECT_LOCATION_DATA_STORE_BRANCH), + "toBuilder is only supported when BranchName has the pattern of projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}"); + this.project = branchName.project; + this.location = branchName.location; + this.dataStore = branchName.dataStore; + this.branch = branchName.branch; + } + + public BranchName build() { + return new BranchName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionDataStoreBranchBuilder { + private String project; + private String location; + private String collection; + private String dataStore; + private String branch; + + protected ProjectLocationCollectionDataStoreBranchBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getDataStore() { + return dataStore; + } + + public String getBranch() { + return branch; + } + + public ProjectLocationCollectionDataStoreBranchBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionDataStoreBranchBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionDataStoreBranchBuilder setCollection(String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionDataStoreBranchBuilder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public ProjectLocationCollectionDataStoreBranchBuilder setBranch(String branch) { + this.branch = branch; + return this; + } + + public BranchName build() { + return new BranchName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CollectUserEventRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CollectUserEventRequest.java new file mode 100644 index 000000000000..7ea277a59dc5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CollectUserEventRequest.java @@ -0,0 +1,1230 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for CollectUserEvent method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CollectUserEventRequest} + */ +public final class CollectUserEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) + CollectUserEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CollectUserEventRequest.newBuilder() to construct. + private CollectUserEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CollectUserEventRequest() { + parent_ = ""; + userEvent_ = ""; + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CollectUserEventRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CollectUserEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CollectUserEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.class, + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_EVENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object userEvent_ = ""; + /** + * + * + *
+   * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+   * characters.
+   * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userEvent. + */ + @java.lang.Override + public java.lang.String getUserEvent() { + java.lang.Object ref = userEvent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userEvent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+   * characters.
+   * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userEvent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserEventBytes() { + java.lang.Object ref = userEvent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userEvent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * The URL including cgi-parameters but excluding the hash fragment with a
+   * length limit of 5,000 characters. This is often more useful than the
+   * referer URL, because many browsers only send the domain for third-party
+   * requests.
+   * 
+ * + * optional string uri = 3; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The URL including cgi-parameters but excluding the hash fragment with a
+   * length limit of 5,000 characters. This is often more useful than the
+   * referer URL, because many browsers only send the domain for third-party
+   * requests.
+   * 
+ * + * optional string uri = 3; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URL including cgi-parameters but excluding the hash fragment with a
+   * length limit of 5,000 characters. This is often more useful than the
+   * referer URL, because many browsers only send the domain for third-party
+   * requests.
+   * 
+ * + * optional string uri = 3; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETS_FIELD_NUMBER = 4; + private long ets_ = 0L; + /** + * + * + *
+   * The event timestamp in milliseconds. This prevents browser caching of
+   * otherwise identical get requests. The name is abbreviated to reduce the
+   * payload bytes.
+   * 
+ * + * optional int64 ets = 4; + * + * @return Whether the ets field is set. + */ + @java.lang.Override + public boolean hasEts() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The event timestamp in milliseconds. This prevents browser caching of
+   * otherwise identical get requests. The name is abbreviated to reduce the
+   * payload bytes.
+   * 
+ * + * optional int64 ets = 4; + * + * @return The ets. + */ + @java.lang.Override + public long getEts() { + return ets_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEvent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userEvent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uri_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(4, ets_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userEvent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userEvent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uri_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ets_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest other = + (com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getUserEvent().equals(other.getUserEvent())) return false; + if (hasUri() != other.hasUri()) return false; + if (hasUri()) { + if (!getUri().equals(other.getUri())) return false; + } + if (hasEts() != other.hasEts()) return false; + if (hasEts()) { + if (getEts() != other.getEts()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + USER_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getUserEvent().hashCode(); + if (hasUri()) { + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + } + if (hasEts()) { + hash = (37 * hash) + ETS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEts()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CollectUserEvent method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CollectUserEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CollectUserEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CollectUserEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.class, + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + userEvent_ = ""; + uri_ = ""; + ets_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CollectUserEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest build() { + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest result = + new com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userEvent_ = userEvent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uri_ = uri_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ets_ = ets_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserEvent().isEmpty()) { + userEvent_ = other.userEvent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUri()) { + uri_ = other.uri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasEts()) { + setEts(other.getEts()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + userEvent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + ets_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userEvent_ = ""; + /** + * + * + *
+     * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+     * characters.
+     * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userEvent. + */ + public java.lang.String getUserEvent() { + java.lang.Object ref = userEvent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userEvent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+     * characters.
+     * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userEvent. + */ + public com.google.protobuf.ByteString getUserEventBytes() { + java.lang.Object ref = userEvent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userEvent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+     * characters.
+     * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The userEvent to set. + * @return This builder for chaining. + */ + public Builder setUserEvent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userEvent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+     * characters.
+     * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUserEvent() { + userEvent_ = getDefaultInstance().getUserEvent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+     * characters.
+     * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for userEvent to set. + * @return This builder for chaining. + */ + public Builder setUserEventBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userEvent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URL including cgi-parameters but excluding the hash fragment with a
+     * length limit of 5,000 characters. This is often more useful than the
+     * referer URL, because many browsers only send the domain for third-party
+     * requests.
+     * 
+ * + * optional string uri = 3; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The URL including cgi-parameters but excluding the hash fragment with a
+     * length limit of 5,000 characters. This is often more useful than the
+     * referer URL, because many browsers only send the domain for third-party
+     * requests.
+     * 
+ * + * optional string uri = 3; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URL including cgi-parameters but excluding the hash fragment with a
+     * length limit of 5,000 characters. This is often more useful than the
+     * referer URL, because many browsers only send the domain for third-party
+     * requests.
+     * 
+ * + * optional string uri = 3; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URL including cgi-parameters but excluding the hash fragment with a
+     * length limit of 5,000 characters. This is often more useful than the
+     * referer URL, because many browsers only send the domain for third-party
+     * requests.
+     * 
+ * + * optional string uri = 3; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The URL including cgi-parameters but excluding the hash fragment with a
+     * length limit of 5,000 characters. This is often more useful than the
+     * referer URL, because many browsers only send the domain for third-party
+     * requests.
+     * 
+ * + * optional string uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The URL including cgi-parameters but excluding the hash fragment with a
+     * length limit of 5,000 characters. This is often more useful than the
+     * referer URL, because many browsers only send the domain for third-party
+     * requests.
+     * 
+ * + * optional string uri = 3; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long ets_; + /** + * + * + *
+     * The event timestamp in milliseconds. This prevents browser caching of
+     * otherwise identical get requests. The name is abbreviated to reduce the
+     * payload bytes.
+     * 
+ * + * optional int64 ets = 4; + * + * @return Whether the ets field is set. + */ + @java.lang.Override + public boolean hasEts() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The event timestamp in milliseconds. This prevents browser caching of
+     * otherwise identical get requests. The name is abbreviated to reduce the
+     * payload bytes.
+     * 
+ * + * optional int64 ets = 4; + * + * @return The ets. + */ + @java.lang.Override + public long getEts() { + return ets_; + } + /** + * + * + *
+     * The event timestamp in milliseconds. This prevents browser caching of
+     * otherwise identical get requests. The name is abbreviated to reduce the
+     * payload bytes.
+     * 
+ * + * optional int64 ets = 4; + * + * @param value The ets to set. + * @return This builder for chaining. + */ + public Builder setEts(long value) { + + ets_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The event timestamp in milliseconds. This prevents browser caching of
+     * otherwise identical get requests. The name is abbreviated to reduce the
+     * payload bytes.
+     * 
+ * + * optional int64 ets = 4; + * + * @return This builder for chaining. + */ + public Builder clearEts() { + bitField0_ = (bitField0_ & ~0x00000008); + ets_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) + private static final com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CollectUserEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CollectUserEventRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CollectUserEventRequestOrBuilder.java new file mode 100644 index 000000000000..44cf8b037343 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CollectUserEventRequestOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CollectUserEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CollectUserEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+   * characters.
+   * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userEvent. + */ + java.lang.String getUserEvent(); + /** + * + * + *
+   * Required. URL encoded UserEvent proto with a length limit of 2,000,000
+   * characters.
+   * 
+ * + * string user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userEvent. + */ + com.google.protobuf.ByteString getUserEventBytes(); + + /** + * + * + *
+   * The URL including cgi-parameters but excluding the hash fragment with a
+   * length limit of 5,000 characters. This is often more useful than the
+   * referer URL, because many browsers only send the domain for third-party
+   * requests.
+   * 
+ * + * optional string uri = 3; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); + /** + * + * + *
+   * The URL including cgi-parameters but excluding the hash fragment with a
+   * length limit of 5,000 characters. This is often more useful than the
+   * referer URL, because many browsers only send the domain for third-party
+   * requests.
+   * 
+ * + * optional string uri = 3; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URL including cgi-parameters but excluding the hash fragment with a
+   * length limit of 5,000 characters. This is often more useful than the
+   * referer URL, because many browsers only send the domain for third-party
+   * requests.
+   * 
+ * + * optional string uri = 3; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The event timestamp in milliseconds. This prevents browser caching of
+   * otherwise identical get requests. The name is abbreviated to reduce the
+   * payload bytes.
+   * 
+ * + * optional int64 ets = 4; + * + * @return Whether the ets field is set. + */ + boolean hasEts(); + /** + * + * + *
+   * The event timestamp in milliseconds. This prevents browser caching of
+   * otherwise identical get requests. The name is abbreviated to reduce the
+   * payload bytes.
+   * 
+ * + * optional int64 ets = 4; + * + * @return The ets. + */ + long getEts(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CommonProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CommonProto.java new file mode 100644 index 000000000000..d7b44cc7fb49 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CommonProto.java @@ -0,0 +1,150 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class CommonProto { + private CommonProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Interval_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Interval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/discoveryengine/v1alpha/c" + + "ommon.proto\022$google.cloud.discoveryengin" + + "e.v1alpha\032\031google/api/resource.proto\"x\n\010" + + "Interval\022\021\n\007minimum\030\001 \001(\001H\000\022\033\n\021exclusive" + + "_minimum\030\002 \001(\001H\000\022\021\n\007maximum\030\003 \001(\001H\001\022\033\n\021e" + + "xclusive_maximum\030\004 \001(\001H\001B\005\n\003minB\005\n\003max\"0" + + "\n\017CustomAttribute\022\014\n\004text\030\001 \003(\t\022\017\n\007numbe" + + "rs\030\002 \003(\001\"/\n\010UserInfo\022\017\n\007user_id\030\001 \001(\t\022\022\n" + + "\nuser_agent\030\002 \001(\t\"\034\n\nDoubleList\022\016\n\006value" + + "s\030\001 \003(\001*\201\001\n\014SolutionType\022\035\n\031SOLUTION_TYP" + + "E_UNSPECIFIED\020\000\022 \n\034SOLUTION_TYPE_RECOMME" + + "NDATION\020\001\022\030\n\024SOLUTION_TYPE_SEARCH\020\002\022\026\n\022S" + + "OLUTION_TYPE_CHAT\020\003B\274\n\n(com.google.cloud" + + ".discoveryengine.v1alphaB\013CommonProtoP\001Z" + + "Rcloud.google.com/go/discoveryengine/api" + + "v1alpha/discoveryenginepb;discoveryengin" + + "epb\242\002\017DISCOVERYENGINE\252\002$Google.Cloud.Dis" + + "coveryEngine.V1Alpha\312\002$Google\\Cloud\\Disc" + + "overyEngine\\V1alpha\352\002\'Google::Cloud::Dis" + + "coveryEngine::V1alpha\352A\346\001\n%discoveryengi" + + "ne.googleapis.com/Branch\022Qprojects/{proj" + + "ect}/locations/{location}/dataStores/{da" + + "ta_store}/branches/{branch}\022jprojects/{p" + + "roject}/locations/{location}/collections" + + "/{collection}/dataStores/{data_store}/br" + + "anches/{branch}\352A\305\001\n(discoveryengine.goo" + + "gleapis.com/DataStore\022?projects/{project" + + "}/locations/{location}/dataStores/{data_" + + "store}\022Xprojects/{project}/locations/{lo" + + "cation}/collections/{collection}/dataSto" + + "res/{data_store}\352A\374\002\n,discoveryengine.go" + + "ogleapis.com/ServingConfig\022_projects/{pr" + + "oject}/locations/{location}/dataStores/{" + + "data_store}/servingConfigs/{serving_conf" + + "ig}\022xprojects/{project}/locations/{locat" + + "ion}/collections/{collection}/dataStores" + + "/{data_store}/servingConfigs/{serving_co" + + "nfig}\022qprojects/{project}/locations/{loc" + + "ation}/collections/{collection}/engines/" + + "{engine}/servingConfigs/{serving_config}" + + "\352A\356\001\n/discoveryengine.googleapis.com/Sit" + + "eSearchEngine\022Pprojects/{project}/locati" + + "ons/{location}/dataStores/{data_store}/s" + + "iteSearchEngine\022iprojects/{project}/loca" + + "tions/{location}/collections/{collection" + + "}/dataStores/{data_store}/siteSearchEngi" + + "neb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_Interval_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_Interval_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Interval_descriptor, + new java.lang.String[] { + "Minimum", "ExclusiveMinimum", "Maximum", "ExclusiveMaximum", "Min", "Max", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_descriptor, + new java.lang.String[] { + "Text", "Numbers", + }); + internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_descriptor, + new java.lang.String[] { + "UserId", "UserAgent", + }); + internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_descriptor, + new java.lang.String[] { + "Values", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resourceDefinition); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryRequest.java new file mode 100644 index 000000000000..89d25e7ceb26 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryRequest.java @@ -0,0 +1,1515 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/completion_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CompleteQueryRequest} + */ +public final class CompleteQueryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) + CompleteQueryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompleteQueryRequest.newBuilder() to construct. + private CompleteQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompleteQueryRequest() { + dataStore_ = ""; + query_ = ""; + queryModel_ = ""; + userPseudoId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompleteQueryRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.class, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.Builder.class); + } + + public static final int DATA_STORE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataStore_ = ""; + /** + * + * + *
+   * Required. The parent data store resource name for which the completion is
+   * performed, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+   * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataStore. + */ + @java.lang.Override + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataStore_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent data store resource name for which the completion is
+   * performed, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+   * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + * + * + *
+   * Required. The typeahead input used to fetch suggestions. Maximum length is
+   * 128 characters.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The typeahead input used to fetch suggestions. Maximum length is
+   * 128 characters.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_MODEL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object queryModel_ = ""; + /** + * + * + *
+   * Selects data model of query suggestions for serving. Currently supported
+   * values:
+   *
+   * * `document` - Using suggestions generated from user-imported documents.
+   * * `search-history` - Using suggestions generated from the past history of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * API calls. Do not use it when there is no traffic for Search API.
+   * * `user-event` - Using suggestions generated from user-imported search
+   * events.
+   * * `document-completable` - Using suggestions taken directly from
+   * user-imported document fields marked as completable.
+   *
+   * Default values:
+   *
+   * * `document` is the default model for regular dataStores.
+   * * `search-history` is the default model for site search dataStores.
+   * 
+ * + * string query_model = 3; + * + * @return The queryModel. + */ + @java.lang.Override + public java.lang.String getQueryModel() { + java.lang.Object ref = queryModel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryModel_ = s; + return s; + } + } + /** + * + * + *
+   * Selects data model of query suggestions for serving. Currently supported
+   * values:
+   *
+   * * `document` - Using suggestions generated from user-imported documents.
+   * * `search-history` - Using suggestions generated from the past history of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * API calls. Do not use it when there is no traffic for Search API.
+   * * `user-event` - Using suggestions generated from user-imported search
+   * events.
+   * * `document-completable` - Using suggestions taken directly from
+   * user-imported document fields marked as completable.
+   *
+   * Default values:
+   *
+   * * `document` is the default model for regular dataStores.
+   * * `search-history` is the default model for site search dataStores.
+   * 
+ * + * string query_model = 3; + * + * @return The bytes for queryModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryModelBytes() { + java.lang.Object ref = queryModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_pseudo_id = 4; + * + * @return The userPseudoId. + */ + @java.lang.Override + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_pseudo_id = 4; + * + * @return The bytes for userPseudoId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER = 5; + private boolean includeTailSuggestions_ = false; + /** + * + * + *
+   * Indicates if tail suggestions should be returned if there are no
+   * suggestions that match the full query. Even if set to true, if there are
+   * suggestions that match the full query, those are returned and no
+   * tail suggestions are returned.
+   * 
+ * + * bool include_tail_suggestions = 5; + * + * @return The includeTailSuggestions. + */ + @java.lang.Override + public boolean getIncludeTailSuggestions() { + return includeTailSuggestions_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataStore_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataStore_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryModel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, queryModel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userPseudoId_); + } + if (includeTailSuggestions_ != false) { + output.writeBool(5, includeTailSuggestions_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataStore_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataStore_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryModel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, queryModel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userPseudoId_); + } + if (includeTailSuggestions_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeTailSuggestions_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest other = + (com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) obj; + + if (!getDataStore().equals(other.getDataStore())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getQueryModel().equals(other.getQueryModel())) return false; + if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; + if (getIncludeTailSuggestions() != other.getIncludeTailSuggestions()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + getDataStore().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + QUERY_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getQueryModel().hashCode(); + hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserPseudoId().hashCode(); + hash = (37 * hash) + INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeTailSuggestions()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CompleteQueryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.class, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataStore_ = ""; + query_ = ""; + queryModel_ = ""; + userPseudoId_ = ""; + includeTailSuggestions_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest build() { + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest result = + new com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataStore_ = dataStore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.queryModel_ = queryModel_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userPseudoId_ = userPseudoId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.includeTailSuggestions_ = includeTailSuggestions_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.getDefaultInstance()) + return this; + if (!other.getDataStore().isEmpty()) { + dataStore_ = other.dataStore_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getQueryModel().isEmpty()) { + queryModel_ = other.queryModel_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUserPseudoId().isEmpty()) { + userPseudoId_ = other.userPseudoId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getIncludeTailSuggestions() != false) { + setIncludeTailSuggestions(other.getIncludeTailSuggestions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataStore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + queryModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + userPseudoId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + includeTailSuggestions_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dataStore_ = ""; + /** + * + * + *
+     * Required. The parent data store resource name for which the completion is
+     * performed, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+     * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataStore. + */ + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent data store resource name for which the completion is
+     * performed, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+     * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataStore. + */ + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent data store resource name for which the completion is
+     * performed, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+     * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataStore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent data store resource name for which the completion is
+     * performed, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+     * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataStore() { + dataStore_ = getDefaultInstance().getDataStore(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent data store resource name for which the completion is
+     * performed, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+     * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataStore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * Required. The typeahead input used to fetch suggestions. Maximum length is
+     * 128 characters.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The typeahead input used to fetch suggestions. Maximum length is
+     * 128 characters.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The typeahead input used to fetch suggestions. Maximum length is
+     * 128 characters.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The typeahead input used to fetch suggestions. Maximum length is
+     * 128 characters.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The typeahead input used to fetch suggestions. Maximum length is
+     * 128 characters.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object queryModel_ = ""; + /** + * + * + *
+     * Selects data model of query suggestions for serving. Currently supported
+     * values:
+     *
+     * * `document` - Using suggestions generated from user-imported documents.
+     * * `search-history` - Using suggestions generated from the past history of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API calls. Do not use it when there is no traffic for Search API.
+     * * `user-event` - Using suggestions generated from user-imported search
+     * events.
+     * * `document-completable` - Using suggestions taken directly from
+     * user-imported document fields marked as completable.
+     *
+     * Default values:
+     *
+     * * `document` is the default model for regular dataStores.
+     * * `search-history` is the default model for site search dataStores.
+     * 
+ * + * string query_model = 3; + * + * @return The queryModel. + */ + public java.lang.String getQueryModel() { + java.lang.Object ref = queryModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects data model of query suggestions for serving. Currently supported
+     * values:
+     *
+     * * `document` - Using suggestions generated from user-imported documents.
+     * * `search-history` - Using suggestions generated from the past history of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API calls. Do not use it when there is no traffic for Search API.
+     * * `user-event` - Using suggestions generated from user-imported search
+     * events.
+     * * `document-completable` - Using suggestions taken directly from
+     * user-imported document fields marked as completable.
+     *
+     * Default values:
+     *
+     * * `document` is the default model for regular dataStores.
+     * * `search-history` is the default model for site search dataStores.
+     * 
+ * + * string query_model = 3; + * + * @return The bytes for queryModel. + */ + public com.google.protobuf.ByteString getQueryModelBytes() { + java.lang.Object ref = queryModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects data model of query suggestions for serving. Currently supported
+     * values:
+     *
+     * * `document` - Using suggestions generated from user-imported documents.
+     * * `search-history` - Using suggestions generated from the past history of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API calls. Do not use it when there is no traffic for Search API.
+     * * `user-event` - Using suggestions generated from user-imported search
+     * events.
+     * * `document-completable` - Using suggestions taken directly from
+     * user-imported document fields marked as completable.
+     *
+     * Default values:
+     *
+     * * `document` is the default model for regular dataStores.
+     * * `search-history` is the default model for site search dataStores.
+     * 
+ * + * string query_model = 3; + * + * @param value The queryModel to set. + * @return This builder for chaining. + */ + public Builder setQueryModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects data model of query suggestions for serving. Currently supported
+     * values:
+     *
+     * * `document` - Using suggestions generated from user-imported documents.
+     * * `search-history` - Using suggestions generated from the past history of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API calls. Do not use it when there is no traffic for Search API.
+     * * `user-event` - Using suggestions generated from user-imported search
+     * events.
+     * * `document-completable` - Using suggestions taken directly from
+     * user-imported document fields marked as completable.
+     *
+     * Default values:
+     *
+     * * `document` is the default model for regular dataStores.
+     * * `search-history` is the default model for site search dataStores.
+     * 
+ * + * string query_model = 3; + * + * @return This builder for chaining. + */ + public Builder clearQueryModel() { + queryModel_ = getDefaultInstance().getQueryModel(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects data model of query suggestions for serving. Currently supported
+     * values:
+     *
+     * * `document` - Using suggestions generated from user-imported documents.
+     * * `search-history` - Using suggestions generated from the past history of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * API calls. Do not use it when there is no traffic for Search API.
+     * * `user-event` - Using suggestions generated from user-imported search
+     * events.
+     * * `document-completable` - Using suggestions taken directly from
+     * user-imported document fields marked as completable.
+     *
+     * Default values:
+     *
+     * * `document` is the default model for regular dataStores.
+     * * `search-history` is the default model for site search dataStores.
+     * 
+ * + * string query_model = 3; + * + * @param value The bytes for queryModel to set. + * @return This builder for chaining. + */ + public Builder setQueryModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_pseudo_id = 4; + * + * @return The userPseudoId. + */ + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_pseudo_id = 4; + * + * @return The bytes for userPseudoId. + */ + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_pseudo_id = 4; + * + * @param value The userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPseudoId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_pseudo_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearUserPseudoId() { + userPseudoId_ = getDefaultInstance().getUserPseudoId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_pseudo_id = 4; + * + * @param value The bytes for userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPseudoId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean includeTailSuggestions_; + /** + * + * + *
+     * Indicates if tail suggestions should be returned if there are no
+     * suggestions that match the full query. Even if set to true, if there are
+     * suggestions that match the full query, those are returned and no
+     * tail suggestions are returned.
+     * 
+ * + * bool include_tail_suggestions = 5; + * + * @return The includeTailSuggestions. + */ + @java.lang.Override + public boolean getIncludeTailSuggestions() { + return includeTailSuggestions_; + } + /** + * + * + *
+     * Indicates if tail suggestions should be returned if there are no
+     * suggestions that match the full query. Even if set to true, if there are
+     * suggestions that match the full query, those are returned and no
+     * tail suggestions are returned.
+     * 
+ * + * bool include_tail_suggestions = 5; + * + * @param value The includeTailSuggestions to set. + * @return This builder for chaining. + */ + public Builder setIncludeTailSuggestions(boolean value) { + + includeTailSuggestions_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates if tail suggestions should be returned if there are no
+     * suggestions that match the full query. Even if set to true, if there are
+     * suggestions that match the full query, those are returned and no
+     * tail suggestions are returned.
+     * 
+ * + * bool include_tail_suggestions = 5; + * + * @return This builder for chaining. + */ + public Builder clearIncludeTailSuggestions() { + bitField0_ = (bitField0_ & ~0x00000010); + includeTailSuggestions_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) + private static final com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompleteQueryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryRequestOrBuilder.java new file mode 100644 index 000000000000..d03d8a242750 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryRequestOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/completion_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CompleteQueryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CompleteQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent data store resource name for which the completion is
+   * performed, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+   * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataStore. + */ + java.lang.String getDataStore(); + /** + * + * + *
+   * Required. The parent data store resource name for which the completion is
+   * performed, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
+   * 
+ * + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataStore. + */ + com.google.protobuf.ByteString getDataStoreBytes(); + + /** + * + * + *
+   * Required. The typeahead input used to fetch suggestions. Maximum length is
+   * 128 characters.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * Required. The typeahead input used to fetch suggestions. Maximum length is
+   * 128 characters.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * Selects data model of query suggestions for serving. Currently supported
+   * values:
+   *
+   * * `document` - Using suggestions generated from user-imported documents.
+   * * `search-history` - Using suggestions generated from the past history of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * API calls. Do not use it when there is no traffic for Search API.
+   * * `user-event` - Using suggestions generated from user-imported search
+   * events.
+   * * `document-completable` - Using suggestions taken directly from
+   * user-imported document fields marked as completable.
+   *
+   * Default values:
+   *
+   * * `document` is the default model for regular dataStores.
+   * * `search-history` is the default model for site search dataStores.
+   * 
+ * + * string query_model = 3; + * + * @return The queryModel. + */ + java.lang.String getQueryModel(); + /** + * + * + *
+   * Selects data model of query suggestions for serving. Currently supported
+   * values:
+   *
+   * * `document` - Using suggestions generated from user-imported documents.
+   * * `search-history` - Using suggestions generated from the past history of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * API calls. Do not use it when there is no traffic for Search API.
+   * * `user-event` - Using suggestions generated from user-imported search
+   * events.
+   * * `document-completable` - Using suggestions taken directly from
+   * user-imported document fields marked as completable.
+   *
+   * Default values:
+   *
+   * * `document` is the default model for regular dataStores.
+   * * `search-history` is the default model for site search dataStores.
+   * 
+ * + * string query_model = 3; + * + * @return The bytes for queryModel. + */ + com.google.protobuf.ByteString getQueryModelBytes(); + + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_pseudo_id = 4; + * + * @return The userPseudoId. + */ + java.lang.String getUserPseudoId(); + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id].
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_pseudo_id = 4; + * + * @return The bytes for userPseudoId. + */ + com.google.protobuf.ByteString getUserPseudoIdBytes(); + + /** + * + * + *
+   * Indicates if tail suggestions should be returned if there are no
+   * suggestions that match the full query. Even if set to true, if there are
+   * suggestions that match the full query, those are returned and no
+   * tail suggestions are returned.
+   * 
+ * + * bool include_tail_suggestions = 5; + * + * @return The includeTailSuggestions. + */ + boolean getIncludeTailSuggestions(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryResponse.java new file mode 100644 index 000000000000..c1de6156ae46 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryResponse.java @@ -0,0 +1,2226 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/completion_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for
+ * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CompleteQueryResponse} + */ +public final class CompleteQueryResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) + CompleteQueryResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompleteQueryResponse.newBuilder() to construct. + private CompleteQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompleteQueryResponse() { + querySuggestions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompleteQueryResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.class, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.Builder.class); + } + + public interface QuerySuggestionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The suggestion. + */ + java.lang.String getSuggestion(); + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The bytes for suggestion. + */ + com.google.protobuf.ByteString getSuggestionBytes(); + + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @return A list containing the completableFieldPaths. + */ + java.util.List getCompletableFieldPathsList(); + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @return The count of completableFieldPaths. + */ + int getCompletableFieldPathsCount(); + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @param index The index of the element to return. + * @return The completableFieldPaths at the given index. + */ + java.lang.String getCompletableFieldPaths(int index); + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @param index The index of the value to return. + * @return The bytes of the completableFieldPaths at the given index. + */ + com.google.protobuf.ByteString getCompletableFieldPathsBytes(int index); + } + /** + * + * + *
+   * Suggestions as search queries.
+   * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion} + */ + public static final class QuerySuggestion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) + QuerySuggestionOrBuilder { + private static final long serialVersionUID = 0L; + // Use QuerySuggestion.newBuilder() to construct. + private QuerySuggestion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QuerySuggestion() { + suggestion_ = ""; + completableFieldPaths_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QuerySuggestion(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.class, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder + .class); + } + + public static final int SUGGESTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object suggestion_ = ""; + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The suggestion. + */ + @java.lang.Override + public java.lang.String getSuggestion() { + java.lang.Object ref = suggestion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + suggestion_ = s; + return s; + } + } + /** + * + * + *
+     * The suggestion for the query.
+     * 
+ * + * string suggestion = 1; + * + * @return The bytes for suggestion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSuggestionBytes() { + java.lang.Object ref = suggestion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + suggestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPLETABLE_FIELD_PATHS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList completableFieldPaths_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @return A list containing the completableFieldPaths. + */ + public com.google.protobuf.ProtocolStringList getCompletableFieldPathsList() { + return completableFieldPaths_; + } + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @return The count of completableFieldPaths. + */ + public int getCompletableFieldPathsCount() { + return completableFieldPaths_.size(); + } + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @param index The index of the element to return. + * @return The completableFieldPaths at the given index. + */ + public java.lang.String getCompletableFieldPaths(int index) { + return completableFieldPaths_.get(index); + } + /** + * + * + *
+     * The unique document field paths that serve as the source of this
+     * suggestion if it was generated from completable fields.
+     *
+     * This field is only populated for the document-completable model.
+     * 
+ * + * repeated string completable_field_paths = 2; + * + * @param index The index of the value to return. + * @return The bytes of the completableFieldPaths at the given index. + */ + public com.google.protobuf.ByteString getCompletableFieldPathsBytes(int index) { + return completableFieldPaths_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(suggestion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, suggestion_); + } + for (int i = 0; i < completableFieldPaths_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, completableFieldPaths_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(suggestion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, suggestion_); + } + { + int dataSize = 0; + for (int i = 0; i < completableFieldPaths_.size(); i++) { + dataSize += computeStringSizeNoTag(completableFieldPaths_.getRaw(i)); + } + size += dataSize; + size += 1 * getCompletableFieldPathsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion other = + (com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) obj; + + if (!getSuggestion().equals(other.getSuggestion())) return false; + if (!getCompletableFieldPathsList().equals(other.getCompletableFieldPathsList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUGGESTION_FIELD_NUMBER; + hash = (53 * hash) + getSuggestion().hashCode(); + if (getCompletableFieldPathsCount() > 0) { + hash = (37 * hash) + COMPLETABLE_FIELD_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getCompletableFieldPathsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Suggestions as search queries.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + .class, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + suggestion_ = ""; + completableFieldPaths_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + build() { + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion result = + new com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.suggestion_ = suggestion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + completableFieldPaths_.makeImmutable(); + result.completableFieldPaths_ = completableFieldPaths_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + .getDefaultInstance()) return this; + if (!other.getSuggestion().isEmpty()) { + suggestion_ = other.suggestion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.completableFieldPaths_.isEmpty()) { + if (completableFieldPaths_.isEmpty()) { + completableFieldPaths_ = other.completableFieldPaths_; + bitField0_ |= 0x00000002; + } else { + ensureCompletableFieldPathsIsMutable(); + completableFieldPaths_.addAll(other.completableFieldPaths_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + suggestion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCompletableFieldPathsIsMutable(); + completableFieldPaths_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object suggestion_ = ""; + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @return The suggestion. + */ + public java.lang.String getSuggestion() { + java.lang.Object ref = suggestion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + suggestion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @return The bytes for suggestion. + */ + public com.google.protobuf.ByteString getSuggestionBytes() { + java.lang.Object ref = suggestion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + suggestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @param value The suggestion to set. + * @return This builder for chaining. + */ + public Builder setSuggestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + suggestion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @return This builder for chaining. + */ + public Builder clearSuggestion() { + suggestion_ = getDefaultInstance().getSuggestion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The suggestion for the query.
+       * 
+ * + * string suggestion = 1; + * + * @param value The bytes for suggestion to set. + * @return This builder for chaining. + */ + public Builder setSuggestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + suggestion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList completableFieldPaths_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCompletableFieldPathsIsMutable() { + if (!completableFieldPaths_.isModifiable()) { + completableFieldPaths_ = + new com.google.protobuf.LazyStringArrayList(completableFieldPaths_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @return A list containing the completableFieldPaths. + */ + public com.google.protobuf.ProtocolStringList getCompletableFieldPathsList() { + completableFieldPaths_.makeImmutable(); + return completableFieldPaths_; + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @return The count of completableFieldPaths. + */ + public int getCompletableFieldPathsCount() { + return completableFieldPaths_.size(); + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @param index The index of the element to return. + * @return The completableFieldPaths at the given index. + */ + public java.lang.String getCompletableFieldPaths(int index) { + return completableFieldPaths_.get(index); + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @param index The index of the value to return. + * @return The bytes of the completableFieldPaths at the given index. + */ + public com.google.protobuf.ByteString getCompletableFieldPathsBytes(int index) { + return completableFieldPaths_.getByteString(index); + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @param index The index to set the value at. + * @param value The completableFieldPaths to set. + * @return This builder for chaining. + */ + public Builder setCompletableFieldPaths(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletableFieldPathsIsMutable(); + completableFieldPaths_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @param value The completableFieldPaths to add. + * @return This builder for chaining. + */ + public Builder addCompletableFieldPaths(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompletableFieldPathsIsMutable(); + completableFieldPaths_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @param values The completableFieldPaths to add. + * @return This builder for chaining. + */ + public Builder addAllCompletableFieldPaths(java.lang.Iterable values) { + ensureCompletableFieldPathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, completableFieldPaths_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @return This builder for chaining. + */ + public Builder clearCompletableFieldPaths() { + completableFieldPaths_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The unique document field paths that serve as the source of this
+       * suggestion if it was generated from completable fields.
+       *
+       * This field is only populated for the document-completable model.
+       * 
+ * + * repeated string completable_field_paths = 2; + * + * @param value The bytes of the completableFieldPaths to add. + * @return This builder for chaining. + */ + public Builder addCompletableFieldPathsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCompletableFieldPathsIsMutable(); + completableFieldPaths_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion) + private static final com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + .QuerySuggestion + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QuerySuggestion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int QUERY_SUGGESTIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion> + querySuggestions_; + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion> + getQuerySuggestionsList() { + return querySuggestions_; + } + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + .QuerySuggestionOrBuilder> + getQuerySuggestionsOrBuilderList() { + return querySuggestions_; + } + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + @java.lang.Override + public int getQuerySuggestionsCount() { + return querySuggestions_.size(); + } + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + getQuerySuggestions(int index) { + return querySuggestions_.get(index); + } + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestionOrBuilder + getQuerySuggestionsOrBuilder(int index) { + return querySuggestions_.get(index); + } + + public static final int TAIL_MATCH_TRIGGERED_FIELD_NUMBER = 2; + private boolean tailMatchTriggered_ = false; + /** + * + * + *
+   * True if the returned suggestions are all tail suggestions.
+   *
+   * For tail matching to be triggered, include_tail_suggestions in the request
+   * must be true and there must be no suggestions that match the full query.
+   * 
+ * + * bool tail_match_triggered = 2; + * + * @return The tailMatchTriggered. + */ + @java.lang.Override + public boolean getTailMatchTriggered() { + return tailMatchTriggered_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < querySuggestions_.size(); i++) { + output.writeMessage(1, querySuggestions_.get(i)); + } + if (tailMatchTriggered_ != false) { + output.writeBool(2, tailMatchTriggered_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < querySuggestions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, querySuggestions_.get(i)); + } + if (tailMatchTriggered_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, tailMatchTriggered_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse other = + (com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) obj; + + if (!getQuerySuggestionsList().equals(other.getQuerySuggestionsList())) return false; + if (getTailMatchTriggered() != other.getTailMatchTriggered()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuerySuggestionsCount() > 0) { + hash = (37 * hash) + QUERY_SUGGESTIONS_FIELD_NUMBER; + hash = (53 * hash) + getQuerySuggestionsList().hashCode(); + } + hash = (37 * hash) + TAIL_MATCH_TRIGGERED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTailMatchTriggered()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CompleteQueryResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.class, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (querySuggestionsBuilder_ == null) { + querySuggestions_ = java.util.Collections.emptyList(); + } else { + querySuggestions_ = null; + querySuggestionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + tailMatchTriggered_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse build() { + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse result = + new com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse result) { + if (querySuggestionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + querySuggestions_ = java.util.Collections.unmodifiableList(querySuggestions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.querySuggestions_ = querySuggestions_; + } else { + result.querySuggestions_ = querySuggestionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tailMatchTriggered_ = tailMatchTriggered_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.getDefaultInstance()) + return this; + if (querySuggestionsBuilder_ == null) { + if (!other.querySuggestions_.isEmpty()) { + if (querySuggestions_.isEmpty()) { + querySuggestions_ = other.querySuggestions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuerySuggestionsIsMutable(); + querySuggestions_.addAll(other.querySuggestions_); + } + onChanged(); + } + } else { + if (!other.querySuggestions_.isEmpty()) { + if (querySuggestionsBuilder_.isEmpty()) { + querySuggestionsBuilder_.dispose(); + querySuggestionsBuilder_ = null; + querySuggestions_ = other.querySuggestions_; + bitField0_ = (bitField0_ & ~0x00000001); + querySuggestionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getQuerySuggestionsFieldBuilder() + : null; + } else { + querySuggestionsBuilder_.addAllMessages(other.querySuggestions_); + } + } + } + if (other.getTailMatchTriggered() != false) { + setTailMatchTriggered(other.getTailMatchTriggered()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + .QuerySuggestion.parser(), + extensionRegistry); + if (querySuggestionsBuilder_ == null) { + ensureQuerySuggestionsIsMutable(); + querySuggestions_.add(m); + } else { + querySuggestionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + tailMatchTriggered_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion> + querySuggestions_ = java.util.Collections.emptyList(); + + private void ensureQuerySuggestionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + querySuggestions_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion>( + querySuggestions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestionOrBuilder> + querySuggestionsBuilder_; + + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion> + getQuerySuggestionsList() { + if (querySuggestionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(querySuggestions_); + } else { + return querySuggestionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public int getQuerySuggestionsCount() { + if (querySuggestionsBuilder_ == null) { + return querySuggestions_.size(); + } else { + return querySuggestionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + getQuerySuggestions(int index) { + if (querySuggestionsBuilder_ == null) { + return querySuggestions_.get(index); + } else { + return querySuggestionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder setQuerySuggestions( + int index, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion value) { + if (querySuggestionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuerySuggestionsIsMutable(); + querySuggestions_.set(index, value); + onChanged(); + } else { + querySuggestionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder setQuerySuggestions( + int index, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder + builderForValue) { + if (querySuggestionsBuilder_ == null) { + ensureQuerySuggestionsIsMutable(); + querySuggestions_.set(index, builderForValue.build()); + onChanged(); + } else { + querySuggestionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder addQuerySuggestions( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion value) { + if (querySuggestionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuerySuggestionsIsMutable(); + querySuggestions_.add(value); + onChanged(); + } else { + querySuggestionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder addQuerySuggestions( + int index, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion value) { + if (querySuggestionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuerySuggestionsIsMutable(); + querySuggestions_.add(index, value); + onChanged(); + } else { + querySuggestionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder addQuerySuggestions( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder + builderForValue) { + if (querySuggestionsBuilder_ == null) { + ensureQuerySuggestionsIsMutable(); + querySuggestions_.add(builderForValue.build()); + onChanged(); + } else { + querySuggestionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder addQuerySuggestions( + int index, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder + builderForValue) { + if (querySuggestionsBuilder_ == null) { + ensureQuerySuggestionsIsMutable(); + querySuggestions_.add(index, builderForValue.build()); + onChanged(); + } else { + querySuggestionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder addAllQuerySuggestions( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion> + values) { + if (querySuggestionsBuilder_ == null) { + ensureQuerySuggestionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, querySuggestions_); + onChanged(); + } else { + querySuggestionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder clearQuerySuggestions() { + if (querySuggestionsBuilder_ == null) { + querySuggestions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + querySuggestionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public Builder removeQuerySuggestions(int index) { + if (querySuggestionsBuilder_ == null) { + ensureQuerySuggestionsIsMutable(); + querySuggestions_.remove(index); + onChanged(); + } else { + querySuggestionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder + getQuerySuggestionsBuilder(int index) { + return getQuerySuggestionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestionOrBuilder + getQuerySuggestionsOrBuilder(int index) { + if (querySuggestionsBuilder_ == null) { + return querySuggestions_.get(index); + } else { + return querySuggestionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + .QuerySuggestionOrBuilder> + getQuerySuggestionsOrBuilderList() { + if (querySuggestionsBuilder_ != null) { + return querySuggestionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(querySuggestions_); + } + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder + addQuerySuggestionsBuilder() { + return getQuerySuggestionsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + .getDefaultInstance()); + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder + addQuerySuggestionsBuilder(int index) { + return getQuerySuggestionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + .getDefaultInstance()); + } + /** + * + * + *
+     * Results of the matched query suggestions. The result list is ordered and
+     * the first result is a top suggestion.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder> + getQuerySuggestionsBuilderList() { + return getQuerySuggestionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.Builder, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestionOrBuilder> + getQuerySuggestionsFieldBuilder() { + if (querySuggestionsBuilder_ == null) { + querySuggestionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + .Builder, + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + .QuerySuggestionOrBuilder>( + querySuggestions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + querySuggestions_ = null; + } + return querySuggestionsBuilder_; + } + + private boolean tailMatchTriggered_; + /** + * + * + *
+     * True if the returned suggestions are all tail suggestions.
+     *
+     * For tail matching to be triggered, include_tail_suggestions in the request
+     * must be true and there must be no suggestions that match the full query.
+     * 
+ * + * bool tail_match_triggered = 2; + * + * @return The tailMatchTriggered. + */ + @java.lang.Override + public boolean getTailMatchTriggered() { + return tailMatchTriggered_; + } + /** + * + * + *
+     * True if the returned suggestions are all tail suggestions.
+     *
+     * For tail matching to be triggered, include_tail_suggestions in the request
+     * must be true and there must be no suggestions that match the full query.
+     * 
+ * + * bool tail_match_triggered = 2; + * + * @param value The tailMatchTriggered to set. + * @return This builder for chaining. + */ + public Builder setTailMatchTriggered(boolean value) { + + tailMatchTriggered_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * True if the returned suggestions are all tail suggestions.
+     *
+     * For tail matching to be triggered, include_tail_suggestions in the request
+     * must be true and there must be no suggestions that match the full query.
+     * 
+ * + * bool tail_match_triggered = 2; + * + * @return This builder for chaining. + */ + public Builder clearTailMatchTriggered() { + bitField0_ = (bitField0_ & ~0x00000002); + tailMatchTriggered_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) + private static final com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompleteQueryResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryResponseOrBuilder.java new file mode 100644 index 000000000000..c0d6b2e12f5d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompleteQueryResponseOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/completion_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CompleteQueryResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CompleteQueryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + java.util.List + getQuerySuggestionsList(); + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion + getQuerySuggestions(int index); + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + int getQuerySuggestionsCount(); + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse + .QuerySuggestionOrBuilder> + getQuerySuggestionsOrBuilderList(); + /** + * + * + *
+   * Results of the matched query suggestions. The result list is ordered and
+   * the first result is a top suggestion.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion query_suggestions = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestionOrBuilder + getQuerySuggestionsOrBuilder(int index); + + /** + * + * + *
+   * True if the returned suggestions are all tail suggestions.
+   *
+   * For tail matching to be triggered, include_tail_suggestions in the request
+   * must be true and there must be no suggestions that match the full query.
+   * 
+ * + * bool tail_match_triggered = 2; + * + * @return The tailMatchTriggered. + */ + boolean getTailMatchTriggered(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionInfo.java new file mode 100644 index 000000000000..b5e3f7bf648d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionInfo.java @@ -0,0 +1,735 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Detailed completion information including completion attribution token and
+ * clicked completion info.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CompletionInfo} + */ +public final class CompletionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CompletionInfo) + CompletionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompletionInfo.newBuilder() to construct. + private CompletionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CompletionInfo() { + selectedSuggestion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CompletionInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.class, + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.Builder.class); + } + + public static final int SELECTED_SUGGESTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selectedSuggestion_ = ""; + /** + * + * + *
+   * End user selected
+   * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+   * 
+ * + * string selected_suggestion = 1; + * + * @return The selectedSuggestion. + */ + @java.lang.Override + public java.lang.String getSelectedSuggestion() { + java.lang.Object ref = selectedSuggestion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selectedSuggestion_ = s; + return s; + } + } + /** + * + * + *
+   * End user selected
+   * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+   * 
+ * + * string selected_suggestion = 1; + * + * @return The bytes for selectedSuggestion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectedSuggestionBytes() { + java.lang.Object ref = selectedSuggestion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selectedSuggestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SELECTED_POSITION_FIELD_NUMBER = 2; + private int selectedPosition_ = 0; + /** + * + * + *
+   * End user selected
+   * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion]
+   * position, starting from 0.
+   * 
+ * + * int32 selected_position = 2; + * + * @return The selectedPosition. + */ + @java.lang.Override + public int getSelectedPosition() { + return selectedPosition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedSuggestion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selectedSuggestion_); + } + if (selectedPosition_ != 0) { + output.writeInt32(2, selectedPosition_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedSuggestion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selectedSuggestion_); + } + if (selectedPosition_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, selectedPosition_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CompletionInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CompletionInfo other = + (com.google.cloud.discoveryengine.v1alpha.CompletionInfo) obj; + + if (!getSelectedSuggestion().equals(other.getSelectedSuggestion())) return false; + if (getSelectedPosition() != other.getSelectedPosition()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SELECTED_SUGGESTION_FIELD_NUMBER; + hash = (53 * hash) + getSelectedSuggestion().hashCode(); + hash = (37 * hash) + SELECTED_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getSelectedPosition(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CompletionInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Detailed completion information including completion attribution token and
+   * clicked completion info.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CompletionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CompletionInfo) + com.google.cloud.discoveryengine.v1alpha.CompletionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.class, + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CompletionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selectedSuggestion_ = ""; + selectedPosition_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompletionInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CompletionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompletionInfo build() { + com.google.cloud.discoveryengine.v1alpha.CompletionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompletionInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CompletionInfo result = + new com.google.cloud.discoveryengine.v1alpha.CompletionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.CompletionInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selectedSuggestion_ = selectedSuggestion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.selectedPosition_ = selectedPosition_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CompletionInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CompletionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CompletionInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.CompletionInfo.getDefaultInstance()) + return this; + if (!other.getSelectedSuggestion().isEmpty()) { + selectedSuggestion_ = other.selectedSuggestion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSelectedPosition() != 0) { + setSelectedPosition(other.getSelectedPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + selectedSuggestion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + selectedPosition_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object selectedSuggestion_ = ""; + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+     * 
+ * + * string selected_suggestion = 1; + * + * @return The selectedSuggestion. + */ + public java.lang.String getSelectedSuggestion() { + java.lang.Object ref = selectedSuggestion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selectedSuggestion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+     * 
+ * + * string selected_suggestion = 1; + * + * @return The bytes for selectedSuggestion. + */ + public com.google.protobuf.ByteString getSelectedSuggestionBytes() { + java.lang.Object ref = selectedSuggestion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selectedSuggestion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+     * 
+ * + * string selected_suggestion = 1; + * + * @param value The selectedSuggestion to set. + * @return This builder for chaining. + */ + public Builder setSelectedSuggestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selectedSuggestion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+     * 
+ * + * string selected_suggestion = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelectedSuggestion() { + selectedSuggestion_ = getDefaultInstance().getSelectedSuggestion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+     * 
+ * + * string selected_suggestion = 1; + * + * @param value The bytes for selectedSuggestion to set. + * @return This builder for chaining. + */ + public Builder setSelectedSuggestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selectedSuggestion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int selectedPosition_; + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion]
+     * position, starting from 0.
+     * 
+ * + * int32 selected_position = 2; + * + * @return The selectedPosition. + */ + @java.lang.Override + public int getSelectedPosition() { + return selectedPosition_; + } + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion]
+     * position, starting from 0.
+     * 
+ * + * int32 selected_position = 2; + * + * @param value The selectedPosition to set. + * @return This builder for chaining. + */ + public Builder setSelectedPosition(int value) { + + selectedPosition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * End user selected
+     * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion]
+     * position, starting from 0.
+     * 
+ * + * int32 selected_position = 2; + * + * @return This builder for chaining. + */ + public Builder clearSelectedPosition() { + bitField0_ = (bitField0_ & ~0x00000002); + selectedPosition_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CompletionInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CompletionInfo) + private static final com.google.cloud.discoveryengine.v1alpha.CompletionInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CompletionInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CompletionInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompletionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompletionInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionInfoOrBuilder.java new file mode 100644 index 000000000000..7bf60c924a9c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionInfoOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CompletionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CompletionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * End user selected
+   * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+   * 
+ * + * string selected_suggestion = 1; + * + * @return The selectedSuggestion. + */ + java.lang.String getSelectedSuggestion(); + /** + * + * + *
+   * End user selected
+   * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion].
+   * 
+ * + * string selected_suggestion = 1; + * + * @return The bytes for selectedSuggestion. + */ + com.google.protobuf.ByteString getSelectedSuggestionBytes(); + + /** + * + * + *
+   * End user selected
+   * [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion]
+   * position, starting from 0.
+   * 
+ * + * int32 selected_position = 2; + * + * @return The selectedPosition. + */ + int getSelectedPosition(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceProto.java new file mode 100644 index 000000000000..877da4ffe3c2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CompletionServiceProto.java @@ -0,0 +1,138 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/completion_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class CompletionServiceProto { + private CompletionServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n=google/cloud/discoveryengine/v1alpha/c" + + "ompletion_service.proto\022$google.cloud.di" + + "scoveryengine.v1alpha\032\034google/api/annota" + + "tions.proto\032\027google/api/client.proto\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\"\301\001\n\024CompleteQueryReques" + + "t\022E\n\ndata_store\030\001 \001(\tB1\342A\001\002\372A*\n(discover" + + "yengine.googleapis.com/DataStore\022\023\n\005quer" + + "y\030\002 \001(\tB\004\342A\001\002\022\023\n\013query_model\030\003 \001(\t\022\026\n\016us" + + "er_pseudo_id\030\004 \001(\t\022 \n\030include_tail_sugge" + + "stions\030\005 \001(\010\"\345\001\n\025CompleteQueryResponse\022f" + + "\n\021query_suggestions\030\001 \003(\0132K.google.cloud" + + ".discoveryengine.v1alpha.CompleteQueryRe" + + "sponse.QuerySuggestion\022\034\n\024tail_match_tri" + + "ggered\030\002 \001(\010\032F\n\017QuerySuggestion\022\022\n\nsugge" + + "stion\030\001 \001(\t\022\037\n\027completable_field_paths\030\002" + + " \003(\t2\236\003\n\021CompletionService\022\264\002\n\rCompleteQ" + + "uery\022:.google.cloud.discoveryengine.v1al" + + "pha.CompleteQueryRequest\032;.google.cloud." + + "discoveryengine.v1alpha.CompleteQueryRes" + + "ponse\"\251\001\202\323\344\223\002\242\001\022G/v1alpha/{data_store=pr" + + "ojects/*/locations/*/dataStores/*}:compl" + + "eteQueryZW\022U/v1alpha/{data_store=project" + + "s/*/locations/*/collections/*/dataStores" + + "/*}:completeQuery\032R\312A\036discoveryengine.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformB\242\002\n(com.google.clo" + + "ud.discoveryengine.v1alphaB\026CompletionSe" + + "rviceProtoP\001ZRcloud.google.com/go/discov" + + "eryengine/apiv1alpha/discoveryenginepb;d" + + "iscoveryenginepb\242\002\017DISCOVERYENGINE\252\002$Goo" + + "gle.Cloud.DiscoveryEngine.V1Alpha\312\002$Goog" + + "le\\Cloud\\DiscoveryEngine\\V1alpha\352\002\'Googl" + + "e::Cloud::DiscoveryEngine::V1alphab\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryRequest_descriptor, + new java.lang.String[] { + "DataStore", "Query", "QueryModel", "UserPseudoId", "IncludeTailSuggestions", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_descriptor, + new java.lang.String[] { + "QuerySuggestions", "TailMatchTriggered", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CompleteQueryResponse_QuerySuggestion_descriptor, + new java.lang.String[] { + "Suggestion", "CompletableFieldPaths", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Conversation.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Conversation.java new file mode 100644 index 000000000000..dde957842573 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Conversation.java @@ -0,0 +1,2179 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * External conversation proto definition.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Conversation} + */ +public final class Conversation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Conversation) + ConversationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Conversation.newBuilder() to construct. + private Conversation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Conversation() { + name_ = ""; + state_ = 0; + userPseudoId_ = ""; + messages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Conversation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Conversation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Conversation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Conversation.class, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder.class); + } + + /** + * + * + *
+   * Enumeration of the state of the conversation.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.Conversation.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Conversation is currently open.
+     * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+     * Conversation has been completed.
+     * 
+ * + * COMPLETED = 2; + */ + COMPLETED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Conversation is currently open.
+     * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+     * Conversation has been completed.
+     * 
+ * + * COMPLETED = 2; + */ + public static final int COMPLETED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return COMPLETED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.Conversation.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.Conversation.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. Fully qualified name
+   * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Fully qualified name
+   * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * The state of the Conversation.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the Conversation.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation.State getState() { + com.google.cloud.discoveryengine.v1alpha.Conversation.State result = + com.google.cloud.discoveryengine.v1alpha.Conversation.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.State.UNRECOGNIZED + : result; + } + + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+   * A unique identifier for tracking users.
+   * 
+ * + * string user_pseudo_id = 3; + * + * @return The userPseudoId. + */ + @java.lang.Override + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for tracking users.
+   * 
+ * + * string user_pseudo_id = 3; + * + * @return The bytes for userPseudoId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List messages_; + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + @java.lang.Override + public java.util.List + getMessagesList() { + return messages_; + } + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder> + getMessagesOrBuilderList() { + return messages_; + } + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + @java.lang.Override + public int getMessagesCount() { + return messages_.size(); + } + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage getMessages(int index) { + return messages_.get(index); + } + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder getMessagesOrBuilder( + int index) { + return messages_.get(index); + } + + public static final int START_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. The time the conversation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. The time the conversation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. The time the conversation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the conversation finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time the conversation finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the conversation finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (state_ + != com.google.cloud.discoveryengine.v1alpha.Conversation.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userPseudoId_); + } + for (int i = 0; i < messages_.size(); i++) { + output.writeMessage(4, messages_.get(i)); + } + if (startTime_ != null) { + output.writeMessage(5, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(6, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (state_ + != com.google.cloud.discoveryengine.v1alpha.Conversation.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userPseudoId_); + } + for (int i = 0; i < messages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, messages_.get(i)); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Conversation)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Conversation other = + (com.google.cloud.discoveryengine.v1alpha.Conversation) obj; + + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; + if (!getMessagesList().equals(other.getMessagesList())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserPseudoId().hashCode(); + if (getMessagesCount() > 0) { + hash = (37 * hash) + MESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getMessagesList().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.Conversation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * External conversation proto definition.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Conversation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Conversation) + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Conversation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Conversation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Conversation.class, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Conversation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + state_ = 0; + userPseudoId_ = ""; + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + } else { + messages_ = null; + messagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Conversation_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation build() { + com.google.cloud.discoveryengine.v1alpha.Conversation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Conversation result = + new com.google.cloud.discoveryengine.v1alpha.Conversation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.Conversation result) { + if (messagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + messages_ = java.util.Collections.unmodifiableList(messages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.messages_ = messages_; + } else { + result.messages_ = messagesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Conversation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userPseudoId_ = userPseudoId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Conversation) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Conversation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Conversation other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getUserPseudoId().isEmpty()) { + userPseudoId_ = other.userPseudoId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (messagesBuilder_ == null) { + if (!other.messages_.isEmpty()) { + if (messages_.isEmpty()) { + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMessagesIsMutable(); + messages_.addAll(other.messages_); + } + onChanged(); + } + } else { + if (!other.messages_.isEmpty()) { + if (messagesBuilder_.isEmpty()) { + messagesBuilder_.dispose(); + messagesBuilder_ = null; + messages_ = other.messages_; + bitField0_ = (bitField0_ & ~0x00000008); + messagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMessagesFieldBuilder() + : null; + } else { + messagesBuilder_.addAllMessages(other.messages_); + } + } + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + userPseudoId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1alpha.ConversationMessage m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.parser(), + extensionRegistry); + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(m); + } else { + messagesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. Fully qualified name
+     * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Fully qualified name
+     * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Fully qualified name
+     * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Fully qualified name
+     * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Fully qualified name
+     * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of the Conversation.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the Conversation.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the Conversation.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation.State getState() { + com.google.cloud.discoveryengine.v1alpha.Conversation.State result = + com.google.cloud.discoveryengine.v1alpha.Conversation.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The state of the Conversation.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.discoveryengine.v1alpha.Conversation.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the Conversation.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+     * A unique identifier for tracking users.
+     * 
+ * + * string user_pseudo_id = 3; + * + * @return The userPseudoId. + */ + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking users.
+     * 
+ * + * string user_pseudo_id = 3; + * + * @return The bytes for userPseudoId. + */ + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking users.
+     * 
+ * + * string user_pseudo_id = 3; + * + * @param value The userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPseudoId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking users.
+     * 
+ * + * string user_pseudo_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserPseudoId() { + userPseudoId_ = getDefaultInstance().getUserPseudoId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking users.
+     * 
+ * + * string user_pseudo_id = 3; + * + * @param value The bytes for userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPseudoId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List messages_ = + java.util.Collections.emptyList(); + + private void ensureMessagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + messages_ = + new java.util.ArrayList( + messages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ConversationMessage, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder> + messagesBuilder_; + + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public java.util.List + getMessagesList() { + if (messagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(messages_); + } else { + return messagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public int getMessagesCount() { + if (messagesBuilder_ == null) { + return messages_.size(); + } else { + return messagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage getMessages(int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder setMessages( + int index, com.google.cloud.discoveryengine.v1alpha.ConversationMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.set(index, value); + onChanged(); + } else { + messagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder setMessages( + int index, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.set(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder addMessages(com.google.cloud.discoveryengine.v1alpha.ConversationMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(value); + onChanged(); + } else { + messagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder addMessages( + int index, com.google.cloud.discoveryengine.v1alpha.ConversationMessage value) { + if (messagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesIsMutable(); + messages_.add(index, value); + onChanged(); + } else { + messagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder addMessages( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder addMessages( + int index, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder builderForValue) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.add(index, builderForValue.build()); + onChanged(); + } else { + messagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder addAllMessages( + java.lang.Iterable + values) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messages_); + onChanged(); + } else { + messagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder clearMessages() { + if (messagesBuilder_ == null) { + messages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + messagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public Builder removeMessages(int index) { + if (messagesBuilder_ == null) { + ensureMessagesIsMutable(); + messages_.remove(index); + onChanged(); + } else { + messagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder getMessagesBuilder( + int index) { + return getMessagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder + getMessagesOrBuilder(int index) { + if (messagesBuilder_ == null) { + return messages_.get(index); + } else { + return messagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder> + getMessagesOrBuilderList() { + if (messagesBuilder_ != null) { + return messagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messages_); + } + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder + addMessagesBuilder() { + return getMessagesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.getDefaultInstance()); + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder addMessagesBuilder( + int index) { + return getMessagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.getDefaultInstance()); + } + /** + * + * + *
+     * Conversation messages.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + public java.util.List + getMessagesBuilderList() { + return getMessagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ConversationMessage, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder> + getMessagesFieldBuilder() { + if (messagesBuilder_ == null) { + messagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ConversationMessage, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder>( + messages_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + messages_ = null; + } + return messagesBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000010); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. The time the conversation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000020); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the conversation finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Conversation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Conversation) + private static final com.google.cloud.discoveryengine.v1alpha.Conversation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Conversation(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Conversation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Conversation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationContext.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationContext.java new file mode 100644 index 000000000000..962a7674515d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationContext.java @@ -0,0 +1,926 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Defines context of the conversation
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConversationContext} + */ +public final class ConversationContext extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ConversationContext) + ConversationContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConversationContext.newBuilder() to construct. + private ConversationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConversationContext() { + contextDocuments_ = com.google.protobuf.LazyStringArrayList.emptyList(); + activeDocument_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConversationContext(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConversationContext.class, + com.google.cloud.discoveryengine.v1alpha.ConversationContext.Builder.class); + } + + public static final int CONTEXT_DOCUMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList contextDocuments_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @return A list containing the contextDocuments. + */ + public com.google.protobuf.ProtocolStringList getContextDocumentsList() { + return contextDocuments_; + } + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @return The count of contextDocuments. + */ + public int getContextDocumentsCount() { + return contextDocuments_.size(); + } + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @param index The index of the element to return. + * @return The contextDocuments at the given index. + */ + public java.lang.String getContextDocuments(int index) { + return contextDocuments_.get(index); + } + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @param index The index of the value to return. + * @return The bytes of the contextDocuments at the given index. + */ + public com.google.protobuf.ByteString getContextDocumentsBytes(int index) { + return contextDocuments_.getByteString(index); + } + + public static final int ACTIVE_DOCUMENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object activeDocument_ = ""; + /** + * + * + *
+   * The current active document the user opened.
+   * It contains the document resource reference.
+   * 
+ * + * string active_document = 2; + * + * @return The activeDocument. + */ + @java.lang.Override + public java.lang.String getActiveDocument() { + java.lang.Object ref = activeDocument_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + activeDocument_ = s; + return s; + } + } + /** + * + * + *
+   * The current active document the user opened.
+   * It contains the document resource reference.
+   * 
+ * + * string active_document = 2; + * + * @return The bytes for activeDocument. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActiveDocumentBytes() { + java.lang.Object ref = activeDocument_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + activeDocument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < contextDocuments_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contextDocuments_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(activeDocument_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, activeDocument_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < contextDocuments_.size(); i++) { + dataSize += computeStringSizeNoTag(contextDocuments_.getRaw(i)); + } + size += dataSize; + size += 1 * getContextDocumentsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(activeDocument_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, activeDocument_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ConversationContext)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ConversationContext other = + (com.google.cloud.discoveryengine.v1alpha.ConversationContext) obj; + + if (!getContextDocumentsList().equals(other.getContextDocumentsList())) return false; + if (!getActiveDocument().equals(other.getActiveDocument())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getContextDocumentsCount() > 0) { + hash = (37 * hash) + CONTEXT_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getContextDocumentsList().hashCode(); + } + hash = (37 * hash) + ACTIVE_DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getActiveDocument().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ConversationContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines context of the conversation
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConversationContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ConversationContext) + com.google.cloud.discoveryengine.v1alpha.ConversationContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConversationContext.class, + com.google.cloud.discoveryengine.v1alpha.ConversationContext.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ConversationContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contextDocuments_ = com.google.protobuf.LazyStringArrayList.emptyList(); + activeDocument_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationContext + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationContext build() { + com.google.cloud.discoveryengine.v1alpha.ConversationContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationContext buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ConversationContext result = + new com.google.cloud.discoveryengine.v1alpha.ConversationContext(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ConversationContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + contextDocuments_.makeImmutable(); + result.contextDocuments_ = contextDocuments_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.activeDocument_ = activeDocument_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ConversationContext) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ConversationContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ConversationContext other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ConversationContext.getDefaultInstance()) + return this; + if (!other.contextDocuments_.isEmpty()) { + if (contextDocuments_.isEmpty()) { + contextDocuments_ = other.contextDocuments_; + bitField0_ |= 0x00000001; + } else { + ensureContextDocumentsIsMutable(); + contextDocuments_.addAll(other.contextDocuments_); + } + onChanged(); + } + if (!other.getActiveDocument().isEmpty()) { + activeDocument_ = other.activeDocument_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureContextDocumentsIsMutable(); + contextDocuments_.add(s); + break; + } // case 10 + case 18: + { + activeDocument_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList contextDocuments_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureContextDocumentsIsMutable() { + if (!contextDocuments_.isModifiable()) { + contextDocuments_ = new com.google.protobuf.LazyStringArrayList(contextDocuments_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @return A list containing the contextDocuments. + */ + public com.google.protobuf.ProtocolStringList getContextDocumentsList() { + contextDocuments_.makeImmutable(); + return contextDocuments_; + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @return The count of contextDocuments. + */ + public int getContextDocumentsCount() { + return contextDocuments_.size(); + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @param index The index of the element to return. + * @return The contextDocuments at the given index. + */ + public java.lang.String getContextDocuments(int index) { + return contextDocuments_.get(index); + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @param index The index of the value to return. + * @return The bytes of the contextDocuments at the given index. + */ + public com.google.protobuf.ByteString getContextDocumentsBytes(int index) { + return contextDocuments_.getByteString(index); + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @param index The index to set the value at. + * @param value The contextDocuments to set. + * @return This builder for chaining. + */ + public Builder setContextDocuments(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextDocumentsIsMutable(); + contextDocuments_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @param value The contextDocuments to add. + * @return This builder for chaining. + */ + public Builder addContextDocuments(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextDocumentsIsMutable(); + contextDocuments_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @param values The contextDocuments to add. + * @return This builder for chaining. + */ + public Builder addAllContextDocuments(java.lang.Iterable values) { + ensureContextDocumentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contextDocuments_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @return This builder for chaining. + */ + public Builder clearContextDocuments() { + contextDocuments_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The current list of documents the user is seeing.
+     * It contains the document resource references.
+     * 
+ * + * repeated string context_documents = 1; + * + * @param value The bytes of the contextDocuments to add. + * @return This builder for chaining. + */ + public Builder addContextDocumentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureContextDocumentsIsMutable(); + contextDocuments_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object activeDocument_ = ""; + /** + * + * + *
+     * The current active document the user opened.
+     * It contains the document resource reference.
+     * 
+ * + * string active_document = 2; + * + * @return The activeDocument. + */ + public java.lang.String getActiveDocument() { + java.lang.Object ref = activeDocument_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + activeDocument_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The current active document the user opened.
+     * It contains the document resource reference.
+     * 
+ * + * string active_document = 2; + * + * @return The bytes for activeDocument. + */ + public com.google.protobuf.ByteString getActiveDocumentBytes() { + java.lang.Object ref = activeDocument_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + activeDocument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The current active document the user opened.
+     * It contains the document resource reference.
+     * 
+ * + * string active_document = 2; + * + * @param value The activeDocument to set. + * @return This builder for chaining. + */ + public Builder setActiveDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + activeDocument_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The current active document the user opened.
+     * It contains the document resource reference.
+     * 
+ * + * string active_document = 2; + * + * @return This builder for chaining. + */ + public Builder clearActiveDocument() { + activeDocument_ = getDefaultInstance().getActiveDocument(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The current active document the user opened.
+     * It contains the document resource reference.
+     * 
+ * + * string active_document = 2; + * + * @param value The bytes for activeDocument to set. + * @return This builder for chaining. + */ + public Builder setActiveDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + activeDocument_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ConversationContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ConversationContext) + private static final com.google.cloud.discoveryengine.v1alpha.ConversationContext + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ConversationContext(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversationContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationContextOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationContextOrBuilder.java new file mode 100644 index 000000000000..2f652a9069ec --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationContextOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ConversationContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ConversationContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @return A list containing the contextDocuments. + */ + java.util.List getContextDocumentsList(); + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @return The count of contextDocuments. + */ + int getContextDocumentsCount(); + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @param index The index of the element to return. + * @return The contextDocuments at the given index. + */ + java.lang.String getContextDocuments(int index); + /** + * + * + *
+   * The current list of documents the user is seeing.
+   * It contains the document resource references.
+   * 
+ * + * repeated string context_documents = 1; + * + * @param index The index of the value to return. + * @return The bytes of the contextDocuments at the given index. + */ + com.google.protobuf.ByteString getContextDocumentsBytes(int index); + + /** + * + * + *
+   * The current active document the user opened.
+   * It contains the document resource reference.
+   * 
+ * + * string active_document = 2; + * + * @return The activeDocument. + */ + java.lang.String getActiveDocument(); + /** + * + * + *
+   * The current active document the user opened.
+   * It contains the document resource reference.
+   * 
+ * + * string active_document = 2; + * + * @return The bytes for activeDocument. + */ + com.google.protobuf.ByteString getActiveDocumentBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationMessage.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationMessage.java new file mode 100644 index 000000000000..68d43c57fe5e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationMessage.java @@ -0,0 +1,1399 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Defines a conversation message.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConversationMessage} + */ +public final class ConversationMessage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ConversationMessage) + ConversationMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConversationMessage.newBuilder() to construct. + private ConversationMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConversationMessage() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConversationMessage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.class, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder.class); + } + + private int messageCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object message_; + + public enum MessageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_INPUT(1), + REPLY(2), + MESSAGE_NOT_SET(0); + private final int value; + + private MessageCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MessageCase valueOf(int value) { + return forNumber(value); + } + + public static MessageCase forNumber(int value) { + switch (value) { + case 1: + return USER_INPUT; + case 2: + return REPLY; + case 0: + return MESSAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MessageCase getMessageCase() { + return MessageCase.forNumber(messageCase_); + } + + public static final int USER_INPUT_FIELD_NUMBER = 1; + /** + * + * + *
+   * User text input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + @java.lang.Override + public boolean hasUserInput() { + return messageCase_ == 1; + } + /** + * + * + *
+   * User text input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + * + * @return The userInput. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInput getUserInput() { + if (messageCase_ == 1) { + return (com.google.cloud.discoveryengine.v1alpha.TextInput) message_; + } + return com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance(); + } + /** + * + * + *
+   * User text input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder getUserInputOrBuilder() { + if (messageCase_ == 1) { + return (com.google.cloud.discoveryengine.v1alpha.TextInput) message_; + } + return com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance(); + } + + public static final int REPLY_FIELD_NUMBER = 2; + /** + * + * + *
+   * Search reply.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + * + * @return Whether the reply field is set. + */ + @java.lang.Override + public boolean hasReply() { + return messageCase_ == 2; + } + /** + * + * + *
+   * Search reply.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + * + * @return The reply. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply getReply() { + if (messageCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Reply) message_; + } + return com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance(); + } + /** + * + * + *
+   * Search reply.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder getReplyOrBuilder() { + if (messageCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Reply) message_; + } + return com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Message creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Message creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Message creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (messageCase_ == 1) { + output.writeMessage(1, (com.google.cloud.discoveryengine.v1alpha.TextInput) message_); + } + if (messageCase_ == 2) { + output.writeMessage(2, (com.google.cloud.discoveryengine.v1alpha.Reply) message_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (messageCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.discoveryengine.v1alpha.TextInput) message_); + } + if (messageCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.discoveryengine.v1alpha.Reply) message_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ConversationMessage)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ConversationMessage other = + (com.google.cloud.discoveryengine.v1alpha.ConversationMessage) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getMessageCase().equals(other.getMessageCase())) return false; + switch (messageCase_) { + case 1: + if (!getUserInput().equals(other.getUserInput())) return false; + break; + case 2: + if (!getReply().equals(other.getReply())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + switch (messageCase_) { + case 1: + hash = (37 * hash) + USER_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getUserInput().hashCode(); + break; + case 2: + hash = (37 * hash) + REPLY_FIELD_NUMBER; + hash = (53 * hash) + getReply().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines a conversation message.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConversationMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ConversationMessage) + com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.class, + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ConversationMessage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userInputBuilder_ != null) { + userInputBuilder_.clear(); + } + if (replyBuilder_ != null) { + replyBuilder_.clear(); + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + messageCase_ = 0; + message_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage build() { + com.google.cloud.discoveryengine.v1alpha.ConversationMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ConversationMessage result = + new com.google.cloud.discoveryengine.v1alpha.ConversationMessage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.ConversationMessage result) { + result.messageCase_ = messageCase_; + result.message_ = this.message_; + if (messageCase_ == 1 && userInputBuilder_ != null) { + result.message_ = userInputBuilder_.build(); + } + if (messageCase_ == 2 && replyBuilder_ != null) { + result.message_ = replyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ConversationMessage) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ConversationMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ConversationMessage other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ConversationMessage.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + switch (other.getMessageCase()) { + case USER_INPUT: + { + mergeUserInput(other.getUserInput()); + break; + } + case REPLY: + { + mergeReply(other.getReply()); + break; + } + case MESSAGE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUserInputFieldBuilder().getBuilder(), extensionRegistry); + messageCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getReplyFieldBuilder().getBuilder(), extensionRegistry); + messageCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int messageCase_ = 0; + private java.lang.Object message_; + + public MessageCase getMessageCase() { + return MessageCase.forNumber(messageCase_); + } + + public Builder clearMessage() { + messageCase_ = 0; + message_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TextInput, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder, + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder> + userInputBuilder_; + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + @java.lang.Override + public boolean hasUserInput() { + return messageCase_ == 1; + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + * + * @return The userInput. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInput getUserInput() { + if (userInputBuilder_ == null) { + if (messageCase_ == 1) { + return (com.google.cloud.discoveryengine.v1alpha.TextInput) message_; + } + return com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance(); + } else { + if (messageCase_ == 1) { + return userInputBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance(); + } + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + public Builder setUserInput(com.google.cloud.discoveryengine.v1alpha.TextInput value) { + if (userInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + userInputBuilder_.setMessage(value); + } + messageCase_ = 1; + return this; + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + public Builder setUserInput( + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder builderForValue) { + if (userInputBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + userInputBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 1; + return this; + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + public Builder mergeUserInput(com.google.cloud.discoveryengine.v1alpha.TextInput value) { + if (userInputBuilder_ == null) { + if (messageCase_ == 1 + && message_ + != com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance()) { + message_ = + com.google.cloud.discoveryengine.v1alpha.TextInput.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.TextInput) message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 1) { + userInputBuilder_.mergeFrom(value); + } else { + userInputBuilder_.setMessage(value); + } + } + messageCase_ = 1; + return this; + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + public Builder clearUserInput() { + if (userInputBuilder_ == null) { + if (messageCase_ == 1) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 1) { + messageCase_ = 0; + message_ = null; + } + userInputBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.TextInput.Builder getUserInputBuilder() { + return getUserInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder getUserInputOrBuilder() { + if ((messageCase_ == 1) && (userInputBuilder_ != null)) { + return userInputBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 1) { + return (com.google.cloud.discoveryengine.v1alpha.TextInput) message_; + } + return com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance(); + } + } + /** + * + * + *
+     * User text input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TextInput, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder, + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder> + getUserInputFieldBuilder() { + if (userInputBuilder_ == null) { + if (!(messageCase_ == 1)) { + message_ = com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance(); + } + userInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TextInput, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder, + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.TextInput) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 1; + onChanged(); + return userInputBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder, + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder> + replyBuilder_; + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + * + * @return Whether the reply field is set. + */ + @java.lang.Override + public boolean hasReply() { + return messageCase_ == 2; + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + * + * @return The reply. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply getReply() { + if (replyBuilder_ == null) { + if (messageCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Reply) message_; + } + return com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance(); + } else { + if (messageCase_ == 2) { + return replyBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance(); + } + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + public Builder setReply(com.google.cloud.discoveryengine.v1alpha.Reply value) { + if (replyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + onChanged(); + } else { + replyBuilder_.setMessage(value); + } + messageCase_ = 2; + return this; + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + public Builder setReply( + com.google.cloud.discoveryengine.v1alpha.Reply.Builder builderForValue) { + if (replyBuilder_ == null) { + message_ = builderForValue.build(); + onChanged(); + } else { + replyBuilder_.setMessage(builderForValue.build()); + } + messageCase_ = 2; + return this; + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + public Builder mergeReply(com.google.cloud.discoveryengine.v1alpha.Reply value) { + if (replyBuilder_ == null) { + if (messageCase_ == 2 + && message_ != com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance()) { + message_ = + com.google.cloud.discoveryengine.v1alpha.Reply.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.Reply) message_) + .mergeFrom(value) + .buildPartial(); + } else { + message_ = value; + } + onChanged(); + } else { + if (messageCase_ == 2) { + replyBuilder_.mergeFrom(value); + } else { + replyBuilder_.setMessage(value); + } + } + messageCase_ = 2; + return this; + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + public Builder clearReply() { + if (replyBuilder_ == null) { + if (messageCase_ == 2) { + messageCase_ = 0; + message_ = null; + onChanged(); + } + } else { + if (messageCase_ == 2) { + messageCase_ = 0; + message_ = null; + } + replyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Reply.Builder getReplyBuilder() { + return getReplyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder getReplyOrBuilder() { + if ((messageCase_ == 2) && (replyBuilder_ != null)) { + return replyBuilder_.getMessageOrBuilder(); + } else { + if (messageCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Reply) message_; + } + return com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance(); + } + } + /** + * + * + *
+     * Search reply.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder, + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder> + getReplyFieldBuilder() { + if (replyBuilder_ == null) { + if (!(messageCase_ == 2)) { + message_ = com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance(); + } + replyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder, + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.Reply) message_, + getParentForChildren(), + isClean()); + message_ = null; + } + messageCase_ = 2; + onChanged(); + return replyBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Message creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ConversationMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ConversationMessage) + private static final com.google.cloud.discoveryengine.v1alpha.ConversationMessage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ConversationMessage(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConversationMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversationMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationMessageOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationMessageOrBuilder.java new file mode 100644 index 000000000000..d60e50d3b185 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationMessageOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ConversationMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ConversationMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * User text input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + * + * @return Whether the userInput field is set. + */ + boolean hasUserInput(); + /** + * + * + *
+   * User text input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + * + * @return The userInput. + */ + com.google.cloud.discoveryengine.v1alpha.TextInput getUserInput(); + /** + * + * + *
+   * User text input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TextInput user_input = 1; + */ + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder getUserInputOrBuilder(); + + /** + * + * + *
+   * Search reply.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + * + * @return Whether the reply field is set. + */ + boolean hasReply(); + /** + * + * + *
+   * Search reply.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + * + * @return The reply. + */ + com.google.cloud.discoveryengine.v1alpha.Reply getReply(); + /** + * + * + *
+   * Search reply.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 2; + */ + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder getReplyOrBuilder(); + + /** + * + * + *
+   * Output only. Message creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Message creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Message creation timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + com.google.cloud.discoveryengine.v1alpha.ConversationMessage.MessageCase getMessageCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationName.java new file mode 100644 index 000000000000..1d0cdd295228 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationName.java @@ -0,0 +1,432 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ConversationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_STORE_CONVERSATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_DATA_STORE_CONVERSATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String dataStore; + private final String conversation; + private final String collection; + + @Deprecated + protected ConversationName() { + project = null; + location = null; + dataStore = null; + conversation = null; + collection = null; + } + + private ConversationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + conversation = Preconditions.checkNotNull(builder.getConversation()); + collection = null; + pathTemplate = PROJECT_LOCATION_DATA_STORE_CONVERSATION; + } + + private ConversationName(ProjectLocationCollectionDataStoreConversationBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + conversation = Preconditions.checkNotNull(builder.getConversation()); + pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE_CONVERSATION; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getConversation() { + return conversation; + } + + public String getCollection() { + return collection; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationDataStoreConversationBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionDataStoreConversationBuilder + newProjectLocationCollectionDataStoreConversationBuilder() { + return new ProjectLocationCollectionDataStoreConversationBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ConversationName of( + String project, String location, String dataStore, String conversation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setConversation(conversation) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ConversationName ofProjectLocationDataStoreConversationName( + String project, String location, String dataStore, String conversation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setConversation(conversation) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ConversationName ofProjectLocationCollectionDataStoreConversationName( + String project, String location, String collection, String dataStore, String conversation) { + return newProjectLocationCollectionDataStoreConversationBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setConversation(conversation) + .build(); + } + + public static String format( + String project, String location, String dataStore, String conversation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setConversation(conversation) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDataStoreConversationName( + String project, String location, String dataStore, String conversation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setConversation(conversation) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionDataStoreConversationName( + String project, String location, String collection, String dataStore, String conversation) { + return newProjectLocationCollectionDataStoreConversationBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setConversation(conversation) + .build() + .toString(); + } + + public static ConversationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_DATA_STORE_CONVERSATION.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_DATA_STORE_CONVERSATION.match(formattedString); + return ofProjectLocationDataStoreConversationName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("data_store"), + matchMap.get("conversation")); + } else if (PROJECT_LOCATION_COLLECTION_DATA_STORE_CONVERSATION.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_COLLECTION_DATA_STORE_CONVERSATION.match(formattedString); + return ofProjectLocationCollectionDataStoreConversationName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("data_store"), + matchMap.get("conversation")); + } + throw new ValidationException("ConversationName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ConversationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_STORE_CONVERSATION.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_DATA_STORE_CONVERSATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataStore != null) { + fieldMapBuilder.put("data_store", dataStore); + } + if (conversation != null) { + fieldMapBuilder.put("conversation", conversation); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ConversationName that = ((ConversationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataStore, that.dataStore) + && Objects.equals(this.conversation, that.conversation) + && Objects.equals(this.collection, that.collection); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataStore); + h *= 1000003; + h ^= Objects.hashCode(conversation); + h *= 1000003; + h ^= Objects.hashCode(collection); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}. + */ + public static class Builder { + private String project; + private String location; + private String dataStore; + private String conversation; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getConversation() { + return conversation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public Builder setConversation(String conversation) { + this.conversation = conversation; + return this; + } + + private Builder(ConversationName conversationName) { + Preconditions.checkArgument( + Objects.equals(conversationName.pathTemplate, PROJECT_LOCATION_DATA_STORE_CONVERSATION), + "toBuilder is only supported when ConversationName has the pattern of projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}"); + this.project = conversationName.project; + this.location = conversationName.location; + this.dataStore = conversationName.dataStore; + this.conversation = conversationName.conversation; + } + + public ConversationName build() { + return new ConversationName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionDataStoreConversationBuilder { + private String project; + private String location; + private String collection; + private String dataStore; + private String conversation; + + protected ProjectLocationCollectionDataStoreConversationBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getDataStore() { + return dataStore; + } + + public String getConversation() { + return conversation; + } + + public ProjectLocationCollectionDataStoreConversationBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionDataStoreConversationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionDataStoreConversationBuilder setCollection(String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionDataStoreConversationBuilder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public ProjectLocationCollectionDataStoreConversationBuilder setConversation( + String conversation) { + this.conversation = conversation; + return this; + } + + public ConversationName build() { + return new ConversationName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationOrBuilder.java new file mode 100644 index 000000000000..524622f3e4ed --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationOrBuilder.java @@ -0,0 +1,231 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ConversationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Conversation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. Fully qualified name
+   * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. Fully qualified name
+   * `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The state of the Conversation.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The state of the Conversation.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation.State state = 2; + * + * @return The state. + */ + com.google.cloud.discoveryengine.v1alpha.Conversation.State getState(); + + /** + * + * + *
+   * A unique identifier for tracking users.
+   * 
+ * + * string user_pseudo_id = 3; + * + * @return The userPseudoId. + */ + java.lang.String getUserPseudoId(); + /** + * + * + *
+   * A unique identifier for tracking users.
+   * 
+ * + * string user_pseudo_id = 3; + * + * @return The bytes for userPseudoId. + */ + com.google.protobuf.ByteString getUserPseudoIdBytes(); + + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + java.util.List getMessagesList(); + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + com.google.cloud.discoveryengine.v1alpha.ConversationMessage getMessages(int index); + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + int getMessagesCount(); + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + java.util.List + getMessagesOrBuilderList(); + /** + * + * + *
+   * Conversation messages.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.ConversationMessage messages = 4; + */ + com.google.cloud.discoveryengine.v1alpha.ConversationMessageOrBuilder getMessagesOrBuilder( + int index); + + /** + * + * + *
+   * Output only. The time the conversation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. The time the conversation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. The time the conversation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the conversation finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the conversation finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the conversation finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationProto.java new file mode 100644 index 000000000000..5ca3b96d47eb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationProto.java @@ -0,0 +1,183 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class ConversationProto { + private ConversationProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Conversation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Conversation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Reply_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Reply_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_TextInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_TextInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/cloud/discoveryengine/v1alpha/c" + + "onversation.proto\022$google.cloud.discover" + + "yengine.v1alpha\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\0329goo" + + "gle/cloud/discoveryengine/v1alpha/search" + + "_service.proto\032\037google/protobuf/timestam" + + "p.proto\"\203\005\n\014Conversation\022\022\n\004name\030\001 \001(\tB\004" + + "\342A\001\005\022G\n\005state\030\002 \001(\01628.google.cloud.disco" + + "veryengine.v1alpha.Conversation.State\022\026\n" + + "\016user_pseudo_id\030\003 \001(\t\022K\n\010messages\030\004 \003(\0132" + + "9.google.cloud.discoveryengine.v1alpha.C" + + "onversationMessage\0224\n\nstart_time\030\005 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\0222\n\010end_" + + "time\030\006 \001(\0132\032.google.protobuf.TimestampB\004" + + "\342A\001\003\">\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\017\n\013" + + "IN_PROGRESS\020\001\022\r\n\tCOMPLETED\020\002:\206\002\352A\202\002\n+dis" + + "coveryengine.googleapis.com/Conversation" + + "\022\\projects/{project}/locations/{location" + + "}/dataStores/{data_store}/conversations/" + + "{conversation}\022uprojects/{project}/locat" + + "ions/{location}/collections/{collection}" + + "/dataStores/{data_store}/conversations/{" + + "conversation}\"\207\002\n\005Reply\022\021\n\005reply\030\001 \001(\tB\002" + + "\030\001\022M\n\nreferences\030\002 \003(\01325.google.cloud.di" + + "scoveryengine.v1alpha.Reply.ReferenceB\002\030" + + "\001\022M\n\007summary\030\003 \001(\0132<.google.cloud.discov" + + "eryengine.v1alpha.SearchResponse.Summary" + + "\032M\n\tReference\022\013\n\003uri\030\001 \001(\t\022\023\n\013anchor_tex" + + "t\030\002 \001(\t\022\r\n\005start\030\003 \001(\005\022\013\n\003end\030\004 \001(\005:\002\030\001\"" + + "I\n\023ConversationContext\022\031\n\021context_docume" + + "nts\030\001 \003(\t\022\027\n\017active_document\030\002 \001(\t\"f\n\tTe" + + "xtInput\022\r\n\005input\030\001 \001(\t\022J\n\007context\030\002 \001(\0132" + + "9.google.cloud.discoveryengine.v1alpha.C" + + "onversationContext\"\334\001\n\023ConversationMessa" + + "ge\022E\n\nuser_input\030\001 \001(\0132/.google.cloud.di" + + "scoveryengine.v1alpha.TextInputH\000\022<\n\005rep" + + "ly\030\002 \001(\0132+.google.cloud.discoveryengine." + + "v1alpha.ReplyH\000\0225\n\013create_time\030\003 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\004\342A\001\003B\t\n\007messag" + + "eB\235\002\n(com.google.cloud.discoveryengine.v" + + "1alphaB\021ConversationProtoP\001ZRcloud.googl" + + "e.com/go/discoveryengine/apiv1alpha/disc" + + "overyenginepb;discoveryenginepb\242\002\017DISCOV" + + "ERYENGINE\252\002$Google.Cloud.DiscoveryEngine" + + ".V1Alpha\312\002$Google\\Cloud\\DiscoveryEngine\\" + + "V1alpha\352\002\'Google::Cloud::DiscoveryEngine" + + "::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.SearchServiceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_Conversation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_Conversation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Conversation_descriptor, + new java.lang.String[] { + "Name", "State", "UserPseudoId", "Messages", "StartTime", "EndTime", + }); + internal_static_google_cloud_discoveryengine_v1alpha_Reply_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_Reply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Reply_descriptor, + new java.lang.String[] { + "Reply", "References", "Summary", + }); + internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_Reply_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_descriptor, + new java.lang.String[] { + "Uri", "AnchorText", "Start", "End", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ConversationContext_descriptor, + new java.lang.String[] { + "ContextDocuments", "ActiveDocument", + }); + internal_static_google_cloud_discoveryengine_v1alpha_TextInput_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_TextInput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_TextInput_descriptor, + new java.lang.String[] { + "Input", "Context", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ConversationMessage_descriptor, + new java.lang.String[] { + "UserInput", "Reply", "CreateTime", "Message", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.SearchServiceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceProto.java new file mode 100644 index 000000000000..294108e05f6b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConversationalSearchServiceProto.java @@ -0,0 +1,304 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class ConversationalSearchServiceProto { + private ConversationalSearchServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_UserLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_UserLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nHgoogle/cloud/discoveryengine/v1alpha/c" + + "onversational_search_service.proto\022$goog" + + "le.cloud.discoveryengine.v1alpha\032\034google" + + "/api/annotations.proto\032\027google/api/clien" + + "t.proto\032\037google/api/field_behavior.proto" + + "\032\031google/api/resource.proto\0327google/clou" + + "d/discoveryengine/v1alpha/conversation.p" + + "roto\0329google/cloud/discoveryengine/v1alp" + + "ha/search_service.proto\032\033google/protobuf" + + "/empty.proto\032 google/protobuf/field_mask" + + ".proto\"\325\004\n\033ConverseConversationRequest\022B" + + "\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+discoveryengine.g" + + "oogleapis.com/Conversation\022D\n\005query\030\002 \001(" + + "\0132/.google.cloud.discoveryengine.v1alpha" + + ".TextInputB\004\342A\001\002\022I\n\016serving_config\030\003 \001(\t" + + "B1\372A.\n,discoveryengine.googleapis.com/Se" + + "rvingConfig\022H\n\014conversation\030\005 \001(\01322.goog" + + "le.cloud.discoveryengine.v1alpha.Convers" + + "ation\022\023\n\013safe_search\030\006 \001(\010\022f\n\013user_label" + + "s\030\007 \003(\0132Q.google.cloud.discoveryengine.v" + + "1alpha.ConverseConversationRequest.UserL" + + "abelsEntry\022g\n\014summary_spec\030\010 \001(\0132Q.googl" + + "e.cloud.discoveryengine.v1alpha.SearchRe" + + "quest.ContentSearchSpec.SummarySpec\0321\n\017U" + + "serLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\"\232\002\n\034ConverseConversationResponse\022" + + ":\n\005reply\030\001 \001(\0132+.google.cloud.discoverye" + + "ngine.v1alpha.Reply\022H\n\014conversation\030\002 \001(" + + "\01322.google.cloud.discoveryengine.v1alpha" + + ".Conversation\022\031\n\021related_questions\030\006 \003(\t" + + "\022Y\n\016search_results\030\003 \003(\0132A.google.cloud." + + "discoveryengine.v1alpha.SearchResponse.S" + + "earchResult\"\256\001\n\031CreateConversationReques" + + "t\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\n(discoveryeng" + + "ine.googleapis.com/DataStore\022N\n\014conversa" + + "tion\030\002 \001(\01322.google.cloud.discoveryengin" + + "e.v1alpha.ConversationB\004\342A\001\002\"\234\001\n\031UpdateC" + + "onversationRequest\022N\n\014conversation\030\001 \001(\013" + + "22.google.cloud.discoveryengine.v1alpha." + + "ConversationB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132" + + "\032.google.protobuf.FieldMask\"_\n\031DeleteCon" + + "versationRequest\022B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n" + + "+discoveryengine.googleapis.com/Conversa" + + "tion\"\\\n\026GetConversationRequest\022B\n\004name\030\001" + + " \001(\tB4\342A\001\002\372A-\n+discoveryengine.googleapi" + + "s.com/Conversation\"\246\001\n\030ListConversations" + + "Request\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\n(discov" + + "eryengine.googleapis.com/DataStore\022\021\n\tpa" + + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fil" + + "ter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\177\n\031ListConve" + + "rsationsResponse\022I\n\rconversations\030\001 \003(\0132" + + "2.google.cloud.discoveryengine.v1alpha.C" + + "onversation\022\027\n\017next_page_token\030\002 \001(\t2\315\020\n" + + "\033ConversationalSearchService\022\346\002\n\024Convers" + + "eConversation\022A.google.cloud.discoveryen" + + "gine.v1alpha.ConverseConversationRequest" + + "\032B.google.cloud.discoveryengine.v1alpha." + + "ConverseConversationResponse\"\306\001\332A\nname,q" + + "uery\202\323\344\223\002\262\001\"L/v1alpha/{name=projects/*/l" + + "ocations/*/dataStores/*/conversations/*}" + + ":converse:\001*Z_\"Z/v1alpha/{name=projects/" + + "*/locations/*/collections/*/dataStores/*" + + "/conversations/*}:converse:\001*\022\337\002\n\022Create" + + "Conversation\022?.google.cloud.discoveryeng" + + "ine.v1alpha.CreateConversationRequest\0322." + + "google.cloud.discoveryengine.v1alpha.Con" + + "versation\"\323\001\332A\023parent,conversation\202\323\344\223\002\266" + + "\001\"C/v1alpha/{parent=projects/*/locations" + + "/*/dataStores/*}/conversations:\014conversa" + + "tionZa\"Q/v1alpha/{parent=projects/*/loca" + + "tions/*/collections/*/dataStores/*}/conv" + + "ersations:\014conversation\022\230\002\n\022DeleteConver" + + "sation\022?.google.cloud.discoveryengine.v1" + + "alpha.DeleteConversationRequest\032\026.google" + + ".protobuf.Empty\"\250\001\332A\004name\202\323\344\223\002\232\001*C/v1alp" + + "ha/{name=projects/*/locations/*/dataStor" + + "es/*/conversations/*}ZS*Q/v1alpha/{name=" + + "projects/*/locations/*/collections/*/dat" + + "aStores/*/conversations/*}\022\376\002\n\022UpdateCon" + + "versation\022?.google.cloud.discoveryengine" + + ".v1alpha.UpdateConversationRequest\0322.goo" + + "gle.cloud.discoveryengine.v1alpha.Conver" + + "sation\"\362\001\332A\030conversation,update_mask\202\323\344\223" + + "\002\320\0012P/v1alpha/{conversation.name=project" + + "s/*/locations/*/dataStores/*/conversatio" + + "ns/*}:\014conversationZn2^/v1alpha/{convers" + + "ation.name=projects/*/locations/*/collec" + + "tions/*/dataStores/*/conversations/*}:\014c" + + "onversation\022\256\002\n\017GetConversation\022<.google" + + ".cloud.discoveryengine.v1alpha.GetConver" + + "sationRequest\0322.google.cloud.discoveryen" + + "gine.v1alpha.Conversation\"\250\001\332A\004name\202\323\344\223\002" + + "\232\001\022C/v1alpha/{name=projects/*/locations/" + + "*/dataStores/*/conversations/*}ZS\022Q/v1al" + + "pha/{name=projects/*/locations/*/collect" + + "ions/*/dataStores/*/conversations/*}\022\301\002\n" + + "\021ListConversations\022>.google.cloud.discov" + + "eryengine.v1alpha.ListConversationsReque" + + "st\032?.google.cloud.discoveryengine.v1alph" + + "a.ListConversationsResponse\"\252\001\332A\006parent\202" + + "\323\344\223\002\232\001\022C/v1alpha/{parent=projects/*/loca" + + "tions/*/dataStores/*}/conversationsZS\022Q/" + + "v1alpha/{parent=projects/*/locations/*/c" + + "ollections/*/dataStores/*}/conversations" + + "\032R\312A\036discoveryengine.googleapis.com\322A.ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "formB\254\002\n(com.google.cloud.discoveryengin" + + "e.v1alphaB ConversationalSearchServicePr" + + "otoP\001ZRcloud.google.com/go/discoveryengi" + + "ne/apiv1alpha/discoveryenginepb;discover" + + "yenginepb\242\002\017DISCOVERYENGINE\252\002$Google.Clo" + + "ud.DiscoveryEngine.V1Alpha\312\002$Google\\Clou" + + "d\\DiscoveryEngine\\V1alpha\352\002\'Google::Clou" + + "d::DiscoveryEngine::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.ConversationProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.SearchServiceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_descriptor, + new java.lang.String[] { + "Name", + "Query", + "ServingConfig", + "Conversation", + "SafeSearch", + "UserLabels", + "SummarySpec", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_UserLabelsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_UserLabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_UserLabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_descriptor, + new java.lang.String[] { + "Reply", "Conversation", "RelatedQuestions", "SearchResults", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_descriptor, + new java.lang.String[] { + "Parent", "Conversation", + }); + internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_descriptor, + new java.lang.String[] { + "Conversation", "UpdateMask", + }); + internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_descriptor, + new java.lang.String[] { + "Conversations", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.ConversationProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.SearchServiceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationRequest.java new file mode 100644 index 000000000000..69d2fc1342a2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationRequest.java @@ -0,0 +1,2387 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConverseConversationRequest} + */ +public final class ConverseConversationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) + ConverseConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConverseConversationRequest.newBuilder() to construct. + private ConverseConversationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConverseConversationRequest() { + name_ = ""; + servingConfig_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConverseConversationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+   * Use
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+   * to activate auto session mode, which automatically creates a new
+   * conversation inside a ConverseConversation session.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+   * Use
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+   * to activate auto session mode, which automatically creates a new
+   * conversation inside a ConverseConversation session.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.TextInput query_; + /** + * + * + *
+   * Required. Current user input.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return query_ != null; + } + /** + * + * + *
+   * Required. Current user input.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInput getQuery() { + return query_ == null + ? com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance() + : query_; + } + /** + * + * + *
+   * Required. Current user input.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder getQueryOrBuilder() { + return query_ == null + ? com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance() + : query_; + } + + public static final int SERVING_CONFIG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object servingConfig_ = ""; + /** + * + * + *
+   * The resource name of the Serving Config to use. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+   * If this is not set, the default serving config will be used.
+   * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @return The servingConfig. + */ + @java.lang.Override + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfig_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the Serving Config to use. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+   * If this is not set, the default serving config will be used.
+   * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for servingConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + /** + * + * + *
+   * The conversation to be used by auto session only. The name field will be
+   * ignored as we automatically assign new name for the conversation in auto
+   * session.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + * + * @return Whether the conversation field is set. + */ + @java.lang.Override + public boolean hasConversation() { + return conversation_ != null; + } + /** + * + * + *
+   * The conversation to be used by auto session only. The name field will be
+   * ignored as we automatically assign new name for the conversation in auto
+   * session.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + * + * @return The conversation. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + /** + * + * + *
+   * The conversation to be used by auto session only. The name field will be
+   * ignored as we automatically assign new name for the conversation in auto
+   * session.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + + public static final int SAFE_SEARCH_FIELD_NUMBER = 6; + private boolean safeSearch_ = false; + /** + * + * + *
+   * Whether to turn on safe search.
+   * 
+ * + * bool safe_search = 6; + * + * @return The safeSearch. + */ + @java.lang.Override + public boolean getSafeSearch() { + return safeSearch_; + } + + public static final int USER_LABELS_FIELD_NUMBER = 7; + + private static final class UserLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_UserLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SUMMARY_SPEC_FIELD_NUMBER = 8; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + summarySpec_; + /** + * + * + *
+   * A specification for configuring the summary returned in the response.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + * + * @return Whether the summarySpec field is set. + */ + @java.lang.Override + public boolean hasSummarySpec() { + return summarySpec_ != null; + } + /** + * + * + *
+   * A specification for configuring the summary returned in the response.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + * + * @return The summarySpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec() { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } + /** + * + * + *
+   * A specification for configuring the summary returned in the response.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder + getSummarySpecOrBuilder() { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (query_ != null) { + output.writeMessage(2, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfig_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, servingConfig_); + } + if (conversation_ != null) { + output.writeMessage(5, getConversation()); + } + if (safeSearch_ != false) { + output.writeBool(6, safeSearch_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 7); + if (summarySpec_ != null) { + output.writeMessage(8, getSummarySpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (query_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfig_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, servingConfig_); + } + if (conversation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getConversation()); + } + if (safeSearch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, safeSearch_); + } + for (java.util.Map.Entry entry : + internalGetUserLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry userLabels__ = + UserLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, userLabels__); + } + if (summarySpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSummarySpec()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest other = + (com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (!getServingConfig().equals(other.getServingConfig())) return false; + if (hasConversation() != other.hasConversation()) return false; + if (hasConversation()) { + if (!getConversation().equals(other.getConversation())) return false; + } + if (getSafeSearch() != other.getSafeSearch()) return false; + if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false; + if (hasSummarySpec() != other.hasSummarySpec()) return false; + if (hasSummarySpec()) { + if (!getSummarySpec().equals(other.getSummarySpec())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (37 * hash) + SERVING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServingConfig().hashCode(); + if (hasConversation()) { + hash = (37 * hash) + CONVERSATION_FIELD_NUMBER; + hash = (53 * hash) + getConversation().hashCode(); + } + hash = (37 * hash) + SAFE_SEARCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSafeSearch()); + if (!internalGetUserLabels().getMap().isEmpty()) { + hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetUserLabels().hashCode(); + } + if (hasSummarySpec()) { + hash = (37 * hash) + SUMMARY_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSummarySpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConverseConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + return internalGetMutableUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + servingConfig_ = ""; + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + safeSearch_ = false; + internalGetMutableUserLabels().clear(); + summarySpec_ = null; + if (summarySpecBuilder_ != null) { + summarySpecBuilder_.dispose(); + summarySpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest build() { + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest result = + new com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = queryBuilder_ == null ? query_ : queryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.servingConfig_ = servingConfig_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.conversation_ = + conversationBuilder_ == null ? conversation_ : conversationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.safeSearch_ = safeSearch_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.userLabels_ = internalGetUserLabels(); + result.userLabels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.summarySpec_ = + summarySpecBuilder_ == null ? summarySpec_ : summarySpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (!other.getServingConfig().isEmpty()) { + servingConfig_ = other.servingConfig_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasConversation()) { + mergeConversation(other.getConversation()); + } + if (other.getSafeSearch() != false) { + setSafeSearch(other.getSafeSearch()); + } + internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); + bitField0_ |= 0x00000020; + if (other.hasSummarySpec()) { + mergeSummarySpec(other.getSummarySpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + servingConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + input.readMessage(getConversationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 48: + { + safeSearch_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 58: + { + com.google.protobuf.MapEntry userLabels__ = + input.readMessage( + UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableUserLabels() + .getMutableMap() + .put(userLabels__.getKey(), userLabels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage(getSummarySpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+     * Use
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+     * to activate auto session mode, which automatically creates a new
+     * conversation inside a ConverseConversation session.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+     * Use
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+     * to activate auto session mode, which automatically creates a new
+     * conversation inside a ConverseConversation session.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+     * Use
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+     * to activate auto session mode, which automatically creates a new
+     * conversation inside a ConverseConversation session.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+     * Use
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+     * to activate auto session mode, which automatically creates a new
+     * conversation inside a ConverseConversation session.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+     * Use
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+     * to activate auto session mode, which automatically creates a new
+     * conversation inside a ConverseConversation session.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.TextInput query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TextInput, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder, + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder> + queryBuilder_; + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + public com.google.cloud.discoveryengine.v1alpha.TextInput getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.discoveryengine.v1alpha.TextInput value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery( + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeQuery(com.google.cloud.discoveryengine.v1alpha.TextInput value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && query_ != null + && query_ != com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000002); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.TextInput.Builder getQueryBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance() + : query_; + } + } + /** + * + * + *
+     * Required. Current user input.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TextInput, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder, + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TextInput, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder, + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + private java.lang.Object servingConfig_ = ""; + /** + * + * + *
+     * The resource name of the Serving Config to use. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+     * If this is not set, the default serving config will be used.
+     * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @return The servingConfig. + */ + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the Serving Config to use. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+     * If this is not set, the default serving config will be used.
+     * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for servingConfig. + */ + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the Serving Config to use. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+     * If this is not set, the default serving config will be used.
+     * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + servingConfig_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the Serving Config to use. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+     * If this is not set, the default serving config will be used.
+     * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearServingConfig() { + servingConfig_ = getDefaultInstance().getServingConfig(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the Serving Config to use. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+     * If this is not set, the default serving config will be used.
+     * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + servingConfig_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + conversationBuilder_; + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + * + * @return Whether the conversation field is set. + */ + public boolean hasConversation() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + * + * @return The conversation. + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + if (conversationBuilder_ == null) { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } else { + return conversationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + public Builder setConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conversation_ = value; + } else { + conversationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + public Builder setConversation( + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder builderForValue) { + if (conversationBuilder_ == null) { + conversation_ = builderForValue.build(); + } else { + conversationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + public Builder mergeConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && conversation_ != null + && conversation_ + != com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance()) { + getConversationBuilder().mergeFrom(value); + } else { + conversation_ = value; + } + } else { + conversationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + public Builder clearConversation() { + bitField0_ = (bitField0_ & ~0x00000008); + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation.Builder getConversationBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getConversationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder + getConversationOrBuilder() { + if (conversationBuilder_ != null) { + return conversationBuilder_.getMessageOrBuilder(); + } else { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + } + /** + * + * + *
+     * The conversation to be used by auto session only. The name field will be
+     * ignored as we automatically assign new name for the conversation in auto
+     * session.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + getConversationFieldBuilder() { + if (conversationBuilder_ == null) { + conversationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder>( + getConversation(), getParentForChildren(), isClean()); + conversation_ = null; + } + return conversationBuilder_; + } + + private boolean safeSearch_; + /** + * + * + *
+     * Whether to turn on safe search.
+     * 
+ * + * bool safe_search = 6; + * + * @return The safeSearch. + */ + @java.lang.Override + public boolean getSafeSearch() { + return safeSearch_; + } + /** + * + * + *
+     * Whether to turn on safe search.
+     * 
+ * + * bool safe_search = 6; + * + * @param value The safeSearch to set. + * @return This builder for chaining. + */ + public Builder setSafeSearch(boolean value) { + + safeSearch_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to turn on safe search.
+     * 
+ * + * bool safe_search = 6; + * + * @return This builder for chaining. + */ + public Builder clearSafeSearch() { + bitField0_ = (bitField0_ & ~0x00000010); + safeSearch_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField + internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableUserLabels() { + if (userLabels_ == null) { + userLabels_ = + com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + if (!userLabels_.isMutable()) { + userLabels_ = userLabels_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 7; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearUserLabels() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableUserLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 7; + */ + public Builder removeUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableUserLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableUserLabels() { + bitField0_ |= 0x00000020; + return internalGetMutableUserLabels().getMutableMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 7; + */ + public Builder putUserLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableUserLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 7; + */ + public Builder putAllUserLabels(java.util.Map values) { + internalGetMutableUserLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + summarySpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder> + summarySpecBuilder_; + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + * + * @return Whether the summarySpec field is set. + */ + public boolean hasSummarySpec() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + * + * @return The summarySpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec() { + if (summarySpecBuilder_ == null) { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } else { + return summarySpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + public Builder setSummarySpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + value) { + if (summarySpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summarySpec_ = value; + } else { + summarySpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + public Builder setSummarySpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.Builder + builderForValue) { + if (summarySpecBuilder_ == null) { + summarySpec_ = builderForValue.build(); + } else { + summarySpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + public Builder mergeSummarySpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + value) { + if (summarySpecBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && summarySpec_ != null + && summarySpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.getDefaultInstance()) { + getSummarySpecBuilder().mergeFrom(value); + } else { + summarySpec_ = value; + } + } else { + summarySpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + public Builder clearSummarySpec() { + bitField0_ = (bitField0_ & ~0x00000040); + summarySpec_ = null; + if (summarySpecBuilder_ != null) { + summarySpecBuilder_.dispose(); + summarySpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder + getSummarySpecBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getSummarySpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder + getSummarySpecOrBuilder() { + if (summarySpecBuilder_ != null) { + return summarySpecBuilder_.getMessageOrBuilder(); + } else { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } + } + /** + * + * + *
+     * A specification for configuring the summary returned in the response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder> + getSummarySpecFieldBuilder() { + if (summarySpecBuilder_ == null) { + summarySpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder>(getSummarySpec(), getParentForChildren(), isClean()); + summarySpec_ = null; + } + return summarySpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) + private static final com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConverseConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationRequestOrBuilder.java new file mode 100644 index 000000000000..555ac4aece2a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationRequestOrBuilder.java @@ -0,0 +1,369 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ConverseConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ConverseConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+   * Use
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+   * to activate auto session mode, which automatically creates a new
+   * conversation inside a ConverseConversation session.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+   * Use
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+   * to activate auto session mode, which automatically creates a new
+   * conversation inside a ConverseConversation session.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Current user input.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * + * + *
+   * Required. Current user input.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + com.google.cloud.discoveryengine.v1alpha.TextInput getQuery(); + /** + * + * + *
+   * Required. Current user input.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.TextInput query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * The resource name of the Serving Config to use. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+   * If this is not set, the default serving config will be used.
+   * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @return The servingConfig. + */ + java.lang.String getServingConfig(); + /** + * + * + *
+   * The resource name of the Serving Config to use. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
+   * If this is not set, the default serving config will be used.
+   * 
+ * + * string serving_config = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for servingConfig. + */ + com.google.protobuf.ByteString getServingConfigBytes(); + + /** + * + * + *
+   * The conversation to be used by auto session only. The name field will be
+   * ignored as we automatically assign new name for the conversation in auto
+   * session.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + * + * @return Whether the conversation field is set. + */ + boolean hasConversation(); + /** + * + * + *
+   * The conversation to be used by auto session only. The name field will be
+   * ignored as we automatically assign new name for the conversation in auto
+   * session.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + * + * @return The conversation. + */ + com.google.cloud.discoveryengine.v1alpha.Conversation getConversation(); + /** + * + * + *
+   * The conversation to be used by auto session only. The name field will be
+   * ignored as we automatically assign new name for the conversation in auto
+   * session.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 5; + */ + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder(); + + /** + * + * + *
+   * Whether to turn on safe search.
+   * 
+ * + * bool safe_search = 6; + * + * @return The safeSearch. + */ + boolean getSafeSearch(); + + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + int getUserLabelsCount(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + boolean containsUserLabels(java.lang.String key); + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getUserLabels(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + java.util.Map getUserLabelsMap(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + /* nullable */ + java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 7; + */ + java.lang.String getUserLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * A specification for configuring the summary returned in the response.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + * + * @return Whether the summarySpec field is set. + */ + boolean hasSummarySpec(); + /** + * + * + *
+   * A specification for configuring the summary returned in the response.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + * + * @return The summarySpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec(); + /** + * + * + *
+   * A specification for configuring the summary returned in the response.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpecOrBuilder + getSummarySpecOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationResponse.java new file mode 100644 index 000000000000..d17ff7a1cc2c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationResponse.java @@ -0,0 +1,1844 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for
+ * [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConverseConversationResponse} + */ +public final class ConverseConversationResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) + ConverseConversationResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConverseConversationResponse.newBuilder() to construct. + private ConverseConversationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConverseConversationResponse() { + relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + searchResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConverseConversationResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse.class, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse.Builder.class); + } + + public static final int REPLY_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1alpha.Reply reply_; + /** + * + * + *
+   * Answer to the current query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + * + * @return Whether the reply field is set. + */ + @java.lang.Override + public boolean hasReply() { + return reply_ != null; + } + /** + * + * + *
+   * Answer to the current query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + * + * @return The reply. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply getReply() { + return reply_ == null + ? com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance() + : reply_; + } + /** + * + * + *
+   * Answer to the current query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder getReplyOrBuilder() { + return reply_ == null + ? com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance() + : reply_; + } + + public static final int CONVERSATION_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + /** + * + * + *
+   * Updated conversation including the answer.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + * + * @return Whether the conversation field is set. + */ + @java.lang.Override + public boolean hasConversation() { + return conversation_ != null; + } + /** + * + * + *
+   * Updated conversation including the answer.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + * + * @return The conversation. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + /** + * + * + *
+   * Updated conversation including the answer.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + + public static final int RELATED_QUESTIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList relatedQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @return A list containing the relatedQuestions. + */ + public com.google.protobuf.ProtocolStringList getRelatedQuestionsList() { + return relatedQuestions_; + } + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @return The count of relatedQuestions. + */ + public int getRelatedQuestionsCount() { + return relatedQuestions_.size(); + } + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @param index The index of the element to return. + * @return The relatedQuestions at the given index. + */ + public java.lang.String getRelatedQuestions(int index) { + return relatedQuestions_.get(index); + } + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedQuestions at the given index. + */ + public com.google.protobuf.ByteString getRelatedQuestionsBytes(int index) { + return relatedQuestions_.getByteString(index); + } + + public static final int SEARCH_RESULTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + searchResults_; + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + @java.lang.Override + public java.util.List + getSearchResultsList() { + return searchResults_; + } + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getSearchResultsOrBuilderList() { + return searchResults_; + } + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + @java.lang.Override + public int getSearchResultsCount() { + return searchResults_.size(); + } + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult getSearchResults( + int index) { + return searchResults_.get(index); + } + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder + getSearchResultsOrBuilder(int index) { + return searchResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (reply_ != null) { + output.writeMessage(1, getReply()); + } + if (conversation_ != null) { + output.writeMessage(2, getConversation()); + } + for (int i = 0; i < searchResults_.size(); i++) { + output.writeMessage(3, searchResults_.get(i)); + } + for (int i = 0; i < relatedQuestions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relatedQuestions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (reply_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReply()); + } + if (conversation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConversation()); + } + for (int i = 0; i < searchResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, searchResults_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < relatedQuestions_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedQuestions_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedQuestionsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse other = + (com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) obj; + + if (hasReply() != other.hasReply()) return false; + if (hasReply()) { + if (!getReply().equals(other.getReply())) return false; + } + if (hasConversation() != other.hasConversation()) return false; + if (hasConversation()) { + if (!getConversation().equals(other.getConversation())) return false; + } + if (!getRelatedQuestionsList().equals(other.getRelatedQuestionsList())) return false; + if (!getSearchResultsList().equals(other.getSearchResultsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReply()) { + hash = (37 * hash) + REPLY_FIELD_NUMBER; + hash = (53 * hash) + getReply().hashCode(); + } + if (hasConversation()) { + hash = (37 * hash) + CONVERSATION_FIELD_NUMBER; + hash = (53 * hash) + getConversation().hashCode(); + } + if (getRelatedQuestionsCount() > 0) { + hash = (37 * hash) + RELATED_QUESTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedQuestionsList().hashCode(); + } + if (getSearchResultsCount() > 0) { + hash = (37 * hash) + SEARCH_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getSearchResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ConverseConversationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse.class, + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + reply_ = null; + if (replyBuilder_ != null) { + replyBuilder_.dispose(); + replyBuilder_ = null; + } + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (searchResultsBuilder_ == null) { + searchResults_ = java.util.Collections.emptyList(); + } else { + searchResults_ = null; + searchResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ConverseConversationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse build() { + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse result = + new com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse result) { + if (searchResultsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + searchResults_ = java.util.Collections.unmodifiableList(searchResults_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.searchResults_ = searchResults_; + } else { + result.searchResults_ = searchResultsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.reply_ = replyBuilder_ == null ? reply_ : replyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conversation_ = + conversationBuilder_ == null ? conversation_ : conversationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + relatedQuestions_.makeImmutable(); + result.relatedQuestions_ = relatedQuestions_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + .getDefaultInstance()) return this; + if (other.hasReply()) { + mergeReply(other.getReply()); + } + if (other.hasConversation()) { + mergeConversation(other.getConversation()); + } + if (!other.relatedQuestions_.isEmpty()) { + if (relatedQuestions_.isEmpty()) { + relatedQuestions_ = other.relatedQuestions_; + bitField0_ |= 0x00000004; + } else { + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.addAll(other.relatedQuestions_); + } + onChanged(); + } + if (searchResultsBuilder_ == null) { + if (!other.searchResults_.isEmpty()) { + if (searchResults_.isEmpty()) { + searchResults_ = other.searchResults_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSearchResultsIsMutable(); + searchResults_.addAll(other.searchResults_); + } + onChanged(); + } + } else { + if (!other.searchResults_.isEmpty()) { + if (searchResultsBuilder_.isEmpty()) { + searchResultsBuilder_.dispose(); + searchResultsBuilder_ = null; + searchResults_ = other.searchResults_; + bitField0_ = (bitField0_ & ~0x00000008); + searchResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSearchResultsFieldBuilder() + : null; + } else { + searchResultsBuilder_.addAllMessages(other.searchResults_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getReplyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getConversationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .parser(), + extensionRegistry); + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(m); + } else { + searchResultsBuilder_.addMessage(m); + } + break; + } // case 26 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1alpha.Reply reply_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder, + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder> + replyBuilder_; + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + * + * @return Whether the reply field is set. + */ + public boolean hasReply() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + * + * @return The reply. + */ + public com.google.cloud.discoveryengine.v1alpha.Reply getReply() { + if (replyBuilder_ == null) { + return reply_ == null + ? com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance() + : reply_; + } else { + return replyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + public Builder setReply(com.google.cloud.discoveryengine.v1alpha.Reply value) { + if (replyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reply_ = value; + } else { + replyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + public Builder setReply( + com.google.cloud.discoveryengine.v1alpha.Reply.Builder builderForValue) { + if (replyBuilder_ == null) { + reply_ = builderForValue.build(); + } else { + replyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + public Builder mergeReply(com.google.cloud.discoveryengine.v1alpha.Reply value) { + if (replyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && reply_ != null + && reply_ != com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance()) { + getReplyBuilder().mergeFrom(value); + } else { + reply_ = value; + } + } else { + replyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + public Builder clearReply() { + bitField0_ = (bitField0_ & ~0x00000001); + reply_ = null; + if (replyBuilder_ != null) { + replyBuilder_.dispose(); + replyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Reply.Builder getReplyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getReplyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder getReplyOrBuilder() { + if (replyBuilder_ != null) { + return replyBuilder_.getMessageOrBuilder(); + } else { + return reply_ == null + ? com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance() + : reply_; + } + } + /** + * + * + *
+     * Answer to the current query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder, + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder> + getReplyFieldBuilder() { + if (replyBuilder_ == null) { + replyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder, + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder>( + getReply(), getParentForChildren(), isClean()); + reply_ = null; + } + return replyBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + conversationBuilder_; + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + * + * @return Whether the conversation field is set. + */ + public boolean hasConversation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + * + * @return The conversation. + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + if (conversationBuilder_ == null) { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } else { + return conversationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + public Builder setConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conversation_ = value; + } else { + conversationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + public Builder setConversation( + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder builderForValue) { + if (conversationBuilder_ == null) { + conversation_ = builderForValue.build(); + } else { + conversationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + public Builder mergeConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && conversation_ != null + && conversation_ + != com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance()) { + getConversationBuilder().mergeFrom(value); + } else { + conversation_ = value; + } + } else { + conversationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + public Builder clearConversation() { + bitField0_ = (bitField0_ & ~0x00000002); + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation.Builder getConversationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConversationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder + getConversationOrBuilder() { + if (conversationBuilder_ != null) { + return conversationBuilder_.getMessageOrBuilder(); + } else { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + } + /** + * + * + *
+     * Updated conversation including the answer.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + getConversationFieldBuilder() { + if (conversationBuilder_ == null) { + conversationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder>( + getConversation(), getParentForChildren(), isClean()); + conversation_ = null; + } + return conversationBuilder_; + } + + private com.google.protobuf.LazyStringArrayList relatedQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRelatedQuestionsIsMutable() { + if (!relatedQuestions_.isModifiable()) { + relatedQuestions_ = new com.google.protobuf.LazyStringArrayList(relatedQuestions_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @return A list containing the relatedQuestions. + */ + public com.google.protobuf.ProtocolStringList getRelatedQuestionsList() { + relatedQuestions_.makeImmutable(); + return relatedQuestions_; + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @return The count of relatedQuestions. + */ + public int getRelatedQuestionsCount() { + return relatedQuestions_.size(); + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @param index The index of the element to return. + * @return The relatedQuestions at the given index. + */ + public java.lang.String getRelatedQuestions(int index) { + return relatedQuestions_.get(index); + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedQuestions at the given index. + */ + public com.google.protobuf.ByteString getRelatedQuestionsBytes(int index) { + return relatedQuestions_.getByteString(index); + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @param index The index to set the value at. + * @param value The relatedQuestions to set. + * @return This builder for chaining. + */ + public Builder setRelatedQuestions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @param value The relatedQuestions to add. + * @return This builder for chaining. + */ + public Builder addRelatedQuestions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @param values The relatedQuestions to add. + * @return This builder for chaining. + */ + public Builder addAllRelatedQuestions(java.lang.Iterable values) { + ensureRelatedQuestionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedQuestions_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @return This builder for chaining. + */ + public Builder clearRelatedQuestions() { + relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Suggested related questions.
+     * 
+ * + * repeated string related_questions = 6; + * + * @param value The bytes of the relatedQuestions to add. + * @return This builder for chaining. + */ + public Builder addRelatedQuestionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List + searchResults_ = java.util.Collections.emptyList(); + + private void ensureSearchResultsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + searchResults_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult>( + searchResults_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + searchResultsBuilder_; + + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public java.util.List + getSearchResultsList() { + if (searchResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchResults_); + } else { + return searchResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public int getSearchResultsCount() { + if (searchResultsBuilder_ == null) { + return searchResults_.size(); + } else { + return searchResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult getSearchResults( + int index) { + if (searchResultsBuilder_ == null) { + return searchResults_.get(index); + } else { + return searchResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder setSearchResults( + int index, com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResultsIsMutable(); + searchResults_.set(index, value); + onChanged(); + } else { + searchResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder setSearchResults( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.set(index, builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder addSearchResults( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResultsIsMutable(); + searchResults_.add(value); + onChanged(); + } else { + searchResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder addSearchResults( + int index, com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResultsIsMutable(); + searchResults_.add(index, value); + onChanged(); + } else { + searchResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder addSearchResults( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder addSearchResults( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(index, builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder addAllSearchResults( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult> + values) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchResults_); + onChanged(); + } else { + searchResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder clearSearchResults() { + if (searchResultsBuilder_ == null) { + searchResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + searchResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public Builder removeSearchResults(int index) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.remove(index); + onChanged(); + } else { + searchResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + getSearchResultsBuilder(int index) { + return getSearchResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder + getSearchResultsOrBuilder(int index) { + if (searchResultsBuilder_ == null) { + return searchResults_.get(index); + } else { + return searchResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getSearchResultsOrBuilderList() { + if (searchResultsBuilder_ != null) { + return searchResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchResults_); + } + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + addSearchResultsBuilder() { + return getSearchResultsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .getDefaultInstance()); + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + addSearchResultsBuilder(int index) { + return getSearchResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .getDefaultInstance()); + } + /** + * + * + *
+     * Search Results.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder> + getSearchResultsBuilderList() { + return getSearchResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getSearchResultsFieldBuilder() { + if (searchResultsBuilder_ == null) { + searchResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder>( + searchResults_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + searchResults_ = null; + } + return searchResultsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) + private static final com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConverseConversationResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationResponseOrBuilder.java new file mode 100644 index 000000000000..6a9ac963b214 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ConverseConversationResponseOrBuilder.java @@ -0,0 +1,211 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ConverseConversationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ConverseConversationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Answer to the current query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + * + * @return Whether the reply field is set. + */ + boolean hasReply(); + /** + * + * + *
+   * Answer to the current query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + * + * @return The reply. + */ + com.google.cloud.discoveryengine.v1alpha.Reply getReply(); + /** + * + * + *
+   * Answer to the current query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Reply reply = 1; + */ + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder getReplyOrBuilder(); + + /** + * + * + *
+   * Updated conversation including the answer.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + * + * @return Whether the conversation field is set. + */ + boolean hasConversation(); + /** + * + * + *
+   * Updated conversation including the answer.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + * + * @return The conversation. + */ + com.google.cloud.discoveryengine.v1alpha.Conversation getConversation(); + /** + * + * + *
+   * Updated conversation including the answer.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2; + */ + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder(); + + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @return A list containing the relatedQuestions. + */ + java.util.List getRelatedQuestionsList(); + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @return The count of relatedQuestions. + */ + int getRelatedQuestionsCount(); + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @param index The index of the element to return. + * @return The relatedQuestions at the given index. + */ + java.lang.String getRelatedQuestions(int index); + /** + * + * + *
+   * Suggested related questions.
+   * 
+ * + * repeated string related_questions = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedQuestions at the given index. + */ + com.google.protobuf.ByteString getRelatedQuestionsBytes(int index); + + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + java.util.List + getSearchResultsList(); + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult getSearchResults(int index); + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + int getSearchResultsCount(); + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getSearchResultsOrBuilderList(); + /** + * + * + *
+   * Search Results.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult search_results = 3; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder + getSearchResultsOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateConversationRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateConversationRequest.java new file mode 100644 index 000000000000..783ecf63cc2f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateConversationRequest.java @@ -0,0 +1,949 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request for CreateConversation method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateConversationRequest} + */ +public final class CreateConversationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CreateConversationRequest) + CreateConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateConversationRequest.newBuilder() to construct. + private CreateConversationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateConversationRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateConversationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Full resource name of parent data store. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of parent data store. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + @java.lang.Override + public boolean hasConversation() { + return conversation_ != null; + } + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (conversation_ != null) { + output.writeMessage(2, getConversation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (conversation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConversation()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest other = + (com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasConversation() != other.hasConversation()) return false; + if (hasConversation()) { + if (!getConversation().equals(other.getConversation())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasConversation()) { + hash = (37 * hash) + CONVERSATION_FIELD_NUMBER; + hash = (53 * hash) + getConversation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for CreateConversation method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CreateConversationRequest) + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest build() { + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest result = + new com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conversation_ = + conversationBuilder_ == null ? conversation_ : conversationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasConversation()) { + mergeConversation(other.getConversation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getConversationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Full resource name of parent data store. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of parent data store. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of parent data store. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of parent data store. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of parent data store. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + conversationBuilder_; + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + public boolean hasConversation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + if (conversationBuilder_ == null) { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } else { + return conversationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conversation_ = value; + } else { + conversationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversation( + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder builderForValue) { + if (conversationBuilder_ == null) { + conversation_ = builderForValue.build(); + } else { + conversationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && conversation_ != null + && conversation_ + != com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance()) { + getConversationBuilder().mergeFrom(value); + } else { + conversation_ = value; + } + } else { + conversationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConversation() { + bitField0_ = (bitField0_ & ~0x00000002); + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation.Builder getConversationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConversationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder + getConversationOrBuilder() { + if (conversationBuilder_ != null) { + return conversationBuilder_.getMessageOrBuilder(); + } else { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + } + /** + * + * + *
+     * Required. The conversation to create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + getConversationFieldBuilder() { + if (conversationBuilder_ == null) { + conversationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder>( + getConversation(), getParentForChildren(), isClean()); + conversation_ = null; + } + return conversationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CreateConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CreateConversationRequest) + private static final com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateConversationRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateConversationRequestOrBuilder.java new file mode 100644 index 000000000000..378862bfd37e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateConversationRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CreateConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CreateConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of parent data store. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Full resource name of parent data store. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + boolean hasConversation(); + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + com.google.cloud.discoveryengine.v1alpha.Conversation getConversation(); + /** + * + * + *
+   * Required. The conversation to create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateDocumentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateDocumentRequest.java new file mode 100644 index 000000000000..918edfea00c8 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateDocumentRequest.java @@ -0,0 +1,1252 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateDocumentRequest} + */ +public final class CreateDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) + CreateDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDocumentRequest.newBuilder() to construct. + private CreateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDocumentRequest() { + parent_ = ""; + documentId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDocumentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.Document document_; + /** + * + * + *
+   * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the document field is set. + */ + @java.lang.Override + public boolean hasDocument() { + return document_ != null; + } + /** + * + * + *
+   * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The document. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + /** + * + * + *
+   * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + + public static final int DOCUMENT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object documentId_ = ""; + /** + * + * + *
+   * Required. The ID to use for the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+   * become the final component of the
+   * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+   *
+   * If the caller does not have permission to create the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * This field must be unique among all
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+   * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+   * Otherwise, an `ALREADY_EXISTS` error is returned.
+   *
+   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The documentId. + */ + @java.lang.Override + public java.lang.String getDocumentId() { + java.lang.Object ref = documentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+   * become the final component of the
+   * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+   *
+   * If the caller does not have permission to create the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * This field must be unique among all
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+   * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+   * Otherwise, an `ALREADY_EXISTS` error is returned.
+   *
+   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for documentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentIdBytes() { + java.lang.Object ref = documentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (document_ != null) { + output.writeMessage(2, getDocument()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, documentId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (document_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDocument()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, documentId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest other = + (com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDocument() != other.hasDocument()) return false; + if (hasDocument()) { + if (!getDocument().equals(other.getDocument())) return false; + } + if (!getDocumentId().equals(other.getDocumentId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDocument()) { + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + } + hash = (37 * hash) + DOCUMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDocumentId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + documentId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateDocumentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest build() { + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest result = + new com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.document_ = documentBuilder_ == null ? document_ : documentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.documentId_ = documentId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDocument()) { + mergeDocument(other.getDocument()); + } + if (!other.getDocumentId().isEmpty()) { + documentId_ = other.documentId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDocumentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + documentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.Document document_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + documentBuilder_; + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the document field is set. + */ + public boolean hasDocument() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The document. + */ + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + if (documentBuilder_ == null) { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } else { + return documentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + } else { + documentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocument( + com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentBuilder_ == null) { + document_ = builderForValue.build(); + } else { + documentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && document_ != null + && document_ + != com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()) { + getDocumentBuilder().mergeFrom(value); + } else { + document_ = value; + } + } else { + documentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDocument() { + bitField0_ = (bitField0_ & ~0x00000002); + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder getDocumentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDocumentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + if (documentBuilder_ != null) { + return documentBuilder_.getMessageOrBuilder(); + } else { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + } + /** + * + * + *
+     * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + getDocumentFieldBuilder() { + if (documentBuilder_ == null) { + documentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder>( + getDocument(), getParentForChildren(), isClean()); + document_ = null; + } + return documentBuilder_; + } + + private java.lang.Object documentId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+     * become the final component of the
+     * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+     *
+     * If the caller does not have permission to create the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * This field must be unique among all
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+     * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+     * Otherwise, an `ALREADY_EXISTS` error is returned.
+     *
+     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The documentId. + */ + public java.lang.String getDocumentId() { + java.lang.Object ref = documentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+     * become the final component of the
+     * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+     *
+     * If the caller does not have permission to create the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * This field must be unique among all
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+     * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+     * Otherwise, an `ALREADY_EXISTS` error is returned.
+     *
+     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for documentId. + */ + public com.google.protobuf.ByteString getDocumentIdBytes() { + java.lang.Object ref = documentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+     * become the final component of the
+     * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+     *
+     * If the caller does not have permission to create the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * This field must be unique among all
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+     * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+     * Otherwise, an `ALREADY_EXISTS` error is returned.
+     *
+     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The documentId to set. + * @return This builder for chaining. + */ + public Builder setDocumentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + documentId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+     * become the final component of the
+     * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+     *
+     * If the caller does not have permission to create the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * This field must be unique among all
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+     * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+     * Otherwise, an `ALREADY_EXISTS` error is returned.
+     *
+     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDocumentId() { + documentId_ = getDefaultInstance().getDocumentId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+     * become the final component of the
+     * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+     *
+     * If the caller does not have permission to create the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * This field must be unique among all
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+     * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+     * Otherwise, an `ALREADY_EXISTS` error is returned.
+     *
+     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for documentId to set. + * @return This builder for chaining. + */ + public Builder setDocumentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + documentId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) + private static final com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDocumentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateDocumentRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateDocumentRequestOrBuilder.java new file mode 100644 index 000000000000..465e1dea2ef6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateDocumentRequestOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CreateDocumentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CreateDocumentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the document field is set. + */ + boolean hasDocument(); + /** + * + * + *
+   * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The document. + */ + com.google.cloud.discoveryengine.v1alpha.Document getDocument(); + /** + * + * + *
+   * Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+   * become the final component of the
+   * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+   *
+   * If the caller does not have permission to create the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * This field must be unique among all
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+   * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+   * Otherwise, an `ALREADY_EXISTS` error is returned.
+   *
+   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The documentId. + */ + java.lang.String getDocumentId(); + /** + * + * + *
+   * Required. The ID to use for the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], which will
+   * become the final component of the
+   * [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
+   *
+   * If the caller does not have permission to create the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * This field must be unique among all
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+   * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
+   * Otherwise, an `ALREADY_EXISTS` error is returned.
+   *
+   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string document_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for documentId. + */ + com.google.protobuf.ByteString getDocumentIdBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaMetadata.java new file mode 100644 index 000000000000..0cbbab9415cc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaMetadata.java @@ -0,0 +1,978 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata for Create Schema LRO.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata} + */ +public final class CreateSchemaMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) + CreateSchemaMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSchemaMetadata.newBuilder() to construct. + private CreateSchemaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSchemaMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSchemaMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata.class, + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata other = + (com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata for Create Schema LRO.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata.class, + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata build() { + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata result = + new com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSchemaMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaMetadataOrBuilder.java new file mode 100644 index 000000000000..3fa1627e1ffe --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaMetadataOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CreateSchemaMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaRequest.java new file mode 100644 index 000000000000..5e28ad49e04f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaRequest.java @@ -0,0 +1,1186 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateSchemaRequest} + */ +public final class CreateSchemaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) + CreateSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSchemaRequest.newBuilder() to construct. + private CreateSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSchemaRequest() { + parent_ = ""; + schemaId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSchemaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.Schema schema_; + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return schema_ != null; + } + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Schema getSchema() { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } + + public static final int SCHEMA_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object schemaId_ = ""; + /** + * + * + *
+   * Required. The ID to use for the
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+   * the final component of the
+   * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+   *
+   * This field should conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+   * limit of 63 characters.
+   * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The schemaId. + */ + @java.lang.Override + public java.lang.String getSchemaId() { + java.lang.Object ref = schemaId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+   * the final component of the
+   * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+   *
+   * This field should conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+   * limit of 63 characters.
+   * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for schemaId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaIdBytes() { + java.lang.Object ref = schemaId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (schema_ != null) { + output.writeMessage(2, getSchema()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schemaId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (schema_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSchema()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, schemaId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest other = + (com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (!getSchemaId().equals(other.getSchemaId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + hash = (37 * hash) + SCHEMA_ID_FIELD_NUMBER; + hash = (53 * hash) + getSchemaId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CreateSchemaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + schemaId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest build() { + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest result = + new com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.schemaId_ = schemaId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (!other.getSchemaId().isEmpty()) { + schemaId_ = other.schemaId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + schemaId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.Schema schema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder> + schemaBuilder_; + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schema. + */ + public com.google.cloud.discoveryengine.v1alpha.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchema(com.google.cloud.discoveryengine.v1alpha.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchema( + com.google.cloud.discoveryengine.v1alpha.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSchema(com.google.cloud.discoveryengine.v1alpha.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && schema_ != null + && schema_ != com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * create.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private java.lang.Object schemaId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+     * the final component of the
+     * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+     *
+     * This field should conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+     * limit of 63 characters.
+     * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The schemaId. + */ + public java.lang.String getSchemaId() { + java.lang.Object ref = schemaId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+     * the final component of the
+     * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+     *
+     * This field should conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+     * limit of 63 characters.
+     * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for schemaId. + */ + public com.google.protobuf.ByteString getSchemaIdBytes() { + java.lang.Object ref = schemaId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+     * the final component of the
+     * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+     *
+     * This field should conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+     * limit of 63 characters.
+     * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The schemaId to set. + * @return This builder for chaining. + */ + public Builder setSchemaId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schemaId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+     * the final component of the
+     * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+     *
+     * This field should conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+     * limit of 63 characters.
+     * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSchemaId() { + schemaId_ = getDefaultInstance().getSchemaId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+     * the final component of the
+     * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+     *
+     * This field should conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+     * limit of 63 characters.
+     * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for schemaId to set. + * @return This builder for chaining. + */ + public Builder setSchemaIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) + private static final com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSchemaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaRequestOrBuilder.java new file mode 100644 index 000000000000..cdfd1b57b97e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateSchemaRequestOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CreateSchemaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CreateSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schema. + */ + com.google.cloud.discoveryengine.v1alpha.Schema getSchema(); + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * create.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemaOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for the
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+   * the final component of the
+   * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+   *
+   * This field should conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+   * limit of 63 characters.
+   * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The schemaId. + */ + java.lang.String getSchemaId(); + /** + * + * + *
+   * Required. The ID to use for the
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become
+   * the final component of the
+   * [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name].
+   *
+   * This field should conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
+   * limit of 63 characters.
+   * 
+ * + * string schema_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for schemaId. + */ + com.google.protobuf.ByteString getSchemaIdBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CustomAttribute.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CustomAttribute.java new file mode 100644 index 000000000000..7221918765e0 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CustomAttribute.java @@ -0,0 +1,1164 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * A custom attribute that is not explicitly modeled in a resource, e.g.
+ * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent].
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CustomAttribute} + */ +public final class CustomAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.CustomAttribute) + CustomAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomAttribute.newBuilder() to construct. + private CustomAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomAttribute() { + text_ = com.google.protobuf.LazyStringArrayList.emptyList(); + numbers_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CustomAttribute.class, + com.google.cloud.discoveryengine.v1alpha.CustomAttribute.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList text_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @return A list containing the text. + */ + public com.google.protobuf.ProtocolStringList getTextList() { + return text_; + } + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @return The count of text. + */ + public int getTextCount() { + return text_.size(); + } + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @param index The index of the element to return. + * @return The text at the given index. + */ + public java.lang.String getText(int index) { + return text_.get(index); + } + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @param index The index of the value to return. + * @return The bytes of the text at the given index. + */ + public com.google.protobuf.ByteString getTextBytes(int index) { + return text_.getByteString(index); + } + + public static final int NUMBERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.DoubleList numbers_; + /** + * + * + *
+   * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+   * when the key is "lengths_cm".
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated double numbers = 2; + * + * @return A list containing the numbers. + */ + @java.lang.Override + public java.util.List getNumbersList() { + return numbers_; + } + /** + * + * + *
+   * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+   * when the key is "lengths_cm".
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated double numbers = 2; + * + * @return The count of numbers. + */ + public int getNumbersCount() { + return numbers_.size(); + } + /** + * + * + *
+   * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+   * when the key is "lengths_cm".
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated double numbers = 2; + * + * @param index The index of the element to return. + * @return The numbers at the given index. + */ + public double getNumbers(int index) { + return numbers_.getDouble(index); + } + + private int numbersMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < text_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_.getRaw(i)); + } + if (getNumbersList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(numbersMemoizedSerializedSize); + } + for (int i = 0; i < numbers_.size(); i++) { + output.writeDoubleNoTag(numbers_.getDouble(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < text_.size(); i++) { + dataSize += computeStringSizeNoTag(text_.getRaw(i)); + } + size += dataSize; + size += 1 * getTextList().size(); + } + { + int dataSize = 0; + dataSize = 8 * getNumbersList().size(); + size += dataSize; + if (!getNumbersList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + numbersMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.CustomAttribute)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.CustomAttribute other = + (com.google.cloud.discoveryengine.v1alpha.CustomAttribute) obj; + + if (!getTextList().equals(other.getTextList())) return false; + if (!getNumbersList().equals(other.getNumbersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTextCount() > 0) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getTextList().hashCode(); + } + if (getNumbersCount() > 0) { + hash = (37 * hash) + NUMBERS_FIELD_NUMBER; + hash = (53 * hash) + getNumbersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.CustomAttribute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A custom attribute that is not explicitly modeled in a resource, e.g.
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent].
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.CustomAttribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.CustomAttribute) + com.google.cloud.discoveryengine.v1alpha.CustomAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.CustomAttribute.class, + com.google.cloud.discoveryengine.v1alpha.CustomAttribute.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.CustomAttribute.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = com.google.protobuf.LazyStringArrayList.emptyList(); + numbers_ = emptyDoubleList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_CustomAttribute_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CustomAttribute getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.CustomAttribute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CustomAttribute build() { + com.google.cloud.discoveryengine.v1alpha.CustomAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CustomAttribute buildPartial() { + com.google.cloud.discoveryengine.v1alpha.CustomAttribute result = + new com.google.cloud.discoveryengine.v1alpha.CustomAttribute(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.CustomAttribute result) { + if (((bitField0_ & 0x00000002) != 0)) { + numbers_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.numbers_ = numbers_; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.CustomAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + text_.makeImmutable(); + result.text_ = text_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.CustomAttribute) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.CustomAttribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.CustomAttribute other) { + if (other == com.google.cloud.discoveryengine.v1alpha.CustomAttribute.getDefaultInstance()) + return this; + if (!other.text_.isEmpty()) { + if (text_.isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + } else { + ensureTextIsMutable(); + text_.addAll(other.text_); + } + onChanged(); + } + if (!other.numbers_.isEmpty()) { + if (numbers_.isEmpty()) { + numbers_ = other.numbers_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNumbersIsMutable(); + numbers_.addAll(other.numbers_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTextIsMutable(); + text_.add(s); + break; + } // case 10 + case 17: + { + double v = input.readDouble(); + ensureNumbersIsMutable(); + numbers_.addDouble(v); + break; + } // case 17 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureNumbersIsMutable(); + while (input.getBytesUntilLimit() > 0) { + numbers_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList text_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTextIsMutable() { + if (!text_.isModifiable()) { + text_ = new com.google.protobuf.LazyStringArrayList(text_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @return A list containing the text. + */ + public com.google.protobuf.ProtocolStringList getTextList() { + text_.makeImmutable(); + return text_; + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @return The count of text. + */ + public int getTextCount() { + return text_.size(); + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @param index The index of the element to return. + * @return The text at the given index. + */ + public java.lang.String getText(int index) { + return text_.get(index); + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @param index The index of the value to return. + * @return The bytes of the text at the given index. + */ + public com.google.protobuf.ByteString getTextBytes(int index) { + return text_.getByteString(index); + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @param index The index to set the value at. + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextIsMutable(); + text_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @param value The text to add. + * @return This builder for chaining. + */ + public Builder addText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextIsMutable(); + text_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @param values The text to add. + * @return This builder for chaining. + */ + public Builder addAllText(java.lang.Iterable values) { + ensureTextIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, text_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The textual values of this custom attribute. For example, `["yellow",
+     * "green"]` when the key is "color".
+     *
+     * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+     * returned.
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated string text = 1; + * + * @param value The bytes of the text to add. + * @return This builder for chaining. + */ + public Builder addTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTextIsMutable(); + text_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.DoubleList numbers_ = emptyDoubleList(); + + private void ensureNumbersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + numbers_ = mutableCopy(numbers_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+     * when the key is "lengths_cm".
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated double numbers = 2; + * + * @return A list containing the numbers. + */ + public java.util.List getNumbersList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(numbers_) + : numbers_; + } + /** + * + * + *
+     * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+     * when the key is "lengths_cm".
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated double numbers = 2; + * + * @return The count of numbers. + */ + public int getNumbersCount() { + return numbers_.size(); + } + /** + * + * + *
+     * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+     * when the key is "lengths_cm".
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated double numbers = 2; + * + * @param index The index of the element to return. + * @return The numbers at the given index. + */ + public double getNumbers(int index) { + return numbers_.getDouble(index); + } + /** + * + * + *
+     * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+     * when the key is "lengths_cm".
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated double numbers = 2; + * + * @param index The index to set the value at. + * @param value The numbers to set. + * @return This builder for chaining. + */ + public Builder setNumbers(int index, double value) { + + ensureNumbersIsMutable(); + numbers_.setDouble(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+     * when the key is "lengths_cm".
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated double numbers = 2; + * + * @param value The numbers to add. + * @return This builder for chaining. + */ + public Builder addNumbers(double value) { + + ensureNumbersIsMutable(); + numbers_.addDouble(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+     * when the key is "lengths_cm".
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated double numbers = 2; + * + * @param values The numbers to add. + * @return This builder for chaining. + */ + public Builder addAllNumbers(java.lang.Iterable values) { + ensureNumbersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, numbers_); + onChanged(); + return this; + } + /** + * + * + *
+     * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+     * when the key is "lengths_cm".
+     *
+     * Exactly one of
+     * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+     * or
+     * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+     * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * repeated double numbers = 2; + * + * @return This builder for chaining. + */ + public Builder clearNumbers() { + numbers_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.CustomAttribute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.CustomAttribute) + private static final com.google.cloud.discoveryengine.v1alpha.CustomAttribute DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.CustomAttribute(); + } + + public static com.google.cloud.discoveryengine.v1alpha.CustomAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomAttribute parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CustomAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CustomAttributeOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CustomAttributeOrBuilder.java new file mode 100644 index 000000000000..ecc768d396cc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CustomAttributeOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface CustomAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CustomAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @return A list containing the text. + */ + java.util.List getTextList(); + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @return The count of text. + */ + int getTextCount(); + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @param index The index of the element to return. + * @return The text at the given index. + */ + java.lang.String getText(int index); + /** + * + * + *
+   * The textual values of this custom attribute. For example, `["yellow",
+   * "green"]` when the key is "color".
+   *
+   * Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
+   * returned.
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated string text = 1; + * + * @param index The index of the value to return. + * @return The bytes of the text at the given index. + */ + com.google.protobuf.ByteString getTextBytes(int index); + + /** + * + * + *
+   * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+   * when the key is "lengths_cm".
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated double numbers = 2; + * + * @return A list containing the numbers. + */ + java.util.List getNumbersList(); + /** + * + * + *
+   * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+   * when the key is "lengths_cm".
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated double numbers = 2; + * + * @return The count of numbers. + */ + int getNumbersCount(); + /** + * + * + *
+   * The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+   * when the key is "lengths_cm".
+   *
+   * Exactly one of
+   * [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
+   * or
+   * [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
+   * should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * repeated double numbers = 2; + * + * @param index The index of the element to return. + * @return The numbers at the given index. + */ + double getNumbers(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DataStoreName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DataStoreName.java new file mode 100644 index 000000000000..370c86ee6f6f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DataStoreName.java @@ -0,0 +1,371 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DataStoreName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_STORE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataStores/{data_store}"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_DATA_STORE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String dataStore; + private final String collection; + + @Deprecated + protected DataStoreName() { + project = null; + location = null; + dataStore = null; + collection = null; + } + + private DataStoreName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + collection = null; + pathTemplate = PROJECT_LOCATION_DATA_STORE; + } + + private DataStoreName(ProjectLocationCollectionDataStoreBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getCollection() { + return collection; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationDataStoreBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionDataStoreBuilder + newProjectLocationCollectionDataStoreBuilder() { + return new ProjectLocationCollectionDataStoreBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataStoreName of(String project, String location, String dataStore) { + return newBuilder().setProject(project).setLocation(location).setDataStore(dataStore).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DataStoreName ofProjectLocationDataStoreName( + String project, String location, String dataStore) { + return newBuilder().setProject(project).setLocation(location).setDataStore(dataStore).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DataStoreName ofProjectLocationCollectionDataStoreName( + String project, String location, String collection, String dataStore) { + return newProjectLocationCollectionDataStoreBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .build(); + } + + public static String format(String project, String location, String dataStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDataStoreName( + String project, String location, String dataStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionDataStoreName( + String project, String location, String collection, String dataStore) { + return newProjectLocationCollectionDataStoreBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .build() + .toString(); + } + + public static DataStoreName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_DATA_STORE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_DATA_STORE.match(formattedString); + return ofProjectLocationDataStoreName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("data_store")); + } else if (PROJECT_LOCATION_COLLECTION_DATA_STORE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_COLLECTION_DATA_STORE.match(formattedString); + return ofProjectLocationCollectionDataStoreName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("data_store")); + } + throw new ValidationException("DataStoreName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DataStoreName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_STORE.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_DATA_STORE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataStore != null) { + fieldMapBuilder.put("data_store", dataStore); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataStoreName that = ((DataStoreName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataStore, that.dataStore) + && Objects.equals(this.collection, that.collection); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataStore); + h *= 1000003; + h ^= Objects.hashCode(collection); + return h; + } + + /** Builder for projects/{project}/locations/{location}/dataStores/{data_store}. */ + public static class Builder { + private String project; + private String location; + private String dataStore; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + private Builder(DataStoreName dataStoreName) { + Preconditions.checkArgument( + Objects.equals(dataStoreName.pathTemplate, PROJECT_LOCATION_DATA_STORE), + "toBuilder is only supported when DataStoreName has the pattern of projects/{project}/locations/{location}/dataStores/{data_store}"); + this.project = dataStoreName.project; + this.location = dataStoreName.location; + this.dataStore = dataStoreName.dataStore; + } + + public DataStoreName build() { + return new DataStoreName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionDataStoreBuilder { + private String project; + private String location; + private String collection; + private String dataStore; + + protected ProjectLocationCollectionDataStoreBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getDataStore() { + return dataStore; + } + + public ProjectLocationCollectionDataStoreBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionDataStoreBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionDataStoreBuilder setCollection(String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionDataStoreBuilder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public DataStoreName build() { + return new DataStoreName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteConversationRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteConversationRequest.java new file mode 100644 index 000000000000..6626da340a2f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteConversationRequest.java @@ -0,0 +1,657 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request for DeleteConversation method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteConversationRequest} + */ +public final class DeleteConversationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) + DeleteConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteConversationRequest.newBuilder() to construct. + private DeleteConversationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteConversationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteConversationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the Conversation to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Conversation to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest other = + (com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for DeleteConversation method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest build() { + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest result = + new com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the Conversation to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Conversation to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Conversation to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Conversation to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Conversation to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) + private static final com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteConversationRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteConversationRequestOrBuilder.java new file mode 100644 index 000000000000..0ef756e694ae --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteConversationRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface DeleteConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.DeleteConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Conversation to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the Conversation to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteDocumentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteDocumentRequest.java new file mode 100644 index 000000000000..e37428300a1f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteDocumentRequest.java @@ -0,0 +1,712 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest} + */ +public final class DeleteDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) + DeleteDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDocumentRequest.newBuilder() to construct. + private DeleteDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDocumentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDocumentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to delete the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to delete the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest other = + (com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest build() { + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest result = + new com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to delete the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to delete the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to delete the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to delete the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to delete the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) + private static final com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDocumentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteDocumentRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteDocumentRequestOrBuilder.java new file mode 100644 index 000000000000..bd79b8122d9e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteDocumentRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface DeleteDocumentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to delete the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to delete the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaMetadata.java new file mode 100644 index 000000000000..1d01ac153828 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaMetadata.java @@ -0,0 +1,978 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata for DeleteSchema LRO.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata} + */ +public final class DeleteSchemaMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) + DeleteSchemaMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSchemaMetadata.newBuilder() to construct. + private DeleteSchemaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSchemaMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSchemaMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata.class, + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata other = + (com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata for DeleteSchema LRO.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata.class, + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata build() { + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata result = + new com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSchemaMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaMetadataOrBuilder.java new file mode 100644 index 000000000000..b58f8f59881e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaMetadataOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface DeleteSchemaMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaRequest.java new file mode 100644 index 000000000000..3003481db580 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest} + */ +public final class DeleteSchemaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) + DeleteSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSchemaRequest.newBuilder() to construct. + private DeleteSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSchemaRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSchemaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest other = + (com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest build() { + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest result = + new com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) + private static final com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSchemaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaRequestOrBuilder.java new file mode 100644 index 000000000000..e7ef7253a262 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DeleteSchemaRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface DeleteSchemaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Document.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Document.java new file mode 100644 index 000000000000..686f8aa8ac68 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Document.java @@ -0,0 +1,3806 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Document captures all raw metadata information of items to be recommended or
+ * searched.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Document} + */ +public final class Document extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Document) + DocumentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Document.newBuilder() to construct. + private Document(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Document() { + name_ = ""; + id_ = ""; + schemaId_ = ""; + parentDocumentId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Document(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Document.class, + com.google.cloud.discoveryengine.v1alpha.Document.Builder.class); + } + + public interface ContentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Document.Content) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The content represented as a stream of bytes. The maximum length is
+     * 1,000,000 bytes (1 MB / ~0.95 MiB).
+     *
+     * Note: As with all `bytes` fields, this field is represented as pure
+     * binary in Protocol Buffers and base64-encoded string in JSON. For
+     * example, `abc123!?$*&()'-=@~` should be represented as
+     * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+     * https://developers.google.com/protocol-buffers/docs/proto3#json.
+     * 
+ * + * bytes raw_bytes = 2; + * + * @return Whether the rawBytes field is set. + */ + boolean hasRawBytes(); + /** + * + * + *
+     * The content represented as a stream of bytes. The maximum length is
+     * 1,000,000 bytes (1 MB / ~0.95 MiB).
+     *
+     * Note: As with all `bytes` fields, this field is represented as pure
+     * binary in Protocol Buffers and base64-encoded string in JSON. For
+     * example, `abc123!?$*&()'-=@~` should be represented as
+     * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+     * https://developers.google.com/protocol-buffers/docs/proto3#json.
+     * 
+ * + * bytes raw_bytes = 2; + * + * @return The rawBytes. + */ + com.google.protobuf.ByteString getRawBytes(); + + /** + * + * + *
+     * The URI of the content. Only Cloud Storage URIs (e.g.
+     * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+     * is 100 MB.
+     * 
+ * + * string uri = 3; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); + /** + * + * + *
+     * The URI of the content. Only Cloud Storage URIs (e.g.
+     * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+     * is 100 MB.
+     * 
+ * + * string uri = 3; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * The URI of the content. Only Cloud Storage URIs (e.g.
+     * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+     * is 100 MB.
+     * 
+ * + * string uri = 3; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * The MIME type of the content. Supported types:
+     *
+     * * `application/pdf` (PDF, only native PDFs are supported for now)
+     * * `text/html` (HTML)
+     * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+     * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+     * * `text/plain` (TXT)
+     *
+     * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * 
+ * + * string mime_type = 1; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + * + * + *
+     * The MIME type of the content. Supported types:
+     *
+     * * `application/pdf` (PDF, only native PDFs are supported for now)
+     * * `text/html` (HTML)
+     * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+     * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+     * * `text/plain` (TXT)
+     *
+     * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * 
+ * + * string mime_type = 1; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + com.google.cloud.discoveryengine.v1alpha.Document.Content.ContentCase getContentCase(); + } + /** + * + * + *
+   * Unstructured data linked to this document.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Document.Content} + */ + public static final class Content extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Document.Content) + ContentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Content.newBuilder() to construct. + private Content(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Content() { + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Content(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Document.Content.class, + com.google.cloud.discoveryengine.v1alpha.Document.Content.Builder.class); + } + + private int contentCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object content_; + + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RAW_BYTES(2), + URI(3), + CONTENT_NOT_SET(0); + private final int value; + + private ContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } + + public static ContentCase forNumber(int value) { + switch (value) { + case 2: + return RAW_BYTES; + case 3: + return URI; + case 0: + return CONTENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } + + public static final int RAW_BYTES_FIELD_NUMBER = 2; + /** + * + * + *
+     * The content represented as a stream of bytes. The maximum length is
+     * 1,000,000 bytes (1 MB / ~0.95 MiB).
+     *
+     * Note: As with all `bytes` fields, this field is represented as pure
+     * binary in Protocol Buffers and base64-encoded string in JSON. For
+     * example, `abc123!?$*&()'-=@~` should be represented as
+     * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+     * https://developers.google.com/protocol-buffers/docs/proto3#json.
+     * 
+ * + * bytes raw_bytes = 2; + * + * @return Whether the rawBytes field is set. + */ + @java.lang.Override + public boolean hasRawBytes() { + return contentCase_ == 2; + } + /** + * + * + *
+     * The content represented as a stream of bytes. The maximum length is
+     * 1,000,000 bytes (1 MB / ~0.95 MiB).
+     *
+     * Note: As with all `bytes` fields, this field is represented as pure
+     * binary in Protocol Buffers and base64-encoded string in JSON. For
+     * example, `abc123!?$*&()'-=@~` should be represented as
+     * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+     * https://developers.google.com/protocol-buffers/docs/proto3#json.
+     * 
+ * + * bytes raw_bytes = 2; + * + * @return The rawBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRawBytes() { + if (contentCase_ == 2) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int URI_FIELD_NUMBER = 3; + /** + * + * + *
+     * The URI of the content. Only Cloud Storage URIs (e.g.
+     * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+     * is 100 MB.
+     * 
+ * + * string uri = 3; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return contentCase_ == 3; + } + /** + * + * + *
+     * The URI of the content. Only Cloud Storage URIs (e.g.
+     * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+     * is 100 MB.
+     * 
+ * + * string uri = 3; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 3) { + content_ = s; + } + return s; + } + } + /** + * + * + *
+     * The URI of the content. Only Cloud Storage URIs (e.g.
+     * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+     * is 100 MB.
+     * 
+ * + * string uri = 3; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 3) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * The MIME type of the content. Supported types:
+     *
+     * * `application/pdf` (PDF, only native PDFs are supported for now)
+     * * `text/html` (HTML)
+     * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+     * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+     * * `text/plain` (TXT)
+     *
+     * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * 
+ * + * string mime_type = 1; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+     * The MIME type of the content. Supported types:
+     *
+     * * `application/pdf` (PDF, only native PDFs are supported for now)
+     * * `text/html` (HTML)
+     * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+     * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+     * * `text/plain` (TXT)
+     *
+     * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+     * 
+ * + * string mime_type = 1; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_); + } + if (contentCase_ == 2) { + output.writeBytes(2, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_); + } + if (contentCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 2, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Document.Content)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Document.Content other = + (com.google.cloud.discoveryengine.v1alpha.Document.Content) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 2: + if (!getRawBytes().equals(other.getRawBytes())) return false; + break; + case 3: + if (!getUri().equals(other.getUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + switch (contentCase_) { + case 2: + hash = (37 * hash) + RAW_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getRawBytes().hashCode(); + break; + case 3: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.Document.Content prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Unstructured data linked to this document.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Document.Content} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Document.Content) + com.google.cloud.discoveryengine.v1alpha.Document.ContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Document.Content.class, + com.google.cloud.discoveryengine.v1alpha.Document.Content.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Document.Content.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + contentCase_ = 0; + content_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document.Content getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Document.Content.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document.Content build() { + com.google.cloud.discoveryengine.v1alpha.Document.Content result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document.Content buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Document.Content result = + new com.google.cloud.discoveryengine.v1alpha.Document.Content(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Document.Content result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.mimeType_ = mimeType_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.Document.Content result) { + result.contentCase_ = contentCase_; + result.content_ = this.content_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Document.Content) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Document.Content) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Document.Content other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Document.Content.getDefaultInstance()) + return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getContentCase()) { + case RAW_BYTES: + { + setRawBytes(other.getRawBytes()); + break; + } + case URI: + { + contentCase_ = 3; + content_ = other.content_; + onChanged(); + break; + } + case CONTENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + content_ = input.readBytes(); + contentCase_ = 2; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + contentCase_ = 3; + content_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int contentCase_ = 0; + private java.lang.Object content_; + + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } + + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The content represented as a stream of bytes. The maximum length is
+       * 1,000,000 bytes (1 MB / ~0.95 MiB).
+       *
+       * Note: As with all `bytes` fields, this field is represented as pure
+       * binary in Protocol Buffers and base64-encoded string in JSON. For
+       * example, `abc123!?$*&()'-=@~` should be represented as
+       * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
+       * 
+ * + * bytes raw_bytes = 2; + * + * @return Whether the rawBytes field is set. + */ + public boolean hasRawBytes() { + return contentCase_ == 2; + } + /** + * + * + *
+       * The content represented as a stream of bytes. The maximum length is
+       * 1,000,000 bytes (1 MB / ~0.95 MiB).
+       *
+       * Note: As with all `bytes` fields, this field is represented as pure
+       * binary in Protocol Buffers and base64-encoded string in JSON. For
+       * example, `abc123!?$*&()'-=@~` should be represented as
+       * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
+       * 
+ * + * bytes raw_bytes = 2; + * + * @return The rawBytes. + */ + public com.google.protobuf.ByteString getRawBytes() { + if (contentCase_ == 2) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+       * The content represented as a stream of bytes. The maximum length is
+       * 1,000,000 bytes (1 MB / ~0.95 MiB).
+       *
+       * Note: As with all `bytes` fields, this field is represented as pure
+       * binary in Protocol Buffers and base64-encoded string in JSON. For
+       * example, `abc123!?$*&()'-=@~` should be represented as
+       * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
+       * 
+ * + * bytes raw_bytes = 2; + * + * @param value The rawBytes to set. + * @return This builder for chaining. + */ + public Builder setRawBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 2; + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The content represented as a stream of bytes. The maximum length is
+       * 1,000,000 bytes (1 MB / ~0.95 MiB).
+       *
+       * Note: As with all `bytes` fields, this field is represented as pure
+       * binary in Protocol Buffers and base64-encoded string in JSON. For
+       * example, `abc123!?$*&()'-=@~` should be represented as
+       * `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
+       * https://developers.google.com/protocol-buffers/docs/proto3#json.
+       * 
+ * + * bytes raw_bytes = 2; + * + * @return This builder for chaining. + */ + public Builder clearRawBytes() { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The URI of the content. Only Cloud Storage URIs (e.g.
+       * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+       * is 100 MB.
+       * 
+ * + * string uri = 3; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return contentCase_ == 3; + } + /** + * + * + *
+       * The URI of the content. Only Cloud Storage URIs (e.g.
+       * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+       * is 100 MB.
+       * 
+ * + * string uri = 3; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 3) { + content_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The URI of the content. Only Cloud Storage URIs (e.g.
+       * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+       * is 100 MB.
+       * 
+ * + * string uri = 3; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (contentCase_ == 3) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The URI of the content. Only Cloud Storage URIs (e.g.
+       * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+       * is 100 MB.
+       * 
+ * + * string uri = 3; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 3; + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The URI of the content. Only Cloud Storage URIs (e.g.
+       * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+       * is 100 MB.
+       * 
+ * + * string uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The URI of the content. Only Cloud Storage URIs (e.g.
+       * `gs://bucket-name/path/to/file`) are supported. The maximum file size
+       * is 100 MB.
+       * 
+ * + * string uri = 3; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contentCase_ = 3; + content_ = value; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+       * The MIME type of the content. Supported types:
+       *
+       * * `application/pdf` (PDF, only native PDFs are supported for now)
+       * * `text/html` (HTML)
+       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+       * * `text/plain` (TXT)
+       *
+       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+       * 
+ * + * string mime_type = 1; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The MIME type of the content. Supported types:
+       *
+       * * `application/pdf` (PDF, only native PDFs are supported for now)
+       * * `text/html` (HTML)
+       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+       * * `text/plain` (TXT)
+       *
+       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+       * 
+ * + * string mime_type = 1; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The MIME type of the content. Supported types:
+       *
+       * * `application/pdf` (PDF, only native PDFs are supported for now)
+       * * `text/html` (HTML)
+       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+       * * `text/plain` (TXT)
+       *
+       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+       * 
+ * + * string mime_type = 1; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The MIME type of the content. Supported types:
+       *
+       * * `application/pdf` (PDF, only native PDFs are supported for now)
+       * * `text/html` (HTML)
+       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+       * * `text/plain` (TXT)
+       *
+       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+       * 
+ * + * string mime_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The MIME type of the content. Supported types:
+       *
+       * * `application/pdf` (PDF, only native PDFs are supported for now)
+       * * `text/html` (HTML)
+       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
+       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
+       * * `text/plain` (TXT)
+       *
+       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
+       * 
+ * + * string mime_type = 1; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Document.Content) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Document.Content) + private static final com.google.cloud.discoveryengine.v1alpha.Document.Content DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Document.Content(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document.Content getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Content parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document.Content getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRUCT_DATA(4), + JSON_DATA(5), + DATA_NOT_SET(0); + private final int value; + + private DataCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 4: + return STRUCT_DATA; + case 5: + return JSON_DATA; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int STRUCT_DATA_FIELD_NUMBER = 4; + /** + * + * + *
+   * The structured JSON data for the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * .google.protobuf.Struct struct_data = 4; + * + * @return Whether the structData field is set. + */ + @java.lang.Override + public boolean hasStructData() { + return dataCase_ == 4; + } + /** + * + * + *
+   * The structured JSON data for the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * .google.protobuf.Struct struct_data = 4; + * + * @return The structData. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructData() { + if (dataCase_ == 4) { + return (com.google.protobuf.Struct) data_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + /** + * + * + *
+   * The structured JSON data for the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + if (dataCase_ == 4) { + return (com.google.protobuf.Struct) data_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + + public static final int JSON_DATA_FIELD_NUMBER = 5; + /** + * + * + *
+   * The JSON string representation of the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * string json_data = 5; + * + * @return Whether the jsonData field is set. + */ + public boolean hasJsonData() { + return dataCase_ == 5; + } + /** + * + * + *
+   * The JSON string representation of the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * string json_data = 5; + * + * @return The jsonData. + */ + public java.lang.String getJsonData() { + java.lang.Object ref = ""; + if (dataCase_ == 5) { + ref = data_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (dataCase_ == 5) { + data_ = s; + } + return s; + } + } + /** + * + * + *
+   * The JSON string representation of the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * string json_data = 5; + * + * @return The bytes for jsonData. + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = ""; + if (dataCase_ == 5) { + ref = data_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (dataCase_ == 5) { + data_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. The full resource name of the document.
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The full resource name of the document.
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Immutable. The identifier of the document.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The identifier of the document.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object schemaId_ = ""; + /** + * + * + *
+   * The identifier of the schema located in the same data store.
+   * 
+ * + * string schema_id = 3; + * + * @return The schemaId. + */ + @java.lang.Override + public java.lang.String getSchemaId() { + java.lang.Object ref = schemaId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaId_ = s; + return s; + } + } + /** + * + * + *
+   * The identifier of the schema located in the same data store.
+   * 
+ * + * string schema_id = 3; + * + * @return The bytes for schemaId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaIdBytes() { + java.lang.Object ref = schemaId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 10; + private com.google.cloud.discoveryengine.v1alpha.Document.Content content_; + /** + * + * + *
+   * The unstructured data linked to this document. Content must be set if this
+   * document is under a
+   * `CONTENT_REQUIRED` data store.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return content_ != null; + } + /** + * + * + *
+   * The unstructured data linked to this document. Content must be set if this
+   * document is under a
+   * `CONTENT_REQUIRED` data store.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + * + * @return The content. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document.Content getContent() { + return content_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.Content.getDefaultInstance() + : content_; + } + /** + * + * + *
+   * The unstructured data linked to this document. Content must be set if this
+   * document is under a
+   * `CONTENT_REQUIRED` data store.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document.ContentOrBuilder getContentOrBuilder() { + return content_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.Content.getDefaultInstance() + : content_; + } + + public static final int PARENT_DOCUMENT_ID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object parentDocumentId_ = ""; + /** + * + * + *
+   * The identifier of the parent document. Currently supports at most two level
+   * document hierarchy.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string parent_document_id = 7; + * + * @return The parentDocumentId. + */ + @java.lang.Override + public java.lang.String getParentDocumentId() { + java.lang.Object ref = parentDocumentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentDocumentId_ = s; + return s; + } + } + /** + * + * + *
+   * The identifier of the parent document. Currently supports at most two level
+   * document hierarchy.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string parent_document_id = 7; + * + * @return The bytes for parentDocumentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentDocumentIdBytes() { + java.lang.Object ref = parentDocumentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentDocumentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DERIVED_STRUCT_DATA_FIELD_NUMBER = 6; + private com.google.protobuf.Struct derivedStructData_; + /** + * + * + *
+   * Output only. This field is OUTPUT_ONLY.
+   * It contains derived data that are not in the original input document.
+   * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedStructData field is set. + */ + @java.lang.Override + public boolean hasDerivedStructData() { + return derivedStructData_ != null; + } + /** + * + * + *
+   * Output only. This field is OUTPUT_ONLY.
+   * It contains derived data that are not in the original input document.
+   * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedStructData. + */ + @java.lang.Override + public com.google.protobuf.Struct getDerivedStructData() { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } + /** + * + * + *
+   * Output only. This field is OUTPUT_ONLY.
+   * It contains derived data that are not in the original input document.
+   * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schemaId_); + } + if (dataCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Struct) data_); + } + if (dataCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, data_); + } + if (derivedStructData_ != null) { + output.writeMessage(6, getDerivedStructData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDocumentId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, parentDocumentId_); + } + if (content_ != null) { + output.writeMessage(10, getContent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, schemaId_); + } + if (dataCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.protobuf.Struct) data_); + } + if (dataCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, data_); + } + if (derivedStructData_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDerivedStructData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentDocumentId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, parentDocumentId_); + } + if (content_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getContent()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Document)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Document other = + (com.google.cloud.discoveryengine.v1alpha.Document) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getSchemaId().equals(other.getSchemaId())) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent().equals(other.getContent())) return false; + } + if (!getParentDocumentId().equals(other.getParentDocumentId())) return false; + if (hasDerivedStructData() != other.hasDerivedStructData()) return false; + if (hasDerivedStructData()) { + if (!getDerivedStructData().equals(other.getDerivedStructData())) return false; + } + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 4: + if (!getStructData().equals(other.getStructData())) return false; + break; + case 5: + if (!getJsonData().equals(other.getJsonData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + SCHEMA_ID_FIELD_NUMBER; + hash = (53 * hash) + getSchemaId().hashCode(); + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (37 * hash) + PARENT_DOCUMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getParentDocumentId().hashCode(); + if (hasDerivedStructData()) { + hash = (37 * hash) + DERIVED_STRUCT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getDerivedStructData().hashCode(); + } + switch (dataCase_) { + case 4: + hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getStructData().hashCode(); + break; + case 5: + hash = (37 * hash) + JSON_DATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.Document prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Document captures all raw metadata information of items to be recommended or
+   * searched.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Document} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Document) + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Document.class, + com.google.cloud.discoveryengine.v1alpha.Document.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Document.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (structDataBuilder_ != null) { + structDataBuilder_.clear(); + } + name_ = ""; + id_ = ""; + schemaId_ = ""; + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + parentDocumentId_ = ""; + derivedStructData_ = null; + if (derivedStructDataBuilder_ != null) { + derivedStructDataBuilder_.dispose(); + derivedStructDataBuilder_ = null; + } + dataCase_ = 0; + data_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentProto + .internal_static_google_cloud_discoveryengine_v1alpha_Document_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document build() { + com.google.cloud.discoveryengine.v1alpha.Document result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Document result = + new com.google.cloud.discoveryengine.v1alpha.Document(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Document result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.schemaId_ = schemaId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.parentDocumentId_ = parentDocumentId_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.derivedStructData_ = + derivedStructDataBuilder_ == null + ? derivedStructData_ + : derivedStructDataBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.discoveryengine.v1alpha.Document result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 4 && structDataBuilder_ != null) { + result.data_ = structDataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Document) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Document) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Document other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getSchemaId().isEmpty()) { + schemaId_ = other.schemaId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasContent()) { + mergeContent(other.getContent()); + } + if (!other.getParentDocumentId().isEmpty()) { + parentDocumentId_ = other.parentDocumentId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasDerivedStructData()) { + mergeDerivedStructData(other.getDerivedStructData()); + } + switch (other.getDataCase()) { + case STRUCT_DATA: + { + mergeStructData(other.getStructData()); + break; + } + case JSON_DATA: + { + dataCase_ = 5; + data_ = other.data_; + onChanged(); + break; + } + case DATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + schemaId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + input.readMessage(getStructDataFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 4; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + dataCase_ = 5; + data_ = s; + break; + } // case 42 + case 50: + { + input.readMessage( + getDerivedStructDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 58: + { + parentDocumentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 82: + { + input.readMessage(getContentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structDataBuilder_; + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + * + * @return Whether the structData field is set. + */ + @java.lang.Override + public boolean hasStructData() { + return dataCase_ == 4; + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + * + * @return The structData. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructData() { + if (structDataBuilder_ == null) { + if (dataCase_ == 4) { + return (com.google.protobuf.Struct) data_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } else { + if (dataCase_ == 4) { + return structDataBuilder_.getMessage(); + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + public Builder setStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + structDataBuilder_.setMessage(value); + } + dataCase_ = 4; + return this; + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (structDataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + structDataBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 4; + return this; + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + public Builder mergeStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (dataCase_ == 4 && data_ != com.google.protobuf.Struct.getDefaultInstance()) { + data_ = + com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 4) { + structDataBuilder_.mergeFrom(value); + } else { + structDataBuilder_.setMessage(value); + } + } + dataCase_ = 4; + return this; + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + public Builder clearStructData() { + if (structDataBuilder_ == null) { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + } + structDataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + public com.google.protobuf.Struct.Builder getStructDataBuilder() { + return getStructDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + if ((dataCase_ == 4) && (structDataBuilder_ != null)) { + return structDataBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 4) { + return (com.google.protobuf.Struct) data_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * The structured JSON data for the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getStructDataFieldBuilder() { + if (structDataBuilder_ == null) { + if (!(dataCase_ == 4)) { + data_ = com.google.protobuf.Struct.getDefaultInstance(); + } + structDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + (com.google.protobuf.Struct) data_, getParentForChildren(), isClean()); + data_ = null; + } + dataCase_ = 4; + onChanged(); + return structDataBuilder_; + } + + /** + * + * + *
+     * The JSON string representation of the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * string json_data = 5; + * + * @return Whether the jsonData field is set. + */ + @java.lang.Override + public boolean hasJsonData() { + return dataCase_ == 5; + } + /** + * + * + *
+     * The JSON string representation of the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * string json_data = 5; + * + * @return The jsonData. + */ + @java.lang.Override + public java.lang.String getJsonData() { + java.lang.Object ref = ""; + if (dataCase_ == 5) { + ref = data_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (dataCase_ == 5) { + data_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The JSON string representation of the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * string json_data = 5; + * + * @return The bytes for jsonData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = ""; + if (dataCase_ == 5) { + ref = data_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (dataCase_ == 5) { + data_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The JSON string representation of the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * string json_data = 5; + * + * @param value The jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataCase_ = 5; + data_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The JSON string representation of the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * string json_data = 5; + * + * @return This builder for chaining. + */ + public Builder clearJsonData() { + if (dataCase_ == 5) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The JSON string representation of the document. It should conform to the
+     * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+     * `INVALID_ARGUMENT` error is thrown.
+     * 
+ * + * string json_data = 5; + * + * @param value The bytes for jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataCase_ = 5; + data_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The full resource name of the document.
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The full resource name of the document.
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The full resource name of the document.
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The full resource name of the document.
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The full resource name of the document.
+     * Format:
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Immutable. The identifier of the document.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The identifier of the document.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The identifier of the document.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The identifier of the document.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The identifier of the document.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object schemaId_ = ""; + /** + * + * + *
+     * The identifier of the schema located in the same data store.
+     * 
+ * + * string schema_id = 3; + * + * @return The schemaId. + */ + public java.lang.String getSchemaId() { + java.lang.Object ref = schemaId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The identifier of the schema located in the same data store.
+     * 
+ * + * string schema_id = 3; + * + * @return The bytes for schemaId. + */ + public com.google.protobuf.ByteString getSchemaIdBytes() { + java.lang.Object ref = schemaId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The identifier of the schema located in the same data store.
+     * 
+ * + * string schema_id = 3; + * + * @param value The schemaId to set. + * @return This builder for chaining. + */ + public Builder setSchemaId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schemaId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the schema located in the same data store.
+     * 
+ * + * string schema_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearSchemaId() { + schemaId_ = getDefaultInstance().getSchemaId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the schema located in the same data store.
+     * 
+ * + * string schema_id = 3; + * + * @param value The bytes for schemaId to set. + * @return This builder for chaining. + */ + public Builder setSchemaIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.Document.Content content_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document.Content, + com.google.cloud.discoveryengine.v1alpha.Document.Content.Builder, + com.google.cloud.discoveryengine.v1alpha.Document.ContentOrBuilder> + contentBuilder_; + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + * + * @return The content. + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Content getContent() { + if (contentBuilder_ == null) { + return content_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.Content.getDefaultInstance() + : content_; + } else { + return contentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + public Builder setContent(com.google.cloud.discoveryengine.v1alpha.Document.Content value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + public Builder setContent( + com.google.cloud.discoveryengine.v1alpha.Document.Content.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + public Builder mergeContent(com.google.cloud.discoveryengine.v1alpha.Document.Content value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && content_ != null + && content_ + != com.google.cloud.discoveryengine.v1alpha.Document.Content.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000020); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Content.Builder getContentBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.Document.ContentOrBuilder + getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.Content.getDefaultInstance() + : content_; + } + } + /** + * + * + *
+     * The unstructured data linked to this document. Content must be set if this
+     * document is under a
+     * `CONTENT_REQUIRED` data store.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document.Content, + com.google.cloud.discoveryengine.v1alpha.Document.Content.Builder, + com.google.cloud.discoveryengine.v1alpha.Document.ContentOrBuilder> + getContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document.Content, + com.google.cloud.discoveryengine.v1alpha.Document.Content.Builder, + com.google.cloud.discoveryengine.v1alpha.Document.ContentOrBuilder>( + getContent(), getParentForChildren(), isClean()); + content_ = null; + } + return contentBuilder_; + } + + private java.lang.Object parentDocumentId_ = ""; + /** + * + * + *
+     * The identifier of the parent document. Currently supports at most two level
+     * document hierarchy.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string parent_document_id = 7; + * + * @return The parentDocumentId. + */ + public java.lang.String getParentDocumentId() { + java.lang.Object ref = parentDocumentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentDocumentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The identifier of the parent document. Currently supports at most two level
+     * document hierarchy.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string parent_document_id = 7; + * + * @return The bytes for parentDocumentId. + */ + public com.google.protobuf.ByteString getParentDocumentIdBytes() { + java.lang.Object ref = parentDocumentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentDocumentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The identifier of the parent document. Currently supports at most two level
+     * document hierarchy.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string parent_document_id = 7; + * + * @param value The parentDocumentId to set. + * @return This builder for chaining. + */ + public Builder setParentDocumentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parentDocumentId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the parent document. Currently supports at most two level
+     * document hierarchy.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string parent_document_id = 7; + * + * @return This builder for chaining. + */ + public Builder clearParentDocumentId() { + parentDocumentId_ = getDefaultInstance().getParentDocumentId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the parent document. Currently supports at most two level
+     * document hierarchy.
+     *
+     * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+     * standard with a length limit of 63 characters.
+     * 
+ * + * string parent_document_id = 7; + * + * @param value The bytes for parentDocumentId to set. + * @return This builder for chaining. + */ + public Builder setParentDocumentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parentDocumentId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.Struct derivedStructData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + derivedStructDataBuilder_; + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedStructData field is set. + */ + public boolean hasDerivedStructData() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedStructData. + */ + public com.google.protobuf.Struct getDerivedStructData() { + if (derivedStructDataBuilder_ == null) { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } else { + return derivedStructDataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedStructData(com.google.protobuf.Struct value) { + if (derivedStructDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + derivedStructData_ = value; + } else { + derivedStructDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (derivedStructDataBuilder_ == null) { + derivedStructData_ = builderForValue.build(); + } else { + derivedStructDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDerivedStructData(com.google.protobuf.Struct value) { + if (derivedStructDataBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && derivedStructData_ != null + && derivedStructData_ != com.google.protobuf.Struct.getDefaultInstance()) { + getDerivedStructDataBuilder().mergeFrom(value); + } else { + derivedStructData_ = value; + } + } else { + derivedStructDataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDerivedStructData() { + bitField0_ = (bitField0_ & ~0x00000080); + derivedStructData_ = null; + if (derivedStructDataBuilder_ != null) { + derivedStructDataBuilder_.dispose(); + derivedStructDataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder getDerivedStructDataBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getDerivedStructDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { + if (derivedStructDataBuilder_ != null) { + return derivedStructDataBuilder_.getMessageOrBuilder(); + } else { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } + } + /** + * + * + *
+     * Output only. This field is OUTPUT_ONLY.
+     * It contains derived data that are not in the original input document.
+     * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getDerivedStructDataFieldBuilder() { + if (derivedStructDataBuilder_ == null) { + derivedStructDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getDerivedStructData(), getParentForChildren(), isClean()); + derivedStructData_ = null; + } + return derivedStructDataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Document) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Document) + private static final com.google.cloud.discoveryengine.v1alpha.Document DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Document(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Document getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Document parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentInfo.java new file mode 100644 index 000000000000..e001072c5495 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentInfo.java @@ -0,0 +1,1731 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Detailed document information associated with a user event.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DocumentInfo} + */ +public final class DocumentInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.DocumentInfo) + DocumentInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentInfo.newBuilder() to construct. + private DocumentInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocumentInfo() { + promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.class, + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder.class); + } + + private int bitField0_; + private int documentDescriptorCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object documentDescriptor_; + + public enum DocumentDescriptorCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ID(1), + NAME(2), + URI(6), + DOCUMENTDESCRIPTOR_NOT_SET(0); + private final int value; + + private DocumentDescriptorCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DocumentDescriptorCase valueOf(int value) { + return forNumber(value); + } + + public static DocumentDescriptorCase forNumber(int value) { + switch (value) { + case 1: + return ID; + case 2: + return NAME; + case 6: + return URI; + case 0: + return DOCUMENTDESCRIPTOR_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DocumentDescriptorCase getDocumentDescriptorCase() { + return DocumentDescriptorCase.forNumber(documentDescriptorCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * ID.
+   * 
+ * + * string id = 1; + * + * @return Whether the id field is set. + */ + public boolean hasId() { + return documentDescriptorCase_ == 1; + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * ID.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 1) { + ref = documentDescriptor_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (documentDescriptorCase_ == 1) { + documentDescriptor_ = s; + } + return s; + } + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * ID.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 1) { + ref = documentDescriptor_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (documentDescriptorCase_ == 1) { + documentDescriptor_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * full name, of the form:
+   * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+   * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the name field is set. + */ + public boolean hasName() { + return documentDescriptorCase_ == 2; + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * full name, of the form:
+   * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+   * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 2) { + ref = documentDescriptor_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (documentDescriptorCase_ == 2) { + documentDescriptor_ = s; + } + return s; + } + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * full name, of the form:
+   * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+   * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 2) { + ref = documentDescriptor_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (documentDescriptorCase_ == 2) { + documentDescriptor_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 6; + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+   * allowed for website data stores.
+   * 
+ * + * string uri = 6; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return documentDescriptorCase_ == 6; + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+   * allowed for website data stores.
+   * 
+ * + * string uri = 6; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 6) { + ref = documentDescriptor_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (documentDescriptorCase_ == 6) { + documentDescriptor_ = s; + } + return s; + } + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+   * allowed for website data stores.
+   * 
+ * + * string uri = 6; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 6) { + ref = documentDescriptor_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (documentDescriptorCase_ == 6) { + documentDescriptor_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUANTITY_FIELD_NUMBER = 3; + private int quantity_ = 0; + /** + * + * + *
+   * Quantity of the Document associated with the user event. Defaults to 1.
+   *
+   * For example, this field will be 2 if two quantities of the same Document
+   * are involved in a `add-to-cart` event.
+   *
+   * Required for events of the following event types:
+   *
+   * * `add-to-cart`
+   * * `purchase`
+   * 
+ * + * optional int32 quantity = 3; + * + * @return Whether the quantity field is set. + */ + @java.lang.Override + public boolean hasQuantity() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Quantity of the Document associated with the user event. Defaults to 1.
+   *
+   * For example, this field will be 2 if two quantities of the same Document
+   * are involved in a `add-to-cart` event.
+   *
+   * Required for events of the following event types:
+   *
+   * * `add-to-cart`
+   * * `purchase`
+   * 
+ * + * optional int32 quantity = 3; + * + * @return The quantity. + */ + @java.lang.Override + public int getQuantity() { + return quantity_; + } + + public static final int PROMOTION_IDS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList promotionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @return A list containing the promotionIds. + */ + public com.google.protobuf.ProtocolStringList getPromotionIdsList() { + return promotionIds_; + } + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @return The count of promotionIds. + */ + public int getPromotionIdsCount() { + return promotionIds_.size(); + } + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @param index The index of the element to return. + * @return The promotionIds at the given index. + */ + public java.lang.String getPromotionIds(int index) { + return promotionIds_.get(index); + } + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @param index The index of the value to return. + * @return The bytes of the promotionIds at the given index. + */ + public com.google.protobuf.ByteString getPromotionIdsBytes(int index) { + return promotionIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (documentDescriptorCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, documentDescriptor_); + } + if (documentDescriptorCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, documentDescriptor_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(3, quantity_); + } + for (int i = 0; i < promotionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, promotionIds_.getRaw(i)); + } + if (documentDescriptorCase_ == 6) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, documentDescriptor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (documentDescriptorCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, documentDescriptor_); + } + if (documentDescriptorCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, documentDescriptor_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, quantity_); + } + { + int dataSize = 0; + for (int i = 0; i < promotionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(promotionIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getPromotionIdsList().size(); + } + if (documentDescriptorCase_ == 6) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, documentDescriptor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.DocumentInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.DocumentInfo other = + (com.google.cloud.discoveryengine.v1alpha.DocumentInfo) obj; + + if (hasQuantity() != other.hasQuantity()) return false; + if (hasQuantity()) { + if (getQuantity() != other.getQuantity()) return false; + } + if (!getPromotionIdsList().equals(other.getPromotionIdsList())) return false; + if (!getDocumentDescriptorCase().equals(other.getDocumentDescriptorCase())) return false; + switch (documentDescriptorCase_) { + case 1: + if (!getId().equals(other.getId())) return false; + break; + case 2: + if (!getName().equals(other.getName())) return false; + break; + case 6: + if (!getUri().equals(other.getUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasQuantity()) { + hash = (37 * hash) + QUANTITY_FIELD_NUMBER; + hash = (53 * hash) + getQuantity(); + } + if (getPromotionIdsCount() > 0) { + hash = (37 * hash) + PROMOTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getPromotionIdsList().hashCode(); + } + switch (documentDescriptorCase_) { + case 1: + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + break; + case 2: + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + break; + case 6: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.DocumentInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Detailed document information associated with a user event.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DocumentInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.DocumentInfo) + com.google.cloud.discoveryengine.v1alpha.DocumentInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.class, + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.DocumentInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + quantity_ = 0; + promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + documentDescriptorCase_ = 0; + documentDescriptor_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo build() { + com.google.cloud.discoveryengine.v1alpha.DocumentInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.DocumentInfo result = + new com.google.cloud.discoveryengine.v1alpha.DocumentInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.DocumentInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.quantity_ = quantity_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + promotionIds_.makeImmutable(); + result.promotionIds_ = promotionIds_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.discoveryengine.v1alpha.DocumentInfo result) { + result.documentDescriptorCase_ = documentDescriptorCase_; + result.documentDescriptor_ = this.documentDescriptor_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.DocumentInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.DocumentInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.DocumentInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.DocumentInfo.getDefaultInstance()) + return this; + if (other.hasQuantity()) { + setQuantity(other.getQuantity()); + } + if (!other.promotionIds_.isEmpty()) { + if (promotionIds_.isEmpty()) { + promotionIds_ = other.promotionIds_; + bitField0_ |= 0x00000010; + } else { + ensurePromotionIdsIsMutable(); + promotionIds_.addAll(other.promotionIds_); + } + onChanged(); + } + switch (other.getDocumentDescriptorCase()) { + case ID: + { + documentDescriptorCase_ = 1; + documentDescriptor_ = other.documentDescriptor_; + onChanged(); + break; + } + case NAME: + { + documentDescriptorCase_ = 2; + documentDescriptor_ = other.documentDescriptor_; + onChanged(); + break; + } + case URI: + { + documentDescriptorCase_ = 6; + documentDescriptor_ = other.documentDescriptor_; + onChanged(); + break; + } + case DOCUMENTDESCRIPTOR_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + documentDescriptorCase_ = 1; + documentDescriptor_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + documentDescriptorCase_ = 2; + documentDescriptor_ = s; + break; + } // case 18 + case 24: + { + quantity_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePromotionIdsIsMutable(); + promotionIds_.add(s); + break; + } // case 34 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + documentDescriptorCase_ = 6; + documentDescriptor_ = s; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int documentDescriptorCase_ = 0; + private java.lang.Object documentDescriptor_; + + public DocumentDescriptorCase getDocumentDescriptorCase() { + return DocumentDescriptorCase.forNumber(documentDescriptorCase_); + } + + public Builder clearDocumentDescriptor() { + documentDescriptorCase_ = 0; + documentDescriptor_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * ID.
+     * 
+ * + * string id = 1; + * + * @return Whether the id field is set. + */ + @java.lang.Override + public boolean hasId() { + return documentDescriptorCase_ == 1; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * ID.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 1) { + ref = documentDescriptor_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (documentDescriptorCase_ == 1) { + documentDescriptor_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * ID.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 1) { + ref = documentDescriptor_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (documentDescriptorCase_ == 1) { + documentDescriptor_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * ID.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + documentDescriptorCase_ = 1; + documentDescriptor_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * ID.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + if (documentDescriptorCase_ == 1) { + documentDescriptorCase_ = 0; + documentDescriptor_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * ID.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + documentDescriptorCase_ = 1; + documentDescriptor_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * full name, of the form:
+     * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+     * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return documentDescriptorCase_ == 2; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * full name, of the form:
+     * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+     * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 2) { + ref = documentDescriptor_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (documentDescriptorCase_ == 2) { + documentDescriptor_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * full name, of the form:
+     * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+     * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 2) { + ref = documentDescriptor_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (documentDescriptorCase_ == 2) { + documentDescriptor_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * full name, of the form:
+     * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+     * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + documentDescriptorCase_ = 2; + documentDescriptor_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * full name, of the form:
+     * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+     * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearName() { + if (documentDescriptorCase_ == 2) { + documentDescriptorCase_ = 0; + documentDescriptor_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+     * full name, of the form:
+     * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+     * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + documentDescriptorCase_ = 2; + documentDescriptor_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+     * allowed for website data stores.
+     * 
+ * + * string uri = 6; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return documentDescriptorCase_ == 6; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+     * allowed for website data stores.
+     * 
+ * + * string uri = 6; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 6) { + ref = documentDescriptor_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (documentDescriptorCase_ == 6) { + documentDescriptor_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+     * allowed for website data stores.
+     * 
+ * + * string uri = 6; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = ""; + if (documentDescriptorCase_ == 6) { + ref = documentDescriptor_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (documentDescriptorCase_ == 6) { + documentDescriptor_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+     * allowed for website data stores.
+     * 
+ * + * string uri = 6; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + documentDescriptorCase_ = 6; + documentDescriptor_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+     * allowed for website data stores.
+     * 
+ * + * string uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + if (documentDescriptorCase_ == 6) { + documentDescriptorCase_ = 0; + documentDescriptor_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+     * allowed for website data stores.
+     * 
+ * + * string uri = 6; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + documentDescriptorCase_ = 6; + documentDescriptor_ = value; + onChanged(); + return this; + } + + private int quantity_; + /** + * + * + *
+     * Quantity of the Document associated with the user event. Defaults to 1.
+     *
+     * For example, this field will be 2 if two quantities of the same Document
+     * are involved in a `add-to-cart` event.
+     *
+     * Required for events of the following event types:
+     *
+     * * `add-to-cart`
+     * * `purchase`
+     * 
+ * + * optional int32 quantity = 3; + * + * @return Whether the quantity field is set. + */ + @java.lang.Override + public boolean hasQuantity() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Quantity of the Document associated with the user event. Defaults to 1.
+     *
+     * For example, this field will be 2 if two quantities of the same Document
+     * are involved in a `add-to-cart` event.
+     *
+     * Required for events of the following event types:
+     *
+     * * `add-to-cart`
+     * * `purchase`
+     * 
+ * + * optional int32 quantity = 3; + * + * @return The quantity. + */ + @java.lang.Override + public int getQuantity() { + return quantity_; + } + /** + * + * + *
+     * Quantity of the Document associated with the user event. Defaults to 1.
+     *
+     * For example, this field will be 2 if two quantities of the same Document
+     * are involved in a `add-to-cart` event.
+     *
+     * Required for events of the following event types:
+     *
+     * * `add-to-cart`
+     * * `purchase`
+     * 
+ * + * optional int32 quantity = 3; + * + * @param value The quantity to set. + * @return This builder for chaining. + */ + public Builder setQuantity(int value) { + + quantity_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Quantity of the Document associated with the user event. Defaults to 1.
+     *
+     * For example, this field will be 2 if two quantities of the same Document
+     * are involved in a `add-to-cart` event.
+     *
+     * Required for events of the following event types:
+     *
+     * * `add-to-cart`
+     * * `purchase`
+     * 
+ * + * optional int32 quantity = 3; + * + * @return This builder for chaining. + */ + public Builder clearQuantity() { + bitField0_ = (bitField0_ & ~0x00000008); + quantity_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList promotionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePromotionIdsIsMutable() { + if (!promotionIds_.isModifiable()) { + promotionIds_ = new com.google.protobuf.LazyStringArrayList(promotionIds_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @return A list containing the promotionIds. + */ + public com.google.protobuf.ProtocolStringList getPromotionIdsList() { + promotionIds_.makeImmutable(); + return promotionIds_; + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @return The count of promotionIds. + */ + public int getPromotionIdsCount() { + return promotionIds_.size(); + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @param index The index of the element to return. + * @return The promotionIds at the given index. + */ + public java.lang.String getPromotionIds(int index) { + return promotionIds_.get(index); + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @param index The index of the value to return. + * @return The bytes of the promotionIds at the given index. + */ + public com.google.protobuf.ByteString getPromotionIdsBytes(int index) { + return promotionIds_.getByteString(index); + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @param index The index to set the value at. + * @param value The promotionIds to set. + * @return This builder for chaining. + */ + public Builder setPromotionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromotionIdsIsMutable(); + promotionIds_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @param value The promotionIds to add. + * @return This builder for chaining. + */ + public Builder addPromotionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromotionIdsIsMutable(); + promotionIds_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @param values The promotionIds to add. + * @return This builder for chaining. + */ + public Builder addAllPromotionIds(java.lang.Iterable values) { + ensurePromotionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promotionIds_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @return This builder for chaining. + */ + public Builder clearPromotionIds() { + promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs associated with this Document.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 4; + * + * @param value The bytes of the promotionIds to add. + * @return This builder for chaining. + */ + public Builder addPromotionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePromotionIdsIsMutable(); + promotionIds_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.DocumentInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.DocumentInfo) + private static final com.google.cloud.discoveryengine.v1alpha.DocumentInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.DocumentInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.DocumentInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentInfoOrBuilder.java new file mode 100644 index 000000000000..a4f06a343d5b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentInfoOrBuilder.java @@ -0,0 +1,247 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface DocumentInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.DocumentInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * ID.
+   * 
+ * + * string id = 1; + * + * @return Whether the id field is set. + */ + boolean hasId(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * ID.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * ID.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * full name, of the form:
+   * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+   * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the name field is set. + */ + boolean hasName(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * full name, of the form:
+   * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+   * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] resource
+   * full name, of the form:
+   * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
+   * 
+ * + * string name = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+   * allowed for website data stores.
+   * 
+ * + * string uri = 6; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+   * allowed for website data stores.
+   * 
+ * + * string uri = 6; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only
+   * allowed for website data stores.
+   * 
+ * + * string uri = 6; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Quantity of the Document associated with the user event. Defaults to 1.
+   *
+   * For example, this field will be 2 if two quantities of the same Document
+   * are involved in a `add-to-cart` event.
+   *
+   * Required for events of the following event types:
+   *
+   * * `add-to-cart`
+   * * `purchase`
+   * 
+ * + * optional int32 quantity = 3; + * + * @return Whether the quantity field is set. + */ + boolean hasQuantity(); + /** + * + * + *
+   * Quantity of the Document associated with the user event. Defaults to 1.
+   *
+   * For example, this field will be 2 if two quantities of the same Document
+   * are involved in a `add-to-cart` event.
+   *
+   * Required for events of the following event types:
+   *
+   * * `add-to-cart`
+   * * `purchase`
+   * 
+ * + * optional int32 quantity = 3; + * + * @return The quantity. + */ + int getQuantity(); + + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @return A list containing the promotionIds. + */ + java.util.List getPromotionIdsList(); + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @return The count of promotionIds. + */ + int getPromotionIdsCount(); + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @param index The index of the element to return. + * @return The promotionIds at the given index. + */ + java.lang.String getPromotionIds(int index); + /** + * + * + *
+   * The promotion IDs associated with this Document.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 4; + * + * @param index The index of the value to return. + * @return The bytes of the promotionIds at the given index. + */ + com.google.protobuf.ByteString getPromotionIdsBytes(int index); + + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.DocumentDescriptorCase + getDocumentDescriptorCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentName.java new file mode 100644 index 000000000000..183e5f4c4d18 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentName.java @@ -0,0 +1,485 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DocumentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_STORE_BRANCH_DOCUMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH_DOCUMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String dataStore; + private final String branch; + private final String document; + private final String collection; + + @Deprecated + protected DocumentName() { + project = null; + location = null; + dataStore = null; + branch = null; + document = null; + collection = null; + } + + private DocumentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + branch = Preconditions.checkNotNull(builder.getBranch()); + document = Preconditions.checkNotNull(builder.getDocument()); + collection = null; + pathTemplate = PROJECT_LOCATION_DATA_STORE_BRANCH_DOCUMENT; + } + + private DocumentName(ProjectLocationCollectionDataStoreBranchDocumentBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + branch = Preconditions.checkNotNull(builder.getBranch()); + document = Preconditions.checkNotNull(builder.getDocument()); + pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH_DOCUMENT; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getBranch() { + return branch; + } + + public String getDocument() { + return document; + } + + public String getCollection() { + return collection; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationDataStoreBranchDocumentBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionDataStoreBranchDocumentBuilder + newProjectLocationCollectionDataStoreBranchDocumentBuilder() { + return new ProjectLocationCollectionDataStoreBranchDocumentBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DocumentName of( + String project, String location, String dataStore, String branch, String document) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .setDocument(document) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DocumentName ofProjectLocationDataStoreBranchDocumentName( + String project, String location, String dataStore, String branch, String document) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .setDocument(document) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DocumentName ofProjectLocationCollectionDataStoreBranchDocumentName( + String project, + String location, + String collection, + String dataStore, + String branch, + String document) { + return newProjectLocationCollectionDataStoreBranchDocumentBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setBranch(branch) + .setDocument(document) + .build(); + } + + public static String format( + String project, String location, String dataStore, String branch, String document) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .setDocument(document) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDataStoreBranchDocumentName( + String project, String location, String dataStore, String branch, String document) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setBranch(branch) + .setDocument(document) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionDataStoreBranchDocumentName( + String project, + String location, + String collection, + String dataStore, + String branch, + String document) { + return newProjectLocationCollectionDataStoreBranchDocumentBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setBranch(branch) + .setDocument(document) + .build() + .toString(); + } + + public static DocumentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_DATA_STORE_BRANCH_DOCUMENT.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_DATA_STORE_BRANCH_DOCUMENT.match(formattedString); + return ofProjectLocationDataStoreBranchDocumentName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("data_store"), + matchMap.get("branch"), + matchMap.get("document")); + } else if (PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH_DOCUMENT.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH_DOCUMENT.match(formattedString); + return ofProjectLocationCollectionDataStoreBranchDocumentName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("data_store"), + matchMap.get("branch"), + matchMap.get("document")); + } + throw new ValidationException("DocumentName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DocumentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_STORE_BRANCH_DOCUMENT.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_DATA_STORE_BRANCH_DOCUMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataStore != null) { + fieldMapBuilder.put("data_store", dataStore); + } + if (branch != null) { + fieldMapBuilder.put("branch", branch); + } + if (document != null) { + fieldMapBuilder.put("document", document); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DocumentName that = ((DocumentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataStore, that.dataStore) + && Objects.equals(this.branch, that.branch) + && Objects.equals(this.document, that.document) + && Objects.equals(this.collection, that.collection); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataStore); + h *= 1000003; + h ^= Objects.hashCode(branch); + h *= 1000003; + h ^= Objects.hashCode(document); + h *= 1000003; + h ^= Objects.hashCode(collection); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}. + */ + public static class Builder { + private String project; + private String location; + private String dataStore; + private String branch; + private String document; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getBranch() { + return branch; + } + + public String getDocument() { + return document; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public Builder setBranch(String branch) { + this.branch = branch; + return this; + } + + public Builder setDocument(String document) { + this.document = document; + return this; + } + + private Builder(DocumentName documentName) { + Preconditions.checkArgument( + Objects.equals(documentName.pathTemplate, PROJECT_LOCATION_DATA_STORE_BRANCH_DOCUMENT), + "toBuilder is only supported when DocumentName has the pattern of projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}"); + this.project = documentName.project; + this.location = documentName.location; + this.dataStore = documentName.dataStore; + this.branch = documentName.branch; + this.document = documentName.document; + } + + public DocumentName build() { + return new DocumentName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionDataStoreBranchDocumentBuilder { + private String project; + private String location; + private String collection; + private String dataStore; + private String branch; + private String document; + + protected ProjectLocationCollectionDataStoreBranchDocumentBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getDataStore() { + return dataStore; + } + + public String getBranch() { + return branch; + } + + public String getDocument() { + return document; + } + + public ProjectLocationCollectionDataStoreBranchDocumentBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionDataStoreBranchDocumentBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionDataStoreBranchDocumentBuilder setCollection( + String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionDataStoreBranchDocumentBuilder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public ProjectLocationCollectionDataStoreBranchDocumentBuilder setBranch(String branch) { + this.branch = branch; + return this; + } + + public ProjectLocationCollectionDataStoreBranchDocumentBuilder setDocument(String document) { + this.document = document; + return this; + } + + public DocumentName build() { + return new DocumentName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentOrBuilder.java new file mode 100644 index 000000000000..0aa4f9433955 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentOrBuilder.java @@ -0,0 +1,320 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface DocumentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Document) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The structured JSON data for the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * .google.protobuf.Struct struct_data = 4; + * + * @return Whether the structData field is set. + */ + boolean hasStructData(); + /** + * + * + *
+   * The structured JSON data for the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * .google.protobuf.Struct struct_data = 4; + * + * @return The structData. + */ + com.google.protobuf.Struct getStructData(); + /** + * + * + *
+   * The structured JSON data for the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * .google.protobuf.Struct struct_data = 4; + */ + com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); + + /** + * + * + *
+   * The JSON string representation of the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * string json_data = 5; + * + * @return Whether the jsonData field is set. + */ + boolean hasJsonData(); + /** + * + * + *
+   * The JSON string representation of the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * string json_data = 5; + * + * @return The jsonData. + */ + java.lang.String getJsonData(); + /** + * + * + *
+   * The JSON string representation of the document. It should conform to the
+   * registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an
+   * `INVALID_ARGUMENT` error is thrown.
+   * 
+ * + * string json_data = 5; + * + * @return The bytes for jsonData. + */ + com.google.protobuf.ByteString getJsonDataBytes(); + + /** + * + * + *
+   * Immutable. The full resource name of the document.
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The full resource name of the document.
+   * Format:
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The identifier of the document.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Immutable. The identifier of the document.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The identifier of the schema located in the same data store.
+   * 
+ * + * string schema_id = 3; + * + * @return The schemaId. + */ + java.lang.String getSchemaId(); + /** + * + * + *
+   * The identifier of the schema located in the same data store.
+   * 
+ * + * string schema_id = 3; + * + * @return The bytes for schemaId. + */ + com.google.protobuf.ByteString getSchemaIdBytes(); + + /** + * + * + *
+   * The unstructured data linked to this document. Content must be set if this
+   * document is under a
+   * `CONTENT_REQUIRED` data store.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + * + * @return Whether the content field is set. + */ + boolean hasContent(); + /** + * + * + *
+   * The unstructured data linked to this document. Content must be set if this
+   * document is under a
+   * `CONTENT_REQUIRED` data store.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + * + * @return The content. + */ + com.google.cloud.discoveryengine.v1alpha.Document.Content getContent(); + /** + * + * + *
+   * The unstructured data linked to this document. Content must be set if this
+   * document is under a
+   * `CONTENT_REQUIRED` data store.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document.Content content = 10; + */ + com.google.cloud.discoveryengine.v1alpha.Document.ContentOrBuilder getContentOrBuilder(); + + /** + * + * + *
+   * The identifier of the parent document. Currently supports at most two level
+   * document hierarchy.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string parent_document_id = 7; + * + * @return The parentDocumentId. + */ + java.lang.String getParentDocumentId(); + /** + * + * + *
+   * The identifier of the parent document. Currently supports at most two level
+   * document hierarchy.
+   *
+   * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+   * standard with a length limit of 63 characters.
+   * 
+ * + * string parent_document_id = 7; + * + * @return The bytes for parentDocumentId. + */ + com.google.protobuf.ByteString getParentDocumentIdBytes(); + + /** + * + * + *
+   * Output only. This field is OUTPUT_ONLY.
+   * It contains derived data that are not in the original input document.
+   * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedStructData field is set. + */ + boolean hasDerivedStructData(); + /** + * + * + *
+   * Output only. This field is OUTPUT_ONLY.
+   * It contains derived data that are not in the original input document.
+   * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedStructData. + */ + com.google.protobuf.Struct getDerivedStructData(); + /** + * + * + *
+   * Output only. This field is OUTPUT_ONLY.
+   * It contains derived data that are not in the original input document.
+   * 
+ * + * + * .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder(); + + com.google.cloud.discoveryengine.v1alpha.Document.DataCase getDataCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentProto.java new file mode 100644 index 000000000000..b5c327f66c0c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentProto.java @@ -0,0 +1,123 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class DocumentProto { + private DocumentProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Document_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Document_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/discoveryengine/v1alpha/d" + + "ocument.proto\022$google.cloud.discoveryeng" + + "ine.v1alpha\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032\034google/" + + "protobuf/struct.proto\"\227\005\n\010Document\022.\n\013st" + + "ruct_data\030\004 \001(\0132\027.google.protobuf.Struct" + + "H\000\022\023\n\tjson_data\030\005 \001(\tH\000\022\022\n\004name\030\001 \001(\tB\004\342" + + "A\001\005\022\020\n\002id\030\002 \001(\tB\004\342A\001\005\022\021\n\tschema_id\030\003 \001(\t" + + "\022G\n\007content\030\n \001(\01326.google.cloud.discove" + + "ryengine.v1alpha.Document.Content\022\032\n\022par" + + "ent_document_id\030\007 \001(\t\022:\n\023derived_struct_" + + "data\030\006 \001(\0132\027.google.protobuf.StructB\004\342A\001" + + "\003\032K\n\007Content\022\023\n\traw_bytes\030\002 \001(\014H\000\022\r\n\003uri" + + "\030\003 \001(\tH\000\022\021\n\tmime_type\030\001 \001(\tB\t\n\007content:\226" + + "\002\352A\222\002\n\'discoveryengine.googleapis.com/Do" + + "cument\022fprojects/{project}/locations/{lo" + + "cation}/dataStores/{data_store}/branches" + + "/{branch}/documents/{document}\022\177projects" + + "/{project}/locations/{location}/collecti" + + "ons/{collection}/dataStores/{data_store}" + + "/branches/{branch}/documents/{document}B" + + "\006\n\004dataB\231\002\n(com.google.cloud.discoveryen" + + "gine.v1alphaB\rDocumentProtoP\001ZRcloud.goo" + + "gle.com/go/discoveryengine/apiv1alpha/di" + + "scoveryenginepb;discoveryenginepb\242\002\017DISC" + + "OVERYENGINE\252\002$Google.Cloud.DiscoveryEngi" + + "ne.V1Alpha\312\002$Google\\Cloud\\DiscoveryEngin" + + "e\\V1alpha\352\002\'Google::Cloud::DiscoveryEngi" + + "ne::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_Document_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_Document_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Document_descriptor, + new java.lang.String[] { + "StructData", + "JsonData", + "Name", + "Id", + "SchemaId", + "Content", + "ParentDocumentId", + "DerivedStructData", + "Data", + }); + internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_Document_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Document_Content_descriptor, + new java.lang.String[] { + "RawBytes", "Uri", "MimeType", "Content", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceProto.java new file mode 100644 index 000000000000..a009c67d79eb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DocumentServiceProto.java @@ -0,0 +1,251 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class DocumentServiceProto { + private DocumentServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_GetDocumentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_GetDocumentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CreateDocumentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CreateDocumentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_UpdateDocumentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_UpdateDocumentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_DeleteDocumentRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n;google/cloud/discoveryengine/v1alpha/d" + + "ocument_service.proto\022$google.cloud.disc" + + "overyengine.v1alpha\032\034google/api/annotati" + + "ons.proto\032\027google/api/client.proto\032\037goog" + + "le/api/field_behavior.proto\032\031google/api/" + + "resource.proto\0323google/cloud/discoveryen" + + "gine/v1alpha/document.proto\0328google/clou" + + "d/discoveryengine/v1alpha/import_config." + + "proto\0327google/cloud/discoveryengine/v1al" + + "pha/purge_config.proto\032#google/longrunni" + + "ng/operations.proto\032\033google/protobuf/emp" + + "ty.proto\"T\n\022GetDocumentRequest\022>\n\004name\030\001" + + " \001(\tB0\342A\001\002\372A)\n\'discoveryengine.googleapi" + + "s.com/Document\"}\n\024ListDocumentsRequest\022>" + + "\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%discoveryengine" + + ".googleapis.com/Branch\022\021\n\tpage_size\030\002 \001(" + + "\005\022\022\n\npage_token\030\003 \001(\t\"s\n\025ListDocumentsRe" + + "sponse\022A\n\tdocuments\030\001 \003(\0132..google.cloud" + + ".discoveryengine.v1alpha.Document\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"\272\001\n\025CreateDocumentReq" + + "uest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%discovery" + + "engine.googleapis.com/Branch\022F\n\010document" + + "\030\002 \001(\0132..google.cloud.discoveryengine.v1" + + "alpha.DocumentB\004\342A\001\002\022\031\n\013document_id\030\003 \001(" + + "\tB\004\342A\001\002\"v\n\025UpdateDocumentRequest\022F\n\010docu" + + "ment\030\001 \001(\0132..google.cloud.discoveryengin" + + "e.v1alpha.DocumentB\004\342A\001\002\022\025\n\rallow_missin" + + "g\030\002 \001(\010\"W\n\025DeleteDocumentRequest\022>\n\004name" + + "\030\001 \001(\tB0\342A\001\002\372A)\n\'discoveryengine.googlea" + + "pis.com/Document2\241\024\n\017DocumentService\022\260\002\n" + + "\013GetDocument\0228.google.cloud.discoveryeng" + + "ine.v1alpha.GetDocumentRequest\032..google." + + "cloud.discoveryengine.v1alpha.Document\"\266" + + "\001\332A\004name\202\323\344\223\002\250\001\022J/v1alpha/{name=projects" + + "/*/locations/*/dataStores/*/branches/*/d" + + "ocuments/*}ZZ\022X/v1alpha/{name=projects/*" + + "/locations/*/collections/*/dataStores/*/" + + "branches/*/documents/*}\022\303\002\n\rListDocument" + + "s\022:.google.cloud.discoveryengine.v1alpha" + + ".ListDocumentsRequest\032;.google.cloud.dis" + + "coveryengine.v1alpha.ListDocumentsRespon" + + "se\"\270\001\332A\006parent\202\323\344\223\002\250\001\022J/v1alpha/{parent=" + + "projects/*/locations/*/dataStores/*/bran" + + "ches/*}/documentsZZ\022X/v1alpha/{parent=pr" + + "ojects/*/locations/*/collections/*/dataS" + + "tores/*/branches/*}/documents\022\341\002\n\016Create" + + "Document\022;.google.cloud.discoveryengine." + + "v1alpha.CreateDocumentRequest\032..google.c" + + "loud.discoveryengine.v1alpha.Document\"\341\001" + + "\332A\033parent,document,document_id\202\323\344\223\002\274\001\"J/" + + "v1alpha/{parent=projects/*/locations/*/d" + + "ataStores/*/branches/*}/documents:\010docum" + + "entZd\"X/v1alpha/{parent=projects/*/locat" + + "ions/*/collections/*/dataStores/*/branch" + + "es/*}/documents:\010document\022\325\002\n\016UpdateDocu" + + "ment\022;.google.cloud.discoveryengine.v1al" + + "pha.UpdateDocumentRequest\032..google.cloud" + + ".discoveryengine.v1alpha.Document\"\325\001\202\323\344\223" + + "\002\316\0012S/v1alpha/{document.name=projects/*/" + + "locations/*/dataStores/*/branches/*/docu" + + "ments/*}:\010documentZm2a/v1alpha/{document" + + ".name=projects/*/locations/*/collections" + + "/*/dataStores/*/branches/*/documents/*}:" + + "\010document\022\236\002\n\016DeleteDocument\022;.google.cl" + + "oud.discoveryengine.v1alpha.DeleteDocume" + + "ntRequest\032\026.google.protobuf.Empty\"\266\001\332A\004n" + + "ame\202\323\344\223\002\250\001*J/v1alpha/{name=projects/*/lo" + + "cations/*/dataStores/*/branches/*/docume" + + "nts/*}ZZ*X/v1alpha/{name=projects/*/loca" + + "tions/*/collections/*/dataStores/*/branc" + + "hes/*/documents/*}\022\263\003\n\017ImportDocuments\022<" + + ".google.cloud.discoveryengine.v1alpha.Im" + + "portDocumentsRequest\032\035.google.longrunnin" + + "g.Operation\"\302\002\312A|\n + * Double list. + * + * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DoubleList} + */ +public final class DoubleList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.DoubleList) + DoubleListOrBuilder { + private static final long serialVersionUID = 0L; + // Use DoubleList.newBuilder() to construct. + private DoubleList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DoubleList() { + values_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DoubleList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DoubleList.class, + com.google.cloud.discoveryengine.v1alpha.DoubleList.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.DoubleList values_; + /** + * + * + *
+   * Double values.
+   * 
+ * + * repeated double values = 1; + * + * @return A list containing the values. + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+   * Double values.
+   * 
+ * + * repeated double values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+   * Double values.
+   * 
+ * + * repeated double values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public double getValues(int index) { + return values_.getDouble(index); + } + + private int valuesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getValuesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(valuesMemoizedSerializedSize); + } + for (int i = 0; i < values_.size(); i++) { + output.writeDoubleNoTag(values_.getDouble(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 8 * getValuesList().size(); + size += dataSize; + if (!getValuesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + valuesMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.DoubleList)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.DoubleList other = + (com.google.cloud.discoveryengine.v1alpha.DoubleList) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.DoubleList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Double list.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.DoubleList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.DoubleList) + com.google.cloud.discoveryengine.v1alpha.DoubleListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.DoubleList.class, + com.google.cloud.discoveryengine.v1alpha.DoubleList.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.DoubleList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + values_ = emptyDoubleList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_DoubleList_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DoubleList getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.DoubleList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DoubleList build() { + com.google.cloud.discoveryengine.v1alpha.DoubleList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DoubleList buildPartial() { + com.google.cloud.discoveryengine.v1alpha.DoubleList result = + new com.google.cloud.discoveryengine.v1alpha.DoubleList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.DoubleList result) { + if (((bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.DoubleList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.DoubleList) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.DoubleList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.DoubleList other) { + if (other == com.google.cloud.discoveryengine.v1alpha.DoubleList.getDefaultInstance()) + return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + double v = input.readDouble(); + ensureValuesIsMutable(); + values_.addDouble(v); + break; + } // case 9 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureValuesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + values_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.DoubleList values_ = emptyDoubleList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = mutableCopy(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Double values.
+     * 
+ * + * repeated double values = 1; + * + * @return A list containing the values. + */ + public java.util.List getValuesList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(values_) + : values_; + } + /** + * + * + *
+     * Double values.
+     * 
+ * + * repeated double values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+     * Double values.
+     * 
+ * + * repeated double values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public double getValues(int index) { + return values_.getDouble(index); + } + /** + * + * + *
+     * Double values.
+     * 
+ * + * repeated double values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, double value) { + + ensureValuesIsMutable(); + values_.setDouble(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Double values.
+     * 
+ * + * repeated double values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(double value) { + + ensureValuesIsMutable(); + values_.addDouble(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Double values.
+     * 
+ * + * repeated double values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+     * Double values.
+     * 
+ * + * repeated double values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.DoubleList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.DoubleList) + private static final com.google.cloud.discoveryengine.v1alpha.DoubleList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.DoubleList(); + } + + public static com.google.cloud.discoveryengine.v1alpha.DoubleList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DoubleList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DoubleList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DoubleListOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DoubleListOrBuilder.java new file mode 100644 index 000000000000..64cbfb38c505 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DoubleListOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface DoubleListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.DoubleList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Double values.
+   * 
+ * + * repeated double values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+   * Double values.
+   * 
+ * + * repeated double values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+   * Double values.
+   * 
+ * + * repeated double values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + double getValues(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FieldConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FieldConfig.java new file mode 100644 index 000000000000..63f8a6512c8f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FieldConfig.java @@ -0,0 +1,4108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Configurations for fields of a schema. For example, configuring a field is
+ * indexable, or searchable.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.FieldConfig} + */ +public final class FieldConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.FieldConfig) + FieldConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldConfig.newBuilder() to construct. + private FieldConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FieldConfig() { + fieldPath_ = ""; + fieldType_ = 0; + indexableOption_ = 0; + dynamicFacetableOption_ = 0; + searchableOption_ = 0; + retrievableOption_ = 0; + completableOption_ = 0; + recsFilterableOption_ = 0; + keyPropertyType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FieldConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.class, + com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder.class); + } + + /** + * + * + *
+   * Field value type in the Schema.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType} + */ + public enum FieldType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Field type is unspecified.
+     * 
+ * + * FIELD_TYPE_UNSPECIFIED = 0; + */ + FIELD_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Field value type is Object.
+     * 
+ * + * OBJECT = 1; + */ + OBJECT(1), + /** + * + * + *
+     * Field value type is String.
+     * 
+ * + * STRING = 2; + */ + STRING(2), + /** + * + * + *
+     * Field value type is Number.
+     * 
+ * + * NUMBER = 3; + */ + NUMBER(3), + /** + * + * + *
+     * Field value type is Integer.
+     * 
+ * + * INTEGER = 4; + */ + INTEGER(4), + /** + * + * + *
+     * Field value type is Boolean.
+     * 
+ * + * BOOLEAN = 5; + */ + BOOLEAN(5), + /** + * + * + *
+     * Field value type is Geolocation.
+     * 
+ * + * GEOLOCATION = 6; + */ + GEOLOCATION(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Field type is unspecified.
+     * 
+ * + * FIELD_TYPE_UNSPECIFIED = 0; + */ + public static final int FIELD_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Field value type is Object.
+     * 
+ * + * OBJECT = 1; + */ + public static final int OBJECT_VALUE = 1; + /** + * + * + *
+     * Field value type is String.
+     * 
+ * + * STRING = 2; + */ + public static final int STRING_VALUE = 2; + /** + * + * + *
+     * Field value type is Number.
+     * 
+ * + * NUMBER = 3; + */ + public static final int NUMBER_VALUE = 3; + /** + * + * + *
+     * Field value type is Integer.
+     * 
+ * + * INTEGER = 4; + */ + public static final int INTEGER_VALUE = 4; + /** + * + * + *
+     * Field value type is Boolean.
+     * 
+ * + * BOOLEAN = 5; + */ + public static final int BOOLEAN_VALUE = 5; + /** + * + * + *
+     * Field value type is Geolocation.
+     * 
+ * + * GEOLOCATION = 6; + */ + public static final int GEOLOCATION_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FieldType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FieldType forNumber(int value) { + switch (value) { + case 0: + return FIELD_TYPE_UNSPECIFIED; + case 1: + return OBJECT; + case 2: + return STRING; + case 3: + return NUMBER; + case 4: + return INTEGER; + case 5: + return BOOLEAN; + case 6: + return GEOLOCATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FieldType findValueByNumber(int number) { + return FieldType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FieldType[] VALUES = values(); + + public static FieldType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FieldType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType) + } + + /** + * + * + *
+   * The setting of Indexable options in schema.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption} + */ + public enum IndexableOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * INDEXABLE_OPTION_UNSPECIFIED = 0; + */ + INDEXABLE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Indexable option enabled for a schema field.
+     * 
+ * + * INDEXABLE_ENABLED = 1; + */ + INDEXABLE_ENABLED(1), + /** + * + * + *
+     * Indexable option disabled for a schema field.
+     * 
+ * + * INDEXABLE_DISABLED = 2; + */ + INDEXABLE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * INDEXABLE_OPTION_UNSPECIFIED = 0; + */ + public static final int INDEXABLE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Indexable option enabled for a schema field.
+     * 
+ * + * INDEXABLE_ENABLED = 1; + */ + public static final int INDEXABLE_ENABLED_VALUE = 1; + /** + * + * + *
+     * Indexable option disabled for a schema field.
+     * 
+ * + * INDEXABLE_DISABLED = 2; + */ + public static final int INDEXABLE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IndexableOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static IndexableOption forNumber(int value) { + switch (value) { + case 0: + return INDEXABLE_OPTION_UNSPECIFIED; + case 1: + return INDEXABLE_ENABLED; + case 2: + return INDEXABLE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IndexableOption findValueByNumber(int number) { + return IndexableOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final IndexableOption[] VALUES = values(); + + public static IndexableOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private IndexableOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption) + } + + /** + * + * + *
+   * The status of the dynamic facetable option of a schema field.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption} + */ + public enum DynamicFacetableOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0; + */ + DYNAMIC_FACETABLE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Dynamic facetable option enabled for a schema field.
+     * 
+ * + * DYNAMIC_FACETABLE_ENABLED = 1; + */ + DYNAMIC_FACETABLE_ENABLED(1), + /** + * + * + *
+     * Dynamic facetable option disabled for a schema field.
+     * 
+ * + * DYNAMIC_FACETABLE_DISABLED = 2; + */ + DYNAMIC_FACETABLE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0; + */ + public static final int DYNAMIC_FACETABLE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Dynamic facetable option enabled for a schema field.
+     * 
+ * + * DYNAMIC_FACETABLE_ENABLED = 1; + */ + public static final int DYNAMIC_FACETABLE_ENABLED_VALUE = 1; + /** + * + * + *
+     * Dynamic facetable option disabled for a schema field.
+     * 
+ * + * DYNAMIC_FACETABLE_DISABLED = 2; + */ + public static final int DYNAMIC_FACETABLE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DynamicFacetableOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DynamicFacetableOption forNumber(int value) { + switch (value) { + case 0: + return DYNAMIC_FACETABLE_OPTION_UNSPECIFIED; + case 1: + return DYNAMIC_FACETABLE_ENABLED; + case 2: + return DYNAMIC_FACETABLE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DynamicFacetableOption findValueByNumber(int number) { + return DynamicFacetableOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final DynamicFacetableOption[] VALUES = values(); + + public static DynamicFacetableOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DynamicFacetableOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption) + } + + /** + * + * + *
+   * The setting of Searchable options in schema.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption} + */ + public enum SearchableOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * SEARCHABLE_OPTION_UNSPECIFIED = 0; + */ + SEARCHABLE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Searchable option enabled for a schema field.
+     * 
+ * + * SEARCHABLE_ENABLED = 1; + */ + SEARCHABLE_ENABLED(1), + /** + * + * + *
+     * Searchable option disabled for a schema field.
+     * 
+ * + * SEARCHABLE_DISABLED = 2; + */ + SEARCHABLE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * SEARCHABLE_OPTION_UNSPECIFIED = 0; + */ + public static final int SEARCHABLE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Searchable option enabled for a schema field.
+     * 
+ * + * SEARCHABLE_ENABLED = 1; + */ + public static final int SEARCHABLE_ENABLED_VALUE = 1; + /** + * + * + *
+     * Searchable option disabled for a schema field.
+     * 
+ * + * SEARCHABLE_DISABLED = 2; + */ + public static final int SEARCHABLE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SearchableOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SearchableOption forNumber(int value) { + switch (value) { + case 0: + return SEARCHABLE_OPTION_UNSPECIFIED; + case 1: + return SEARCHABLE_ENABLED; + case 2: + return SEARCHABLE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SearchableOption findValueByNumber(int number) { + return SearchableOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final SearchableOption[] VALUES = values(); + + public static SearchableOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SearchableOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption) + } + + /** + * + * + *
+   * The setting of Retrievable options in schema.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption} + */ + public enum RetrievableOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * RETRIEVABLE_OPTION_UNSPECIFIED = 0; + */ + RETRIEVABLE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Retrievable option enabled for a schema field.
+     * 
+ * + * RETRIEVABLE_ENABLED = 1; + */ + RETRIEVABLE_ENABLED(1), + /** + * + * + *
+     * Retrievable option disabled for a schema field.
+     * 
+ * + * RETRIEVABLE_DISABLED = 2; + */ + RETRIEVABLE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * RETRIEVABLE_OPTION_UNSPECIFIED = 0; + */ + public static final int RETRIEVABLE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Retrievable option enabled for a schema field.
+     * 
+ * + * RETRIEVABLE_ENABLED = 1; + */ + public static final int RETRIEVABLE_ENABLED_VALUE = 1; + /** + * + * + *
+     * Retrievable option disabled for a schema field.
+     * 
+ * + * RETRIEVABLE_DISABLED = 2; + */ + public static final int RETRIEVABLE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RetrievableOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RetrievableOption forNumber(int value) { + switch (value) { + case 0: + return RETRIEVABLE_OPTION_UNSPECIFIED; + case 1: + return RETRIEVABLE_ENABLED; + case 2: + return RETRIEVABLE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RetrievableOption findValueByNumber(int number) { + return RetrievableOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDescriptor() + .getEnumTypes() + .get(4); + } + + private static final RetrievableOption[] VALUES = values(); + + public static RetrievableOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RetrievableOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption) + } + + /** + * + * + *
+   * The setting of Completable options in schema.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption} + */ + public enum CompletableOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * COMPLETABLE_OPTION_UNSPECIFIED = 0; + */ + COMPLETABLE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Completable option enabled for a schema field.
+     * 
+ * + * COMPLETABLE_ENABLED = 1; + */ + COMPLETABLE_ENABLED(1), + /** + * + * + *
+     * Completable option disabled for a schema field.
+     * 
+ * + * COMPLETABLE_DISABLED = 2; + */ + COMPLETABLE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * COMPLETABLE_OPTION_UNSPECIFIED = 0; + */ + public static final int COMPLETABLE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Completable option enabled for a schema field.
+     * 
+ * + * COMPLETABLE_ENABLED = 1; + */ + public static final int COMPLETABLE_ENABLED_VALUE = 1; + /** + * + * + *
+     * Completable option disabled for a schema field.
+     * 
+ * + * COMPLETABLE_DISABLED = 2; + */ + public static final int COMPLETABLE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompletableOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompletableOption forNumber(int value) { + switch (value) { + case 0: + return COMPLETABLE_OPTION_UNSPECIFIED; + case 1: + return COMPLETABLE_ENABLED; + case 2: + return COMPLETABLE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompletableOption findValueByNumber(int number) { + return CompletableOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDescriptor() + .getEnumTypes() + .get(5); + } + + private static final CompletableOption[] VALUES = values(); + + public static CompletableOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompletableOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption) + } + + /** + * + * + *
+   * Sets the filterable option for schema fields.
+   * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption} + */ + public enum FilterableOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * FILTERABLE_OPTION_UNSPECIFIED = 0; + */ + FILTERABLE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Filterable option enabled for a schema field.
+     * 
+ * + * FILTERABLE_ENABLED = 1; + */ + FILTERABLE_ENABLED(1), + /** + * + * + *
+     * Filterable option disabled for a schema field.
+     * 
+ * + * FILTERABLE_DISABLED = 2; + */ + FILTERABLE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Value used when unset.
+     * 
+ * + * FILTERABLE_OPTION_UNSPECIFIED = 0; + */ + public static final int FILTERABLE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Filterable option enabled for a schema field.
+     * 
+ * + * FILTERABLE_ENABLED = 1; + */ + public static final int FILTERABLE_ENABLED_VALUE = 1; + /** + * + * + *
+     * Filterable option disabled for a schema field.
+     * 
+ * + * FILTERABLE_DISABLED = 2; + */ + public static final int FILTERABLE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FilterableOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FilterableOption forNumber(int value) { + switch (value) { + case 0: + return FILTERABLE_OPTION_UNSPECIFIED; + case 1: + return FILTERABLE_ENABLED; + case 2: + return FILTERABLE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FilterableOption findValueByNumber(int number) { + return FilterableOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDescriptor() + .getEnumTypes() + .get(6); + } + + private static final FilterableOption[] VALUES = values(); + + public static FilterableOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FilterableOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption) + } + + public static final int FIELD_PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldPath_ = ""; + /** + * + * + *
+   * Required. Field path of the schema field.
+   * For example: `title`, `description`, `release_info.release_year`.
+   * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldPath. + */ + @java.lang.Override + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Field path of the schema field.
+   * For example: `title`, `description`, `release_info.release_year`.
+   * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIELD_TYPE_FIELD_NUMBER = 2; + private int fieldType_ = 0; + /** + * + * + *
+   * Output only. Raw type of the field.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for fieldType. + */ + @java.lang.Override + public int getFieldTypeValue() { + return fieldType_; + } + /** + * + * + *
+   * Output only. Raw type of the field.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fieldType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType getFieldType() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType.forNumber(fieldType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType.UNRECOGNIZED + : result; + } + + public static final int INDEXABLE_OPTION_FIELD_NUMBER = 3; + private int indexableOption_ = 0; + /** + * + * + *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+   * field values are indexed so that it can be filtered or faceted in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is unset, the server behavior defaults to
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+   * for fields that support setting indexable options. For those fields that do
+   * not support setting indexable options, such as `object` and `boolean` and
+   * key properties, the server will skip
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * setting, and setting
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @return The enum numeric value on the wire for indexableOption. + */ + @java.lang.Override + public int getIndexableOptionValue() { + return indexableOption_; + } + /** + * + * + *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+   * field values are indexed so that it can be filtered or faceted in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is unset, the server behavior defaults to
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+   * for fields that support setting indexable options. For those fields that do
+   * not support setting indexable options, such as `object` and `boolean` and
+   * key properties, the server will skip
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * setting, and setting
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @return The indexableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption getIndexableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.forNumber( + indexableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.UNRECOGNIZED + : result; + } + + public static final int DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER = 4; + private int dynamicFacetableOption_ = 0; + /** + * + * + *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is
+   * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+   * field values are available for dynamic facet. Could only be
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * if
+   * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+   * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+   *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is unset, the server behavior defaults to
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * for fields that support setting dynamic facetable options. For those fields
+   * that do not support setting dynamic facetable options, such as `object` and
+   * `boolean`, the server will skip dynamic facetable option setting, and
+   * setting
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @return The enum numeric value on the wire for dynamicFacetableOption. + */ + @java.lang.Override + public int getDynamicFacetableOptionValue() { + return dynamicFacetableOption_; + } + /** + * + * + *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is
+   * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+   * field values are available for dynamic facet. Could only be
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * if
+   * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+   * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+   *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is unset, the server behavior defaults to
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * for fields that support setting dynamic facetable options. For those fields
+   * that do not support setting dynamic facetable options, such as `object` and
+   * `boolean`, the server will skip dynamic facetable option setting, and
+   * setting
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @return The dynamicFacetableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption + getDynamicFacetableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.forNumber( + dynamicFacetableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.UNRECOGNIZED + : result; + } + + public static final int SEARCHABLE_OPTION_FIELD_NUMBER = 5; + private int searchableOption_ = 0; + /** + * + * + *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+   * field values are searchable by text queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+   * but field type is numerical, field values will not be searchable by text
+   * queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+   * as there are no text values associated to numerical fields.
+   *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is unset, the server behavior defaults to
+   * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+   * for fields that support setting searchable options. Only `string` fields
+   * that have no key property mapping support setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+   *
+   * For those fields that do not support setting searchable options, the server
+   * will skip searchable option setting, and setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @return The enum numeric value on the wire for searchableOption. + */ + @java.lang.Override + public int getSearchableOptionValue() { + return searchableOption_; + } + /** + * + * + *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+   * field values are searchable by text queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+   * but field type is numerical, field values will not be searchable by text
+   * queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+   * as there are no text values associated to numerical fields.
+   *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is unset, the server behavior defaults to
+   * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+   * for fields that support setting searchable options. Only `string` fields
+   * that have no key property mapping support setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+   *
+   * For those fields that do not support setting searchable options, the server
+   * will skip searchable option setting, and setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @return The searchableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption + getSearchableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.forNumber( + searchableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.UNRECOGNIZED + : result; + } + + public static final int RETRIEVABLE_OPTION_FIELD_NUMBER = 6; + private int retrievableOption_ = 0; + /** + * + * + *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is
+   * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+   * field values are included in the search results.
+   *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is unset, the server behavior defaults to
+   * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+   * for fields that support setting retrievable options. For those fields
+   * that do not support setting retrievable options, such as `object` and
+   * `boolean`, the server will skip retrievable option setting, and setting
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @return The enum numeric value on the wire for retrievableOption. + */ + @java.lang.Override + public int getRetrievableOptionValue() { + return retrievableOption_; + } + /** + * + * + *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is
+   * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+   * field values are included in the search results.
+   *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is unset, the server behavior defaults to
+   * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+   * for fields that support setting retrievable options. For those fields
+   * that do not support setting retrievable options, such as `object` and
+   * `boolean`, the server will skip retrievable option setting, and setting
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @return The retrievableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption + getRetrievableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.forNumber( + retrievableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.UNRECOGNIZED + : result; + } + + public static final int COMPLETABLE_OPTION_FIELD_NUMBER = 8; + private int completableOption_ = 0; + /** + * + * + *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is
+   * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+   * field values are directly used and returned as suggestions for Autocomplete
+   * in
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+   *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is unset, the server behavior defaults to
+   * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+   * for fields that support setting completable options, which are just
+   * `string` fields. For those fields that do not support setting completable
+   * options, the server will skip completable option setting, and setting
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @return The enum numeric value on the wire for completableOption. + */ + @java.lang.Override + public int getCompletableOptionValue() { + return completableOption_; + } + /** + * + * + *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is
+   * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+   * field values are directly used and returned as suggestions for Autocomplete
+   * in
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+   *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is unset, the server behavior defaults to
+   * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+   * for fields that support setting completable options, which are just
+   * `string` fields. For those fields that do not support setting completable
+   * options, the server will skip completable option setting, and setting
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @return The completableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption + getCompletableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.forNumber( + completableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.UNRECOGNIZED + : result; + } + + public static final int RECS_FILTERABLE_OPTION_FIELD_NUMBER = 9; + private int recsFilterableOption_ = 0; + /** + * + * + *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+   * field values are filterable by filter expression in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   *
+   * If
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+   * but the field type is numerical, field values are not filterable by text
+   * queries in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * Only textual fields are supported.
+   *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is unset, the default setting is
+   * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+   * for fields that support setting filterable options.
+   *
+   * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+   * generated and an empty result is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @return The enum numeric value on the wire for recsFilterableOption. + */ + @java.lang.Override + public int getRecsFilterableOptionValue() { + return recsFilterableOption_; + } + /** + * + * + *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+   * field values are filterable by filter expression in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   *
+   * If
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+   * but the field type is numerical, field values are not filterable by text
+   * queries in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * Only textual fields are supported.
+   *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is unset, the default setting is
+   * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+   * for fields that support setting filterable options.
+   *
+   * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+   * generated and an empty result is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @return The recsFilterableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption + getRecsFilterableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.forNumber( + recsFilterableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.UNRECOGNIZED + : result; + } + + public static final int KEY_PROPERTY_TYPE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object keyPropertyType_ = ""; + /** + * + * + *
+   * Output only. Type of the key property that this field is mapped to. Empty
+   * string if this is not annotated as mapped to a key property.
+   *
+   * Example types are `title`, `description`. Full list is defined
+   * by `keyPropertyMapping` in the schema field annotation.
+   *
+   * If the schema field has a `KeyPropertyMapping` annotation,
+   * `indexable_option` and `searchable_option` of this field cannot be
+   * modified.
+   * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The keyPropertyType. + */ + @java.lang.Override + public java.lang.String getKeyPropertyType() { + java.lang.Object ref = keyPropertyType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyPropertyType_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Type of the key property that this field is mapped to. Empty
+   * string if this is not annotated as mapped to a key property.
+   *
+   * Example types are `title`, `description`. Full list is defined
+   * by `keyPropertyMapping` in the schema field annotation.
+   *
+   * If the schema field has a `KeyPropertyMapping` annotation,
+   * `indexable_option` and `searchable_option` of this field cannot be
+   * modified.
+   * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for keyPropertyType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyPropertyTypeBytes() { + java.lang.Object ref = keyPropertyType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyPropertyType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldPath_); + } + if (fieldType_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType.FIELD_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, fieldType_); + } + if (indexableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption + .INDEXABLE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, indexableOption_); + } + if (dynamicFacetableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption + .DYNAMIC_FACETABLE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, dynamicFacetableOption_); + } + if (searchableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption + .SEARCHABLE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, searchableOption_); + } + if (retrievableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption + .RETRIEVABLE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, retrievableOption_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPropertyType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, keyPropertyType_); + } + if (completableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption + .COMPLETABLE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, completableOption_); + } + if (recsFilterableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption + .FILTERABLE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, recsFilterableOption_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldPath_); + } + if (fieldType_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType.FIELD_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, fieldType_); + } + if (indexableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption + .INDEXABLE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, indexableOption_); + } + if (dynamicFacetableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption + .DYNAMIC_FACETABLE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, dynamicFacetableOption_); + } + if (searchableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption + .SEARCHABLE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, searchableOption_); + } + if (retrievableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption + .RETRIEVABLE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, retrievableOption_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPropertyType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, keyPropertyType_); + } + if (completableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption + .COMPLETABLE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, completableOption_); + } + if (recsFilterableOption_ + != com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption + .FILTERABLE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, recsFilterableOption_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.FieldConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.FieldConfig other = + (com.google.cloud.discoveryengine.v1alpha.FieldConfig) obj; + + if (!getFieldPath().equals(other.getFieldPath())) return false; + if (fieldType_ != other.fieldType_) return false; + if (indexableOption_ != other.indexableOption_) return false; + if (dynamicFacetableOption_ != other.dynamicFacetableOption_) return false; + if (searchableOption_ != other.searchableOption_) return false; + if (retrievableOption_ != other.retrievableOption_) return false; + if (completableOption_ != other.completableOption_) return false; + if (recsFilterableOption_ != other.recsFilterableOption_) return false; + if (!getKeyPropertyType().equals(other.getKeyPropertyType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); + hash = (37 * hash) + FIELD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + fieldType_; + hash = (37 * hash) + INDEXABLE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + indexableOption_; + hash = (37 * hash) + DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + dynamicFacetableOption_; + hash = (37 * hash) + SEARCHABLE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + searchableOption_; + hash = (37 * hash) + RETRIEVABLE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + retrievableOption_; + hash = (37 * hash) + COMPLETABLE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + completableOption_; + hash = (37 * hash) + RECS_FILTERABLE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + recsFilterableOption_; + hash = (37 * hash) + KEY_PROPERTY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getKeyPropertyType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.FieldConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configurations for fields of a schema. For example, configuring a field is
+   * indexable, or searchable.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.FieldConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.FieldConfig) + com.google.cloud.discoveryengine.v1alpha.FieldConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.class, + com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.FieldConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldPath_ = ""; + fieldType_ = 0; + indexableOption_ = 0; + dynamicFacetableOption_ = 0; + searchableOption_ = 0; + retrievableOption_ = 0; + completableOption_ = 0; + recsFilterableOption_ = 0; + keyPropertyType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig build() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig buildPartial() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig result = + new com.google.cloud.discoveryengine.v1alpha.FieldConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.FieldConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldPath_ = fieldPath_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fieldType_ = fieldType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.indexableOption_ = indexableOption_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dynamicFacetableOption_ = dynamicFacetableOption_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.searchableOption_ = searchableOption_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.retrievableOption_ = retrievableOption_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.completableOption_ = completableOption_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.recsFilterableOption_ = recsFilterableOption_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.keyPropertyType_ = keyPropertyType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.FieldConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.FieldConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.FieldConfig other) { + if (other == com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDefaultInstance()) + return this; + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.fieldType_ != 0) { + setFieldTypeValue(other.getFieldTypeValue()); + } + if (other.indexableOption_ != 0) { + setIndexableOptionValue(other.getIndexableOptionValue()); + } + if (other.dynamicFacetableOption_ != 0) { + setDynamicFacetableOptionValue(other.getDynamicFacetableOptionValue()); + } + if (other.searchableOption_ != 0) { + setSearchableOptionValue(other.getSearchableOptionValue()); + } + if (other.retrievableOption_ != 0) { + setRetrievableOptionValue(other.getRetrievableOptionValue()); + } + if (other.completableOption_ != 0) { + setCompletableOptionValue(other.getCompletableOptionValue()); + } + if (other.recsFilterableOption_ != 0) { + setRecsFilterableOptionValue(other.getRecsFilterableOptionValue()); + } + if (!other.getKeyPropertyType().isEmpty()) { + keyPropertyType_ = other.keyPropertyType_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + fieldType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + indexableOption_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + dynamicFacetableOption_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + searchableOption_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + retrievableOption_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + keyPropertyType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 58 + case 64: + { + completableOption_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 72: + { + recsFilterableOption_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 72 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldPath_ = ""; + /** + * + * + *
+     * Required. Field path of the schema field.
+     * For example: `title`, `description`, `release_info.release_year`.
+     * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldPath. + */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Field path of the schema field.
+     * For example: `title`, `description`, `release_info.release_year`.
+     * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldPath. + */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Field path of the schema field.
+     * For example: `title`, `description`, `release_info.release_year`.
+     * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field path of the schema field.
+     * For example: `title`, `description`, `release_info.release_year`.
+     * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFieldPath() { + fieldPath_ = getDefaultInstance().getFieldPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field path of the schema field.
+     * For example: `title`, `description`, `release_info.release_year`.
+     * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int fieldType_ = 0; + /** + * + * + *
+     * Output only. Raw type of the field.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for fieldType. + */ + @java.lang.Override + public int getFieldTypeValue() { + return fieldType_; + } + /** + * + * + *
+     * Output only. Raw type of the field.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for fieldType to set. + * @return This builder for chaining. + */ + public Builder setFieldTypeValue(int value) { + fieldType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Raw type of the field.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fieldType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType getFieldType() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType.forNumber(fieldType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Raw type of the field.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The fieldType to set. + * @return This builder for chaining. + */ + public Builder setFieldType( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + fieldType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Raw type of the field.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFieldType() { + bitField0_ = (bitField0_ & ~0x00000002); + fieldType_ = 0; + onChanged(); + return this; + } + + private int indexableOption_ = 0; + /** + * + * + *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+     * field values are indexed so that it can be filtered or faceted in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is unset, the server behavior defaults to
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+     * for fields that support setting indexable options. For those fields that do
+     * not support setting indexable options, such as `object` and `boolean` and
+     * key properties, the server will skip
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * setting, and setting
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @return The enum numeric value on the wire for indexableOption. + */ + @java.lang.Override + public int getIndexableOptionValue() { + return indexableOption_; + } + /** + * + * + *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+     * field values are indexed so that it can be filtered or faceted in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is unset, the server behavior defaults to
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+     * for fields that support setting indexable options. For those fields that do
+     * not support setting indexable options, such as `object` and `boolean` and
+     * key properties, the server will skip
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * setting, and setting
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @param value The enum numeric value on the wire for indexableOption to set. + * @return This builder for chaining. + */ + public Builder setIndexableOptionValue(int value) { + indexableOption_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+     * field values are indexed so that it can be filtered or faceted in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is unset, the server behavior defaults to
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+     * for fields that support setting indexable options. For those fields that do
+     * not support setting indexable options, such as `object` and `boolean` and
+     * key properties, the server will skip
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * setting, and setting
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @return The indexableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption + getIndexableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.forNumber( + indexableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+     * field values are indexed so that it can be filtered or faceted in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is unset, the server behavior defaults to
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+     * for fields that support setting indexable options. For those fields that do
+     * not support setting indexable options, such as `object` and `boolean` and
+     * key properties, the server will skip
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * setting, and setting
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @param value The indexableOption to set. + * @return This builder for chaining. + */ + public Builder setIndexableOption( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + indexableOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+     * field values are indexed so that it can be filtered or faceted in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is unset, the server behavior defaults to
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+     * for fields that support setting indexable options. For those fields that do
+     * not support setting indexable options, such as `object` and `boolean` and
+     * key properties, the server will skip
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * setting, and setting
+     * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearIndexableOption() { + bitField0_ = (bitField0_ & ~0x00000004); + indexableOption_ = 0; + onChanged(); + return this; + } + + private int dynamicFacetableOption_ = 0; + /** + * + * + *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is
+     * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+     * field values are available for dynamic facet. Could only be
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * if
+     * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+     * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+     *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is unset, the server behavior defaults to
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * for fields that support setting dynamic facetable options. For those fields
+     * that do not support setting dynamic facetable options, such as `object` and
+     * `boolean`, the server will skip dynamic facetable option setting, and
+     * setting
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @return The enum numeric value on the wire for dynamicFacetableOption. + */ + @java.lang.Override + public int getDynamicFacetableOptionValue() { + return dynamicFacetableOption_; + } + /** + * + * + *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is
+     * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+     * field values are available for dynamic facet. Could only be
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * if
+     * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+     * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+     *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is unset, the server behavior defaults to
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * for fields that support setting dynamic facetable options. For those fields
+     * that do not support setting dynamic facetable options, such as `object` and
+     * `boolean`, the server will skip dynamic facetable option setting, and
+     * setting
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @param value The enum numeric value on the wire for dynamicFacetableOption to set. + * @return This builder for chaining. + */ + public Builder setDynamicFacetableOptionValue(int value) { + dynamicFacetableOption_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is
+     * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+     * field values are available for dynamic facet. Could only be
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * if
+     * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+     * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+     *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is unset, the server behavior defaults to
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * for fields that support setting dynamic facetable options. For those fields
+     * that do not support setting dynamic facetable options, such as `object` and
+     * `boolean`, the server will skip dynamic facetable option setting, and
+     * setting
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @return The dynamicFacetableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption + getDynamicFacetableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.forNumber( + dynamicFacetableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is
+     * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+     * field values are available for dynamic facet. Could only be
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * if
+     * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+     * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+     *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is unset, the server behavior defaults to
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * for fields that support setting dynamic facetable options. For those fields
+     * that do not support setting dynamic facetable options, such as `object` and
+     * `boolean`, the server will skip dynamic facetable option setting, and
+     * setting
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @param value The dynamicFacetableOption to set. + * @return This builder for chaining. + */ + public Builder setDynamicFacetableOption( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + dynamicFacetableOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is
+     * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+     * field values are available for dynamic facet. Could only be
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * if
+     * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+     * is
+     * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+     * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+     *
+     * If
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * is unset, the server behavior defaults to
+     * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+     * for fields that support setting dynamic facetable options. For those fields
+     * that do not support setting dynamic facetable options, such as `object` and
+     * `boolean`, the server will skip dynamic facetable option setting, and
+     * setting
+     * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearDynamicFacetableOption() { + bitField0_ = (bitField0_ & ~0x00000008); + dynamicFacetableOption_ = 0; + onChanged(); + return this; + } + + private int searchableOption_ = 0; + /** + * + * + *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+     * field values are searchable by text queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+     * but field type is numerical, field values will not be searchable by text
+     * queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+     * as there are no text values associated to numerical fields.
+     *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is unset, the server behavior defaults to
+     * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+     * for fields that support setting searchable options. Only `string` fields
+     * that have no key property mapping support setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+     *
+     * For those fields that do not support setting searchable options, the server
+     * will skip searchable option setting, and setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @return The enum numeric value on the wire for searchableOption. + */ + @java.lang.Override + public int getSearchableOptionValue() { + return searchableOption_; + } + /** + * + * + *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+     * field values are searchable by text queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+     * but field type is numerical, field values will not be searchable by text
+     * queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+     * as there are no text values associated to numerical fields.
+     *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is unset, the server behavior defaults to
+     * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+     * for fields that support setting searchable options. Only `string` fields
+     * that have no key property mapping support setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+     *
+     * For those fields that do not support setting searchable options, the server
+     * will skip searchable option setting, and setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @param value The enum numeric value on the wire for searchableOption to set. + * @return This builder for chaining. + */ + public Builder setSearchableOptionValue(int value) { + searchableOption_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+     * field values are searchable by text queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+     * but field type is numerical, field values will not be searchable by text
+     * queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+     * as there are no text values associated to numerical fields.
+     *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is unset, the server behavior defaults to
+     * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+     * for fields that support setting searchable options. Only `string` fields
+     * that have no key property mapping support setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+     *
+     * For those fields that do not support setting searchable options, the server
+     * will skip searchable option setting, and setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @return The searchableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption + getSearchableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.forNumber( + searchableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+     * field values are searchable by text queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+     * but field type is numerical, field values will not be searchable by text
+     * queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+     * as there are no text values associated to numerical fields.
+     *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is unset, the server behavior defaults to
+     * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+     * for fields that support setting searchable options. Only `string` fields
+     * that have no key property mapping support setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+     *
+     * For those fields that do not support setting searchable options, the server
+     * will skip searchable option setting, and setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @param value The searchableOption to set. + * @return This builder for chaining. + */ + public Builder setSearchableOption( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + searchableOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+     * field values are searchable by text queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * If
+     * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+     * but field type is numerical, field values will not be searchable by text
+     * queries in
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+     * as there are no text values associated to numerical fields.
+     *
+     * If
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * is unset, the server behavior defaults to
+     * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+     * for fields that support setting searchable options. Only `string` fields
+     * that have no key property mapping support setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+     *
+     * For those fields that do not support setting searchable options, the server
+     * will skip searchable option setting, and setting
+     * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearSearchableOption() { + bitField0_ = (bitField0_ & ~0x00000010); + searchableOption_ = 0; + onChanged(); + return this; + } + + private int retrievableOption_ = 0; + /** + * + * + *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is
+     * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+     * field values are included in the search results.
+     *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is unset, the server behavior defaults to
+     * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+     * for fields that support setting retrievable options. For those fields
+     * that do not support setting retrievable options, such as `object` and
+     * `boolean`, the server will skip retrievable option setting, and setting
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @return The enum numeric value on the wire for retrievableOption. + */ + @java.lang.Override + public int getRetrievableOptionValue() { + return retrievableOption_; + } + /** + * + * + *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is
+     * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+     * field values are included in the search results.
+     *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is unset, the server behavior defaults to
+     * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+     * for fields that support setting retrievable options. For those fields
+     * that do not support setting retrievable options, such as `object` and
+     * `boolean`, the server will skip retrievable option setting, and setting
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @param value The enum numeric value on the wire for retrievableOption to set. + * @return This builder for chaining. + */ + public Builder setRetrievableOptionValue(int value) { + retrievableOption_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is
+     * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+     * field values are included in the search results.
+     *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is unset, the server behavior defaults to
+     * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+     * for fields that support setting retrievable options. For those fields
+     * that do not support setting retrievable options, such as `object` and
+     * `boolean`, the server will skip retrievable option setting, and setting
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @return The retrievableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption + getRetrievableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.forNumber( + retrievableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is
+     * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+     * field values are included in the search results.
+     *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is unset, the server behavior defaults to
+     * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+     * for fields that support setting retrievable options. For those fields
+     * that do not support setting retrievable options, such as `object` and
+     * `boolean`, the server will skip retrievable option setting, and setting
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @param value The retrievableOption to set. + * @return This builder for chaining. + */ + public Builder setRetrievableOption( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + retrievableOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is
+     * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+     * field values are included in the search results.
+     *
+     * If
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * is unset, the server behavior defaults to
+     * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+     * for fields that support setting retrievable options. For those fields
+     * that do not support setting retrievable options, such as `object` and
+     * `boolean`, the server will skip retrievable option setting, and setting
+     * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @return This builder for chaining. + */ + public Builder clearRetrievableOption() { + bitField0_ = (bitField0_ & ~0x00000020); + retrievableOption_ = 0; + onChanged(); + return this; + } + + private int completableOption_ = 0; + /** + * + * + *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is
+     * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+     * field values are directly used and returned as suggestions for Autocomplete
+     * in
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+     *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is unset, the server behavior defaults to
+     * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+     * for fields that support setting completable options, which are just
+     * `string` fields. For those fields that do not support setting completable
+     * options, the server will skip completable option setting, and setting
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @return The enum numeric value on the wire for completableOption. + */ + @java.lang.Override + public int getCompletableOptionValue() { + return completableOption_; + } + /** + * + * + *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is
+     * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+     * field values are directly used and returned as suggestions for Autocomplete
+     * in
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+     *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is unset, the server behavior defaults to
+     * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+     * for fields that support setting completable options, which are just
+     * `string` fields. For those fields that do not support setting completable
+     * options, the server will skip completable option setting, and setting
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @param value The enum numeric value on the wire for completableOption to set. + * @return This builder for chaining. + */ + public Builder setCompletableOptionValue(int value) { + completableOption_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is
+     * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+     * field values are directly used and returned as suggestions for Autocomplete
+     * in
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+     *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is unset, the server behavior defaults to
+     * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+     * for fields that support setting completable options, which are just
+     * `string` fields. For those fields that do not support setting completable
+     * options, the server will skip completable option setting, and setting
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @return The completableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption + getCompletableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.forNumber( + completableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is
+     * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+     * field values are directly used and returned as suggestions for Autocomplete
+     * in
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+     *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is unset, the server behavior defaults to
+     * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+     * for fields that support setting completable options, which are just
+     * `string` fields. For those fields that do not support setting completable
+     * options, the server will skip completable option setting, and setting
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @param value The completableOption to set. + * @return This builder for chaining. + */ + public Builder setCompletableOption( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + completableOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is
+     * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+     * field values are directly used and returned as suggestions for Autocomplete
+     * in
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+     *
+     * If
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * is unset, the server behavior defaults to
+     * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+     * for fields that support setting completable options, which are just
+     * `string` fields. For those fields that do not support setting completable
+     * options, the server will skip completable option setting, and setting
+     * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+     * for those fields will throw `INVALID_ARGUMENT` error.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @return This builder for chaining. + */ + public Builder clearCompletableOption() { + bitField0_ = (bitField0_ & ~0x00000040); + completableOption_ = 0; + onChanged(); + return this; + } + + private int recsFilterableOption_ = 0; + /** + * + * + *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+     * field values are filterable by filter expression in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     *
+     * If
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+     * but the field type is numerical, field values are not filterable by text
+     * queries in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * Only textual fields are supported.
+     *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is unset, the default setting is
+     * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+     * for fields that support setting filterable options.
+     *
+     * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+     * generated and an empty result is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @return The enum numeric value on the wire for recsFilterableOption. + */ + @java.lang.Override + public int getRecsFilterableOptionValue() { + return recsFilterableOption_; + } + /** + * + * + *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+     * field values are filterable by filter expression in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     *
+     * If
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+     * but the field type is numerical, field values are not filterable by text
+     * queries in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * Only textual fields are supported.
+     *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is unset, the default setting is
+     * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+     * for fields that support setting filterable options.
+     *
+     * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+     * generated and an empty result is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @param value The enum numeric value on the wire for recsFilterableOption to set. + * @return This builder for chaining. + */ + public Builder setRecsFilterableOptionValue(int value) { + recsFilterableOption_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+     * field values are filterable by filter expression in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     *
+     * If
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+     * but the field type is numerical, field values are not filterable by text
+     * queries in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * Only textual fields are supported.
+     *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is unset, the default setting is
+     * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+     * for fields that support setting filterable options.
+     *
+     * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+     * generated and an empty result is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @return The recsFilterableOption. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption + getRecsFilterableOption() { + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption result = + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.forNumber( + recsFilterableOption_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+     * field values are filterable by filter expression in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     *
+     * If
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+     * but the field type is numerical, field values are not filterable by text
+     * queries in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * Only textual fields are supported.
+     *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is unset, the default setting is
+     * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+     * for fields that support setting filterable options.
+     *
+     * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+     * generated and an empty result is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @param value The recsFilterableOption to set. + * @return This builder for chaining. + */ + public Builder setRecsFilterableOption( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + recsFilterableOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+     * field values are filterable by filter expression in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     *
+     * If
+     * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+     * but the field type is numerical, field values are not filterable by text
+     * queries in
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * Only textual fields are supported.
+     *
+     * If
+     * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+     * is unset, the default setting is
+     * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+     * for fields that support setting filterable options.
+     *
+     * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+     * generated and an empty result is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @return This builder for chaining. + */ + public Builder clearRecsFilterableOption() { + bitField0_ = (bitField0_ & ~0x00000080); + recsFilterableOption_ = 0; + onChanged(); + return this; + } + + private java.lang.Object keyPropertyType_ = ""; + /** + * + * + *
+     * Output only. Type of the key property that this field is mapped to. Empty
+     * string if this is not annotated as mapped to a key property.
+     *
+     * Example types are `title`, `description`. Full list is defined
+     * by `keyPropertyMapping` in the schema field annotation.
+     *
+     * If the schema field has a `KeyPropertyMapping` annotation,
+     * `indexable_option` and `searchable_option` of this field cannot be
+     * modified.
+     * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The keyPropertyType. + */ + public java.lang.String getKeyPropertyType() { + java.lang.Object ref = keyPropertyType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyPropertyType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Type of the key property that this field is mapped to. Empty
+     * string if this is not annotated as mapped to a key property.
+     *
+     * Example types are `title`, `description`. Full list is defined
+     * by `keyPropertyMapping` in the schema field annotation.
+     *
+     * If the schema field has a `KeyPropertyMapping` annotation,
+     * `indexable_option` and `searchable_option` of this field cannot be
+     * modified.
+     * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for keyPropertyType. + */ + public com.google.protobuf.ByteString getKeyPropertyTypeBytes() { + java.lang.Object ref = keyPropertyType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyPropertyType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Type of the key property that this field is mapped to. Empty
+     * string if this is not annotated as mapped to a key property.
+     *
+     * Example types are `title`, `description`. Full list is defined
+     * by `keyPropertyMapping` in the schema field annotation.
+     *
+     * If the schema field has a `KeyPropertyMapping` annotation,
+     * `indexable_option` and `searchable_option` of this field cannot be
+     * modified.
+     * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The keyPropertyType to set. + * @return This builder for chaining. + */ + public Builder setKeyPropertyType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyPropertyType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the key property that this field is mapped to. Empty
+     * string if this is not annotated as mapped to a key property.
+     *
+     * Example types are `title`, `description`. Full list is defined
+     * by `keyPropertyMapping` in the schema field annotation.
+     *
+     * If the schema field has a `KeyPropertyMapping` annotation,
+     * `indexable_option` and `searchable_option` of this field cannot be
+     * modified.
+     * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKeyPropertyType() { + keyPropertyType_ = getDefaultInstance().getKeyPropertyType(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the key property that this field is mapped to. Empty
+     * string if this is not annotated as mapped to a key property.
+     *
+     * Example types are `title`, `description`. Full list is defined
+     * by `keyPropertyMapping` in the schema field annotation.
+     *
+     * If the schema field has a `KeyPropertyMapping` annotation,
+     * `indexable_option` and `searchable_option` of this field cannot be
+     * modified.
+     * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for keyPropertyType to set. + * @return This builder for chaining. + */ + public Builder setKeyPropertyTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyPropertyType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.FieldConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.FieldConfig) + private static final com.google.cloud.discoveryengine.v1alpha.FieldConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.FieldConfig(); + } + + public static com.google.cloud.discoveryengine.v1alpha.FieldConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FieldConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FieldConfigOrBuilder.java new file mode 100644 index 000000000000..6c2a1d8c9944 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/FieldConfigOrBuilder.java @@ -0,0 +1,521 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface FieldConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.FieldConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field path of the schema field.
+   * For example: `title`, `description`, `release_info.release_year`.
+   * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldPath. + */ + java.lang.String getFieldPath(); + /** + * + * + *
+   * Required. Field path of the schema field.
+   * For example: `title`, `description`, `release_info.release_year`.
+   * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldPath. + */ + com.google.protobuf.ByteString getFieldPathBytes(); + + /** + * + * + *
+   * Output only. Raw type of the field.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for fieldType. + */ + int getFieldTypeValue(); + /** + * + * + *
+   * Output only. Raw type of the field.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The fieldType. + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType getFieldType(); + + /** + * + * + *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+   * field values are indexed so that it can be filtered or faceted in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is unset, the server behavior defaults to
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+   * for fields that support setting indexable options. For those fields that do
+   * not support setting indexable options, such as `object` and `boolean` and
+   * key properties, the server will skip
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * setting, and setting
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @return The enum numeric value on the wire for indexableOption. + */ + int getIndexableOptionValue(); + /** + * + * + *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED],
+   * field values are indexed so that it can be filtered or faceted in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is unset, the server behavior defaults to
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]
+   * for fields that support setting indexable options. For those fields that do
+   * not support setting indexable options, such as `object` and `boolean` and
+   * key properties, the server will skip
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * setting, and setting
+   * [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3; + * + * + * @return The indexableOption. + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption getIndexableOption(); + + /** + * + * + *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is
+   * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+   * field values are available for dynamic facet. Could only be
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * if
+   * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+   * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+   *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is unset, the server behavior defaults to
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * for fields that support setting dynamic facetable options. For those fields
+   * that do not support setting dynamic facetable options, such as `object` and
+   * `boolean`, the server will skip dynamic facetable option setting, and
+   * setting
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @return The enum numeric value on the wire for dynamicFacetableOption. + */ + int getDynamicFacetableOptionValue(); + /** + * + * + *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is
+   * [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
+   * field values are available for dynamic facet. Could only be
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * if
+   * [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
+   * is
+   * [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
+   * Otherwise, an `INVALID_ARGUMENT` error will be returned.
+   *
+   * If
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * is unset, the server behavior defaults to
+   * [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
+   * for fields that support setting dynamic facetable options. For those fields
+   * that do not support setting dynamic facetable options, such as `object` and
+   * `boolean`, the server will skip dynamic facetable option setting, and
+   * setting
+   * [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4; + * + * + * @return The dynamicFacetableOption. + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption + getDynamicFacetableOption(); + + /** + * + * + *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+   * field values are searchable by text queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+   * but field type is numerical, field values will not be searchable by text
+   * queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+   * as there are no text values associated to numerical fields.
+   *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is unset, the server behavior defaults to
+   * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+   * for fields that support setting searchable options. Only `string` fields
+   * that have no key property mapping support setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+   *
+   * For those fields that do not support setting searchable options, the server
+   * will skip searchable option setting, and setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @return The enum numeric value on the wire for searchableOption. + */ + int getSearchableOptionValue(); + /** + * + * + *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED],
+   * field values are searchable by text queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * If
+   * [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED]
+   * but field type is numerical, field values will not be searchable by text
+   * queries in
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search],
+   * as there are no text values associated to numerical fields.
+   *
+   * If
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * is unset, the server behavior defaults to
+   * [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
+   * for fields that support setting searchable options. Only `string` fields
+   * that have no key property mapping support setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
+   *
+   * For those fields that do not support setting searchable options, the server
+   * will skip searchable option setting, and setting
+   * [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5; + * + * + * @return The searchableOption. + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption getSearchableOption(); + + /** + * + * + *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is
+   * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+   * field values are included in the search results.
+   *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is unset, the server behavior defaults to
+   * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+   * for fields that support setting retrievable options. For those fields
+   * that do not support setting retrievable options, such as `object` and
+   * `boolean`, the server will skip retrievable option setting, and setting
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @return The enum numeric value on the wire for retrievableOption. + */ + int getRetrievableOptionValue(); + /** + * + * + *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is
+   * [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED],
+   * field values are included in the search results.
+   *
+   * If
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * is unset, the server behavior defaults to
+   * [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED]
+   * for fields that support setting retrievable options. For those fields
+   * that do not support setting retrievable options, such as `object` and
+   * `boolean`, the server will skip retrievable option setting, and setting
+   * [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6; + * + * + * @return The retrievableOption. + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption getRetrievableOption(); + + /** + * + * + *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is
+   * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+   * field values are directly used and returned as suggestions for Autocomplete
+   * in
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+   *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is unset, the server behavior defaults to
+   * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+   * for fields that support setting completable options, which are just
+   * `string` fields. For those fields that do not support setting completable
+   * options, the server will skip completable option setting, and setting
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @return The enum numeric value on the wire for completableOption. + */ + int getCompletableOptionValue(); + /** + * + * + *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is
+   * [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED],
+   * field values are directly used and returned as suggestions for Autocomplete
+   * in
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
+   *
+   * If
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * is unset, the server behavior defaults to
+   * [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED]
+   * for fields that support setting completable options, which are just
+   * `string` fields. For those fields that do not support setting completable
+   * options, the server will skip completable option setting, and setting
+   * [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
+   * for those fields will throw `INVALID_ARGUMENT` error.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8; + * + * + * @return The completableOption. + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption getCompletableOption(); + + /** + * + * + *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+   * field values are filterable by filter expression in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   *
+   * If
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+   * but the field type is numerical, field values are not filterable by text
+   * queries in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * Only textual fields are supported.
+   *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is unset, the default setting is
+   * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+   * for fields that support setting filterable options.
+   *
+   * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+   * generated and an empty result is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @return The enum numeric value on the wire for recsFilterableOption. + */ + int getRecsFilterableOptionValue(); + /** + * + * + *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED],
+   * field values are filterable by filter expression in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   *
+   * If
+   * [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED]
+   * but the field type is numerical, field values are not filterable by text
+   * queries in
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * Only textual fields are supported.
+   *
+   * If
+   * [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option]
+   * is unset, the default setting is
+   * [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED]
+   * for fields that support setting filterable options.
+   *
+   * When a field set to [FILTERABLE_DISABLED] is filtered, a warning is
+   * generated and an empty result is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9; + * + * + * @return The recsFilterableOption. + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption getRecsFilterableOption(); + + /** + * + * + *
+   * Output only. Type of the key property that this field is mapped to. Empty
+   * string if this is not annotated as mapped to a key property.
+   *
+   * Example types are `title`, `description`. Full list is defined
+   * by `keyPropertyMapping` in the schema field annotation.
+   *
+   * If the schema field has a `KeyPropertyMapping` annotation,
+   * `indexable_option` and `searchable_option` of this field cannot be
+   * modified.
+   * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The keyPropertyType. + */ + java.lang.String getKeyPropertyType(); + /** + * + * + *
+   * Output only. Type of the key property that this field is mapped to. Empty
+   * string if this is not annotated as mapped to a key property.
+   *
+   * Example types are `title`, `description`. Full list is defined
+   * by `keyPropertyMapping` in the schema field annotation.
+   *
+   * If the schema field has a `KeyPropertyMapping` annotation,
+   * `indexable_option` and `searchable_option` of this field cannot be
+   * modified.
+   * 
+ * + * string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for keyPropertyType. + */ + com.google.protobuf.ByteString getKeyPropertyTypeBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GcsSource.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GcsSource.java new file mode 100644 index 000000000000..89fff3197f3a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GcsSource.java @@ -0,0 +1,1153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Cloud Storage location for input content.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GcsSource} + */ +public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.GcsSource) + GcsSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsSource() { + inputUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataSchema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GcsSource.class, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder.class); + } + + public static final int INPUT_URIS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList inputUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the inputUris. + */ + public com.google.protobuf.ProtocolStringList getInputUrisList() { + return inputUris_; + } + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of inputUris. + */ + public int getInputUrisCount() { + return inputUris_.size(); + } + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The inputUris at the given index. + */ + public java.lang.String getInputUris(int index) { + return inputUris_.get(index); + } + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the inputUris at the given index. + */ + public com.google.protobuf.ByteString getInputUrisBytes(int index) { + return inputUris_.getByteString(index); + } + + public static final int DATA_SCHEMA_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSchema_ = ""; + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One JSON
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+   * document must
+   *   have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+   * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+   *   `input_uris` becomes a document, with the ID set to the first 128
+   *   bits of SHA256(URI) encoded as a hex string.
+   * * `custom`: One custom data JSON per row in arbitrary format that conforms
+   *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+   *   the data store. This can only be used by Gen App Builder.
+   * * `csv`: A CSV file with header conforming to the defined
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. Each entry after the header is imported as a Document.
+   *   This can only be used by Gen App Builder.
+   *
+   * Supported values for user even imports:
+   *
+   * * `user_event` (default): One JSON
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+   * 
+ * + * string data_schema = 2; + * + * @return The dataSchema. + */ + @java.lang.Override + public java.lang.String getDataSchema() { + java.lang.Object ref = dataSchema_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSchema_ = s; + return s; + } + } + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One JSON
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+   * document must
+   *   have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+   * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+   *   `input_uris` becomes a document, with the ID set to the first 128
+   *   bits of SHA256(URI) encoded as a hex string.
+   * * `custom`: One custom data JSON per row in arbitrary format that conforms
+   *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+   *   the data store. This can only be used by Gen App Builder.
+   * * `csv`: A CSV file with header conforming to the defined
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. Each entry after the header is imported as a Document.
+   *   This can only be used by Gen App Builder.
+   *
+   * Supported values for user even imports:
+   *
+   * * `user_event` (default): One JSON
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+   * 
+ * + * string data_schema = 2; + * + * @return The bytes for dataSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSchemaBytes() { + java.lang.Object ref = dataSchema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < inputUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUris_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataSchema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < inputUris_.size(); i++) { + dataSize += computeStringSizeNoTag(inputUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getInputUrisList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataSchema_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.GcsSource other = + (com.google.cloud.discoveryengine.v1alpha.GcsSource) obj; + + if (!getInputUrisList().equals(other.getInputUrisList())) return false; + if (!getDataSchema().equals(other.getDataSchema())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInputUrisCount() > 0) { + hash = (37 * hash) + INPUT_URIS_FIELD_NUMBER; + hash = (53 * hash) + getInputUrisList().hashCode(); + } + hash = (37 * hash) + DATA_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getDataSchema().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Cloud Storage location for input content.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GcsSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.GcsSource) + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GcsSource.class, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.GcsSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataSchema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource build() { + com.google.cloud.discoveryengine.v1alpha.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource buildPartial() { + com.google.cloud.discoveryengine.v1alpha.GcsSource result = + new com.google.cloud.discoveryengine.v1alpha.GcsSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.GcsSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + inputUris_.makeImmutable(); + result.inputUris_ = inputUris_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataSchema_ = dataSchema_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.GcsSource) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.GcsSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.GcsSource other) { + if (other == com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance()) + return this; + if (!other.inputUris_.isEmpty()) { + if (inputUris_.isEmpty()) { + inputUris_ = other.inputUris_; + bitField0_ |= 0x00000001; + } else { + ensureInputUrisIsMutable(); + inputUris_.addAll(other.inputUris_); + } + onChanged(); + } + if (!other.getDataSchema().isEmpty()) { + dataSchema_ = other.dataSchema_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInputUrisIsMutable(); + inputUris_.add(s); + break; + } // case 10 + case 18: + { + dataSchema_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList inputUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureInputUrisIsMutable() { + if (!inputUris_.isModifiable()) { + inputUris_ = new com.google.protobuf.LazyStringArrayList(inputUris_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the inputUris. + */ + public com.google.protobuf.ProtocolStringList getInputUrisList() { + inputUris_.makeImmutable(); + return inputUris_; + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of inputUris. + */ + public int getInputUrisCount() { + return inputUris_.size(); + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The inputUris at the given index. + */ + public java.lang.String getInputUris(int index) { + return inputUris_.get(index); + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the inputUris at the given index. + */ + public com.google.protobuf.ByteString getInputUrisBytes(int index) { + return inputUris_.getByteString(index); + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The inputUris to set. + * @return This builder for chaining. + */ + public Builder setInputUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputUrisIsMutable(); + inputUris_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The inputUris to add. + * @return This builder for chaining. + */ + public Builder addInputUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputUrisIsMutable(); + inputUris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The inputUris to add. + * @return This builder for chaining. + */ + public Builder addAllInputUris(java.lang.Iterable values) { + ensureInputUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputUris_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInputUris() { + inputUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage URIs to input files. URI can be up to
+     * 2000 characters long. URIs can match the full object path (for example,
+     * `gs://bucket/directory/object.json`) or a pattern matching one or more
+     * files, such as `gs://bucket/directory/*.json`.
+     *
+     * A request can contain at most 100 files (or 100,000 files if `data_schema`
+     * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+     * `content`).
+     * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the inputUris to add. + * @return This builder for chaining. + */ + public Builder addInputUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInputUrisIsMutable(); + inputUris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataSchema_ = ""; + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One JSON
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+     * document must
+     *   have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+     *   `input_uris` becomes a document, with the ID set to the first 128
+     *   bits of SHA256(URI) encoded as a hex string.
+     * * `custom`: One custom data JSON per row in arbitrary format that conforms
+     *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+     *   the data store. This can only be used by Gen App Builder.
+     * * `csv`: A CSV file with header conforming to the defined
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. Each entry after the header is imported as a Document.
+     *   This can only be used by Gen App Builder.
+     *
+     * Supported values for user even imports:
+     *
+     * * `user_event` (default): One JSON
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+     * 
+ * + * string data_schema = 2; + * + * @return The dataSchema. + */ + public java.lang.String getDataSchema() { + java.lang.Object ref = dataSchema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSchema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One JSON
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+     * document must
+     *   have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+     *   `input_uris` becomes a document, with the ID set to the first 128
+     *   bits of SHA256(URI) encoded as a hex string.
+     * * `custom`: One custom data JSON per row in arbitrary format that conforms
+     *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+     *   the data store. This can only be used by Gen App Builder.
+     * * `csv`: A CSV file with header conforming to the defined
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. Each entry after the header is imported as a Document.
+     *   This can only be used by Gen App Builder.
+     *
+     * Supported values for user even imports:
+     *
+     * * `user_event` (default): One JSON
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+     * 
+ * + * string data_schema = 2; + * + * @return The bytes for dataSchema. + */ + public com.google.protobuf.ByteString getDataSchemaBytes() { + java.lang.Object ref = dataSchema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One JSON
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+     * document must
+     *   have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+     *   `input_uris` becomes a document, with the ID set to the first 128
+     *   bits of SHA256(URI) encoded as a hex string.
+     * * `custom`: One custom data JSON per row in arbitrary format that conforms
+     *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+     *   the data store. This can only be used by Gen App Builder.
+     * * `csv`: A CSV file with header conforming to the defined
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. Each entry after the header is imported as a Document.
+     *   This can only be used by Gen App Builder.
+     *
+     * Supported values for user even imports:
+     *
+     * * `user_event` (default): One JSON
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+     * 
+ * + * string data_schema = 2; + * + * @param value The dataSchema to set. + * @return This builder for chaining. + */ + public Builder setDataSchema(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSchema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One JSON
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+     * document must
+     *   have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+     *   `input_uris` becomes a document, with the ID set to the first 128
+     *   bits of SHA256(URI) encoded as a hex string.
+     * * `custom`: One custom data JSON per row in arbitrary format that conforms
+     *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+     *   the data store. This can only be used by Gen App Builder.
+     * * `csv`: A CSV file with header conforming to the defined
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. Each entry after the header is imported as a Document.
+     *   This can only be used by Gen App Builder.
+     *
+     * Supported values for user even imports:
+     *
+     * * `user_event` (default): One JSON
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+     * 
+ * + * string data_schema = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataSchema() { + dataSchema_ = getDefaultInstance().getDataSchema(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The schema to use when parsing the data from the source.
+     *
+     * Supported values for document imports:
+     *
+     * * `document` (default): One JSON
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+     * document must
+     *   have a valid
+     *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+     *   `input_uris` becomes a document, with the ID set to the first 128
+     *   bits of SHA256(URI) encoded as a hex string.
+     * * `custom`: One custom data JSON per row in arbitrary format that conforms
+     *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+     *   the data store. This can only be used by Gen App Builder.
+     * * `csv`: A CSV file with header conforming to the defined
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+     *   data store. Each entry after the header is imported as a Document.
+     *   This can only be used by Gen App Builder.
+     *
+     * Supported values for user even imports:
+     *
+     * * `user_event` (default): One JSON
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+     * 
+ * + * string data_schema = 2; + * + * @param value The bytes for dataSchema to set. + * @return This builder for chaining. + */ + public Builder setDataSchemaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSchema_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.GcsSource) + private static final com.google.cloud.discoveryengine.v1alpha.GcsSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.GcsSource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GcsSourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GcsSourceOrBuilder.java new file mode 100644 index 000000000000..1bf465fea95b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GcsSourceOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface GcsSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the inputUris. + */ + java.util.List getInputUrisList(); + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of inputUris. + */ + int getInputUrisCount(); + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The inputUris at the given index. + */ + java.lang.String getInputUris(int index); + /** + * + * + *
+   * Required. Cloud Storage URIs to input files. URI can be up to
+   * 2000 characters long. URIs can match the full object path (for example,
+   * `gs://bucket/directory/object.json`) or a pattern matching one or more
+   * files, such as `gs://bucket/directory/*.json`.
+   *
+   * A request can contain at most 100 files (or 100,000 files if `data_schema`
+   * is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
+   * `content`).
+   * 
+ * + * repeated string input_uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the inputUris at the given index. + */ + com.google.protobuf.ByteString getInputUrisBytes(int index); + + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One JSON
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+   * document must
+   *   have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+   * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+   *   `input_uris` becomes a document, with the ID set to the first 128
+   *   bits of SHA256(URI) encoded as a hex string.
+   * * `custom`: One custom data JSON per row in arbitrary format that conforms
+   *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+   *   the data store. This can only be used by Gen App Builder.
+   * * `csv`: A CSV file with header conforming to the defined
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. Each entry after the header is imported as a Document.
+   *   This can only be used by Gen App Builder.
+   *
+   * Supported values for user even imports:
+   *
+   * * `user_event` (default): One JSON
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+   * 
+ * + * string data_schema = 2; + * + * @return The dataSchema. + */ + java.lang.String getDataSchema(); + /** + * + * + *
+   * The schema to use when parsing the data from the source.
+   *
+   * Supported values for document imports:
+   *
+   * * `document` (default): One JSON
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
+   * document must
+   *   have a valid
+   *   [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+   * * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
+   *   `input_uris` becomes a document, with the ID set to the first 128
+   *   bits of SHA256(URI) encoded as a hex string.
+   * * `custom`: One custom data JSON per row in arbitrary format that conforms
+   *   to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
+   *   the data store. This can only be used by Gen App Builder.
+   * * `csv`: A CSV file with header conforming to the defined
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
+   *   data store. Each entry after the header is imported as a Document.
+   *   This can only be used by Gen App Builder.
+   *
+   * Supported values for user even imports:
+   *
+   * * `user_event` (default): One JSON
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
+   * 
+ * + * string data_schema = 2; + * + * @return The bytes for dataSchema. + */ + com.google.protobuf.ByteString getDataSchemaBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetConversationRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetConversationRequest.java new file mode 100644 index 000000000000..51fb9098e363 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetConversationRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request for GetConversation method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetConversationRequest} + */ +public final class GetConversationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.GetConversationRequest) + GetConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConversationRequest.newBuilder() to construct. + private GetConversationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetConversationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetConversationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.GetConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest other = + (com.google.cloud.discoveryengine.v1alpha.GetConversationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for GetConversation method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.GetConversationRequest) + com.google.cloud.discoveryengine.v1alpha.GetConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetConversationRequest build() { + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetConversationRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest result = + new com.google.cloud.discoveryengine.v1alpha.GetConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.GetConversationRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.GetConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.GetConversationRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.GetConversationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Conversation to get. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.GetConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.GetConversationRequest) + private static final com.google.cloud.discoveryengine.v1alpha.GetConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.GetConversationRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetConversationRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetConversationRequestOrBuilder.java new file mode 100644 index 000000000000..24cc4fa8987c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetConversationRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface GetConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.GetConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the Conversation to get. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetDocumentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetDocumentRequest.java new file mode 100644 index 000000000000..c2693ef67aaf --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetDocumentRequest.java @@ -0,0 +1,706 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetDocumentRequest} + */ +public final class GetDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.GetDocumentRequest) + GetDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDocumentRequest.newBuilder() to construct. + private GetDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDocumentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDocumentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest other = + (com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.GetDocumentRequest) + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetDocumentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest build() { + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest result = + new com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest other) { + if (other == com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+     *
+     * If the caller does not have permission to access the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * does not exist, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.GetDocumentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.GetDocumentRequest) + private static final com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDocumentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetDocumentRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetDocumentRequestOrBuilder.java new file mode 100644 index 000000000000..e3a68c797855 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetDocumentRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface GetDocumentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.GetDocumentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Full resource name of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+   *
+   * If the caller does not have permission to access the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * does not exist, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetSchemaRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetSchemaRequest.java new file mode 100644 index 000000000000..89274d2c6540 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetSchemaRequest.java @@ -0,0 +1,650 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetSchemaRequest} + */ +public final class GetSchemaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.GetSchemaRequest) + GetSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSchemaRequest.newBuilder() to construct. + private GetSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSchemaRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSchemaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest other = + (com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.GetSchemaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.GetSchemaRequest) + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest build() { + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest result = + new com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest other) { + if (other == com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.GetSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.GetSchemaRequest) + private static final com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSchemaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetSchemaRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetSchemaRequestOrBuilder.java new file mode 100644 index 000000000000..3e5b66886b4a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/GetSchemaRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface GetSchemaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.GetSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportConfigProto.java new file mode 100644 index 000000000000..ab7c5cef78d1 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportConfigProto.java @@ -0,0 +1,292 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class ImportConfigProto { + private ImportConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/discoveryengine/v1alpha/i" + + "mport_config.proto\022$google.cloud.discove" + + "ryengine.v1alpha\032\037google/api/field_behav" + + "ior.proto\032\031google/api/resource.proto\0323go" + + "ogle/cloud/discoveryengine/v1alpha/docum" + + "ent.proto\0325google/cloud/discoveryengine/" + + "v1alpha/user_event.proto\032\037google/protobu" + + "f/timestamp.proto\032\027google/rpc/status.pro" + + "to\032\026google/type/date.proto\":\n\tGcsSource\022" + + "\030\n\ninput_uris\030\001 \003(\tB\004\342A\001\002\022\023\n\013data_schema" + + "\030\002 \001(\t\"\276\001\n\016BigQuerySource\022+\n\016partition_d" + + "ate\030\005 \001(\0132\021.google.type.DateH\000\022\022\n\nprojec" + + "t_id\030\001 \001(\t\022\030\n\ndataset_id\030\002 \001(\tB\004\342A\001\002\022\026\n\010" + + "table_id\030\003 \001(\tB\004\342A\001\002\022\027\n\017gcs_staging_dir\030" + + "\004 \001(\t\022\023\n\013data_schema\030\006 \001(\tB\013\n\tpartition\"" + + "8\n\021ImportErrorConfig\022\024\n\ngcs_prefix\030\001 \001(\t" + + "H\000B\r\n\013destination\"\216\004\n\027ImportUserEventsRe" + + "quest\022c\n\rinline_source\030\002 \001(\0132J.google.cl" + + "oud.discoveryengine.v1alpha.ImportUserEv" + + "entsRequest.InlineSourceH\000\022E\n\ngcs_source" + + "\030\003 \001(\0132/.google.cloud.discoveryengine.v1" + + "alpha.GcsSourceH\000\022O\n\017bigquery_source\030\004 \001" + + "(\01324.google.cloud.discoveryengine.v1alph" + + "a.BigQuerySourceH\000\022A\n\006parent\030\001 \001(\tB1\342A\001\002" + + "\372A*\n(discoveryengine.googleapis.com/Data" + + "Store\022M\n\014error_config\030\005 \001(\01327.google.clo" + + "ud.discoveryengine.v1alpha.ImportErrorCo" + + "nfig\032Z\n\014InlineSource\022J\n\013user_events\030\001 \003(" + + "\0132/.google.cloud.discoveryengine.v1alpha" + + ".UserEventB\004\342A\001\002B\010\n\006source\"\320\001\n\030ImportUse" + + "rEventsResponse\022)\n\rerror_samples\030\001 \003(\0132\022" + + ".google.rpc.Status\022M\n\014error_config\030\002 \001(\013" + + "27.google.cloud.discoveryengine.v1alpha." + + "ImportErrorConfig\022\033\n\023joined_events_count" + + "\030\003 \001(\003\022\035\n\025unjoined_events_count\030\004 \001(\003\"\252\001" + + "\n\030ImportUserEventsMetadata\022/\n\013create_tim" + + "e\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + + "pdate_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tamp\022\025\n\rsuccess_count\030\003 \001(\003\022\025\n\rfailure_c" + + "ount\030\004 \001(\003\"\251\001\n\027ImportDocumentsMetadata\022/" + + "\n\013create_time\030\001 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022/\n\013update_time\030\002 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022\025\n\rsuccess_count\030\003 \001(\003\022" + + "\025\n\rfailure_count\030\004 \001(\003\"\367\005\n\026ImportDocumen" + + "tsRequest\022b\n\rinline_source\030\002 \001(\0132I.googl" + + "e.cloud.discoveryengine.v1alpha.ImportDo" + + "cumentsRequest.InlineSourceH\000\022E\n\ngcs_sou" + + "rce\030\003 \001(\0132/.google.cloud.discoveryengine" + + ".v1alpha.GcsSourceH\000\022O\n\017bigquery_source\030" + + "\004 \001(\01324.google.cloud.discoveryengine.v1a" + + "lpha.BigQuerySourceH\000\022>\n\006parent\030\001 \001(\tB.\342" + + "A\001\002\372A\'\n%discoveryengine.googleapis.com/B" + + "ranch\022M\n\014error_config\030\005 \001(\01327.google.clo" + + "ud.discoveryengine.v1alpha.ImportErrorCo" + + "nfig\022l\n\023reconciliation_mode\030\006 \001(\0162O.goog" + + "le.cloud.discoveryengine.v1alpha.ImportD" + + "ocumentsRequest.ReconciliationMode\022\031\n\021au" + + "to_generate_ids\030\010 \001(\010\022\020\n\010id_field\030\t \001(\t\032" + + "W\n\014InlineSource\022G\n\tdocuments\030\001 \003(\0132..goo" + + "gle.cloud.discoveryengine.v1alpha.Docume" + + "ntB\004\342A\001\002\"T\n\022ReconciliationMode\022#\n\037RECONC" + + "ILIATION_MODE_UNSPECIFIED\020\000\022\017\n\013INCREMENT" + + "AL\020\001\022\010\n\004FULL\020\002B\010\n\006source\"\223\001\n\027ImportDocum" + + "entsResponse\022)\n\rerror_samples\030\001 \003(\0132\022.go" + + "ogle.rpc.Status\022M\n\014error_config\030\002 \001(\01327." + + "google.cloud.discoveryengine.v1alpha.Imp" + + "ortErrorConfigB\235\002\n(com.google.cloud.disc" + + "overyengine.v1alphaB\021ImportConfigProtoP\001" + + "ZRcloud.google.com/go/discoveryengine/ap" + + "iv1alpha/discoveryenginepb;discoveryengi" + + "nepb\242\002\017DISCOVERYENGINE\252\002$Google.Cloud.Di" + + "scoveryEngine.V1Alpha\312\002$Google\\Cloud\\Dis" + + "coveryEngine\\V1alpha\352\002\'Google::Cloud::Di" + + "scoveryEngine::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.UserEventProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_GcsSource_descriptor, + new java.lang.String[] { + "InputUris", "DataSchema", + }); + internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_BigQuerySource_descriptor, + new java.lang.String[] { + "PartitionDate", + "ProjectId", + "DatasetId", + "TableId", + "GcsStagingDir", + "DataSchema", + "Partition", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor, + new java.lang.String[] { + "GcsPrefix", "Destination", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor, + new java.lang.String[] { + "InlineSource", "GcsSource", "BigquerySource", "Parent", "ErrorConfig", "Source", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_descriptor, + new java.lang.String[] { + "UserEvents", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor, + new java.lang.String[] { + "ErrorSamples", "ErrorConfig", "JoinedEventsCount", "UnjoinedEventsCount", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor, + new java.lang.String[] { + "InlineSource", + "GcsSource", + "BigquerySource", + "Parent", + "ErrorConfig", + "ReconciliationMode", + "AutoGenerateIds", + "IdField", + "Source", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_descriptor, + new java.lang.String[] { + "Documents", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor, + new java.lang.String[] { + "ErrorSamples", "ErrorConfig", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.UserEventProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadata.java new file mode 100644 index 000000000000..eaaa563b9478 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadata.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata related to the progress of the ImportDocuments operation. This is
+ * returned by the google.longrunning.Operation.metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata} + */ +public final class ImportDocumentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) + ImportDocumentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsMetadata.newBuilder() to construct. + private ImportDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDocumentsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private long successCount_ = 0L; + /** + * + * + *
+   * Count of entries that were processed successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private long failureCount_ = 0L; + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + if (successCount_ != 0L) { + output.writeInt64(3, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(4, failureCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata other = + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the ImportDocuments operation. This is
+   * returned by the google.longrunning.Operation.metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata build() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata result = + new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.failureCount_ = failureCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long successCount_; + /** + * + * + *
+     * Count of entries that were processed successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of entries that were processed successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that were processed successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000004); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000008); + failureCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadataOrBuilder.java new file mode 100644 index 000000000000..bd1e73b5b86b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsMetadataOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportDocumentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Count of entries that were processed successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequest.java new file mode 100644 index 000000000000..f6c74ab7ac81 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequest.java @@ -0,0 +1,3997 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for Import methods.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest} + */ +public final class ImportDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) + ImportDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsRequest.newBuilder() to construct. + private ImportDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsRequest() { + parent_ = ""; + reconciliationMode_ = 0; + idField_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDocumentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.Builder.class); + } + + /** + * + * + *
+   * Indicates how imported documents are reconciled with the existing documents
+   * created or imported before.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode} + */ + public enum ReconciliationMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Defaults to `INCREMENTAL`.
+     * 
+ * + * RECONCILIATION_MODE_UNSPECIFIED = 0; + */ + RECONCILIATION_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Inserts new documents or updates existing documents.
+     * 
+ * + * INCREMENTAL = 1; + */ + INCREMENTAL(1), + /** + * + * + *
+     * Calculates diff and replaces the entire document dataset. Existing
+     * documents may be deleted if they are not present in the source location.
+     * 
+ * + * FULL = 2; + */ + FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Defaults to `INCREMENTAL`.
+     * 
+ * + * RECONCILIATION_MODE_UNSPECIFIED = 0; + */ + public static final int RECONCILIATION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Inserts new documents or updates existing documents.
+     * 
+ * + * INCREMENTAL = 1; + */ + public static final int INCREMENTAL_VALUE = 1; + /** + * + * + *
+     * Calculates diff and replaces the entire document dataset. Existing
+     * documents may be deleted if they are not present in the source location.
+     * 
+ * + * FULL = 2; + */ + public static final int FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReconciliationMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReconciliationMode forNumber(int value) { + switch (value) { + case 0: + return RECONCILIATION_MODE_UNSPECIFIED; + case 1: + return INCREMENTAL; + case 2: + return FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReconciliationMode findValueByNumber(int number) { + return ReconciliationMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ReconciliationMode[] VALUES = values(); + + public static ReconciliationMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReconciliationMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode) + } + + public interface InlineSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getDocumentsList(); + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.Document getDocuments(int index); + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getDocumentsCount(); + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getDocumentsOrBuilderList(); + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentsOrBuilder(int index); + } + /** + * + * + *
+   * The inline source for the input config for ImportDocuments method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource} + */ + public static final class InlineSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + InlineSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use InlineSource.newBuilder() to construct. + private InlineSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InlineSource() { + documents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InlineSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.Builder + .class); + } + + public static final int DOCUMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List documents_; + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getDocumentsList() { + return documents_; + } + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getDocumentsOrBuilderList() { + return documents_; + } + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getDocumentsCount() { + return documents_.size(); + } + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDocuments(int index) { + return documents_.get(index); + } + /** + * + * + *
+     * Required. A list of documents to update/create. Each document must have a
+     * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+     * Recommended max of 100 items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentsOrBuilder( + int index) { + return documents_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < documents_.size(); i++) { + output.writeMessage(1, documents_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < documents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, documents_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource other = + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) obj; + + if (!getDocumentsList().equals(other.getDocumentsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDocumentsCount() > 0) { + hash = (37 * hash) + DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getDocumentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The inline source for the input config for ImportDocuments method.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (documentsBuilder_ == null) { + documents_ = java.util.Collections.emptyList(); + } else { + documents_ = null; + documentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_InlineSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource build() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource result = + new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource result) { + if (documentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + documents_ = java.util.Collections.unmodifiableList(documents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.documents_ = documents_; + } else { + result.documents_ = documentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance()) return this; + if (documentsBuilder_ == null) { + if (!other.documents_.isEmpty()) { + if (documents_.isEmpty()) { + documents_ = other.documents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDocumentsIsMutable(); + documents_.addAll(other.documents_); + } + onChanged(); + } + } else { + if (!other.documents_.isEmpty()) { + if (documentsBuilder_.isEmpty()) { + documentsBuilder_.dispose(); + documentsBuilder_ = null; + documents_ = other.documents_; + bitField0_ = (bitField0_ & ~0x00000001); + documentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDocumentsFieldBuilder() + : null; + } else { + documentsBuilder_.addAllMessages(other.documents_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.Document m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.Document.parser(), + extensionRegistry); + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(m); + } else { + documentsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List documents_ = + java.util.Collections.emptyList(); + + private void ensureDocumentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + documents_ = + new java.util.ArrayList( + documents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + documentsBuilder_; + + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getDocumentsList() { + if (documentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(documents_); + } else { + return documentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getDocumentsCount() { + if (documentsBuilder_ == null) { + return documents_.size(); + } else { + return documentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Document getDocuments(int index) { + if (documentsBuilder_ == null) { + return documents_.get(index); + } else { + return documentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.set(index, value); + onChanged(); + } else { + documentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.set(index, builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocuments(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.add(value); + onChanged(); + } else { + documentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.add(index, value); + onChanged(); + } else { + documentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocuments( + com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(index, builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllDocuments( + java.lang.Iterable values) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documents_); + onChanged(); + } else { + documentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDocuments() { + if (documentsBuilder_ == null) { + documents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + documentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeDocuments(int index) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.remove(index); + onChanged(); + } else { + documentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder getDocumentsBuilder( + int index) { + return getDocumentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentsOrBuilder( + int index) { + if (documentsBuilder_ == null) { + return documents_.get(index); + } else { + return documentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDocumentsOrBuilderList() { + if (documentsBuilder_ != null) { + return documentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(documents_); + } + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder addDocumentsBuilder() { + return getDocumentsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()); + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder addDocumentsBuilder( + int index) { + return getDocumentsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()); + } + /** + * + * + *
+       * Required. A list of documents to update/create. Each document must have a
+       * valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
+       * Recommended max of 100 items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDocumentsBuilderList() { + return getDocumentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + getDocumentsFieldBuilder() { + if (documentsBuilder_ == null) { + documentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder>( + documents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + documents_ = null; + } + return documentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + private static final com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest + .InlineSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SOURCE(2), + GCS_SOURCE(3), + BIGQUERY_SOURCE(4), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return INLINE_SOURCE; + case 3: + return GCS_SOURCE; + case 4: + return BIGQUERY_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int INLINE_SOURCE_FIELD_NUMBER = 2; + /** + * + * + *
+   * The Inline source for the input content for documents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+   * The Inline source for the input content for documents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + getInlineSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance(); + } + /** + * + * + *
+   * The Inline source for the input content for documents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance(); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 3; + } + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource getGcsSource() { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + + public static final int BIGQUERY_SOURCE_FIELD_NUMBER = 4; + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 4; + } + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource() { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder + getBigquerySourceOrBuilder() { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Requires create/update permission.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Requires create/update permission.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + /** + * + * + *
+   * The desired location of errors incurred during the Import.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return Whether the errorConfig field is set. + */ + @java.lang.Override + public boolean hasErrorConfig() { + return errorConfig_ != null; + } + /** + * + * + *
+   * The desired location of errors incurred during the Import.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return The errorConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + /** + * + * + *
+   * The desired location of errors incurred during the Import.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + + public static final int RECONCILIATION_MODE_FIELD_NUMBER = 6; + private int reconciliationMode_ = 0; + /** + * + * + *
+   * The mode of reconciliation between existing documents and the documents to
+   * be imported. Defaults to
+   * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @return The enum numeric value on the wire for reconciliationMode. + */ + @java.lang.Override + public int getReconciliationModeValue() { + return reconciliationMode_; + } + /** + * + * + *
+   * The mode of reconciliation between existing documents and the documents to
+   * be imported. Defaults to
+   * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @return The reconciliationMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + getReconciliationMode() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode result = + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + .forNumber(reconciliationMode_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + .UNRECOGNIZED + : result; + } + + public static final int AUTO_GENERATE_IDS_FIELD_NUMBER = 8; + private boolean autoGenerateIds_ = false; + /** + * + * + *
+   * Whether to automatically generate IDs for the documents if absent.
+   *
+   * If set to `true`,
+   * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s are
+   * automatically generated based on the hash of the payload, where IDs may not
+   * be consistent during multiple imports. In which case
+   * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL]
+   * is highly recommended to avoid duplicate contents. If unset or set to
+   * `false`, [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s
+   * have to be specified using
+   * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field],
+   * otherwise, documents without IDs fail to be imported.
+   *
+   * Only set this field when using
+   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+   * when
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * or
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * bool auto_generate_ids = 8; + * + * @return The autoGenerateIds. + */ + @java.lang.Override + public boolean getAutoGenerateIds() { + return autoGenerateIds_; + } + + public static final int ID_FIELD_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object idField_ = ""; + /** + * + * + *
+   * The field in the Cloud Storage and BigQuery sources that indicates the
+   * unique IDs of the documents.
+   *
+   * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+   * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+   * "some_uuid"}`. For
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+   * the column name of the BigQuery table where the unique ids are stored.
+   *
+   * The values of the JSON field or the BigQuery column are used as the
+   * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+   * field or the BigQuery column must be of string type, and the values must be
+   * set as valid strings conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+   * Otherwise, documents without valid IDs fail to be imported.
+   *
+   * Only set this field when using
+   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+   * when
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * or
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * is `custom`. And only set this field when
+   * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+   * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   *
+   * If it is unset, a default value `_id` is used when importing from the
+   * allowed data sources.
+   * 
+ * + * string id_field = 9; + * + * @return The idField. + */ + @java.lang.Override + public java.lang.String getIdField() { + java.lang.Object ref = idField_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idField_ = s; + return s; + } + } + /** + * + * + *
+   * The field in the Cloud Storage and BigQuery sources that indicates the
+   * unique IDs of the documents.
+   *
+   * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+   * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+   * "some_uuid"}`. For
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+   * the column name of the BigQuery table where the unique ids are stored.
+   *
+   * The values of the JSON field or the BigQuery column are used as the
+   * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+   * field or the BigQuery column must be of string type, and the values must be
+   * set as valid strings conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+   * Otherwise, documents without valid IDs fail to be imported.
+   *
+   * Only set this field when using
+   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+   * when
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * or
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * is `custom`. And only set this field when
+   * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+   * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   *
+   * If it is unset, a default value `_id` is used when importing from the
+   * allowed data sources.
+   * 
+ * + * string id_field = 9; + * + * @return The bytes for idField. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdFieldBytes() { + java.lang.Object ref = idField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + idField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (sourceCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_); + } + if (sourceCase_ == 4) { + output.writeMessage(4, (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_); + } + if (errorConfig_ != null) { + output.writeMessage(5, getErrorConfig()); + } + if (reconciliationMode_ + != com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + .RECONCILIATION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, reconciliationMode_); + } + if (autoGenerateIds_ != false) { + output.writeBool(8, autoGenerateIds_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idField_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, idField_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + source_); + } + if (sourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_); + } + if (sourceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_); + } + if (errorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getErrorConfig()); + } + if (reconciliationMode_ + != com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + .RECONCILIATION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, reconciliationMode_); + } + if (autoGenerateIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, autoGenerateIds_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idField_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, idField_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest other = + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasErrorConfig() != other.hasErrorConfig()) return false; + if (hasErrorConfig()) { + if (!getErrorConfig().equals(other.getErrorConfig())) return false; + } + if (reconciliationMode_ != other.reconciliationMode_) return false; + if (getAutoGenerateIds() != other.getAutoGenerateIds()) return false; + if (!getIdField().equals(other.getIdField())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getInlineSource().equals(other.getInlineSource())) return false; + break; + case 3: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 4: + if (!getBigquerySource().equals(other.getBigquerySource())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasErrorConfig()) { + hash = (37 * hash) + ERROR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getErrorConfig().hashCode(); + } + hash = (37 * hash) + RECONCILIATION_MODE_FIELD_NUMBER; + hash = (53 * hash) + reconciliationMode_; + hash = (37 * hash) + AUTO_GENERATE_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoGenerateIds()); + hash = (37 * hash) + ID_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getIdField().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + INLINE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInlineSource().hashCode(); + break; + case 3: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 4: + hash = (37 * hash) + BIGQUERY_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBigquerySource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for Import methods.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineSourceBuilder_ != null) { + inlineSourceBuilder_.clear(); + } + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigquerySourceBuilder_ != null) { + bigquerySourceBuilder_.clear(); + } + parent_ = ""; + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + reconciliationMode_ = 0; + autoGenerateIds_ = false; + idField_ = ""; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest build() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest result = + new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.errorConfig_ = + errorConfigBuilder_ == null ? errorConfig_ : errorConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.reconciliationMode_ = reconciliationMode_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.autoGenerateIds_ = autoGenerateIds_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.idField_ = idField_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 2 && inlineSourceBuilder_ != null) { + result.source_ = inlineSourceBuilder_.build(); + } + if (sourceCase_ == 3 && gcsSourceBuilder_ != null) { + result.source_ = gcsSourceBuilder_.build(); + } + if (sourceCase_ == 4 && bigquerySourceBuilder_ != null) { + result.source_ = bigquerySourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasErrorConfig()) { + mergeErrorConfig(other.getErrorConfig()); + } + if (other.reconciliationMode_ != 0) { + setReconciliationModeValue(other.getReconciliationModeValue()); + } + if (other.getAutoGenerateIds() != false) { + setAutoGenerateIds(other.getAutoGenerateIds()); + } + if (!other.getIdField().isEmpty()) { + idField_ = other.idField_; + bitField0_ |= 0x00000080; + onChanged(); + } + switch (other.getSourceCase()) { + case INLINE_SOURCE: + { + mergeInlineSource(other.getInlineSource()); + break; + } + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case BIGQUERY_SOURCE: + { + mergeBigquerySource(other.getBigquerySource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 10 + case 18: + { + input.readMessage(getInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getBigquerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getErrorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + reconciliationMode_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 64: + { + autoGenerateIds_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 74: + { + idField_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSourceOrBuilder> + inlineSourceBuilder_; + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + getInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return inlineSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + inlineSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.Builder + builderForValue) { + if (inlineSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + inlineSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + public Builder mergeInlineSource( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ + != com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .newBuilder( + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + inlineSourceBuilder_.mergeFrom(value); + } else { + inlineSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + public Builder clearInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + inlineSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.Builder + getInlineSourceBuilder() { + return getInlineSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if ((sourceCase_ == 2) && (inlineSourceBuilder_ != null)) { + return inlineSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The Inline source for the input content for documents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSourceOrBuilder> + getInlineSourceFieldBuilder() { + if (inlineSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .getDefaultInstance(); + } + inlineSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest + .InlineSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource) + source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return inlineSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 3; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder setGcsSource(com.google.cloud.discoveryengine.v1alpha.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder setGcsSource( + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder mergeGcsSource(com.google.cloud.discoveryengine.v1alpha.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 3 + && source_ != com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.GcsSource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 3) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged(); + return gcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> + bigquerySourceBuilder_; + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 4; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } else { + if (sourceCase_ == 4) { + return bigquerySourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder setBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(value); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder setBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder builderForValue) { + if (bigquerySourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder mergeBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4 + && source_ + != com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 4) { + bigquerySourceBuilder_.mergeFrom(value); + } else { + bigquerySourceBuilder_.setMessage(value); + } + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder clearBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + } + bigquerySourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder + getBigquerySourceBuilder() { + return getBigquerySourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder + getBigquerySourceOrBuilder() { + if ((sourceCase_ == 4) && (bigquerySourceBuilder_ != null)) { + return bigquerySourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> + getBigquerySourceFieldBuilder() { + if (bigquerySourceBuilder_ == null) { + if (!(sourceCase_ == 4)) { + source_ = com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + bigquerySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 4; + onChanged(); + return bigquerySourceBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Requires create/update permission.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Requires create/update permission.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Requires create/update permission.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Requires create/update permission.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Requires create/update permission.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + errorConfigBuilder_; + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return Whether the errorConfig field is set. + */ + public boolean hasErrorConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return The errorConfig. + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + if (errorConfigBuilder_ == null) { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } else { + return errorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + errorConfig_ = value; + } else { + errorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder builderForValue) { + if (errorConfigBuilder_ == null) { + errorConfig_ = builderForValue.build(); + } else { + errorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder mergeErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && errorConfig_ != null + && errorConfig_ + != com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig + .getDefaultInstance()) { + getErrorConfigBuilder().mergeFrom(value); + } else { + errorConfig_ = value; + } + } else { + errorConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder clearErrorConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder + getErrorConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getErrorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + if (errorConfigBuilder_ != null) { + return errorConfigBuilder_.getMessageOrBuilder(); + } else { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + } + /** + * + * + *
+     * The desired location of errors incurred during the Import.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + getErrorConfigFieldBuilder() { + if (errorConfigBuilder_ == null) { + errorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder>( + getErrorConfig(), getParentForChildren(), isClean()); + errorConfig_ = null; + } + return errorConfigBuilder_; + } + + private int reconciliationMode_ = 0; + /** + * + * + *
+     * The mode of reconciliation between existing documents and the documents to
+     * be imported. Defaults to
+     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @return The enum numeric value on the wire for reconciliationMode. + */ + @java.lang.Override + public int getReconciliationModeValue() { + return reconciliationMode_; + } + /** + * + * + *
+     * The mode of reconciliation between existing documents and the documents to
+     * be imported. Defaults to
+     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @param value The enum numeric value on the wire for reconciliationMode to set. + * @return This builder for chaining. + */ + public Builder setReconciliationModeValue(int value) { + reconciliationMode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The mode of reconciliation between existing documents and the documents to
+     * be imported. Defaults to
+     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @return The reconciliationMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + getReconciliationMode() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode result = + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + .forNumber(reconciliationMode_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The mode of reconciliation between existing documents and the documents to
+     * be imported. Defaults to
+     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @param value The reconciliationMode to set. + * @return This builder for chaining. + */ + public Builder setReconciliationMode( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + reconciliationMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The mode of reconciliation between existing documents and the documents to
+     * be imported. Defaults to
+     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @return This builder for chaining. + */ + public Builder clearReconciliationMode() { + bitField0_ = (bitField0_ & ~0x00000020); + reconciliationMode_ = 0; + onChanged(); + return this; + } + + private boolean autoGenerateIds_; + /** + * + * + *
+     * Whether to automatically generate IDs for the documents if absent.
+     *
+     * If set to `true`,
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s are
+     * automatically generated based on the hash of the payload, where IDs may not
+     * be consistent during multiple imports. In which case
+     * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL]
+     * is highly recommended to avoid duplicate contents. If unset or set to
+     * `false`, [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s
+     * have to be specified using
+     * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field],
+     * otherwise, documents without IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * bool auto_generate_ids = 8; + * + * @return The autoGenerateIds. + */ + @java.lang.Override + public boolean getAutoGenerateIds() { + return autoGenerateIds_; + } + /** + * + * + *
+     * Whether to automatically generate IDs for the documents if absent.
+     *
+     * If set to `true`,
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s are
+     * automatically generated based on the hash of the payload, where IDs may not
+     * be consistent during multiple imports. In which case
+     * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL]
+     * is highly recommended to avoid duplicate contents. If unset or set to
+     * `false`, [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s
+     * have to be specified using
+     * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field],
+     * otherwise, documents without IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * bool auto_generate_ids = 8; + * + * @param value The autoGenerateIds to set. + * @return This builder for chaining. + */ + public Builder setAutoGenerateIds(boolean value) { + + autoGenerateIds_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to automatically generate IDs for the documents if absent.
+     *
+     * If set to `true`,
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s are
+     * automatically generated based on the hash of the payload, where IDs may not
+     * be consistent during multiple imports. In which case
+     * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL]
+     * is highly recommended to avoid duplicate contents. If unset or set to
+     * `false`, [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s
+     * have to be specified using
+     * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field],
+     * otherwise, documents without IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     * 
+ * + * bool auto_generate_ids = 8; + * + * @return This builder for chaining. + */ + public Builder clearAutoGenerateIds() { + bitField0_ = (bitField0_ & ~0x00000040); + autoGenerateIds_ = false; + onChanged(); + return this; + } + + private java.lang.Object idField_ = ""; + /** + * + * + *
+     * The field in the Cloud Storage and BigQuery sources that indicates the
+     * unique IDs of the documents.
+     *
+     * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+     * "some_uuid"}`. For
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+     * the column name of the BigQuery table where the unique ids are stored.
+     *
+     * The values of the JSON field or the BigQuery column are used as the
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+     * field or the BigQuery column must be of string type, and the values must be
+     * set as valid strings conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+     * Otherwise, documents without valid IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom`. And only set this field when
+     * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     *
+     * If it is unset, a default value `_id` is used when importing from the
+     * allowed data sources.
+     * 
+ * + * string id_field = 9; + * + * @return The idField. + */ + public java.lang.String getIdField() { + java.lang.Object ref = idField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idField_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The field in the Cloud Storage and BigQuery sources that indicates the
+     * unique IDs of the documents.
+     *
+     * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+     * "some_uuid"}`. For
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+     * the column name of the BigQuery table where the unique ids are stored.
+     *
+     * The values of the JSON field or the BigQuery column are used as the
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+     * field or the BigQuery column must be of string type, and the values must be
+     * set as valid strings conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+     * Otherwise, documents without valid IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom`. And only set this field when
+     * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     *
+     * If it is unset, a default value `_id` is used when importing from the
+     * allowed data sources.
+     * 
+ * + * string id_field = 9; + * + * @return The bytes for idField. + */ + public com.google.protobuf.ByteString getIdFieldBytes() { + java.lang.Object ref = idField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + idField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The field in the Cloud Storage and BigQuery sources that indicates the
+     * unique IDs of the documents.
+     *
+     * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+     * "some_uuid"}`. For
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+     * the column name of the BigQuery table where the unique ids are stored.
+     *
+     * The values of the JSON field or the BigQuery column are used as the
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+     * field or the BigQuery column must be of string type, and the values must be
+     * set as valid strings conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+     * Otherwise, documents without valid IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom`. And only set this field when
+     * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     *
+     * If it is unset, a default value `_id` is used when importing from the
+     * allowed data sources.
+     * 
+ * + * string id_field = 9; + * + * @param value The idField to set. + * @return This builder for chaining. + */ + public Builder setIdField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + idField_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The field in the Cloud Storage and BigQuery sources that indicates the
+     * unique IDs of the documents.
+     *
+     * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+     * "some_uuid"}`. For
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+     * the column name of the BigQuery table where the unique ids are stored.
+     *
+     * The values of the JSON field or the BigQuery column are used as the
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+     * field or the BigQuery column must be of string type, and the values must be
+     * set as valid strings conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+     * Otherwise, documents without valid IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom`. And only set this field when
+     * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     *
+     * If it is unset, a default value `_id` is used when importing from the
+     * allowed data sources.
+     * 
+ * + * string id_field = 9; + * + * @return This builder for chaining. + */ + public Builder clearIdField() { + idField_ = getDefaultInstance().getIdField(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The field in the Cloud Storage and BigQuery sources that indicates the
+     * unique IDs of the documents.
+     *
+     * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+     * "some_uuid"}`. For
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+     * the column name of the BigQuery table where the unique ids are stored.
+     *
+     * The values of the JSON field or the BigQuery column are used as the
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+     * field or the BigQuery column must be of string type, and the values must be
+     * set as valid strings conform to
+     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+     * Otherwise, documents without valid IDs fail to be imported.
+     *
+     * Only set this field when using
+     * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+     * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+     * when
+     * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+     * or
+     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+     * is `custom`. And only set this field when
+     * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+     *
+     * If it is unset, a default value `_id` is used when importing from the
+     * allowed data sources.
+     * 
+ * + * string id_field = 9; + * + * @param value The bytes for idField to set. + * @return This builder for chaining. + */ + public Builder setIdFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + idField_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) + private static final com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequestOrBuilder.java new file mode 100644 index 000000000000..88049e85bd0c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsRequestOrBuilder.java @@ -0,0 +1,355 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Inline source for the input content for documents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + boolean hasInlineSource(); + /** + * + * + *
+   * The Inline source for the input content for documents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource getInlineSource(); + /** + * + * + *
+   * The Inline source for the input content for documents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSource inline_source = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder(); + + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return The gcsSource. + */ + com.google.cloud.discoveryengine.v1alpha.GcsSource getGcsSource(); + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return Whether the bigquerySource field is set. + */ + boolean hasBigquerySource(); + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return The bigquerySource. + */ + com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource(); + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder getBigquerySourceOrBuilder(); + + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Requires create/update permission.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Requires create/update permission.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The desired location of errors incurred during the Import.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return Whether the errorConfig field is set. + */ + boolean hasErrorConfig(); + /** + * + * + *
+   * The desired location of errors incurred during the Import.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return The errorConfig. + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig(); + /** + * + * + *
+   * The desired location of errors incurred during the Import.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder getErrorConfigOrBuilder(); + + /** + * + * + *
+   * The mode of reconciliation between existing documents and the documents to
+   * be imported. Defaults to
+   * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @return The enum numeric value on the wire for reconciliationMode. + */ + int getReconciliationModeValue(); + /** + * + * + *
+   * The mode of reconciliation between existing documents and the documents to
+   * be imported. Defaults to
+   * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; + * + * + * @return The reconciliationMode. + */ + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode + getReconciliationMode(); + + /** + * + * + *
+   * Whether to automatically generate IDs for the documents if absent.
+   *
+   * If set to `true`,
+   * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s are
+   * automatically generated based on the hash of the payload, where IDs may not
+   * be consistent during multiple imports. In which case
+   * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL]
+   * is highly recommended to avoid duplicate contents. If unset or set to
+   * `false`, [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s
+   * have to be specified using
+   * [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field],
+   * otherwise, documents without IDs fail to be imported.
+   *
+   * Only set this field when using
+   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+   * when
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * or
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   * 
+ * + * bool auto_generate_ids = 8; + * + * @return The autoGenerateIds. + */ + boolean getAutoGenerateIds(); + + /** + * + * + *
+   * The field in the Cloud Storage and BigQuery sources that indicates the
+   * unique IDs of the documents.
+   *
+   * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+   * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+   * "some_uuid"}`. For
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+   * the column name of the BigQuery table where the unique ids are stored.
+   *
+   * The values of the JSON field or the BigQuery column are used as the
+   * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+   * field or the BigQuery column must be of string type, and the values must be
+   * set as valid strings conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+   * Otherwise, documents without valid IDs fail to be imported.
+   *
+   * Only set this field when using
+   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+   * when
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * or
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * is `custom`. And only set this field when
+   * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+   * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   *
+   * If it is unset, a default value `_id` is used when importing from the
+   * allowed data sources.
+   * 
+ * + * string id_field = 9; + * + * @return The idField. + */ + java.lang.String getIdField(); + /** + * + * + *
+   * The field in the Cloud Storage and BigQuery sources that indicates the
+   * unique IDs of the documents.
+   *
+   * For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
+   * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
+   * "some_uuid"}`. For
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
+   * the column name of the BigQuery table where the unique ids are stored.
+   *
+   * The values of the JSON field or the BigQuery column are used as the
+   * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
+   * field or the BigQuery column must be of string type, and the values must be
+   * set as valid strings conform to
+   * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
+   * Otherwise, documents without valid IDs fail to be imported.
+   *
+   * Only set this field when using
+   * [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
+   * [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
+   * when
+   * [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
+   * or
+   * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
+   * is `custom`. And only set this field when
+   * [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
+   * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
+   *
+   * If it is unset, a default value `_id` is used when importing from the
+   * allowed data sources.
+   * 
+ * + * string id_field = 9; + * + * @return The bytes for idField. + */ + com.google.protobuf.ByteString getIdFieldBytes(); + + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.SourceCase getSourceCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsResponse.java new file mode 100644 index 000000000000..d5e7a39c9c31 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsResponse.java @@ -0,0 +1,1209 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response of the
+ * [ImportDocumentsRequest][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest].
+ * If the long running operation is done, then this message is returned by the
+ * google.longrunning.Operations.response field if the operation was successful.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse} + */ +public final class ImportDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) + ImportDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDocumentsResponse.newBuilder() to construct. + private ImportDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDocumentsResponse() { + errorSamples_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportDocumentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse.Builder.class); + } + + public static final int ERROR_SAMPLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List errorSamples_; + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesList() { + return errorSamples_; + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesOrBuilderList() { + return errorSamples_; + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public int getErrorSamplesCount() { + return errorSamples_.size(); + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.Status getErrorSamples(int index) { + return errorSamples_.get(index); + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + return errorSamples_.get(index); + } + + public static final int ERROR_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + /** + * + * + *
+   * Echoes the destination for the complete errors in the request if set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return Whether the errorConfig field is set. + */ + @java.lang.Override + public boolean hasErrorConfig() { + return errorConfig_ != null; + } + /** + * + * + *
+   * Echoes the destination for the complete errors in the request if set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return The errorConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + /** + * + * + *
+   * Echoes the destination for the complete errors in the request if set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errorSamples_.size(); i++) { + output.writeMessage(1, errorSamples_.get(i)); + } + if (errorConfig_ != null) { + output.writeMessage(2, getErrorConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errorSamples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorSamples_.get(i)); + } + if (errorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse other = + (com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) obj; + + if (!getErrorSamplesList().equals(other.getErrorSamplesList())) return false; + if (hasErrorConfig() != other.hasErrorConfig()) return false; + if (hasErrorConfig()) { + if (!getErrorConfig().equals(other.getErrorConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorSamplesCount() > 0) { + hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getErrorSamplesList().hashCode(); + } + if (hasErrorConfig()) { + hash = (37 * hash) + ERROR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getErrorConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of the
+   * [ImportDocumentsRequest][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest].
+   * If the long running operation is done, then this message is returned by the
+   * google.longrunning.Operations.response field if the operation was successful.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + } else { + errorSamples_ = null; + errorSamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportDocumentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse build() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse result = + new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse result) { + if (errorSamplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorSamples_ = errorSamples_; + } else { + result.errorSamples_ = errorSamplesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.errorConfig_ = + errorConfigBuilder_ == null ? errorConfig_ : errorConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse.getDefaultInstance()) + return this; + if (errorSamplesBuilder_ == null) { + if (!other.errorSamples_.isEmpty()) { + if (errorSamples_.isEmpty()) { + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorSamplesIsMutable(); + errorSamples_.addAll(other.errorSamples_); + } + onChanged(); + } + } else { + if (!other.errorSamples_.isEmpty()) { + if (errorSamplesBuilder_.isEmpty()) { + errorSamplesBuilder_.dispose(); + errorSamplesBuilder_ = null; + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + errorSamplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorSamplesFieldBuilder() + : null; + } else { + errorSamplesBuilder_.addAllMessages(other.errorSamples_); + } + } + } + if (other.hasErrorConfig()) { + mergeErrorConfig(other.getErrorConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List errorSamples_ = java.util.Collections.emptyList(); + + private void ensureErrorSamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = new java.util.ArrayList(errorSamples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorSamplesBuilder_; + + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesList() { + if (errorSamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorSamples_); + } else { + return errorSamplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public int getErrorSamplesCount() { + if (errorSamplesBuilder_ == null) { + return errorSamples_.size(); + } else { + return errorSamplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status getErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, value); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addAllErrorSamples(java.lang.Iterable values) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorSamples_); + onChanged(); + } else { + errorSamplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder clearErrorSamples() { + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorSamplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder removeErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.remove(index); + onChanged(); + } else { + errorSamplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder getErrorSamplesBuilder(int index) { + return getErrorSamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesOrBuilderList() { + if (errorSamplesBuilder_ != null) { + return errorSamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorSamples_); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder() { + return getErrorSamplesFieldBuilder().addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder(int index) { + return getErrorSamplesFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesBuilderList() { + return getErrorSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorSamplesFieldBuilder() { + if (errorSamplesBuilder_ == null) { + errorSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + errorSamples_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errorSamples_ = null; + } + return errorSamplesBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + errorConfigBuilder_; + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return Whether the errorConfig field is set. + */ + public boolean hasErrorConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return The errorConfig. + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + if (errorConfigBuilder_ == null) { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } else { + return errorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + errorConfig_ = value; + } else { + errorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder builderForValue) { + if (errorConfigBuilder_ == null) { + errorConfig_ = builderForValue.build(); + } else { + errorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder mergeErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && errorConfig_ != null + && errorConfig_ + != com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig + .getDefaultInstance()) { + getErrorConfigBuilder().mergeFrom(value); + } else { + errorConfig_ = value; + } + } else { + errorConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder clearErrorConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder + getErrorConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getErrorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + if (errorConfigBuilder_ != null) { + return errorConfigBuilder_.getMessageOrBuilder(); + } else { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + } + /** + * + * + *
+     * Echoes the destination for the complete errors in the request if set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + getErrorConfigFieldBuilder() { + if (errorConfigBuilder_ == null) { + errorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder>( + getErrorConfig(), getParentForChildren(), isClean()); + errorConfig_ = null; + } + return errorConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) + private static final com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDocumentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsResponseOrBuilder.java new file mode 100644 index 000000000000..ab025a72d265 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportDocumentsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportDocumentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesList(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.Status getErrorSamples(int index); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + int getErrorSamplesCount(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesOrBuilderList(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index); + + /** + * + * + *
+   * Echoes the destination for the complete errors in the request if set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return Whether the errorConfig field is set. + */ + boolean hasErrorConfig(); + /** + * + * + *
+   * Echoes the destination for the complete errors in the request if set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return The errorConfig. + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig(); + /** + * + * + *
+   * Echoes the destination for the complete errors in the request if set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder getErrorConfigOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportErrorConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportErrorConfig.java new file mode 100644 index 000000000000..0761429b8438 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportErrorConfig.java @@ -0,0 +1,784 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Configuration of destination for Import related errors.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportErrorConfig} + */ +public final class ImportErrorConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportErrorConfig) + ImportErrorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportErrorConfig.newBuilder() to construct. + private ImportErrorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportErrorConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportErrorConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.class, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder.class); + } + + private int destinationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_PREFIX(1), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_PREFIX; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_PREFIX_FIELD_NUMBER = 1; + /** + * + * + *
+   * Cloud Storage prefix for import errors. This must be an empty,
+   * existing Cloud Storage directory. Import errors are written to
+   * sharded files in this directory, one per line, as a JSON-encoded
+   * `google.rpc.Status` message.
+   * 
+ * + * string gcs_prefix = 1; + * + * @return Whether the gcsPrefix field is set. + */ + public boolean hasGcsPrefix() { + return destinationCase_ == 1; + } + /** + * + * + *
+   * Cloud Storage prefix for import errors. This must be an empty,
+   * existing Cloud Storage directory. Import errors are written to
+   * sharded files in this directory, one per line, as a JSON-encoded
+   * `google.rpc.Status` message.
+   * 
+ * + * string gcs_prefix = 1; + * + * @return The gcsPrefix. + */ + public java.lang.String getGcsPrefix() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 1) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * Cloud Storage prefix for import errors. This must be an empty,
+   * existing Cloud Storage directory. Import errors are written to
+   * sharded files in this directory, one per line, as a JSON-encoded
+   * `google.rpc.Status` message.
+   * 
+ * + * string gcs_prefix = 1; + * + * @return The bytes for gcsPrefix. + */ + public com.google.protobuf.ByteString getGcsPrefixBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 1) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (destinationCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig other = + (com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsPrefix().equals(other.getGcsPrefix())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getGcsPrefix().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration of destination for Import related errors.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportErrorConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportErrorConfig) + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.class, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportErrorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig build() { + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig result = + new com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig other) { + if (other == com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance()) + return this; + switch (other.getDestinationCase()) { + case GCS_PREFIX: + { + destinationCase_ = 1; + destination_ = other.destination_; + onChanged(); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Cloud Storage prefix for import errors. This must be an empty,
+     * existing Cloud Storage directory. Import errors are written to
+     * sharded files in this directory, one per line, as a JSON-encoded
+     * `google.rpc.Status` message.
+     * 
+ * + * string gcs_prefix = 1; + * + * @return Whether the gcsPrefix field is set. + */ + @java.lang.Override + public boolean hasGcsPrefix() { + return destinationCase_ == 1; + } + /** + * + * + *
+     * Cloud Storage prefix for import errors. This must be an empty,
+     * existing Cloud Storage directory. Import errors are written to
+     * sharded files in this directory, one per line, as a JSON-encoded
+     * `google.rpc.Status` message.
+     * 
+ * + * string gcs_prefix = 1; + * + * @return The gcsPrefix. + */ + @java.lang.Override + public java.lang.String getGcsPrefix() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 1) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud Storage prefix for import errors. This must be an empty,
+     * existing Cloud Storage directory. Import errors are written to
+     * sharded files in this directory, one per line, as a JSON-encoded
+     * `google.rpc.Status` message.
+     * 
+ * + * string gcs_prefix = 1; + * + * @return The bytes for gcsPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsPrefixBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 1) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 1) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud Storage prefix for import errors. This must be an empty,
+     * existing Cloud Storage directory. Import errors are written to
+     * sharded files in this directory, one per line, as a JSON-encoded
+     * `google.rpc.Status` message.
+     * 
+ * + * string gcs_prefix = 1; + * + * @param value The gcsPrefix to set. + * @return This builder for chaining. + */ + public Builder setGcsPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 1; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Storage prefix for import errors. This must be an empty,
+     * existing Cloud Storage directory. Import errors are written to
+     * sharded files in this directory, one per line, as a JSON-encoded
+     * `google.rpc.Status` message.
+     * 
+ * + * string gcs_prefix = 1; + * + * @return This builder for chaining. + */ + public Builder clearGcsPrefix() { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Cloud Storage prefix for import errors. This must be an empty,
+     * existing Cloud Storage directory. Import errors are written to
+     * sharded files in this directory, one per line, as a JSON-encoded
+     * `google.rpc.Status` message.
+     * 
+ * + * string gcs_prefix = 1; + * + * @param value The bytes for gcsPrefix to set. + * @return This builder for chaining. + */ + public Builder setGcsPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 1; + destination_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportErrorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportErrorConfig) + private static final com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportErrorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportErrorConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportErrorConfigOrBuilder.java new file mode 100644 index 000000000000..ff0bf81d0060 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportErrorConfigOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportErrorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportErrorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud Storage prefix for import errors. This must be an empty,
+   * existing Cloud Storage directory. Import errors are written to
+   * sharded files in this directory, one per line, as a JSON-encoded
+   * `google.rpc.Status` message.
+   * 
+ * + * string gcs_prefix = 1; + * + * @return Whether the gcsPrefix field is set. + */ + boolean hasGcsPrefix(); + /** + * + * + *
+   * Cloud Storage prefix for import errors. This must be an empty,
+   * existing Cloud Storage directory. Import errors are written to
+   * sharded files in this directory, one per line, as a JSON-encoded
+   * `google.rpc.Status` message.
+   * 
+ * + * string gcs_prefix = 1; + * + * @return The gcsPrefix. + */ + java.lang.String getGcsPrefix(); + /** + * + * + *
+   * Cloud Storage prefix for import errors. This must be an empty,
+   * existing Cloud Storage directory. Import errors are written to
+   * sharded files in this directory, one per line, as a JSON-encoded
+   * `google.rpc.Status` message.
+   * 
+ * + * string gcs_prefix = 1; + * + * @return The bytes for gcsPrefix. + */ + com.google.protobuf.ByteString getGcsPrefixBytes(); + + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.DestinationCase getDestinationCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsMetadata.java new file mode 100644 index 000000000000..43fb807a972f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsMetadata.java @@ -0,0 +1,1171 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata related to the progress of the Import operation. This is
+ * returned by the google.longrunning.Operation.metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata} + */ +public final class ImportUserEventsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) + ImportUserEventsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportUserEventsMetadata.newBuilder() to construct. + private ImportUserEventsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportUserEventsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportUserEventsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private long successCount_ = 0L; + /** + * + * + *
+   * Count of entries that were processed successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private long failureCount_ = 0L; + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + if (successCount_ != 0L) { + output.writeInt64(3, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(4, failureCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata other = + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the Import operation. This is
+   * returned by the google.longrunning.Operation.metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata build() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata result = + new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.failureCount_ = failureCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long successCount_; + /** + * + * + *
+     * Count of entries that were processed successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of entries that were processed successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that were processed successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000004); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000008); + failureCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportUserEventsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsMetadataOrBuilder.java new file mode 100644 index 000000000000..60e6b1bdbc16 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsMetadataOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportUserEventsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Count of entries that were processed successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsRequest.java new file mode 100644 index 000000000000..9b1076884f27 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsRequest.java @@ -0,0 +1,3041 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for the ImportUserEvents request.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest} + */ +public final class ImportUserEventsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) + ImportUserEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportUserEventsRequest.newBuilder() to construct. + private ImportUserEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportUserEventsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportUserEventsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.Builder.class); + } + + public interface InlineSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getUserEventsList(); + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvents(int index); + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getUserEventsCount(); + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getUserEventsOrBuilderList(); + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventsOrBuilder(int index); + } + /** + * + * + *
+   * The inline source for the input config for ImportUserEvents method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource} + */ + public static final class InlineSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + InlineSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use InlineSource.newBuilder() to construct. + private InlineSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InlineSource() { + userEvents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InlineSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.Builder + .class); + } + + public static final int USER_EVENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List userEvents_; + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getUserEventsList() { + return userEvents_; + } + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getUserEventsOrBuilderList() { + return userEvents_; + } + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getUserEventsCount() { + return userEvents_.size(); + } + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvents(int index) { + return userEvents_.get(index); + } + /** + * + * + *
+     * Required. A list of user events to import. Recommended max of 10k items.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventsOrBuilder( + int index) { + return userEvents_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < userEvents_.size(); i++) { + output.writeMessage(1, userEvents_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userEvents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userEvents_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource other = + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) obj; + + if (!getUserEventsList().equals(other.getUserEventsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUserEventsCount() > 0) { + hash = (37 * hash) + USER_EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getUserEventsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The inline source for the input config for ImportUserEvents method.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userEventsBuilder_ == null) { + userEvents_ = java.util.Collections.emptyList(); + } else { + userEvents_ = null; + userEventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_InlineSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource build() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource result = + new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource result) { + if (userEventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userEvents_ = java.util.Collections.unmodifiableList(userEvents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userEvents_ = userEvents_; + } else { + result.userEvents_ = userEventsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance()) return this; + if (userEventsBuilder_ == null) { + if (!other.userEvents_.isEmpty()) { + if (userEvents_.isEmpty()) { + userEvents_ = other.userEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserEventsIsMutable(); + userEvents_.addAll(other.userEvents_); + } + onChanged(); + } + } else { + if (!other.userEvents_.isEmpty()) { + if (userEventsBuilder_.isEmpty()) { + userEventsBuilder_.dispose(); + userEventsBuilder_ = null; + userEvents_ = other.userEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + userEventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUserEventsFieldBuilder() + : null; + } else { + userEventsBuilder_.addAllMessages(other.userEvents_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.UserEvent m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.UserEvent.parser(), + extensionRegistry); + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + userEvents_.add(m); + } else { + userEventsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List userEvents_ = + java.util.Collections.emptyList(); + + private void ensureUserEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userEvents_ = + new java.util.ArrayList( + userEvents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder> + userEventsBuilder_; + + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserEventsList() { + if (userEventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(userEvents_); + } else { + return userEventsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getUserEventsCount() { + if (userEventsBuilder_ == null) { + return userEvents_.size(); + } else { + return userEventsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvents(int index) { + if (userEventsBuilder_ == null) { + return userEvents_.get(index); + } else { + return userEventsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserEvents( + int index, com.google.cloud.discoveryengine.v1alpha.UserEvent value) { + if (userEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserEventsIsMutable(); + userEvents_.set(index, value); + onChanged(); + } else { + userEventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserEvents( + int index, com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder builderForValue) { + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + userEvents_.set(index, builderForValue.build()); + onChanged(); + } else { + userEventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserEvents(com.google.cloud.discoveryengine.v1alpha.UserEvent value) { + if (userEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserEventsIsMutable(); + userEvents_.add(value); + onChanged(); + } else { + userEventsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserEvents( + int index, com.google.cloud.discoveryengine.v1alpha.UserEvent value) { + if (userEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserEventsIsMutable(); + userEvents_.add(index, value); + onChanged(); + } else { + userEventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserEvents( + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder builderForValue) { + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + userEvents_.add(builderForValue.build()); + onChanged(); + } else { + userEventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserEvents( + int index, com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder builderForValue) { + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + userEvents_.add(index, builderForValue.build()); + onChanged(); + } else { + userEventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllUserEvents( + java.lang.Iterable values) { + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userEvents_); + onChanged(); + } else { + userEventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserEvents() { + if (userEventsBuilder_ == null) { + userEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userEventsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeUserEvents(int index) { + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + userEvents_.remove(index); + onChanged(); + } else { + userEventsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder getUserEventsBuilder( + int index) { + return getUserEventsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventsOrBuilder( + int index) { + if (userEventsBuilder_ == null) { + return userEvents_.get(index); + } else { + return userEventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserEventsOrBuilderList() { + if (userEventsBuilder_ != null) { + return userEventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userEvents_); + } + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder addUserEventsBuilder() { + return getUserEventsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance()); + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder addUserEventsBuilder( + int index) { + return getUserEventsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance()); + } + /** + * + * + *
+       * Required. A list of user events to import. Recommended max of 10k items.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.UserEvent user_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserEventsBuilderList() { + return getUserEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder> + getUserEventsFieldBuilder() { + if (userEventsBuilder_ == null) { + userEventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder>( + userEvents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + userEvents_ = null; + } + return userEventsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + private static final com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + .InlineSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SOURCE(2), + GCS_SOURCE(3), + BIGQUERY_SOURCE(4), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return INLINE_SOURCE; + case 3: + return GCS_SOURCE; + case 4: + return BIGQUERY_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int INLINE_SOURCE_FIELD_NUMBER = 2; + /** + * + * + *
+   * The Inline source for the input content for UserEvents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+   * The Inline source for the input content for UserEvents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + getInlineSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance(); + } + /** + * + * + *
+   * The Inline source for the input content for UserEvents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance(); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 3; + } + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource getGcsSource() { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + + public static final int BIGQUERY_SOURCE_FIELD_NUMBER = 4; + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 4; + } + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource() { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder + getBigquerySourceOrBuilder() { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent DataStore resource name, of the form
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent DataStore resource name, of the form
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + /** + * + * + *
+   * The desired location of errors incurred during the Import. Cannot be set
+   * for inline user event imports.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return Whether the errorConfig field is set. + */ + @java.lang.Override + public boolean hasErrorConfig() { + return errorConfig_ != null; + } + /** + * + * + *
+   * The desired location of errors incurred during the Import. Cannot be set
+   * for inline user event imports.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return The errorConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + /** + * + * + *
+   * The desired location of errors incurred during the Import. Cannot be set
+   * for inline user event imports.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (sourceCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_); + } + if (sourceCase_ == 4) { + output.writeMessage(4, (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_); + } + if (errorConfig_ != null) { + output.writeMessage(5, getErrorConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + source_); + } + if (sourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_); + } + if (sourceCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_); + } + if (errorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getErrorConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest other = + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasErrorConfig() != other.hasErrorConfig()) return false; + if (hasErrorConfig()) { + if (!getErrorConfig().equals(other.getErrorConfig())) return false; + } + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getInlineSource().equals(other.getInlineSource())) return false; + break; + case 3: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 4: + if (!getBigquerySource().equals(other.getBigquerySource())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasErrorConfig()) { + hash = (37 * hash) + ERROR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getErrorConfig().hashCode(); + } + switch (sourceCase_) { + case 2: + hash = (37 * hash) + INLINE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInlineSource().hashCode(); + break; + case 3: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 4: + hash = (37 * hash) + BIGQUERY_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBigquerySource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for the ImportUserEvents request.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineSourceBuilder_ != null) { + inlineSourceBuilder_.clear(); + } + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigquerySourceBuilder_ != null) { + bigquerySourceBuilder_.clear(); + } + parent_ = ""; + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest build() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest result = + new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.errorConfig_ = + errorConfigBuilder_ == null ? errorConfig_ : errorConfigBuilder_.build(); + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 2 && inlineSourceBuilder_ != null) { + result.source_ = inlineSourceBuilder_.build(); + } + if (sourceCase_ == 3 && gcsSourceBuilder_ != null) { + result.source_ = gcsSourceBuilder_.build(); + } + if (sourceCase_ == 4 && bigquerySourceBuilder_ != null) { + result.source_ = bigquerySourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasErrorConfig()) { + mergeErrorConfig(other.getErrorConfig()); + } + switch (other.getSourceCase()) { + case INLINE_SOURCE: + { + mergeInlineSource(other.getInlineSource()); + break; + } + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case BIGQUERY_SOURCE: + { + mergeBigquerySource(other.getBigquerySource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 10 + case 18: + { + input.readMessage(getInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getBigquerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getErrorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSourceOrBuilder> + inlineSourceBuilder_; + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + getInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return inlineSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + inlineSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.Builder + builderForValue) { + if (inlineSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + inlineSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + public Builder mergeInlineSource( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ + != com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .newBuilder( + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + .InlineSource) + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + inlineSourceBuilder_.mergeFrom(value); + } else { + inlineSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + public Builder clearInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + inlineSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.Builder + getInlineSourceBuilder() { + return getInlineSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if ((sourceCase_ == 2) && (inlineSourceBuilder_ != null)) { + return inlineSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The Inline source for the input content for UserEvents.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSourceOrBuilder> + getInlineSourceFieldBuilder() { + if (inlineSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .getDefaultInstance(); + } + inlineSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + .InlineSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource) + source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return inlineSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 3; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder setGcsSource(com.google.cloud.discoveryengine.v1alpha.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder setGcsSource( + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder mergeGcsSource(com.google.cloud.discoveryengine.v1alpha.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 3 + && source_ != com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.GcsSource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 3; + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + public com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 3) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Cloud Storage location for the input content.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.cloud.discoveryengine.v1alpha.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.GcsSource, + com.google.cloud.discoveryengine.v1alpha.GcsSource.Builder, + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.GcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged(); + return gcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> + bigquerySourceBuilder_; + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return Whether the bigquerySource field is set. + */ + @java.lang.Override + public boolean hasBigquerySource() { + return sourceCase_ == 4; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return The bigquerySource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } else { + if (sourceCase_ == 4) { + return bigquerySourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder setBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(value); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder setBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder builderForValue) { + if (bigquerySourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigquerySourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder mergeBigquerySource( + com.google.cloud.discoveryengine.v1alpha.BigQuerySource value) { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4 + && source_ + != com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 4) { + bigquerySourceBuilder_.mergeFrom(value); + } else { + bigquerySourceBuilder_.setMessage(value); + } + } + sourceCase_ = 4; + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public Builder clearBigquerySource() { + if (bigquerySourceBuilder_ == null) { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + } + bigquerySourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder + getBigquerySourceBuilder() { + return getBigquerySourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder + getBigquerySourceOrBuilder() { + if ((sourceCase_ == 4) && (bigquerySourceBuilder_ != null)) { + return bigquerySourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 4) { + return (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_; + } + return com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + } + /** + * + * + *
+     * BigQuery input source.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder> + getBigquerySourceFieldBuilder() { + if (bigquerySourceBuilder_ == null) { + if (!(sourceCase_ == 4)) { + source_ = com.google.cloud.discoveryengine.v1alpha.BigQuerySource.getDefaultInstance(); + } + bigquerySourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.BigQuerySource, + com.google.cloud.discoveryengine.v1alpha.BigQuerySource.Builder, + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.BigQuerySource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 4; + onChanged(); + return bigquerySourceBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent DataStore resource name, of the form
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent DataStore resource name, of the form
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent DataStore resource name, of the form
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent DataStore resource name, of the form
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent DataStore resource name, of the form
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + errorConfigBuilder_; + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return Whether the errorConfig field is set. + */ + public boolean hasErrorConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return The errorConfig. + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + if (errorConfigBuilder_ == null) { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } else { + return errorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + errorConfig_ = value; + } else { + errorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder builderForValue) { + if (errorConfigBuilder_ == null) { + errorConfig_ = builderForValue.build(); + } else { + errorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder mergeErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && errorConfig_ != null + && errorConfig_ + != com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig + .getDefaultInstance()) { + getErrorConfigBuilder().mergeFrom(value); + } else { + errorConfig_ = value; + } + } else { + errorConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public Builder clearErrorConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder + getErrorConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getErrorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + if (errorConfigBuilder_ != null) { + return errorConfigBuilder_.getMessageOrBuilder(); + } else { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + } + /** + * + * + *
+     * The desired location of errors incurred during the Import. Cannot be set
+     * for inline user event imports.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + getErrorConfigFieldBuilder() { + if (errorConfigBuilder_ == null) { + errorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder>( + getErrorConfig(), getParentForChildren(), isClean()); + errorConfig_ = null; + } + return errorConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) + private static final com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportUserEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsRequestOrBuilder.java new file mode 100644 index 000000000000..c69b02629e61 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsRequestOrBuilder.java @@ -0,0 +1,208 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportUserEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Inline source for the input content for UserEvents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + boolean hasInlineSource(); + /** + * + * + *
+   * The Inline source for the input content for UserEvents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource getInlineSource(); + /** + * + * + *
+   * The Inline source for the input content for UserEvents.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSource inline_source = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder(); + + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + * + * @return The gcsSource. + */ + com.google.cloud.discoveryengine.v1alpha.GcsSource getGcsSource(); + /** + * + * + *
+   * Cloud Storage location for the input content.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.GcsSource gcs_source = 3; + */ + com.google.cloud.discoveryengine.v1alpha.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return Whether the bigquerySource field is set. + */ + boolean hasBigquerySource(); + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + * + * @return The bigquerySource. + */ + com.google.cloud.discoveryengine.v1alpha.BigQuerySource getBigquerySource(); + /** + * + * + *
+   * BigQuery input source.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.BigQuerySource bigquery_source = 4; + */ + com.google.cloud.discoveryengine.v1alpha.BigQuerySourceOrBuilder getBigquerySourceOrBuilder(); + + /** + * + * + *
+   * Required. Parent DataStore resource name, of the form
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent DataStore resource name, of the form
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The desired location of errors incurred during the Import. Cannot be set
+   * for inline user event imports.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return Whether the errorConfig field is set. + */ + boolean hasErrorConfig(); + /** + * + * + *
+   * The desired location of errors incurred during the Import. Cannot be set
+   * for inline user event imports.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + * + * @return The errorConfig. + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig(); + /** + * + * + *
+   * The desired location of errors incurred during the Import. Cannot be set
+   * for inline user event imports.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 5; + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder getErrorConfigOrBuilder(); + + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest.SourceCase getSourceCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsResponse.java new file mode 100644 index 000000000000..26994dc43853 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsResponse.java @@ -0,0 +1,1411 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response of the ImportUserEventsRequest. If the long running
+ * operation was successful, then this message is returned by the
+ * google.longrunning.Operations.response field if the operation was successful.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse} + */ +public final class ImportUserEventsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) + ImportUserEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportUserEventsResponse.newBuilder() to construct. + private ImportUserEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportUserEventsResponse() { + errorSamples_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportUserEventsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse.Builder.class); + } + + public static final int ERROR_SAMPLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List errorSamples_; + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesList() { + return errorSamples_; + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesOrBuilderList() { + return errorSamples_; + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public int getErrorSamplesCount() { + return errorSamples_.size(); + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.Status getErrorSamples(int index) { + return errorSamples_.get(index); + } + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + return errorSamples_.get(index); + } + + public static final int ERROR_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + /** + * + * + *
+   * Echoes the destination for the complete errors if this field was set in
+   * the request.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return Whether the errorConfig field is set. + */ + @java.lang.Override + public boolean hasErrorConfig() { + return errorConfig_ != null; + } + /** + * + * + *
+   * Echoes the destination for the complete errors if this field was set in
+   * the request.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return The errorConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + /** + * + * + *
+   * Echoes the destination for the complete errors if this field was set in
+   * the request.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + + public static final int JOINED_EVENTS_COUNT_FIELD_NUMBER = 3; + private long joinedEventsCount_ = 0L; + /** + * + * + *
+   * Count of user events imported with complete existing Documents.
+   * 
+ * + * int64 joined_events_count = 3; + * + * @return The joinedEventsCount. + */ + @java.lang.Override + public long getJoinedEventsCount() { + return joinedEventsCount_; + } + + public static final int UNJOINED_EVENTS_COUNT_FIELD_NUMBER = 4; + private long unjoinedEventsCount_ = 0L; + /** + * + * + *
+   * Count of user events imported, but with Document information not found
+   * in the existing Branch.
+   * 
+ * + * int64 unjoined_events_count = 4; + * + * @return The unjoinedEventsCount. + */ + @java.lang.Override + public long getUnjoinedEventsCount() { + return unjoinedEventsCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < errorSamples_.size(); i++) { + output.writeMessage(1, errorSamples_.get(i)); + } + if (errorConfig_ != null) { + output.writeMessage(2, getErrorConfig()); + } + if (joinedEventsCount_ != 0L) { + output.writeInt64(3, joinedEventsCount_); + } + if (unjoinedEventsCount_ != 0L) { + output.writeInt64(4, unjoinedEventsCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errorSamples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorSamples_.get(i)); + } + if (errorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorConfig()); + } + if (joinedEventsCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, joinedEventsCount_); + } + if (unjoinedEventsCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, unjoinedEventsCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse other = + (com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) obj; + + if (!getErrorSamplesList().equals(other.getErrorSamplesList())) return false; + if (hasErrorConfig() != other.hasErrorConfig()) return false; + if (hasErrorConfig()) { + if (!getErrorConfig().equals(other.getErrorConfig())) return false; + } + if (getJoinedEventsCount() != other.getJoinedEventsCount()) return false; + if (getUnjoinedEventsCount() != other.getUnjoinedEventsCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getErrorSamplesCount() > 0) { + hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getErrorSamplesList().hashCode(); + } + if (hasErrorConfig()) { + hash = (37 * hash) + ERROR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getErrorConfig().hashCode(); + } + hash = (37 * hash) + JOINED_EVENTS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getJoinedEventsCount()); + hash = (37 * hash) + UNJOINED_EVENTS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUnjoinedEventsCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of the ImportUserEventsRequest. If the long running
+   * operation was successful, then this message is returned by the
+   * google.longrunning.Operations.response field if the operation was successful.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + } else { + errorSamples_ = null; + errorSamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + joinedEventsCount_ = 0L; + unjoinedEventsCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_ImportUserEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse build() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse result = + new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse result) { + if (errorSamplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorSamples_ = errorSamples_; + } else { + result.errorSamples_ = errorSamplesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.errorConfig_ = + errorConfigBuilder_ == null ? errorConfig_ : errorConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.joinedEventsCount_ = joinedEventsCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.unjoinedEventsCount_ = unjoinedEventsCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse.getDefaultInstance()) + return this; + if (errorSamplesBuilder_ == null) { + if (!other.errorSamples_.isEmpty()) { + if (errorSamples_.isEmpty()) { + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorSamplesIsMutable(); + errorSamples_.addAll(other.errorSamples_); + } + onChanged(); + } + } else { + if (!other.errorSamples_.isEmpty()) { + if (errorSamplesBuilder_.isEmpty()) { + errorSamplesBuilder_.dispose(); + errorSamplesBuilder_ = null; + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + errorSamplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorSamplesFieldBuilder() + : null; + } else { + errorSamplesBuilder_.addAllMessages(other.errorSamples_); + } + } + } + if (other.hasErrorConfig()) { + mergeErrorConfig(other.getErrorConfig()); + } + if (other.getJoinedEventsCount() != 0L) { + setJoinedEventsCount(other.getJoinedEventsCount()); + } + if (other.getUnjoinedEventsCount() != 0L) { + setUnjoinedEventsCount(other.getUnjoinedEventsCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + joinedEventsCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + unjoinedEventsCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List errorSamples_ = java.util.Collections.emptyList(); + + private void ensureErrorSamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = new java.util.ArrayList(errorSamples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorSamplesBuilder_; + + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesList() { + if (errorSamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorSamples_); + } else { + return errorSamplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public int getErrorSamplesCount() { + if (errorSamplesBuilder_ == null) { + return errorSamples_.size(); + } else { + return errorSamplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status getErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, value); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addAllErrorSamples(java.lang.Iterable values) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorSamples_); + onChanged(); + } else { + errorSamplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder clearErrorSamples() { + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorSamplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder removeErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.remove(index); + onChanged(); + } else { + errorSamplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder getErrorSamplesBuilder(int index) { + return getErrorSamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesOrBuilderList() { + if (errorSamplesBuilder_ != null) { + return errorSamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorSamples_); + } + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder() { + return getErrorSamplesFieldBuilder().addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder(int index) { + return getErrorSamplesFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * A sample of errors encountered while processing the request.
+     * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesBuilderList() { + return getErrorSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorSamplesFieldBuilder() { + if (errorSamplesBuilder_ == null) { + errorSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + errorSamples_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errorSamples_ = null; + } + return errorSamplesBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig errorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + errorConfigBuilder_; + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return Whether the errorConfig field is set. + */ + public boolean hasErrorConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return The errorConfig. + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig() { + if (errorConfigBuilder_ == null) { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } else { + return errorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + errorConfig_ = value; + } else { + errorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder setErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder builderForValue) { + if (errorConfigBuilder_ == null) { + errorConfig_ = builderForValue.build(); + } else { + errorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder mergeErrorConfig( + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig value) { + if (errorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && errorConfig_ != null + && errorConfig_ + != com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig + .getDefaultInstance()) { + getErrorConfigBuilder().mergeFrom(value); + } else { + errorConfig_ = value; + } + } else { + errorConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public Builder clearErrorConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + errorConfig_ = null; + if (errorConfigBuilder_ != null) { + errorConfigBuilder_.dispose(); + errorConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder + getErrorConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getErrorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder + getErrorConfigOrBuilder() { + if (errorConfigBuilder_ != null) { + return errorConfigBuilder_.getMessageOrBuilder(); + } else { + return errorConfig_ == null + ? com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.getDefaultInstance() + : errorConfig_; + } + } + /** + * + * + *
+     * Echoes the destination for the complete errors if this field was set in
+     * the request.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder> + getErrorConfigFieldBuilder() { + if (errorConfigBuilder_ == null) { + errorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder>( + getErrorConfig(), getParentForChildren(), isClean()); + errorConfig_ = null; + } + return errorConfigBuilder_; + } + + private long joinedEventsCount_; + /** + * + * + *
+     * Count of user events imported with complete existing Documents.
+     * 
+ * + * int64 joined_events_count = 3; + * + * @return The joinedEventsCount. + */ + @java.lang.Override + public long getJoinedEventsCount() { + return joinedEventsCount_; + } + /** + * + * + *
+     * Count of user events imported with complete existing Documents.
+     * 
+ * + * int64 joined_events_count = 3; + * + * @param value The joinedEventsCount to set. + * @return This builder for chaining. + */ + public Builder setJoinedEventsCount(long value) { + + joinedEventsCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of user events imported with complete existing Documents.
+     * 
+ * + * int64 joined_events_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearJoinedEventsCount() { + bitField0_ = (bitField0_ & ~0x00000004); + joinedEventsCount_ = 0L; + onChanged(); + return this; + } + + private long unjoinedEventsCount_; + /** + * + * + *
+     * Count of user events imported, but with Document information not found
+     * in the existing Branch.
+     * 
+ * + * int64 unjoined_events_count = 4; + * + * @return The unjoinedEventsCount. + */ + @java.lang.Override + public long getUnjoinedEventsCount() { + return unjoinedEventsCount_; + } + /** + * + * + *
+     * Count of user events imported, but with Document information not found
+     * in the existing Branch.
+     * 
+ * + * int64 unjoined_events_count = 4; + * + * @param value The unjoinedEventsCount to set. + * @return This builder for chaining. + */ + public Builder setUnjoinedEventsCount(long value) { + + unjoinedEventsCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of user events imported, but with Document information not found
+     * in the existing Branch.
+     * 
+ * + * int64 unjoined_events_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearUnjoinedEventsCount() { + bitField0_ = (bitField0_ & ~0x00000008); + unjoinedEventsCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) + private static final com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportUserEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsResponseOrBuilder.java new file mode 100644 index 000000000000..18f597c8a4a7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ImportUserEventsResponseOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/import_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ImportUserEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesList(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.Status getErrorSamples(int index); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + int getErrorSamplesCount(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesOrBuilderList(); + /** + * + * + *
+   * A sample of errors encountered while processing the request.
+   * 
+ * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index); + + /** + * + * + *
+   * Echoes the destination for the complete errors if this field was set in
+   * the request.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return Whether the errorConfig field is set. + */ + boolean hasErrorConfig(); + /** + * + * + *
+   * Echoes the destination for the complete errors if this field was set in
+   * the request.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + * + * @return The errorConfig. + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig getErrorConfig(); + /** + * + * + *
+   * Echoes the destination for the complete errors if this field was set in
+   * the request.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ImportErrorConfig error_config = 2; + */ + com.google.cloud.discoveryengine.v1alpha.ImportErrorConfigOrBuilder getErrorConfigOrBuilder(); + + /** + * + * + *
+   * Count of user events imported with complete existing Documents.
+   * 
+ * + * int64 joined_events_count = 3; + * + * @return The joinedEventsCount. + */ + long getJoinedEventsCount(); + + /** + * + * + *
+   * Count of user events imported, but with Document information not found
+   * in the existing Branch.
+   * 
+ * + * int64 unjoined_events_count = 4; + * + * @return The unjoinedEventsCount. + */ + long getUnjoinedEventsCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Interval.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Interval.java new file mode 100644 index 000000000000..b8b0218fbef8 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Interval.java @@ -0,0 +1,1149 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * A floating point interval.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Interval} + */ +public final class Interval extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Interval) + IntervalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Interval.newBuilder() to construct. + private Interval(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Interval() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Interval(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_Interval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_Interval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Interval.class, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder.class); + } + + private int minCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object min_; + + public enum MinCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MINIMUM(1), + EXCLUSIVE_MINIMUM(2), + MIN_NOT_SET(0); + private final int value; + + private MinCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MinCase valueOf(int value) { + return forNumber(value); + } + + public static MinCase forNumber(int value) { + switch (value) { + case 1: + return MINIMUM; + case 2: + return EXCLUSIVE_MINIMUM; + case 0: + return MIN_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MinCase getMinCase() { + return MinCase.forNumber(minCase_); + } + + private int maxCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object max_; + + public enum MaxCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MAXIMUM(3), + EXCLUSIVE_MAXIMUM(4), + MAX_NOT_SET(0); + private final int value; + + private MaxCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MaxCase valueOf(int value) { + return forNumber(value); + } + + public static MaxCase forNumber(int value) { + switch (value) { + case 3: + return MAXIMUM; + case 4: + return EXCLUSIVE_MAXIMUM; + case 0: + return MAX_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MaxCase getMaxCase() { + return MaxCase.forNumber(maxCase_); + } + + public static final int MINIMUM_FIELD_NUMBER = 1; + /** + * + * + *
+   * Inclusive lower bound.
+   * 
+ * + * double minimum = 1; + * + * @return Whether the minimum field is set. + */ + @java.lang.Override + public boolean hasMinimum() { + return minCase_ == 1; + } + /** + * + * + *
+   * Inclusive lower bound.
+   * 
+ * + * double minimum = 1; + * + * @return The minimum. + */ + @java.lang.Override + public double getMinimum() { + if (minCase_ == 1) { + return (java.lang.Double) min_; + } + return 0D; + } + + public static final int EXCLUSIVE_MINIMUM_FIELD_NUMBER = 2; + /** + * + * + *
+   * Exclusive lower bound.
+   * 
+ * + * double exclusive_minimum = 2; + * + * @return Whether the exclusiveMinimum field is set. + */ + @java.lang.Override + public boolean hasExclusiveMinimum() { + return minCase_ == 2; + } + /** + * + * + *
+   * Exclusive lower bound.
+   * 
+ * + * double exclusive_minimum = 2; + * + * @return The exclusiveMinimum. + */ + @java.lang.Override + public double getExclusiveMinimum() { + if (minCase_ == 2) { + return (java.lang.Double) min_; + } + return 0D; + } + + public static final int MAXIMUM_FIELD_NUMBER = 3; + /** + * + * + *
+   * Inclusive upper bound.
+   * 
+ * + * double maximum = 3; + * + * @return Whether the maximum field is set. + */ + @java.lang.Override + public boolean hasMaximum() { + return maxCase_ == 3; + } + /** + * + * + *
+   * Inclusive upper bound.
+   * 
+ * + * double maximum = 3; + * + * @return The maximum. + */ + @java.lang.Override + public double getMaximum() { + if (maxCase_ == 3) { + return (java.lang.Double) max_; + } + return 0D; + } + + public static final int EXCLUSIVE_MAXIMUM_FIELD_NUMBER = 4; + /** + * + * + *
+   * Exclusive upper bound.
+   * 
+ * + * double exclusive_maximum = 4; + * + * @return Whether the exclusiveMaximum field is set. + */ + @java.lang.Override + public boolean hasExclusiveMaximum() { + return maxCase_ == 4; + } + /** + * + * + *
+   * Exclusive upper bound.
+   * 
+ * + * double exclusive_maximum = 4; + * + * @return The exclusiveMaximum. + */ + @java.lang.Override + public double getExclusiveMaximum() { + if (maxCase_ == 4) { + return (java.lang.Double) max_; + } + return 0D; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (minCase_ == 1) { + output.writeDouble(1, (double) ((java.lang.Double) min_)); + } + if (minCase_ == 2) { + output.writeDouble(2, (double) ((java.lang.Double) min_)); + } + if (maxCase_ == 3) { + output.writeDouble(3, (double) ((java.lang.Double) max_)); + } + if (maxCase_ == 4) { + output.writeDouble(4, (double) ((java.lang.Double) max_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 1, (double) ((java.lang.Double) min_)); + } + if (minCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, (double) ((java.lang.Double) min_)); + } + if (maxCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 3, (double) ((java.lang.Double) max_)); + } + if (maxCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, (double) ((java.lang.Double) max_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Interval)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Interval other = + (com.google.cloud.discoveryengine.v1alpha.Interval) obj; + + if (!getMinCase().equals(other.getMinCase())) return false; + switch (minCase_) { + case 1: + if (java.lang.Double.doubleToLongBits(getMinimum()) + != java.lang.Double.doubleToLongBits(other.getMinimum())) return false; + break; + case 2: + if (java.lang.Double.doubleToLongBits(getExclusiveMinimum()) + != java.lang.Double.doubleToLongBits(other.getExclusiveMinimum())) return false; + break; + case 0: + default: + } + if (!getMaxCase().equals(other.getMaxCase())) return false; + switch (maxCase_) { + case 3: + if (java.lang.Double.doubleToLongBits(getMaximum()) + != java.lang.Double.doubleToLongBits(other.getMaximum())) return false; + break; + case 4: + if (java.lang.Double.doubleToLongBits(getExclusiveMaximum()) + != java.lang.Double.doubleToLongBits(other.getExclusiveMaximum())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (minCase_) { + case 1: + hash = (37 * hash) + MINIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinimum())); + break; + case 2: + hash = (37 * hash) + EXCLUSIVE_MINIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getExclusiveMinimum())); + break; + case 0: + default: + } + switch (maxCase_) { + case 3: + hash = (37 * hash) + MAXIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaximum())); + break; + case 4: + hash = (37 * hash) + EXCLUSIVE_MAXIMUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getExclusiveMaximum())); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.Interval prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A floating point interval.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Interval} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Interval) + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_Interval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_Interval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Interval.class, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Interval.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minCase_ = 0; + min_ = null; + maxCase_ = 0; + max_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_Interval_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Interval getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Interval build() { + com.google.cloud.discoveryengine.v1alpha.Interval result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Interval buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Interval result = + new com.google.cloud.discoveryengine.v1alpha.Interval(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Interval result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.discoveryengine.v1alpha.Interval result) { + result.minCase_ = minCase_; + result.min_ = this.min_; + result.maxCase_ = maxCase_; + result.max_ = this.max_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Interval) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Interval) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Interval other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance()) + return this; + switch (other.getMinCase()) { + case MINIMUM: + { + setMinimum(other.getMinimum()); + break; + } + case EXCLUSIVE_MINIMUM: + { + setExclusiveMinimum(other.getExclusiveMinimum()); + break; + } + case MIN_NOT_SET: + { + break; + } + } + switch (other.getMaxCase()) { + case MAXIMUM: + { + setMaximum(other.getMaximum()); + break; + } + case EXCLUSIVE_MAXIMUM: + { + setExclusiveMaximum(other.getExclusiveMaximum()); + break; + } + case MAX_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + min_ = input.readDouble(); + minCase_ = 1; + break; + } // case 9 + case 17: + { + min_ = input.readDouble(); + minCase_ = 2; + break; + } // case 17 + case 25: + { + max_ = input.readDouble(); + maxCase_ = 3; + break; + } // case 25 + case 33: + { + max_ = input.readDouble(); + maxCase_ = 4; + break; + } // case 33 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int minCase_ = 0; + private java.lang.Object min_; + + public MinCase getMinCase() { + return MinCase.forNumber(minCase_); + } + + public Builder clearMin() { + minCase_ = 0; + min_ = null; + onChanged(); + return this; + } + + private int maxCase_ = 0; + private java.lang.Object max_; + + public MaxCase getMaxCase() { + return MaxCase.forNumber(maxCase_); + } + + public Builder clearMax() { + maxCase_ = 0; + max_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Inclusive lower bound.
+     * 
+ * + * double minimum = 1; + * + * @return Whether the minimum field is set. + */ + public boolean hasMinimum() { + return minCase_ == 1; + } + /** + * + * + *
+     * Inclusive lower bound.
+     * 
+ * + * double minimum = 1; + * + * @return The minimum. + */ + public double getMinimum() { + if (minCase_ == 1) { + return (java.lang.Double) min_; + } + return 0D; + } + /** + * + * + *
+     * Inclusive lower bound.
+     * 
+ * + * double minimum = 1; + * + * @param value The minimum to set. + * @return This builder for chaining. + */ + public Builder setMinimum(double value) { + + minCase_ = 1; + min_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Inclusive lower bound.
+     * 
+ * + * double minimum = 1; + * + * @return This builder for chaining. + */ + public Builder clearMinimum() { + if (minCase_ == 1) { + minCase_ = 0; + min_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Exclusive lower bound.
+     * 
+ * + * double exclusive_minimum = 2; + * + * @return Whether the exclusiveMinimum field is set. + */ + public boolean hasExclusiveMinimum() { + return minCase_ == 2; + } + /** + * + * + *
+     * Exclusive lower bound.
+     * 
+ * + * double exclusive_minimum = 2; + * + * @return The exclusiveMinimum. + */ + public double getExclusiveMinimum() { + if (minCase_ == 2) { + return (java.lang.Double) min_; + } + return 0D; + } + /** + * + * + *
+     * Exclusive lower bound.
+     * 
+ * + * double exclusive_minimum = 2; + * + * @param value The exclusiveMinimum to set. + * @return This builder for chaining. + */ + public Builder setExclusiveMinimum(double value) { + + minCase_ = 2; + min_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Exclusive lower bound.
+     * 
+ * + * double exclusive_minimum = 2; + * + * @return This builder for chaining. + */ + public Builder clearExclusiveMinimum() { + if (minCase_ == 2) { + minCase_ = 0; + min_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Inclusive upper bound.
+     * 
+ * + * double maximum = 3; + * + * @return Whether the maximum field is set. + */ + public boolean hasMaximum() { + return maxCase_ == 3; + } + /** + * + * + *
+     * Inclusive upper bound.
+     * 
+ * + * double maximum = 3; + * + * @return The maximum. + */ + public double getMaximum() { + if (maxCase_ == 3) { + return (java.lang.Double) max_; + } + return 0D; + } + /** + * + * + *
+     * Inclusive upper bound.
+     * 
+ * + * double maximum = 3; + * + * @param value The maximum to set. + * @return This builder for chaining. + */ + public Builder setMaximum(double value) { + + maxCase_ = 3; + max_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Inclusive upper bound.
+     * 
+ * + * double maximum = 3; + * + * @return This builder for chaining. + */ + public Builder clearMaximum() { + if (maxCase_ == 3) { + maxCase_ = 0; + max_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Exclusive upper bound.
+     * 
+ * + * double exclusive_maximum = 4; + * + * @return Whether the exclusiveMaximum field is set. + */ + public boolean hasExclusiveMaximum() { + return maxCase_ == 4; + } + /** + * + * + *
+     * Exclusive upper bound.
+     * 
+ * + * double exclusive_maximum = 4; + * + * @return The exclusiveMaximum. + */ + public double getExclusiveMaximum() { + if (maxCase_ == 4) { + return (java.lang.Double) max_; + } + return 0D; + } + /** + * + * + *
+     * Exclusive upper bound.
+     * 
+ * + * double exclusive_maximum = 4; + * + * @param value The exclusiveMaximum to set. + * @return This builder for chaining. + */ + public Builder setExclusiveMaximum(double value) { + + maxCase_ = 4; + max_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Exclusive upper bound.
+     * 
+ * + * double exclusive_maximum = 4; + * + * @return This builder for chaining. + */ + public Builder clearExclusiveMaximum() { + if (maxCase_ == 4) { + maxCase_ = 0; + max_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Interval) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Interval) + private static final com.google.cloud.discoveryengine.v1alpha.Interval DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Interval(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Interval getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Interval parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Interval getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/IntervalOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/IntervalOrBuilder.java new file mode 100644 index 000000000000..500ccebb7f5b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/IntervalOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface IntervalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Interval) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Inclusive lower bound.
+   * 
+ * + * double minimum = 1; + * + * @return Whether the minimum field is set. + */ + boolean hasMinimum(); + /** + * + * + *
+   * Inclusive lower bound.
+   * 
+ * + * double minimum = 1; + * + * @return The minimum. + */ + double getMinimum(); + + /** + * + * + *
+   * Exclusive lower bound.
+   * 
+ * + * double exclusive_minimum = 2; + * + * @return Whether the exclusiveMinimum field is set. + */ + boolean hasExclusiveMinimum(); + /** + * + * + *
+   * Exclusive lower bound.
+   * 
+ * + * double exclusive_minimum = 2; + * + * @return The exclusiveMinimum. + */ + double getExclusiveMinimum(); + + /** + * + * + *
+   * Inclusive upper bound.
+   * 
+ * + * double maximum = 3; + * + * @return Whether the maximum field is set. + */ + boolean hasMaximum(); + /** + * + * + *
+   * Inclusive upper bound.
+   * 
+ * + * double maximum = 3; + * + * @return The maximum. + */ + double getMaximum(); + + /** + * + * + *
+   * Exclusive upper bound.
+   * 
+ * + * double exclusive_maximum = 4; + * + * @return Whether the exclusiveMaximum field is set. + */ + boolean hasExclusiveMaximum(); + /** + * + * + *
+   * Exclusive upper bound.
+   * 
+ * + * double exclusive_maximum = 4; + * + * @return The exclusiveMaximum. + */ + double getExclusiveMaximum(); + + com.google.cloud.discoveryengine.v1alpha.Interval.MinCase getMinCase(); + + com.google.cloud.discoveryengine.v1alpha.Interval.MaxCase getMaxCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsRequest.java new file mode 100644 index 000000000000..de86872a78d5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsRequest.java @@ -0,0 +1,1396 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request for ListConversations method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListConversationsRequest} + */ +public final class ListConversationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ListConversationsRequest) + ListConversationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConversationsRequest.newBuilder() to construct. + private ListConversationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConversationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConversationsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The data store resource name. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The data store resource name. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Maximum number of results to return. If unspecified, defaults
+   * to 50. Max allowed value is 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListConversations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListConversations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * A filter to apply on the list results. The supported features are:
+   * user_pseudo_id, state.
+   *
+   * Example:
+   * "user_pseudo_id = some_id"
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter to apply on the list results. The supported features are:
+   * user_pseudo_id, state.
+   *
+   * Example:
+   * "user_pseudo_id = some_id"
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `update_time`
+   *   * `create_time`
+   *   * `conversation_name`
+   *
+   * Example:
+   * "update_time desc"
+   * "create_time"
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `update_time`
+   *   * `create_time`
+   *   * `conversation_name`
+   *
+   * Example:
+   * "update_time desc"
+   * "create_time"
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest other = + (com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for ListConversations method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListConversationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ListConversationsRequest) + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest build() { + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest result = + new com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The data store resource name. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The data store resource name. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The data store resource name. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The data store resource name. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The data store resource name. Format:
+     * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum number of results to return. If unspecified, defaults
+     * to 50. Max allowed value is 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of results to return. If unspecified, defaults
+     * to 50. Max allowed value is 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of results to return. If unspecified, defaults
+     * to 50. Max allowed value is 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListConversations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListConversations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListConversations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListConversations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListConversations` call.
+     * Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * A filter to apply on the list results. The supported features are:
+     * user_pseudo_id, state.
+     *
+     * Example:
+     * "user_pseudo_id = some_id"
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter to apply on the list results. The supported features are:
+     * user_pseudo_id, state.
+     *
+     * Example:
+     * "user_pseudo_id = some_id"
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter to apply on the list results. The supported features are:
+     * user_pseudo_id, state.
+     *
+     * Example:
+     * "user_pseudo_id = some_id"
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter to apply on the list results. The supported features are:
+     * user_pseudo_id, state.
+     *
+     * Example:
+     * "user_pseudo_id = some_id"
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter to apply on the list results. The supported features are:
+     * user_pseudo_id, state.
+     *
+     * Example:
+     * "user_pseudo_id = some_id"
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `update_time`
+     *   * `create_time`
+     *   * `conversation_name`
+     *
+     * Example:
+     * "update_time desc"
+     * "create_time"
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `update_time`
+     *   * `create_time`
+     *   * `conversation_name`
+     *
+     * Example:
+     * "update_time desc"
+     * "create_time"
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `update_time`
+     *   * `create_time`
+     *   * `conversation_name`
+     *
+     * Example:
+     * "update_time desc"
+     * "create_time"
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `update_time`
+     *   * `create_time`
+     *   * `conversation_name`
+     *
+     * Example:
+     * "update_time desc"
+     * "create_time"
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A comma-separated list of fields to order by, sorted in ascending order.
+     * Use "desc" after a field name for descending.
+     * Supported fields:
+     *   * `update_time`
+     *   * `create_time`
+     *   * `conversation_name`
+     *
+     * Example:
+     * "update_time desc"
+     * "create_time"
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ListConversationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ListConversationsRequest) + private static final com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConversationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsRequestOrBuilder.java new file mode 100644 index 000000000000..20595fe41c49 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsRequestOrBuilder.java @@ -0,0 +1,173 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ListConversationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ListConversationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The data store resource name. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The data store resource name. Format:
+   * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of results to return. If unspecified, defaults
+   * to 50. Max allowed value is 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListConversations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListConversations` call.
+   * Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A filter to apply on the list results. The supported features are:
+   * user_pseudo_id, state.
+   *
+   * Example:
+   * "user_pseudo_id = some_id"
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter to apply on the list results. The supported features are:
+   * user_pseudo_id, state.
+   *
+   * Example:
+   * "user_pseudo_id = some_id"
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `update_time`
+   *   * `create_time`
+   *   * `conversation_name`
+   *
+   * Example:
+   * "update_time desc"
+   * "create_time"
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * A comma-separated list of fields to order by, sorted in ascending order.
+   * Use "desc" after a field name for descending.
+   * Supported fields:
+   *   * `update_time`
+   *   * `create_time`
+   *   * `conversation_name`
+   *
+   * Example:
+   * "update_time desc"
+   * "create_time"
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsResponse.java new file mode 100644 index 000000000000..e88200c3a508 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsResponse.java @@ -0,0 +1,1146 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response for ListConversations method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListConversationsResponse} + */ +public final class ListConversationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ListConversationsResponse) + ListConversationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConversationsResponse.newBuilder() to construct. + private ListConversationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConversationsResponse() { + conversations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConversationsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse.Builder.class); + } + + public static final int CONVERSATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List conversations_; + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + @java.lang.Override + public java.util.List + getConversationsList() { + return conversations_; + } + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + @java.lang.Override + public java.util.List + getConversationsOrBuilderList() { + return conversations_; + } + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + @java.lang.Override + public int getConversationsCount() { + return conversations_.size(); + } + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversations(int index) { + return conversations_.get(index); + } + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationsOrBuilder( + int index) { + return conversations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < conversations_.size(); i++) { + output.writeMessage(1, conversations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conversations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, conversations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse other = + (com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse) obj; + + if (!getConversationsList().equals(other.getConversationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConversationsCount() > 0) { + hash = (37 * hash) + CONVERSATIONS_FIELD_NUMBER; + hash = (53 * hash) + getConversationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for ListConversations method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListConversationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ListConversationsResponse) + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conversationsBuilder_ == null) { + conversations_ = java.util.Collections.emptyList(); + } else { + conversations_ = null; + conversationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListConversationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse build() { + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse result = + new com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse result) { + if (conversationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conversations_ = java.util.Collections.unmodifiableList(conversations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conversations_ = conversations_; + } else { + result.conversations_ = conversationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + .getDefaultInstance()) return this; + if (conversationsBuilder_ == null) { + if (!other.conversations_.isEmpty()) { + if (conversations_.isEmpty()) { + conversations_ = other.conversations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConversationsIsMutable(); + conversations_.addAll(other.conversations_); + } + onChanged(); + } + } else { + if (!other.conversations_.isEmpty()) { + if (conversationsBuilder_.isEmpty()) { + conversationsBuilder_.dispose(); + conversationsBuilder_ = null; + conversations_ = other.conversations_; + bitField0_ = (bitField0_ & ~0x00000001); + conversationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConversationsFieldBuilder() + : null; + } else { + conversationsBuilder_.addAllMessages(other.conversations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.Conversation m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.Conversation.parser(), + extensionRegistry); + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.add(m); + } else { + conversationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List conversations_ = + java.util.Collections.emptyList(); + + private void ensureConversationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conversations_ = + new java.util.ArrayList( + conversations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + conversationsBuilder_; + + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public java.util.List + getConversationsList() { + if (conversationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conversations_); + } else { + return conversationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public int getConversationsCount() { + if (conversationsBuilder_ == null) { + return conversations_.size(); + } else { + return conversationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversations(int index) { + if (conversationsBuilder_ == null) { + return conversations_.get(index); + } else { + return conversationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder setConversations( + int index, com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationsIsMutable(); + conversations_.set(index, value); + onChanged(); + } else { + conversationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder setConversations( + int index, com.google.cloud.discoveryengine.v1alpha.Conversation.Builder builderForValue) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.set(index, builderForValue.build()); + onChanged(); + } else { + conversationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder addConversations(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationsIsMutable(); + conversations_.add(value); + onChanged(); + } else { + conversationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder addConversations( + int index, com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConversationsIsMutable(); + conversations_.add(index, value); + onChanged(); + } else { + conversationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder addConversations( + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder builderForValue) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.add(builderForValue.build()); + onChanged(); + } else { + conversationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder addConversations( + int index, com.google.cloud.discoveryengine.v1alpha.Conversation.Builder builderForValue) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.add(index, builderForValue.build()); + onChanged(); + } else { + conversationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder addAllConversations( + java.lang.Iterable + values) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conversations_); + onChanged(); + } else { + conversationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder clearConversations() { + if (conversationsBuilder_ == null) { + conversations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conversationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public Builder removeConversations(int index) { + if (conversationsBuilder_ == null) { + ensureConversationsIsMutable(); + conversations_.remove(index); + onChanged(); + } else { + conversationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation.Builder getConversationsBuilder( + int index) { + return getConversationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationsOrBuilder( + int index) { + if (conversationsBuilder_ == null) { + return conversations_.get(index); + } else { + return conversationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public java.util.List + getConversationsOrBuilderList() { + if (conversationsBuilder_ != null) { + return conversationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conversations_); + } + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation.Builder addConversationsBuilder() { + return getConversationsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance()); + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation.Builder addConversationsBuilder( + int index) { + return getConversationsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance()); + } + /** + * + * + *
+     * All the Conversations for a given data store.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + public java.util.List + getConversationsBuilderList() { + return getConversationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + getConversationsFieldBuilder() { + if (conversationsBuilder_ == null) { + conversationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder>( + conversations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conversations_ = null; + } + return conversationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ListConversationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ListConversationsResponse) + private static final com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConversationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsResponseOrBuilder.java new file mode 100644 index 000000000000..1f373e8d49cb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListConversationsResponseOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ListConversationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ListConversationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + java.util.List getConversationsList(); + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + com.google.cloud.discoveryengine.v1alpha.Conversation getConversations(int index); + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + int getConversationsCount(); + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + java.util.List + getConversationsOrBuilderList(); + /** + * + * + *
+   * All the Conversations for a given data store.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Conversation conversations = 1; + */ + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationsOrBuilder( + int index); + + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsRequest.java new file mode 100644 index 000000000000..b44d2fd02e3a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsRequest.java @@ -0,0 +1,1061 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListDocumentsRequest} + */ +public final class ListDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) + ListDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDocumentsRequest.newBuilder() to construct. + private ListDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDocumentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDocumentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Use `default_branch` as the branch ID, to list documents under the default
+   * branch.
+   *
+   * If the caller does not have permission to list
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+   * branch, regardless of whether or not this branch exists, a
+   * `PERMISSION_DENIED` error is returned.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Use `default_branch` as the branch ID, to list documents under the default
+   * branch.
+   *
+   * If the caller does not have permission to list
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+   * branch, regardless of whether or not this branch exists, a
+   * `PERMISSION_DENIED` error is returned.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Maximum number of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+   * unspecified, defaults to 100. The maximum allowed value is 1000. Values
+   * above 1000 will be coerced to 1000.
+   *
+   * If this field is negative, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token
+   * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+   * received from a previous
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * must match the call that provided the page token. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token
+   * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+   * received from a previous
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * must match the call that provided the page token. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest other = + (com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListDocumentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.class, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest build() { + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest result = + new com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Use `default_branch` as the branch ID, to list documents under the default
+     * branch.
+     *
+     * If the caller does not have permission to list
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+     * branch, regardless of whether or not this branch exists, a
+     * `PERMISSION_DENIED` error is returned.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Use `default_branch` as the branch ID, to list documents under the default
+     * branch.
+     *
+     * If the caller does not have permission to list
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+     * branch, regardless of whether or not this branch exists, a
+     * `PERMISSION_DENIED` error is returned.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Use `default_branch` as the branch ID, to list documents under the default
+     * branch.
+     *
+     * If the caller does not have permission to list
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+     * branch, regardless of whether or not this branch exists, a
+     * `PERMISSION_DENIED` error is returned.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Use `default_branch` as the branch ID, to list documents under the default
+     * branch.
+     *
+     * If the caller does not have permission to list
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+     * branch, regardless of whether or not this branch exists, a
+     * `PERMISSION_DENIED` error is returned.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent branch resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * Use `default_branch` as the branch ID, to list documents under the default
+     * branch.
+     *
+     * If the caller does not have permission to list
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+     * branch, regardless of whether or not this branch exists, a
+     * `PERMISSION_DENIED` error is returned.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+     * unspecified, defaults to 100. The maximum allowed value is 1000. Values
+     * above 1000 will be coerced to 1000.
+     *
+     * If this field is negative, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+     * unspecified, defaults to 100. The maximum allowed value is 1000. Values
+     * above 1000 will be coerced to 1000.
+     *
+     * If this field is negative, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+     * unspecified, defaults to 100. The maximum allowed value is 1000. Values
+     * above 1000 will be coerced to 1000.
+     *
+     * If this field is negative, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token
+     * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+     * received from a previous
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * must match the call that provided the page token. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token
+     * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+     * received from a previous
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * must match the call that provided the page token. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token
+     * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+     * received from a previous
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * must match the call that provided the page token. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token
+     * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+     * received from a previous
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * must match the call that provided the page token. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token
+     * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+     * received from a previous
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+     * must match the call that provided the page token. Otherwise, an
+     * `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) + private static final com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsRequestOrBuilder.java new file mode 100644 index 000000000000..d7d6d3b2106b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ListDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ListDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Use `default_branch` as the branch ID, to list documents under the default
+   * branch.
+   *
+   * If the caller does not have permission to list
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+   * branch, regardless of whether or not this branch exists, a
+   * `PERMISSION_DENIED` error is returned.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent branch resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * Use `default_branch` as the branch ID, to list documents under the default
+   * branch.
+   *
+   * If the caller does not have permission to list
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
+   * branch, regardless of whether or not this branch exists, a
+   * `PERMISSION_DENIED` error is returned.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+   * unspecified, defaults to 100. The maximum allowed value is 1000. Values
+   * above 1000 will be coerced to 1000.
+   *
+   * If this field is negative, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token
+   * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+   * received from a previous
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * must match the call that provided the page token. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token
+   * [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
+   * received from a previous
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * must match the call that provided the page token. Otherwise, an
+   * `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsResponse.java new file mode 100644 index 000000000000..9b18cb8251a4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsResponse.java @@ -0,0 +1,1159 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for
+ * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListDocumentsResponse} + */ +public final class ListDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) + ListDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDocumentsResponse.newBuilder() to construct. + private ListDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDocumentsResponse() { + documents_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDocumentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.Builder.class); + } + + public static final int DOCUMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List documents_; + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + @java.lang.Override + public java.util.List getDocumentsList() { + return documents_; + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + @java.lang.Override + public java.util.List + getDocumentsOrBuilderList() { + return documents_; + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + @java.lang.Override + public int getDocumentsCount() { + return documents_.size(); + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDocuments(int index) { + return documents_.get(index); + } + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentsOrBuilder( + int index) { + return documents_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token that can be sent as
+   * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token that can be sent as
+   * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < documents_.size(); i++) { + output.writeMessage(1, documents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < documents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, documents_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse other = + (com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) obj; + + if (!getDocumentsList().equals(other.getDocumentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDocumentsCount() > 0) { + hash = (37 * hash) + DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getDocumentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.class, + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (documentsBuilder_ == null) { + documents_ = java.util.Collections.emptyList(); + } else { + documents_ = null; + documentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListDocumentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse build() { + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse result = + new com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse result) { + if (documentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + documents_ = java.util.Collections.unmodifiableList(documents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.documents_ = documents_; + } else { + result.documents_ = documentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.getDefaultInstance()) + return this; + if (documentsBuilder_ == null) { + if (!other.documents_.isEmpty()) { + if (documents_.isEmpty()) { + documents_ = other.documents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDocumentsIsMutable(); + documents_.addAll(other.documents_); + } + onChanged(); + } + } else { + if (!other.documents_.isEmpty()) { + if (documentsBuilder_.isEmpty()) { + documentsBuilder_.dispose(); + documentsBuilder_ = null; + documents_ = other.documents_; + bitField0_ = (bitField0_ & ~0x00000001); + documentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDocumentsFieldBuilder() + : null; + } else { + documentsBuilder_.addAllMessages(other.documents_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.Document m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.Document.parser(), + extensionRegistry); + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(m); + } else { + documentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List documents_ = + java.util.Collections.emptyList(); + + private void ensureDocumentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + documents_ = + new java.util.ArrayList(documents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + documentsBuilder_; + + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public java.util.List getDocumentsList() { + if (documentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(documents_); + } else { + return documentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public int getDocumentsCount() { + if (documentsBuilder_ == null) { + return documents_.size(); + } else { + return documentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Document getDocuments(int index) { + if (documentsBuilder_ == null) { + return documents_.get(index); + } else { + return documentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder setDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.set(index, value); + onChanged(); + } else { + documentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder setDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.set(index, builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder addDocuments(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.add(value); + onChanged(); + } else { + documentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder addDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.add(index, value); + onChanged(); + } else { + documentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder addDocuments( + com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder addDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(index, builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder addAllDocuments( + java.lang.Iterable values) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documents_); + onChanged(); + } else { + documentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder clearDocuments() { + if (documentsBuilder_ == null) { + documents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + documentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public Builder removeDocuments(int index) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.remove(index); + onChanged(); + } else { + documentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder getDocumentsBuilder( + int index) { + return getDocumentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentsOrBuilder( + int index) { + if (documentsBuilder_ == null) { + return documents_.get(index); + } else { + return documentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public java.util.List + getDocumentsOrBuilderList() { + if (documentsBuilder_ != null) { + return documentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(documents_); + } + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder addDocumentsBuilder() { + return getDocumentsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()); + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder addDocumentsBuilder( + int index) { + return getDocumentsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()); + } + /** + * + * + *
+     * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + public java.util.List + getDocumentsBuilderList() { + return getDocumentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + getDocumentsFieldBuilder() { + if (documentsBuilder_ == null) { + documentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder>( + documents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + documents_ = null; + } + return documentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token that can be sent as
+     * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token that can be sent as
+     * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token that can be sent as
+     * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as
+     * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as
+     * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) + private static final com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDocumentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsResponseOrBuilder.java new file mode 100644 index 000000000000..dd0638a339af --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListDocumentsResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ListDocumentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ListDocumentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + java.util.List getDocumentsList(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + com.google.cloud.discoveryengine.v1alpha.Document getDocuments(int index); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + int getDocumentsCount(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + java.util.List + getDocumentsOrBuilderList(); + /** + * + * + *
+   * The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Document documents = 1; + */ + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentsOrBuilder(int index); + + /** + * + * + *
+   * A token that can be sent as
+   * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token that can be sent as
+   * [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasRequest.java new file mode 100644 index 000000000000..ba5c2eb40d48 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasRequest.java @@ -0,0 +1,995 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListSchemasRequest} + */ +public final class ListSchemasRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ListSchemasRequest) + ListSchemasRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSchemasRequest.newBuilder() to construct. + private ListSchemasRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSchemasRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSchemasRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.class, + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to return. The
+   * service may return fewer than this value.
+   *
+   * If unspecified, at most 100
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s will be returned.
+   *
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest other = + (com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListSchemasRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ListSchemasRequest) + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.class, + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest build() { + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest result = + new com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest other) { + if (other == com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent data store resource name, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to return. The
+     * service may return fewer than this value.
+     *
+     * If unspecified, at most 100
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s will be returned.
+     *
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to return. The
+     * service may return fewer than this value.
+     *
+     * If unspecified, at most 100
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s will be returned.
+     *
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to return. The
+     * service may return fewer than this value.
+     *
+     * If unspecified, at most 100
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s will be returned.
+     *
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ListSchemasRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ListSchemasRequest) + private static final com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSchemasRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasRequestOrBuilder.java new file mode 100644 index 000000000000..2234c9b10414 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ListSchemasRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ListSchemasRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent data store resource name, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to return. The
+   * service may return fewer than this value.
+   *
+   * If unspecified, at most 100
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s will be returned.
+   *
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasResponse.java similarity index 50% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksResponse.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasResponse.java index 70c9868c55f9..5bec51f7667d 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasResponse.java @@ -14,130 +14,126 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto -package com.google.analytics.admin.v1alpha; +package com.google.cloud.discoveryengine.v1alpha; /** * * *
- * Response message for AuditUserLinks RPC.
+ * Response message for
+ * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+ * method.
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.AuditUserLinksResponse} + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListSchemasResponse} */ -public final class AuditUserLinksResponse extends com.google.protobuf.GeneratedMessageV3 +public final class ListSchemasResponse extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.AuditUserLinksResponse) - AuditUserLinksResponseOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.ListSchemasResponse) + ListSchemasResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use AuditUserLinksResponse.newBuilder() to construct. - private AuditUserLinksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListSchemasResponse.newBuilder() to construct. + private ListSchemasResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AuditUserLinksResponse() { - userLinks_ = java.util.Collections.emptyList(); + private ListSchemasResponse() { + schemas_ = java.util.Collections.emptyList(); nextPageToken_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuditUserLinksResponse(); + return new ListSchemasResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_descriptor; + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_fieldAccessorTable + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.AuditUserLinksResponse.class, - com.google.analytics.admin.v1alpha.AuditUserLinksResponse.Builder.class); + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.class, + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.Builder.class); } - public static final int USER_LINKS_FIELD_NUMBER = 1; + public static final int SCHEMAS_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private java.util.List userLinks_; + private java.util.List schemas_; /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ @java.lang.Override - public java.util.List getUserLinksList() { - return userLinks_; + public java.util.List getSchemasList() { + return schemas_; } /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ @java.lang.Override - public java.util.List - getUserLinksOrBuilderList() { - return userLinks_; + public java.util.List + getSchemasOrBuilderList() { + return schemas_; } /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ @java.lang.Override - public int getUserLinksCount() { - return userLinks_.size(); + public int getSchemasCount() { + return schemas_.size(); } /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLink getUserLinks(int index) { - return userLinks_.get(index); + public com.google.cloud.discoveryengine.v1alpha.Schema getSchemas(int index) { + return schemas_.get(index); } /** * * *
-   * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-   * order.
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
    * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder getUserLinksOrBuilder( - int index) { - return userLinks_.get(index); + public com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemasOrBuilder(int index) { + return schemas_.get(index); } public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; @@ -148,8 +144,10 @@ public com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder getUserLinksOrB * * *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
+   * A token that can be sent as
+   * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
    * 
* * string next_page_token = 2; @@ -172,8 +170,10 @@ public java.lang.String getNextPageToken() { * * *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
+   * A token that can be sent as
+   * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
    * 
* * string next_page_token = 2; @@ -207,8 +207,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < userLinks_.size(); i++) { - output.writeMessage(1, userLinks_.get(i)); + for (int i = 0; i < schemas_.size(); i++) { + output.writeMessage(1, schemas_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); @@ -222,8 +222,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < userLinks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLinks_.get(i)); + for (int i = 0; i < schemas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, schemas_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); @@ -238,13 +238,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.AuditUserLinksResponse)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.AuditUserLinksResponse other = - (com.google.analytics.admin.v1alpha.AuditUserLinksResponse) obj; + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse other = + (com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse) obj; - if (!getUserLinksList().equals(other.getUserLinksList())) return false; + if (!getSchemasList().equals(other.getSchemasList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -257,9 +257,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getUserLinksCount() > 0) { - hash = (37 * hash) + USER_LINKS_FIELD_NUMBER; - hash = (53 * hash) + getUserLinksList().hashCode(); + if (getSchemasCount() > 0) { + hash = (37 * hash) + SCHEMAS_FIELD_NUMBER; + hash = (53 * hash) + getSchemasList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); @@ -268,71 +268,71 @@ public int hashCode() { return hash; } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom(byte[] data) + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse parseFrom( + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -350,7 +350,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.analytics.admin.v1alpha.AuditUserLinksResponse prototype) { + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -368,31 +368,33 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message for AuditUserLinks RPC.
+   * Response message for
+   * [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas]
+   * method.
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.AuditUserLinksResponse} + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.ListSchemasResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.AuditUserLinksResponse) - com.google.analytics.admin.v1alpha.AuditUserLinksResponseOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.ListSchemasResponse) + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_descriptor; + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_fieldAccessorTable + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.AuditUserLinksResponse.class, - com.google.analytics.admin.v1alpha.AuditUserLinksResponse.Builder.class); + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.class, + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.AuditUserLinksResponse.newBuilder() + // Construct using com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -403,11 +405,11 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); + if (schemasBuilder_ == null) { + schemas_ = java.util.Collections.emptyList(); } else { - userLinks_ = null; - userLinksBuilder_.clear(); + schemas_ = null; + schemasBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; @@ -416,18 +418,19 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksResponse_descriptor; + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksResponse getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.AuditUserLinksResponse.getDefaultInstance(); + public com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksResponse build() { - com.google.analytics.admin.v1alpha.AuditUserLinksResponse result = buildPartial(); + public com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse build() { + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -435,9 +438,9 @@ public com.google.analytics.admin.v1alpha.AuditUserLinksResponse build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksResponse buildPartial() { - com.google.analytics.admin.v1alpha.AuditUserLinksResponse result = - new com.google.analytics.admin.v1alpha.AuditUserLinksResponse(this); + public com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse result = + new com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); @@ -447,19 +450,20 @@ public com.google.analytics.admin.v1alpha.AuditUserLinksResponse buildPartial() } private void buildPartialRepeatedFields( - com.google.analytics.admin.v1alpha.AuditUserLinksResponse result) { - if (userLinksBuilder_ == null) { + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse result) { + if (schemasBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - userLinks_ = java.util.Collections.unmodifiableList(userLinks_); + schemas_ = java.util.Collections.unmodifiableList(schemas_); bitField0_ = (bitField0_ & ~0x00000001); } - result.userLinks_ = userLinks_; + result.schemas_ = schemas_; } else { - result.userLinks_ = userLinksBuilder_.build(); + result.schemas_ = schemasBuilder_.build(); } } - private void buildPartial0(com.google.analytics.admin.v1alpha.AuditUserLinksResponse result) { + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { result.nextPageToken_ = nextPageToken_; @@ -501,41 +505,42 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.AuditUserLinksResponse) { - return mergeFrom((com.google.analytics.admin.v1alpha.AuditUserLinksResponse) other); + if (other instanceof com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.AuditUserLinksResponse other) { - if (other == com.google.analytics.admin.v1alpha.AuditUserLinksResponse.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse.getDefaultInstance()) return this; - if (userLinksBuilder_ == null) { - if (!other.userLinks_.isEmpty()) { - if (userLinks_.isEmpty()) { - userLinks_ = other.userLinks_; + if (schemasBuilder_ == null) { + if (!other.schemas_.isEmpty()) { + if (schemas_.isEmpty()) { + schemas_ = other.schemas_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureUserLinksIsMutable(); - userLinks_.addAll(other.userLinks_); + ensureSchemasIsMutable(); + schemas_.addAll(other.schemas_); } onChanged(); } } else { - if (!other.userLinks_.isEmpty()) { - if (userLinksBuilder_.isEmpty()) { - userLinksBuilder_.dispose(); - userLinksBuilder_ = null; - userLinks_ = other.userLinks_; + if (!other.schemas_.isEmpty()) { + if (schemasBuilder_.isEmpty()) { + schemasBuilder_.dispose(); + schemasBuilder_ = null; + schemas_ = other.schemas_; bitField0_ = (bitField0_ & ~0x00000001); - userLinksBuilder_ = + schemasBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getUserLinksFieldBuilder() + ? getSchemasFieldBuilder() : null; } else { - userLinksBuilder_.addAllMessages(other.userLinks_); + schemasBuilder_.addAllMessages(other.schemas_); } } } @@ -572,15 +577,15 @@ public Builder mergeFrom( break; case 10: { - com.google.analytics.admin.v1alpha.AuditUserLink m = + com.google.cloud.discoveryengine.v1alpha.Schema m = input.readMessage( - com.google.analytics.admin.v1alpha.AuditUserLink.parser(), + com.google.cloud.discoveryengine.v1alpha.Schema.parser(), extensionRegistry); - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(m); + if (schemasBuilder_ == null) { + ensureSchemasIsMutable(); + schemas_.add(m); } else { - userLinksBuilder_.addMessage(m); + schemasBuilder_.addMessage(m); } break; } // case 10 @@ -609,94 +614,90 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List userLinks_ = + private java.util.List schemas_ = java.util.Collections.emptyList(); - private void ensureUserLinksIsMutable() { + private void ensureSchemasIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - userLinks_ = - new java.util.ArrayList(userLinks_); + schemas_ = + new java.util.ArrayList(schemas_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.AuditUserLink, - com.google.analytics.admin.v1alpha.AuditUserLink.Builder, - com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder> - userLinksBuilder_; + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder> + schemasBuilder_; /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public java.util.List getUserLinksList() { - if (userLinksBuilder_ == null) { - return java.util.Collections.unmodifiableList(userLinks_); + public java.util.List getSchemasList() { + if (schemasBuilder_ == null) { + return java.util.Collections.unmodifiableList(schemas_); } else { - return userLinksBuilder_.getMessageList(); + return schemasBuilder_.getMessageList(); } } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public int getUserLinksCount() { - if (userLinksBuilder_ == null) { - return userLinks_.size(); + public int getSchemasCount() { + if (schemasBuilder_ == null) { + return schemas_.size(); } else { - return userLinksBuilder_.getCount(); + return schemasBuilder_.getCount(); } } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public com.google.analytics.admin.v1alpha.AuditUserLink getUserLinks(int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); + public com.google.cloud.discoveryengine.v1alpha.Schema getSchemas(int index) { + if (schemasBuilder_ == null) { + return schemas_.get(index); } else { - return userLinksBuilder_.getMessage(index); + return schemasBuilder_.getMessage(index); } } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder setUserLinks(int index, com.google.analytics.admin.v1alpha.AuditUserLink value) { - if (userLinksBuilder_ == null) { + public Builder setSchemas(int index, com.google.cloud.discoveryengine.v1alpha.Schema value) { + if (schemasBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUserLinksIsMutable(); - userLinks_.set(index, value); + ensureSchemasIsMutable(); + schemas_.set(index, value); onChanged(); } else { - userLinksBuilder_.setMessage(index, value); + schemasBuilder_.setMessage(index, value); } return this; } @@ -704,20 +705,19 @@ public Builder setUserLinks(int index, com.google.analytics.admin.v1alpha.AuditU * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder setUserLinks( - int index, com.google.analytics.admin.v1alpha.AuditUserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.set(index, builderForValue.build()); + public Builder setSchemas( + int index, com.google.cloud.discoveryengine.v1alpha.Schema.Builder builderForValue) { + if (schemasBuilder_ == null) { + ensureSchemasIsMutable(); + schemas_.set(index, builderForValue.build()); onChanged(); } else { - userLinksBuilder_.setMessage(index, builderForValue.build()); + schemasBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -725,22 +725,21 @@ public Builder setUserLinks( * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder addUserLinks(com.google.analytics.admin.v1alpha.AuditUserLink value) { - if (userLinksBuilder_ == null) { + public Builder addSchemas(com.google.cloud.discoveryengine.v1alpha.Schema value) { + if (schemasBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUserLinksIsMutable(); - userLinks_.add(value); + ensureSchemasIsMutable(); + schemas_.add(value); onChanged(); } else { - userLinksBuilder_.addMessage(value); + schemasBuilder_.addMessage(value); } return this; } @@ -748,22 +747,21 @@ public Builder addUserLinks(com.google.analytics.admin.v1alpha.AuditUserLink val * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder addUserLinks(int index, com.google.analytics.admin.v1alpha.AuditUserLink value) { - if (userLinksBuilder_ == null) { + public Builder addSchemas(int index, com.google.cloud.discoveryengine.v1alpha.Schema value) { + if (schemasBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUserLinksIsMutable(); - userLinks_.add(index, value); + ensureSchemasIsMutable(); + schemas_.add(index, value); onChanged(); } else { - userLinksBuilder_.addMessage(index, value); + schemasBuilder_.addMessage(index, value); } return this; } @@ -771,20 +769,19 @@ public Builder addUserLinks(int index, com.google.analytics.admin.v1alpha.AuditU * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder addUserLinks( - com.google.analytics.admin.v1alpha.AuditUserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(builderForValue.build()); + public Builder addSchemas( + com.google.cloud.discoveryengine.v1alpha.Schema.Builder builderForValue) { + if (schemasBuilder_ == null) { + ensureSchemasIsMutable(); + schemas_.add(builderForValue.build()); onChanged(); } else { - userLinksBuilder_.addMessage(builderForValue.build()); + schemasBuilder_.addMessage(builderForValue.build()); } return this; } @@ -792,20 +789,19 @@ public Builder addUserLinks( * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder addUserLinks( - int index, com.google.analytics.admin.v1alpha.AuditUserLink.Builder builderForValue) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.add(index, builderForValue.build()); + public Builder addSchemas( + int index, com.google.cloud.discoveryengine.v1alpha.Schema.Builder builderForValue) { + if (schemasBuilder_ == null) { + ensureSchemasIsMutable(); + schemas_.add(index, builderForValue.build()); onChanged(); } else { - userLinksBuilder_.addMessage(index, builderForValue.build()); + schemasBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -813,20 +809,19 @@ public Builder addUserLinks( * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder addAllUserLinks( - java.lang.Iterable values) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLinks_); + public Builder addAllSchemas( + java.lang.Iterable values) { + if (schemasBuilder_ == null) { + ensureSchemasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, schemas_); onChanged(); } else { - userLinksBuilder_.addAllMessages(values); + schemasBuilder_.addAllMessages(values); } return this; } @@ -834,19 +829,18 @@ public Builder addAllUserLinks( * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder clearUserLinks() { - if (userLinksBuilder_ == null) { - userLinks_ = java.util.Collections.emptyList(); + public Builder clearSchemas() { + if (schemasBuilder_ == null) { + schemas_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - userLinksBuilder_.clear(); + schemasBuilder_.clear(); } return this; } @@ -854,19 +848,18 @@ public Builder clearUserLinks() { * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public Builder removeUserLinks(int index) { - if (userLinksBuilder_ == null) { - ensureUserLinksIsMutable(); - userLinks_.remove(index); + public Builder removeSchemas(int index) { + if (schemasBuilder_ == null) { + ensureSchemasIsMutable(); + schemas_.remove(index); onChanged(); } else { - userLinksBuilder_.remove(index); + schemasBuilder_.remove(index); } return this; } @@ -874,109 +867,102 @@ public Builder removeUserLinks(int index) { * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public com.google.analytics.admin.v1alpha.AuditUserLink.Builder getUserLinksBuilder(int index) { - return getUserLinksFieldBuilder().getBuilder(index); + public com.google.cloud.discoveryengine.v1alpha.Schema.Builder getSchemasBuilder(int index) { + return getSchemasFieldBuilder().getBuilder(index); } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder getUserLinksOrBuilder( - int index) { - if (userLinksBuilder_ == null) { - return userLinks_.get(index); + public com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemasOrBuilder(int index) { + if (schemasBuilder_ == null) { + return schemas_.get(index); } else { - return userLinksBuilder_.getMessageOrBuilder(index); + return schemasBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public java.util.List - getUserLinksOrBuilderList() { - if (userLinksBuilder_ != null) { - return userLinksBuilder_.getMessageOrBuilderList(); + public java.util.List + getSchemasOrBuilderList() { + if (schemasBuilder_ != null) { + return schemasBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(userLinks_); + return java.util.Collections.unmodifiableList(schemas_); } } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public com.google.analytics.admin.v1alpha.AuditUserLink.Builder addUserLinksBuilder() { - return getUserLinksFieldBuilder() - .addBuilder(com.google.analytics.admin.v1alpha.AuditUserLink.getDefaultInstance()); + public com.google.cloud.discoveryengine.v1alpha.Schema.Builder addSchemasBuilder() { + return getSchemasFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance()); } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public com.google.analytics.admin.v1alpha.AuditUserLink.Builder addUserLinksBuilder(int index) { - return getUserLinksFieldBuilder() - .addBuilder(index, com.google.analytics.admin.v1alpha.AuditUserLink.getDefaultInstance()); + public com.google.cloud.discoveryengine.v1alpha.Schema.Builder addSchemasBuilder(int index) { + return getSchemasFieldBuilder() + .addBuilder(index, com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance()); } /** * * *
-     * List of AuditUserLinks. These will be ordered stably, but in an arbitrary
-     * order.
+     * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
      * 
* - * repeated .google.analytics.admin.v1alpha.AuditUserLink user_links = 1; + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; */ - public java.util.List - getUserLinksBuilderList() { - return getUserLinksFieldBuilder().getBuilderList(); + public java.util.List + getSchemasBuilderList() { + return getSchemasFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.AuditUserLink, - com.google.analytics.admin.v1alpha.AuditUserLink.Builder, - com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder> - getUserLinksFieldBuilder() { - if (userLinksBuilder_ == null) { - userLinksBuilder_ = + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder> + getSchemasFieldBuilder() { + if (schemasBuilder_ == null) { + schemasBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.analytics.admin.v1alpha.AuditUserLink, - com.google.analytics.admin.v1alpha.AuditUserLink.Builder, - com.google.analytics.admin.v1alpha.AuditUserLinkOrBuilder>( - userLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - userLinks_ = null; + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder>( + schemas_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + schemas_ = null; } - return userLinksBuilder_; + return schemasBuilder_; } private java.lang.Object nextPageToken_ = ""; @@ -984,8 +970,10 @@ public com.google.analytics.admin.v1alpha.AuditUserLink.Builder addUserLinksBuil * * *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
+     * A token that can be sent as
+     * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
      * 
* * string next_page_token = 2; @@ -1007,8 +995,10 @@ public java.lang.String getNextPageToken() { * * *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
+     * A token that can be sent as
+     * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
      * 
* * string next_page_token = 2; @@ -1030,8 +1020,10 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * * *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
+     * A token that can be sent as
+     * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
      * 
* * string next_page_token = 2; @@ -1052,8 +1044,10 @@ public Builder setNextPageToken(java.lang.String value) { * * *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
+     * A token that can be sent as
+     * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
      * 
* * string next_page_token = 2; @@ -1070,8 +1064,10 @@ public Builder clearNextPageToken() { * * *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
+     * A token that can be sent as
+     * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
      * 
* * string next_page_token = 2; @@ -1101,24 +1097,25 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.AuditUserLinksResponse) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.ListSchemasResponse) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.AuditUserLinksResponse) - private static final com.google.analytics.admin.v1alpha.AuditUserLinksResponse DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.ListSchemasResponse) + private static final com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.AuditUserLinksResponse(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse(); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksResponse getDefaultInstance() { + public static com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public AuditUserLinksResponse parsePartialFrom( + public ListSchemasResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1137,17 +1134,17 @@ public AuditUserLinksResponse parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksResponse getDefaultInstanceForType() { + public com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasResponseOrBuilder.java new file mode 100644 index 000000000000..eeeea2839dd9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ListSchemasResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ListSchemasResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.ListSchemasResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; + */ + java.util.List getSchemasList(); + /** + * + * + *
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; + */ + com.google.cloud.discoveryengine.v1alpha.Schema getSchemas(int index); + /** + * + * + *
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; + */ + int getSchemasCount(); + /** + * + * + *
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; + */ + java.util.List + getSchemasOrBuilderList(); + /** + * + * + *
+   * The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Schema schemas = 1; + */ + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemasOrBuilder(int index); + + /** + * + * + *
+   * A token that can be sent as
+   * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token that can be sent as
+   * [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/MediaInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/MediaInfo.java new file mode 100644 index 000000000000..a496609163a9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/MediaInfo.java @@ -0,0 +1,933 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Media-specific user event information.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.MediaInfo} + */ +public final class MediaInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.MediaInfo) + MediaInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use MediaInfo.newBuilder() to construct. + private MediaInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MediaInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MediaInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.MediaInfo.class, + com.google.cloud.discoveryengine.v1alpha.MediaInfo.Builder.class); + } + + private int bitField0_; + public static final int MEDIA_PROGRESS_DURATION_FIELD_NUMBER = 1; + private com.google.protobuf.Duration mediaProgressDuration_; + /** + * + * + *
+   * The media progress time in seconds, if applicable.
+   * For example, if the end user has finished 90 seconds of a playback video,
+   * then
+   * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+   * should be set to 90.
+   * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + * + * @return Whether the mediaProgressDuration field is set. + */ + @java.lang.Override + public boolean hasMediaProgressDuration() { + return mediaProgressDuration_ != null; + } + /** + * + * + *
+   * The media progress time in seconds, if applicable.
+   * For example, if the end user has finished 90 seconds of a playback video,
+   * then
+   * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+   * should be set to 90.
+   * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + * + * @return The mediaProgressDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMediaProgressDuration() { + return mediaProgressDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaProgressDuration_; + } + /** + * + * + *
+   * The media progress time in seconds, if applicable.
+   * For example, if the end user has finished 90 seconds of a playback video,
+   * then
+   * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+   * should be set to 90.
+   * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMediaProgressDurationOrBuilder() { + return mediaProgressDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaProgressDuration_; + } + + public static final int MEDIA_PROGRESS_PERCENTAGE_FIELD_NUMBER = 2; + private float mediaProgressPercentage_ = 0F; + /** + * + * + *
+   * Media progress should be computed using only the
+   * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+   * relative to the media total length.
+   *
+   * This value must be between `[0, 1.0]` inclusive.
+   *
+   * If this is not a playback or the progress cannot be computed (e.g. ongoing
+   * livestream), this field should be unset.
+   * 
+ * + * optional float media_progress_percentage = 2; + * + * @return Whether the mediaProgressPercentage field is set. + */ + @java.lang.Override + public boolean hasMediaProgressPercentage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Media progress should be computed using only the
+   * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+   * relative to the media total length.
+   *
+   * This value must be between `[0, 1.0]` inclusive.
+   *
+   * If this is not a playback or the progress cannot be computed (e.g. ongoing
+   * livestream), this field should be unset.
+   * 
+ * + * optional float media_progress_percentage = 2; + * + * @return The mediaProgressPercentage. + */ + @java.lang.Override + public float getMediaProgressPercentage() { + return mediaProgressPercentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mediaProgressDuration_ != null) { + output.writeMessage(1, getMediaProgressDuration()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(2, mediaProgressPercentage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mediaProgressDuration_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMediaProgressDuration()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, mediaProgressPercentage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.MediaInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.MediaInfo other = + (com.google.cloud.discoveryengine.v1alpha.MediaInfo) obj; + + if (hasMediaProgressDuration() != other.hasMediaProgressDuration()) return false; + if (hasMediaProgressDuration()) { + if (!getMediaProgressDuration().equals(other.getMediaProgressDuration())) return false; + } + if (hasMediaProgressPercentage() != other.hasMediaProgressPercentage()) return false; + if (hasMediaProgressPercentage()) { + if (java.lang.Float.floatToIntBits(getMediaProgressPercentage()) + != java.lang.Float.floatToIntBits(other.getMediaProgressPercentage())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMediaProgressDuration()) { + hash = (37 * hash) + MEDIA_PROGRESS_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMediaProgressDuration().hashCode(); + } + if (hasMediaProgressPercentage()) { + hash = (37 * hash) + MEDIA_PROGRESS_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMediaProgressPercentage()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.MediaInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Media-specific user event information.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.MediaInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.MediaInfo) + com.google.cloud.discoveryengine.v1alpha.MediaInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.MediaInfo.class, + com.google.cloud.discoveryengine.v1alpha.MediaInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.MediaInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mediaProgressDuration_ = null; + if (mediaProgressDurationBuilder_ != null) { + mediaProgressDurationBuilder_.dispose(); + mediaProgressDurationBuilder_ = null; + } + mediaProgressPercentage_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.MediaInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.MediaInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.MediaInfo build() { + com.google.cloud.discoveryengine.v1alpha.MediaInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.MediaInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.MediaInfo result = + new com.google.cloud.discoveryengine.v1alpha.MediaInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.MediaInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mediaProgressDuration_ = + mediaProgressDurationBuilder_ == null + ? mediaProgressDuration_ + : mediaProgressDurationBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mediaProgressPercentage_ = mediaProgressPercentage_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.MediaInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.MediaInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.MediaInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.MediaInfo.getDefaultInstance()) + return this; + if (other.hasMediaProgressDuration()) { + mergeMediaProgressDuration(other.getMediaProgressDuration()); + } + if (other.hasMediaProgressPercentage()) { + setMediaProgressPercentage(other.getMediaProgressPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getMediaProgressDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + mediaProgressPercentage_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration mediaProgressDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + mediaProgressDurationBuilder_; + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + * + * @return Whether the mediaProgressDuration field is set. + */ + public boolean hasMediaProgressDuration() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + * + * @return The mediaProgressDuration. + */ + public com.google.protobuf.Duration getMediaProgressDuration() { + if (mediaProgressDurationBuilder_ == null) { + return mediaProgressDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaProgressDuration_; + } else { + return mediaProgressDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + public Builder setMediaProgressDuration(com.google.protobuf.Duration value) { + if (mediaProgressDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaProgressDuration_ = value; + } else { + mediaProgressDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + public Builder setMediaProgressDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (mediaProgressDurationBuilder_ == null) { + mediaProgressDuration_ = builderForValue.build(); + } else { + mediaProgressDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + public Builder mergeMediaProgressDuration(com.google.protobuf.Duration value) { + if (mediaProgressDurationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && mediaProgressDuration_ != null + && mediaProgressDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMediaProgressDurationBuilder().mergeFrom(value); + } else { + mediaProgressDuration_ = value; + } + } else { + mediaProgressDurationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + public Builder clearMediaProgressDuration() { + bitField0_ = (bitField0_ & ~0x00000001); + mediaProgressDuration_ = null; + if (mediaProgressDurationBuilder_ != null) { + mediaProgressDurationBuilder_.dispose(); + mediaProgressDurationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + public com.google.protobuf.Duration.Builder getMediaProgressDurationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMediaProgressDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + public com.google.protobuf.DurationOrBuilder getMediaProgressDurationOrBuilder() { + if (mediaProgressDurationBuilder_ != null) { + return mediaProgressDurationBuilder_.getMessageOrBuilder(); + } else { + return mediaProgressDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaProgressDuration_; + } + } + /** + * + * + *
+     * The media progress time in seconds, if applicable.
+     * For example, if the end user has finished 90 seconds of a playback video,
+     * then
+     * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+     * should be set to 90.
+     * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMediaProgressDurationFieldBuilder() { + if (mediaProgressDurationBuilder_ == null) { + mediaProgressDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMediaProgressDuration(), getParentForChildren(), isClean()); + mediaProgressDuration_ = null; + } + return mediaProgressDurationBuilder_; + } + + private float mediaProgressPercentage_; + /** + * + * + *
+     * Media progress should be computed using only the
+     * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+     * relative to the media total length.
+     *
+     * This value must be between `[0, 1.0]` inclusive.
+     *
+     * If this is not a playback or the progress cannot be computed (e.g. ongoing
+     * livestream), this field should be unset.
+     * 
+ * + * optional float media_progress_percentage = 2; + * + * @return Whether the mediaProgressPercentage field is set. + */ + @java.lang.Override + public boolean hasMediaProgressPercentage() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Media progress should be computed using only the
+     * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+     * relative to the media total length.
+     *
+     * This value must be between `[0, 1.0]` inclusive.
+     *
+     * If this is not a playback or the progress cannot be computed (e.g. ongoing
+     * livestream), this field should be unset.
+     * 
+ * + * optional float media_progress_percentage = 2; + * + * @return The mediaProgressPercentage. + */ + @java.lang.Override + public float getMediaProgressPercentage() { + return mediaProgressPercentage_; + } + /** + * + * + *
+     * Media progress should be computed using only the
+     * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+     * relative to the media total length.
+     *
+     * This value must be between `[0, 1.0]` inclusive.
+     *
+     * If this is not a playback or the progress cannot be computed (e.g. ongoing
+     * livestream), this field should be unset.
+     * 
+ * + * optional float media_progress_percentage = 2; + * + * @param value The mediaProgressPercentage to set. + * @return This builder for chaining. + */ + public Builder setMediaProgressPercentage(float value) { + + mediaProgressPercentage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Media progress should be computed using only the
+     * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+     * relative to the media total length.
+     *
+     * This value must be between `[0, 1.0]` inclusive.
+     *
+     * If this is not a playback or the progress cannot be computed (e.g. ongoing
+     * livestream), this field should be unset.
+     * 
+ * + * optional float media_progress_percentage = 2; + * + * @return This builder for chaining. + */ + public Builder clearMediaProgressPercentage() { + bitField0_ = (bitField0_ & ~0x00000002); + mediaProgressPercentage_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.MediaInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.MediaInfo) + private static final com.google.cloud.discoveryengine.v1alpha.MediaInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.MediaInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.MediaInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MediaInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.MediaInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/MediaInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/MediaInfoOrBuilder.java new file mode 100644 index 000000000000..da95be08091a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/MediaInfoOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface MediaInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.MediaInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The media progress time in seconds, if applicable.
+   * For example, if the end user has finished 90 seconds of a playback video,
+   * then
+   * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+   * should be set to 90.
+   * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + * + * @return Whether the mediaProgressDuration field is set. + */ + boolean hasMediaProgressDuration(); + /** + * + * + *
+   * The media progress time in seconds, if applicable.
+   * For example, if the end user has finished 90 seconds of a playback video,
+   * then
+   * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+   * should be set to 90.
+   * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + * + * @return The mediaProgressDuration. + */ + com.google.protobuf.Duration getMediaProgressDuration(); + /** + * + * + *
+   * The media progress time in seconds, if applicable.
+   * For example, if the end user has finished 90 seconds of a playback video,
+   * then
+   * [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
+   * should be set to 90.
+   * 
+ * + * .google.protobuf.Duration media_progress_duration = 1; + */ + com.google.protobuf.DurationOrBuilder getMediaProgressDurationOrBuilder(); + + /** + * + * + *
+   * Media progress should be computed using only the
+   * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+   * relative to the media total length.
+   *
+   * This value must be between `[0, 1.0]` inclusive.
+   *
+   * If this is not a playback or the progress cannot be computed (e.g. ongoing
+   * livestream), this field should be unset.
+   * 
+ * + * optional float media_progress_percentage = 2; + * + * @return Whether the mediaProgressPercentage field is set. + */ + boolean hasMediaProgressPercentage(); + /** + * + * + *
+   * Media progress should be computed using only the
+   * [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration]
+   * relative to the media total length.
+   *
+   * This value must be between `[0, 1.0]` inclusive.
+   *
+   * If this is not a playback or the progress cannot be computed (e.g. ongoing
+   * livestream), this field should be unset.
+   * 
+ * + * optional float media_progress_percentage = 2; + * + * @return The mediaProgressPercentage. + */ + float getMediaProgressPercentage(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PageInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PageInfo.java new file mode 100644 index 000000000000..0aa9868ee18b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PageInfo.java @@ -0,0 +1,1366 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Detailed page information.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PageInfo} + */ +public final class PageInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PageInfo) + PageInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PageInfo.newBuilder() to construct. + private PageInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PageInfo() { + pageviewId_ = ""; + pageCategory_ = ""; + uri_ = ""; + referrerUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PageInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PageInfo.class, + com.google.cloud.discoveryengine.v1alpha.PageInfo.Builder.class); + } + + public static final int PAGEVIEW_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageviewId_ = ""; + /** + * + * + *
+   * A unique ID of a web page view.
+   *
+   * This should be kept the same for all user events triggered from the same
+   * pageview. For example, an item detail page view could trigger multiple
+   * events as the user is browsing the page. The `pageview_id` property should
+   * be kept the same for all these events so that they can be grouped together
+   * properly.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically.
+   * 
+ * + * string pageview_id = 1; + * + * @return The pageviewId. + */ + @java.lang.Override + public java.lang.String getPageviewId() { + java.lang.Object ref = pageviewId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageviewId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique ID of a web page view.
+   *
+   * This should be kept the same for all user events triggered from the same
+   * pageview. For example, an item detail page view could trigger multiple
+   * events as the user is browsing the page. The `pageview_id` property should
+   * be kept the same for all these events so that they can be grouped together
+   * properly.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically.
+   * 
+ * + * string pageview_id = 1; + * + * @return The bytes for pageviewId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageviewIdBytes() { + java.lang.Object ref = pageviewId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageviewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_CATEGORY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageCategory_ = ""; + /** + * + * + *
+   * The most specific category associated with a category page.
+   *
+   * To represent full path of category, use '>' sign to separate different
+   * hierarchies. If '>' is part of the category name, please replace it with
+   * other character(s).
+   *
+   * Category pages include special pages such as sales or promotions. For
+   * instance, a special sale page may have the category hierarchy:
+   * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+   *
+   * Required for `view-category-page` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_category = 2; + * + * @return The pageCategory. + */ + @java.lang.Override + public java.lang.String getPageCategory() { + java.lang.Object ref = pageCategory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageCategory_ = s; + return s; + } + } + /** + * + * + *
+   * The most specific category associated with a category page.
+   *
+   * To represent full path of category, use '>' sign to separate different
+   * hierarchies. If '>' is part of the category name, please replace it with
+   * other character(s).
+   *
+   * Category pages include special pages such as sales or promotions. For
+   * instance, a special sale page may have the category hierarchy:
+   * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+   *
+   * Required for `view-category-page` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_category = 2; + * + * @return The bytes for pageCategory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageCategoryBytes() { + java.lang.Object ref = pageCategory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * Complete URL (window.location.href) of the user's current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. Maximum length 5,000
+   * characters.
+   * 
+ * + * string uri = 3; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * Complete URL (window.location.href) of the user's current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. Maximum length 5,000
+   * characters.
+   * 
+ * + * string uri = 3; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERRER_URI_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object referrerUri_ = ""; + /** + * + * + *
+   * The referrer URL of the current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. However, some browser
+   * privacy restrictions may cause this field to be empty.
+   * 
+ * + * string referrer_uri = 4; + * + * @return The referrerUri. + */ + @java.lang.Override + public java.lang.String getReferrerUri() { + java.lang.Object ref = referrerUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referrerUri_ = s; + return s; + } + } + /** + * + * + *
+   * The referrer URL of the current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. However, some browser
+   * privacy restrictions may cause this field to be empty.
+   * 
+ * + * string referrer_uri = 4; + * + * @return The bytes for referrerUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReferrerUriBytes() { + java.lang.Object ref = referrerUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + referrerUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageviewId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pageviewId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageCategory_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageCategory_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referrerUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, referrerUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageviewId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pageviewId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageCategory_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageCategory_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referrerUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, referrerUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PageInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PageInfo other = + (com.google.cloud.discoveryengine.v1alpha.PageInfo) obj; + + if (!getPageviewId().equals(other.getPageviewId())) return false; + if (!getPageCategory().equals(other.getPageCategory())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getReferrerUri().equals(other.getReferrerUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGEVIEW_ID_FIELD_NUMBER; + hash = (53 * hash) + getPageviewId().hashCode(); + hash = (37 * hash) + PAGE_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getPageCategory().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + REFERRER_URI_FIELD_NUMBER; + hash = (53 * hash) + getReferrerUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.PageInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Detailed page information.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PageInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PageInfo) + com.google.cloud.discoveryengine.v1alpha.PageInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PageInfo.class, + com.google.cloud.discoveryengine.v1alpha.PageInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PageInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageviewId_ = ""; + pageCategory_ = ""; + uri_ = ""; + referrerUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PageInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PageInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PageInfo build() { + com.google.cloud.discoveryengine.v1alpha.PageInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PageInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PageInfo result = + new com.google.cloud.discoveryengine.v1alpha.PageInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.PageInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageviewId_ = pageviewId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageCategory_ = pageCategory_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.referrerUri_ = referrerUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PageInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PageInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.PageInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.PageInfo.getDefaultInstance()) + return this; + if (!other.getPageviewId().isEmpty()) { + pageviewId_ = other.pageviewId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPageCategory().isEmpty()) { + pageCategory_ = other.pageCategory_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getReferrerUri().isEmpty()) { + referrerUri_ = other.referrerUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pageviewId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + pageCategory_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + referrerUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object pageviewId_ = ""; + /** + * + * + *
+     * A unique ID of a web page view.
+     *
+     * This should be kept the same for all user events triggered from the same
+     * pageview. For example, an item detail page view could trigger multiple
+     * events as the user is browsing the page. The `pageview_id` property should
+     * be kept the same for all these events so that they can be grouped together
+     * properly.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically.
+     * 
+ * + * string pageview_id = 1; + * + * @return The pageviewId. + */ + public java.lang.String getPageviewId() { + java.lang.Object ref = pageviewId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageviewId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique ID of a web page view.
+     *
+     * This should be kept the same for all user events triggered from the same
+     * pageview. For example, an item detail page view could trigger multiple
+     * events as the user is browsing the page. The `pageview_id` property should
+     * be kept the same for all these events so that they can be grouped together
+     * properly.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically.
+     * 
+ * + * string pageview_id = 1; + * + * @return The bytes for pageviewId. + */ + public com.google.protobuf.ByteString getPageviewIdBytes() { + java.lang.Object ref = pageviewId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageviewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique ID of a web page view.
+     *
+     * This should be kept the same for all user events triggered from the same
+     * pageview. For example, an item detail page view could trigger multiple
+     * events as the user is browsing the page. The `pageview_id` property should
+     * be kept the same for all these events so that they can be grouped together
+     * properly.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically.
+     * 
+ * + * string pageview_id = 1; + * + * @param value The pageviewId to set. + * @return This builder for chaining. + */ + public Builder setPageviewId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageviewId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique ID of a web page view.
+     *
+     * This should be kept the same for all user events triggered from the same
+     * pageview. For example, an item detail page view could trigger multiple
+     * events as the user is browsing the page. The `pageview_id` property should
+     * be kept the same for all these events so that they can be grouped together
+     * properly.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically.
+     * 
+ * + * string pageview_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageviewId() { + pageviewId_ = getDefaultInstance().getPageviewId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique ID of a web page view.
+     *
+     * This should be kept the same for all user events triggered from the same
+     * pageview. For example, an item detail page view could trigger multiple
+     * events as the user is browsing the page. The `pageview_id` property should
+     * be kept the same for all these events so that they can be grouped together
+     * properly.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically.
+     * 
+ * + * string pageview_id = 1; + * + * @param value The bytes for pageviewId to set. + * @return This builder for chaining. + */ + public Builder setPageviewIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageviewId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object pageCategory_ = ""; + /** + * + * + *
+     * The most specific category associated with a category page.
+     *
+     * To represent full path of category, use '>' sign to separate different
+     * hierarchies. If '>' is part of the category name, please replace it with
+     * other character(s).
+     *
+     * Category pages include special pages such as sales or promotions. For
+     * instance, a special sale page may have the category hierarchy:
+     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+     *
+     * Required for `view-category-page` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_category = 2; + * + * @return The pageCategory. + */ + public java.lang.String getPageCategory() { + java.lang.Object ref = pageCategory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageCategory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The most specific category associated with a category page.
+     *
+     * To represent full path of category, use '>' sign to separate different
+     * hierarchies. If '>' is part of the category name, please replace it with
+     * other character(s).
+     *
+     * Category pages include special pages such as sales or promotions. For
+     * instance, a special sale page may have the category hierarchy:
+     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+     *
+     * Required for `view-category-page` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_category = 2; + * + * @return The bytes for pageCategory. + */ + public com.google.protobuf.ByteString getPageCategoryBytes() { + java.lang.Object ref = pageCategory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The most specific category associated with a category page.
+     *
+     * To represent full path of category, use '>' sign to separate different
+     * hierarchies. If '>' is part of the category name, please replace it with
+     * other character(s).
+     *
+     * Category pages include special pages such as sales or promotions. For
+     * instance, a special sale page may have the category hierarchy:
+     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+     *
+     * Required for `view-category-page` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_category = 2; + * + * @param value The pageCategory to set. + * @return This builder for chaining. + */ + public Builder setPageCategory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageCategory_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The most specific category associated with a category page.
+     *
+     * To represent full path of category, use '>' sign to separate different
+     * hierarchies. If '>' is part of the category name, please replace it with
+     * other character(s).
+     *
+     * Category pages include special pages such as sales or promotions. For
+     * instance, a special sale page may have the category hierarchy:
+     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+     *
+     * Required for `view-category-page` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_category = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageCategory() { + pageCategory_ = getDefaultInstance().getPageCategory(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The most specific category associated with a category page.
+     *
+     * To represent full path of category, use '>' sign to separate different
+     * hierarchies. If '>' is part of the category name, please replace it with
+     * other character(s).
+     *
+     * Category pages include special pages such as sales or promotions. For
+     * instance, a special sale page may have the category hierarchy:
+     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+     *
+     * Required for `view-category-page` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string page_category = 2; + * + * @param value The bytes for pageCategory to set. + * @return This builder for chaining. + */ + public Builder setPageCategoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageCategory_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * Complete URL (window.location.href) of the user's current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. Maximum length 5,000
+     * characters.
+     * 
+ * + * string uri = 3; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Complete URL (window.location.href) of the user's current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. Maximum length 5,000
+     * characters.
+     * 
+ * + * string uri = 3; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Complete URL (window.location.href) of the user's current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. Maximum length 5,000
+     * characters.
+     * 
+ * + * string uri = 3; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Complete URL (window.location.href) of the user's current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. Maximum length 5,000
+     * characters.
+     * 
+ * + * string uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Complete URL (window.location.href) of the user's current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. Maximum length 5,000
+     * characters.
+     * 
+ * + * string uri = 3; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object referrerUri_ = ""; + /** + * + * + *
+     * The referrer URL of the current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. However, some browser
+     * privacy restrictions may cause this field to be empty.
+     * 
+ * + * string referrer_uri = 4; + * + * @return The referrerUri. + */ + public java.lang.String getReferrerUri() { + java.lang.Object ref = referrerUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referrerUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The referrer URL of the current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. However, some browser
+     * privacy restrictions may cause this field to be empty.
+     * 
+ * + * string referrer_uri = 4; + * + * @return The bytes for referrerUri. + */ + public com.google.protobuf.ByteString getReferrerUriBytes() { + java.lang.Object ref = referrerUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + referrerUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The referrer URL of the current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. However, some browser
+     * privacy restrictions may cause this field to be empty.
+     * 
+ * + * string referrer_uri = 4; + * + * @param value The referrerUri to set. + * @return This builder for chaining. + */ + public Builder setReferrerUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + referrerUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The referrer URL of the current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. However, some browser
+     * privacy restrictions may cause this field to be empty.
+     * 
+ * + * string referrer_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearReferrerUri() { + referrerUri_ = getDefaultInstance().getReferrerUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The referrer URL of the current page.
+     *
+     * When using the client side event reporting with JavaScript pixel and Google
+     * Tag Manager, this value is filled in automatically. However, some browser
+     * privacy restrictions may cause this field to be empty.
+     * 
+ * + * string referrer_uri = 4; + * + * @param value The bytes for referrerUri to set. + * @return This builder for chaining. + */ + public Builder setReferrerUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + referrerUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PageInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PageInfo) + private static final com.google.cloud.discoveryengine.v1alpha.PageInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PageInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PageInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PageInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PageInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PageInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PageInfoOrBuilder.java new file mode 100644 index 000000000000..4ff7d9ac8ac6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PageInfoOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PageInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PageInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A unique ID of a web page view.
+   *
+   * This should be kept the same for all user events triggered from the same
+   * pageview. For example, an item detail page view could trigger multiple
+   * events as the user is browsing the page. The `pageview_id` property should
+   * be kept the same for all these events so that they can be grouped together
+   * properly.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically.
+   * 
+ * + * string pageview_id = 1; + * + * @return The pageviewId. + */ + java.lang.String getPageviewId(); + /** + * + * + *
+   * A unique ID of a web page view.
+   *
+   * This should be kept the same for all user events triggered from the same
+   * pageview. For example, an item detail page view could trigger multiple
+   * events as the user is browsing the page. The `pageview_id` property should
+   * be kept the same for all these events so that they can be grouped together
+   * properly.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically.
+   * 
+ * + * string pageview_id = 1; + * + * @return The bytes for pageviewId. + */ + com.google.protobuf.ByteString getPageviewIdBytes(); + + /** + * + * + *
+   * The most specific category associated with a category page.
+   *
+   * To represent full path of category, use '>' sign to separate different
+   * hierarchies. If '>' is part of the category name, please replace it with
+   * other character(s).
+   *
+   * Category pages include special pages such as sales or promotions. For
+   * instance, a special sale page may have the category hierarchy:
+   * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+   *
+   * Required for `view-category-page` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_category = 2; + * + * @return The pageCategory. + */ + java.lang.String getPageCategory(); + /** + * + * + *
+   * The most specific category associated with a category page.
+   *
+   * To represent full path of category, use '>' sign to separate different
+   * hierarchies. If '>' is part of the category name, please replace it with
+   * other character(s).
+   *
+   * Category pages include special pages such as sales or promotions. For
+   * instance, a special sale page may have the category hierarchy:
+   * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
+   *
+   * Required for `view-category-page` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string page_category = 2; + * + * @return The bytes for pageCategory. + */ + com.google.protobuf.ByteString getPageCategoryBytes(); + + /** + * + * + *
+   * Complete URL (window.location.href) of the user's current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. Maximum length 5,000
+   * characters.
+   * 
+ * + * string uri = 3; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * Complete URL (window.location.href) of the user's current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. Maximum length 5,000
+   * characters.
+   * 
+ * + * string uri = 3; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The referrer URL of the current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. However, some browser
+   * privacy restrictions may cause this field to be empty.
+   * 
+ * + * string referrer_uri = 4; + * + * @return The referrerUri. + */ + java.lang.String getReferrerUri(); + /** + * + * + *
+   * The referrer URL of the current page.
+   *
+   * When using the client side event reporting with JavaScript pixel and Google
+   * Tag Manager, this value is filled in automatically. However, some browser
+   * privacy restrictions may cause this field to be empty.
+   * 
+ * + * string referrer_uri = 4; + * + * @return The bytes for referrerUri. + */ + com.google.protobuf.ByteString getReferrerUriBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PanelInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PanelInfo.java new file mode 100644 index 000000000000..ec4b8864dd67 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PanelInfo.java @@ -0,0 +1,1103 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Detailed panel information associated with a user event.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PanelInfo} + */ +public final class PanelInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PanelInfo) + PanelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PanelInfo.newBuilder() to construct. + private PanelInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PanelInfo() { + panelId_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PanelInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PanelInfo.class, + com.google.cloud.discoveryengine.v1alpha.PanelInfo.Builder.class); + } + + private int bitField0_; + public static final int PANEL_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object panelId_ = ""; + /** + * + * + *
+   * Required. The panel ID.
+   * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The panelId. + */ + @java.lang.Override + public java.lang.String getPanelId() { + java.lang.Object ref = panelId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + panelId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The panel ID.
+   * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for panelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPanelIdBytes() { + java.lang.Object ref = panelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + panelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * The display name of the panel.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The display name of the panel.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PANEL_POSITION_FIELD_NUMBER = 4; + private int panelPosition_ = 0; + /** + * + * + *
+   * The ordered position of the panel, if shown to the user with other panels.
+   * If set, then
+   * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+   * must also be set.
+   * 
+ * + * optional int32 panel_position = 4; + * + * @return Whether the panelPosition field is set. + */ + @java.lang.Override + public boolean hasPanelPosition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The ordered position of the panel, if shown to the user with other panels.
+   * If set, then
+   * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+   * must also be set.
+   * 
+ * + * optional int32 panel_position = 4; + * + * @return The panelPosition. + */ + @java.lang.Override + public int getPanelPosition() { + return panelPosition_; + } + + public static final int TOTAL_PANELS_FIELD_NUMBER = 5; + private int totalPanels_ = 0; + /** + * + * + *
+   * The total number of panels, including this one, shown to the user.
+   * Must be set if
+   * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+   * is set.
+   * 
+ * + * optional int32 total_panels = 5; + * + * @return Whether the totalPanels field is set. + */ + @java.lang.Override + public boolean hasTotalPanels() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The total number of panels, including this one, shown to the user.
+   * Must be set if
+   * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+   * is set.
+   * 
+ * + * optional int32 total_panels = 5; + * + * @return The totalPanels. + */ + @java.lang.Override + public int getTotalPanels() { + return totalPanels_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(panelId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, panelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(4, panelPosition_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(5, totalPanels_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(panelId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, panelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, panelPosition_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, totalPanels_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PanelInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PanelInfo other = + (com.google.cloud.discoveryengine.v1alpha.PanelInfo) obj; + + if (!getPanelId().equals(other.getPanelId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasPanelPosition() != other.hasPanelPosition()) return false; + if (hasPanelPosition()) { + if (getPanelPosition() != other.getPanelPosition()) return false; + } + if (hasTotalPanels() != other.hasTotalPanels()) return false; + if (hasTotalPanels()) { + if (getTotalPanels() != other.getTotalPanels()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PANEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getPanelId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasPanelPosition()) { + hash = (37 * hash) + PANEL_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPanelPosition(); + } + if (hasTotalPanels()) { + hash = (37 * hash) + TOTAL_PANELS_FIELD_NUMBER; + hash = (53 * hash) + getTotalPanels(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.PanelInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Detailed panel information associated with a user event.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PanelInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PanelInfo) + com.google.cloud.discoveryengine.v1alpha.PanelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PanelInfo.class, + com.google.cloud.discoveryengine.v1alpha.PanelInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PanelInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + panelId_ = ""; + displayName_ = ""; + panelPosition_ = 0; + totalPanels_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PanelInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PanelInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PanelInfo build() { + com.google.cloud.discoveryengine.v1alpha.PanelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PanelInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PanelInfo result = + new com.google.cloud.discoveryengine.v1alpha.PanelInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.PanelInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.panelId_ = panelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.panelPosition_ = panelPosition_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalPanels_ = totalPanels_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PanelInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PanelInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.PanelInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.PanelInfo.getDefaultInstance()) + return this; + if (!other.getPanelId().isEmpty()) { + panelId_ = other.panelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPanelPosition()) { + setPanelPosition(other.getPanelPosition()); + } + if (other.hasTotalPanels()) { + setTotalPanels(other.getTotalPanels()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + panelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + panelPosition_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 40: + { + totalPanels_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object panelId_ = ""; + /** + * + * + *
+     * Required. The panel ID.
+     * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The panelId. + */ + public java.lang.String getPanelId() { + java.lang.Object ref = panelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + panelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The panel ID.
+     * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for panelId. + */ + public com.google.protobuf.ByteString getPanelIdBytes() { + java.lang.Object ref = panelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + panelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The panel ID.
+     * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The panelId to set. + * @return This builder for chaining. + */ + public Builder setPanelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + panelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The panel ID.
+     * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPanelId() { + panelId_ = getDefaultInstance().getPanelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The panel ID.
+     * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for panelId to set. + * @return This builder for chaining. + */ + public Builder setPanelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + panelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The display name of the panel.
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The display name of the panel.
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The display name of the panel.
+     * 
+ * + * string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the panel.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The display name of the panel.
+     * 
+ * + * string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int panelPosition_; + /** + * + * + *
+     * The ordered position of the panel, if shown to the user with other panels.
+     * If set, then
+     * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+     * must also be set.
+     * 
+ * + * optional int32 panel_position = 4; + * + * @return Whether the panelPosition field is set. + */ + @java.lang.Override + public boolean hasPanelPosition() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The ordered position of the panel, if shown to the user with other panels.
+     * If set, then
+     * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+     * must also be set.
+     * 
+ * + * optional int32 panel_position = 4; + * + * @return The panelPosition. + */ + @java.lang.Override + public int getPanelPosition() { + return panelPosition_; + } + /** + * + * + *
+     * The ordered position of the panel, if shown to the user with other panels.
+     * If set, then
+     * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+     * must also be set.
+     * 
+ * + * optional int32 panel_position = 4; + * + * @param value The panelPosition to set. + * @return This builder for chaining. + */ + public Builder setPanelPosition(int value) { + + panelPosition_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The ordered position of the panel, if shown to the user with other panels.
+     * If set, then
+     * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+     * must also be set.
+     * 
+ * + * optional int32 panel_position = 4; + * + * @return This builder for chaining. + */ + public Builder clearPanelPosition() { + bitField0_ = (bitField0_ & ~0x00000004); + panelPosition_ = 0; + onChanged(); + return this; + } + + private int totalPanels_; + /** + * + * + *
+     * The total number of panels, including this one, shown to the user.
+     * Must be set if
+     * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+     * is set.
+     * 
+ * + * optional int32 total_panels = 5; + * + * @return Whether the totalPanels field is set. + */ + @java.lang.Override + public boolean hasTotalPanels() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The total number of panels, including this one, shown to the user.
+     * Must be set if
+     * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+     * is set.
+     * 
+ * + * optional int32 total_panels = 5; + * + * @return The totalPanels. + */ + @java.lang.Override + public int getTotalPanels() { + return totalPanels_; + } + /** + * + * + *
+     * The total number of panels, including this one, shown to the user.
+     * Must be set if
+     * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+     * is set.
+     * 
+ * + * optional int32 total_panels = 5; + * + * @param value The totalPanels to set. + * @return This builder for chaining. + */ + public Builder setTotalPanels(int value) { + + totalPanels_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of panels, including this one, shown to the user.
+     * Must be set if
+     * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+     * is set.
+     * 
+ * + * optional int32 total_panels = 5; + * + * @return This builder for chaining. + */ + public Builder clearTotalPanels() { + bitField0_ = (bitField0_ & ~0x00000008); + totalPanels_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PanelInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PanelInfo) + private static final com.google.cloud.discoveryengine.v1alpha.PanelInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PanelInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PanelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PanelInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PanelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PanelInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PanelInfoOrBuilder.java new file mode 100644 index 000000000000..671b6780e134 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PanelInfoOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PanelInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PanelInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The panel ID.
+   * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The panelId. + */ + java.lang.String getPanelId(); + /** + * + * + *
+   * Required. The panel ID.
+   * 
+ * + * string panel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for panelId. + */ + com.google.protobuf.ByteString getPanelIdBytes(); + + /** + * + * + *
+   * The display name of the panel.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The display name of the panel.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The ordered position of the panel, if shown to the user with other panels.
+   * If set, then
+   * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+   * must also be set.
+   * 
+ * + * optional int32 panel_position = 4; + * + * @return Whether the panelPosition field is set. + */ + boolean hasPanelPosition(); + /** + * + * + *
+   * The ordered position of the panel, if shown to the user with other panels.
+   * If set, then
+   * [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels]
+   * must also be set.
+   * 
+ * + * optional int32 panel_position = 4; + * + * @return The panelPosition. + */ + int getPanelPosition(); + + /** + * + * + *
+   * The total number of panels, including this one, shown to the user.
+   * Must be set if
+   * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+   * is set.
+   * 
+ * + * optional int32 total_panels = 5; + * + * @return Whether the totalPanels field is set. + */ + boolean hasTotalPanels(); + /** + * + * + *
+   * The total number of panels, including this one, shown to the user.
+   * Must be set if
+   * [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position]
+   * is set.
+   * 
+ * + * optional int32 total_panels = 5; + * + * @return The totalPanels. + */ + int getTotalPanels(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeConfigProto.java new file mode 100644 index 000000000000..680c0fe3b57c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeConfigProto.java @@ -0,0 +1,164 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class PurgeConfigProto { + private PurgeConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/cloud/discoveryengine/v1alpha/p" + + "urge_config.proto\022$google.cloud.discover" + + "yengine.v1alpha\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032\037goo" + + "gle/protobuf/timestamp.proto\"\200\001\n\026PurgeUs" + + "erEventsRequest\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*" + + "\n(discoveryengine.googleapis.com/DataSto" + + "re\022\024\n\006filter\030\002 \001(\tB\004\342A\001\002\022\r\n\005force\030\003 \001(\010\"" + + ".\n\027PurgeUserEventsResponse\022\023\n\013purge_coun" + + "t\030\001 \001(\003\"\251\001\n\027PurgeUserEventsMetadata\022/\n\013c" + + "reate_time\030\001 \001(\0132\032.google.protobuf.Times" + + "tamp\022/\n\013update_time\030\002 \001(\0132\032.google.proto" + + "buf.Timestamp\022\025\n\rsuccess_count\030\003 \001(\003\022\025\n\r" + + "failure_count\030\004 \001(\003\"|\n\025PurgeDocumentsReq" + + "uest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\n%discovery" + + "engine.googleapis.com/Branch\022\024\n\006filter\030\002" + + " \001(\tB\004\342A\001\002\022\r\n\005force\030\003 \001(\010\"q\n\026PurgeDocume" + + "ntsResponse\022\023\n\013purge_count\030\001 \001(\003\022B\n\014purg" + + "e_sample\030\002 \003(\tB,\372A)\n\'discoveryengine.goo" + + "gleapis.com/Document\"\250\001\n\026PurgeDocumentsM" + + "etadata\022/\n\013create_time\030\001 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032." + + "google.protobuf.Timestamp\022\025\n\rsuccess_cou" + + "nt\030\003 \001(\003\022\025\n\rfailure_count\030\004 \001(\003B\234\002\n(com." + + "google.cloud.discoveryengine.v1alphaB\020Pu" + + "rgeConfigProtoP\001ZRcloud.google.com/go/di" + + "scoveryengine/apiv1alpha/discoveryengine" + + "pb;discoveryenginepb\242\002\017DISCOVERYENGINE\252\002" + + "$Google.Cloud.DiscoveryEngine.V1Alpha\312\002$" + + "Google\\Cloud\\DiscoveryEngine\\V1alpha\352\002\'G" + + "oogle::Cloud::DiscoveryEngine::V1alphab\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "Force", + }); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_descriptor, + new java.lang.String[] { + "PurgeCount", + }); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + }); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "Force", + }); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_descriptor, + new java.lang.String[] { + "PurgeCount", "PurgeSample", + }); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsMetadata.java new file mode 100644 index 000000000000..4ab9f53e9516 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsMetadata.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata related to the progress of the PurgeDocuments operation.
+ * This will be returned by the google.longrunning.Operation.metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata} + */ +public final class PurgeDocumentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) + PurgeDocumentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeDocumentsMetadata.newBuilder() to construct. + private PurgeDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeDocumentsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeDocumentsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private long successCount_ = 0L; + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private long failureCount_ = 0L; + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + if (successCount_ != 0L) { + output.writeInt64(3, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(4, failureCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata other = + (com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the PurgeDocuments operation.
+   * This will be returned by the google.longrunning.Operation.metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata build() { + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata result = + new com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.failureCount_ = failureCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long successCount_; + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000004); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000008); + failureCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeDocumentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsMetadataOrBuilder.java new file mode 100644 index 000000000000..df3929cf240c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsMetadataOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PurgeDocumentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsRequest.java new file mode 100644 index 000000000000..f1b1471f12f2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsRequest.java @@ -0,0 +1,949 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest} + */ +public final class PurgeDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) + PurgeDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeDocumentsRequest.newBuilder() to construct. + private PurgeDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeDocumentsRequest() { + parent_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeDocumentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.class, + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Required. Filter matching documents to purge. Only currently supported
+   * value is
+   * `*` (all items).
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Filter matching documents to purge. Only currently supported
+   * value is
+   * `*` (all items).
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Actually performs the purge. If `force` is set to false, return the
+   * expected purge count without deleting any documents.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest other = + (com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.class, + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest build() { + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest result = + new com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. Filter matching documents to purge. Only currently supported
+     * value is
+     * `*` (all items).
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Filter matching documents to purge. Only currently supported
+     * value is
+     * `*` (all items).
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Filter matching documents to purge. Only currently supported
+     * value is
+     * `*` (all items).
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Filter matching documents to purge. Only currently supported
+     * value is
+     * `*` (all items).
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Filter matching documents to purge. Only currently supported
+     * value is
+     * `*` (all items).
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Actually performs the purge. If `force` is set to false, return the
+     * expected purge count without deleting any documents.
+     * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Actually performs the purge. If `force` is set to false, return the
+     * expected purge count without deleting any documents.
+     * 
+ * + * bool force = 3; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Actually performs the purge. If `force` is set to false, return the
+     * expected purge count without deleting any documents.
+     * 
+ * + * bool force = 3; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) + private static final com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsRequestOrBuilder.java new file mode 100644 index 000000000000..6a6b1e1c41ad --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PurgeDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Filter matching documents to purge. Only currently supported
+   * value is
+   * `*` (all items).
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. Filter matching documents to purge. Only currently supported
+   * value is
+   * `*` (all items).
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Actually performs the purge. If `force` is set to false, return the
+   * expected purge count without deleting any documents.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsResponse.java new file mode 100644 index 000000000000..b199061372d7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsResponse.java @@ -0,0 +1,852 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for
+ * [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments]
+ * method. If the long running operation is successfully done, then this message
+ * is returned by the google.longrunning.Operations.response field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse} + */ +public final class PurgeDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) + PurgeDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeDocumentsResponse.newBuilder() to construct. + private PurgeDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeDocumentsResponse() { + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeDocumentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse.class, + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse.Builder.class); + } + + public static final int PURGE_COUNT_FIELD_NUMBER = 1; + private long purgeCount_ = 0L; + /** + * + * + *
+   * The total count of documents purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + + public static final int PURGE_SAMPLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList purgeSample_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + public com.google.protobuf.ProtocolStringList getPurgeSampleList() { + return purgeSample_; + } + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + public int getPurgeSampleCount() { + return purgeSample_.size(); + } + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + public java.lang.String getPurgeSample(int index) { + return purgeSample_.get(index); + } + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + public com.google.protobuf.ByteString getPurgeSampleBytes(int index) { + return purgeSample_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (purgeCount_ != 0L) { + output.writeInt64(1, purgeCount_); + } + for (int i = 0; i < purgeSample_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, purgeSample_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (purgeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, purgeCount_); + } + { + int dataSize = 0; + for (int i = 0; i < purgeSample_.size(); i++) { + dataSize += computeStringSizeNoTag(purgeSample_.getRaw(i)); + } + size += dataSize; + size += 1 * getPurgeSampleList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse other = + (com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) obj; + + if (getPurgeCount() != other.getPurgeCount()) return false; + if (!getPurgeSampleList().equals(other.getPurgeSampleList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PURGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPurgeCount()); + if (getPurgeSampleCount() > 0) { + hash = (37 * hash) + PURGE_SAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getPurgeSampleList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments]
+   * method. If the long running operation is successfully done, then this message
+   * is returned by the google.longrunning.Operations.response field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse.class, + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + purgeCount_ = 0L; + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeDocumentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse build() { + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse result = + new com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.purgeCount_ = purgeCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + purgeSample_.makeImmutable(); + result.purgeSample_ = purgeSample_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse.getDefaultInstance()) + return this; + if (other.getPurgeCount() != 0L) { + setPurgeCount(other.getPurgeCount()); + } + if (!other.purgeSample_.isEmpty()) { + if (purgeSample_.isEmpty()) { + purgeSample_ = other.purgeSample_; + bitField0_ |= 0x00000002; + } else { + ensurePurgeSampleIsMutable(); + purgeSample_.addAll(other.purgeSample_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + purgeCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePurgeSampleIsMutable(); + purgeSample_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long purgeCount_; + /** + * + * + *
+     * The total count of documents purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + /** + * + * + *
+     * The total count of documents purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @param value The purgeCount to set. + * @return This builder for chaining. + */ + public Builder setPurgeCount(long value) { + + purgeCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The total count of documents purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearPurgeCount() { + bitField0_ = (bitField0_ & ~0x00000001); + purgeCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList purgeSample_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePurgeSampleIsMutable() { + if (!purgeSample_.isModifiable()) { + purgeSample_ = new com.google.protobuf.LazyStringArrayList(purgeSample_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + public com.google.protobuf.ProtocolStringList getPurgeSampleList() { + purgeSample_.makeImmutable(); + return purgeSample_; + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + public int getPurgeSampleCount() { + return purgeSample_.size(); + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + public java.lang.String getPurgeSample(int index) { + return purgeSample_.get(index); + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + public com.google.protobuf.ByteString getPurgeSampleBytes(int index) { + return purgeSample_.getByteString(index); + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The purgeSample to set. + * @return This builder for chaining. + */ + public Builder setPurgeSample(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurgeSampleIsMutable(); + purgeSample_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The purgeSample to add. + * @return This builder for chaining. + */ + public Builder addPurgeSample(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurgeSampleIsMutable(); + purgeSample_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param values The purgeSample to add. + * @return This builder for chaining. + */ + public Builder addAllPurgeSample(java.lang.Iterable values) { + ensurePurgeSampleIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, purgeSample_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearPurgeSample() { + purgeSample_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A sample of document names that will be deleted. Only populated if `force`
+     * is set to false. A max of 100 names will be returned and the names are
+     * chosen at random.
+     * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the purgeSample to add. + * @return This builder for chaining. + */ + public Builder addPurgeSampleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePurgeSampleIsMutable(); + purgeSample_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) + private static final com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeDocumentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsResponseOrBuilder.java new file mode 100644 index 000000000000..f89c20dca255 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeDocumentsResponseOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PurgeDocumentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The total count of documents purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + long getPurgeCount(); + + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the purgeSample. + */ + java.util.List getPurgeSampleList(); + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @return The count of purgeSample. + */ + int getPurgeSampleCount(); + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The purgeSample at the given index. + */ + java.lang.String getPurgeSample(int index); + /** + * + * + *
+   * A sample of document names that will be deleted. Only populated if `force`
+   * is set to false. A max of 100 names will be returned and the names are
+   * chosen at random.
+   * 
+ * + * repeated string purge_sample = 2 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the purgeSample at the given index. + */ + com.google.protobuf.ByteString getPurgeSampleBytes(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsMetadata.java new file mode 100644 index 000000000000..ac4c30ed17fd --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsMetadata.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata related to the progress of the PurgeUserEvents operation.
+ * This will be returned by the google.longrunning.Operation.metadata field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata} + */ +public final class PurgeUserEventsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) + PurgeUserEventsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeUserEventsMetadata.newBuilder() to construct. + private PurgeUserEventsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeUserEventsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeUserEventsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private long successCount_ = 0L; + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private long failureCount_ = 0L; + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + if (successCount_ != 0L) { + output.writeInt64(3, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(4, failureCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata other = + (com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the PurgeUserEvents operation.
+   * This will be returned by the google.longrunning.Operation.metadata field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata.class, + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata build() { + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata result = + new com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.failureCount_ = failureCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long successCount_; + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that were deleted successfully.
+     * 
+ * + * int64 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000004); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of entries that encountered errors while processing.
+     * 
+ * + * int64 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000008); + failureCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeUserEventsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsMetadataOrBuilder.java new file mode 100644 index 000000000000..a597f843666e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsMetadataOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PurgeUserEventsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Count of entries that were deleted successfully.
+   * 
+ * + * int64 success_count = 3; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
+   * Count of entries that encountered errors while processing.
+   * 
+ * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsRequest.java new file mode 100644 index 000000000000..35be7f76dff3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsRequest.java @@ -0,0 +1,1123 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for PurgeUserEvents method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest} + */ +public final class PurgeUserEventsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) + PurgeUserEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeUserEventsRequest.newBuilder() to construct. + private PurgeUserEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeUserEventsRequest() { + parent_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeUserEventsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.class, + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the catalog under which the events are
+   * created. The format is
+   * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the catalog under which the events are
+   * created. The format is
+   * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Required. The filter string to specify the events to be deleted with a
+   * length limit of 5,000 characters. The eligible fields for filtering are:
+   *
+   * * `eventType`: Double quoted
+   * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+   * string.
+   * * `eventTime`: in ISO 8601 "zulu" format.
+   * * `userPseudoId`: Double quoted string. Specifying this will delete all
+   *   events associated with a visitor.
+   * * `userId`: Double quoted string. Specifying this will delete all events
+   *   associated with a user.
+   *
+   * Examples:
+   *
+   * * Deleting all events in a time range:
+   *   `eventTime > "2012-04-23T18:25:43.511Z"
+   *   eventTime < "2012-04-23T18:30:43.511Z"`
+   * * Deleting specific eventType:
+   *   `eventType = "search"`
+   * * Deleting all events for a specific visitor:
+   *   `userPseudoId = "visitor1024"`
+   * * Deleting all events inside a DataStore:
+   *   `*`
+   *
+   * The filtering fields are assumed to have an implicit AND.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The filter string to specify the events to be deleted with a
+   * length limit of 5,000 characters. The eligible fields for filtering are:
+   *
+   * * `eventType`: Double quoted
+   * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+   * string.
+   * * `eventTime`: in ISO 8601 "zulu" format.
+   * * `userPseudoId`: Double quoted string. Specifying this will delete all
+   *   events associated with a visitor.
+   * * `userId`: Double quoted string. Specifying this will delete all events
+   *   associated with a user.
+   *
+   * Examples:
+   *
+   * * Deleting all events in a time range:
+   *   `eventTime > "2012-04-23T18:25:43.511Z"
+   *   eventTime < "2012-04-23T18:30:43.511Z"`
+   * * Deleting specific eventType:
+   *   `eventType = "search"`
+   * * Deleting all events for a specific visitor:
+   *   `userPseudoId = "visitor1024"`
+   * * Deleting all events inside a DataStore:
+   *   `*`
+   *
+   * The filtering fields are assumed to have an implicit AND.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * The `force` field is currently not supported. Purge user event requests
+   * will permanently delete all purgeable events. Once the development is
+   * complete:
+   * If `force` is set to false, the method will return the expected
+   * purge count without deleting any user events. This field will default to
+   * false if not included in the request.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest other = + (com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for PurgeUserEvents method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.class, + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest build() { + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest result = + new com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the catalog under which the events are
+     * created. The format is
+     * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the catalog under which the events are
+     * created. The format is
+     * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the catalog under which the events are
+     * created. The format is
+     * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the catalog under which the events are
+     * created. The format is
+     * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the catalog under which the events are
+     * created. The format is
+     * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. The filter string to specify the events to be deleted with a
+     * length limit of 5,000 characters. The eligible fields for filtering are:
+     *
+     * * `eventType`: Double quoted
+     * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+     * string.
+     * * `eventTime`: in ISO 8601 "zulu" format.
+     * * `userPseudoId`: Double quoted string. Specifying this will delete all
+     *   events associated with a visitor.
+     * * `userId`: Double quoted string. Specifying this will delete all events
+     *   associated with a user.
+     *
+     * Examples:
+     *
+     * * Deleting all events in a time range:
+     *   `eventTime > "2012-04-23T18:25:43.511Z"
+     *   eventTime < "2012-04-23T18:30:43.511Z"`
+     * * Deleting specific eventType:
+     *   `eventType = "search"`
+     * * Deleting all events for a specific visitor:
+     *   `userPseudoId = "visitor1024"`
+     * * Deleting all events inside a DataStore:
+     *   `*`
+     *
+     * The filtering fields are assumed to have an implicit AND.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The filter string to specify the events to be deleted with a
+     * length limit of 5,000 characters. The eligible fields for filtering are:
+     *
+     * * `eventType`: Double quoted
+     * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+     * string.
+     * * `eventTime`: in ISO 8601 "zulu" format.
+     * * `userPseudoId`: Double quoted string. Specifying this will delete all
+     *   events associated with a visitor.
+     * * `userId`: Double quoted string. Specifying this will delete all events
+     *   associated with a user.
+     *
+     * Examples:
+     *
+     * * Deleting all events in a time range:
+     *   `eventTime > "2012-04-23T18:25:43.511Z"
+     *   eventTime < "2012-04-23T18:30:43.511Z"`
+     * * Deleting specific eventType:
+     *   `eventType = "search"`
+     * * Deleting all events for a specific visitor:
+     *   `userPseudoId = "visitor1024"`
+     * * Deleting all events inside a DataStore:
+     *   `*`
+     *
+     * The filtering fields are assumed to have an implicit AND.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The filter string to specify the events to be deleted with a
+     * length limit of 5,000 characters. The eligible fields for filtering are:
+     *
+     * * `eventType`: Double quoted
+     * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+     * string.
+     * * `eventTime`: in ISO 8601 "zulu" format.
+     * * `userPseudoId`: Double quoted string. Specifying this will delete all
+     *   events associated with a visitor.
+     * * `userId`: Double quoted string. Specifying this will delete all events
+     *   associated with a user.
+     *
+     * Examples:
+     *
+     * * Deleting all events in a time range:
+     *   `eventTime > "2012-04-23T18:25:43.511Z"
+     *   eventTime < "2012-04-23T18:30:43.511Z"`
+     * * Deleting specific eventType:
+     *   `eventType = "search"`
+     * * Deleting all events for a specific visitor:
+     *   `userPseudoId = "visitor1024"`
+     * * Deleting all events inside a DataStore:
+     *   `*`
+     *
+     * The filtering fields are assumed to have an implicit AND.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string to specify the events to be deleted with a
+     * length limit of 5,000 characters. The eligible fields for filtering are:
+     *
+     * * `eventType`: Double quoted
+     * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+     * string.
+     * * `eventTime`: in ISO 8601 "zulu" format.
+     * * `userPseudoId`: Double quoted string. Specifying this will delete all
+     *   events associated with a visitor.
+     * * `userId`: Double quoted string. Specifying this will delete all events
+     *   associated with a user.
+     *
+     * Examples:
+     *
+     * * Deleting all events in a time range:
+     *   `eventTime > "2012-04-23T18:25:43.511Z"
+     *   eventTime < "2012-04-23T18:30:43.511Z"`
+     * * Deleting specific eventType:
+     *   `eventType = "search"`
+     * * Deleting all events for a specific visitor:
+     *   `userPseudoId = "visitor1024"`
+     * * Deleting all events inside a DataStore:
+     *   `*`
+     *
+     * The filtering fields are assumed to have an implicit AND.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The filter string to specify the events to be deleted with a
+     * length limit of 5,000 characters. The eligible fields for filtering are:
+     *
+     * * `eventType`: Double quoted
+     * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+     * string.
+     * * `eventTime`: in ISO 8601 "zulu" format.
+     * * `userPseudoId`: Double quoted string. Specifying this will delete all
+     *   events associated with a visitor.
+     * * `userId`: Double quoted string. Specifying this will delete all events
+     *   associated with a user.
+     *
+     * Examples:
+     *
+     * * Deleting all events in a time range:
+     *   `eventTime > "2012-04-23T18:25:43.511Z"
+     *   eventTime < "2012-04-23T18:30:43.511Z"`
+     * * Deleting specific eventType:
+     *   `eventType = "search"`
+     * * Deleting all events for a specific visitor:
+     *   `userPseudoId = "visitor1024"`
+     * * Deleting all events inside a DataStore:
+     *   `*`
+     *
+     * The filtering fields are assumed to have an implicit AND.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * The `force` field is currently not supported. Purge user event requests
+     * will permanently delete all purgeable events. Once the development is
+     * complete:
+     * If `force` is set to false, the method will return the expected
+     * purge count without deleting any user events. This field will default to
+     * false if not included in the request.
+     * 
+ * + * bool force = 3; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * The `force` field is currently not supported. Purge user event requests
+     * will permanently delete all purgeable events. Once the development is
+     * complete:
+     * If `force` is set to false, the method will return the expected
+     * purge count without deleting any user events. This field will default to
+     * false if not included in the request.
+     * 
+ * + * bool force = 3; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The `force` field is currently not supported. Purge user event requests
+     * will permanently delete all purgeable events. Once the development is
+     * complete:
+     * If `force` is set to false, the method will return the expected
+     * purge count without deleting any user events. This field will default to
+     * false if not included in the request.
+     * 
+ * + * bool force = 3; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) + private static final com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeUserEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsRequestOrBuilder.java new file mode 100644 index 000000000000..bce22cc73ec1 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PurgeUserEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the catalog under which the events are
+   * created. The format is
+   * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the catalog under which the events are
+   * created. The format is
+   * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The filter string to specify the events to be deleted with a
+   * length limit of 5,000 characters. The eligible fields for filtering are:
+   *
+   * * `eventType`: Double quoted
+   * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+   * string.
+   * * `eventTime`: in ISO 8601 "zulu" format.
+   * * `userPseudoId`: Double quoted string. Specifying this will delete all
+   *   events associated with a visitor.
+   * * `userId`: Double quoted string. Specifying this will delete all events
+   *   associated with a user.
+   *
+   * Examples:
+   *
+   * * Deleting all events in a time range:
+   *   `eventTime > "2012-04-23T18:25:43.511Z"
+   *   eventTime < "2012-04-23T18:30:43.511Z"`
+   * * Deleting specific eventType:
+   *   `eventType = "search"`
+   * * Deleting all events for a specific visitor:
+   *   `userPseudoId = "visitor1024"`
+   * * Deleting all events inside a DataStore:
+   *   `*`
+   *
+   * The filtering fields are assumed to have an implicit AND.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. The filter string to specify the events to be deleted with a
+   * length limit of 5,000 characters. The eligible fields for filtering are:
+   *
+   * * `eventType`: Double quoted
+   * [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type]
+   * string.
+   * * `eventTime`: in ISO 8601 "zulu" format.
+   * * `userPseudoId`: Double quoted string. Specifying this will delete all
+   *   events associated with a visitor.
+   * * `userId`: Double quoted string. Specifying this will delete all events
+   *   associated with a user.
+   *
+   * Examples:
+   *
+   * * Deleting all events in a time range:
+   *   `eventTime > "2012-04-23T18:25:43.511Z"
+   *   eventTime < "2012-04-23T18:30:43.511Z"`
+   * * Deleting specific eventType:
+   *   `eventType = "search"`
+   * * Deleting all events for a specific visitor:
+   *   `userPseudoId = "visitor1024"`
+   * * Deleting all events inside a DataStore:
+   *   `*`
+   *
+   * The filtering fields are assumed to have an implicit AND.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The `force` field is currently not supported. Purge user event requests
+   * will permanently delete all purgeable events. Once the development is
+   * complete:
+   * If `force` is set to false, the method will return the expected
+   * purge count without deleting any user events. This field will default to
+   * false if not included in the request.
+   * 
+ * + * bool force = 3; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsResponse.java new file mode 100644 index 000000000000..944881e07734 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsResponse.java @@ -0,0 +1,546 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response of the PurgeUserEventsRequest. If the long running operation is
+ * successfully done, then this message is returned by the
+ * google.longrunning.Operations.response field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse} + */ +public final class PurgeUserEventsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) + PurgeUserEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurgeUserEventsResponse.newBuilder() to construct. + private PurgeUserEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurgeUserEventsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurgeUserEventsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse.class, + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse.Builder.class); + } + + public static final int PURGE_COUNT_FIELD_NUMBER = 1; + private long purgeCount_ = 0L; + /** + * + * + *
+   * The total count of events purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (purgeCount_ != 0L) { + output.writeInt64(1, purgeCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (purgeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, purgeCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse other = + (com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) obj; + + if (getPurgeCount() != other.getPurgeCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PURGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPurgeCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of the PurgeUserEventsRequest. If the long running operation is
+   * successfully done, then this message is returned by the
+   * google.longrunning.Operations.response field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse.class, + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + purgeCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeConfigProto + .internal_static_google_cloud_discoveryengine_v1alpha_PurgeUserEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse build() { + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse result = + new com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.purgeCount_ = purgeCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse.getDefaultInstance()) + return this; + if (other.getPurgeCount() != 0L) { + setPurgeCount(other.getPurgeCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + purgeCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long purgeCount_; + /** + * + * + *
+     * The total count of events purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + @java.lang.Override + public long getPurgeCount() { + return purgeCount_; + } + /** + * + * + *
+     * The total count of events purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @param value The purgeCount to set. + * @return This builder for chaining. + */ + public Builder setPurgeCount(long value) { + + purgeCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The total count of events purged as a result of the operation.
+     * 
+ * + * int64 purge_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearPurgeCount() { + bitField0_ = (bitField0_ & ~0x00000001); + purgeCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) + private static final com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeUserEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsResponseOrBuilder.java new file mode 100644 index 000000000000..4eb042a5d4e2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/PurgeUserEventsResponseOrBuilder.java @@ -0,0 +1,38 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/purge_config.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface PurgeUserEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The total count of events purged as a result of the operation.
+   * 
+ * + * int64 purge_count = 1; + * + * @return The purgeCount. + */ + long getPurgeCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendRequest.java new file mode 100644 index 000000000000..a1796ec38b2d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendRequest.java @@ -0,0 +1,2819 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/recommendation_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for Recommend method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecommendRequest} + */ +public final class RecommendRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecommendRequest) + RecommendRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecommendRequest.newBuilder() to construct. + private RecommendRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecommendRequest() { + servingConfig_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecommendRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetParams(); + case 8: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecommendRequest.class, + com.google.cloud.discoveryengine.v1alpha.RecommendRequest.Builder.class); + } + + public static final int SERVING_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object servingConfig_ = ""; + /** + * + * + *
+   * Required. Full resource name of the format:
+   * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+   *
+   * Before you can request recommendations from your model, you must create at
+   * least one serving config  for it.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + @java.lang.Override + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfig_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of the format:
+   * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+   *
+   * Before you can request recommendations from your model, you must create at
+   * least one serving config  for it.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_EVENT_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.UserEvent userEvent_; + /** + * + * + *
+   * Required. Context about the user, what they are looking at and what action
+   * they took to trigger the Recommend request. Note that this user event
+   * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+   * write request is required for event logging.
+   *
+   * Don't set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * or
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * to the same fixed ID for different users. If you are trying to receive
+   * non-personalized recommendations (not recommended; this can negatively
+   * impact model performance), instead set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * to a random unique ID and leave
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * unset.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userEvent field is set. + */ + @java.lang.Override + public boolean hasUserEvent() { + return userEvent_ != null; + } + /** + * + * + *
+   * Required. Context about the user, what they are looking at and what action
+   * they took to trigger the Recommend request. Note that this user event
+   * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+   * write request is required for event logging.
+   *
+   * Don't set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * or
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * to the same fixed ID for different users. If you are trying to receive
+   * non-personalized recommendations (not recommended; this can negatively
+   * impact model performance), instead set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * to a random unique ID and leave
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * unset.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userEvent. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvent() { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } + /** + * + * + *
+   * Required. Context about the user, what they are looking at and what action
+   * they took to trigger the Recommend request. Note that this user event
+   * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+   * write request is required for event logging.
+   *
+   * Don't set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * or
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * to the same fixed ID for different users. If you are trying to receive
+   * non-personalized recommendations (not recommended; this can negatively
+   * impact model performance), instead set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * to a random unique ID and leave
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * unset.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventOrBuilder() { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Maximum number of results to return. Set this property
+   * to the number of recommendation results needed. If zero, the service will
+   * choose a reasonable default. The maximum allowed value is 100. Values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filter for restricting recommendation results with a length limit of 5,000
+   * characters. Currently, only filter expressions on the `filter_tags`
+   * attribute is supported.
+   *
+   *
+   * Examples:
+   *
+   *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+   *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+   *
+   * If `attributeFilteringSyntax` is set to true under the `params` field, then
+   * attribute-based expressions are expected instead of the above described
+   * tag-based syntax. Examples:
+   *
+   *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+   *  * (available: true) AND
+   *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+   *
+   * If your filter blocks all results, the API will return generic
+   * (unfiltered) popular Documents. If you only want results strictly matching
+   * the filters, set `strictFiltering` to True in
+   * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+   * to receive empty results instead.
+   *
+   * Note that the API will never return
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+   * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter for restricting recommendation results with a length limit of 5,000
+   * characters. Currently, only filter expressions on the `filter_tags`
+   * attribute is supported.
+   *
+   *
+   * Examples:
+   *
+   *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+   *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+   *
+   * If `attributeFilteringSyntax` is set to true under the `params` field, then
+   * attribute-based expressions are expected instead of the above described
+   * tag-based syntax. Examples:
+   *
+   *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+   *  * (available: true) AND
+   *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+   *
+   * If your filter blocks all results, the API will return generic
+   * (unfiltered) popular Documents. If you only want results strictly matching
+   * the filters, set `strictFiltering` to True in
+   * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+   * to receive empty results instead.
+   *
+   * Note that the API will never return
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+   * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Use validate only mode for this recommendation query. If set to true, a
+   * fake model will be used that returns arbitrary Document IDs.
+   * Note that the validate only mode should only be used for testing the API,
+   * or if the model is not ready.
+   * 
+ * + * bool validate_only = 5; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int PARAMS_FIELD_NUMBER = 6; + + private static final class ParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_ParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField + internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int USER_LABELS_FIELD_NUMBER = 8; + + private static final class UserLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_UserLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfig_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, servingConfig_); + } + if (userEvent_ != null) { + output.writeMessage(2, getUserEvent()); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 6); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 8); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfig_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, servingConfig_); + } + if (userEvent_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserEvent()); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + for (java.util.Map.Entry entry : + internalGetParams().getMap().entrySet()) { + com.google.protobuf.MapEntry params__ = + ParamsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, params__); + } + for (java.util.Map.Entry entry : + internalGetUserLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry userLabels__ = + UserLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, userLabels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RecommendRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecommendRequest other = + (com.google.cloud.discoveryengine.v1alpha.RecommendRequest) obj; + + if (!getServingConfig().equals(other.getServingConfig())) return false; + if (hasUserEvent() != other.hasUserEvent()) return false; + if (hasUserEvent()) { + if (!getUserEvent().equals(other.getUserEvent())) return false; + } + if (getPageSize() != other.getPageSize()) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!internalGetParams().equals(other.internalGetParams())) return false; + if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServingConfig().hashCode(); + if (hasUserEvent()) { + hash = (37 * hash) + USER_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getUserEvent().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + if (!internalGetParams().getMap().isEmpty()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetParams().hashCode(); + } + if (!internalGetUserLabels().getMap().isEmpty()) { + hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetUserLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecommendRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for Recommend method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecommendRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecommendRequest) + com.google.cloud.discoveryengine.v1alpha.RecommendRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetParams(); + case 8: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutableParams(); + case 8: + return internalGetMutableUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecommendRequest.class, + com.google.cloud.discoveryengine.v1alpha.RecommendRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RecommendRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + servingConfig_ = ""; + userEvent_ = null; + if (userEventBuilder_ != null) { + userEventBuilder_.dispose(); + userEventBuilder_ = null; + } + pageSize_ = 0; + filter_ = ""; + validateOnly_ = false; + internalGetMutableParams().clear(); + internalGetMutableUserLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecommendRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendRequest build() { + com.google.cloud.discoveryengine.v1alpha.RecommendRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecommendRequest result = + new com.google.cloud.discoveryengine.v1alpha.RecommendRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.RecommendRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.servingConfig_ = servingConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userEvent_ = userEventBuilder_ == null ? userEvent_ : userEventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.params_ = internalGetParams(); + result.params_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userLabels_ = internalGetUserLabels(); + result.userLabels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RecommendRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RecommendRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RecommendRequest other) { + if (other == com.google.cloud.discoveryengine.v1alpha.RecommendRequest.getDefaultInstance()) + return this; + if (!other.getServingConfig().isEmpty()) { + servingConfig_ = other.servingConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUserEvent()) { + mergeUserEvent(other.getUserEvent()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + internalGetMutableParams().mergeFrom(other.internalGetParams()); + bitField0_ |= 0x00000020; + internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); + bitField0_ |= 0x00000040; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParams() + .getMutableMap() + .put(params__.getKey(), params__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 66: + { + com.google.protobuf.MapEntry userLabels__ = + input.readMessage( + UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableUserLabels() + .getMutableMap() + .put(userLabels__.getKey(), userLabels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object servingConfig_ = ""; + /** + * + * + *
+     * Required. Full resource name of the format:
+     * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+     *
+     * Before you can request recommendations from your model, you must create at
+     * least one serving config  for it.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the format:
+     * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+     *
+     * Before you can request recommendations from your model, you must create at
+     * least one serving config  for it.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the format:
+     * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+     *
+     * Before you can request recommendations from your model, you must create at
+     * least one serving config  for it.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + servingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the format:
+     * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+     *
+     * Before you can request recommendations from your model, you must create at
+     * least one serving config  for it.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServingConfig() { + servingConfig_ = getDefaultInstance().getServingConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the format:
+     * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+     *
+     * Before you can request recommendations from your model, you must create at
+     * least one serving config  for it.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + servingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.UserEvent userEvent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder> + userEventBuilder_; + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userEvent field is set. + */ + public boolean hasUserEvent() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userEvent. + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvent() { + if (userEventBuilder_ == null) { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } else { + return userEventBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserEvent(com.google.cloud.discoveryengine.v1alpha.UserEvent value) { + if (userEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userEvent_ = value; + } else { + userEventBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserEvent( + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder builderForValue) { + if (userEventBuilder_ == null) { + userEvent_ = builderForValue.build(); + } else { + userEventBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserEvent(com.google.cloud.discoveryengine.v1alpha.UserEvent value) { + if (userEventBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && userEvent_ != null + && userEvent_ + != com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance()) { + getUserEventBuilder().mergeFrom(value); + } else { + userEvent_ = value; + } + } else { + userEventBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserEvent() { + bitField0_ = (bitField0_ & ~0x00000002); + userEvent_ = null; + if (userEventBuilder_ != null) { + userEventBuilder_.dispose(); + userEventBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder getUserEventBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventOrBuilder() { + if (userEventBuilder_ != null) { + return userEventBuilder_.getMessageOrBuilder(); + } else { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } + } + /** + * + * + *
+     * Required. Context about the user, what they are looking at and what action
+     * they took to trigger the Recommend request. Note that this user event
+     * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+     * write request is required for event logging.
+     *
+     * Don't set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * or
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * to the same fixed ID for different users. If you are trying to receive
+     * non-personalized recommendations (not recommended; this can negatively
+     * impact model performance), instead set
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * to a random unique ID and leave
+     * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+     * unset.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder> + getUserEventFieldBuilder() { + if (userEventBuilder_ == null) { + userEventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder>( + getUserEvent(), getParentForChildren(), isClean()); + userEvent_ = null; + } + return userEventBuilder_; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum number of results to return. Set this property
+     * to the number of recommendation results needed. If zero, the service will
+     * choose a reasonable default. The maximum allowed value is 100. Values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of results to return. Set this property
+     * to the number of recommendation results needed. If zero, the service will
+     * choose a reasonable default. The maximum allowed value is 100. Values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of results to return. Set this property
+     * to the number of recommendation results needed. If zero, the service will
+     * choose a reasonable default. The maximum allowed value is 100. Values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter for restricting recommendation results with a length limit of 5,000
+     * characters. Currently, only filter expressions on the `filter_tags`
+     * attribute is supported.
+     *
+     *
+     * Examples:
+     *
+     *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+     *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+     *
+     * If `attributeFilteringSyntax` is set to true under the `params` field, then
+     * attribute-based expressions are expected instead of the above described
+     * tag-based syntax. Examples:
+     *
+     *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+     *  * (available: true) AND
+     *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+     *
+     * If your filter blocks all results, the API will return generic
+     * (unfiltered) popular Documents. If you only want results strictly matching
+     * the filters, set `strictFiltering` to True in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+     * to receive empty results instead.
+     *
+     * Note that the API will never return
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+     * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter for restricting recommendation results with a length limit of 5,000
+     * characters. Currently, only filter expressions on the `filter_tags`
+     * attribute is supported.
+     *
+     *
+     * Examples:
+     *
+     *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+     *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+     *
+     * If `attributeFilteringSyntax` is set to true under the `params` field, then
+     * attribute-based expressions are expected instead of the above described
+     * tag-based syntax. Examples:
+     *
+     *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+     *  * (available: true) AND
+     *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+     *
+     * If your filter blocks all results, the API will return generic
+     * (unfiltered) popular Documents. If you only want results strictly matching
+     * the filters, set `strictFiltering` to True in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+     * to receive empty results instead.
+     *
+     * Note that the API will never return
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+     * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter for restricting recommendation results with a length limit of 5,000
+     * characters. Currently, only filter expressions on the `filter_tags`
+     * attribute is supported.
+     *
+     *
+     * Examples:
+     *
+     *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+     *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+     *
+     * If `attributeFilteringSyntax` is set to true under the `params` field, then
+     * attribute-based expressions are expected instead of the above described
+     * tag-based syntax. Examples:
+     *
+     *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+     *  * (available: true) AND
+     *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+     *
+     * If your filter blocks all results, the API will return generic
+     * (unfiltered) popular Documents. If you only want results strictly matching
+     * the filters, set `strictFiltering` to True in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+     * to receive empty results instead.
+     *
+     * Note that the API will never return
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+     * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter for restricting recommendation results with a length limit of 5,000
+     * characters. Currently, only filter expressions on the `filter_tags`
+     * attribute is supported.
+     *
+     *
+     * Examples:
+     *
+     *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+     *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+     *
+     * If `attributeFilteringSyntax` is set to true under the `params` field, then
+     * attribute-based expressions are expected instead of the above described
+     * tag-based syntax. Examples:
+     *
+     *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+     *  * (available: true) AND
+     *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+     *
+     * If your filter blocks all results, the API will return generic
+     * (unfiltered) popular Documents. If you only want results strictly matching
+     * the filters, set `strictFiltering` to True in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+     * to receive empty results instead.
+     *
+     * Note that the API will never return
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+     * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter for restricting recommendation results with a length limit of 5,000
+     * characters. Currently, only filter expressions on the `filter_tags`
+     * attribute is supported.
+     *
+     *
+     * Examples:
+     *
+     *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+     *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+     *
+     * If `attributeFilteringSyntax` is set to true under the `params` field, then
+     * attribute-based expressions are expected instead of the above described
+     * tag-based syntax. Examples:
+     *
+     *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+     *  * (available: true) AND
+     *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+     *
+     * If your filter blocks all results, the API will return generic
+     * (unfiltered) popular Documents. If you only want results strictly matching
+     * the filters, set `strictFiltering` to True in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+     * to receive empty results instead.
+     *
+     * Note that the API will never return
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+     * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Use validate only mode for this recommendation query. If set to true, a
+     * fake model will be used that returns arbitrary Document IDs.
+     * Note that the validate only mode should only be used for testing the API,
+     * or if the model is not ready.
+     * 
+ * + * bool validate_only = 5; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Use validate only mode for this recommendation query. If set to true, a
+     * fake model will be used that returns arbitrary Document IDs.
+     * Note that the validate only mode should only be used for testing the API,
+     * or if the model is not ready.
+     * 
+ * + * bool validate_only = 5; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Use validate only mode for this recommendation query. If set to true, a
+     * fake model will be used that returns arbitrary Document IDs.
+     * Note that the validate only mode should only be used for testing the API,
+     * or if the model is not ready.
+     * 
+ * + * bool validate_only = 5; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField + internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + private com.google.protobuf.MapField + internalGetMutableParams() { + if (params_ == null) { + params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); + } + if (!params_.isMutable()) { + params_ = params_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+     * Additional domain specific parameters for the recommendations.
+     *
+     * Allowed values:
+     *
+     * * `returnDocument`: Boolean. If set to true, the associated Document
+     *    object will be returned in
+     *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+     * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+     *    corresponding to each returned Document will be set in
+     *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+     *    The given 'score' indicates the probability of a Document conversion
+     *    given the user's context and history.
+     * * `strictFiltering`: Boolean. True by default. If set to false, the service
+     *    will return generic (unfiltered) popular Documents instead of empty if
+     *    your filter blocks all recommendation results.
+     * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+     *    it needs to be one of:
+     *     *  `no-diversity`
+     *     *  `low-diversity`
+     *     *  `medium-diversity`
+     *     *  `high-diversity`
+     *     *  `auto-diversity`
+     *    This gives request-level control and adjusts recommendation results
+     *    based on Document category.
+     * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+     *    the `filter` field is interpreted according to the new,
+     *    attribute-based syntax.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+     * Additional domain specific parameters for the recommendations.
+     *
+     * Allowed values:
+     *
+     * * `returnDocument`: Boolean. If set to true, the associated Document
+     *    object will be returned in
+     *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+     * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+     *    corresponding to each returned Document will be set in
+     *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+     *    The given 'score' indicates the probability of a Document conversion
+     *    given the user's context and history.
+     * * `strictFiltering`: Boolean. True by default. If set to false, the service
+     *    will return generic (unfiltered) popular Documents instead of empty if
+     *    your filter blocks all recommendation results.
+     * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+     *    it needs to be one of:
+     *     *  `no-diversity`
+     *     *  `low-diversity`
+     *     *  `medium-diversity`
+     *     *  `high-diversity`
+     *     *  `auto-diversity`
+     *    This gives request-level control and adjusts recommendation results
+     *    based on Document category.
+     * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+     *    the `filter` field is interpreted according to the new,
+     *    attribute-based syntax.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+     * Additional domain specific parameters for the recommendations.
+     *
+     * Allowed values:
+     *
+     * * `returnDocument`: Boolean. If set to true, the associated Document
+     *    object will be returned in
+     *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+     * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+     *    corresponding to each returned Document will be set in
+     *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+     *    The given 'score' indicates the probability of a Document conversion
+     *    given the user's context and history.
+     * * `strictFiltering`: Boolean. True by default. If set to false, the service
+     *    will return generic (unfiltered) popular Documents instead of empty if
+     *    your filter blocks all recommendation results.
+     * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+     *    it needs to be one of:
+     *     *  `no-diversity`
+     *     *  `low-diversity`
+     *     *  `medium-diversity`
+     *     *  `high-diversity`
+     *     *  `auto-diversity`
+     *    This gives request-level control and adjusts recommendation results
+     *    based on Document category.
+     * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+     *    the `filter` field is interpreted according to the new,
+     *    attribute-based syntax.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional domain specific parameters for the recommendations.
+     *
+     * Allowed values:
+     *
+     * * `returnDocument`: Boolean. If set to true, the associated Document
+     *    object will be returned in
+     *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+     * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+     *    corresponding to each returned Document will be set in
+     *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+     *    The given 'score' indicates the probability of a Document conversion
+     *    given the user's context and history.
+     * * `strictFiltering`: Boolean. True by default. If set to false, the service
+     *    will return generic (unfiltered) popular Documents instead of empty if
+     *    your filter blocks all recommendation results.
+     * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+     *    it needs to be one of:
+     *     *  `no-diversity`
+     *     *  `low-diversity`
+     *     *  `medium-diversity`
+     *     *  `high-diversity`
+     *     *  `auto-diversity`
+     *    This gives request-level control and adjusts recommendation results
+     *    based on Document category.
+     * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+     *    the `filter` field is interpreted according to the new,
+     *    attribute-based syntax.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + @java.lang.Override + public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearParams() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableParams().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional domain specific parameters for the recommendations.
+     *
+     * Allowed values:
+     *
+     * * `returnDocument`: Boolean. If set to true, the associated Document
+     *    object will be returned in
+     *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+     * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+     *    corresponding to each returned Document will be set in
+     *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+     *    The given 'score' indicates the probability of a Document conversion
+     *    given the user's context and history.
+     * * `strictFiltering`: Boolean. True by default. If set to false, the service
+     *    will return generic (unfiltered) popular Documents instead of empty if
+     *    your filter blocks all recommendation results.
+     * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+     *    it needs to be one of:
+     *     *  `no-diversity`
+     *     *  `low-diversity`
+     *     *  `medium-diversity`
+     *     *  `high-diversity`
+     *     *  `auto-diversity`
+     *    This gives request-level control and adjusts recommendation results
+     *    based on Document category.
+     * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+     *    the `filter` field is interpreted according to the new,
+     *    attribute-based syntax.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + public Builder removeParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableParams().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableParams() { + bitField0_ |= 0x00000020; + return internalGetMutableParams().getMutableMap(); + } + /** + * + * + *
+     * Additional domain specific parameters for the recommendations.
+     *
+     * Allowed values:
+     *
+     * * `returnDocument`: Boolean. If set to true, the associated Document
+     *    object will be returned in
+     *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+     * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+     *    corresponding to each returned Document will be set in
+     *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+     *    The given 'score' indicates the probability of a Document conversion
+     *    given the user's context and history.
+     * * `strictFiltering`: Boolean. True by default. If set to false, the service
+     *    will return generic (unfiltered) popular Documents instead of empty if
+     *    your filter blocks all recommendation results.
+     * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+     *    it needs to be one of:
+     *     *  `no-diversity`
+     *     *  `low-diversity`
+     *     *  `medium-diversity`
+     *     *  `high-diversity`
+     *     *  `auto-diversity`
+     *    This gives request-level control and adjusts recommendation results
+     *    based on Document category.
+     * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+     *    the `filter` field is interpreted according to the new,
+     *    attribute-based syntax.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + public Builder putParams(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableParams().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + * + * + *
+     * Additional domain specific parameters for the recommendations.
+     *
+     * Allowed values:
+     *
+     * * `returnDocument`: Boolean. If set to true, the associated Document
+     *    object will be returned in
+     *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+     * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+     *    corresponding to each returned Document will be set in
+     *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+     *    The given 'score' indicates the probability of a Document conversion
+     *    given the user's context and history.
+     * * `strictFiltering`: Boolean. True by default. If set to false, the service
+     *    will return generic (unfiltered) popular Documents instead of empty if
+     *    your filter blocks all recommendation results.
+     * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+     *    it needs to be one of:
+     *     *  `no-diversity`
+     *     *  `low-diversity`
+     *     *  `medium-diversity`
+     *     *  `high-diversity`
+     *     *  `auto-diversity`
+     *    This gives request-level control and adjusts recommendation results
+     *    based on Document category.
+     * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+     *    the `filter` field is interpreted according to the new,
+     *    attribute-based syntax.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + public Builder putAllParams(java.util.Map values) { + internalGetMutableParams().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField + internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableUserLabels() { + if (userLabels_ == null) { + userLabels_ = + com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + if (!userLabels_.isMutable()) { + userLabels_ = userLabels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 8; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearUserLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableUserLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 8; + */ + public Builder removeUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableUserLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableUserLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableUserLabels().getMutableMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 8; + */ + public Builder putUserLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableUserLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 8; + */ + public Builder putAllUserLabels(java.util.Map values) { + internalGetMutableUserLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecommendRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecommendRequest) + private static final com.google.cloud.discoveryengine.v1alpha.RecommendRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RecommendRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecommendRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendRequestOrBuilder.java new file mode 100644 index 000000000000..b4173a69efad --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendRequestOrBuilder.java @@ -0,0 +1,583 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/recommendation_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface RecommendRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecommendRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of the format:
+   * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+   *
+   * Before you can request recommendations from your model, you must create at
+   * least one serving config  for it.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + java.lang.String getServingConfig(); + /** + * + * + *
+   * Required. Full resource name of the format:
+   * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
+   *
+   * Before you can request recommendations from your model, you must create at
+   * least one serving config  for it.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + com.google.protobuf.ByteString getServingConfigBytes(); + + /** + * + * + *
+   * Required. Context about the user, what they are looking at and what action
+   * they took to trigger the Recommend request. Note that this user event
+   * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+   * write request is required for event logging.
+   *
+   * Don't set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * or
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * to the same fixed ID for different users. If you are trying to receive
+   * non-personalized recommendations (not recommended; this can negatively
+   * impact model performance), instead set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * to a random unique ID and leave
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * unset.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userEvent field is set. + */ + boolean hasUserEvent(); + /** + * + * + *
+   * Required. Context about the user, what they are looking at and what action
+   * they took to trigger the Recommend request. Note that this user event
+   * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+   * write request is required for event logging.
+   *
+   * Don't set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * or
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * to the same fixed ID for different users. If you are trying to receive
+   * non-personalized recommendations (not recommended; this can negatively
+   * impact model performance), instead set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * to a random unique ID and leave
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * unset.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userEvent. + */ + com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvent(); + /** + * + * + *
+   * Required. Context about the user, what they are looking at and what action
+   * they took to trigger the Recommend request. Note that this user event
+   * detail won't be ingested to userEvent logs. Thus, a separate userEvent
+   * write request is required for event logging.
+   *
+   * Don't set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * or
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * to the same fixed ID for different users. If you are trying to receive
+   * non-personalized recommendations (not recommended; this can negatively
+   * impact model performance), instead set
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * to a random unique ID and leave
+   * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id]
+   * unset.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventOrBuilder(); + + /** + * + * + *
+   * Maximum number of results to return. Set this property
+   * to the number of recommendation results needed. If zero, the service will
+   * choose a reasonable default. The maximum allowed value is 100. Values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Filter for restricting recommendation results with a length limit of 5,000
+   * characters. Currently, only filter expressions on the `filter_tags`
+   * attribute is supported.
+   *
+   *
+   * Examples:
+   *
+   *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+   *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+   *
+   * If `attributeFilteringSyntax` is set to true under the `params` field, then
+   * attribute-based expressions are expected instead of the above described
+   * tag-based syntax. Examples:
+   *
+   *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+   *  * (available: true) AND
+   *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+   *
+   * If your filter blocks all results, the API will return generic
+   * (unfiltered) popular Documents. If you only want results strictly matching
+   * the filters, set `strictFiltering` to True in
+   * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+   * to receive empty results instead.
+   *
+   * Note that the API will never return
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+   * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter for restricting recommendation results with a length limit of 5,000
+   * characters. Currently, only filter expressions on the `filter_tags`
+   * attribute is supported.
+   *
+   *
+   * Examples:
+   *
+   *  * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
+   *  * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
+   *
+   * If `attributeFilteringSyntax` is set to true under the `params` field, then
+   * attribute-based expressions are expected instead of the above described
+   * tag-based syntax. Examples:
+   *
+   *  * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
+   *  * (available: true) AND
+   *    (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
+   *
+   * If your filter blocks all results, the API will return generic
+   * (unfiltered) popular Documents. If you only want results strictly matching
+   * the filters, set `strictFiltering` to True in
+   * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]
+   * to receive empty results instead.
+   *
+   * Note that the API will never return
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s with
+   * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Use validate only mode for this recommendation query. If set to true, a
+   * fake model will be used that returns arbitrary Document IDs.
+   * Note that the validate only mode should only be used for testing the API,
+   * or if the model is not ready.
+   * 
+ * + * bool validate_only = 5; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + int getParamsCount(); + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + boolean containsParams(java.lang.String key); + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getParams(); + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + java.util.Map getParamsMap(); + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + /* nullable */ + com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + /** + * + * + *
+   * Additional domain specific parameters for the recommendations.
+   *
+   * Allowed values:
+   *
+   * * `returnDocument`: Boolean. If set to true, the associated Document
+   *    object will be returned in
+   *    [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document].
+   * * `returnScore`: Boolean. If set to true, the recommendation 'score'
+   *    corresponding to each returned Document will be set in
+   *    [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata].
+   *    The given 'score' indicates the probability of a Document conversion
+   *    given the user's context and history.
+   * * `strictFiltering`: Boolean. True by default. If set to false, the service
+   *    will return generic (unfiltered) popular Documents instead of empty if
+   *    your filter blocks all recommendation results.
+   * * `diversityLevel`: String. Default empty. If set to be non-empty, then
+   *    it needs to be one of:
+   *     *  `no-diversity`
+   *     *  `low-diversity`
+   *     *  `medium-diversity`
+   *     *  `high-diversity`
+   *     *  `auto-diversity`
+   *    This gives request-level control and adjusts recommendation results
+   *    based on Document category.
+   * * `attributeFilteringSyntax`: Boolean. False by default. If set to true,
+   *    the `filter` field is interpreted according to the new,
+   *    attribute-based syntax.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 6; + */ + com.google.protobuf.Value getParamsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + int getUserLabelsCount(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + boolean containsUserLabels(java.lang.String key); + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getUserLabels(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + java.util.Map getUserLabelsMap(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + /* nullable */ + java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 8; + */ + java.lang.String getUserLabelsOrThrow(java.lang.String key); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendResponse.java new file mode 100644 index 000000000000..2b4acbf5a94f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendResponse.java @@ -0,0 +1,3138 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/recommendation_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for Recommend method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecommendResponse} + */ +public final class RecommendResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecommendResponse) + RecommendResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecommendResponse.newBuilder() to construct. + private RecommendResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecommendResponse() { + results_ = java.util.Collections.emptyList(); + attributionToken_ = ""; + missingIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecommendResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.class, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.Builder.class); + } + + public interface RecommendationResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Resource ID of the recommended Document.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Resource ID of the recommended Document.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * Set if `returnDocument` is set to true in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return Whether the document field is set. + */ + boolean hasDocument(); + /** + * + * + *
+     * Set if `returnDocument` is set to true in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return The document. + */ + com.google.cloud.discoveryengine.v1alpha.Document getDocument(); + /** + * + * + *
+     * Set if `returnDocument` is set to true in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder(); + + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + int getMetadataCount(); + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + boolean containsMetadata(java.lang.String key); + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetadata(); + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + java.util.Map getMetadataMap(); + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + /* nullable */ + com.google.protobuf.Value getMetadataOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + com.google.protobuf.Value getMetadataOrThrow(java.lang.String key); + } + /** + * + * + *
+   * RecommendationResult represents a generic recommendation result with
+   * associated metadata.
+   * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult} + */ + public static final class RecommendationResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) + RecommendationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecommendationResult.newBuilder() to construct. + private RecommendationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecommendationResult() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecommendationResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.class, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+     * Resource ID of the recommended Document.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * Resource ID of the recommended Document.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.Document document_; + /** + * + * + *
+     * Set if `returnDocument` is set to true in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return Whether the document field is set. + */ + @java.lang.Override + public boolean hasDocument() { + return document_ != null; + } + /** + * + * + *
+     * Set if `returnDocument` is set to true in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return The document. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + /** + * + * + *
+     * Set if `returnDocument` is set to true in
+     * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getMetadataOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional Document metadata / annotations.
+     *
+     * Possible values:
+     *
+     * * `score`: Recommendation score in double value. Is set if
+     *   `returnScore` is set to true in
+     *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+     * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public com.google.protobuf.Value getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (document_ != null) { + output.writeMessage(2, getDocument()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (document_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDocument()); + } + for (java.util.Map.Entry entry : + internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry metadata__ = + MetadataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metadata__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult other = + (com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) obj; + + if (!getId().equals(other.getId())) return false; + if (hasDocument() != other.hasDocument()) return false; + if (hasDocument()) { + if (!getDocument().equals(other.getDocument())) return false; + } + if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasDocument()) { + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * RecommendationResult represents a generic recommendation result with
+     * associated metadata.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .class, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + internalGetMutableMetadata().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + build() { + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult result = + new com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.document_ = documentBuilder_ == null ? document_ : documentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDocument()) { + mergeDocument(other.getDocument()); + } + internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDocumentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry + metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadata() + .getMutableMap() + .put(metadata__.getKey(), metadata__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Resource ID of the recommended Document.
+       * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Resource ID of the recommended Document.
+       * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Resource ID of the recommended Document.
+       * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Resource ID of the recommended Document.
+       * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Resource ID of the recommended Document.
+       * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.Document document_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + documentBuilder_; + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return Whether the document field is set. + */ + public boolean hasDocument() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return The document. + */ + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + if (documentBuilder_ == null) { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } else { + return documentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder setDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + } else { + documentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder setDocument( + com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentBuilder_ == null) { + document_ = builderForValue.build(); + } else { + documentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder mergeDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && document_ != null + && document_ + != com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()) { + getDocumentBuilder().mergeFrom(value); + } else { + document_ = value; + } + } else { + documentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder clearDocument() { + bitField0_ = (bitField0_ & ~0x00000002); + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder getDocumentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDocumentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + if (documentBuilder_ != null) { + return documentBuilder_.getMessageOrBuilder(); + } else { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + } + /** + * + * + *
+       * Set if `returnDocument` is set to true in
+       * [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + getDocumentFieldBuilder() { + if (documentBuilder_ == null) { + documentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder>( + getDocument(), getParentForChildren(), isClean()); + document_ = null; + } + return documentBuilder_; + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField + internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + private com.google.protobuf.MapField + internalGetMutableMetadata() { + if (metadata_ == null) { + metadata_ = + com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+       * Additional Document metadata / annotations.
+       *
+       * Possible values:
+       *
+       * * `score`: Recommendation score in double value. Is set if
+       *   `returnScore` is set to true in
+       *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+       * Additional Document metadata / annotations.
+       *
+       * Possible values:
+       *
+       * * `score`: Recommendation score in double value. Is set if
+       *   `returnScore` is set to true in
+       *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+       * Additional Document metadata / annotations.
+       *
+       * Possible values:
+       *
+       * * `score`: Recommendation score in double value. Is set if
+       *   `returnScore` is set to true in
+       *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getMetadataOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Additional Document metadata / annotations.
+       *
+       * Possible values:
+       *
+       * * `score`: Recommendation score in double value. Is set if
+       *   `returnScore` is set to true in
+       *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + @java.lang.Override + public com.google.protobuf.Value getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableMetadata().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Additional Document metadata / annotations.
+       *
+       * Possible values:
+       *
+       * * `score`: Recommendation score in double value. Is set if
+       *   `returnScore` is set to true in
+       *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + public Builder removeMetadata(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableMetadata().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetadata() { + bitField0_ |= 0x00000004; + return internalGetMutableMetadata().getMutableMap(); + } + /** + * + * + *
+       * Additional Document metadata / annotations.
+       *
+       * Possible values:
+       *
+       * * `score`: Recommendation score in double value. Is set if
+       *   `returnScore` is set to true in
+       *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + public Builder putMetadata(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableMetadata().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+       * Additional Document metadata / annotations.
+       *
+       * Possible values:
+       *
+       * * `score`: Recommendation score in double value. Is set if
+       *   `returnScore` is set to true in
+       *   [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params].
+       * 
+ * + * map<string, .google.protobuf.Value> metadata = 3; + */ + public Builder putAllMetadata( + java.util.Map values) { + internalGetMutableMetadata().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult) + private static final com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecommendationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RESULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult> + results_; + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult> + getResultsList() { + return results_; + } + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResultOrBuilder> + getResultsOrBuilderList() { + return results_; + } + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult getResults( + int index) { + return results_.get(index); + } + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResultOrBuilder + getResultsOrBuilder(int index) { + return results_.get(index); + } + + public static final int ATTRIBUTION_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributionToken_ = ""; + /** + * + * + *
+   * A unique attribution token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this recommendation, which enables accurate attribution of
+   * recommendation model performance.
+   * 
+ * + * string attribution_token = 2; + * + * @return The attributionToken. + */ + @java.lang.Override + public java.lang.String getAttributionToken() { + java.lang.Object ref = attributionToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributionToken_ = s; + return s; + } + } + /** + * + * + *
+   * A unique attribution token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this recommendation, which enables accurate attribution of
+   * recommendation model performance.
+   * 
+ * + * string attribution_token = 2; + * + * @return The bytes for attributionToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributionTokenBytes() { + java.lang.Object ref = attributionToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MISSING_IDS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList missingIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @return A list containing the missingIds. + */ + public com.google.protobuf.ProtocolStringList getMissingIdsList() { + return missingIds_; + } + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @return The count of missingIds. + */ + public int getMissingIdsCount() { + return missingIds_.size(); + } + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @param index The index of the element to return. + * @return The missingIds at the given index. + */ + public java.lang.String getMissingIds(int index) { + return missingIds_.get(index); + } + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the missingIds at the given index. + */ + public com.google.protobuf.ByteString getMissingIdsBytes(int index) { + return missingIds_.getByteString(index); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + /** + * + * + *
+   * True if
+   * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1alpha.RecommendRequest.validate_only]
+   * was set.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributionToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributionToken_); + } + for (int i = 0; i < missingIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, missingIds_.getRaw(i)); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributionToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributionToken_); + } + { + int dataSize = 0; + for (int i = 0; i < missingIds_.size(); i++) { + dataSize += computeStringSizeNoTag(missingIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getMissingIdsList().size(); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RecommendResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecommendResponse other = + (com.google.cloud.discoveryengine.v1alpha.RecommendResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) return false; + if (!getAttributionToken().equals(other.getAttributionToken())) return false; + if (!getMissingIdsList().equals(other.getMissingIdsList())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (37 * hash) + ATTRIBUTION_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAttributionToken().hashCode(); + if (getMissingIdsCount() > 0) { + hash = (37 * hash) + MISSING_IDS_FIELD_NUMBER; + hash = (53 * hash) + getMissingIdsList().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for Recommend method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecommendResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecommendResponse) + com.google.cloud.discoveryengine.v1alpha.RecommendResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.class, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RecommendResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + } else { + results_ = null; + resultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + attributionToken_ = ""; + missingIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.RecommendationServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecommendResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse build() { + com.google.cloud.discoveryengine.v1alpha.RecommendResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecommendResponse result = + new com.google.cloud.discoveryengine.v1alpha.RecommendResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse result) { + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.RecommendResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributionToken_ = attributionToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + missingIds_.makeImmutable(); + result.missingIds_ = missingIds_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RecommendResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RecommendResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RecommendResponse other) { + if (other == com.google.cloud.discoveryengine.v1alpha.RecommendResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (!other.getAttributionToken().isEmpty()) { + attributionToken_ = other.attributionToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.missingIds_.isEmpty()) { + if (missingIds_.isEmpty()) { + missingIds_ = other.missingIds_; + bitField0_ |= 0x00000004; + } else { + ensureMissingIdsIsMutable(); + missingIds_.addAll(other.missingIds_); + } + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + attributionToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMissingIdsIsMutable(); + missingIds_.add(s); + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult> + results_ = java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult>( + results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult> + getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder setResults( + int index, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder setResults( + int index, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder addResults( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder addResults( + int index, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder addResults( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder addResults( + int index, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder addAllResults( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult> + values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder + getResultsBuilder(int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResultOrBuilder + getResultsOrBuilder(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResultOrBuilder> + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder + addResultsBuilder() { + return getResultsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder + addResultsBuilder(int index) { + return getResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of recommended Documents. The order represents the ranking (from the
+     * most relevant Document to the least).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder> + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.Builder, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult + .Builder, + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.lang.Object attributionToken_ = ""; + /** + * + * + *
+     * A unique attribution token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this recommendation, which enables accurate attribution of
+     * recommendation model performance.
+     * 
+ * + * string attribution_token = 2; + * + * @return The attributionToken. + */ + public java.lang.String getAttributionToken() { + java.lang.Object ref = attributionToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributionToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique attribution token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this recommendation, which enables accurate attribution of
+     * recommendation model performance.
+     * 
+ * + * string attribution_token = 2; + * + * @return The bytes for attributionToken. + */ + public com.google.protobuf.ByteString getAttributionTokenBytes() { + java.lang.Object ref = attributionToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique attribution token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this recommendation, which enables accurate attribution of
+     * recommendation model performance.
+     * 
+ * + * string attribution_token = 2; + * + * @param value The attributionToken to set. + * @return This builder for chaining. + */ + public Builder setAttributionToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributionToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique attribution token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this recommendation, which enables accurate attribution of
+     * recommendation model performance.
+     * 
+ * + * string attribution_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearAttributionToken() { + attributionToken_ = getDefaultInstance().getAttributionToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique attribution token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this recommendation, which enables accurate attribution of
+     * recommendation model performance.
+     * 
+ * + * string attribution_token = 2; + * + * @param value The bytes for attributionToken to set. + * @return This builder for chaining. + */ + public Builder setAttributionTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributionToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList missingIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMissingIdsIsMutable() { + if (!missingIds_.isModifiable()) { + missingIds_ = new com.google.protobuf.LazyStringArrayList(missingIds_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @return A list containing the missingIds. + */ + public com.google.protobuf.ProtocolStringList getMissingIdsList() { + missingIds_.makeImmutable(); + return missingIds_; + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @return The count of missingIds. + */ + public int getMissingIdsCount() { + return missingIds_.size(); + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @param index The index of the element to return. + * @return The missingIds at the given index. + */ + public java.lang.String getMissingIds(int index) { + return missingIds_.get(index); + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the missingIds at the given index. + */ + public com.google.protobuf.ByteString getMissingIdsBytes(int index) { + return missingIds_.getByteString(index); + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @param index The index to set the value at. + * @param value The missingIds to set. + * @return This builder for chaining. + */ + public Builder setMissingIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMissingIdsIsMutable(); + missingIds_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @param value The missingIds to add. + * @return This builder for chaining. + */ + public Builder addMissingIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMissingIdsIsMutable(); + missingIds_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @param values The missingIds to add. + * @return This builder for chaining. + */ + public Builder addAllMissingIds(java.lang.Iterable values) { + ensureMissingIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, missingIds_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @return This builder for chaining. + */ + public Builder clearMissingIds() { + missingIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * IDs of documents in the request that were missing from the default Branch
+     * associated with the requested ServingConfig.
+     * 
+ * + * repeated string missing_ids = 3; + * + * @param value The bytes of the missingIds to add. + * @return This builder for chaining. + */ + public Builder addMissingIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMissingIdsIsMutable(); + missingIds_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * True if
+     * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1alpha.RecommendRequest.validate_only]
+     * was set.
+     * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * True if
+     * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1alpha.RecommendRequest.validate_only]
+     * was set.
+     * 
+ * + * bool validate_only = 4; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * True if
+     * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1alpha.RecommendRequest.validate_only]
+     * was set.
+     * 
+ * + * bool validate_only = 4; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecommendResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecommendResponse) + private static final com.google.cloud.discoveryengine.v1alpha.RecommendResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RecommendResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecommendResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecommendResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecommendResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendResponseOrBuilder.java new file mode 100644 index 000000000000..aba8c9ca4a65 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendResponseOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/recommendation_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface RecommendResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecommendResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + java.util.List + getResultsList(); + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult getResults( + int index); + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + int getResultsCount(); + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecommendResponse + .RecommendationResultOrBuilder> + getResultsOrBuilderList(); + /** + * + * + *
+   * A list of recommended Documents. The order represents the ranking (from the
+   * most relevant Document to the least).
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult results = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResultOrBuilder + getResultsOrBuilder(int index); + + /** + * + * + *
+   * A unique attribution token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this recommendation, which enables accurate attribution of
+   * recommendation model performance.
+   * 
+ * + * string attribution_token = 2; + * + * @return The attributionToken. + */ + java.lang.String getAttributionToken(); + /** + * + * + *
+   * A unique attribution token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this recommendation, which enables accurate attribution of
+   * recommendation model performance.
+   * 
+ * + * string attribution_token = 2; + * + * @return The bytes for attributionToken. + */ + com.google.protobuf.ByteString getAttributionTokenBytes(); + + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @return A list containing the missingIds. + */ + java.util.List getMissingIdsList(); + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @return The count of missingIds. + */ + int getMissingIdsCount(); + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @param index The index of the element to return. + * @return The missingIds at the given index. + */ + java.lang.String getMissingIds(int index); + /** + * + * + *
+   * IDs of documents in the request that were missing from the default Branch
+   * associated with the requested ServingConfig.
+   * 
+ * + * repeated string missing_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the missingIds at the given index. + */ + com.google.protobuf.ByteString getMissingIdsBytes(int index); + + /** + * + * + *
+   * True if
+   * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1alpha.RecommendRequest.validate_only]
+   * was set.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceProto.java new file mode 100644 index 000000000000..f6d41866b4aa --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecommendationServiceProto.java @@ -0,0 +1,213 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/recommendation_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class RecommendationServiceProto { + private RecommendationServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_ParamsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_ParamsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_UserLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_UserLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_MetadataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_MetadataEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nAgoogle/cloud/discoveryengine/v1alpha/r" + + "ecommendation_service.proto\022$google.clou" + + "d.discoveryengine.v1alpha\032\034google/api/an" + + "notations.proto\032\027google/api/client.proto" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\0323google/cloud/disco" + + "veryengine/v1alpha/document.proto\0325googl" + + "e/cloud/discoveryengine/v1alpha/user_eve" + + "nt.proto\032\034google/protobuf/struct.proto\"\221" + + "\004\n\020RecommendRequest\022M\n\016serving_config\030\001 " + + "\001(\tB5\342A\001\002\372A.\n,discoveryengine.googleapis" + + ".com/ServingConfig\022I\n\nuser_event\030\002 \001(\0132/" + + ".google.cloud.discoveryengine.v1alpha.Us" + + "erEventB\004\342A\001\002\022\021\n\tpage_size\030\003 \001(\005\022\016\n\006filt" + + "er\030\004 \001(\t\022\025\n\rvalidate_only\030\005 \001(\010\022R\n\006param" + + "s\030\006 \003(\0132B.google.cloud.discoveryengine.v" + + "1alpha.RecommendRequest.ParamsEntry\022[\n\013u" + + "ser_labels\030\010 \003(\0132F.google.cloud.discover" + + "yengine.v1alpha.RecommendRequest.UserLab" + + "elsEntry\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022%\n\005" + + "value\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\032" + + "1\n\017UserLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001\"\327\003\n\021RecommendResponse\022]\n\007resu" + + "lts\030\001 \003(\0132L.google.cloud.discoveryengine" + + ".v1alpha.RecommendResponse.Recommendatio" + + "nResult\022\031\n\021attribution_token\030\002 \001(\t\022\023\n\013mi" + + "ssing_ids\030\003 \003(\t\022\025\n\rvalidate_only\030\004 \001(\010\032\233" + + "\002\n\024RecommendationResult\022\n\n\002id\030\001 \001(\t\022@\n\010d" + + "ocument\030\002 \001(\0132..google.cloud.discoveryen" + + "gine.v1alpha.Document\022l\n\010metadata\030\003 \003(\0132" + + "Z.google.cloud.discoveryengine.v1alpha.R" + + "ecommendResponse.RecommendationResult.Me" + + "tadataEntry\032G\n\rMetadataEntry\022\013\n\003key\030\001 \001(" + + "\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Value" + + ":\0028\0012\250\004\n\025RecommendationService\022\272\003\n\tRecom" + + "mend\0226.google.cloud.discoveryengine.v1al" + + "pha.RecommendRequest\0327.google.cloud.disc" + + "overyengine.v1alpha.RecommendResponse\"\273\002" + + "\202\323\344\223\002\264\002\"X/v1alpha/{serving_config=projec" + + "ts/*/locations/*/dataStores/*/servingCon" + + "figs/*}:recommend:\001*Zk\"f/v1alpha/{servin" + + "g_config=projects/*/locations/*/collecti" + + "ons/*/dataStores/*/servingConfigs/*}:rec" + + "ommend:\001*Zh\"c/v1alpha/{serving_config=pr" + + "ojects/*/locations/*/collections/*/engin" + + "es/*/servingConfigs/*}:recommend:\001*\032R\312A\036" + + "discoveryengine.googleapis.com\322A.https:/" + + "/www.googleapis.com/auth/cloud-platformB" + + "\246\002\n(com.google.cloud.discoveryengine.v1a" + + "lphaB\032RecommendationServiceProtoP\001ZRclou" + + "d.google.com/go/discoveryengine/apiv1alp" + + "ha/discoveryenginepb;discoveryenginepb\242\002" + + "\017DISCOVERYENGINE\252\002$Google.Cloud.Discover" + + "yEngine.V1Alpha\312\002$Google\\Cloud\\Discovery" + + "Engine\\V1alpha\352\002\'Google::Cloud::Discover" + + "yEngine::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.UserEventProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor, + new java.lang.String[] { + "ServingConfig", + "UserEvent", + "PageSize", + "Filter", + "ValidateOnly", + "Params", + "UserLabels", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_ParamsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_ParamsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_ParamsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_UserLabelsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_UserLabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecommendRequest_UserLabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_descriptor, + new java.lang.String[] { + "Results", "AttributionToken", "MissingIds", "ValidateOnly", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_descriptor, + new java.lang.String[] { + "Id", "Document", "Metadata", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_MetadataEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_MetadataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecommendResponse_RecommendationResult_MetadataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.UserEventProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisMetadata.java new file mode 100644 index 000000000000..143ea9158d5c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisMetadata.java @@ -0,0 +1,1664 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata related to the progress of the
+ * [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris]
+ * operation. This will be returned by the google.longrunning.Operation.metadata
+ * field.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata} + */ +public final class RecrawlUrisMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) + RecrawlUrisMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecrawlUrisMetadata.newBuilder() to construct. + private RecrawlUrisMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecrawlUrisMetadata() { + invalidUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecrawlUrisMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int INVALID_URIS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList invalidUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @return A list containing the invalidUris. + */ + public com.google.protobuf.ProtocolStringList getInvalidUrisList() { + return invalidUris_; + } + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @return The count of invalidUris. + */ + public int getInvalidUrisCount() { + return invalidUris_.size(); + } + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @param index The index of the element to return. + * @return The invalidUris at the given index. + */ + public java.lang.String getInvalidUris(int index) { + return invalidUris_.get(index); + } + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @param index The index of the value to return. + * @return The bytes of the invalidUris at the given index. + */ + public com.google.protobuf.ByteString getInvalidUrisBytes(int index) { + return invalidUris_.getByteString(index); + } + + public static final int VALID_URIS_COUNT_FIELD_NUMBER = 4; + private int validUrisCount_ = 0; + /** + * + * + *
+   * Total number of unique URIs in the request that are not in invalid_uris.
+   * 
+ * + * int32 valid_uris_count = 4; + * + * @return The validUrisCount. + */ + @java.lang.Override + public int getValidUrisCount() { + return validUrisCount_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 5; + private int successCount_ = 0; + /** + * + * + *
+   * Total number of URIs that have been crawled so far.
+   * 
+ * + * int32 success_count = 5; + * + * @return The successCount. + */ + @java.lang.Override + public int getSuccessCount() { + return successCount_; + } + + public static final int PENDING_COUNT_FIELD_NUMBER = 6; + private int pendingCount_ = 0; + /** + * + * + *
+   * Total number of URIs that have yet to be crawled.
+   * 
+ * + * int32 pending_count = 6; + * + * @return The pendingCount. + */ + @java.lang.Override + public int getPendingCount() { + return pendingCount_; + } + + public static final int QUOTA_EXCEEDED_COUNT_FIELD_NUMBER = 7; + private int quotaExceededCount_ = 0; + /** + * + * + *
+   * Total number of URIs that were rejected due to insufficient indexing
+   * resources.
+   * 
+ * + * int32 quota_exceeded_count = 7; + * + * @return The quotaExceededCount. + */ + @java.lang.Override + public int getQuotaExceededCount() { + return quotaExceededCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + for (int i = 0; i < invalidUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, invalidUris_.getRaw(i)); + } + if (validUrisCount_ != 0) { + output.writeInt32(4, validUrisCount_); + } + if (successCount_ != 0) { + output.writeInt32(5, successCount_); + } + if (pendingCount_ != 0) { + output.writeInt32(6, pendingCount_); + } + if (quotaExceededCount_ != 0) { + output.writeInt32(7, quotaExceededCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < invalidUris_.size(); i++) { + dataSize += computeStringSizeNoTag(invalidUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getInvalidUrisList().size(); + } + if (validUrisCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, validUrisCount_); + } + if (successCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, successCount_); + } + if (pendingCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, pendingCount_); + } + if (quotaExceededCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, quotaExceededCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata other = + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getInvalidUrisList().equals(other.getInvalidUrisList())) return false; + if (getValidUrisCount() != other.getValidUrisCount()) return false; + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getPendingCount() != other.getPendingCount()) return false; + if (getQuotaExceededCount() != other.getQuotaExceededCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getInvalidUrisCount() > 0) { + hash = (37 * hash) + INVALID_URIS_FIELD_NUMBER; + hash = (53 * hash) + getInvalidUrisList().hashCode(); + } + hash = (37 * hash) + VALID_URIS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getValidUrisCount(); + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSuccessCount(); + hash = (37 * hash) + PENDING_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPendingCount(); + hash = (37 * hash) + QUOTA_EXCEEDED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getQuotaExceededCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata related to the progress of the
+   * [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris]
+   * operation. This will be returned by the google.longrunning.Operation.metadata
+   * field.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + invalidUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + validUrisCount_ = 0; + successCount_ = 0; + pendingCount_ = 0; + quotaExceededCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata build() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata result = + new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + invalidUris_.makeImmutable(); + result.invalidUris_ = invalidUris_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validUrisCount_ = validUrisCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pendingCount_ = pendingCount_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.quotaExceededCount_ = quotaExceededCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.invalidUris_.isEmpty()) { + if (invalidUris_.isEmpty()) { + invalidUris_ = other.invalidUris_; + bitField0_ |= 0x00000004; + } else { + ensureInvalidUrisIsMutable(); + invalidUris_.addAll(other.invalidUris_); + } + onChanged(); + } + if (other.getValidUrisCount() != 0) { + setValidUrisCount(other.getValidUrisCount()); + } + if (other.getSuccessCount() != 0) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getPendingCount() != 0) { + setPendingCount(other.getPendingCount()); + } + if (other.getQuotaExceededCount() != 0) { + setQuotaExceededCount(other.getQuotaExceededCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInvalidUrisIsMutable(); + invalidUris_.add(s); + break; + } // case 26 + case 32: + { + validUrisCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + successCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + pendingCount_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + quotaExceededCount_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.LazyStringArrayList invalidUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureInvalidUrisIsMutable() { + if (!invalidUris_.isModifiable()) { + invalidUris_ = new com.google.protobuf.LazyStringArrayList(invalidUris_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @return A list containing the invalidUris. + */ + public com.google.protobuf.ProtocolStringList getInvalidUrisList() { + invalidUris_.makeImmutable(); + return invalidUris_; + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @return The count of invalidUris. + */ + public int getInvalidUrisCount() { + return invalidUris_.size(); + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @param index The index of the element to return. + * @return The invalidUris at the given index. + */ + public java.lang.String getInvalidUris(int index) { + return invalidUris_.get(index); + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @param index The index of the value to return. + * @return The bytes of the invalidUris at the given index. + */ + public com.google.protobuf.ByteString getInvalidUrisBytes(int index) { + return invalidUris_.getByteString(index); + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @param index The index to set the value at. + * @param value The invalidUris to set. + * @return This builder for chaining. + */ + public Builder setInvalidUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvalidUrisIsMutable(); + invalidUris_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @param value The invalidUris to add. + * @return This builder for chaining. + */ + public Builder addInvalidUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvalidUrisIsMutable(); + invalidUris_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @param values The invalidUris to add. + * @return This builder for chaining. + */ + public Builder addAllInvalidUris(java.lang.Iterable values) { + ensureInvalidUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, invalidUris_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @return This builder for chaining. + */ + public Builder clearInvalidUris() { + invalidUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique URIs in the request that don't match any TargetSite in the
+     * DataStore, only match TargetSites that haven't been fully indexed, or match
+     * a TargetSite with type EXCLUDE.
+     * 
+ * + * repeated string invalid_uris = 3; + * + * @param value The bytes of the invalidUris to add. + * @return This builder for chaining. + */ + public Builder addInvalidUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInvalidUrisIsMutable(); + invalidUris_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int validUrisCount_; + /** + * + * + *
+     * Total number of unique URIs in the request that are not in invalid_uris.
+     * 
+ * + * int32 valid_uris_count = 4; + * + * @return The validUrisCount. + */ + @java.lang.Override + public int getValidUrisCount() { + return validUrisCount_; + } + /** + * + * + *
+     * Total number of unique URIs in the request that are not in invalid_uris.
+     * 
+ * + * int32 valid_uris_count = 4; + * + * @param value The validUrisCount to set. + * @return This builder for chaining. + */ + public Builder setValidUrisCount(int value) { + + validUrisCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of unique URIs in the request that are not in invalid_uris.
+     * 
+ * + * int32 valid_uris_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearValidUrisCount() { + bitField0_ = (bitField0_ & ~0x00000008); + validUrisCount_ = 0; + onChanged(); + return this; + } + + private int successCount_; + /** + * + * + *
+     * Total number of URIs that have been crawled so far.
+     * 
+ * + * int32 success_count = 5; + * + * @return The successCount. + */ + @java.lang.Override + public int getSuccessCount() { + return successCount_; + } + /** + * + * + *
+     * Total number of URIs that have been crawled so far.
+     * 
+ * + * int32 success_count = 5; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(int value) { + + successCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of URIs that have been crawled so far.
+     * 
+ * + * int32 success_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000010); + successCount_ = 0; + onChanged(); + return this; + } + + private int pendingCount_; + /** + * + * + *
+     * Total number of URIs that have yet to be crawled.
+     * 
+ * + * int32 pending_count = 6; + * + * @return The pendingCount. + */ + @java.lang.Override + public int getPendingCount() { + return pendingCount_; + } + /** + * + * + *
+     * Total number of URIs that have yet to be crawled.
+     * 
+ * + * int32 pending_count = 6; + * + * @param value The pendingCount to set. + * @return This builder for chaining. + */ + public Builder setPendingCount(int value) { + + pendingCount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of URIs that have yet to be crawled.
+     * 
+ * + * int32 pending_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearPendingCount() { + bitField0_ = (bitField0_ & ~0x00000020); + pendingCount_ = 0; + onChanged(); + return this; + } + + private int quotaExceededCount_; + /** + * + * + *
+     * Total number of URIs that were rejected due to insufficient indexing
+     * resources.
+     * 
+ * + * int32 quota_exceeded_count = 7; + * + * @return The quotaExceededCount. + */ + @java.lang.Override + public int getQuotaExceededCount() { + return quotaExceededCount_; + } + /** + * + * + *
+     * Total number of URIs that were rejected due to insufficient indexing
+     * resources.
+     * 
+ * + * int32 quota_exceeded_count = 7; + * + * @param value The quotaExceededCount to set. + * @return This builder for chaining. + */ + public Builder setQuotaExceededCount(int value) { + + quotaExceededCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Total number of URIs that were rejected due to insufficient indexing
+     * resources.
+     * 
+ * + * int32 quota_exceeded_count = 7; + * + * @return This builder for chaining. + */ + public Builder clearQuotaExceededCount() { + bitField0_ = (bitField0_ & ~0x00000040); + quotaExceededCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecrawlUrisMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisMetadataOrBuilder.java new file mode 100644 index 000000000000..e968869994e1 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisMetadataOrBuilder.java @@ -0,0 +1,210 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface RecrawlUrisMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @return A list containing the invalidUris. + */ + java.util.List getInvalidUrisList(); + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @return The count of invalidUris. + */ + int getInvalidUrisCount(); + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @param index The index of the element to return. + * @return The invalidUris at the given index. + */ + java.lang.String getInvalidUris(int index); + /** + * + * + *
+   * Unique URIs in the request that don't match any TargetSite in the
+   * DataStore, only match TargetSites that haven't been fully indexed, or match
+   * a TargetSite with type EXCLUDE.
+   * 
+ * + * repeated string invalid_uris = 3; + * + * @param index The index of the value to return. + * @return The bytes of the invalidUris at the given index. + */ + com.google.protobuf.ByteString getInvalidUrisBytes(int index); + + /** + * + * + *
+   * Total number of unique URIs in the request that are not in invalid_uris.
+   * 
+ * + * int32 valid_uris_count = 4; + * + * @return The validUrisCount. + */ + int getValidUrisCount(); + + /** + * + * + *
+   * Total number of URIs that have been crawled so far.
+   * 
+ * + * int32 success_count = 5; + * + * @return The successCount. + */ + int getSuccessCount(); + + /** + * + * + *
+   * Total number of URIs that have yet to be crawled.
+   * 
+ * + * int32 pending_count = 6; + * + * @return The pendingCount. + */ + int getPendingCount(); + + /** + * + * + *
+   * Total number of URIs that were rejected due to insufficient indexing
+   * resources.
+   * 
+ * + * int32 quota_exceeded_count = 7; + * + * @return The quotaExceededCount. + */ + int getQuotaExceededCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisRequest.java new file mode 100644 index 000000000000..94970d18b7e2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisRequest.java @@ -0,0 +1,980 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest} + */ +public final class RecrawlUrisRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) + RecrawlUrisRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecrawlUrisRequest.newBuilder() to construct. + private RecrawlUrisRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecrawlUrisRequest() { + siteSearchEngine_ = ""; + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecrawlUrisRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.Builder.class); + } + + public static final int SITE_SEARCH_ENGINE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object siteSearchEngine_ = ""; + /** + * + * + *
+   * Required. Full resource name of the
+   * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+   * such as
+   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+   * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The siteSearchEngine. + */ + @java.lang.Override + public java.lang.String getSiteSearchEngine() { + java.lang.Object ref = siteSearchEngine_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteSearchEngine_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Full resource name of the
+   * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+   * such as
+   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+   * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for siteSearchEngine. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSiteSearchEngineBytes() { + java.lang.Object ref = siteSearchEngine_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + siteSearchEngine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URIS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteSearchEngine_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteSearchEngine_); + } + for (int i = 0; i < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uris_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteSearchEngine_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteSearchEngine_); + } + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest other = + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) obj; + + if (!getSiteSearchEngine().equals(other.getSiteSearchEngine())) return false; + if (!getUrisList().equals(other.getUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITE_SEARCH_ENGINE_FIELD_NUMBER; + hash = (53 * hash) + getSiteSearchEngine().hashCode(); + if (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + siteSearchEngine_ = ""; + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest build() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest result = + new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.siteSearchEngine_ = siteSearchEngine_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + uris_.makeImmutable(); + result.uris_ = uris_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest other) { + if (other == com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest.getDefaultInstance()) + return this; + if (!other.getSiteSearchEngine().isEmpty()) { + siteSearchEngine_ = other.siteSearchEngine_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ |= 0x00000002; + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + siteSearchEngine_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrisIsMutable(); + uris_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object siteSearchEngine_ = ""; + /** + * + * + *
+     * Required. Full resource name of the
+     * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+     * such as
+     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+     * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The siteSearchEngine. + */ + public java.lang.String getSiteSearchEngine() { + java.lang.Object ref = siteSearchEngine_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteSearchEngine_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the
+     * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+     * such as
+     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+     * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for siteSearchEngine. + */ + public com.google.protobuf.ByteString getSiteSearchEngineBytes() { + java.lang.Object ref = siteSearchEngine_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + siteSearchEngine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Full resource name of the
+     * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+     * such as
+     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+     * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The siteSearchEngine to set. + * @return This builder for chaining. + */ + public Builder setSiteSearchEngine(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + siteSearchEngine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the
+     * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+     * such as
+     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+     * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSiteSearchEngine() { + siteSearchEngine_ = getDefaultInstance().getSiteSearchEngine(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Full resource name of the
+     * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+     * such as
+     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+     * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for siteSearchEngine to set. + * @return This builder for chaining. + */ + public Builder setSiteSearchEngineBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + siteSearchEngine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUrisIsMutable() { + if (!uris_.isModifiable()) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + uris_.makeImmutable(); + return uris_; + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+     * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+     * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+     * `site_search_engine`.
+     * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) + private static final com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecrawlUrisRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisRequestOrBuilder.java new file mode 100644 index 000000000000..66602cfa015b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface RecrawlUrisRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Full resource name of the
+   * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+   * such as
+   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+   * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The siteSearchEngine. + */ + java.lang.String getSiteSearchEngine(); + /** + * + * + *
+   * Required. Full resource name of the
+   * [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine],
+   * such as
+   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
+   * 
+ * + * + * string site_search_engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for siteSearchEngine. + */ + com.google.protobuf.ByteString getSiteSearchEngineBytes(); + + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + int getUrisCount(); + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + * + * + *
+   * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
+   * an INVALID_ARGUMENT error is thrown. Each URI should match at least one
+   * [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in
+   * `site_search_engine`.
+   * 
+ * + * repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisResponse.java new file mode 100644 index 000000000000..f9812b906f5d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisResponse.java @@ -0,0 +1,3742 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for
+ * [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse} + */ +public final class RecrawlUrisResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) + RecrawlUrisResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RecrawlUrisResponse.newBuilder() to construct. + private RecrawlUrisResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RecrawlUrisResponse() { + failureSamples_ = java.util.Collections.emptyList(); + failedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RecrawlUrisResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.Builder.class); + } + + public interface FailureInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * URI that failed to be crawled.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * URI that failed to be crawled.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason> + getFailureReasonsList(); + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + getFailureReasons(int index); + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + int getFailureReasonsCount(); + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder> + getFailureReasonsOrBuilderList(); + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReasonOrBuilder + getFailureReasonsOrBuilder(int index); + } + /** + * + * + *
+   * Details about why a particular URI failed to be crawled. Each FailureInfo
+   * contains one FailureReason per CorpusType.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo} + */ + public static final class FailureInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) + FailureInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FailureInfo.newBuilder() to construct. + private FailureInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FailureInfo() { + uri_ = ""; + failureReasons_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FailureInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + .class); + } + + public interface FailureReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @return The enum numeric value on the wire for corpusType. + */ + int getCorpusTypeValue(); + /** + * + * + *
+       * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @return The corpusType. + */ + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .CorpusType + getCorpusType(); + + /** + * + * + *
+       * Reason why the URI was not crawled.
+       * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + java.lang.String getErrorMessage(); + /** + * + * + *
+       * Reason why the URI was not crawled.
+       * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + com.google.protobuf.ByteString getErrorMessageBytes(); + } + /** + * + * + *
+     * Details about why crawling failed for a particular CorpusType, e.g.
+     * DESKTOP and MOBILE crawling may fail for different reasons.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason} + */ + public static final class FailureReason extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason) + FailureReasonOrBuilder { + private static final long serialVersionUID = 0L; + // Use FailureReason.newBuilder() to construct. + private FailureReason(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FailureReason() { + corpusType_ = 0; + errorMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FailureReason(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.Builder.class); + } + + /** + * + * + *
+       * CorpusType for the failed crawling operation.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType} + */ + public enum CorpusType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Default value.
+         * 
+ * + * CORPUS_TYPE_UNSPECIFIED = 0; + */ + CORPUS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * Denotes a crawling attempt for the desktop version of a page.
+         * 
+ * + * DESKTOP = 1; + */ + DESKTOP(1), + /** + * + * + *
+         * Denotes a crawling attempt for the mobile version of a page.
+         * 
+ * + * MOBILE = 2; + */ + MOBILE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Default value.
+         * 
+ * + * CORPUS_TYPE_UNSPECIFIED = 0; + */ + public static final int CORPUS_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Denotes a crawling attempt for the desktop version of a page.
+         * 
+ * + * DESKTOP = 1; + */ + public static final int DESKTOP_VALUE = 1; + /** + * + * + *
+         * Denotes a crawling attempt for the mobile version of a page.
+         * 
+ * + * MOBILE = 2; + */ + public static final int MOBILE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CorpusType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CorpusType forNumber(int value) { + switch (value) { + case 0: + return CORPUS_TYPE_UNSPECIFIED; + case 1: + return DESKTOP; + case 2: + return MOBILE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CorpusType findValueByNumber(int number) { + return CorpusType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CorpusType[] VALUES = values(); + + public static CorpusType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CorpusType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType) + } + + public static final int CORPUS_TYPE_FIELD_NUMBER = 1; + private int corpusType_ = 0; + /** + * + * + *
+       * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @return The enum numeric value on the wire for corpusType. + */ + @java.lang.Override + public int getCorpusTypeValue() { + return corpusType_; + } + /** + * + * + *
+       * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @return The corpusType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .CorpusType + getCorpusType() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .CorpusType + result = + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.CorpusType.forNumber(corpusType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .CorpusType.UNRECOGNIZED + : result; + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorMessage_ = ""; + /** + * + * + *
+       * Reason why the URI was not crawled.
+       * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + @java.lang.Override + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } + } + /** + * + * + *
+       * Reason why the URI was not crawled.
+       * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (corpusType_ + != com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.CorpusType.CORPUS_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, corpusType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (corpusType_ + != com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.CorpusType.CORPUS_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, corpusType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + other = + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason) + obj; + + if (corpusType_ != other.corpusType_) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CORPUS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + corpusType_; + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Details about why crawling failed for a particular CorpusType, e.g.
+       * DESKTOP and MOBILE crawling may fail for different reasons.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason) + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + corpusType_ = 0; + errorMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + build() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + result = + new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.corpusType_ = corpusType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.errorMessage_ = errorMessage_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.getDefaultInstance()) return this; + if (other.corpusType_ != 0) { + setCorpusTypeValue(other.getCorpusTypeValue()); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + corpusType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + errorMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int corpusType_ = 0; + /** + * + * + *
+         * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @return The enum numeric value on the wire for corpusType. + */ + @java.lang.Override + public int getCorpusTypeValue() { + return corpusType_; + } + /** + * + * + *
+         * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @param value The enum numeric value on the wire for corpusType to set. + * @return This builder for chaining. + */ + public Builder setCorpusTypeValue(int value) { + corpusType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @return The corpusType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.CorpusType + getCorpusType() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .CorpusType + result = + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.CorpusType.forNumber(corpusType_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.CorpusType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @param value The corpusType to set. + * @return This builder for chaining. + */ + public Builder setCorpusType( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .CorpusType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + corpusType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.
+         * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason.CorpusType corpus_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearCorpusType() { + bitField0_ = (bitField0_ & ~0x00000001); + corpusType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object errorMessage_ = ""; + /** + * + * + *
+         * Reason why the URI was not crawled.
+         * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Reason why the URI was not crawled.
+         * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Reason why the URI was not crawled.
+         * 
+ * + * string error_message = 2; + * + * @param value The errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Reason why the URI was not crawled.
+         * 
+ * + * string error_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + errorMessage_ = getDefaultInstance().getErrorMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Reason why the URI was not crawled.
+         * 
+ * + * string error_message = 2; + * + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason) + private static final com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FailureReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI that failed to be crawled.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * URI that failed to be crawled.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAILURE_REASONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason> + failureReasons_; + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason> + getFailureReasonsList() { + return failureReasons_; + } + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder> + getFailureReasonsOrBuilderList() { + return failureReasons_; + } + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + @java.lang.Override + public int getFailureReasonsCount() { + return failureReasons_.size(); + } + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + getFailureReasons(int index) { + return failureReasons_.get(index); + } + /** + * + * + *
+     * List of failure reasons by corpus type (e.g. desktop, mobile).
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder + getFailureReasonsOrBuilder(int index) { + return failureReasons_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + for (int i = 0; i < failureReasons_.size(); i++) { + output.writeMessage(2, failureReasons_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (int i = 0; i < failureReasons_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, failureReasons_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo other = + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getFailureReasonsList().equals(other.getFailureReasonsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getFailureReasonsCount() > 0) { + hash = (37 * hash) + FAILURE_REASONS_FIELD_NUMBER; + hash = (53 * hash) + getFailureReasonsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Details about why a particular URI failed to be crawled. Each FailureInfo
+     * contains one FailureReason per CorpusType.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + if (failureReasonsBuilder_ == null) { + failureReasons_ = java.util.Collections.emptyList(); + } else { + failureReasons_ = null; + failureReasonsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo build() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo result = + new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo result) { + if (failureReasonsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + failureReasons_ = java.util.Collections.unmodifiableList(failureReasons_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.failureReasons_ = failureReasons_; + } else { + result.failureReasons_ = failureReasonsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (failureReasonsBuilder_ == null) { + if (!other.failureReasons_.isEmpty()) { + if (failureReasons_.isEmpty()) { + failureReasons_ = other.failureReasons_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFailureReasonsIsMutable(); + failureReasons_.addAll(other.failureReasons_); + } + onChanged(); + } + } else { + if (!other.failureReasons_.isEmpty()) { + if (failureReasonsBuilder_.isEmpty()) { + failureReasonsBuilder_.dispose(); + failureReasonsBuilder_ = null; + failureReasons_ = other.failureReasons_; + bitField0_ = (bitField0_ & ~0x00000002); + failureReasonsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFailureReasonsFieldBuilder() + : null; + } else { + failureReasonsBuilder_.addAllMessages(other.failureReasons_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason + m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse + .FailureInfo.FailureReason.parser(), + extensionRegistry); + if (failureReasonsBuilder_ == null) { + ensureFailureReasonsIsMutable(); + failureReasons_.add(m); + } else { + failureReasonsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * URI that failed to be crawled.
+       * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * URI that failed to be crawled.
+       * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * URI that failed to be crawled.
+       * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * URI that failed to be crawled.
+       * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * URI that failed to be crawled.
+       * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason> + failureReasons_ = java.util.Collections.emptyList(); + + private void ensureFailureReasonsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + failureReasons_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason>(failureReasons_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder> + failureReasonsBuilder_; + + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason> + getFailureReasonsList() { + if (failureReasonsBuilder_ == null) { + return java.util.Collections.unmodifiableList(failureReasons_); + } else { + return failureReasonsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public int getFailureReasonsCount() { + if (failureReasonsBuilder_ == null) { + return failureReasons_.size(); + } else { + return failureReasonsBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + getFailureReasons(int index) { + if (failureReasonsBuilder_ == null) { + return failureReasons_.get(index); + } else { + return failureReasonsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder setFailureReasons( + int index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + value) { + if (failureReasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailureReasonsIsMutable(); + failureReasons_.set(index, value); + onChanged(); + } else { + failureReasonsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder setFailureReasons( + int index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder + builderForValue) { + if (failureReasonsBuilder_ == null) { + ensureFailureReasonsIsMutable(); + failureReasons_.set(index, builderForValue.build()); + onChanged(); + } else { + failureReasonsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder addFailureReasons( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + value) { + if (failureReasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailureReasonsIsMutable(); + failureReasons_.add(value); + onChanged(); + } else { + failureReasonsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder addFailureReasons( + int index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + value) { + if (failureReasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailureReasonsIsMutable(); + failureReasons_.add(index, value); + onChanged(); + } else { + failureReasonsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder addFailureReasons( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder + builderForValue) { + if (failureReasonsBuilder_ == null) { + ensureFailureReasonsIsMutable(); + failureReasons_.add(builderForValue.build()); + onChanged(); + } else { + failureReasonsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder addFailureReasons( + int index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder + builderForValue) { + if (failureReasonsBuilder_ == null) { + ensureFailureReasonsIsMutable(); + failureReasons_.add(index, builderForValue.build()); + onChanged(); + } else { + failureReasonsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder addAllFailureReasons( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason> + values) { + if (failureReasonsBuilder_ == null) { + ensureFailureReasonsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, failureReasons_); + onChanged(); + } else { + failureReasonsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder clearFailureReasons() { + if (failureReasonsBuilder_ == null) { + failureReasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + failureReasonsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public Builder removeFailureReasons(int index) { + if (failureReasonsBuilder_ == null) { + ensureFailureReasonsIsMutable(); + failureReasons_.remove(index); + onChanged(); + } else { + failureReasonsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder + getFailureReasonsBuilder(int index) { + return getFailureReasonsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder + getFailureReasonsOrBuilder(int index) { + if (failureReasonsBuilder_ == null) { + return failureReasons_.get(index); + } else { + return failureReasonsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder> + getFailureReasonsOrBuilderList() { + if (failureReasonsBuilder_ != null) { + return failureReasonsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(failureReasons_); + } + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder + addFailureReasonsBuilder() { + return getFailureReasonsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.getDefaultInstance()); + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder + addFailureReasonsBuilder(int index) { + return getFailureReasonsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.getDefaultInstance()); + } + /** + * + * + *
+       * List of failure reasons by corpus type (e.g. desktop, mobile).
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason failure_reasons = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder> + getFailureReasonsBuilderList() { + return getFailureReasonsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.FailureReason + .Builder, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder> + getFailureReasonsFieldBuilder() { + if (failureReasonsBuilder_ == null) { + failureReasonsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReason.Builder, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .FailureReasonOrBuilder>( + failureReasons_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + failureReasons_ = null; + } + return failureReasonsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo) + private static final com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FailureInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FAILURE_SAMPLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + failureSamples_; + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + @java.lang.Override + public java.util.List + getFailureSamplesList() { + return failureSamples_; + } + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder> + getFailureSamplesOrBuilderList() { + return failureSamples_; + } + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + @java.lang.Override + public int getFailureSamplesCount() { + return failureSamples_.size(); + } + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo getFailureSamples( + int index) { + return failureSamples_.get(index); + } + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder + getFailureSamplesOrBuilder(int index) { + return failureSamples_.get(index); + } + + public static final int FAILED_URIS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList failedUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @return A list containing the failedUris. + */ + public com.google.protobuf.ProtocolStringList getFailedUrisList() { + return failedUris_; + } + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @return The count of failedUris. + */ + public int getFailedUrisCount() { + return failedUris_.size(); + } + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @param index The index of the element to return. + * @return The failedUris at the given index. + */ + public java.lang.String getFailedUris(int index) { + return failedUris_.get(index); + } + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the failedUris at the given index. + */ + public com.google.protobuf.ByteString getFailedUrisBytes(int index) { + return failedUris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < failureSamples_.size(); i++) { + output.writeMessage(1, failureSamples_.get(i)); + } + for (int i = 0; i < failedUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, failedUris_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < failureSamples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, failureSamples_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < failedUris_.size(); i++) { + dataSize += computeStringSizeNoTag(failedUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getFailedUrisList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse other = + (com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) obj; + + if (!getFailureSamplesList().equals(other.getFailureSamplesList())) return false; + if (!getFailedUrisList().equals(other.getFailedUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFailureSamplesCount() > 0) { + hash = (37 * hash) + FAILURE_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getFailureSamplesList().hashCode(); + } + if (getFailedUrisCount() > 0) { + hash = (37 * hash) + FAILED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getFailedUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.class, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (failureSamplesBuilder_ == null) { + failureSamples_ = java.util.Collections.emptyList(); + } else { + failureSamples_ = null; + failureSamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + failedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse build() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse result = + new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse result) { + if (failureSamplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + failureSamples_ = java.util.Collections.unmodifiableList(failureSamples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.failureSamples_ = failureSamples_; + } else { + result.failureSamples_ = failureSamplesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + failedUris_.makeImmutable(); + result.failedUris_ = failedUris_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.getDefaultInstance()) + return this; + if (failureSamplesBuilder_ == null) { + if (!other.failureSamples_.isEmpty()) { + if (failureSamples_.isEmpty()) { + failureSamples_ = other.failureSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFailureSamplesIsMutable(); + failureSamples_.addAll(other.failureSamples_); + } + onChanged(); + } + } else { + if (!other.failureSamples_.isEmpty()) { + if (failureSamplesBuilder_.isEmpty()) { + failureSamplesBuilder_.dispose(); + failureSamplesBuilder_ = null; + failureSamples_ = other.failureSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + failureSamplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFailureSamplesFieldBuilder() + : null; + } else { + failureSamplesBuilder_.addAllMessages(other.failureSamples_); + } + } + } + if (!other.failedUris_.isEmpty()) { + if (failedUris_.isEmpty()) { + failedUris_ = other.failedUris_; + bitField0_ |= 0x00000002; + } else { + ensureFailedUrisIsMutable(); + failedUris_.addAll(other.failedUris_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .parser(), + extensionRegistry); + if (failureSamplesBuilder_ == null) { + ensureFailureSamplesIsMutable(); + failureSamples_.add(m); + } else { + failureSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFailedUrisIsMutable(); + failedUris_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + failureSamples_ = java.util.Collections.emptyList(); + + private void ensureFailureSamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + failureSamples_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo>( + failureSamples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder> + failureSamplesBuilder_; + + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public java.util.List + getFailureSamplesList() { + if (failureSamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(failureSamples_); + } else { + return failureSamplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public int getFailureSamplesCount() { + if (failureSamplesBuilder_ == null) { + return failureSamples_.size(); + } else { + return failureSamplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + getFailureSamples(int index) { + if (failureSamplesBuilder_ == null) { + return failureSamples_.get(index); + } else { + return failureSamplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder setFailureSamples( + int index, com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo value) { + if (failureSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailureSamplesIsMutable(); + failureSamples_.set(index, value); + onChanged(); + } else { + failureSamplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder setFailureSamples( + int index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + builderForValue) { + if (failureSamplesBuilder_ == null) { + ensureFailureSamplesIsMutable(); + failureSamples_.set(index, builderForValue.build()); + onChanged(); + } else { + failureSamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder addFailureSamples( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo value) { + if (failureSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailureSamplesIsMutable(); + failureSamples_.add(value); + onChanged(); + } else { + failureSamplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder addFailureSamples( + int index, com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo value) { + if (failureSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailureSamplesIsMutable(); + failureSamples_.add(index, value); + onChanged(); + } else { + failureSamplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder addFailureSamples( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + builderForValue) { + if (failureSamplesBuilder_ == null) { + ensureFailureSamplesIsMutable(); + failureSamples_.add(builderForValue.build()); + onChanged(); + } else { + failureSamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder addFailureSamples( + int index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + builderForValue) { + if (failureSamplesBuilder_ == null) { + ensureFailureSamplesIsMutable(); + failureSamples_.add(index, builderForValue.build()); + onChanged(); + } else { + failureSamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder addAllFailureSamples( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo> + values) { + if (failureSamplesBuilder_ == null) { + ensureFailureSamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, failureSamples_); + onChanged(); + } else { + failureSamplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder clearFailureSamples() { + if (failureSamplesBuilder_ == null) { + failureSamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + failureSamplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public Builder removeFailureSamples(int index) { + if (failureSamplesBuilder_ == null) { + ensureFailureSamplesIsMutable(); + failureSamples_.remove(index); + onChanged(); + } else { + failureSamplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + getFailureSamplesBuilder(int index) { + return getFailureSamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder + getFailureSamplesOrBuilder(int index) { + if (failureSamplesBuilder_ == null) { + return failureSamples_.get(index); + } else { + return failureSamplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder> + getFailureSamplesOrBuilderList() { + if (failureSamplesBuilder_ != null) { + return failureSamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(failureSamples_); + } + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + addFailureSamplesBuilder() { + return getFailureSamplesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .getDefaultInstance()); + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder + addFailureSamplesBuilder(int index) { + return getFailureSamplesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo + .getDefaultInstance()); + } + /** + * + * + *
+     * Details for a sample of up to 10 `failed_uris`.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder> + getFailureSamplesBuilderList() { + return getFailureSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder> + getFailureSamplesFieldBuilder() { + if (failureSamplesBuilder_ == null) { + failureSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder>( + failureSamples_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + failureSamples_ = null; + } + return failureSamplesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList failedUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFailedUrisIsMutable() { + if (!failedUris_.isModifiable()) { + failedUris_ = new com.google.protobuf.LazyStringArrayList(failedUris_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @return A list containing the failedUris. + */ + public com.google.protobuf.ProtocolStringList getFailedUrisList() { + failedUris_.makeImmutable(); + return failedUris_; + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @return The count of failedUris. + */ + public int getFailedUrisCount() { + return failedUris_.size(); + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @param index The index of the element to return. + * @return The failedUris at the given index. + */ + public java.lang.String getFailedUris(int index) { + return failedUris_.get(index); + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the failedUris at the given index. + */ + public com.google.protobuf.ByteString getFailedUrisBytes(int index) { + return failedUris_.getByteString(index); + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @param index The index to set the value at. + * @param value The failedUris to set. + * @return This builder for chaining. + */ + public Builder setFailedUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedUrisIsMutable(); + failedUris_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @param value The failedUris to add. + * @return This builder for chaining. + */ + public Builder addFailedUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedUrisIsMutable(); + failedUris_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @param values The failedUris to add. + * @return This builder for chaining. + */ + public Builder addAllFailedUris(java.lang.Iterable values) { + ensureFailedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, failedUris_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @return This builder for chaining. + */ + public Builder clearFailedUris() { + failedUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * URIs that were not crawled before the LRO terminated.
+     * 
+ * + * repeated string failed_uris = 2; + * + * @param value The bytes of the failedUris to add. + * @return This builder for chaining. + */ + public Builder addFailedUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFailedUrisIsMutable(); + failedUris_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) + private static final com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecrawlUrisResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisResponseOrBuilder.java new file mode 100644 index 000000000000..2c0a0c2dde78 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/RecrawlUrisResponseOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface RecrawlUrisResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + java.util.List + getFailureSamplesList(); + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo getFailureSamples( + int index); + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + int getFailureSamplesCount(); + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder> + getFailureSamplesOrBuilderList(); + /** + * + * + *
+   * Details for a sample of up to 10 `failed_uris`.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfo failure_samples = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse.FailureInfoOrBuilder + getFailureSamplesOrBuilder(int index); + + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @return A list containing the failedUris. + */ + java.util.List getFailedUrisList(); + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @return The count of failedUris. + */ + int getFailedUrisCount(); + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @param index The index of the element to return. + * @return The failedUris at the given index. + */ + java.lang.String getFailedUris(int index); + /** + * + * + *
+   * URIs that were not crawled before the LRO terminated.
+   * 
+ * + * repeated string failed_uris = 2; + * + * @param index The index of the value to return. + * @return The bytes of the failedUris at the given index. + */ + com.google.protobuf.ByteString getFailedUrisBytes(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Reply.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Reply.java new file mode 100644 index 000000000000..1e55f9897da8 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Reply.java @@ -0,0 +1,2565 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Defines a reply message to user.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Reply} + */ +public final class Reply extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Reply) + ReplyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Reply.newBuilder() to construct. + private Reply(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Reply() { + reply_ = ""; + references_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Reply(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Reply.class, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder.class); + } + + @java.lang.Deprecated + public interface ReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Reply.Reference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * URI link reference.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * URI link reference.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * Anchor text.
+     * 
+ * + * string anchor_text = 2; + * + * @return The anchorText. + */ + java.lang.String getAnchorText(); + /** + * + * + *
+     * Anchor text.
+     * 
+ * + * string anchor_text = 2; + * + * @return The bytes for anchorText. + */ + com.google.protobuf.ByteString getAnchorTextBytes(); + + /** + * + * + *
+     * Anchor text start index.
+     * 
+ * + * int32 start = 3; + * + * @return The start. + */ + int getStart(); + + /** + * + * + *
+     * Anchor text end index.
+     * 
+ * + * int32 end = 4; + * + * @return The end. + */ + int getEnd(); + } + /** + * + * + *
+   * Defines reference in reply.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Reply.Reference} + */ + @java.lang.Deprecated + public static final class Reference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Reply.Reference) + ReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Reference.newBuilder() to construct. + private Reference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Reference() { + uri_ = ""; + anchorText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Reference(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.class, + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * URI link reference.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * URI link reference.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANCHOR_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object anchorText_ = ""; + /** + * + * + *
+     * Anchor text.
+     * 
+ * + * string anchor_text = 2; + * + * @return The anchorText. + */ + @java.lang.Override + public java.lang.String getAnchorText() { + java.lang.Object ref = anchorText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + anchorText_ = s; + return s; + } + } + /** + * + * + *
+     * Anchor text.
+     * 
+ * + * string anchor_text = 2; + * + * @return The bytes for anchorText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnchorTextBytes() { + java.lang.Object ref = anchorText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + anchorText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_FIELD_NUMBER = 3; + private int start_ = 0; + /** + * + * + *
+     * Anchor text start index.
+     * 
+ * + * int32 start = 3; + * + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + + public static final int END_FIELD_NUMBER = 4; + private int end_ = 0; + /** + * + * + *
+     * Anchor text end index.
+     * 
+ * + * int32 end = 4; + * + * @return The end. + */ + @java.lang.Override + public int getEnd() { + return end_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anchorText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, anchorText_); + } + if (start_ != 0) { + output.writeInt32(3, start_); + } + if (end_ != 0) { + output.writeInt32(4, end_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(anchorText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, anchorText_); + } + if (start_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, start_); + } + if (end_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, end_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Reply.Reference)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Reply.Reference other = + (com.google.cloud.discoveryengine.v1alpha.Reply.Reference) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getAnchorText().equals(other.getAnchorText())) return false; + if (getStart() != other.getStart()) return false; + if (getEnd() != other.getEnd()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + ANCHOR_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getAnchorText().hashCode(); + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart(); + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + getEnd(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.Reply.Reference prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Defines reference in reply.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Reply.Reference} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Reply.Reference) + com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.class, + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Reply.Reference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + anchorText_ = ""; + start_ = 0; + end_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_Reference_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Reply.Reference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference build() { + com.google.cloud.discoveryengine.v1alpha.Reply.Reference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Reply.Reference result = + new com.google.cloud.discoveryengine.v1alpha.Reply.Reference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Reply.Reference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.anchorText_ = anchorText_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.start_ = start_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.end_ = end_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Reply.Reference) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Reply.Reference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Reply.Reference other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Reply.Reference.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAnchorText().isEmpty()) { + anchorText_ = other.anchorText_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getStart() != 0) { + setStart(other.getStart()); + } + if (other.getEnd() != 0) { + setEnd(other.getEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + anchorText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + start_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + end_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * URI link reference.
+       * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * URI link reference.
+       * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * URI link reference.
+       * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * URI link reference.
+       * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * URI link reference.
+       * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object anchorText_ = ""; + /** + * + * + *
+       * Anchor text.
+       * 
+ * + * string anchor_text = 2; + * + * @return The anchorText. + */ + public java.lang.String getAnchorText() { + java.lang.Object ref = anchorText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + anchorText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Anchor text.
+       * 
+ * + * string anchor_text = 2; + * + * @return The bytes for anchorText. + */ + public com.google.protobuf.ByteString getAnchorTextBytes() { + java.lang.Object ref = anchorText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + anchorText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Anchor text.
+       * 
+ * + * string anchor_text = 2; + * + * @param value The anchorText to set. + * @return This builder for chaining. + */ + public Builder setAnchorText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + anchorText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Anchor text.
+       * 
+ * + * string anchor_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearAnchorText() { + anchorText_ = getDefaultInstance().getAnchorText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Anchor text.
+       * 
+ * + * string anchor_text = 2; + * + * @param value The bytes for anchorText to set. + * @return This builder for chaining. + */ + public Builder setAnchorTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + anchorText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int start_; + /** + * + * + *
+       * Anchor text start index.
+       * 
+ * + * int32 start = 3; + * + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + /** + * + * + *
+       * Anchor text start index.
+       * 
+ * + * int32 start = 3; + * + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(int value) { + + start_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Anchor text start index.
+       * 
+ * + * int32 start = 3; + * + * @return This builder for chaining. + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000004); + start_ = 0; + onChanged(); + return this; + } + + private int end_; + /** + * + * + *
+       * Anchor text end index.
+       * 
+ * + * int32 end = 4; + * + * @return The end. + */ + @java.lang.Override + public int getEnd() { + return end_; + } + /** + * + * + *
+       * Anchor text end index.
+       * 
+ * + * int32 end = 4; + * + * @param value The end to set. + * @return This builder for chaining. + */ + public Builder setEnd(int value) { + + end_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Anchor text end index.
+       * 
+ * + * int32 end = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000008); + end_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Reply.Reference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Reply.Reference) + private static final com.google.cloud.discoveryengine.v1alpha.Reply.Reference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Reply.Reference(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply.Reference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Reference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int REPLY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object reply_ = ""; + /** + * + * + *
+   * DEPRECATED: use `summary` instead.
+   * Text reply.
+   * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @return The reply. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getReply() { + java.lang.Object ref = reply_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reply_ = s; + return s; + } + } + /** + * + * + *
+   * DEPRECATED: use `summary` instead.
+   * Text reply.
+   * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @return The bytes for reply. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getReplyBytes() { + java.lang.Object ref = reply_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reply_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERENCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List references_; + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List + getReferencesList() { + return references_; + } + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List + getReferencesOrBuilderList() { + return references_; + } + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public int getReferencesCount() { + return references_.size(); + } + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference getReferences(int index) { + return references_.get(index); + } + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder getReferencesOrBuilder( + int index) { + return references_.get(index); + } + + public static final int SUMMARY_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary_; + /** + * + * + *
+   * Summary based on search results.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + * + * @return Whether the summary field is set. + */ + @java.lang.Override + public boolean hasSummary() { + return summary_ != null; + } + /** + * + * + *
+   * Summary based on search results.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + * + * @return The summary. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary getSummary() { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } + /** + * + * + *
+   * Summary based on search results.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder + getSummaryOrBuilder() { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reply_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, reply_); + } + for (int i = 0; i < references_.size(); i++) { + output.writeMessage(2, references_.get(i)); + } + if (summary_ != null) { + output.writeMessage(3, getSummary()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reply_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, reply_); + } + for (int i = 0; i < references_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, references_.get(i)); + } + if (summary_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSummary()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Reply)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Reply other = + (com.google.cloud.discoveryengine.v1alpha.Reply) obj; + + if (!getReply().equals(other.getReply())) return false; + if (!getReferencesList().equals(other.getReferencesList())) return false; + if (hasSummary() != other.hasSummary()) return false; + if (hasSummary()) { + if (!getSummary().equals(other.getSummary())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REPLY_FIELD_NUMBER; + hash = (53 * hash) + getReply().hashCode(); + if (getReferencesCount() > 0) { + hash = (37 * hash) + REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getReferencesList().hashCode(); + } + if (hasSummary()) { + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.Reply prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines a reply message to user.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Reply} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Reply) + com.google.cloud.discoveryengine.v1alpha.ReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Reply.class, + com.google.cloud.discoveryengine.v1alpha.Reply.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Reply.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + reply_ = ""; + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + } else { + references_ = null; + referencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_Reply_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply build() { + com.google.cloud.discoveryengine.v1alpha.Reply result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Reply result = + new com.google.cloud.discoveryengine.v1alpha.Reply(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.discoveryengine.v1alpha.Reply result) { + if (referencesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + references_ = java.util.Collections.unmodifiableList(references_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.references_ = references_; + } else { + result.references_ = referencesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Reply result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.reply_ = reply_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.summary_ = summaryBuilder_ == null ? summary_ : summaryBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Reply) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Reply) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Reply other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Reply.getDefaultInstance()) return this; + if (!other.getReply().isEmpty()) { + reply_ = other.reply_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (referencesBuilder_ == null) { + if (!other.references_.isEmpty()) { + if (references_.isEmpty()) { + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureReferencesIsMutable(); + references_.addAll(other.references_); + } + onChanged(); + } + } else { + if (!other.references_.isEmpty()) { + if (referencesBuilder_.isEmpty()) { + referencesBuilder_.dispose(); + referencesBuilder_ = null; + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000002); + referencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReferencesFieldBuilder() + : null; + } else { + referencesBuilder_.addAllMessages(other.references_); + } + } + } + if (other.hasSummary()) { + mergeSummary(other.getSummary()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + reply_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.discoveryengine.v1alpha.Reply.Reference m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.parser(), + extensionRegistry); + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(m); + } else { + referencesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object reply_ = ""; + /** + * + * + *
+     * DEPRECATED: use `summary` instead.
+     * Text reply.
+     * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @return The reply. + */ + @java.lang.Deprecated + public java.lang.String getReply() { + java.lang.Object ref = reply_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reply_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * DEPRECATED: use `summary` instead.
+     * Text reply.
+     * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @return The bytes for reply. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getReplyBytes() { + java.lang.Object ref = reply_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reply_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * DEPRECATED: use `summary` instead.
+     * Text reply.
+     * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @param value The reply to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setReply(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reply_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * DEPRECATED: use `summary` instead.
+     * Text reply.
+     * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearReply() { + reply_ = getDefaultInstance().getReply(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * DEPRECATED: use `summary` instead.
+     * Text reply.
+     * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @param value The bytes for reply to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setReplyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reply_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List references_ = + java.util.Collections.emptyList(); + + private void ensureReferencesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + references_ = + new java.util.ArrayList( + references_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply.Reference, + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder, + com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder> + referencesBuilder_; + + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List + getReferencesList() { + if (referencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(references_); + } else { + return referencesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public int getReferencesCount() { + if (referencesBuilder_ == null) { + return references_.size(); + } else { + return referencesBuilder_.getCount(); + } + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference getReferences(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setReferences( + int index, com.google.cloud.discoveryengine.v1alpha.Reply.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.set(index, value); + onChanged(); + } else { + referencesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setReferences( + int index, + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.set(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addReferences(com.google.cloud.discoveryengine.v1alpha.Reply.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(value); + onChanged(); + } else { + referencesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addReferences( + int index, com.google.cloud.discoveryengine.v1alpha.Reply.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(index, value); + onChanged(); + } else { + referencesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addReferences( + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addReferences( + int index, + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addAllReferences( + java.lang.Iterable + values) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, references_); + onChanged(); + } else { + referencesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearReferences() { + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + referencesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder removeReferences(int index) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.remove(index); + onChanged(); + } else { + referencesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder getReferencesBuilder( + int index) { + return getReferencesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder getReferencesOrBuilder( + int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder> + getReferencesOrBuilderList() { + if (referencesBuilder_ != null) { + return referencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(references_); + } + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder addReferencesBuilder() { + return getReferencesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.getDefaultInstance()); + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder addReferencesBuilder( + int index) { + return getReferencesFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.Reply.Reference.getDefaultInstance()); + } + /** + * + * + *
+     * References in the reply.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List + getReferencesBuilderList() { + return getReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply.Reference, + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder, + com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder> + getReferencesFieldBuilder() { + if (referencesBuilder_ == null) { + referencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Reply.Reference, + com.google.cloud.discoveryengine.v1alpha.Reply.Reference.Builder, + com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder>( + references_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + references_ = null; + } + return referencesBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder> + summaryBuilder_; + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + * + * @return Whether the summary field is set. + */ + public boolean hasSummary() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + * + * @return The summary. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary getSummary() { + if (summaryBuilder_ == null) { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } else { + return summaryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + public Builder setSummary( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary value) { + if (summaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summary_ = value; + } else { + summaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + public Builder setSummary( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder builderForValue) { + if (summaryBuilder_ == null) { + summary_ = builderForValue.build(); + } else { + summaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + public Builder mergeSummary( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary value) { + if (summaryBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && summary_ != null + && summary_ + != com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .getDefaultInstance()) { + getSummaryBuilder().mergeFrom(value); + } else { + summary_ = value; + } + } else { + summaryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + public Builder clearSummary() { + bitField0_ = (bitField0_ & ~0x00000004); + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder + getSummaryBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder + getSummaryOrBuilder() { + if (summaryBuilder_ != null) { + return summaryBuilder_.getMessageOrBuilder(); + } else { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } + } + /** + * + * + *
+     * Summary based on search results.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder> + getSummaryFieldBuilder() { + if (summaryBuilder_ == null) { + summaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder>( + getSummary(), getParentForChildren(), isClean()); + summary_ = null; + } + return summaryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Reply) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Reply) + private static final com.google.cloud.discoveryengine.v1alpha.Reply DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Reply(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Reply getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Reply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Reply getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ReplyOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ReplyOrBuilder.java new file mode 100644 index 000000000000..22c91d86dd49 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ReplyOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface ReplyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Reply) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * DEPRECATED: use `summary` instead.
+   * Text reply.
+   * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @return The reply. + */ + @java.lang.Deprecated + java.lang.String getReply(); + /** + * + * + *
+   * DEPRECATED: use `summary` instead.
+   * Text reply.
+   * 
+ * + * string reply = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1alpha.Reply.reply is deprecated. See + * google/cloud/discoveryengine/v1alpha/conversation.proto;l=95 + * @return The bytes for reply. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getReplyBytes(); + + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List getReferencesList(); + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.discoveryengine.v1alpha.Reply.Reference getReferences(int index); + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + int getReferencesCount(); + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List + getReferencesOrBuilderList(); + /** + * + * + *
+   * References in the reply.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.Reply.Reference references = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.discoveryengine.v1alpha.Reply.ReferenceOrBuilder getReferencesOrBuilder( + int index); + + /** + * + * + *
+   * Summary based on search results.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + * + * @return Whether the summary field is set. + */ + boolean hasSummary(); + /** + * + * + *
+   * Summary based on search results.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + * + * @return The summary. + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary getSummary(); + /** + * + * + *
+   * Summary based on search results.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 3; + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder getSummaryOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Schema.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Schema.java new file mode 100644 index 000000000000..b04271e3f2ae --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/Schema.java @@ -0,0 +1,1808 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Defines the structure and layout of a type of document data.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Schema} + */ +public final class Schema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.Schema) + SchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use Schema.newBuilder() to construct. + private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Schema() { + name_ = ""; + fieldConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Schema(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Schema.class, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder.class); + } + + private int schemaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object schema_; + + public enum SchemaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRUCT_SCHEMA(2), + JSON_SCHEMA(3), + SCHEMA_NOT_SET(0); + private final int value; + + private SchemaCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SchemaCase valueOf(int value) { + return forNumber(value); + } + + public static SchemaCase forNumber(int value) { + switch (value) { + case 2: + return STRUCT_SCHEMA; + case 3: + return JSON_SCHEMA; + case 0: + return SCHEMA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public static final int STRUCT_SCHEMA_FIELD_NUMBER = 2; + /** + * + * + *
+   * The structured representation of the schema.
+   * 
+ * + * .google.protobuf.Struct struct_schema = 2; + * + * @return Whether the structSchema field is set. + */ + @java.lang.Override + public boolean hasStructSchema() { + return schemaCase_ == 2; + } + /** + * + * + *
+   * The structured representation of the schema.
+   * 
+ * + * .google.protobuf.Struct struct_schema = 2; + * + * @return The structSchema. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructSchema() { + if (schemaCase_ == 2) { + return (com.google.protobuf.Struct) schema_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + /** + * + * + *
+   * The structured representation of the schema.
+   * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructSchemaOrBuilder() { + if (schemaCase_ == 2) { + return (com.google.protobuf.Struct) schema_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + + public static final int JSON_SCHEMA_FIELD_NUMBER = 3; + /** + * + * + *
+   * The JSON representation of the schema.
+   * 
+ * + * string json_schema = 3; + * + * @return Whether the jsonSchema field is set. + */ + public boolean hasJsonSchema() { + return schemaCase_ == 3; + } + /** + * + * + *
+   * The JSON representation of the schema.
+   * 
+ * + * string json_schema = 3; + * + * @return The jsonSchema. + */ + public java.lang.String getJsonSchema() { + java.lang.Object ref = ""; + if (schemaCase_ == 3) { + ref = schema_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (schemaCase_ == 3) { + schema_ = s; + } + return s; + } + } + /** + * + * + *
+   * The JSON representation of the schema.
+   * 
+ * + * string json_schema = 3; + * + * @return The bytes for jsonSchema. + */ + public com.google.protobuf.ByteString getJsonSchemaBytes() { + java.lang.Object ref = ""; + if (schemaCase_ == 3) { + ref = schema_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (schemaCase_ == 3) { + schema_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIELD_CONFIGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List fieldConfigs_; + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getFieldConfigsList() { + return fieldConfigs_; + } + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getFieldConfigsOrBuilderList() { + return fieldConfigs_; + } + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getFieldConfigsCount() { + return fieldConfigs_.size(); + } + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfig getFieldConfigs(int index) { + return fieldConfigs_.get(index); + } + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.FieldConfigOrBuilder getFieldConfigsOrBuilder( + int index) { + return fieldConfigs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (schemaCase_ == 2) { + output.writeMessage(2, (com.google.protobuf.Struct) schema_); + } + if (schemaCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schema_); + } + for (int i = 0; i < fieldConfigs_.size(); i++) { + output.writeMessage(4, fieldConfigs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (schemaCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.protobuf.Struct) schema_); + } + if (schemaCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, schema_); + } + for (int i = 0; i < fieldConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, fieldConfigs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.Schema)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.Schema other = + (com.google.cloud.discoveryengine.v1alpha.Schema) obj; + + if (!getName().equals(other.getName())) return false; + if (!getFieldConfigsList().equals(other.getFieldConfigsList())) return false; + if (!getSchemaCase().equals(other.getSchemaCase())) return false; + switch (schemaCase_) { + case 2: + if (!getStructSchema().equals(other.getStructSchema())) return false; + break; + case 3: + if (!getJsonSchema().equals(other.getJsonSchema())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getFieldConfigsCount() > 0) { + hash = (37 * hash) + FIELD_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getFieldConfigsList().hashCode(); + } + switch (schemaCase_) { + case 2: + hash = (37 * hash) + STRUCT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getStructSchema().hashCode(); + break; + case 3: + hash = (37 * hash) + JSON_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getJsonSchema().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.Schema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines the structure and layout of a type of document data.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.Schema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.Schema) + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_Schema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_Schema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.Schema.class, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.Schema.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (structSchemaBuilder_ != null) { + structSchemaBuilder_.clear(); + } + name_ = ""; + if (fieldConfigsBuilder_ == null) { + fieldConfigs_ = java.util.Collections.emptyList(); + } else { + fieldConfigs_ = null; + fieldConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + schemaCase_ = 0; + schema_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaProto + .internal_static_google_cloud_discoveryengine_v1alpha_Schema_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Schema getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Schema build() { + com.google.cloud.discoveryengine.v1alpha.Schema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Schema buildPartial() { + com.google.cloud.discoveryengine.v1alpha.Schema result = + new com.google.cloud.discoveryengine.v1alpha.Schema(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.Schema result) { + if (fieldConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + fieldConfigs_ = java.util.Collections.unmodifiableList(fieldConfigs_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.fieldConfigs_ = fieldConfigs_; + } else { + result.fieldConfigs_ = fieldConfigsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.Schema result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs(com.google.cloud.discoveryengine.v1alpha.Schema result) { + result.schemaCase_ = schemaCase_; + result.schema_ = this.schema_; + if (schemaCase_ == 2 && structSchemaBuilder_ != null) { + result.schema_ = structSchemaBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.Schema) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.Schema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.Schema other) { + if (other == com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (fieldConfigsBuilder_ == null) { + if (!other.fieldConfigs_.isEmpty()) { + if (fieldConfigs_.isEmpty()) { + fieldConfigs_ = other.fieldConfigs_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureFieldConfigsIsMutable(); + fieldConfigs_.addAll(other.fieldConfigs_); + } + onChanged(); + } + } else { + if (!other.fieldConfigs_.isEmpty()) { + if (fieldConfigsBuilder_.isEmpty()) { + fieldConfigsBuilder_.dispose(); + fieldConfigsBuilder_ = null; + fieldConfigs_ = other.fieldConfigs_; + bitField0_ = (bitField0_ & ~0x00000008); + fieldConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldConfigsFieldBuilder() + : null; + } else { + fieldConfigsBuilder_.addAllMessages(other.fieldConfigs_); + } + } + } + switch (other.getSchemaCase()) { + case STRUCT_SCHEMA: + { + mergeStructSchema(other.getStructSchema()); + break; + } + case JSON_SCHEMA: + { + schemaCase_ = 3; + schema_ = other.schema_; + onChanged(); + break; + } + case SCHEMA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage(getStructSchemaFieldBuilder().getBuilder(), extensionRegistry); + schemaCase_ = 2; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + schemaCase_ = 3; + schema_ = s; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1alpha.FieldConfig m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.parser(), + extensionRegistry); + if (fieldConfigsBuilder_ == null) { + ensureFieldConfigsIsMutable(); + fieldConfigs_.add(m); + } else { + fieldConfigsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int schemaCase_ = 0; + private java.lang.Object schema_; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public Builder clearSchema() { + schemaCase_ = 0; + schema_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structSchemaBuilder_; + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + * + * @return Whether the structSchema field is set. + */ + @java.lang.Override + public boolean hasStructSchema() { + return schemaCase_ == 2; + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + * + * @return The structSchema. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructSchema() { + if (structSchemaBuilder_ == null) { + if (schemaCase_ == 2) { + return (com.google.protobuf.Struct) schema_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } else { + if (schemaCase_ == 2) { + return structSchemaBuilder_.getMessage(); + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + public Builder setStructSchema(com.google.protobuf.Struct value) { + if (structSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + structSchemaBuilder_.setMessage(value); + } + schemaCase_ = 2; + return this; + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + public Builder setStructSchema(com.google.protobuf.Struct.Builder builderForValue) { + if (structSchemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + structSchemaBuilder_.setMessage(builderForValue.build()); + } + schemaCase_ = 2; + return this; + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + public Builder mergeStructSchema(com.google.protobuf.Struct value) { + if (structSchemaBuilder_ == null) { + if (schemaCase_ == 2 && schema_ != com.google.protobuf.Struct.getDefaultInstance()) { + schema_ = + com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) schema_) + .mergeFrom(value) + .buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + if (schemaCase_ == 2) { + structSchemaBuilder_.mergeFrom(value); + } else { + structSchemaBuilder_.setMessage(value); + } + } + schemaCase_ = 2; + return this; + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + public Builder clearStructSchema() { + if (structSchemaBuilder_ == null) { + if (schemaCase_ == 2) { + schemaCase_ = 0; + schema_ = null; + onChanged(); + } + } else { + if (schemaCase_ == 2) { + schemaCase_ = 0; + schema_ = null; + } + structSchemaBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + public com.google.protobuf.Struct.Builder getStructSchemaBuilder() { + return getStructSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructSchemaOrBuilder() { + if ((schemaCase_ == 2) && (structSchemaBuilder_ != null)) { + return structSchemaBuilder_.getMessageOrBuilder(); + } else { + if (schemaCase_ == 2) { + return (com.google.protobuf.Struct) schema_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * The structured representation of the schema.
+     * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getStructSchemaFieldBuilder() { + if (structSchemaBuilder_ == null) { + if (!(schemaCase_ == 2)) { + schema_ = com.google.protobuf.Struct.getDefaultInstance(); + } + structSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + (com.google.protobuf.Struct) schema_, getParentForChildren(), isClean()); + schema_ = null; + } + schemaCase_ = 2; + onChanged(); + return structSchemaBuilder_; + } + + /** + * + * + *
+     * The JSON representation of the schema.
+     * 
+ * + * string json_schema = 3; + * + * @return Whether the jsonSchema field is set. + */ + @java.lang.Override + public boolean hasJsonSchema() { + return schemaCase_ == 3; + } + /** + * + * + *
+     * The JSON representation of the schema.
+     * 
+ * + * string json_schema = 3; + * + * @return The jsonSchema. + */ + @java.lang.Override + public java.lang.String getJsonSchema() { + java.lang.Object ref = ""; + if (schemaCase_ == 3) { + ref = schema_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (schemaCase_ == 3) { + schema_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The JSON representation of the schema.
+     * 
+ * + * string json_schema = 3; + * + * @return The bytes for jsonSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJsonSchemaBytes() { + java.lang.Object ref = ""; + if (schemaCase_ == 3) { + ref = schema_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (schemaCase_ == 3) { + schema_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The JSON representation of the schema.
+     * 
+ * + * string json_schema = 3; + * + * @param value The jsonSchema to set. + * @return This builder for chaining. + */ + public Builder setJsonSchema(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schemaCase_ = 3; + schema_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The JSON representation of the schema.
+     * 
+ * + * string json_schema = 3; + * + * @return This builder for chaining. + */ + public Builder clearJsonSchema() { + if (schemaCase_ == 3) { + schemaCase_ = 0; + schema_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The JSON representation of the schema.
+     * 
+ * + * string json_schema = 3; + * + * @param value The bytes for jsonSchema to set. + * @return This builder for chaining. + */ + public Builder setJsonSchemaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaCase_ = 3; + schema_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The full resource name of the schema, in the format of
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+     *
+     * This field must be a UTF-8 encoded string with a length limit of 1024
+     * characters.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List fieldConfigs_ = + java.util.Collections.emptyList(); + + private void ensureFieldConfigsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + fieldConfigs_ = + new java.util.ArrayList( + fieldConfigs_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.FieldConfig, + com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.FieldConfigOrBuilder> + fieldConfigsBuilder_; + + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getFieldConfigsList() { + if (fieldConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldConfigs_); + } else { + return fieldConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getFieldConfigsCount() { + if (fieldConfigsBuilder_ == null) { + return fieldConfigs_.size(); + } else { + return fieldConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.FieldConfig getFieldConfigs(int index) { + if (fieldConfigsBuilder_ == null) { + return fieldConfigs_.get(index); + } else { + return fieldConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFieldConfigs( + int index, com.google.cloud.discoveryengine.v1alpha.FieldConfig value) { + if (fieldConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldConfigsIsMutable(); + fieldConfigs_.set(index, value); + onChanged(); + } else { + fieldConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFieldConfigs( + int index, com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder builderForValue) { + if (fieldConfigsBuilder_ == null) { + ensureFieldConfigsIsMutable(); + fieldConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addFieldConfigs(com.google.cloud.discoveryengine.v1alpha.FieldConfig value) { + if (fieldConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldConfigsIsMutable(); + fieldConfigs_.add(value); + onChanged(); + } else { + fieldConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addFieldConfigs( + int index, com.google.cloud.discoveryengine.v1alpha.FieldConfig value) { + if (fieldConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldConfigsIsMutable(); + fieldConfigs_.add(index, value); + onChanged(); + } else { + fieldConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addFieldConfigs( + com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder builderForValue) { + if (fieldConfigsBuilder_ == null) { + ensureFieldConfigsIsMutable(); + fieldConfigs_.add(builderForValue.build()); + onChanged(); + } else { + fieldConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addFieldConfigs( + int index, com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder builderForValue) { + if (fieldConfigsBuilder_ == null) { + ensureFieldConfigsIsMutable(); + fieldConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllFieldConfigs( + java.lang.Iterable values) { + if (fieldConfigsBuilder_ == null) { + ensureFieldConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fieldConfigs_); + onChanged(); + } else { + fieldConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFieldConfigs() { + if (fieldConfigsBuilder_ == null) { + fieldConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + fieldConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeFieldConfigs(int index) { + if (fieldConfigsBuilder_ == null) { + ensureFieldConfigsIsMutable(); + fieldConfigs_.remove(index); + onChanged(); + } else { + fieldConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder getFieldConfigsBuilder( + int index) { + return getFieldConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.FieldConfigOrBuilder getFieldConfigsOrBuilder( + int index) { + if (fieldConfigsBuilder_ == null) { + return fieldConfigs_.get(index); + } else { + return fieldConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getFieldConfigsOrBuilderList() { + if (fieldConfigsBuilder_ != null) { + return fieldConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldConfigs_); + } + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder addFieldConfigsBuilder() { + return getFieldConfigsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder addFieldConfigsBuilder( + int index) { + return getFieldConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.FieldConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Configurations for fields of the schema.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getFieldConfigsBuilderList() { + return getFieldConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.FieldConfig, + com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.FieldConfigOrBuilder> + getFieldConfigsFieldBuilder() { + if (fieldConfigsBuilder_ == null) { + fieldConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.FieldConfig, + com.google.cloud.discoveryengine.v1alpha.FieldConfig.Builder, + com.google.cloud.discoveryengine.v1alpha.FieldConfigOrBuilder>( + fieldConfigs_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + fieldConfigs_ = null; + } + return fieldConfigsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.Schema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.Schema) + private static final com.google.cloud.discoveryengine.v1alpha.Schema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.Schema(); + } + + public static com.google.cloud.discoveryengine.v1alpha.Schema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Schema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaName.java new file mode 100644 index 000000000000..b35edde06146 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaName.java @@ -0,0 +1,427 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SchemaName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_STORE_SCHEMA = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_DATA_STORE_SCHEMA = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String dataStore; + private final String schema; + private final String collection; + + @Deprecated + protected SchemaName() { + project = null; + location = null; + dataStore = null; + schema = null; + collection = null; + } + + private SchemaName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + schema = Preconditions.checkNotNull(builder.getSchema()); + collection = null; + pathTemplate = PROJECT_LOCATION_DATA_STORE_SCHEMA; + } + + private SchemaName(ProjectLocationCollectionDataStoreSchemaBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + schema = Preconditions.checkNotNull(builder.getSchema()); + pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE_SCHEMA; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getSchema() { + return schema; + } + + public String getCollection() { + return collection; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationDataStoreSchemaBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionDataStoreSchemaBuilder + newProjectLocationCollectionDataStoreSchemaBuilder() { + return new ProjectLocationCollectionDataStoreSchemaBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SchemaName of(String project, String location, String dataStore, String schema) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setSchema(schema) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SchemaName ofProjectLocationDataStoreSchemaName( + String project, String location, String dataStore, String schema) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setSchema(schema) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SchemaName ofProjectLocationCollectionDataStoreSchemaName( + String project, String location, String collection, String dataStore, String schema) { + return newProjectLocationCollectionDataStoreSchemaBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setSchema(schema) + .build(); + } + + public static String format(String project, String location, String dataStore, String schema) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setSchema(schema) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDataStoreSchemaName( + String project, String location, String dataStore, String schema) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setSchema(schema) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionDataStoreSchemaName( + String project, String location, String collection, String dataStore, String schema) { + return newProjectLocationCollectionDataStoreSchemaBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setSchema(schema) + .build() + .toString(); + } + + public static SchemaName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_DATA_STORE_SCHEMA.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_DATA_STORE_SCHEMA.match(formattedString); + return ofProjectLocationDataStoreSchemaName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("data_store"), + matchMap.get("schema")); + } else if (PROJECT_LOCATION_COLLECTION_DATA_STORE_SCHEMA.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_COLLECTION_DATA_STORE_SCHEMA.match(formattedString); + return ofProjectLocationCollectionDataStoreSchemaName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("data_store"), + matchMap.get("schema")); + } + throw new ValidationException("SchemaName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SchemaName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_STORE_SCHEMA.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_DATA_STORE_SCHEMA.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataStore != null) { + fieldMapBuilder.put("data_store", dataStore); + } + if (schema != null) { + fieldMapBuilder.put("schema", schema); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SchemaName that = ((SchemaName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataStore, that.dataStore) + && Objects.equals(this.schema, that.schema) + && Objects.equals(this.collection, that.collection); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataStore); + h *= 1000003; + h ^= Objects.hashCode(schema); + h *= 1000003; + h ^= Objects.hashCode(collection); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}. + */ + public static class Builder { + private String project; + private String location; + private String dataStore; + private String schema; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getSchema() { + return schema; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public Builder setSchema(String schema) { + this.schema = schema; + return this; + } + + private Builder(SchemaName schemaName) { + Preconditions.checkArgument( + Objects.equals(schemaName.pathTemplate, PROJECT_LOCATION_DATA_STORE_SCHEMA), + "toBuilder is only supported when SchemaName has the pattern of projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}"); + this.project = schemaName.project; + this.location = schemaName.location; + this.dataStore = schemaName.dataStore; + this.schema = schemaName.schema; + } + + public SchemaName build() { + return new SchemaName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionDataStoreSchemaBuilder { + private String project; + private String location; + private String collection; + private String dataStore; + private String schema; + + protected ProjectLocationCollectionDataStoreSchemaBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getDataStore() { + return dataStore; + } + + public String getSchema() { + return schema; + } + + public ProjectLocationCollectionDataStoreSchemaBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionDataStoreSchemaBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionDataStoreSchemaBuilder setCollection(String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionDataStoreSchemaBuilder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public ProjectLocationCollectionDataStoreSchemaBuilder setSchema(String schema) { + this.schema = schema; + return this; + } + + public SchemaName build() { + return new SchemaName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaOrBuilder.java new file mode 100644 index 000000000000..570a20380b56 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface SchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.Schema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The structured representation of the schema.
+   * 
+ * + * .google.protobuf.Struct struct_schema = 2; + * + * @return Whether the structSchema field is set. + */ + boolean hasStructSchema(); + /** + * + * + *
+   * The structured representation of the schema.
+   * 
+ * + * .google.protobuf.Struct struct_schema = 2; + * + * @return The structSchema. + */ + com.google.protobuf.Struct getStructSchema(); + /** + * + * + *
+   * The structured representation of the schema.
+   * 
+ * + * .google.protobuf.Struct struct_schema = 2; + */ + com.google.protobuf.StructOrBuilder getStructSchemaOrBuilder(); + + /** + * + * + *
+   * The JSON representation of the schema.
+   * 
+ * + * string json_schema = 3; + * + * @return Whether the jsonSchema field is set. + */ + boolean hasJsonSchema(); + /** + * + * + *
+   * The JSON representation of the schema.
+   * 
+ * + * string json_schema = 3; + * + * @return The jsonSchema. + */ + java.lang.String getJsonSchema(); + /** + * + * + *
+   * The JSON representation of the schema.
+   * 
+ * + * string json_schema = 3; + * + * @return The bytes for jsonSchema. + */ + com.google.protobuf.ByteString getJsonSchemaBytes(); + + /** + * + * + *
+   * Immutable. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The full resource name of the schema, in the format of
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+   *
+   * This field must be a UTF-8 encoded string with a length limit of 1024
+   * characters.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getFieldConfigsList(); + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfig getFieldConfigs(int index); + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getFieldConfigsCount(); + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getFieldConfigsOrBuilderList(); + /** + * + * + *
+   * Output only. Configurations for fields of the schema.
+   * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.FieldConfig field_configs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1alpha.FieldConfigOrBuilder getFieldConfigsOrBuilder(int index); + + com.google.cloud.discoveryengine.v1alpha.Schema.SchemaCase getSchemaCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaProto.java new file mode 100644 index 000000000000..4738e79dd3f9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaProto.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class SchemaProto { + private SchemaProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_Schema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_Schema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/discoveryengine/v1alpha/s" + + "chema.proto\022$google.cloud.discoveryengin" + + "e.v1alpha\032\037google/api/field_behavior.pro" + + "to\032\031google/api/resource.proto\032\034google/pr" + + "otobuf/struct.proto\"\252\003\n\006Schema\0220\n\rstruct" + + "_schema\030\002 \001(\0132\027.google.protobuf.StructH\000" + + "\022\025\n\013json_schema\030\003 \001(\tH\000\022\022\n\004name\030\001 \001(\tB\004\342" + + "A\001\005\022N\n\rfield_configs\030\004 \003(\01321.google.clou" + + "d.discoveryengine.v1alpha.FieldConfigB\004\342" + + "A\001\003:\350\001\352A\344\001\n%discoveryengine.googleapis.c" + + "om/Schema\022Pprojects/{project}/locations/" + + "{location}/dataStores/{data_store}/schem" + + "as/{schema}\022iprojects/{project}/location" + + "s/{location}/collections/{collection}/da" + + "taStores/{data_store}/schemas/{schema}B\010" + + "\n\006schema\"\365\013\n\013FieldConfig\022\030\n\nfield_path\030\001" + + " \001(\tB\004\342A\001\002\022U\n\nfield_type\030\002 \001(\0162;.google." + + "cloud.discoveryengine.v1alpha.FieldConfi" + + "g.FieldTypeB\004\342A\001\003\022[\n\020indexable_option\030\003 " + + "\001(\0162A.google.cloud.discoveryengine.v1alp" + + "ha.FieldConfig.IndexableOption\022j\n\030dynami" + + "c_facetable_option\030\004 \001(\0162H.google.cloud." + + "discoveryengine.v1alpha.FieldConfig.Dyna" + + "micFacetableOption\022]\n\021searchable_option\030" + + "\005 \001(\0162B.google.cloud.discoveryengine.v1a" + + "lpha.FieldConfig.SearchableOption\022_\n\022ret" + + "rievable_option\030\006 \001(\0162C.google.cloud.dis" + + "coveryengine.v1alpha.FieldConfig.Retriev" + + "ableOption\022_\n\022completable_option\030\010 \001(\0162C" + + ".google.cloud.discoveryengine.v1alpha.Fi" + + "eldConfig.CompletableOption\022b\n\026recs_filt" + + "erable_option\030\t \001(\0162B.google.cloud.disco" + + "veryengine.v1alpha.FieldConfig.Filterabl" + + "eOption\022\037\n\021key_property_type\030\007 \001(\tB\004\342A\001\003" + + "\"v\n\tFieldType\022\032\n\026FIELD_TYPE_UNSPECIFIED\020" + + "\000\022\n\n\006OBJECT\020\001\022\n\n\006STRING\020\002\022\n\n\006NUMBER\020\003\022\013\n" + + "\007INTEGER\020\004\022\013\n\007BOOLEAN\020\005\022\017\n\013GEOLOCATION\020\006" + + "\"b\n\017IndexableOption\022 \n\034INDEXABLE_OPTION_" + + "UNSPECIFIED\020\000\022\025\n\021INDEXABLE_ENABLED\020\001\022\026\n\022" + + "INDEXABLE_DISABLED\020\002\"\201\001\n\026DynamicFacetabl" + + "eOption\022(\n$DYNAMIC_FACETABLE_OPTION_UNSP" + + "ECIFIED\020\000\022\035\n\031DYNAMIC_FACETABLE_ENABLED\020\001" + + "\022\036\n\032DYNAMIC_FACETABLE_DISABLED\020\002\"f\n\020Sear" + + "chableOption\022!\n\035SEARCHABLE_OPTION_UNSPEC" + + "IFIED\020\000\022\026\n\022SEARCHABLE_ENABLED\020\001\022\027\n\023SEARC" + + "HABLE_DISABLED\020\002\"j\n\021RetrievableOption\022\"\n" + + "\036RETRIEVABLE_OPTION_UNSPECIFIED\020\000\022\027\n\023RET" + + "RIEVABLE_ENABLED\020\001\022\030\n\024RETRIEVABLE_DISABL" + + "ED\020\002\"j\n\021CompletableOption\022\"\n\036COMPLETABLE" + + "_OPTION_UNSPECIFIED\020\000\022\027\n\023COMPLETABLE_ENA" + + "BLED\020\001\022\030\n\024COMPLETABLE_DISABLED\020\002\"f\n\020Filt" + + "erableOption\022!\n\035FILTERABLE_OPTION_UNSPEC" + + "IFIED\020\000\022\026\n\022FILTERABLE_ENABLED\020\001\022\027\n\023FILTE" + + "RABLE_DISABLED\020\002B\227\002\n(com.google.cloud.di" + + "scoveryengine.v1alphaB\013SchemaProtoP\001ZRcl" + + "oud.google.com/go/discoveryengine/apiv1a" + + "lpha/discoveryenginepb;discoveryenginepb" + + "\242\002\017DISCOVERYENGINE\252\002$Google.Cloud.Discov" + + "eryEngine.V1Alpha\312\002$Google\\Cloud\\Discove" + + "ryEngine\\V1alpha\352\002\'Google::Cloud::Discov" + + "eryEngine::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_Schema_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_Schema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_Schema_descriptor, + new java.lang.String[] { + "StructSchema", "JsonSchema", "Name", "FieldConfigs", "Schema", + }); + internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_FieldConfig_descriptor, + new java.lang.String[] { + "FieldPath", + "FieldType", + "IndexableOption", + "DynamicFacetableOption", + "SearchableOption", + "RetrievableOption", + "CompletableOption", + "RecsFilterableOption", + "KeyPropertyType", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceProto.java new file mode 100644 index 000000000000..1d4a2a7d23bc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SchemaServiceProto.java @@ -0,0 +1,272 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class SchemaServiceProto { + private SchemaServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/discoveryengine/v1alpha/s" + + "chema_service.proto\022$google.cloud.discov" + + "eryengine.v1alpha\032\034google/api/annotation" + + "s.proto\032\027google/api/client.proto\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\0321google/cloud/discoveryengi" + + "ne/v1alpha/schema.proto\032#google/longrunn" + + "ing/operations.proto\032\033google/protobuf/em" + + "pty.proto\032\037google/protobuf/timestamp.pro" + + "to\"P\n\020GetSchemaRequest\022<\n\004name\030\001 \001(\tB.\342A" + + "\001\002\372A\'\n%discoveryengine.googleapis.com/Sc" + + "hema\"~\n\022ListSchemasRequest\022A\n\006parent\030\001 \001" + + "(\tB1\342A\001\002\372A*\n(discoveryengine.googleapis." + + "com/DataStore\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" + + "_token\030\003 \001(\t\"m\n\023ListSchemasResponse\022=\n\007s" + + "chemas\030\001 \003(\0132,.google.cloud.discoveryeng" + + "ine.v1alpha.Schema\022\027\n\017next_page_token\030\002 " + + "\001(\t\"\265\001\n\023CreateSchemaRequest\022A\n\006parent\030\001 " + + "\001(\tB1\342A\001\002\372A*\n(discoveryengine.googleapis" + + ".com/DataStore\022B\n\006schema\030\002 \001(\0132,.google." + + "cloud.discoveryengine.v1alpha.SchemaB\004\342A" + + "\001\002\022\027\n\tschema_id\030\003 \001(\tB\004\342A\001\002\"p\n\023UpdateSch" + + "emaRequest\022B\n\006schema\030\001 \001(\0132,.google.clou" + + "d.discoveryengine.v1alpha.SchemaB\004\342A\001\002\022\025" + + "\n\rallow_missing\030\003 \001(\010\"S\n\023DeleteSchemaReq" + + "uest\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%discoveryen" + + "gine.googleapis.com/Schema\"x\n\024CreateSche" + + "maMetadata\022/\n\013create_time\030\001 \001(\0132\032.google" + + ".protobuf.Timestamp\022/\n\013update_time\030\002 \001(\013" + + "2\032.google.protobuf.Timestamp\"x\n\024UpdateSc" + + "hemaMetadata\022/\n\013create_time\030\001 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022/\n\013update_time\030\002 \001" + + "(\0132\032.google.protobuf.Timestamp\"x\n\024Delete" + + "SchemaMetadata\022/\n\013create_time\030\001 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\022/\n\013update_time\030\002" + + " \001(\0132\032.google.protobuf.Timestamp2\237\016\n\rSch" + + "emaService\022\220\002\n\tGetSchema\0226.google.cloud." + + "discoveryengine.v1alpha.GetSchemaRequest" + + "\032,.google.cloud.discoveryengine.v1alpha." + + "Schema\"\234\001\332A\004name\202\323\344\223\002\216\001\022=/v1alpha/{name=" + + "projects/*/locations/*/dataStores/*/sche" + + "mas/*}ZM\022K/v1alpha/{name=projects/*/loca" + + "tions/*/collections/*/dataStores/*/schem" + + "as/*}\022\243\002\n\013ListSchemas\0228.google.cloud.dis" + + "coveryengine.v1alpha.ListSchemasRequest\032" + + "9.google.cloud.discoveryengine.v1alpha.L" + + "istSchemasResponse\"\236\001\332A\006parent\202\323\344\223\002\216\001\022=/" + + "v1alpha/{parent=projects/*/locations/*/d" + + "ataStores/*}/schemasZM\022K/v1alpha/{parent" + + "=projects/*/locations/*/collections/*/da" + + "taStores/*}/schemas\022\225\003\n\014CreateSchema\0229.g" + + "oogle.cloud.discoveryengine.v1alpha.Crea" + + "teSchemaRequest\032\035.google.longrunning.Ope" + + "ration\"\252\002\312Ah\n+google.cloud.discoveryengi" + + "ne.v1alpha.Schema\0229google.cloud.discover" + + "yengine.v1alpha.CreateSchemaMetadata\332A\027p" + + "arent,schema,schema_id\202\323\344\223\002\236\001\"=/v1alpha/" + + "{parent=projects/*/locations/*/dataStore" + + "s/*}/schemas:\006schemaZU\"K/v1alpha/{parent" + + "=projects/*/locations/*/collections/*/da" + + "taStores/*}/schemas:\006schema\022\211\003\n\014UpdateSc" + + "hema\0229.google.cloud.discoveryengine.v1al" + + "pha.UpdateSchemaRequest\032\035.google.longrun" + + "ning.Operation\"\236\002\312Ah\n+google.cloud.disco" + + "veryengine.v1alpha.Schema\0229google.cloud." + + "discoveryengine.v1alpha.UpdateSchemaMeta" + + "data\202\323\344\223\002\254\0012D/v1alpha/{schema.name=proje" + + "cts/*/locations/*/dataStores/*/schemas/*" + + "}:\006schemaZ\\2R/v1alpha/{schema.name=proje" + + "cts/*/locations/*/collections/*/dataStor" + + "es/*/schemas/*}:\006schema\022\334\002\n\014DeleteSchema" + + "\0229.google.cloud.discoveryengine.v1alpha." + + "DeleteSchemaRequest\032\035.google.longrunning" + + ".Operation\"\361\001\312AR\n\025google.protobuf.Empty\022" + + "9google.cloud.discoveryengine.v1alpha.De" + + "leteSchemaMetadata\332A\004name\202\323\344\223\002\216\001*=/v1alp" + + "ha/{name=projects/*/locations/*/dataStor" + + "es/*/schemas/*}ZM*K/v1alpha/{name=projec" + + "ts/*/locations/*/collections/*/dataStore" + + "s/*/schemas/*}\032R\312A\036discoveryengine.googl" + + "eapis.com\322A.https://www.googleapis.com/a" + + "uth/cloud-platformB\236\002\n(com.google.cloud." + + "discoveryengine.v1alphaB\022SchemaServicePr" + + "otoP\001ZRcloud.google.com/go/discoveryengi" + + "ne/apiv1alpha/discoveryenginepb;discover" + + "yenginepb\242\002\017DISCOVERYENGINE\252\002$Google.Clo" + + "ud.DiscoveryEngine.V1Alpha\312\002$Google\\Clou" + + "d\\DiscoveryEngine\\V1alpha\352\002\'Google::Clou" + + "d::DiscoveryEngine::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.SchemaProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_GetSchemaRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_ListSchemasResponse_descriptor, + new java.lang.String[] { + "Schemas", "NextPageToken", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaRequest_descriptor, + new java.lang.String[] { + "Parent", "Schema", "SchemaId", + }); + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_descriptor, + new java.lang.String[] { + "Schema", "AllowMissing", + }); + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CreateSchemaMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", + }); + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", + }); + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_DeleteSchemaMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.SchemaProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchInfo.java new file mode 100644 index 000000000000..6e62314e8e8a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchInfo.java @@ -0,0 +1,1166 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Detailed search information.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchInfo} + */ +public final class SearchInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchInfo) + SearchInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchInfo.newBuilder() to construct. + private SearchInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchInfo() { + searchQuery_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchInfo.class, + com.google.cloud.discoveryengine.v1alpha.SearchInfo.Builder.class); + } + + private int bitField0_; + public static final int SEARCH_QUERY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchQuery_ = ""; + /** + * + * + *
+   * The user's search query.
+   *
+   * See
+   * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+   * for definition.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 5,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * At least one of
+   * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+   * or
+   * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+   * is required for `search` events. Other event types should not set this
+   * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string search_query = 1; + * + * @return The searchQuery. + */ + @java.lang.Override + public java.lang.String getSearchQuery() { + java.lang.Object ref = searchQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchQuery_ = s; + return s; + } + } + /** + * + * + *
+   * The user's search query.
+   *
+   * See
+   * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+   * for definition.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 5,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * At least one of
+   * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+   * or
+   * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+   * is required for `search` events. Other event types should not set this
+   * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string search_query = 1; + * + * @return The bytes for searchQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchQueryBytes() { + java.lang.Object ref = searchQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * The order in which products are returned, if applicable.
+   *
+   * See
+   * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+   * for definition and syntax.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string order_by = 2; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * The order in which products are returned, if applicable.
+   *
+   * See
+   * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+   * for definition and syntax.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string order_by = 2; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OFFSET_FIELD_NUMBER = 3; + private int offset_ = 0; + /** + * + * + *
+   * An integer that specifies the current offset for pagination (the 0-indexed
+   * starting location, amongst the products deemed by the API as relevant).
+   *
+   * See
+   * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+   * for definition.
+   *
+   * If this field is negative, an `INVALID_ARGUMENT` is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * optional int32 offset = 3; + * + * @return Whether the offset field is set. + */ + @java.lang.Override + public boolean hasOffset() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * An integer that specifies the current offset for pagination (the 0-indexed
+   * starting location, amongst the products deemed by the API as relevant).
+   *
+   * See
+   * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+   * for definition.
+   *
+   * If this field is negative, an `INVALID_ARGUMENT` is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * optional int32 offset = 3; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(searchQuery_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, searchQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, orderBy_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(3, offset_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(searchQuery_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, searchQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, orderBy_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, offset_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchInfo other = + (com.google.cloud.discoveryengine.v1alpha.SearchInfo) obj; + + if (!getSearchQuery().equals(other.getSearchQuery())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (hasOffset() != other.hasOffset()) return false; + if (hasOffset()) { + if (getOffset() != other.getOffset()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SEARCH_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getSearchQuery().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + if (hasOffset()) { + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getOffset(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.SearchInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Detailed search information.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchInfo) + com.google.cloud.discoveryengine.v1alpha.SearchInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchInfo.class, + com.google.cloud.discoveryengine.v1alpha.SearchInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.SearchInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + searchQuery_ = ""; + orderBy_ = ""; + offset_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchInfo build() { + com.google.cloud.discoveryengine.v1alpha.SearchInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchInfo result = + new com.google.cloud.discoveryengine.v1alpha.SearchInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.SearchInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.searchQuery_ = searchQuery_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.orderBy_ = orderBy_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.offset_ = offset_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.SearchInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.SearchInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.SearchInfo.getDefaultInstance()) + return this; + if (!other.getSearchQuery().isEmpty()) { + searchQuery_ = other.searchQuery_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOffset()) { + setOffset(other.getOffset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + searchQuery_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + offset_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object searchQuery_ = ""; + /** + * + * + *
+     * The user's search query.
+     *
+     * See
+     * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+     * for definition.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 5,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * At least one of
+     * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+     * or
+     * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+     * is required for `search` events. Other event types should not set this
+     * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string search_query = 1; + * + * @return The searchQuery. + */ + public java.lang.String getSearchQuery() { + java.lang.Object ref = searchQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The user's search query.
+     *
+     * See
+     * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+     * for definition.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 5,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * At least one of
+     * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+     * or
+     * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+     * is required for `search` events. Other event types should not set this
+     * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string search_query = 1; + * + * @return The bytes for searchQuery. + */ + public com.google.protobuf.ByteString getSearchQueryBytes() { + java.lang.Object ref = searchQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The user's search query.
+     *
+     * See
+     * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+     * for definition.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 5,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * At least one of
+     * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+     * or
+     * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+     * is required for `search` events. Other event types should not set this
+     * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string search_query = 1; + * + * @param value The searchQuery to set. + * @return This builder for chaining. + */ + public Builder setSearchQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchQuery_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The user's search query.
+     *
+     * See
+     * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+     * for definition.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 5,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * At least one of
+     * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+     * or
+     * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+     * is required for `search` events. Other event types should not set this
+     * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string search_query = 1; + * + * @return This builder for chaining. + */ + public Builder clearSearchQuery() { + searchQuery_ = getDefaultInstance().getSearchQuery(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The user's search query.
+     *
+     * See
+     * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+     * for definition.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 5,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * At least one of
+     * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+     * or
+     * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+     * is required for `search` events. Other event types should not set this
+     * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string search_query = 1; + * + * @param value The bytes for searchQuery to set. + * @return This builder for chaining. + */ + public Builder setSearchQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchQuery_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * The order in which products are returned, if applicable.
+     *
+     * See
+     * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+     * for definition and syntax.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string order_by = 2; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The order in which products are returned, if applicable.
+     *
+     * See
+     * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+     * for definition and syntax.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string order_by = 2; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The order in which products are returned, if applicable.
+     *
+     * See
+     * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+     * for definition and syntax.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string order_by = 2; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The order in which products are returned, if applicable.
+     *
+     * See
+     * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+     * for definition and syntax.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string order_by = 2; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The order in which products are returned, if applicable.
+     *
+     * See
+     * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+     * for definition and syntax.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string order_by = 2; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int offset_; + /** + * + * + *
+     * An integer that specifies the current offset for pagination (the 0-indexed
+     * starting location, amongst the products deemed by the API as relevant).
+     *
+     * See
+     * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+     * for definition.
+     *
+     * If this field is negative, an `INVALID_ARGUMENT` is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * optional int32 offset = 3; + * + * @return Whether the offset field is set. + */ + @java.lang.Override + public boolean hasOffset() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * An integer that specifies the current offset for pagination (the 0-indexed
+     * starting location, amongst the products deemed by the API as relevant).
+     *
+     * See
+     * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+     * for definition.
+     *
+     * If this field is negative, an `INVALID_ARGUMENT` is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * optional int32 offset = 3; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; + } + /** + * + * + *
+     * An integer that specifies the current offset for pagination (the 0-indexed
+     * starting location, amongst the products deemed by the API as relevant).
+     *
+     * See
+     * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+     * for definition.
+     *
+     * If this field is negative, an `INVALID_ARGUMENT` is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * optional int32 offset = 3; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(int value) { + + offset_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * An integer that specifies the current offset for pagination (the 0-indexed
+     * starting location, amongst the products deemed by the API as relevant).
+     *
+     * See
+     * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+     * for definition.
+     *
+     * If this field is negative, an `INVALID_ARGUMENT` is returned.
+     *
+     * This can only be set for `search` events. Other event types should not set
+     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * optional int32 offset = 3; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000004); + offset_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchInfo) + private static final com.google.cloud.discoveryengine.v1alpha.SearchInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchInfoOrBuilder.java new file mode 100644 index 000000000000..9f3dfee5bbd7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchInfoOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface SearchInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The user's search query.
+   *
+   * See
+   * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+   * for definition.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 5,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * At least one of
+   * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+   * or
+   * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+   * is required for `search` events. Other event types should not set this
+   * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string search_query = 1; + * + * @return The searchQuery. + */ + java.lang.String getSearchQuery(); + /** + * + * + *
+   * The user's search query.
+   *
+   * See
+   * [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query]
+   * for definition.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 5,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * At least one of
+   * [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query]
+   * or
+   * [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category]
+   * is required for `search` events. Other event types should not set this
+   * field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string search_query = 1; + * + * @return The bytes for searchQuery. + */ + com.google.protobuf.ByteString getSearchQueryBytes(); + + /** + * + * + *
+   * The order in which products are returned, if applicable.
+   *
+   * See
+   * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+   * for definition and syntax.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string order_by = 2; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * The order in which products are returned, if applicable.
+   *
+   * See
+   * [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by]
+   * for definition and syntax.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string order_by = 2; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * An integer that specifies the current offset for pagination (the 0-indexed
+   * starting location, amongst the products deemed by the API as relevant).
+   *
+   * See
+   * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+   * for definition.
+   *
+   * If this field is negative, an `INVALID_ARGUMENT` is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * optional int32 offset = 3; + * + * @return Whether the offset field is set. + */ + boolean hasOffset(); + /** + * + * + *
+   * An integer that specifies the current offset for pagination (the 0-indexed
+   * starting location, amongst the products deemed by the API as relevant).
+   *
+   * See
+   * [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset]
+   * for definition.
+   *
+   * If this field is negative, an `INVALID_ARGUMENT` is returned.
+   *
+   * This can only be set for `search` events. Other event types should not set
+   * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * optional int32 offset = 3; + * + * @return The offset. + */ + int getOffset(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequest.java new file mode 100644 index 000000000000..cf35f4dace73 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequest.java @@ -0,0 +1,23202 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest} + */ +public final class SearchRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest) + SearchRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchRequest.newBuilder() to construct. + private SearchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchRequest() { + servingConfig_ = ""; + branch_ = ""; + query_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + facetSpecs_ = java.util.Collections.emptyList(); + userPseudoId_ = ""; + rankingExpression_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetParams(); + case 22: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.Builder.class); + } + + public interface ImageQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+     * BMP.
+     * 
+ * + * string image_bytes = 1; + * + * @return Whether the imageBytes field is set. + */ + boolean hasImageBytes(); + /** + * + * + *
+     * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+     * BMP.
+     * 
+ * + * string image_bytes = 1; + * + * @return The imageBytes. + */ + java.lang.String getImageBytes(); + /** + * + * + *
+     * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+     * BMP.
+     * 
+ * + * string image_bytes = 1; + * + * @return The bytes for imageBytes. + */ + com.google.protobuf.ByteString getImageBytesBytes(); + + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.ImageCase getImageCase(); + } + /** + * + * + *
+   * Specifies the image query input.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery} + */ + public static final class ImageQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) + ImageQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageQuery.newBuilder() to construct. + private ImageQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageQuery() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageQuery(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.Builder.class); + } + + private int imageCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object image_; + + public enum ImageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IMAGE_BYTES(1), + IMAGE_NOT_SET(0); + private final int value; + + private ImageCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImageCase valueOf(int value) { + return forNumber(value); + } + + public static ImageCase forNumber(int value) { + switch (value) { + case 1: + return IMAGE_BYTES; + case 0: + return IMAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public static final int IMAGE_BYTES_FIELD_NUMBER = 1; + /** + * + * + *
+     * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+     * BMP.
+     * 
+ * + * string image_bytes = 1; + * + * @return Whether the imageBytes field is set. + */ + public boolean hasImageBytes() { + return imageCase_ == 1; + } + /** + * + * + *
+     * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+     * BMP.
+     * 
+ * + * string image_bytes = 1; + * + * @return The imageBytes. + */ + public java.lang.String getImageBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 1) { + ref = image_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 1) { + image_ = s; + } + return s; + } + } + /** + * + * + *
+     * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+     * BMP.
+     * 
+ * + * string image_bytes = 1; + * + * @return The bytes for imageBytes. + */ + public com.google.protobuf.ByteString getImageBytesBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 1) { + ref = image_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 1) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (imageCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, image_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (imageCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, image_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) obj; + + if (!getImageCase().equals(other.getImageCase())) return false; + switch (imageCase_) { + case 1: + if (!getImageBytes().equals(other.getImageBytes())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (imageCase_) { + case 1: + hash = (37 * hash) + IMAGE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getImageBytes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Specifies the image query input.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + imageCase_ = 0; + image_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery result) { + result.imageCase_ = imageCase_; + result.image_ = this.image_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + .getDefaultInstance()) return this; + switch (other.getImageCase()) { + case IMAGE_BYTES: + { + imageCase_ = 1; + image_ = other.image_; + onChanged(); + break; + } + case IMAGE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + imageCase_ = 1; + image_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int imageCase_ = 0; + private java.lang.Object image_; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public Builder clearImage() { + imageCase_ = 0; + image_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+       * BMP.
+       * 
+ * + * string image_bytes = 1; + * + * @return Whether the imageBytes field is set. + */ + @java.lang.Override + public boolean hasImageBytes() { + return imageCase_ == 1; + } + /** + * + * + *
+       * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+       * BMP.
+       * 
+ * + * string image_bytes = 1; + * + * @return The imageBytes. + */ + @java.lang.Override + public java.lang.String getImageBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 1) { + ref = image_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 1) { + image_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+       * BMP.
+       * 
+ * + * string image_bytes = 1; + * + * @return The bytes for imageBytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageBytesBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 1) { + ref = image_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 1) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+       * BMP.
+       * 
+ * + * string image_bytes = 1; + * + * @param value The imageBytes to set. + * @return This builder for chaining. + */ + public Builder setImageBytes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageCase_ = 1; + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+       * BMP.
+       * 
+ * + * string image_bytes = 1; + * + * @return This builder for chaining. + */ + public Builder clearImageBytes() { + if (imageCase_ == 1) { + imageCase_ = 0; + image_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
+       * BMP.
+       * 
+ * + * string image_bytes = 1; + * + * @param value The bytes for imageBytes to set. + * @return This builder for chaining. + */ + public Builder setImageBytesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageCase_ = 1; + image_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FacetSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The facet key specification.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the facetKey field is set. + */ + boolean hasFacetKey(); + /** + * + * + *
+     * Required. The facet key specification.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The facetKey. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey getFacetKey(); + /** + * + * + *
+     * Required. The facet key specification.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKeyOrBuilder + getFacetKeyOrBuilder(); + + /** + * + * + *
+     * Maximum of facet values that should be returned for this facet. If
+     * unspecified, defaults to 20. The maximum allowed value is 300. Values
+     * above 300 are coerced to 300.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 limit = 2; + * + * @return The limit. + */ + int getLimit(); + + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @return A list containing the excludedFilterKeys. + */ + java.util.List getExcludedFilterKeysList(); + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @return The count of excludedFilterKeys. + */ + int getExcludedFilterKeysCount(); + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param index The index of the element to return. + * @return The excludedFilterKeys at the given index. + */ + java.lang.String getExcludedFilterKeys(int index); + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param index The index of the value to return. + * @return The bytes of the excludedFilterKeys at the given index. + */ + com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index); + + /** + * + * + *
+     * Enables dynamic position for this facet. If set to true, the position of
+     * this facet among all facets in the response is determined automatically.
+     * If dynamic facets are enabled, it is ordered together.
+     * If set to false, the position of this facet in the
+     * response is the same as in the request, and it is ranked before
+     * the facets with dynamic position enable and all dynamic facets.
+     *
+     * For example, you may always want to have rating facet returned in
+     * the response, but it's not necessarily to always display the rating facet
+     * at the top. In that case, you can set enable_dynamic_position to true so
+     * that the position of rating facet in response is determined
+     * automatically.
+     *
+     * Another example, assuming you have the following facets in the request:
+     *
+     * * "rating", enable_dynamic_position = true
+     *
+     * * "price", enable_dynamic_position = false
+     *
+     * * "brands", enable_dynamic_position = false
+     *
+     * And also you have a dynamic facets enabled, which generates a facet
+     * `gender`. Then the final order of the facets in the response can be
+     * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
+     * "rating") depends on how API orders "gender" and "rating" facets.
+     * However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * is false.
+     * 
+ * + * bool enable_dynamic_position = 4; + * + * @return The enableDynamicPosition. + */ + boolean getEnableDynamicPosition(); + } + /** + * + * + *
+   * A facet specification to perform faceted search.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec} + */ + public static final class FacetSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) + FacetSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetSpec.newBuilder() to construct. + private FacetSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetSpec() { + excludedFilterKeys_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder.class); + } + + public interface FacetKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Supported textual and numerical facet keys in
+       * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+       * which the facet values are computed. Facet key is case-sensitive.
+       * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+       * Required. Supported textual and numerical facet keys in
+       * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+       * which the facet values are computed. Facet key is case-sensitive.
+       * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + java.util.List getIntervalsList(); + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + com.google.cloud.discoveryengine.v1alpha.Interval getIntervals(int index); + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + int getIntervalsCount(); + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + java.util.List + getIntervalsOrBuilderList(); + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder getIntervalsOrBuilder(int index); + + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @return A list containing the restrictedValues. + */ + java.util.List getRestrictedValuesList(); + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @return The count of restrictedValues. + */ + int getRestrictedValuesCount(); + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @param index The index of the element to return. + * @return The restrictedValues at the given index. + */ + java.lang.String getRestrictedValues(int index); + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @param index The index of the value to return. + * @return The bytes of the restrictedValues at the given index. + */ + com.google.protobuf.ByteString getRestrictedValuesBytes(int index); + + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @return A list containing the prefixes. + */ + java.util.List getPrefixesList(); + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @return The count of prefixes. + */ + int getPrefixesCount(); + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @param index The index of the element to return. + * @return The prefixes at the given index. + */ + java.lang.String getPrefixes(int index); + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the prefixes at the given index. + */ + com.google.protobuf.ByteString getPrefixesBytes(int index); + + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @return A list containing the contains. + */ + java.util.List getContainsList(); + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @return The count of contains. + */ + int getContainsCount(); + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @param index The index of the element to return. + * @return The contains at the given index. + */ + java.lang.String getContains(int index); + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @param index The index of the value to return. + * @return The bytes of the contains at the given index. + */ + com.google.protobuf.ByteString getContainsBytes(int index); + + /** + * + * + *
+       * True to make facet keys case insensitive when getting faceting
+       * values with prefixes or contains; false otherwise.
+       * 
+ * + * bool case_insensitive = 6; + * + * @return The caseInsensitive. + */ + boolean getCaseInsensitive(); + + /** + * + * + *
+       * The order in which documents are returned.
+       *
+       * Allowed values are:
+       *
+       * * "count desc", which means order by
+       * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+       * descending.
+       *
+       * * "value desc", which means order by
+       * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+       * descending.
+       *   Only applies to textual facets.
+       *
+       * If not set, textual values are sorted in [natural
+       * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+       * intervals are sorted in the order given by
+       * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * string order_by = 7; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+       * The order in which documents are returned.
+       *
+       * Allowed values are:
+       *
+       * * "count desc", which means order by
+       * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+       * descending.
+       *
+       * * "value desc", which means order by
+       * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+       * descending.
+       *   Only applies to textual facets.
+       *
+       * If not set, textual values are sorted in [natural
+       * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+       * intervals are sorted in the order given by
+       * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * string order_by = 7; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + } + /** + * + * + *
+     * Specifies how a facet is computed.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey} + */ + public static final class FacetKey extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) + FacetKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetKey.newBuilder() to construct. + private FacetKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetKey() { + key_ = ""; + intervals_ = java.util.Collections.emptyList(); + restrictedValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + prefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + contains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetKey(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.Builder + .class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+       * Required. Supported textual and numerical facet keys in
+       * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+       * which the facet values are computed. Facet key is case-sensitive.
+       * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+       * Required. Supported textual and numerical facet keys in
+       * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+       * which the facet values are computed. Facet key is case-sensitive.
+       * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERVALS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List intervals_; + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + @java.lang.Override + public java.util.List getIntervalsList() { + return intervals_; + } + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + @java.lang.Override + public java.util.List + getIntervalsOrBuilderList() { + return intervals_; + } + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + @java.lang.Override + public int getIntervalsCount() { + return intervals_.size(); + } + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Interval getIntervals(int index) { + return intervals_.get(index); + } + /** + * + * + *
+       * Set only if values should be bucketed into intervals. Must be set
+       * for facets with numerical values. Must not be set for facet with text
+       * values. Maximum number of intervals is 30.
+       * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder getIntervalsOrBuilder( + int index) { + return intervals_.get(index); + } + + public static final int RESTRICTED_VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList restrictedValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @return A list containing the restrictedValues. + */ + public com.google.protobuf.ProtocolStringList getRestrictedValuesList() { + return restrictedValues_; + } + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @return The count of restrictedValues. + */ + public int getRestrictedValuesCount() { + return restrictedValues_.size(); + } + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @param index The index of the element to return. + * @return The restrictedValues at the given index. + */ + public java.lang.String getRestrictedValues(int index) { + return restrictedValues_.get(index); + } + /** + * + * + *
+       * Only get facet for the given restricted values. Only supported on
+       * textual fields. For example, suppose "category" has three values
+       * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+       * "restricted_values" to "Action > 2022", the "category" facet only
+       * contains "Action > 2022". Only supported on textual fields. Maximum
+       * is 10.
+       * 
+ * + * repeated string restricted_values = 3; + * + * @param index The index of the value to return. + * @return The bytes of the restrictedValues at the given index. + */ + public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) { + return restrictedValues_.getByteString(index); + } + + public static final int PREFIXES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList prefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @return A list containing the prefixes. + */ + public com.google.protobuf.ProtocolStringList getPrefixesList() { + return prefixes_; + } + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @return The count of prefixes. + */ + public int getPrefixesCount() { + return prefixes_.size(); + } + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @param index The index of the element to return. + * @return The prefixes at the given index. + */ + public java.lang.String getPrefixes(int index) { + return prefixes_.get(index); + } + /** + * + * + *
+       * Only get facet values that start with the given string prefix. For
+       * example, suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+       * "category" facet only contains "Action > 2022" and "Action > 2021".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the prefixes at the given index. + */ + public com.google.protobuf.ByteString getPrefixesBytes(int index) { + return prefixes_.getByteString(index); + } + + public static final int CONTAINS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList contains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @return A list containing the contains. + */ + public com.google.protobuf.ProtocolStringList getContainsList() { + return contains_; + } + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @return The count of contains. + */ + public int getContainsCount() { + return contains_.size(); + } + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @param index The index of the element to return. + * @return The contains at the given index. + */ + public java.lang.String getContains(int index) { + return contains_.get(index); + } + /** + * + * + *
+       * Only get facet values that contains the given strings. For example,
+       * suppose "category" has three values "Action > 2022",
+       * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+       * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+       * Only supported on textual fields. Maximum is 10.
+       * 
+ * + * repeated string contains = 5; + * + * @param index The index of the value to return. + * @return The bytes of the contains at the given index. + */ + public com.google.protobuf.ByteString getContainsBytes(int index) { + return contains_.getByteString(index); + } + + public static final int CASE_INSENSITIVE_FIELD_NUMBER = 6; + private boolean caseInsensitive_ = false; + /** + * + * + *
+       * True to make facet keys case insensitive when getting faceting
+       * values with prefixes or contains; false otherwise.
+       * 
+ * + * bool case_insensitive = 6; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+       * The order in which documents are returned.
+       *
+       * Allowed values are:
+       *
+       * * "count desc", which means order by
+       * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+       * descending.
+       *
+       * * "value desc", which means order by
+       * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+       * descending.
+       *   Only applies to textual facets.
+       *
+       * If not set, textual values are sorted in [natural
+       * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+       * intervals are sorted in the order given by
+       * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * string order_by = 7; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+       * The order in which documents are returned.
+       *
+       * Allowed values are:
+       *
+       * * "count desc", which means order by
+       * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+       * descending.
+       *
+       * * "value desc", which means order by
+       * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+       * descending.
+       *   Only applies to textual facets.
+       *
+       * If not set, textual values are sorted in [natural
+       * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+       * intervals are sorted in the order given by
+       * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * string order_by = 7; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + for (int i = 0; i < intervals_.size(); i++) { + output.writeMessage(2, intervals_.get(i)); + } + for (int i = 0; i < restrictedValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, restrictedValues_.getRaw(i)); + } + for (int i = 0; i < prefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, prefixes_.getRaw(i)); + } + for (int i = 0; i < contains_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, contains_.getRaw(i)); + } + if (caseInsensitive_ != false) { + output.writeBool(6, caseInsensitive_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + for (int i = 0; i < intervals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, intervals_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < restrictedValues_.size(); i++) { + dataSize += computeStringSizeNoTag(restrictedValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getRestrictedValuesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < prefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(prefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getPrefixesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < contains_.size(); i++) { + dataSize += computeStringSizeNoTag(contains_.getRaw(i)); + } + size += dataSize; + size += 1 * getContainsList().size(); + } + if (caseInsensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, caseInsensitive_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getIntervalsList().equals(other.getIntervalsList())) return false; + if (!getRestrictedValuesList().equals(other.getRestrictedValuesList())) return false; + if (!getPrefixesList().equals(other.getPrefixesList())) return false; + if (!getContainsList().equals(other.getContainsList())) return false; + if (getCaseInsensitive() != other.getCaseInsensitive()) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (getIntervalsCount() > 0) { + hash = (37 * hash) + INTERVALS_FIELD_NUMBER; + hash = (53 * hash) + getIntervalsList().hashCode(); + } + if (getRestrictedValuesCount() > 0) { + hash = (37 * hash) + RESTRICTED_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getRestrictedValuesList().hashCode(); + } + if (getPrefixesCount() > 0) { + hash = (37 * hash) + PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getPrefixesList().hashCode(); + } + if (getContainsCount() > 0) { + hash = (37 * hash) + CONTAINS_FIELD_NUMBER; + hash = (53 * hash) + getContainsList().hashCode(); + } + hash = (37 * hash) + CASE_INSENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseInsensitive()); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Specifies how a facet is computed.
+       * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + if (intervalsBuilder_ == null) { + intervals_ = java.util.Collections.emptyList(); + } else { + intervals_ = null; + intervalsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + restrictedValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + prefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + contains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + caseInsensitive_ = false; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey result) { + if (intervalsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + intervals_ = java.util.Collections.unmodifiableList(intervals_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.intervals_ = intervals_; + } else { + result.intervals_ = intervalsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + restrictedValues_.makeImmutable(); + result.restrictedValues_ = restrictedValues_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + prefixes_.makeImmutable(); + result.prefixes_ = prefixes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + contains_.makeImmutable(); + result.contains_ = contains_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.caseInsensitive_ = caseInsensitive_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + .getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (intervalsBuilder_ == null) { + if (!other.intervals_.isEmpty()) { + if (intervals_.isEmpty()) { + intervals_ = other.intervals_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIntervalsIsMutable(); + intervals_.addAll(other.intervals_); + } + onChanged(); + } + } else { + if (!other.intervals_.isEmpty()) { + if (intervalsBuilder_.isEmpty()) { + intervalsBuilder_.dispose(); + intervalsBuilder_ = null; + intervals_ = other.intervals_; + bitField0_ = (bitField0_ & ~0x00000002); + intervalsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIntervalsFieldBuilder() + : null; + } else { + intervalsBuilder_.addAllMessages(other.intervals_); + } + } + } + if (!other.restrictedValues_.isEmpty()) { + if (restrictedValues_.isEmpty()) { + restrictedValues_ = other.restrictedValues_; + bitField0_ |= 0x00000004; + } else { + ensureRestrictedValuesIsMutable(); + restrictedValues_.addAll(other.restrictedValues_); + } + onChanged(); + } + if (!other.prefixes_.isEmpty()) { + if (prefixes_.isEmpty()) { + prefixes_ = other.prefixes_; + bitField0_ |= 0x00000008; + } else { + ensurePrefixesIsMutable(); + prefixes_.addAll(other.prefixes_); + } + onChanged(); + } + if (!other.contains_.isEmpty()) { + if (contains_.isEmpty()) { + contains_ = other.contains_; + bitField0_ |= 0x00000010; + } else { + ensureContainsIsMutable(); + contains_.addAll(other.contains_); + } + onChanged(); + } + if (other.getCaseInsensitive() != false) { + setCaseInsensitive(other.getCaseInsensitive()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.discoveryengine.v1alpha.Interval m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.Interval.parser(), + extensionRegistry); + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.add(m); + } else { + intervalsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRestrictedValuesIsMutable(); + restrictedValues_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePrefixesIsMutable(); + prefixes_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureContainsIsMutable(); + contains_.add(s); + break; + } // case 42 + case 48: + { + caseInsensitive_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+         * Required. Supported textual and numerical facet keys in
+         * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+         * which the facet values are computed. Facet key is case-sensitive.
+         * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. Supported textual and numerical facet keys in
+         * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+         * which the facet values are computed. Facet key is case-sensitive.
+         * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. Supported textual and numerical facet keys in
+         * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+         * which the facet values are computed. Facet key is case-sensitive.
+         * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Supported textual and numerical facet keys in
+         * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+         * which the facet values are computed. Facet key is case-sensitive.
+         * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Supported textual and numerical facet keys in
+         * [Document][google.cloud.discoveryengine.v1alpha.Document] object, over
+         * which the facet values are computed. Facet key is case-sensitive.
+         * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List intervals_ = + java.util.Collections.emptyList(); + + private void ensureIntervalsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + intervals_ = + new java.util.ArrayList( + intervals_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Interval, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder, + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder> + intervalsBuilder_; + + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public java.util.List + getIntervalsList() { + if (intervalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(intervals_); + } else { + return intervalsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public int getIntervalsCount() { + if (intervalsBuilder_ == null) { + return intervals_.size(); + } else { + return intervalsBuilder_.getCount(); + } + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Interval getIntervals(int index) { + if (intervalsBuilder_ == null) { + return intervals_.get(index); + } else { + return intervalsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder setIntervals( + int index, com.google.cloud.discoveryengine.v1alpha.Interval value) { + if (intervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntervalsIsMutable(); + intervals_.set(index, value); + onChanged(); + } else { + intervalsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder setIntervals( + int index, com.google.cloud.discoveryengine.v1alpha.Interval.Builder builderForValue) { + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.set(index, builderForValue.build()); + onChanged(); + } else { + intervalsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder addIntervals(com.google.cloud.discoveryengine.v1alpha.Interval value) { + if (intervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntervalsIsMutable(); + intervals_.add(value); + onChanged(); + } else { + intervalsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder addIntervals( + int index, com.google.cloud.discoveryengine.v1alpha.Interval value) { + if (intervalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntervalsIsMutable(); + intervals_.add(index, value); + onChanged(); + } else { + intervalsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder addIntervals( + com.google.cloud.discoveryengine.v1alpha.Interval.Builder builderForValue) { + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.add(builderForValue.build()); + onChanged(); + } else { + intervalsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder addIntervals( + int index, com.google.cloud.discoveryengine.v1alpha.Interval.Builder builderForValue) { + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.add(index, builderForValue.build()); + onChanged(); + } else { + intervalsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder addAllIntervals( + java.lang.Iterable + values) { + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intervals_); + onChanged(); + } else { + intervalsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder clearIntervals() { + if (intervalsBuilder_ == null) { + intervals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + intervalsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public Builder removeIntervals(int index) { + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.remove(index); + onChanged(); + } else { + intervalsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Interval.Builder getIntervalsBuilder( + int index) { + return getIntervalsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder getIntervalsOrBuilder( + int index) { + if (intervalsBuilder_ == null) { + return intervals_.get(index); + } else { + return intervalsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public java.util.List + getIntervalsOrBuilderList() { + if (intervalsBuilder_ != null) { + return intervalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(intervals_); + } + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Interval.Builder addIntervalsBuilder() { + return getIntervalsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance()); + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Interval.Builder addIntervalsBuilder( + int index) { + return getIntervalsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance()); + } + /** + * + * + *
+         * Set only if values should be bucketed into intervals. Must be set
+         * for facets with numerical values. Must not be set for facet with text
+         * values. Maximum number of intervals is 30.
+         * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.Interval intervals = 2; + */ + public java.util.List + getIntervalsBuilderList() { + return getIntervalsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Interval, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder, + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder> + getIntervalsFieldBuilder() { + if (intervalsBuilder_ == null) { + intervalsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Interval, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder, + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder>( + intervals_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + intervals_ = null; + } + return intervalsBuilder_; + } + + private com.google.protobuf.LazyStringArrayList restrictedValues_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRestrictedValuesIsMutable() { + if (!restrictedValues_.isModifiable()) { + restrictedValues_ = new com.google.protobuf.LazyStringArrayList(restrictedValues_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @return A list containing the restrictedValues. + */ + public com.google.protobuf.ProtocolStringList getRestrictedValuesList() { + restrictedValues_.makeImmutable(); + return restrictedValues_; + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @return The count of restrictedValues. + */ + public int getRestrictedValuesCount() { + return restrictedValues_.size(); + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @param index The index of the element to return. + * @return The restrictedValues at the given index. + */ + public java.lang.String getRestrictedValues(int index) { + return restrictedValues_.get(index); + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @param index The index of the value to return. + * @return The bytes of the restrictedValues at the given index. + */ + public com.google.protobuf.ByteString getRestrictedValuesBytes(int index) { + return restrictedValues_.getByteString(index); + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @param index The index to set the value at. + * @param value The restrictedValues to set. + * @return This builder for chaining. + */ + public Builder setRestrictedValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictedValuesIsMutable(); + restrictedValues_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @param value The restrictedValues to add. + * @return This builder for chaining. + */ + public Builder addRestrictedValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictedValuesIsMutable(); + restrictedValues_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @param values The restrictedValues to add. + * @return This builder for chaining. + */ + public Builder addAllRestrictedValues(java.lang.Iterable values) { + ensureRestrictedValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restrictedValues_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @return This builder for chaining. + */ + public Builder clearRestrictedValues() { + restrictedValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet for the given restricted values. Only supported on
+         * textual fields. For example, suppose "category" has three values
+         * "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
+         * "restricted_values" to "Action > 2022", the "category" facet only
+         * contains "Action > 2022". Only supported on textual fields. Maximum
+         * is 10.
+         * 
+ * + * repeated string restricted_values = 3; + * + * @param value The bytes of the restrictedValues to add. + * @return This builder for chaining. + */ + public Builder addRestrictedValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRestrictedValuesIsMutable(); + restrictedValues_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList prefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePrefixesIsMutable() { + if (!prefixes_.isModifiable()) { + prefixes_ = new com.google.protobuf.LazyStringArrayList(prefixes_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @return A list containing the prefixes. + */ + public com.google.protobuf.ProtocolStringList getPrefixesList() { + prefixes_.makeImmutable(); + return prefixes_; + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @return The count of prefixes. + */ + public int getPrefixesCount() { + return prefixes_.size(); + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @param index The index of the element to return. + * @return The prefixes at the given index. + */ + public java.lang.String getPrefixes(int index) { + return prefixes_.get(index); + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the prefixes at the given index. + */ + public com.google.protobuf.ByteString getPrefixesBytes(int index) { + return prefixes_.getByteString(index); + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @param index The index to set the value at. + * @param value The prefixes to set. + * @return This builder for chaining. + */ + public Builder setPrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrefixesIsMutable(); + prefixes_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @param value The prefixes to add. + * @return This builder for chaining. + */ + public Builder addPrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrefixesIsMutable(); + prefixes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @param values The prefixes to add. + * @return This builder for chaining. + */ + public Builder addAllPrefixes(java.lang.Iterable values) { + ensurePrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, prefixes_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @return This builder for chaining. + */ + public Builder clearPrefixes() { + prefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that start with the given string prefix. For
+         * example, suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
+         * "category" facet only contains "Action > 2022" and "Action > 2021".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string prefixes = 4; + * + * @param value The bytes of the prefixes to add. + * @return This builder for chaining. + */ + public Builder addPrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePrefixesIsMutable(); + prefixes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList contains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureContainsIsMutable() { + if (!contains_.isModifiable()) { + contains_ = new com.google.protobuf.LazyStringArrayList(contains_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @return A list containing the contains. + */ + public com.google.protobuf.ProtocolStringList getContainsList() { + contains_.makeImmutable(); + return contains_; + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @return The count of contains. + */ + public int getContainsCount() { + return contains_.size(); + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @param index The index of the element to return. + * @return The contains at the given index. + */ + public java.lang.String getContains(int index) { + return contains_.get(index); + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @param index The index of the value to return. + * @return The bytes of the contains at the given index. + */ + public com.google.protobuf.ByteString getContainsBytes(int index) { + return contains_.getByteString(index); + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @param index The index to set the value at. + * @param value The contains to set. + * @return This builder for chaining. + */ + public Builder setContains(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainsIsMutable(); + contains_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @param value The contains to add. + * @return This builder for chaining. + */ + public Builder addContains(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainsIsMutable(); + contains_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @param values The contains to add. + * @return This builder for chaining. + */ + public Builder addAllContains(java.lang.Iterable values) { + ensureContainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contains_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @return This builder for chaining. + */ + public Builder clearContains() { + contains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * Only get facet values that contains the given strings. For example,
+         * suppose "category" has three values "Action > 2022",
+         * "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
+         * "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
+         * Only supported on textual fields. Maximum is 10.
+         * 
+ * + * repeated string contains = 5; + * + * @param value The bytes of the contains to add. + * @return This builder for chaining. + */ + public Builder addContainsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureContainsIsMutable(); + contains_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean caseInsensitive_; + /** + * + * + *
+         * True to make facet keys case insensitive when getting faceting
+         * values with prefixes or contains; false otherwise.
+         * 
+ * + * bool case_insensitive = 6; + * + * @return The caseInsensitive. + */ + @java.lang.Override + public boolean getCaseInsensitive() { + return caseInsensitive_; + } + /** + * + * + *
+         * True to make facet keys case insensitive when getting faceting
+         * values with prefixes or contains; false otherwise.
+         * 
+ * + * bool case_insensitive = 6; + * + * @param value The caseInsensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseInsensitive(boolean value) { + + caseInsensitive_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+         * True to make facet keys case insensitive when getting faceting
+         * values with prefixes or contains; false otherwise.
+         * 
+ * + * bool case_insensitive = 6; + * + * @return This builder for chaining. + */ + public Builder clearCaseInsensitive() { + bitField0_ = (bitField0_ & ~0x00000020); + caseInsensitive_ = false; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+         * The order in which documents are returned.
+         *
+         * Allowed values are:
+         *
+         * * "count desc", which means order by
+         * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+         * descending.
+         *
+         * * "value desc", which means order by
+         * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+         * descending.
+         *   Only applies to textual facets.
+         *
+         * If not set, textual values are sorted in [natural
+         * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+         * intervals are sorted in the order given by
+         * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * string order_by = 7; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The order in which documents are returned.
+         *
+         * Allowed values are:
+         *
+         * * "count desc", which means order by
+         * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+         * descending.
+         *
+         * * "value desc", which means order by
+         * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+         * descending.
+         *   Only applies to textual facets.
+         *
+         * If not set, textual values are sorted in [natural
+         * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+         * intervals are sorted in the order given by
+         * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * string order_by = 7; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The order in which documents are returned.
+         *
+         * Allowed values are:
+         *
+         * * "count desc", which means order by
+         * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+         * descending.
+         *
+         * * "value desc", which means order by
+         * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+         * descending.
+         *   Only applies to textual facets.
+         *
+         * If not set, textual values are sorted in [natural
+         * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+         * intervals are sorted in the order given by
+         * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * string order_by = 7; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+         * The order in which documents are returned.
+         *
+         * Allowed values are:
+         *
+         * * "count desc", which means order by
+         * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+         * descending.
+         *
+         * * "value desc", which means order by
+         * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+         * descending.
+         *   Only applies to textual facets.
+         *
+         * If not set, textual values are sorted in [natural
+         * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+         * intervals are sorted in the order given by
+         * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * string order_by = 7; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+         * The order in which documents are returned.
+         *
+         * Allowed values are:
+         *
+         * * "count desc", which means order by
+         * [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count]
+         * descending.
+         *
+         * * "value desc", which means order by
+         * [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value]
+         * descending.
+         *   Only applies to textual facets.
+         *
+         * If not set, textual values are sorted in [natural
+         * order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
+         * intervals are sorted in the order given by
+         * [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * string order_by = 7; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FACET_KEY_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facetKey_; + /** + * + * + *
+     * Required. The facet key specification.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the facetKey field is set. + */ + @java.lang.Override + public boolean hasFacetKey() { + return facetKey_ != null; + } + /** + * + * + *
+     * Required. The facet key specification.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The facetKey. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey getFacetKey() { + return facetKey_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + .getDefaultInstance() + : facetKey_; + } + /** + * + * + *
+     * Required. The facet key specification.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKeyOrBuilder + getFacetKeyOrBuilder() { + return facetKey_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + .getDefaultInstance() + : facetKey_; + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private int limit_ = 0; + /** + * + * + *
+     * Maximum of facet values that should be returned for this facet. If
+     * unspecified, defaults to 20. The maximum allowed value is 300. Values
+     * above 300 are coerced to 300.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 limit = 2; + * + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + + public static final int EXCLUDED_FILTER_KEYS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludedFilterKeys_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @return A list containing the excludedFilterKeys. + */ + public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() { + return excludedFilterKeys_; + } + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @return The count of excludedFilterKeys. + */ + public int getExcludedFilterKeysCount() { + return excludedFilterKeys_.size(); + } + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param index The index of the element to return. + * @return The excludedFilterKeys at the given index. + */ + public java.lang.String getExcludedFilterKeys(int index) { + return excludedFilterKeys_.get(index); + } + /** + * + * + *
+     * List of keys to exclude when faceting.
+     *
+     *
+     * By default,
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * is not excluded from the filter unless it is listed in this field.
+     *
+     * Listing a facet key in this field allows its values to appear as facet
+     * results, even when they are filtered out of search results. Using this
+     * field does not affect what search results are returned.
+     *
+     * For example, suppose there are 100 documents with the color facet "Red"
+     * and 200 documents with the color facet "Blue". A query containing the
+     * filter "color:ANY("Red")" and having "color" as
+     * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+     * would by default return only "Red" documents in the search results, and
+     * also return "Red" with count 100 as the only color facet. Although there
+     * are also blue documents available, "Blue" would not be shown as an
+     * available facet value.
+     *
+     * If "color" is listed in "excludedFilterKeys", then the query returns the
+     * facet values "Red" with count 100 and "Blue" with count 200, because the
+     * "color" key is now excluded from the filter. Because this field doesn't
+     * affect search results, the search results are still correctly filtered to
+     * return only "Red" documents.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param index The index of the value to return. + * @return The bytes of the excludedFilterKeys at the given index. + */ + public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) { + return excludedFilterKeys_.getByteString(index); + } + + public static final int ENABLE_DYNAMIC_POSITION_FIELD_NUMBER = 4; + private boolean enableDynamicPosition_ = false; + /** + * + * + *
+     * Enables dynamic position for this facet. If set to true, the position of
+     * this facet among all facets in the response is determined automatically.
+     * If dynamic facets are enabled, it is ordered together.
+     * If set to false, the position of this facet in the
+     * response is the same as in the request, and it is ranked before
+     * the facets with dynamic position enable and all dynamic facets.
+     *
+     * For example, you may always want to have rating facet returned in
+     * the response, but it's not necessarily to always display the rating facet
+     * at the top. In that case, you can set enable_dynamic_position to true so
+     * that the position of rating facet in response is determined
+     * automatically.
+     *
+     * Another example, assuming you have the following facets in the request:
+     *
+     * * "rating", enable_dynamic_position = true
+     *
+     * * "price", enable_dynamic_position = false
+     *
+     * * "brands", enable_dynamic_position = false
+     *
+     * And also you have a dynamic facets enabled, which generates a facet
+     * `gender`. Then the final order of the facets in the response can be
+     * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
+     * "rating") depends on how API orders "gender" and "rating" facets.
+     * However, notice that "price" and "brands" are always
+     * ranked at first and second position because their enable_dynamic_position
+     * is false.
+     * 
+ * + * bool enable_dynamic_position = 4; + * + * @return The enableDynamicPosition. + */ + @java.lang.Override + public boolean getEnableDynamicPosition() { + return enableDynamicPosition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (facetKey_ != null) { + output.writeMessage(1, getFacetKey()); + } + if (limit_ != 0) { + output.writeInt32(2, limit_); + } + for (int i = 0; i < excludedFilterKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, excludedFilterKeys_.getRaw(i)); + } + if (enableDynamicPosition_ != false) { + output.writeBool(4, enableDynamicPosition_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (facetKey_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFacetKey()); + } + if (limit_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, limit_); + } + { + int dataSize = 0; + for (int i = 0; i < excludedFilterKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(excludedFilterKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludedFilterKeysList().size(); + } + if (enableDynamicPosition_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableDynamicPosition_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) obj; + + if (hasFacetKey() != other.hasFacetKey()) return false; + if (hasFacetKey()) { + if (!getFacetKey().equals(other.getFacetKey())) return false; + } + if (getLimit() != other.getLimit()) return false; + if (!getExcludedFilterKeysList().equals(other.getExcludedFilterKeysList())) return false; + if (getEnableDynamicPosition() != other.getEnableDynamicPosition()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFacetKey()) { + hash = (37 * hash) + FACET_KEY_FIELD_NUMBER; + hash = (53 * hash) + getFacetKey().hashCode(); + } + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + if (getExcludedFilterKeysCount() > 0) { + hash = (37 * hash) + EXCLUDED_FILTER_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedFilterKeysList().hashCode(); + } + hash = (37 * hash) + ENABLE_DYNAMIC_POSITION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDynamicPosition()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A facet specification to perform faceted search.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + facetKey_ = null; + if (facetKeyBuilder_ != null) { + facetKeyBuilder_.dispose(); + facetKeyBuilder_ = null; + } + limit_ = 0; + excludedFilterKeys_ = com.google.protobuf.LazyStringArrayList.emptyList(); + enableDynamicPosition_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.facetKey_ = facetKeyBuilder_ == null ? facetKey_ : facetKeyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limit_ = limit_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + excludedFilterKeys_.makeImmutable(); + result.excludedFilterKeys_ = excludedFilterKeys_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enableDynamicPosition_ = enableDynamicPosition_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + .getDefaultInstance()) return this; + if (other.hasFacetKey()) { + mergeFacetKey(other.getFacetKey()); + } + if (other.getLimit() != 0) { + setLimit(other.getLimit()); + } + if (!other.excludedFilterKeys_.isEmpty()) { + if (excludedFilterKeys_.isEmpty()) { + excludedFilterKeys_ = other.excludedFilterKeys_; + bitField0_ |= 0x00000004; + } else { + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.addAll(other.excludedFilterKeys_); + } + onChanged(); + } + if (other.getEnableDynamicPosition() != false) { + setEnableDynamicPosition(other.getEnableDynamicPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFacetKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + limit_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.add(s); + break; + } // case 26 + case 32: + { + enableDynamicPosition_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facetKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKeyOrBuilder> + facetKeyBuilder_; + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the facetKey field is set. + */ + public boolean hasFacetKey() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The facetKey. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + getFacetKey() { + if (facetKeyBuilder_ == null) { + return facetKey_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + .getDefaultInstance() + : facetKey_; + } else { + return facetKeyBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFacetKey( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey value) { + if (facetKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + facetKey_ = value; + } else { + facetKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFacetKey( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.Builder + builderForValue) { + if (facetKeyBuilder_ == null) { + facetKey_ = builderForValue.build(); + } else { + facetKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFacetKey( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey value) { + if (facetKeyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && facetKey_ != null + && facetKey_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + .getDefaultInstance()) { + getFacetKeyBuilder().mergeFrom(value); + } else { + facetKey_ = value; + } + } else { + facetKeyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFacetKey() { + bitField0_ = (bitField0_ & ~0x00000001); + facetKey_ = null; + if (facetKeyBuilder_ != null) { + facetKeyBuilder_.dispose(); + facetKeyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.Builder + getFacetKeyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFacetKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKeyOrBuilder + getFacetKeyOrBuilder() { + if (facetKeyBuilder_ != null) { + return facetKeyBuilder_.getMessageOrBuilder(); + } else { + return facetKey_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey + .getDefaultInstance() + : facetKey_; + } + } + /** + * + * + *
+       * Required. The facet key specification.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey facet_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKeyOrBuilder> + getFacetKeyFieldBuilder() { + if (facetKeyBuilder_ == null) { + facetKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + .FacetKeyOrBuilder>(getFacetKey(), getParentForChildren(), isClean()); + facetKey_ = null; + } + return facetKeyBuilder_; + } + + private int limit_; + /** + * + * + *
+       * Maximum of facet values that should be returned for this facet. If
+       * unspecified, defaults to 20. The maximum allowed value is 300. Values
+       * above 300 are coerced to 300.
+       *
+       * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+       * 
+ * + * int32 limit = 2; + * + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + /** + * + * + *
+       * Maximum of facet values that should be returned for this facet. If
+       * unspecified, defaults to 20. The maximum allowed value is 300. Values
+       * above 300 are coerced to 300.
+       *
+       * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+       * 
+ * + * int32 limit = 2; + * + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(int value) { + + limit_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Maximum of facet values that should be returned for this facet. If
+       * unspecified, defaults to 20. The maximum allowed value is 300. Values
+       * above 300 are coerced to 300.
+       *
+       * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+       * 
+ * + * int32 limit = 2; + * + * @return This builder for chaining. + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludedFilterKeys_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludedFilterKeysIsMutable() { + if (!excludedFilterKeys_.isModifiable()) { + excludedFilterKeys_ = new com.google.protobuf.LazyStringArrayList(excludedFilterKeys_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @return A list containing the excludedFilterKeys. + */ + public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() { + excludedFilterKeys_.makeImmutable(); + return excludedFilterKeys_; + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @return The count of excludedFilterKeys. + */ + public int getExcludedFilterKeysCount() { + return excludedFilterKeys_.size(); + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param index The index of the element to return. + * @return The excludedFilterKeys at the given index. + */ + public java.lang.String getExcludedFilterKeys(int index) { + return excludedFilterKeys_.get(index); + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param index The index of the value to return. + * @return The bytes of the excludedFilterKeys at the given index. + */ + public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) { + return excludedFilterKeys_.getByteString(index); + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param index The index to set the value at. + * @param value The excludedFilterKeys to set. + * @return This builder for chaining. + */ + public Builder setExcludedFilterKeys(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param value The excludedFilterKeys to add. + * @return This builder for chaining. + */ + public Builder addExcludedFilterKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param values The excludedFilterKeys to add. + * @return This builder for chaining. + */ + public Builder addAllExcludedFilterKeys(java.lang.Iterable values) { + ensureExcludedFilterKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludedFilterKeys_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @return This builder for chaining. + */ + public Builder clearExcludedFilterKeys() { + excludedFilterKeys_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * List of keys to exclude when faceting.
+       *
+       *
+       * By default,
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * is not excluded from the filter unless it is listed in this field.
+       *
+       * Listing a facet key in this field allows its values to appear as facet
+       * results, even when they are filtered out of search results. Using this
+       * field does not affect what search results are returned.
+       *
+       * For example, suppose there are 100 documents with the color facet "Red"
+       * and 200 documents with the color facet "Blue". A query containing the
+       * filter "color:ANY("Red")" and having "color" as
+       * [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]
+       * would by default return only "Red" documents in the search results, and
+       * also return "Red" with count 100 as the only color facet. Although there
+       * are also blue documents available, "Blue" would not be shown as an
+       * available facet value.
+       *
+       * If "color" is listed in "excludedFilterKeys", then the query returns the
+       * facet values "Red" with count 100 and "Blue" with count 200, because the
+       * "color" key is now excluded from the filter. Because this field doesn't
+       * affect search results, the search results are still correctly filtered to
+       * return only "Red" documents.
+       *
+       * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+       * error is returned.
+       * 
+ * + * repeated string excluded_filter_keys = 3; + * + * @param value The bytes of the excludedFilterKeys to add. + * @return This builder for chaining. + */ + public Builder addExcludedFilterKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean enableDynamicPosition_; + /** + * + * + *
+       * Enables dynamic position for this facet. If set to true, the position of
+       * this facet among all facets in the response is determined automatically.
+       * If dynamic facets are enabled, it is ordered together.
+       * If set to false, the position of this facet in the
+       * response is the same as in the request, and it is ranked before
+       * the facets with dynamic position enable and all dynamic facets.
+       *
+       * For example, you may always want to have rating facet returned in
+       * the response, but it's not necessarily to always display the rating facet
+       * at the top. In that case, you can set enable_dynamic_position to true so
+       * that the position of rating facet in response is determined
+       * automatically.
+       *
+       * Another example, assuming you have the following facets in the request:
+       *
+       * * "rating", enable_dynamic_position = true
+       *
+       * * "price", enable_dynamic_position = false
+       *
+       * * "brands", enable_dynamic_position = false
+       *
+       * And also you have a dynamic facets enabled, which generates a facet
+       * `gender`. Then the final order of the facets in the response can be
+       * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
+       * "rating") depends on how API orders "gender" and "rating" facets.
+       * However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * is false.
+       * 
+ * + * bool enable_dynamic_position = 4; + * + * @return The enableDynamicPosition. + */ + @java.lang.Override + public boolean getEnableDynamicPosition() { + return enableDynamicPosition_; + } + /** + * + * + *
+       * Enables dynamic position for this facet. If set to true, the position of
+       * this facet among all facets in the response is determined automatically.
+       * If dynamic facets are enabled, it is ordered together.
+       * If set to false, the position of this facet in the
+       * response is the same as in the request, and it is ranked before
+       * the facets with dynamic position enable and all dynamic facets.
+       *
+       * For example, you may always want to have rating facet returned in
+       * the response, but it's not necessarily to always display the rating facet
+       * at the top. In that case, you can set enable_dynamic_position to true so
+       * that the position of rating facet in response is determined
+       * automatically.
+       *
+       * Another example, assuming you have the following facets in the request:
+       *
+       * * "rating", enable_dynamic_position = true
+       *
+       * * "price", enable_dynamic_position = false
+       *
+       * * "brands", enable_dynamic_position = false
+       *
+       * And also you have a dynamic facets enabled, which generates a facet
+       * `gender`. Then the final order of the facets in the response can be
+       * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
+       * "rating") depends on how API orders "gender" and "rating" facets.
+       * However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * is false.
+       * 
+ * + * bool enable_dynamic_position = 4; + * + * @param value The enableDynamicPosition to set. + * @return This builder for chaining. + */ + public Builder setEnableDynamicPosition(boolean value) { + + enableDynamicPosition_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Enables dynamic position for this facet. If set to true, the position of
+       * this facet among all facets in the response is determined automatically.
+       * If dynamic facets are enabled, it is ordered together.
+       * If set to false, the position of this facet in the
+       * response is the same as in the request, and it is ranked before
+       * the facets with dynamic position enable and all dynamic facets.
+       *
+       * For example, you may always want to have rating facet returned in
+       * the response, but it's not necessarily to always display the rating facet
+       * at the top. In that case, you can set enable_dynamic_position to true so
+       * that the position of rating facet in response is determined
+       * automatically.
+       *
+       * Another example, assuming you have the following facets in the request:
+       *
+       * * "rating", enable_dynamic_position = true
+       *
+       * * "price", enable_dynamic_position = false
+       *
+       * * "brands", enable_dynamic_position = false
+       *
+       * And also you have a dynamic facets enabled, which generates a facet
+       * `gender`. Then the final order of the facets in the response can be
+       * ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
+       * "rating") depends on how API orders "gender" and "rating" facets.
+       * However, notice that "price" and "brands" are always
+       * ranked at first and second position because their enable_dynamic_position
+       * is false.
+       * 
+ * + * bool enable_dynamic_position = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnableDynamicPosition() { + bitField0_ = (bitField0_ & ~0x00000008); + enableDynamicPosition_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BoostSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + getConditionBoostSpecsList(); + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getConditionBoostSpecs(int index); + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + int getConditionBoostSpecsCount(); + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList(); + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index); + } + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} + */ + public static final class BoostSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) + BoostSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoostSpec.newBuilder() to construct. + private BoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoostSpec() { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoostSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder.class); + } + + public interface ConditionBoostSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression. See
+       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+       * for detail syntax and limitations.
+       *
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1; + * + * @return The condition. + */ + java.lang.String getCondition(); + /** + * + * + *
+       * An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression. See
+       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+       * for detail syntax and limitations.
+       *
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + com.google.protobuf.ByteString getConditionBytes(); + + /** + * + * + *
+       * Strength of the condition boost, which should be in [-1, 1]. Negative
+       * boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2; + * + * @return The boost. + */ + float getBoost(); + } + /** + * + * + *
+     * Boost applies to documents which match a condition.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec} + */ + public static final class ConditionBoostSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + ConditionBoostSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConditionBoostSpec.newBuilder() to construct. + private ConditionBoostSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConditionBoostSpec() { + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConditionBoostSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder.class); + } + + public static final int CONDITION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object condition_ = ""; + /** + * + * + *
+       * An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression. See
+       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+       * for detail syntax and limitations.
+       *
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1; + * + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } + } + /** + * + * + *
+       * An expression which specifies a boost condition. The syntax and
+       * supported fields are the same as a filter expression. See
+       * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+       * for detail syntax and limitations.
+       *
+       * Examples:
+       *
+       * * To boost documents with document ID "doc_1" or "doc_2", and
+       * color
+       *   "Red" or "Blue":
+       *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+       * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOST_FIELD_NUMBER = 2; + private float boost_ = 0F; + /** + * + * + *
+       * Strength of the condition boost, which should be in [-1, 1]. Negative
+       * boost means demotion. Default is 0.0.
+       *
+       * Setting to 1.0 gives the document a big promotion. However, it does not
+       * necessarily mean that the boosted document will be the top result at
+       * all times, nor that other documents will be excluded. Results could
+       * still be shown even when none of them matches the condition. And
+       * results that are significantly more relevant to the search query can
+       * still trump your heavily favored but irrelevant documents.
+       *
+       * Setting to -1.0 gives the document a big demotion. However, results
+       * that are deeply relevant might still be shown. The document will have
+       * an upstream battle to get a fairly high ranking, but it is not blocked
+       * out completely.
+       *
+       * Setting to 0.0 means no boost applied. The boosting condition is
+       * ignored.
+       * 
+ * + * float boost = 2; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + output.writeFloat(2, boost_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, condition_); + } + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + obj; + + if (!getCondition().equals(other.getCondition())) return false; + if (java.lang.Float.floatToIntBits(getBoost()) + != java.lang.Float.floatToIntBits(other.getBoost())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + hash = (37 * hash) + BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Boost applies to documents which match a condition.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + condition_ = ""; + boost_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.condition_ = condition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boost_ = boost_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .getDefaultInstance()) return this; + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBoost() != 0F) { + setBoost(other.getBoost()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + condition_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + boost_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object condition_ = ""; + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color
+         *   "Red" or "Blue":
+         *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+         * 
+ * + * string condition = 1; + * + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color
+         *   "Red" or "Blue":
+         *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+         * 
+ * + * string condition = 1; + * + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color
+         *   "Red" or "Blue":
+         *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+         * 
+ * + * string condition = 1; + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color
+         *   "Red" or "Blue":
+         *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+         * 
+ * + * string condition = 1; + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + condition_ = getDefaultInstance().getCondition(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * An expression which specifies a boost condition. The syntax and
+         * supported fields are the same as a filter expression. See
+         * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+         * for detail syntax and limitations.
+         *
+         * Examples:
+         *
+         * * To boost documents with document ID "doc_1" or "doc_2", and
+         * color
+         *   "Red" or "Blue":
+         *     * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
+         * 
+ * + * string condition = 1; + * + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float boost_; + /** + * + * + *
+         * Strength of the condition boost, which should be in [-1, 1]. Negative
+         * boost means demotion. Default is 0.0.
+         *
+         * Setting to 1.0 gives the document a big promotion. However, it does not
+         * necessarily mean that the boosted document will be the top result at
+         * all times, nor that other documents will be excluded. Results could
+         * still be shown even when none of them matches the condition. And
+         * results that are significantly more relevant to the search query can
+         * still trump your heavily favored but irrelevant documents.
+         *
+         * Setting to -1.0 gives the document a big demotion. However, results
+         * that are deeply relevant might still be shown. The document will have
+         * an upstream battle to get a fairly high ranking, but it is not blocked
+         * out completely.
+         *
+         * Setting to 0.0 means no boost applied. The boosting condition is
+         * ignored.
+         * 
+ * + * float boost = 2; + * + * @return The boost. + */ + @java.lang.Override + public float getBoost() { + return boost_; + } + /** + * + * + *
+         * Strength of the condition boost, which should be in [-1, 1]. Negative
+         * boost means demotion. Default is 0.0.
+         *
+         * Setting to 1.0 gives the document a big promotion. However, it does not
+         * necessarily mean that the boosted document will be the top result at
+         * all times, nor that other documents will be excluded. Results could
+         * still be shown even when none of them matches the condition. And
+         * results that are significantly more relevant to the search query can
+         * still trump your heavily favored but irrelevant documents.
+         *
+         * Setting to -1.0 gives the document a big demotion. However, results
+         * that are deeply relevant might still be shown. The document will have
+         * an upstream battle to get a fairly high ranking, but it is not blocked
+         * out completely.
+         *
+         * Setting to 0.0 means no boost applied. The boosting condition is
+         * ignored.
+         * 
+ * + * float boost = 2; + * + * @param value The boost to set. + * @return This builder for chaining. + */ + public Builder setBoost(float value) { + + boost_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Strength of the condition boost, which should be in [-1, 1]. Negative
+         * boost means demotion. Default is 0.0.
+         *
+         * Setting to 1.0 gives the document a big promotion. However, it does not
+         * necessarily mean that the boosted document will be the top result at
+         * all times, nor that other documents will be excluded. Results could
+         * still be shown even when none of them matches the condition. And
+         * results that are significantly more relevant to the search query can
+         * still trump your heavily favored but irrelevant documents.
+         *
+         * Setting to -1.0 gives the document a big demotion. However, results
+         * that are deeply relevant might still be shown. The document will have
+         * an upstream battle to get a fairly high ranking, but it is not blocked
+         * out completely.
+         *
+         * Setting to 0.0 means no boost applied. The boosting condition is
+         * ignored.
+         * 
+ * + * float boost = 2; + * + * @return This builder for chaining. + */ + public Builder clearBoost() { + bitField0_ = (bitField0_ & ~0x00000002); + boost_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionBoostSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CONDITION_BOOST_SPECS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + conditionBoostSpecs_; + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + getConditionBoostSpecsList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList() { + return conditionBoostSpecs_; + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public int getConditionBoostSpecsCount() { + return conditionBoostSpecs_.size(); + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getConditionBoostSpecs(int index) { + return conditionBoostSpecs_.get(index); + } + /** + * + * + *
+     * Condition boost specifications. If a document matches multiple conditions
+     * in the specifictions, boost scores from these specifications are all
+     * applied and combined in a non-linear way. Maximum number of
+     * specifications is 20.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index) { + return conditionBoostSpecs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < conditionBoostSpecs_.size(); i++) { + output.writeMessage(1, conditionBoostSpecs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conditionBoostSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, conditionBoostSpecs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) obj; + + if (!getConditionBoostSpecsList().equals(other.getConditionBoostSpecsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConditionBoostSpecsCount() > 0) { + hash = (37 * hash) + CONDITION_BOOST_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getConditionBoostSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + } else { + conditionBoostSpecs_ = null; + conditionBoostSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result) { + if (conditionBoostSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditionBoostSpecs_ = conditionBoostSpecs_; + } else { + result.conditionBoostSpecs_ = conditionBoostSpecsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .getDefaultInstance()) return this; + if (conditionBoostSpecsBuilder_ == null) { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecs_.isEmpty()) { + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.addAll(other.conditionBoostSpecs_); + } + onChanged(); + } + } else { + if (!other.conditionBoostSpecs_.isEmpty()) { + if (conditionBoostSpecsBuilder_.isEmpty()) { + conditionBoostSpecsBuilder_.dispose(); + conditionBoostSpecsBuilder_ = null; + conditionBoostSpecs_ = other.conditionBoostSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionBoostSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConditionBoostSpecsFieldBuilder() + : null; + } else { + conditionBoostSpecsBuilder_.addAllMessages(other.conditionBoostSpecs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec + m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.parser(), + extensionRegistry); + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(m); + } else { + conditionBoostSpecsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + conditionBoostSpecs_ = java.util.Collections.emptyList(); + + private void ensureConditionBoostSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditionBoostSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec>(conditionBoostSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder> + conditionBoostSpecsBuilder_; + + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec> + getConditionBoostSpecsList() { + if (conditionBoostSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionBoostSpecs_); + } else { + return conditionBoostSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public int getConditionBoostSpecsCount() { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.size(); + } else { + return conditionBoostSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + getConditionBoostSpecs(int index) { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.get(index); + } else { + return conditionBoostSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder setConditionBoostSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder setConditionBoostSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder + builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder addConditionBoostSpecs( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder addConditionBoostSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + value) { + if (conditionBoostSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(index, value); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder addConditionBoostSpecs( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder + builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder addConditionBoostSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder + builderForValue) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder addAllConditionBoostSpecs( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec> + values) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditionBoostSpecs_); + onChanged(); + } else { + conditionBoostSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder clearConditionBoostSpecs() { + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionBoostSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public Builder removeConditionBoostSpecs(int index) { + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.remove(index); + onChanged(); + } else { + conditionBoostSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder + getConditionBoostSpecsBuilder(int index) { + return getConditionBoostSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder + getConditionBoostSpecsOrBuilder(int index) { + if (conditionBoostSpecsBuilder_ == null) { + return conditionBoostSpecs_.get(index); + } else { + return conditionBoostSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder> + getConditionBoostSpecsOrBuilderList() { + if (conditionBoostSpecsBuilder_ != null) { + return conditionBoostSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditionBoostSpecs_); + } + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder + addConditionBoostSpecsBuilder() { + return getConditionBoostSpecsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .getDefaultInstance()); + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder + addConditionBoostSpecsBuilder(int index) { + return getConditionBoostSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .getDefaultInstance()); + } + /** + * + * + *
+       * Condition boost specifications. If a document matches multiple conditions
+       * in the specifictions, boost scores from these specifications are all
+       * applied and combined in a non-linear way. Maximum number of
+       * specifications is 20.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder> + getConditionBoostSpecsBuilderList() { + return getConditionBoostSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder> + getConditionBoostSpecsFieldBuilder() { + if (conditionBoostSpecsBuilder_ == null) { + conditionBoostSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .ConditionBoostSpecOrBuilder>( + conditionBoostSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditionBoostSpecs_ = null; + } + return conditionBoostSpecsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoostSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface QueryExpansionSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The condition under which query expansion should occur. Default to
+     * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @return The enum numeric value on the wire for condition. + */ + int getConditionValue(); + /** + * + * + *
+     * The condition under which query expansion should occur. Default to
+     * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @return The condition. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + getCondition(); + + /** + * + * + *
+     * Whether to pin unexpanded results. If this field is set to true,
+     * unexpanded products are always at the top of the search results, followed
+     * by the expanded results.
+     * 
+ * + * bool pin_unexpanded_results = 2; + * + * @return The pinUnexpandedResults. + */ + boolean getPinUnexpandedResults(); + } + /** + * + * + *
+   * Specification to determine under which conditions query expansion should
+   * occur.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} + */ + public static final class QueryExpansionSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) + QueryExpansionSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryExpansionSpec.newBuilder() to construct. + private QueryExpansionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryExpansionSpec() { + condition_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryExpansionSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Builder + .class); + } + + /** + * + * + *
+     * Enum describing under which condition query expansion should occur.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition} + */ + public enum Condition implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified query expansion condition. In this case, server behavior
+       * defaults to
+       * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+       * 
+ * + * CONDITION_UNSPECIFIED = 0; + */ + CONDITION_UNSPECIFIED(0), + /** + * + * + *
+       * Disabled query expansion. Only the exact search query is used, even if
+       * [SearchResponse.total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size]
+       * is zero.
+       * 
+ * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
+       * Automatic query expansion built by the Search API.
+       * 
+ * + * AUTO = 2; + */ + AUTO(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified query expansion condition. In this case, server behavior
+       * defaults to
+       * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+       * 
+ * + * CONDITION_UNSPECIFIED = 0; + */ + public static final int CONDITION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Disabled query expansion. Only the exact search query is used, even if
+       * [SearchResponse.total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size]
+       * is zero.
+       * 
+ * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + /** + * + * + *
+       * Automatic query expansion built by the Search API.
+       * 
+ * + * AUTO = 2; + */ + public static final int AUTO_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Condition valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Condition forNumber(int value) { + switch (value) { + case 0: + return CONDITION_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return AUTO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Condition findValueByNumber(int number) { + return Condition.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Condition[] VALUES = values(); + + public static Condition valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Condition(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition) + } + + public static final int CONDITION_FIELD_NUMBER = 1; + private int condition_ = 0; + /** + * + * + *
+     * The condition under which query expansion should occur. Default to
+     * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @return The enum numeric value on the wire for condition. + */ + @java.lang.Override + public int getConditionValue() { + return condition_; + } + /** + * + * + *
+     * The condition under which query expansion should occur. Default to
+     * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @return The condition. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + getCondition() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + .forNumber(condition_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + .UNRECOGNIZED + : result; + } + + public static final int PIN_UNEXPANDED_RESULTS_FIELD_NUMBER = 2; + private boolean pinUnexpandedResults_ = false; + /** + * + * + *
+     * Whether to pin unexpanded results. If this field is set to true,
+     * unexpanded products are always at the top of the search results, followed
+     * by the expanded results.
+     * 
+ * + * bool pin_unexpanded_results = 2; + * + * @return The pinUnexpandedResults. + */ + @java.lang.Override + public boolean getPinUnexpandedResults() { + return pinUnexpandedResults_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (condition_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + .CONDITION_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, condition_); + } + if (pinUnexpandedResults_ != false) { + output.writeBool(2, pinUnexpandedResults_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (condition_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + .CONDITION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, condition_); + } + if (pinUnexpandedResults_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, pinUnexpandedResults_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) obj; + + if (condition_ != other.condition_) return false; + if (getPinUnexpandedResults() != other.getPinUnexpandedResults()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + condition_; + hash = (37 * hash) + PIN_UNEXPANDED_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPinUnexpandedResults()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Specification to determine under which conditions query expansion should
+     * occur.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + condition_ = 0; + pinUnexpandedResults_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.condition_ = condition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pinUnexpandedResults_ = pinUnexpandedResults_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDefaultInstance()) return this; + if (other.condition_ != 0) { + setConditionValue(other.getConditionValue()); + } + if (other.getPinUnexpandedResults() != false) { + setPinUnexpandedResults(other.getPinUnexpandedResults()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + condition_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + pinUnexpandedResults_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int condition_ = 0; + /** + * + * + *
+       * The condition under which query expansion should occur. Default to
+       * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @return The enum numeric value on the wire for condition. + */ + @java.lang.Override + public int getConditionValue() { + return condition_; + } + /** + * + * + *
+       * The condition under which query expansion should occur. Default to
+       * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @param value The enum numeric value on the wire for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionValue(int value) { + condition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The condition under which query expansion should occur. Default to
+       * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @return The condition. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + getCondition() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + .forNumber(condition_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The condition under which query expansion should occur. Default to
+       * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + condition_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The condition under which query expansion should occur. Default to
+       * [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition condition = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000001); + condition_ = 0; + onChanged(); + return this; + } + + private boolean pinUnexpandedResults_; + /** + * + * + *
+       * Whether to pin unexpanded results. If this field is set to true,
+       * unexpanded products are always at the top of the search results, followed
+       * by the expanded results.
+       * 
+ * + * bool pin_unexpanded_results = 2; + * + * @return The pinUnexpandedResults. + */ + @java.lang.Override + public boolean getPinUnexpandedResults() { + return pinUnexpandedResults_; + } + /** + * + * + *
+       * Whether to pin unexpanded results. If this field is set to true,
+       * unexpanded products are always at the top of the search results, followed
+       * by the expanded results.
+       * 
+ * + * bool pin_unexpanded_results = 2; + * + * @param value The pinUnexpandedResults to set. + * @return This builder for chaining. + */ + public Builder setPinUnexpandedResults(boolean value) { + + pinUnexpandedResults_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether to pin unexpanded results. If this field is set to true,
+       * unexpanded products are always at the top of the search results, followed
+       * by the expanded results.
+       * 
+ * + * bool pin_unexpanded_results = 2; + * + * @return This builder for chaining. + */ + public Builder clearPinUnexpandedResults() { + bitField0_ = (bitField0_ & ~0x00000002); + pinUnexpandedResults_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryExpansionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SpellCorrectionSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The mode under which spell correction should take effect to
+     * replace the original search query. Default to
+     * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+     * The mode under which spell correction should take effect to
+     * replace the original search query. Default to
+     * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @return The mode. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode getMode(); + } + /** + * + * + *
+   * The specification for query spell correction.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec} + */ + public static final class SpellCorrectionSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) + SpellCorrectionSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpellCorrectionSpec.newBuilder() to construct. + private SpellCorrectionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpellCorrectionSpec() { + mode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpellCorrectionSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Builder + .class); + } + + /** + * + * + *
+     * Enum describing under which mode spell correction should occur.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified spell correction mode. In this case, server behavior
+       * defaults to
+       * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+       * 
+ * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
+       * Search API will try to find a spell suggestion if there
+       * is any and put in the
+       * [SearchResponse.corrected_query][google.cloud.discoveryengine.v1alpha.SearchResponse.corrected_query].
+       * The spell suggestion will not be used as the search query.
+       * 
+ * + * SUGGESTION_ONLY = 1; + */ + SUGGESTION_ONLY(1), + /** + * + * + *
+       * Automatic spell correction built by the Search API. Search will
+       * be based on the corrected query if found.
+       * 
+ * + * AUTO = 2; + */ + AUTO(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified spell correction mode. In this case, server behavior
+       * defaults to
+       * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+       * 
+ * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Search API will try to find a spell suggestion if there
+       * is any and put in the
+       * [SearchResponse.corrected_query][google.cloud.discoveryengine.v1alpha.SearchResponse.corrected_query].
+       * The spell suggestion will not be used as the search query.
+       * 
+ * + * SUGGESTION_ONLY = 1; + */ + public static final int SUGGESTION_ONLY_VALUE = 1; + /** + * + * + *
+       * Automatic spell correction built by the Search API. Search will
+       * be based on the corrected query if found.
+       * 
+ * + * AUTO = 2; + */ + public static final int AUTO_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Mode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return SUGGESTION_ONLY; + case 2: + return AUTO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + /** + * + * + *
+     * The mode under which spell correction should take effect to
+     * replace the original search query. Default to
+     * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * The mode under which spell correction should take effect to
+     * replace the original search query. Default to
+     * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode + getMode() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.forNumber( + mode_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mode_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode + .MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode + .MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) obj; + + if (mode_ != other.mode_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The specification for query spell correction.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance()) return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int mode_ = 0; + /** + * + * + *
+       * The mode under which spell correction should take effect to
+       * replace the original search query. Default to
+       * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+       * The mode under which spell correction should take effect to
+       * replace the original search query. Default to
+       * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The mode under which spell correction should take effect to
+       * replace the original search query. Default to
+       * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode + getMode() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode result = + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode + .forNumber(mode_); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The mode under which spell correction should take effect to
+       * replace the original search query. Default to
+       * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The mode under which spell correction should take effect to
+       * replace the original search query. Default to
+       * [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode mode = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpellCorrectionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContentSearchSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If `snippetSpec` is not specified, snippets are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return Whether the snippetSpec field is set. + */ + boolean hasSnippetSpec(); + /** + * + * + *
+     * If `snippetSpec` is not specified, snippets are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return The snippetSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + getSnippetSpec(); + /** + * + * + *
+     * If `snippetSpec` is not specified, snippets are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpecOrBuilder + getSnippetSpecOrBuilder(); + + /** + * + * + *
+     * If `summarySpec` is not specified, summaries are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return Whether the summarySpec field is set. + */ + boolean hasSummarySpec(); + /** + * + * + *
+     * If `summarySpec` is not specified, summaries are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return The summarySpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec(); + /** + * + * + *
+     * If `summarySpec` is not specified, summaries are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpecOrBuilder + getSummarySpecOrBuilder(); + + /** + * + * + *
+     * If there is no extractive_content_spec provided, there will be no
+     * extractive answer in the search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return Whether the extractiveContentSpec field is set. + */ + boolean hasExtractiveContentSpec(); + /** + * + * + *
+     * If there is no extractive_content_spec provided, there will be no
+     * extractive answer in the search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return The extractiveContentSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + getExtractiveContentSpec(); + /** + * + * + *
+     * If there is no extractive_content_spec provided, there will be no
+     * extractive answer in the search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder + getExtractiveContentSpecOrBuilder(); + } + /** + * + * + *
+   * A specification for configuring the behavior of content search.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec} + */ + public static final class ContentSearchSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) + ContentSearchSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContentSearchSpec.newBuilder() to construct. + private ContentSearchSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContentSearchSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContentSearchSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.Builder + .class); + } + + public interface SnippetSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * [DEPRECATED] This field is deprecated. To control snippet return, use
+       * `return_snippet` field. For backwards compatibility, we will return
+       * snippet if max_snippet_count > 0.
+       * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=308 + * @return The maxSnippetCount. + */ + @java.lang.Deprecated + int getMaxSnippetCount(); + + /** + * + * + *
+       * [DEPRECATED] This field is deprecated and will have no affect on the
+       * snippet.
+       * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=312 + * @return The referenceOnly. + */ + @java.lang.Deprecated + boolean getReferenceOnly(); + + /** + * + * + *
+       * If `true`, then return snippet. If no snippet can be generated, we
+       * return "No snippet is available for this page." A `snippet_status` with
+       * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+       * 
+ * + * bool return_snippet = 3; + * + * @return The returnSnippet. + */ + boolean getReturnSnippet(); + } + /** + * + * + *
+     * A specification for configuring snippets in a search response.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec} + */ + public static final class SnippetSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + SnippetSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SnippetSpec.newBuilder() to construct. + private SnippetSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SnippetSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SnippetSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder.class); + } + + public static final int MAX_SNIPPET_COUNT_FIELD_NUMBER = 1; + private int maxSnippetCount_ = 0; + /** + * + * + *
+       * [DEPRECATED] This field is deprecated. To control snippet return, use
+       * `return_snippet` field. For backwards compatibility, we will return
+       * snippet if max_snippet_count > 0.
+       * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=308 + * @return The maxSnippetCount. + */ + @java.lang.Override + @java.lang.Deprecated + public int getMaxSnippetCount() { + return maxSnippetCount_; + } + + public static final int REFERENCE_ONLY_FIELD_NUMBER = 2; + private boolean referenceOnly_ = false; + /** + * + * + *
+       * [DEPRECATED] This field is deprecated and will have no affect on the
+       * snippet.
+       * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=312 + * @return The referenceOnly. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getReferenceOnly() { + return referenceOnly_; + } + + public static final int RETURN_SNIPPET_FIELD_NUMBER = 3; + private boolean returnSnippet_ = false; + /** + * + * + *
+       * If `true`, then return snippet. If no snippet can be generated, we
+       * return "No snippet is available for this page." A `snippet_status` with
+       * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+       * 
+ * + * bool return_snippet = 3; + * + * @return The returnSnippet. + */ + @java.lang.Override + public boolean getReturnSnippet() { + return returnSnippet_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (maxSnippetCount_ != 0) { + output.writeInt32(1, maxSnippetCount_); + } + if (referenceOnly_ != false) { + output.writeBool(2, referenceOnly_); + } + if (returnSnippet_ != false) { + output.writeBool(3, returnSnippet_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxSnippetCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxSnippetCount_); + } + if (referenceOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, referenceOnly_); + } + if (returnSnippet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, returnSnippet_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + obj; + + if (getMaxSnippetCount() != other.getMaxSnippetCount()) return false; + if (getReferenceOnly() != other.getReferenceOnly()) return false; + if (getReturnSnippet() != other.getReturnSnippet()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_SNIPPET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxSnippetCount(); + hash = (37 * hash) + REFERENCE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReferenceOnly()); + hash = (37 * hash) + RETURN_SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnSnippet()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A specification for configuring snippets in a search response.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxSnippetCount_ = 0; + referenceOnly_ = false; + returnSnippet_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxSnippetCount_ = maxSnippetCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.referenceOnly_ = referenceOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.returnSnippet_ = returnSnippet_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.getDefaultInstance()) return this; + if (other.getMaxSnippetCount() != 0) { + setMaxSnippetCount(other.getMaxSnippetCount()); + } + if (other.getReferenceOnly() != false) { + setReferenceOnly(other.getReferenceOnly()); + } + if (other.getReturnSnippet() != false) { + setReturnSnippet(other.getReturnSnippet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + maxSnippetCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + referenceOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + returnSnippet_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int maxSnippetCount_; + /** + * + * + *
+         * [DEPRECATED] This field is deprecated. To control snippet return, use
+         * `return_snippet` field. For backwards compatibility, we will return
+         * snippet if max_snippet_count > 0.
+         * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=308 + * @return The maxSnippetCount. + */ + @java.lang.Override + @java.lang.Deprecated + public int getMaxSnippetCount() { + return maxSnippetCount_; + } + /** + * + * + *
+         * [DEPRECATED] This field is deprecated. To control snippet return, use
+         * `return_snippet` field. For backwards compatibility, we will return
+         * snippet if max_snippet_count > 0.
+         * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=308 + * @param value The maxSnippetCount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setMaxSnippetCount(int value) { + + maxSnippetCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * [DEPRECATED] This field is deprecated. To control snippet return, use
+         * `return_snippet` field. For backwards compatibility, we will return
+         * snippet if max_snippet_count > 0.
+         * 
+ * + * int32 max_snippet_count = 1 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=308 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearMaxSnippetCount() { + bitField0_ = (bitField0_ & ~0x00000001); + maxSnippetCount_ = 0; + onChanged(); + return this; + } + + private boolean referenceOnly_; + /** + * + * + *
+         * [DEPRECATED] This field is deprecated and will have no affect on the
+         * snippet.
+         * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=312 + * @return The referenceOnly. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean getReferenceOnly() { + return referenceOnly_; + } + /** + * + * + *
+         * [DEPRECATED] This field is deprecated and will have no affect on the
+         * snippet.
+         * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=312 + * @param value The referenceOnly to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setReferenceOnly(boolean value) { + + referenceOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * [DEPRECATED] This field is deprecated and will have no affect on the
+         * snippet.
+         * 
+ * + * bool reference_only = 2 [deprecated = true]; + * + * @deprecated + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only + * is deprecated. See google/cloud/discoveryengine/v1alpha/search_service.proto;l=312 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearReferenceOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + referenceOnly_ = false; + onChanged(); + return this; + } + + private boolean returnSnippet_; + /** + * + * + *
+         * If `true`, then return snippet. If no snippet can be generated, we
+         * return "No snippet is available for this page." A `snippet_status` with
+         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+         * 
+ * + * bool return_snippet = 3; + * + * @return The returnSnippet. + */ + @java.lang.Override + public boolean getReturnSnippet() { + return returnSnippet_; + } + /** + * + * + *
+         * If `true`, then return snippet. If no snippet can be generated, we
+         * return "No snippet is available for this page." A `snippet_status` with
+         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+         * 
+ * + * bool return_snippet = 3; + * + * @param value The returnSnippet to set. + * @return This builder for chaining. + */ + public Builder setReturnSnippet(boolean value) { + + returnSnippet_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * If `true`, then return snippet. If no snippet can be generated, we
+         * return "No snippet is available for this page." A `snippet_status` with
+         * `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
+         * 
+ * + * bool return_snippet = 3; + * + * @return This builder for chaining. + */ + public Builder clearReturnSnippet() { + bitField0_ = (bitField0_ & ~0x00000004); + returnSnippet_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SnippetSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SummarySpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The number of top results to generate the summary from. If the number
+       * of results returned is less than `summaryResultCount`, the summary is
+       * generated from all of the results.
+       *
+       * At most five results can be used to generate a summary.
+       * 
+ * + * int32 summary_result_count = 1; + * + * @return The summaryResultCount. + */ + int getSummaryResultCount(); + + /** + * + * + *
+       * Specifies whether to include citations in the summary. The default
+       * value is `false`.
+       *
+       * When this field is set to `true`, summaries include in-line citation
+       * numbers.
+       *
+       * Example summary including citations:
+       *
+       * BigQuery is Google Cloud's fully managed and completely serverless
+       * enterprise data warehouse [1]. BigQuery supports all data types, works
+       * across clouds, and has built-in machine learning and business
+       * intelligence, all within a unified platform [2, 3].
+       *
+       * The citation numbers refer to the returned search results and are
+       * 1-indexed. For example, [1] means that the sentence is attributed to
+       * the first search result. [2, 3] means that the sentence is attributed
+       * to both the second and third search results.
+       * 
+ * + * bool include_citations = 2; + * + * @return The includeCitations. + */ + boolean getIncludeCitations(); + + /** + * + * + *
+       * Specifies whether to filter out adversarial queries. The default value
+       * is `false`.
+       *
+       * Google employs search-query classification to detect adversarial
+       * queries. No summary is returned if the search query is classified as an
+       * adversarial query. For example, a user might ask a question regarding
+       * negative comments about the company or submit a query designed to
+       * generate unsafe, policy-violating output. If this field is set to
+       * `true`, we skip generating summaries for adversarial queries and return
+       * fallback messages instead.
+       * 
+ * + * bool ignore_adversarial_query = 3; + * + * @return The ignoreAdversarialQuery. + */ + boolean getIgnoreAdversarialQuery(); + + /** + * + * + *
+       * Specifies whether to filter out queries that are not summary-seeking.
+       * The default value is `false`.
+       *
+       * Google employs search-query classification to detect summary-seeking
+       * queries. No summary is returned if the search query is classified as a
+       * non-summary seeking query. For example, `why is the sky blue` and `Who
+       * is the best soccer player in the world?` are summary-seeking queries,
+       * but `SFO airport` and `world cup 2026` are not. They are most likely
+       * navigational queries. If this field is set to `true`, we skip
+       * generating summaries for non-summary seeking queries and return
+       * fallback messages instead.
+       * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return The ignoreNonSummarySeekingQuery. + */ + boolean getIgnoreNonSummarySeekingQuery(); + + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + } + /** + * + * + *
+     * A specification for configuring a summary returned in a search
+     * response.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec} + */ + public static final class SummarySpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + SummarySpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SummarySpec.newBuilder() to construct. + private SummarySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SummarySpec() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SummarySpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder.class); + } + + public static final int SUMMARY_RESULT_COUNT_FIELD_NUMBER = 1; + private int summaryResultCount_ = 0; + /** + * + * + *
+       * The number of top results to generate the summary from. If the number
+       * of results returned is less than `summaryResultCount`, the summary is
+       * generated from all of the results.
+       *
+       * At most five results can be used to generate a summary.
+       * 
+ * + * int32 summary_result_count = 1; + * + * @return The summaryResultCount. + */ + @java.lang.Override + public int getSummaryResultCount() { + return summaryResultCount_; + } + + public static final int INCLUDE_CITATIONS_FIELD_NUMBER = 2; + private boolean includeCitations_ = false; + /** + * + * + *
+       * Specifies whether to include citations in the summary. The default
+       * value is `false`.
+       *
+       * When this field is set to `true`, summaries include in-line citation
+       * numbers.
+       *
+       * Example summary including citations:
+       *
+       * BigQuery is Google Cloud's fully managed and completely serverless
+       * enterprise data warehouse [1]. BigQuery supports all data types, works
+       * across clouds, and has built-in machine learning and business
+       * intelligence, all within a unified platform [2, 3].
+       *
+       * The citation numbers refer to the returned search results and are
+       * 1-indexed. For example, [1] means that the sentence is attributed to
+       * the first search result. [2, 3] means that the sentence is attributed
+       * to both the second and third search results.
+       * 
+ * + * bool include_citations = 2; + * + * @return The includeCitations. + */ + @java.lang.Override + public boolean getIncludeCitations() { + return includeCitations_; + } + + public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER = 3; + private boolean ignoreAdversarialQuery_ = false; + /** + * + * + *
+       * Specifies whether to filter out adversarial queries. The default value
+       * is `false`.
+       *
+       * Google employs search-query classification to detect adversarial
+       * queries. No summary is returned if the search query is classified as an
+       * adversarial query. For example, a user might ask a question regarding
+       * negative comments about the company or submit a query designed to
+       * generate unsafe, policy-violating output. If this field is set to
+       * `true`, we skip generating summaries for adversarial queries and return
+       * fallback messages instead.
+       * 
+ * + * bool ignore_adversarial_query = 3; + * + * @return The ignoreAdversarialQuery. + */ + @java.lang.Override + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; + } + + public static final int IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER = 4; + private boolean ignoreNonSummarySeekingQuery_ = false; + /** + * + * + *
+       * Specifies whether to filter out queries that are not summary-seeking.
+       * The default value is `false`.
+       *
+       * Google employs search-query classification to detect summary-seeking
+       * queries. No summary is returned if the search query is classified as a
+       * non-summary seeking query. For example, `why is the sky blue` and `Who
+       * is the best soccer player in the world?` are summary-seeking queries,
+       * but `SFO airport` and `world cup 2026` are not. They are most likely
+       * navigational queries. If this field is set to `true`, we skip
+       * generating summaries for non-summary seeking queries and return
+       * fallback messages instead.
+       * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return The ignoreNonSummarySeekingQuery. + */ + @java.lang.Override + public boolean getIgnoreNonSummarySeekingQuery() { + return ignoreNonSummarySeekingQuery_; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+       * Language code for Summary. Use language tags defined by
+       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+       * Note: This is an experimental feature.
+       * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (summaryResultCount_ != 0) { + output.writeInt32(1, summaryResultCount_); + } + if (includeCitations_ != false) { + output.writeBool(2, includeCitations_); + } + if (ignoreAdversarialQuery_ != false) { + output.writeBool(3, ignoreAdversarialQuery_); + } + if (ignoreNonSummarySeekingQuery_ != false) { + output.writeBool(4, ignoreNonSummarySeekingQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (summaryResultCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, summaryResultCount_); + } + if (includeCitations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeCitations_); + } + if (ignoreAdversarialQuery_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreAdversarialQuery_); + } + if (ignoreNonSummarySeekingQuery_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, ignoreNonSummarySeekingQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + obj; + + if (getSummaryResultCount() != other.getSummaryResultCount()) return false; + if (getIncludeCitations() != other.getIncludeCitations()) return false; + if (getIgnoreAdversarialQuery() != other.getIgnoreAdversarialQuery()) return false; + if (getIgnoreNonSummarySeekingQuery() != other.getIgnoreNonSummarySeekingQuery()) + return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUMMARY_RESULT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSummaryResultCount(); + hash = (37 * hash) + INCLUDE_CITATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCitations()); + hash = (37 * hash) + IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreAdversarialQuery()); + hash = (37 * hash) + IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getIgnoreNonSummarySeekingQuery()); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A specification for configuring a summary returned in a search
+       * response.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + summaryResultCount_ = 0; + includeCitations_ = false; + ignoreAdversarialQuery_ = false; + ignoreNonSummarySeekingQuery_ = false; + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.summaryResultCount_ = summaryResultCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.includeCitations_ = includeCitations_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ignoreAdversarialQuery_ = ignoreAdversarialQuery_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ignoreNonSummarySeekingQuery_ = ignoreNonSummarySeekingQuery_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.getDefaultInstance()) return this; + if (other.getSummaryResultCount() != 0) { + setSummaryResultCount(other.getSummaryResultCount()); + } + if (other.getIncludeCitations() != false) { + setIncludeCitations(other.getIncludeCitations()); + } + if (other.getIgnoreAdversarialQuery() != false) { + setIgnoreAdversarialQuery(other.getIgnoreAdversarialQuery()); + } + if (other.getIgnoreNonSummarySeekingQuery() != false) { + setIgnoreNonSummarySeekingQuery(other.getIgnoreNonSummarySeekingQuery()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + summaryResultCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + includeCitations_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + ignoreAdversarialQuery_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + ignoreNonSummarySeekingQuery_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 50: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int summaryResultCount_; + /** + * + * + *
+         * The number of top results to generate the summary from. If the number
+         * of results returned is less than `summaryResultCount`, the summary is
+         * generated from all of the results.
+         *
+         * At most five results can be used to generate a summary.
+         * 
+ * + * int32 summary_result_count = 1; + * + * @return The summaryResultCount. + */ + @java.lang.Override + public int getSummaryResultCount() { + return summaryResultCount_; + } + /** + * + * + *
+         * The number of top results to generate the summary from. If the number
+         * of results returned is less than `summaryResultCount`, the summary is
+         * generated from all of the results.
+         *
+         * At most five results can be used to generate a summary.
+         * 
+ * + * int32 summary_result_count = 1; + * + * @param value The summaryResultCount to set. + * @return This builder for chaining. + */ + public Builder setSummaryResultCount(int value) { + + summaryResultCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The number of top results to generate the summary from. If the number
+         * of results returned is less than `summaryResultCount`, the summary is
+         * generated from all of the results.
+         *
+         * At most five results can be used to generate a summary.
+         * 
+ * + * int32 summary_result_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearSummaryResultCount() { + bitField0_ = (bitField0_ & ~0x00000001); + summaryResultCount_ = 0; + onChanged(); + return this; + } + + private boolean includeCitations_; + /** + * + * + *
+         * Specifies whether to include citations in the summary. The default
+         * value is `false`.
+         *
+         * When this field is set to `true`, summaries include in-line citation
+         * numbers.
+         *
+         * Example summary including citations:
+         *
+         * BigQuery is Google Cloud's fully managed and completely serverless
+         * enterprise data warehouse [1]. BigQuery supports all data types, works
+         * across clouds, and has built-in machine learning and business
+         * intelligence, all within a unified platform [2, 3].
+         *
+         * The citation numbers refer to the returned search results and are
+         * 1-indexed. For example, [1] means that the sentence is attributed to
+         * the first search result. [2, 3] means that the sentence is attributed
+         * to both the second and third search results.
+         * 
+ * + * bool include_citations = 2; + * + * @return The includeCitations. + */ + @java.lang.Override + public boolean getIncludeCitations() { + return includeCitations_; + } + /** + * + * + *
+         * Specifies whether to include citations in the summary. The default
+         * value is `false`.
+         *
+         * When this field is set to `true`, summaries include in-line citation
+         * numbers.
+         *
+         * Example summary including citations:
+         *
+         * BigQuery is Google Cloud's fully managed and completely serverless
+         * enterprise data warehouse [1]. BigQuery supports all data types, works
+         * across clouds, and has built-in machine learning and business
+         * intelligence, all within a unified platform [2, 3].
+         *
+         * The citation numbers refer to the returned search results and are
+         * 1-indexed. For example, [1] means that the sentence is attributed to
+         * the first search result. [2, 3] means that the sentence is attributed
+         * to both the second and third search results.
+         * 
+ * + * bool include_citations = 2; + * + * @param value The includeCitations to set. + * @return This builder for chaining. + */ + public Builder setIncludeCitations(boolean value) { + + includeCitations_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Specifies whether to include citations in the summary. The default
+         * value is `false`.
+         *
+         * When this field is set to `true`, summaries include in-line citation
+         * numbers.
+         *
+         * Example summary including citations:
+         *
+         * BigQuery is Google Cloud's fully managed and completely serverless
+         * enterprise data warehouse [1]. BigQuery supports all data types, works
+         * across clouds, and has built-in machine learning and business
+         * intelligence, all within a unified platform [2, 3].
+         *
+         * The citation numbers refer to the returned search results and are
+         * 1-indexed. For example, [1] means that the sentence is attributed to
+         * the first search result. [2, 3] means that the sentence is attributed
+         * to both the second and third search results.
+         * 
+ * + * bool include_citations = 2; + * + * @return This builder for chaining. + */ + public Builder clearIncludeCitations() { + bitField0_ = (bitField0_ & ~0x00000002); + includeCitations_ = false; + onChanged(); + return this; + } + + private boolean ignoreAdversarialQuery_; + /** + * + * + *
+         * Specifies whether to filter out adversarial queries. The default value
+         * is `false`.
+         *
+         * Google employs search-query classification to detect adversarial
+         * queries. No summary is returned if the search query is classified as an
+         * adversarial query. For example, a user might ask a question regarding
+         * negative comments about the company or submit a query designed to
+         * generate unsafe, policy-violating output. If this field is set to
+         * `true`, we skip generating summaries for adversarial queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_adversarial_query = 3; + * + * @return The ignoreAdversarialQuery. + */ + @java.lang.Override + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; + } + /** + * + * + *
+         * Specifies whether to filter out adversarial queries. The default value
+         * is `false`.
+         *
+         * Google employs search-query classification to detect adversarial
+         * queries. No summary is returned if the search query is classified as an
+         * adversarial query. For example, a user might ask a question regarding
+         * negative comments about the company or submit a query designed to
+         * generate unsafe, policy-violating output. If this field is set to
+         * `true`, we skip generating summaries for adversarial queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_adversarial_query = 3; + * + * @param value The ignoreAdversarialQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreAdversarialQuery(boolean value) { + + ignoreAdversarialQuery_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Specifies whether to filter out adversarial queries. The default value
+         * is `false`.
+         *
+         * Google employs search-query classification to detect adversarial
+         * queries. No summary is returned if the search query is classified as an
+         * adversarial query. For example, a user might ask a question regarding
+         * negative comments about the company or submit a query designed to
+         * generate unsafe, policy-violating output. If this field is set to
+         * `true`, we skip generating summaries for adversarial queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_adversarial_query = 3; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreAdversarialQuery() { + bitField0_ = (bitField0_ & ~0x00000004); + ignoreAdversarialQuery_ = false; + onChanged(); + return this; + } + + private boolean ignoreNonSummarySeekingQuery_; + /** + * + * + *
+         * Specifies whether to filter out queries that are not summary-seeking.
+         * The default value is `false`.
+         *
+         * Google employs search-query classification to detect summary-seeking
+         * queries. No summary is returned if the search query is classified as a
+         * non-summary seeking query. For example, `why is the sky blue` and `Who
+         * is the best soccer player in the world?` are summary-seeking queries,
+         * but `SFO airport` and `world cup 2026` are not. They are most likely
+         * navigational queries. If this field is set to `true`, we skip
+         * generating summaries for non-summary seeking queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return The ignoreNonSummarySeekingQuery. + */ + @java.lang.Override + public boolean getIgnoreNonSummarySeekingQuery() { + return ignoreNonSummarySeekingQuery_; + } + /** + * + * + *
+         * Specifies whether to filter out queries that are not summary-seeking.
+         * The default value is `false`.
+         *
+         * Google employs search-query classification to detect summary-seeking
+         * queries. No summary is returned if the search query is classified as a
+         * non-summary seeking query. For example, `why is the sky blue` and `Who
+         * is the best soccer player in the world?` are summary-seeking queries,
+         * but `SFO airport` and `world cup 2026` are not. They are most likely
+         * navigational queries. If this field is set to `true`, we skip
+         * generating summaries for non-summary seeking queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @param value The ignoreNonSummarySeekingQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreNonSummarySeekingQuery(boolean value) { + + ignoreNonSummarySeekingQuery_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Specifies whether to filter out queries that are not summary-seeking.
+         * The default value is `false`.
+         *
+         * Google employs search-query classification to detect summary-seeking
+         * queries. No summary is returned if the search query is classified as a
+         * non-summary seeking query. For example, `why is the sky blue` and `Who
+         * is the best soccer player in the world?` are summary-seeking queries,
+         * but `SFO airport` and `world cup 2026` are not. They are most likely
+         * navigational queries. If this field is set to `true`, we skip
+         * generating summaries for non-summary seeking queries and return
+         * fallback messages instead.
+         * 
+ * + * bool ignore_non_summary_seeking_query = 4; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreNonSummarySeekingQuery() { + bitField0_ = (bitField0_ & ~0x00000008); + ignoreNonSummarySeekingQuery_ = false; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+         * Language code for Summary. Use language tags defined by
+         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+         * Note: This is an experimental feature.
+         * 
+ * + * string language_code = 6; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SummarySpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExtractiveContentSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The maximum number of extractive answers returned in each search
+       * result.
+       *
+       * An extractive answer is a verbatim answer extracted from the original
+       * document, which provides a precise and contextually relevant answer to
+       * the search query.
+       *
+       * If the number of matching answers is less than the
+       * `max_extractive_answer_count`, return all of the answers. Otherwise,
+       * return the `max_extractive_answer_count`.
+       *
+       * At most one answer is returned for each
+       * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
+       * 
+ * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + int getMaxExtractiveAnswerCount(); + + /** + * + * + *
+       * The max number of extractive segments returned in each search result.
+       * Only applied if the
+       * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+       * or
+       * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+       * is
+       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+       *
+       * An extractive segment is a text segment extracted from the original
+       * document that is relevant to the search query, and, in general, more
+       * verbose than an extractive answer. The segment could then be used as
+       * input for LLMs to generate summaries and answers.
+       *
+       * If the number of matching segments is less than
+       * `max_extractive_segment_count`, return all of the segments. Otherwise,
+       * return the `max_extractive_segment_count`.
+       * 
+ * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ + int getMaxExtractiveSegmentCount(); + + /** + * + * + *
+       * Specifies whether to return the confidence score from the extractive
+       * segments in each search result. The default value is `false`.
+       *
+       * Note: this is a priavte preview feature and only works for allowlisted
+       * users, please reach out to Cloud Support team if you want to use it.
+       * 
+ * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ + boolean getReturnExtractiveSegmentScore(); + + /** + * + * + *
+       * Specifies whether to also include the adjacent from each selected
+       * segments.
+       * Return at most `num_previous_segments` segments before each selected
+       * segments.
+       * 
+ * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ + int getNumPreviousSegments(); + + /** + * + * + *
+       * Return at most `num_next_segments` segments after each selected
+       * segments.
+       * 
+ * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. + */ + int getNumNextSegments(); + } + /** + * + * + *
+     * A specification for configuring the extractive content in a search
+     * response.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} + */ + public static final class ExtractiveContentSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + ExtractiveContentSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExtractiveContentSpec.newBuilder() to construct. + private ExtractiveContentSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExtractiveContentSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExtractiveContentSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder.class); + } + + public static final int MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER = 1; + private int maxExtractiveAnswerCount_ = 0; + /** + * + * + *
+       * The maximum number of extractive answers returned in each search
+       * result.
+       *
+       * An extractive answer is a verbatim answer extracted from the original
+       * document, which provides a precise and contextually relevant answer to
+       * the search query.
+       *
+       * If the number of matching answers is less than the
+       * `max_extractive_answer_count`, return all of the answers. Otherwise,
+       * return the `max_extractive_answer_count`.
+       *
+       * At most one answer is returned for each
+       * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
+       * 
+ * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + @java.lang.Override + public int getMaxExtractiveAnswerCount() { + return maxExtractiveAnswerCount_; + } + + public static final int MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER = 2; + private int maxExtractiveSegmentCount_ = 0; + /** + * + * + *
+       * The max number of extractive segments returned in each search result.
+       * Only applied if the
+       * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+       * or
+       * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+       * is
+       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+       *
+       * An extractive segment is a text segment extracted from the original
+       * document that is relevant to the search query, and, in general, more
+       * verbose than an extractive answer. The segment could then be used as
+       * input for LLMs to generate summaries and answers.
+       *
+       * If the number of matching segments is less than
+       * `max_extractive_segment_count`, return all of the segments. Otherwise,
+       * return the `max_extractive_segment_count`.
+       * 
+ * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ + @java.lang.Override + public int getMaxExtractiveSegmentCount() { + return maxExtractiveSegmentCount_; + } + + public static final int RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER = 3; + private boolean returnExtractiveSegmentScore_ = false; + /** + * + * + *
+       * Specifies whether to return the confidence score from the extractive
+       * segments in each search result. The default value is `false`.
+       *
+       * Note: this is a priavte preview feature and only works for allowlisted
+       * users, please reach out to Cloud Support team if you want to use it.
+       * 
+ * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ + @java.lang.Override + public boolean getReturnExtractiveSegmentScore() { + return returnExtractiveSegmentScore_; + } + + public static final int NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER = 4; + private int numPreviousSegments_ = 0; + /** + * + * + *
+       * Specifies whether to also include the adjacent from each selected
+       * segments.
+       * Return at most `num_previous_segments` segments before each selected
+       * segments.
+       * 
+ * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ + @java.lang.Override + public int getNumPreviousSegments() { + return numPreviousSegments_; + } + + public static final int NUM_NEXT_SEGMENTS_FIELD_NUMBER = 5; + private int numNextSegments_ = 0; + /** + * + * + *
+       * Return at most `num_next_segments` segments after each selected
+       * segments.
+       * 
+ * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. + */ + @java.lang.Override + public int getNumNextSegments() { + return numNextSegments_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (maxExtractiveAnswerCount_ != 0) { + output.writeInt32(1, maxExtractiveAnswerCount_); + } + if (maxExtractiveSegmentCount_ != 0) { + output.writeInt32(2, maxExtractiveSegmentCount_); + } + if (returnExtractiveSegmentScore_ != false) { + output.writeBool(3, returnExtractiveSegmentScore_); + } + if (numPreviousSegments_ != 0) { + output.writeInt32(4, numPreviousSegments_); + } + if (numNextSegments_ != 0) { + output.writeInt32(5, numNextSegments_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxExtractiveAnswerCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxExtractiveAnswerCount_); + } + if (maxExtractiveSegmentCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxExtractiveSegmentCount_); + } + if (returnExtractiveSegmentScore_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, returnExtractiveSegmentScore_); + } + if (numPreviousSegments_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, numPreviousSegments_); + } + if (numNextSegments_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, numNextSegments_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) + obj; + + if (getMaxExtractiveAnswerCount() != other.getMaxExtractiveAnswerCount()) return false; + if (getMaxExtractiveSegmentCount() != other.getMaxExtractiveSegmentCount()) return false; + if (getReturnExtractiveSegmentScore() != other.getReturnExtractiveSegmentScore()) + return false; + if (getNumPreviousSegments() != other.getNumPreviousSegments()) return false; + if (getNumNextSegments() != other.getNumNextSegments()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxExtractiveAnswerCount(); + hash = (37 * hash) + MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxExtractiveSegmentCount(); + hash = (37 * hash) + RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getReturnExtractiveSegmentScore()); + hash = (37 * hash) + NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getNumPreviousSegments(); + hash = (37 * hash) + NUM_NEXT_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getNumNextSegments(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A specification for configuring the extractive content in a search
+       * response.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxExtractiveAnswerCount_ = 0; + maxExtractiveSegmentCount_ = 0; + returnExtractiveSegmentScore_ = false; + numPreviousSegments_ = 0; + numNextSegments_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxExtractiveAnswerCount_ = maxExtractiveAnswerCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxExtractiveSegmentCount_ = maxExtractiveSegmentCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.returnExtractiveSegmentScore_ = returnExtractiveSegmentScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.numPreviousSegments_ = numPreviousSegments_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.numNextSegments_ = numNextSegments_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance()) return this; + if (other.getMaxExtractiveAnswerCount() != 0) { + setMaxExtractiveAnswerCount(other.getMaxExtractiveAnswerCount()); + } + if (other.getMaxExtractiveSegmentCount() != 0) { + setMaxExtractiveSegmentCount(other.getMaxExtractiveSegmentCount()); + } + if (other.getReturnExtractiveSegmentScore() != false) { + setReturnExtractiveSegmentScore(other.getReturnExtractiveSegmentScore()); + } + if (other.getNumPreviousSegments() != 0) { + setNumPreviousSegments(other.getNumPreviousSegments()); + } + if (other.getNumNextSegments() != 0) { + setNumNextSegments(other.getNumNextSegments()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + maxExtractiveAnswerCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxExtractiveSegmentCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + returnExtractiveSegmentScore_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + numPreviousSegments_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + numNextSegments_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int maxExtractiveAnswerCount_; + /** + * + * + *
+         * The maximum number of extractive answers returned in each search
+         * result.
+         *
+         * An extractive answer is a verbatim answer extracted from the original
+         * document, which provides a precise and contextually relevant answer to
+         * the search query.
+         *
+         * If the number of matching answers is less than the
+         * `max_extractive_answer_count`, return all of the answers. Otherwise,
+         * return the `max_extractive_answer_count`.
+         *
+         * At most one answer is returned for each
+         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
+         * 
+ * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + @java.lang.Override + public int getMaxExtractiveAnswerCount() { + return maxExtractiveAnswerCount_; + } + /** + * + * + *
+         * The maximum number of extractive answers returned in each search
+         * result.
+         *
+         * An extractive answer is a verbatim answer extracted from the original
+         * document, which provides a precise and contextually relevant answer to
+         * the search query.
+         *
+         * If the number of matching answers is less than the
+         * `max_extractive_answer_count`, return all of the answers. Otherwise,
+         * return the `max_extractive_answer_count`.
+         *
+         * At most one answer is returned for each
+         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
+         * 
+ * + * int32 max_extractive_answer_count = 1; + * + * @param value The maxExtractiveAnswerCount to set. + * @return This builder for chaining. + */ + public Builder setMaxExtractiveAnswerCount(int value) { + + maxExtractiveAnswerCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The maximum number of extractive answers returned in each search
+         * result.
+         *
+         * An extractive answer is a verbatim answer extracted from the original
+         * document, which provides a precise and contextually relevant answer to
+         * the search query.
+         *
+         * If the number of matching answers is less than the
+         * `max_extractive_answer_count`, return all of the answers. Otherwise,
+         * return the `max_extractive_answer_count`.
+         *
+         * At most one answer is returned for each
+         * [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
+         * 
+ * + * int32 max_extractive_answer_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearMaxExtractiveAnswerCount() { + bitField0_ = (bitField0_ & ~0x00000001); + maxExtractiveAnswerCount_ = 0; + onChanged(); + return this; + } + + private int maxExtractiveSegmentCount_; + /** + * + * + *
+         * The max number of extractive segments returned in each search result.
+         * Only applied if the
+         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+         * or
+         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+         * is
+         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+         *
+         * An extractive segment is a text segment extracted from the original
+         * document that is relevant to the search query, and, in general, more
+         * verbose than an extractive answer. The segment could then be used as
+         * input for LLMs to generate summaries and answers.
+         *
+         * If the number of matching segments is less than
+         * `max_extractive_segment_count`, return all of the segments. Otherwise,
+         * return the `max_extractive_segment_count`.
+         * 
+ * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ + @java.lang.Override + public int getMaxExtractiveSegmentCount() { + return maxExtractiveSegmentCount_; + } + /** + * + * + *
+         * The max number of extractive segments returned in each search result.
+         * Only applied if the
+         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+         * or
+         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+         * is
+         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+         *
+         * An extractive segment is a text segment extracted from the original
+         * document that is relevant to the search query, and, in general, more
+         * verbose than an extractive answer. The segment could then be used as
+         * input for LLMs to generate summaries and answers.
+         *
+         * If the number of matching segments is less than
+         * `max_extractive_segment_count`, return all of the segments. Otherwise,
+         * return the `max_extractive_segment_count`.
+         * 
+ * + * int32 max_extractive_segment_count = 2; + * + * @param value The maxExtractiveSegmentCount to set. + * @return This builder for chaining. + */ + public Builder setMaxExtractiveSegmentCount(int value) { + + maxExtractiveSegmentCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The max number of extractive segments returned in each search result.
+         * Only applied if the
+         * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to
+         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED]
+         * or
+         * [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types]
+         * is
+         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
+         *
+         * An extractive segment is a text segment extracted from the original
+         * document that is relevant to the search query, and, in general, more
+         * verbose than an extractive answer. The segment could then be used as
+         * input for LLMs to generate summaries and answers.
+         *
+         * If the number of matching segments is less than
+         * `max_extractive_segment_count`, return all of the segments. Otherwise,
+         * return the `max_extractive_segment_count`.
+         * 
+ * + * int32 max_extractive_segment_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxExtractiveSegmentCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxExtractiveSegmentCount_ = 0; + onChanged(); + return this; + } + + private boolean returnExtractiveSegmentScore_; + /** + * + * + *
+         * Specifies whether to return the confidence score from the extractive
+         * segments in each search result. The default value is `false`.
+         *
+         * Note: this is a priavte preview feature and only works for allowlisted
+         * users, please reach out to Cloud Support team if you want to use it.
+         * 
+ * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ + @java.lang.Override + public boolean getReturnExtractiveSegmentScore() { + return returnExtractiveSegmentScore_; + } + /** + * + * + *
+         * Specifies whether to return the confidence score from the extractive
+         * segments in each search result. The default value is `false`.
+         *
+         * Note: this is a priavte preview feature and only works for allowlisted
+         * users, please reach out to Cloud Support team if you want to use it.
+         * 
+ * + * bool return_extractive_segment_score = 3; + * + * @param value The returnExtractiveSegmentScore to set. + * @return This builder for chaining. + */ + public Builder setReturnExtractiveSegmentScore(boolean value) { + + returnExtractiveSegmentScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Specifies whether to return the confidence score from the extractive
+         * segments in each search result. The default value is `false`.
+         *
+         * Note: this is a priavte preview feature and only works for allowlisted
+         * users, please reach out to Cloud Support team if you want to use it.
+         * 
+ * + * bool return_extractive_segment_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearReturnExtractiveSegmentScore() { + bitField0_ = (bitField0_ & ~0x00000004); + returnExtractiveSegmentScore_ = false; + onChanged(); + return this; + } + + private int numPreviousSegments_; + /** + * + * + *
+         * Specifies whether to also include the adjacent from each selected
+         * segments.
+         * Return at most `num_previous_segments` segments before each selected
+         * segments.
+         * 
+ * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ + @java.lang.Override + public int getNumPreviousSegments() { + return numPreviousSegments_; + } + /** + * + * + *
+         * Specifies whether to also include the adjacent from each selected
+         * segments.
+         * Return at most `num_previous_segments` segments before each selected
+         * segments.
+         * 
+ * + * int32 num_previous_segments = 4; + * + * @param value The numPreviousSegments to set. + * @return This builder for chaining. + */ + public Builder setNumPreviousSegments(int value) { + + numPreviousSegments_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Specifies whether to also include the adjacent from each selected
+         * segments.
+         * Return at most `num_previous_segments` segments before each selected
+         * segments.
+         * 
+ * + * int32 num_previous_segments = 4; + * + * @return This builder for chaining. + */ + public Builder clearNumPreviousSegments() { + bitField0_ = (bitField0_ & ~0x00000008); + numPreviousSegments_ = 0; + onChanged(); + return this; + } + + private int numNextSegments_; + /** + * + * + *
+         * Return at most `num_next_segments` segments after each selected
+         * segments.
+         * 
+ * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. + */ + @java.lang.Override + public int getNumNextSegments() { + return numNextSegments_; + } + /** + * + * + *
+         * Return at most `num_next_segments` segments after each selected
+         * segments.
+         * 
+ * + * int32 num_next_segments = 5; + * + * @param value The numNextSegments to set. + * @return This builder for chaining. + */ + public Builder setNumNextSegments(int value) { + + numNextSegments_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+         * Return at most `num_next_segments` segments after each selected
+         * segments.
+         * 
+ * + * int32 num_next_segments = 5; + * + * @return This builder for chaining. + */ + public Builder clearNumNextSegments() { + bitField0_ = (bitField0_ & ~0x00000010); + numNextSegments_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExtractiveContentSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SNIPPET_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + snippetSpec_; + /** + * + * + *
+     * If `snippetSpec` is not specified, snippets are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return Whether the snippetSpec field is set. + */ + @java.lang.Override + public boolean hasSnippetSpec() { + return snippetSpec_ != null; + } + /** + * + * + *
+     * If `snippetSpec` is not specified, snippets are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return The snippetSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + getSnippetSpec() { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } + /** + * + * + *
+     * If `snippetSpec` is not specified, snippets are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder + getSnippetSpecOrBuilder() { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } + + public static final int SUMMARY_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + summarySpec_; + /** + * + * + *
+     * If `summarySpec` is not specified, summaries are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return Whether the summarySpec field is set. + */ + @java.lang.Override + public boolean hasSummarySpec() { + return summarySpec_ != null; + } + /** + * + * + *
+     * If `summarySpec` is not specified, summaries are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return The summarySpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec() { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } + /** + * + * + *
+     * If `summarySpec` is not specified, summaries are not included in the
+     * search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder + getSummarySpecOrBuilder() { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } + + public static final int EXTRACTIVE_CONTENT_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + extractiveContentSpec_; + /** + * + * + *
+     * If there is no extractive_content_spec provided, there will be no
+     * extractive answer in the search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return Whether the extractiveContentSpec field is set. + */ + @java.lang.Override + public boolean hasExtractiveContentSpec() { + return extractiveContentSpec_ != null; + } + /** + * + * + *
+     * If there is no extractive_content_spec provided, there will be no
+     * extractive answer in the search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return The extractiveContentSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getExtractiveContentSpec() { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; + } + /** + * + * + *
+     * If there is no extractive_content_spec provided, there will be no
+     * extractive answer in the search response.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder + getExtractiveContentSpecOrBuilder() { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (snippetSpec_ != null) { + output.writeMessage(1, getSnippetSpec()); + } + if (summarySpec_ != null) { + output.writeMessage(2, getSummarySpec()); + } + if (extractiveContentSpec_ != null) { + output.writeMessage(3, getExtractiveContentSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (snippetSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSnippetSpec()); + } + if (summarySpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSummarySpec()); + } + if (extractiveContentSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExtractiveContentSpec()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) obj; + + if (hasSnippetSpec() != other.hasSnippetSpec()) return false; + if (hasSnippetSpec()) { + if (!getSnippetSpec().equals(other.getSnippetSpec())) return false; + } + if (hasSummarySpec() != other.hasSummarySpec()) return false; + if (hasSummarySpec()) { + if (!getSummarySpec().equals(other.getSummarySpec())) return false; + } + if (hasExtractiveContentSpec() != other.hasExtractiveContentSpec()) return false; + if (hasExtractiveContentSpec()) { + if (!getExtractiveContentSpec().equals(other.getExtractiveContentSpec())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSnippetSpec()) { + hash = (37 * hash) + SNIPPET_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSnippetSpec().hashCode(); + } + if (hasSummarySpec()) { + hash = (37 * hash) + SUMMARY_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSummarySpec().hashCode(); + } + if (hasExtractiveContentSpec()) { + hash = (37 * hash) + EXTRACTIVE_CONTENT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getExtractiveContentSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + snippetSpec_ = null; + if (snippetSpecBuilder_ != null) { + snippetSpecBuilder_.dispose(); + snippetSpecBuilder_ = null; + } + summarySpec_ = null; + if (summarySpecBuilder_ != null) { + summarySpecBuilder_.dispose(); + summarySpecBuilder_ = null; + } + extractiveContentSpec_ = null; + if (extractiveContentSpecBuilder_ != null) { + extractiveContentSpecBuilder_.dispose(); + extractiveContentSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.snippetSpec_ = + snippetSpecBuilder_ == null ? snippetSpec_ : snippetSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.summarySpec_ = + summarySpecBuilder_ == null ? summarySpec_ : summarySpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.extractiveContentSpec_ = + extractiveContentSpecBuilder_ == null + ? extractiveContentSpec_ + : extractiveContentSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .getDefaultInstance()) return this; + if (other.hasSnippetSpec()) { + mergeSnippetSpec(other.getSnippetSpec()); + } + if (other.hasSummarySpec()) { + mergeSummarySpec(other.getSummarySpec()); + } + if (other.hasExtractiveContentSpec()) { + mergeExtractiveContentSpec(other.getExtractiveContentSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSnippetSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSummarySpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getExtractiveContentSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + snippetSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder> + snippetSpecBuilder_; + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return Whether the snippetSpec field is set. + */ + public boolean hasSnippetSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return The snippetSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + getSnippetSpec() { + if (snippetSpecBuilder_ == null) { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } else { + return snippetSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder setSnippetSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + value) { + if (snippetSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + snippetSpec_ = value; + } else { + snippetSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder setSnippetSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder + builderForValue) { + if (snippetSpecBuilder_ == null) { + snippetSpec_ = builderForValue.build(); + } else { + snippetSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder mergeSnippetSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + value) { + if (snippetSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && snippetSpec_ != null + && snippetSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.getDefaultInstance()) { + getSnippetSpecBuilder().mergeFrom(value); + } else { + snippetSpec_ = value; + } + } else { + snippetSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder clearSnippetSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + snippetSpec_ = null; + if (snippetSpecBuilder_ != null) { + snippetSpecBuilder_.dispose(); + snippetSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder + getSnippetSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSnippetSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder + getSnippetSpecOrBuilder() { + if (snippetSpecBuilder_ != null) { + return snippetSpecBuilder_.getMessageOrBuilder(); + } else { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } + } + /** + * + * + *
+       * If `snippetSpec` is not specified, snippets are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder> + getSnippetSpecFieldBuilder() { + if (snippetSpecBuilder_ == null) { + snippetSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder>(getSnippetSpec(), getParentForChildren(), isClean()); + snippetSpec_ = null; + } + return snippetSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + summarySpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder> + summarySpecBuilder_; + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return Whether the summarySpec field is set. + */ + public boolean hasSummarySpec() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return The summarySpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec() { + if (summarySpecBuilder_ == null) { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } else { + return summarySpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public Builder setSummarySpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + value) { + if (summarySpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summarySpec_ = value; + } else { + summarySpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public Builder setSummarySpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder + builderForValue) { + if (summarySpecBuilder_ == null) { + summarySpec_ = builderForValue.build(); + } else { + summarySpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public Builder mergeSummarySpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + value) { + if (summarySpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && summarySpec_ != null + && summarySpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.getDefaultInstance()) { + getSummarySpecBuilder().mergeFrom(value); + } else { + summarySpec_ = value; + } + } else { + summarySpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public Builder clearSummarySpec() { + bitField0_ = (bitField0_ & ~0x00000002); + summarySpec_ = null; + if (summarySpecBuilder_ != null) { + summarySpecBuilder_.dispose(); + summarySpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder + getSummarySpecBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSummarySpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder + getSummarySpecOrBuilder() { + if (summarySpecBuilder_ != null) { + return summarySpecBuilder_.getMessageOrBuilder(); + } else { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } + } + /** + * + * + *
+       * If `summarySpec` is not specified, summaries are not included in the
+       * search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder> + getSummarySpecFieldBuilder() { + if (summarySpecBuilder_ == null) { + summarySpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder>(getSummarySpec(), getParentForChildren(), isClean()); + summarySpec_ = null; + } + return summarySpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + extractiveContentSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder> + extractiveContentSpecBuilder_; + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return Whether the extractiveContentSpec field is set. + */ + public boolean hasExtractiveContentSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return The extractiveContentSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getExtractiveContentSpec() { + if (extractiveContentSpecBuilder_ == null) { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; + } else { + return extractiveContentSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder setExtractiveContentSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + value) { + if (extractiveContentSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + extractiveContentSpec_ = value; + } else { + extractiveContentSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder setExtractiveContentSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder + builderForValue) { + if (extractiveContentSpecBuilder_ == null) { + extractiveContentSpec_ = builderForValue.build(); + } else { + extractiveContentSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder mergeExtractiveContentSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + value) { + if (extractiveContentSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && extractiveContentSpec_ != null + && extractiveContentSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance()) { + getExtractiveContentSpecBuilder().mergeFrom(value); + } else { + extractiveContentSpec_ = value; + } + } else { + extractiveContentSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder clearExtractiveContentSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + extractiveContentSpec_ = null; + if (extractiveContentSpecBuilder_ != null) { + extractiveContentSpecBuilder_.dispose(); + extractiveContentSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder + getExtractiveContentSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getExtractiveContentSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder + getExtractiveContentSpecOrBuilder() { + if (extractiveContentSpecBuilder_ != null) { + return extractiveContentSpecBuilder_.getMessageOrBuilder(); + } else { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; + } + } + /** + * + * + *
+       * If there is no extractive_content_spec provided, there will be no
+       * extractive answer in the search response.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder> + getExtractiveContentSpecFieldBuilder() { + if (extractiveContentSpecBuilder_ == null) { + extractiveContentSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder>( + getExtractiveContentSpec(), getParentForChildren(), isClean()); + extractiveContentSpec_ = null; + } + return extractiveContentSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContentSearchSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EmbeddingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector> + getEmbeddingVectorsList(); + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + getEmbeddingVectors(int index); + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + int getEmbeddingVectorsCount(); + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + getEmbeddingVectorsOrBuilderList(); + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVectorOrBuilder + getEmbeddingVectorsOrBuilder(int index); + } + /** + * + * + *
+   * The specification that uses customized query embedding vector to do
+   * semantic document retrieval.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec} + */ + public static final class EmbeddingSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) + EmbeddingSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use EmbeddingSpec.newBuilder() to construct. + private EmbeddingSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EmbeddingSpec() { + embeddingVectors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EmbeddingSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.Builder.class); + } + + public interface EmbeddingVectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Embedding field path in schema.
+       * 
+ * + * string field_path = 1; + * + * @return The fieldPath. + */ + java.lang.String getFieldPath(); + /** + * + * + *
+       * Embedding field path in schema.
+       * 
+ * + * string field_path = 1; + * + * @return The bytes for fieldPath. + */ + com.google.protobuf.ByteString getFieldPathBytes(); + + /** + * + * + *
+       * Query embedding vector.
+       * 
+ * + * repeated float vector = 2; + * + * @return A list containing the vector. + */ + java.util.List getVectorList(); + /** + * + * + *
+       * Query embedding vector.
+       * 
+ * + * repeated float vector = 2; + * + * @return The count of vector. + */ + int getVectorCount(); + /** + * + * + *
+       * Query embedding vector.
+       * 
+ * + * repeated float vector = 2; + * + * @param index The index of the element to return. + * @return The vector at the given index. + */ + float getVector(int index); + } + /** + * + * + *
+     * Embedding vector.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector} + */ + public static final class EmbeddingVector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector) + EmbeddingVectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use EmbeddingVector.newBuilder() to construct. + private EmbeddingVector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EmbeddingVector() { + fieldPath_ = ""; + vector_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EmbeddingVector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder.class); + } + + public static final int FIELD_PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldPath_ = ""; + /** + * + * + *
+       * Embedding field path in schema.
+       * 
+ * + * string field_path = 1; + * + * @return The fieldPath. + */ + @java.lang.Override + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; + } + } + /** + * + * + *
+       * Embedding field path in schema.
+       * 
+ * + * string field_path = 1; + * + * @return The bytes for fieldPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VECTOR_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList vector_; + /** + * + * + *
+       * Query embedding vector.
+       * 
+ * + * repeated float vector = 2; + * + * @return A list containing the vector. + */ + @java.lang.Override + public java.util.List getVectorList() { + return vector_; + } + /** + * + * + *
+       * Query embedding vector.
+       * 
+ * + * repeated float vector = 2; + * + * @return The count of vector. + */ + public int getVectorCount() { + return vector_.size(); + } + /** + * + * + *
+       * Query embedding vector.
+       * 
+ * + * repeated float vector = 2; + * + * @param index The index of the element to return. + * @return The vector at the given index. + */ + public float getVector(int index) { + return vector_.getFloat(index); + } + + private int vectorMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldPath_); + } + if (getVectorList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(vectorMemoizedSerializedSize); + } + for (int i = 0; i < vector_.size(); i++) { + output.writeFloatNoTag(vector_.getFloat(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldPath_); + } + { + int dataSize = 0; + dataSize = 4 * getVectorList().size(); + size += dataSize; + if (!getVectorList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + vectorMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector) + obj; + + if (!getFieldPath().equals(other.getFieldPath())) return false; + if (!getVectorList().equals(other.getVectorList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); + if (getVectorCount() > 0) { + hash = (37 * hash) + VECTOR_FIELD_NUMBER; + hash = (53 * hash) + getVectorList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Embedding vector.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldPath_ = ""; + vector_ = emptyFloatList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + result) { + if (((bitField0_ & 0x00000002) != 0)) { + vector_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.vector_ = vector_; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldPath_ = fieldPath_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector.getDefaultInstance()) return this; + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.vector_.isEmpty()) { + if (vector_.isEmpty()) { + vector_ = other.vector_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVectorIsMutable(); + vector_.addAll(other.vector_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + float v = input.readFloat(); + ensureVectorIsMutable(); + vector_.addFloat(v); + break; + } // case 21 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureVectorIsMutable(); + while (input.getBytesUntilLimit() > 0) { + vector_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldPath_ = ""; + /** + * + * + *
+         * Embedding field path in schema.
+         * 
+ * + * string field_path = 1; + * + * @return The fieldPath. + */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Embedding field path in schema.
+         * 
+ * + * string field_path = 1; + * + * @return The bytes for fieldPath. + */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Embedding field path in schema.
+         * 
+ * + * string field_path = 1; + * + * @param value The fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Embedding field path in schema.
+         * 
+ * + * string field_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldPath() { + fieldPath_ = getDefaultInstance().getFieldPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Embedding field path in schema.
+         * 
+ * + * string field_path = 1; + * + * @param value The bytes for fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList vector_ = emptyFloatList(); + + private void ensureVectorIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + vector_ = mutableCopy(vector_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+         * Query embedding vector.
+         * 
+ * + * repeated float vector = 2; + * + * @return A list containing the vector. + */ + public java.util.List getVectorList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(vector_) + : vector_; + } + /** + * + * + *
+         * Query embedding vector.
+         * 
+ * + * repeated float vector = 2; + * + * @return The count of vector. + */ + public int getVectorCount() { + return vector_.size(); + } + /** + * + * + *
+         * Query embedding vector.
+         * 
+ * + * repeated float vector = 2; + * + * @param index The index of the element to return. + * @return The vector at the given index. + */ + public float getVector(int index) { + return vector_.getFloat(index); + } + /** + * + * + *
+         * Query embedding vector.
+         * 
+ * + * repeated float vector = 2; + * + * @param index The index to set the value at. + * @param value The vector to set. + * @return This builder for chaining. + */ + public Builder setVector(int index, float value) { + + ensureVectorIsMutable(); + vector_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * Query embedding vector.
+         * 
+ * + * repeated float vector = 2; + * + * @param value The vector to add. + * @return This builder for chaining. + */ + public Builder addVector(float value) { + + ensureVectorIsMutable(); + vector_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+         * Query embedding vector.
+         * 
+ * + * repeated float vector = 2; + * + * @param values The vector to add. + * @return This builder for chaining. + */ + public Builder addAllVector(java.lang.Iterable values) { + ensureVectorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vector_); + onChanged(); + return this; + } + /** + * + * + *
+         * Query embedding vector.
+         * 
+ * + * repeated float vector = 2; + * + * @return This builder for chaining. + */ + public Builder clearVector() { + vector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EmbeddingVector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int EMBEDDING_VECTORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector> + embeddingVectors_; + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector> + getEmbeddingVectorsList() { + return embeddingVectors_; + } + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + getEmbeddingVectorsOrBuilderList() { + return embeddingVectors_; + } + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + @java.lang.Override + public int getEmbeddingVectorsCount() { + return embeddingVectors_.size(); + } + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + getEmbeddingVectors(int index) { + return embeddingVectors_.get(index); + } + /** + * + * + *
+     * The embedding vector used for retrieval. Limit to 1.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder + getEmbeddingVectorsOrBuilder(int index) { + return embeddingVectors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < embeddingVectors_.size(); i++) { + output.writeMessage(1, embeddingVectors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < embeddingVectors_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, embeddingVectors_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) obj; + + if (!getEmbeddingVectorsList().equals(other.getEmbeddingVectorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEmbeddingVectorsCount() > 0) { + hash = (37 * hash) + EMBEDDING_VECTORS_FIELD_NUMBER; + hash = (53 * hash) + getEmbeddingVectorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The specification that uses customized query embedding vector to do
+     * semantic document retrieval.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (embeddingVectorsBuilder_ == null) { + embeddingVectors_ = java.util.Collections.emptyList(); + } else { + embeddingVectors_ = null; + embeddingVectorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec result) { + if (embeddingVectorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + embeddingVectors_ = java.util.Collections.unmodifiableList(embeddingVectors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.embeddingVectors_ = embeddingVectors_; + } else { + result.embeddingVectors_ = embeddingVectorsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .getDefaultInstance()) return this; + if (embeddingVectorsBuilder_ == null) { + if (!other.embeddingVectors_.isEmpty()) { + if (embeddingVectors_.isEmpty()) { + embeddingVectors_ = other.embeddingVectors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.addAll(other.embeddingVectors_); + } + onChanged(); + } + } else { + if (!other.embeddingVectors_.isEmpty()) { + if (embeddingVectorsBuilder_.isEmpty()) { + embeddingVectorsBuilder_.dispose(); + embeddingVectorsBuilder_ = null; + embeddingVectors_ = other.embeddingVectors_; + bitField0_ = (bitField0_ & ~0x00000001); + embeddingVectorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEmbeddingVectorsFieldBuilder() + : null; + } else { + embeddingVectorsBuilder_.addAllMessages(other.embeddingVectors_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector + m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector.parser(), + extensionRegistry); + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(m); + } else { + embeddingVectorsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector> + embeddingVectors_ = java.util.Collections.emptyList(); + + private void ensureEmbeddingVectorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + embeddingVectors_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector>(embeddingVectors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + embeddingVectorsBuilder_; + + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector> + getEmbeddingVectorsList() { + if (embeddingVectorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(embeddingVectors_); + } else { + return embeddingVectorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public int getEmbeddingVectorsCount() { + if (embeddingVectorsBuilder_ == null) { + return embeddingVectors_.size(); + } else { + return embeddingVectorsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + getEmbeddingVectors(int index) { + if (embeddingVectorsBuilder_ == null) { + return embeddingVectors_.get(index); + } else { + return embeddingVectorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder setEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + value) { + if (embeddingVectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.set(index, value); + onChanged(); + } else { + embeddingVectorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder setEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + builderForValue) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.set(index, builderForValue.build()); + onChanged(); + } else { + embeddingVectorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder addEmbeddingVectors( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + value) { + if (embeddingVectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(value); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder addEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + value) { + if (embeddingVectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(index, value); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder addEmbeddingVectors( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + builderForValue) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(builderForValue.build()); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder addEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + builderForValue) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(index, builderForValue.build()); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder addAllEmbeddingVectors( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector> + values) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, embeddingVectors_); + onChanged(); + } else { + embeddingVectorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder clearEmbeddingVectors() { + if (embeddingVectorsBuilder_ == null) { + embeddingVectors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + embeddingVectorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public Builder removeEmbeddingVectors(int index) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.remove(index); + onChanged(); + } else { + embeddingVectorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + getEmbeddingVectorsBuilder(int index) { + return getEmbeddingVectorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder + getEmbeddingVectorsOrBuilder(int index) { + if (embeddingVectorsBuilder_ == null) { + return embeddingVectors_.get(index); + } else { + return embeddingVectorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + getEmbeddingVectorsOrBuilderList() { + if (embeddingVectorsBuilder_ != null) { + return embeddingVectorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(embeddingVectors_); + } + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + addEmbeddingVectorsBuilder() { + return getEmbeddingVectorsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .getDefaultInstance()); + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + addEmbeddingVectorsBuilder(int index) { + return getEmbeddingVectorsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .getDefaultInstance()); + } + /** + * + * + *
+       * The embedding vector used for retrieval. Limit to 1.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder> + getEmbeddingVectorsBuilderList() { + return getEmbeddingVectorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + getEmbeddingVectorsFieldBuilder() { + if (embeddingVectorsBuilder_ == null) { + embeddingVectorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVector.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder>( + embeddingVectors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + embeddingVectors_ = null; + } + return embeddingVectorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EmbeddingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SERVING_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object servingConfig_ = ""; + /** + * + * + *
+   * Required. The resource name of the Search serving config, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+   * This field is used to identify the serving configuration name, set
+   * of models used to make the search.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + @java.lang.Override + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfig_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Search serving config, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+   * This field is used to identify the serving configuration name, set
+   * of models used to make the search.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object branch_ = ""; + /** + * + * + *
+   * The branch resource name, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+   *
+   * Use `default_branch` as the branch ID or leave this field empty, to search
+   * documents under the default branch.
+   * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The branch. + */ + @java.lang.Override + public java.lang.String getBranch() { + java.lang.Object ref = branch_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + branch_ = s; + return s; + } + } + /** + * + * + *
+   * The branch resource name, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+   *
+   * Use `default_branch` as the branch ID or leave this field empty, to search
+   * documents under the default branch.
+   * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for branch. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBranchBytes() { + java.lang.Object ref = branch_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + branch_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + /** + * + * + *
+   * Raw search query.
+   * 
+ * + * string query = 3; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * Raw search query.
+   * 
+ * + * string query = 3; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_QUERY_FIELD_NUMBER = 19; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery imageQuery_; + /** + * + * + *
+   * Raw image query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + * + * @return Whether the imageQuery field is set. + */ + @java.lang.Override + public boolean hasImageQuery() { + return imageQuery_ != null; + } + /** + * + * + *
+   * Raw image query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + * + * @return The imageQuery. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery getImageQuery() { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } + /** + * + * + *
+   * Raw image query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQueryOrBuilder + getImageQueryOrBuilder() { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + /** + * + * + *
+   * Maximum number of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+   * unspecified, defaults to a reasonable value. The maximum allowed value is
+   * 100. Values above 100 are coerced to 100.
+   *
+   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token received from a previous
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * must match the call that provided the page token. Otherwise, an
+   *  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token received from a previous
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * must match the call that provided the page token. Otherwise, an
+   *  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OFFSET_FIELD_NUMBER = 6; + private int offset_ = 0; + /** + * + * + *
+   * A 0-indexed integer that specifies the current offset (that is, starting
+   * result location, amongst the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s deemed by the
+   * API as relevant) in search results. This field is only considered if
+   * [page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+   * is unset.
+   *
+   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * int32 offset = 6; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; + } + + public static final int FILTER_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered. Filter
+   * expression is case-sensitive.
+   *
+   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * string filter = 7; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered. Filter
+   * expression is case-sensitive.
+   *
+   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * string filter = 7; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * The order in which documents are returned. Documents can be ordered by
+   * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * object. Leave it unset if ordered by relevance. `order_by` expression is
+   * case-sensitive.
+   *
+   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+   * 
+ * + * string order_by = 8; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * The order in which documents are returned. Documents can be ordered by
+   * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * object. Leave it unset if ordered by relevance. `order_by` expression is
+   * case-sensitive.
+   *
+   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+   * 
+ * + * string order_by = 8; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_INFO_FIELD_NUMBER = 21; + private com.google.cloud.discoveryengine.v1alpha.UserInfo userInfo_; + /** + * + * + *
+   * Information about the end user.
+   * Highly recommended for analytics.
+   * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * is used to deduce `device_type` for analytics.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + * + * @return Whether the userInfo field is set. + */ + @java.lang.Override + public boolean hasUserInfo() { + return userInfo_ != null; + } + /** + * + * + *
+   * Information about the end user.
+   * Highly recommended for analytics.
+   * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * is used to deduce `device_type` for analytics.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + * + * @return The userInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfo getUserInfo() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } + /** + * + * + *
+   * Information about the end user.
+   * Highly recommended for analytics.
+   * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * is used to deduce `device_type` for analytics.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder getUserInfoOrBuilder() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } + + public static final int FACET_SPECS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List + facetSpecs_; + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public java.util.List + getFacetSpecsList() { + return facetSpecs_; + } + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder> + getFacetSpecsOrBuilderList() { + return facetSpecs_; + } + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public int getFacetSpecsCount() { + return facetSpecs_.size(); + } + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec getFacetSpecs(int index) { + return facetSpecs_.get(index); + } + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder + getFacetSpecsOrBuilder(int index) { + return facetSpecs_.get(index); + } + + public static final int BOOST_SPEC_FIELD_NUMBER = 10; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boostSpec_; + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + * + * @return Whether the boostSpec field is set. + */ + @java.lang.Override + public boolean hasBoostSpec() { + return boostSpec_ != null; + } + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + * + * @return The boostSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec getBoostSpec() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } + + public static final int PARAMS_FIELD_NUMBER = 11; + + private static final class ParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField + internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int QUERY_EXPANSION_SPEC_FIELD_NUMBER = 13; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + queryExpansionSpec_; + /** + * + * + *
+   * The query expansion specification that specifies the conditions under which
+   * query expansion occurs.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return Whether the queryExpansionSpec field is set. + */ + @java.lang.Override + public boolean hasQueryExpansionSpec() { + return queryExpansionSpec_ != null; + } + /** + * + * + *
+   * The query expansion specification that specifies the conditions under which
+   * query expansion occurs.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return The queryExpansionSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + getQueryExpansionSpec() { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; + } + /** + * + * + *
+   * The query expansion specification that specifies the conditions under which
+   * query expansion occurs.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpecOrBuilder + getQueryExpansionSpecOrBuilder() { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; + } + + public static final int SPELL_CORRECTION_SPEC_FIELD_NUMBER = 14; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + spellCorrectionSpec_; + /** + * + * + *
+   * The spell correction specification that specifies the mode under
+   * which spell correction takes effect.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + @java.lang.Override + public boolean hasSpellCorrectionSpec() { + return spellCorrectionSpec_ != null; + } + /** + * + * + *
+   * The spell correction specification that specifies the mode under
+   * which spell correction takes effect.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return The spellCorrectionSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec() { + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; + } + /** + * + * + *
+   * The spell correction specification that specifies the mode under
+   * which spell correction takes effect.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; + } + + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string user_pseudo_id = 15; + * + * @return The userPseudoId. + */ + @java.lang.Override + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string user_pseudo_id = 15; + * + * @return The bytes for userPseudoId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_SEARCH_SPEC_FIELD_NUMBER = 24; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + contentSearchSpec_; + /** + * + * + *
+   * A specification for configuring the behavior of content search.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return Whether the contentSearchSpec field is set. + */ + @java.lang.Override + public boolean hasContentSearchSpec() { + return contentSearchSpec_ != null; + } + /** + * + * + *
+   * A specification for configuring the behavior of content search.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return The contentSearchSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + getContentSearchSpec() { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; + } + /** + * + * + *
+   * A specification for configuring the behavior of content search.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpecOrBuilder + getContentSearchSpecOrBuilder() { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; + } + + public static final int EMBEDDING_SPEC_FIELD_NUMBER = 23; + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embeddingSpec_; + /** + * + * + *
+   * Uses the provided embedding to do additional semantic document retrieval.
+   * The retrieval is based on the dot product of
+   * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+   * embedding that is provided in
+   * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+   *
+   * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+   * provided, it will use [ServingConfig.embedding_config.field_paths][].
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return Whether the embeddingSpec field is set. + */ + @java.lang.Override + public boolean hasEmbeddingSpec() { + return embeddingSpec_ != null; + } + /** + * + * + *
+   * Uses the provided embedding to do additional semantic document retrieval.
+   * The retrieval is based on the dot product of
+   * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+   * embedding that is provided in
+   * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+   *
+   * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+   * provided, it will use [ServingConfig.embedding_config.field_paths][].
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return The embeddingSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec getEmbeddingSpec() { + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.getDefaultInstance() + : embeddingSpec_; + } + /** + * + * + *
+   * Uses the provided embedding to do additional semantic document retrieval.
+   * The retrieval is based on the dot product of
+   * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+   * embedding that is provided in
+   * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+   *
+   * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+   * provided, it will use [ServingConfig.embedding_config.field_paths][].
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpecOrBuilder + getEmbeddingSpecOrBuilder() { + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.getDefaultInstance() + : embeddingSpec_; + } + + public static final int RANKING_EXPRESSION_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private volatile java.lang.Object rankingExpression_ = ""; + /** + * + * + *
+   * The ranking expression controls the customized ranking on retrieval
+   * documents. This overrides
+   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+   * The ranking expression is a single function or multiple functions that are
+   * joint by "+".
+   *   * ranking_expression = function, { " + ", function };
+   * Supported functions:
+   *   * double * relevance_score
+   *   * double * dotProduct(embedding_field_path)
+   * Function variables:
+   *   `relevance_score`: pre-defined keywords, used for measure relevance
+   *   between query and document.
+   *   `embedding_field_path`: the document embedding field
+   *   used with query embedding vector.
+   *   `dotProduct`: embedding function between embedding_field_path and query
+   *   embedding vector.
+   *
+   *  Example ranking expression:
+   *    If document has an embedding field doc_embedding, the ranking expression
+   *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+   * 
+ * + * string ranking_expression = 26; + * + * @return The rankingExpression. + */ + @java.lang.Override + public java.lang.String getRankingExpression() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rankingExpression_ = s; + return s; + } + } + /** + * + * + *
+   * The ranking expression controls the customized ranking on retrieval
+   * documents. This overrides
+   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+   * The ranking expression is a single function or multiple functions that are
+   * joint by "+".
+   *   * ranking_expression = function, { " + ", function };
+   * Supported functions:
+   *   * double * relevance_score
+   *   * double * dotProduct(embedding_field_path)
+   * Function variables:
+   *   `relevance_score`: pre-defined keywords, used for measure relevance
+   *   between query and document.
+   *   `embedding_field_path`: the document embedding field
+   *   used with query embedding vector.
+   *   `dotProduct`: embedding function between embedding_field_path and query
+   *   embedding vector.
+   *
+   *  Example ranking expression:
+   *    If document has an embedding field doc_embedding, the ranking expression
+   *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+   * 
+ * + * string ranking_expression = 26; + * + * @return The bytes for rankingExpression. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRankingExpressionBytes() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingExpression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SAFE_SEARCH_FIELD_NUMBER = 20; + private boolean safeSearch_ = false; + /** + * + * + *
+   * Whether to turn on safe search. This is only supported for
+   * website search.
+   * 
+ * + * bool safe_search = 20; + * + * @return The safeSearch. + */ + @java.lang.Override + public boolean getSafeSearch() { + return safeSearch_; + } + + public static final int USER_LABELS_FIELD_NUMBER = 22; + + private static final class UserLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_UserLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfig_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, servingConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(branch_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, branch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, query_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (offset_ != 0) { + output.writeInt32(6, offset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, orderBy_); + } + for (int i = 0; i < facetSpecs_.size(); i++) { + output.writeMessage(9, facetSpecs_.get(i)); + } + if (boostSpec_ != null) { + output.writeMessage(10, getBoostSpec()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 11); + if (queryExpansionSpec_ != null) { + output.writeMessage(13, getQueryExpansionSpec()); + } + if (spellCorrectionSpec_ != null) { + output.writeMessage(14, getSpellCorrectionSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, userPseudoId_); + } + if (imageQuery_ != null) { + output.writeMessage(19, getImageQuery()); + } + if (safeSearch_ != false) { + output.writeBool(20, safeSearch_); + } + if (userInfo_ != null) { + output.writeMessage(21, getUserInfo()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 22); + if (embeddingSpec_ != null) { + output.writeMessage(23, getEmbeddingSpec()); + } + if (contentSearchSpec_ != null) { + output.writeMessage(24, getContentSearchSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rankingExpression_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, rankingExpression_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfig_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, servingConfig_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(branch_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, branch_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, query_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (offset_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, offset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, orderBy_); + } + for (int i = 0; i < facetSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, facetSpecs_.get(i)); + } + if (boostSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getBoostSpec()); + } + for (java.util.Map.Entry entry : + internalGetParams().getMap().entrySet()) { + com.google.protobuf.MapEntry params__ = + ParamsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, params__); + } + if (queryExpansionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getQueryExpansionSpec()); + } + if (spellCorrectionSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(14, getSpellCorrectionSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, userPseudoId_); + } + if (imageQuery_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getImageQuery()); + } + if (safeSearch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, safeSearch_); + } + if (userInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getUserInfo()); + } + for (java.util.Map.Entry entry : + internalGetUserLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry userLabels__ = + UserLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, userLabels__); + } + if (embeddingSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getEmbeddingSpec()); + } + if (contentSearchSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getContentSearchSpec()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rankingExpression_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, rankingExpression_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchRequest other = + (com.google.cloud.discoveryengine.v1alpha.SearchRequest) obj; + + if (!getServingConfig().equals(other.getServingConfig())) return false; + if (!getBranch().equals(other.getBranch())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (hasImageQuery() != other.hasImageQuery()) return false; + if (hasImageQuery()) { + if (!getImageQuery().equals(other.getImageQuery())) return false; + } + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getOffset() != other.getOffset()) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (hasUserInfo() != other.hasUserInfo()) return false; + if (hasUserInfo()) { + if (!getUserInfo().equals(other.getUserInfo())) return false; + } + if (!getFacetSpecsList().equals(other.getFacetSpecsList())) return false; + if (hasBoostSpec() != other.hasBoostSpec()) return false; + if (hasBoostSpec()) { + if (!getBoostSpec().equals(other.getBoostSpec())) return false; + } + if (!internalGetParams().equals(other.internalGetParams())) return false; + if (hasQueryExpansionSpec() != other.hasQueryExpansionSpec()) return false; + if (hasQueryExpansionSpec()) { + if (!getQueryExpansionSpec().equals(other.getQueryExpansionSpec())) return false; + } + if (hasSpellCorrectionSpec() != other.hasSpellCorrectionSpec()) return false; + if (hasSpellCorrectionSpec()) { + if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; + } + if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; + if (hasContentSearchSpec() != other.hasContentSearchSpec()) return false; + if (hasContentSearchSpec()) { + if (!getContentSearchSpec().equals(other.getContentSearchSpec())) return false; + } + if (hasEmbeddingSpec() != other.hasEmbeddingSpec()) return false; + if (hasEmbeddingSpec()) { + if (!getEmbeddingSpec().equals(other.getEmbeddingSpec())) return false; + } + if (!getRankingExpression().equals(other.getRankingExpression())) return false; + if (getSafeSearch() != other.getSafeSearch()) return false; + if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServingConfig().hashCode(); + hash = (37 * hash) + BRANCH_FIELD_NUMBER; + hash = (53 * hash) + getBranch().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (hasImageQuery()) { + hash = (37 * hash) + IMAGE_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getImageQuery().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getOffset(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + if (hasUserInfo()) { + hash = (37 * hash) + USER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUserInfo().hashCode(); + } + if (getFacetSpecsCount() > 0) { + hash = (37 * hash) + FACET_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getFacetSpecsList().hashCode(); + } + if (hasBoostSpec()) { + hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBoostSpec().hashCode(); + } + if (!internalGetParams().getMap().isEmpty()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetParams().hashCode(); + } + if (hasQueryExpansionSpec()) { + hash = (37 * hash) + QUERY_EXPANSION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getQueryExpansionSpec().hashCode(); + } + if (hasSpellCorrectionSpec()) { + hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); + } + hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserPseudoId().hashCode(); + if (hasContentSearchSpec()) { + hash = (37 * hash) + CONTENT_SEARCH_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getContentSearchSpec().hashCode(); + } + if (hasEmbeddingSpec()) { + hash = (37 * hash) + EMBEDDING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEmbeddingSpec().hashCode(); + } + hash = (37 * hash) + RANKING_EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getRankingExpression().hashCode(); + hash = (37 * hash) + SAFE_SEARCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSafeSearch()); + if (!internalGetUserLabels().getMap().isEmpty()) { + hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetUserLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchRequest) + com.google.cloud.discoveryengine.v1alpha.SearchRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 11: + return internalGetParams(); + case 22: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 11: + return internalGetMutableParams(); + case 22: + return internalGetMutableUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.class, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.SearchRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + servingConfig_ = ""; + branch_ = ""; + query_ = ""; + imageQuery_ = null; + if (imageQueryBuilder_ != null) { + imageQueryBuilder_.dispose(); + imageQueryBuilder_ = null; + } + pageSize_ = 0; + pageToken_ = ""; + offset_ = 0; + filter_ = ""; + orderBy_ = ""; + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + if (facetSpecsBuilder_ == null) { + facetSpecs_ = java.util.Collections.emptyList(); + } else { + facetSpecs_ = null; + facetSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; + } + internalGetMutableParams().clear(); + queryExpansionSpec_ = null; + if (queryExpansionSpecBuilder_ != null) { + queryExpansionSpecBuilder_.dispose(); + queryExpansionSpecBuilder_ = null; + } + spellCorrectionSpec_ = null; + if (spellCorrectionSpecBuilder_ != null) { + spellCorrectionSpecBuilder_.dispose(); + spellCorrectionSpecBuilder_ = null; + } + userPseudoId_ = ""; + contentSearchSpec_ = null; + if (contentSearchSpecBuilder_ != null) { + contentSearchSpecBuilder_.dispose(); + contentSearchSpecBuilder_ = null; + } + embeddingSpec_ = null; + if (embeddingSpecBuilder_ != null) { + embeddingSpecBuilder_.dispose(); + embeddingSpecBuilder_ = null; + } + rankingExpression_ = ""; + safeSearch_ = false; + internalGetMutableUserLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest build() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchRequest result = + new com.google.cloud.discoveryengine.v1alpha.SearchRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchRequest result) { + if (facetSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + facetSpecs_ = java.util.Collections.unmodifiableList(facetSpecs_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.facetSpecs_ = facetSpecs_; + } else { + result.facetSpecs_ = facetSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.SearchRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.servingConfig_ = servingConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.branch_ = branch_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.imageQuery_ = imageQueryBuilder_ == null ? imageQuery_ : imageQueryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.offset_ = offset_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.params_ = internalGetParams(); + result.params_.makeImmutable(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.queryExpansionSpec_ = + queryExpansionSpecBuilder_ == null + ? queryExpansionSpec_ + : queryExpansionSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.spellCorrectionSpec_ = + spellCorrectionSpecBuilder_ == null + ? spellCorrectionSpec_ + : spellCorrectionSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.userPseudoId_ = userPseudoId_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.contentSearchSpec_ = + contentSearchSpecBuilder_ == null + ? contentSearchSpec_ + : contentSearchSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.embeddingSpec_ = + embeddingSpecBuilder_ == null ? embeddingSpec_ : embeddingSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.rankingExpression_ = rankingExpression_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.safeSearch_ = safeSearch_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.userLabels_ = internalGetUserLabels(); + result.userLabels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.SearchRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.SearchRequest other) { + if (other == com.google.cloud.discoveryengine.v1alpha.SearchRequest.getDefaultInstance()) + return this; + if (!other.getServingConfig().isEmpty()) { + servingConfig_ = other.servingConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBranch().isEmpty()) { + branch_ = other.branch_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasImageQuery()) { + mergeImageQuery(other.getImageQuery()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getOffset() != 0) { + setOffset(other.getOffset()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasUserInfo()) { + mergeUserInfo(other.getUserInfo()); + } + if (facetSpecsBuilder_ == null) { + if (!other.facetSpecs_.isEmpty()) { + if (facetSpecs_.isEmpty()) { + facetSpecs_ = other.facetSpecs_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureFacetSpecsIsMutable(); + facetSpecs_.addAll(other.facetSpecs_); + } + onChanged(); + } + } else { + if (!other.facetSpecs_.isEmpty()) { + if (facetSpecsBuilder_.isEmpty()) { + facetSpecsBuilder_.dispose(); + facetSpecsBuilder_ = null; + facetSpecs_ = other.facetSpecs_; + bitField0_ = (bitField0_ & ~0x00000400); + facetSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetSpecsFieldBuilder() + : null; + } else { + facetSpecsBuilder_.addAllMessages(other.facetSpecs_); + } + } + } + if (other.hasBoostSpec()) { + mergeBoostSpec(other.getBoostSpec()); + } + internalGetMutableParams().mergeFrom(other.internalGetParams()); + bitField0_ |= 0x00001000; + if (other.hasQueryExpansionSpec()) { + mergeQueryExpansionSpec(other.getQueryExpansionSpec()); + } + if (other.hasSpellCorrectionSpec()) { + mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); + } + if (!other.getUserPseudoId().isEmpty()) { + userPseudoId_ = other.userPseudoId_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.hasContentSearchSpec()) { + mergeContentSearchSpec(other.getContentSearchSpec()); + } + if (other.hasEmbeddingSpec()) { + mergeEmbeddingSpec(other.getEmbeddingSpec()); + } + if (!other.getRankingExpression().isEmpty()) { + rankingExpression_ = other.rankingExpression_; + bitField0_ |= 0x00040000; + onChanged(); + } + if (other.getSafeSearch() != false) { + setSafeSearch(other.getSafeSearch()); + } + internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); + bitField0_ |= 0x00100000; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + branch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: + { + offset_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 48 + case 58: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 74: + { + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.parser(), + extensionRegistry); + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(m); + } else { + facetSpecsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + input.readMessage(getBoostSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 82 + case 90: + { + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParams() + .getMutableMap() + .put(params__.getKey(), params__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 90 + case 106: + { + input.readMessage( + getQueryExpansionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 106 + case 114: + { + input.readMessage( + getSpellCorrectionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 114 + case 122: + { + userPseudoId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 122 + case 154: + { + input.readMessage(getImageQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 154 + case 160: + { + safeSearch_ = input.readBool(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 170: + { + input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 170 + case 178: + { + com.google.protobuf.MapEntry userLabels__ = + input.readMessage( + UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableUserLabels() + .getMutableMap() + .put(userLabels__.getKey(), userLabels__.getValue()); + bitField0_ |= 0x00100000; + break; + } // case 178 + case 186: + { + input.readMessage(getEmbeddingSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 186 + case 194: + { + input.readMessage( + getContentSearchSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 194 + case 210: + { + rankingExpression_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 210 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object servingConfig_ = ""; + /** + * + * + *
+     * Required. The resource name of the Search serving config, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+     * This field is used to identify the serving configuration name, set
+     * of models used to make the search.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Search serving config, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+     * This field is used to identify the serving configuration name, set
+     * of models used to make the search.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Search serving config, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+     * This field is used to identify the serving configuration name, set
+     * of models used to make the search.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + servingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Search serving config, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+     * This field is used to identify the serving configuration name, set
+     * of models used to make the search.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServingConfig() { + servingConfig_ = getDefaultInstance().getServingConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Search serving config, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+     * This field is used to identify the serving configuration name, set
+     * of models used to make the search.
+     * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + servingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object branch_ = ""; + /** + * + * + *
+     * The branch resource name, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+     *
+     * Use `default_branch` as the branch ID or leave this field empty, to search
+     * documents under the default branch.
+     * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The branch. + */ + public java.lang.String getBranch() { + java.lang.Object ref = branch_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + branch_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The branch resource name, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+     *
+     * Use `default_branch` as the branch ID or leave this field empty, to search
+     * documents under the default branch.
+     * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for branch. + */ + public com.google.protobuf.ByteString getBranchBytes() { + java.lang.Object ref = branch_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + branch_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The branch resource name, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+     *
+     * Use `default_branch` as the branch ID or leave this field empty, to search
+     * documents under the default branch.
+     * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The branch to set. + * @return This builder for chaining. + */ + public Builder setBranch(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + branch_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The branch resource name, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+     *
+     * Use `default_branch` as the branch ID or leave this field empty, to search
+     * documents under the default branch.
+     * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBranch() { + branch_ = getDefaultInstance().getBranch(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The branch resource name, such as
+     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+     *
+     * Use `default_branch` as the branch ID or leave this field empty, to search
+     * documents under the default branch.
+     * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for branch to set. + * @return This builder for chaining. + */ + public Builder setBranchBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + branch_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * Raw search query.
+     * 
+ * + * string query = 3; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Raw search query.
+     * 
+ * + * string query = 3; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Raw search query.
+     * 
+ * + * string query = 3; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw search query.
+     * 
+ * + * string query = 3; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Raw search query.
+     * 
+ * + * string query = 3; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery imageQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQueryOrBuilder> + imageQueryBuilder_; + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + * + * @return Whether the imageQuery field is set. + */ + public boolean hasImageQuery() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + * + * @return The imageQuery. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery getImageQuery() { + if (imageQueryBuilder_ == null) { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } else { + return imageQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + public Builder setImageQuery( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery value) { + if (imageQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageQuery_ = value; + } else { + imageQueryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + public Builder setImageQuery( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.Builder builderForValue) { + if (imageQueryBuilder_ == null) { + imageQuery_ = builderForValue.build(); + } else { + imageQueryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + public Builder mergeImageQuery( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery value) { + if (imageQueryBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && imageQuery_ != null + && imageQuery_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery + .getDefaultInstance()) { + getImageQueryBuilder().mergeFrom(value); + } else { + imageQuery_ = value; + } + } else { + imageQueryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + public Builder clearImageQuery() { + bitField0_ = (bitField0_ & ~0x00000008); + imageQuery_ = null; + if (imageQueryBuilder_ != null) { + imageQueryBuilder_.dispose(); + imageQueryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.Builder + getImageQueryBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getImageQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQueryOrBuilder + getImageQueryOrBuilder() { + if (imageQueryBuilder_ != null) { + return imageQueryBuilder_.getMessageOrBuilder(); + } else { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } + } + /** + * + * + *
+     * Raw image query.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQueryOrBuilder> + getImageQueryFieldBuilder() { + if (imageQueryBuilder_ == null) { + imageQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQueryOrBuilder>( + getImageQuery(), getParentForChildren(), isClean()); + imageQuery_ = null; + } + return imageQueryBuilder_; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+     * unspecified, defaults to a reasonable value. The maximum allowed value is
+     * 100. Values above 100 are coerced to 100.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+     * unspecified, defaults to a reasonable value. The maximum allowed value is
+     * 100. Values above 100 are coerced to 100.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 page_size = 4; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+     * unspecified, defaults to a reasonable value. The maximum allowed value is
+     * 100. Values above 100 are coerced to 100.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 page_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000010); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token received from a previous
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * must match the call that provided the page token. Otherwise, an
+     *  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token received from a previous
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * must match the call that provided the page token. Otherwise, an
+     *  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token received from a previous
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * must match the call that provided the page token. Otherwise, an
+     *  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string page_token = 5; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token received from a previous
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * must match the call that provided the page token. Otherwise, an
+     *  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string page_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token received from a previous
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * must match the call that provided the page token. Otherwise, an
+     *  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string page_token = 5; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int offset_; + /** + * + * + *
+     * A 0-indexed integer that specifies the current offset (that is, starting
+     * result location, amongst the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s deemed by the
+     * API as relevant) in search results. This field is only considered if
+     * [page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * is unset.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 offset = 6; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; + } + /** + * + * + *
+     * A 0-indexed integer that specifies the current offset (that is, starting
+     * result location, amongst the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s deemed by the
+     * API as relevant) in search results. This field is only considered if
+     * [page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * is unset.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 offset = 6; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(int value) { + + offset_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * A 0-indexed integer that specifies the current offset (that is, starting
+     * result location, amongst the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document]s deemed by the
+     * API as relevant) in search results. This field is only considered if
+     * [page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * is unset.
+     *
+     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * int32 offset = 6; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000040); + offset_ = 0; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered. Filter
+     * expression is case-sensitive.
+     *
+     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * string filter = 7; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered. Filter
+     * expression is case-sensitive.
+     *
+     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * string filter = 7; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered. Filter
+     * expression is case-sensitive.
+     *
+     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * string filter = 7; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered. Filter
+     * expression is case-sensitive.
+     *
+     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * string filter = 7; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered. Filter
+     * expression is case-sensitive.
+     *
+     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+     * 
+ * + * string filter = 7; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * The order in which documents are returned. Documents can be ordered by
+     * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * object. Leave it unset if ordered by relevance. `order_by` expression is
+     * case-sensitive.
+     *
+     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+     * 
+ * + * string order_by = 8; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The order in which documents are returned. Documents can be ordered by
+     * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * object. Leave it unset if ordered by relevance. `order_by` expression is
+     * case-sensitive.
+     *
+     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+     * 
+ * + * string order_by = 8; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The order in which documents are returned. Documents can be ordered by
+     * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * object. Leave it unset if ordered by relevance. `order_by` expression is
+     * case-sensitive.
+     *
+     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+     * 
+ * + * string order_by = 8; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The order in which documents are returned. Documents can be ordered by
+     * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * object. Leave it unset if ordered by relevance. `order_by` expression is
+     * case-sensitive.
+     *
+     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+     * 
+ * + * string order_by = 8; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The order in which documents are returned. Documents can be ordered by
+     * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+     * object. Leave it unset if ordered by relevance. `order_by` expression is
+     * case-sensitive.
+     *
+     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+     * 
+ * + * string order_by = 8; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.UserInfo userInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserInfo, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder> + userInfoBuilder_; + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + * + * @return Whether the userInfo field is set. + */ + public boolean hasUserInfo() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + * + * @return The userInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.UserInfo getUserInfo() { + if (userInfoBuilder_ == null) { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } else { + return userInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + public Builder setUserInfo(com.google.cloud.discoveryengine.v1alpha.UserInfo value) { + if (userInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInfo_ = value; + } else { + userInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + public Builder setUserInfo( + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder builderForValue) { + if (userInfoBuilder_ == null) { + userInfo_ = builderForValue.build(); + } else { + userInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1alpha.UserInfo value) { + if (userInfoBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && userInfo_ != null + && userInfo_ + != com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance()) { + getUserInfoBuilder().mergeFrom(value); + } else { + userInfo_ = value; + } + } else { + userInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + public Builder clearUserInfo() { + bitField0_ = (bitField0_ & ~0x00000200); + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + public com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder getUserInfoBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getUserInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + public com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder getUserInfoOrBuilder() { + if (userInfoBuilder_ != null) { + return userInfoBuilder_.getMessageOrBuilder(); + } else { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } + } + /** + * + * + *
+     * Information about the end user.
+     * Highly recommended for analytics.
+     * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * is used to deduce `device_type` for analytics.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserInfo, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder> + getUserInfoFieldBuilder() { + if (userInfoBuilder_ == null) { + userInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserInfo, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder>( + getUserInfo(), getParentForChildren(), isClean()); + userInfo_ = null; + } + return userInfoBuilder_; + } + + private java.util.List + facetSpecs_ = java.util.Collections.emptyList(); + + private void ensureFacetSpecsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + facetSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec>(facetSpecs_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder> + facetSpecsBuilder_; + + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public java.util.List + getFacetSpecsList() { + if (facetSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetSpecs_); + } else { + return facetSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public int getFacetSpecsCount() { + if (facetSpecsBuilder_ == null) { + return facetSpecs_.size(); + } else { + return facetSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec getFacetSpecs( + int index) { + if (facetSpecsBuilder_ == null) { + return facetSpecs_.get(index); + } else { + return facetSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder setFacetSpecs( + int index, com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec value) { + if (facetSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetSpecsIsMutable(); + facetSpecs_.set(index, value); + onChanged(); + } else { + facetSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder setFacetSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder builderForValue) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + facetSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder addFacetSpecs( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec value) { + if (facetSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetSpecsIsMutable(); + facetSpecs_.add(value); + onChanged(); + } else { + facetSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder addFacetSpecs( + int index, com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec value) { + if (facetSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetSpecsIsMutable(); + facetSpecs_.add(index, value); + onChanged(); + } else { + facetSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder addFacetSpecs( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder builderForValue) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(builderForValue.build()); + onChanged(); + } else { + facetSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder addFacetSpecs( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder builderForValue) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + facetSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder addAllFacetSpecs( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec> + values) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetSpecs_); + onChanged(); + } else { + facetSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder clearFacetSpecs() { + if (facetSpecsBuilder_ == null) { + facetSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + facetSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public Builder removeFacetSpecs(int index) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.remove(index); + onChanged(); + } else { + facetSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder + getFacetSpecsBuilder(int index) { + return getFacetSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder + getFacetSpecsOrBuilder(int index) { + if (facetSpecsBuilder_ == null) { + return facetSpecs_.get(index); + } else { + return facetSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder> + getFacetSpecsOrBuilderList() { + if (facetSpecsBuilder_ != null) { + return facetSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facetSpecs_); + } + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder + addFacetSpecsBuilder() { + return getFacetSpecsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder + addFacetSpecsBuilder(int index) { + return getFacetSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * Facet specifications for faceted search. If empty, no facets are returned.
+     *
+     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+     * error is returned.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + public java.util.List + getFacetSpecsBuilderList() { + return getFacetSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder> + getFacetSpecsFieldBuilder() { + if (facetSpecsBuilder_ == null) { + facetSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder>( + facetSpecs_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); + facetSpecs_ = null; + } + return facetSpecsBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boostSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder> + boostSpecBuilder_; + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + * + * @return Whether the boostSpec field is set. + */ + public boolean hasBoostSpec() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + * + * @return The boostSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec getBoostSpec() { + if (boostSpecBuilder_ == null) { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } else { + return boostSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boostSpec_ = value; + } else { + boostSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder builderForValue) { + if (boostSpecBuilder_ == null) { + boostSpec_ = builderForValue.build(); + } else { + boostSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + public Builder mergeBoostSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && boostSpec_ != null + && boostSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec + .getDefaultInstance()) { + getBoostSpecBuilder().mergeFrom(value); + } else { + boostSpec_ = value; + } + } else { + boostSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + public Builder clearBoostSpec() { + bitField0_ = (bitField0_ & ~0x00000800); + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder + getBoostSpecBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getBoostSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + if (boostSpecBuilder_ != null) { + return boostSpecBuilder_.getMessageOrBuilder(); + } else { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } + } + /** + * + * + *
+     * Boost specification to boost certain documents.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder> + getBoostSpecFieldBuilder() { + if (boostSpecBuilder_ == null) { + boostSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder>( + getBoostSpec(), getParentForChildren(), isClean()); + boostSpec_ = null; + } + return boostSpecBuilder_; + } + + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField + internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + private com.google.protobuf.MapField + internalGetMutableParams() { + if (params_ == null) { + params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); + } + if (!params_.isMutable()) { + params_ = params_.copy(); + } + bitField0_ |= 0x00001000; + onChanged(); + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + /** + * + * + *
+     * Additional search parameters.
+     *
+     * For public website search only, supported values are:
+     *
+     * * `user_country_code`: string. Default empty. If set to non-empty, results
+     *    are restricted or boosted based on the location provided.
+     * * `search_type`: double. Default empty. Enables non-webpage searching
+     *   depending on the value. The only valid non-default value is 1,
+     *   which enables image searching.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().getMap().containsKey(key); + } + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + /** + * + * + *
+     * Additional search parameters.
+     *
+     * For public website search only, supported values are:
+     *
+     * * `user_country_code`: string. Default empty. If set to non-empty, results
+     *    are restricted or boosted based on the location provided.
+     * * `search_type`: double. Default empty. Enables non-webpage searching
+     *   depending on the value. The only valid non-default value is 1,
+     *   which enables image searching.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + /** + * + * + *
+     * Additional search parameters.
+     *
+     * For public website search only, supported values are:
+     *
+     * * `user_country_code`: string. Default empty. If set to non-empty, results
+     *    are restricted or boosted based on the location provided.
+     * * `search_type`: double. Default empty. Enables non-webpage searching
+     *   depending on the value. The only valid non-default value is 1,
+     *   which enables image searching.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional search parameters.
+     *
+     * For public website search only, supported values are:
+     *
+     * * `user_country_code`: string. Default empty. If set to non-empty, results
+     *    are restricted or boosted based on the location provided.
+     * * `search_type`: double. Default empty. Enables non-webpage searching
+     *   depending on the value. The only valid non-default value is 1,
+     *   which enables image searching.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearParams() { + bitField0_ = (bitField0_ & ~0x00001000); + internalGetMutableParams().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional search parameters.
+     *
+     * For public website search only, supported values are:
+     *
+     * * `user_country_code`: string. Default empty. If set to non-empty, results
+     *    are restricted or boosted based on the location provided.
+     * * `search_type`: double. Default empty. Enables non-webpage searching
+     *   depending on the value. The only valid non-default value is 1,
+     *   which enables image searching.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + public Builder removeParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableParams().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableParams() { + bitField0_ |= 0x00001000; + return internalGetMutableParams().getMutableMap(); + } + /** + * + * + *
+     * Additional search parameters.
+     *
+     * For public website search only, supported values are:
+     *
+     * * `user_country_code`: string. Default empty. If set to non-empty, results
+     *    are restricted or boosted based on the location provided.
+     * * `search_type`: double. Default empty. Enables non-webpage searching
+     *   depending on the value. The only valid non-default value is 1,
+     *   which enables image searching.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + public Builder putParams(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableParams().getMutableMap().put(key, value); + bitField0_ |= 0x00001000; + return this; + } + /** + * + * + *
+     * Additional search parameters.
+     *
+     * For public website search only, supported values are:
+     *
+     * * `user_country_code`: string. Default empty. If set to non-empty, results
+     *    are restricted or boosted based on the location provided.
+     * * `search_type`: double. Default empty. Enables non-webpage searching
+     *   depending on the value. The only valid non-default value is 1,
+     *   which enables image searching.
+     * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + public Builder putAllParams(java.util.Map values) { + internalGetMutableParams().getMutableMap().putAll(values); + bitField0_ |= 0x00001000; + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + queryExpansionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpecOrBuilder> + queryExpansionSpecBuilder_; + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return Whether the queryExpansionSpec field is set. + */ + public boolean hasQueryExpansionSpec() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return The queryExpansionSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + getQueryExpansionSpec() { + if (queryExpansionSpecBuilder_ == null) { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; + } else { + return queryExpansionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + public Builder setQueryExpansionSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec value) { + if (queryExpansionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryExpansionSpec_ = value; + } else { + queryExpansionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + public Builder setQueryExpansionSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Builder + builderForValue) { + if (queryExpansionSpecBuilder_ == null) { + queryExpansionSpec_ = builderForValue.build(); + } else { + queryExpansionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + public Builder mergeQueryExpansionSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec value) { + if (queryExpansionSpecBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && queryExpansionSpec_ != null + && queryExpansionSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDefaultInstance()) { + getQueryExpansionSpecBuilder().mergeFrom(value); + } else { + queryExpansionSpec_ = value; + } + } else { + queryExpansionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + public Builder clearQueryExpansionSpec() { + bitField0_ = (bitField0_ & ~0x00002000); + queryExpansionSpec_ = null; + if (queryExpansionSpecBuilder_ != null) { + queryExpansionSpecBuilder_.dispose(); + queryExpansionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Builder + getQueryExpansionSpecBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getQueryExpansionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpecOrBuilder + getQueryExpansionSpecOrBuilder() { + if (queryExpansionSpecBuilder_ != null) { + return queryExpansionSpecBuilder_.getMessageOrBuilder(); + } else { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; + } + } + /** + * + * + *
+     * The query expansion specification that specifies the conditions under which
+     * query expansion occurs.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpecOrBuilder> + getQueryExpansionSpecFieldBuilder() { + if (queryExpansionSpecBuilder_ == null) { + queryExpansionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpecOrBuilder>( + getQueryExpansionSpec(), getParentForChildren(), isClean()); + queryExpansionSpec_ = null; + } + return queryExpansionSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + spellCorrectionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpecOrBuilder> + spellCorrectionSpecBuilder_; + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + public boolean hasSpellCorrectionSpec() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return The spellCorrectionSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec() { + if (spellCorrectionSpecBuilder_ == null) { + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; + } else { + return spellCorrectionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + public Builder setSpellCorrectionSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spellCorrectionSpec_ = value; + } else { + spellCorrectionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + public Builder setSpellCorrectionSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Builder + builderForValue) { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = builderForValue.build(); + } else { + spellCorrectionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + public Builder mergeSpellCorrectionSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && spellCorrectionSpec_ != null + && spellCorrectionSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance()) { + getSpellCorrectionSpecBuilder().mergeFrom(value); + } else { + spellCorrectionSpec_ = value; + } + } else { + spellCorrectionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + public Builder clearSpellCorrectionSpec() { + bitField0_ = (bitField0_ & ~0x00004000); + spellCorrectionSpec_ = null; + if (spellCorrectionSpecBuilder_ != null) { + spellCorrectionSpecBuilder_.dispose(); + spellCorrectionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Builder + getSpellCorrectionSpecBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getSpellCorrectionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + if (spellCorrectionSpecBuilder_ != null) { + return spellCorrectionSpecBuilder_.getMessageOrBuilder(); + } else { + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; + } + } + /** + * + * + *
+     * The spell correction specification that specifies the mode under
+     * which spell correction takes effect.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpecOrBuilder> + getSpellCorrectionSpecFieldBuilder() { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest + .SpellCorrectionSpecOrBuilder>( + getSpellCorrectionSpec(), getParentForChildren(), isClean()); + spellCorrectionSpec_ = null; + } + return spellCorrectionSpecBuilder_; + } + + private java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string user_pseudo_id = 15; + * + * @return The userPseudoId. + */ + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string user_pseudo_id = 15; + * + * @return The bytes for userPseudoId. + */ + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string user_pseudo_id = 15; + * + * @param value The userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPseudoId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string user_pseudo_id = 15; + * + * @return This builder for chaining. + */ + public Builder clearUserPseudoId() { + userPseudoId_ = getDefaultInstance().getUserPseudoId(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking visitors. For example, this could be
+     * implemented with an HTTP cookie, which should be able to uniquely identify
+     * a visitor on a single device. This unique identifier should not change if
+     * the visitor logs in or out of the website.
+     *
+     * This field should NOT have a fixed value such as `unknown_visitor`.
+     *
+     * This should be the same identifier as
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * and
+     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+     * 
+ * + * string user_pseudo_id = 15; + * + * @param value The bytes for userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPseudoId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + contentSearchSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpecOrBuilder> + contentSearchSpecBuilder_; + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return Whether the contentSearchSpec field is set. + */ + public boolean hasContentSearchSpec() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return The contentSearchSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + getContentSearchSpec() { + if (contentSearchSpecBuilder_ == null) { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; + } else { + return contentSearchSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + public Builder setContentSearchSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec value) { + if (contentSearchSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contentSearchSpec_ = value; + } else { + contentSearchSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + public Builder setContentSearchSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.Builder + builderForValue) { + if (contentSearchSpecBuilder_ == null) { + contentSearchSpec_ = builderForValue.build(); + } else { + contentSearchSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + public Builder mergeContentSearchSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec value) { + if (contentSearchSpecBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && contentSearchSpec_ != null + && contentSearchSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .getDefaultInstance()) { + getContentSearchSpecBuilder().mergeFrom(value); + } else { + contentSearchSpec_ = value; + } + } else { + contentSearchSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + public Builder clearContentSearchSpec() { + bitField0_ = (bitField0_ & ~0x00010000); + contentSearchSpec_ = null; + if (contentSearchSpecBuilder_ != null) { + contentSearchSpecBuilder_.dispose(); + contentSearchSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.Builder + getContentSearchSpecBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getContentSearchSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpecOrBuilder + getContentSearchSpecOrBuilder() { + if (contentSearchSpecBuilder_ != null) { + return contentSearchSpecBuilder_.getMessageOrBuilder(); + } else { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; + } + } + /** + * + * + *
+     * A specification for configuring the behavior of content search.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpecOrBuilder> + getContentSearchSpecFieldBuilder() { + if (contentSearchSpecBuilder_ == null) { + contentSearchSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpecOrBuilder>( + getContentSearchSpec(), getParentForChildren(), isClean()); + contentSearchSpec_ = null; + } + return contentSearchSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embeddingSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpecOrBuilder> + embeddingSpecBuilder_; + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return Whether the embeddingSpec field is set. + */ + public boolean hasEmbeddingSpec() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return The embeddingSpec. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec getEmbeddingSpec() { + if (embeddingSpecBuilder_ == null) { + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .getDefaultInstance() + : embeddingSpec_; + } else { + return embeddingSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + public Builder setEmbeddingSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec value) { + if (embeddingSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + embeddingSpec_ = value; + } else { + embeddingSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + public Builder setEmbeddingSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.Builder + builderForValue) { + if (embeddingSpecBuilder_ == null) { + embeddingSpec_ = builderForValue.build(); + } else { + embeddingSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + public Builder mergeEmbeddingSpec( + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec value) { + if (embeddingSpecBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && embeddingSpec_ != null + && embeddingSpec_ + != com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .getDefaultInstance()) { + getEmbeddingSpecBuilder().mergeFrom(value); + } else { + embeddingSpec_ = value; + } + } else { + embeddingSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + public Builder clearEmbeddingSpec() { + bitField0_ = (bitField0_ & ~0x00020000); + embeddingSpec_ = null; + if (embeddingSpecBuilder_ != null) { + embeddingSpecBuilder_.dispose(); + embeddingSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.Builder + getEmbeddingSpecBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getEmbeddingSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpecOrBuilder + getEmbeddingSpecOrBuilder() { + if (embeddingSpecBuilder_ != null) { + return embeddingSpecBuilder_.getMessageOrBuilder(); + } else { + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec + .getDefaultInstance() + : embeddingSpec_; + } + } + /** + * + * + *
+     * Uses the provided embedding to do additional semantic document retrieval.
+     * The retrieval is based on the dot product of
+     * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+     * embedding that is provided in
+     * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+     *
+     * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+     * provided, it will use [ServingConfig.embedding_config.field_paths][].
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpecOrBuilder> + getEmbeddingSpecFieldBuilder() { + if (embeddingSpecBuilder_ == null) { + embeddingSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpecOrBuilder>( + getEmbeddingSpec(), getParentForChildren(), isClean()); + embeddingSpec_ = null; + } + return embeddingSpecBuilder_; + } + + private java.lang.Object rankingExpression_ = ""; + /** + * + * + *
+     * The ranking expression controls the customized ranking on retrieval
+     * documents. This overrides
+     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+     * The ranking expression is a single function or multiple functions that are
+     * joint by "+".
+     *   * ranking_expression = function, { " + ", function };
+     * Supported functions:
+     *   * double * relevance_score
+     *   * double * dotProduct(embedding_field_path)
+     * Function variables:
+     *   `relevance_score`: pre-defined keywords, used for measure relevance
+     *   between query and document.
+     *   `embedding_field_path`: the document embedding field
+     *   used with query embedding vector.
+     *   `dotProduct`: embedding function between embedding_field_path and query
+     *   embedding vector.
+     *
+     *  Example ranking expression:
+     *    If document has an embedding field doc_embedding, the ranking expression
+     *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+     * 
+ * + * string ranking_expression = 26; + * + * @return The rankingExpression. + */ + public java.lang.String getRankingExpression() { + java.lang.Object ref = rankingExpression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rankingExpression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ranking expression controls the customized ranking on retrieval
+     * documents. This overrides
+     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+     * The ranking expression is a single function or multiple functions that are
+     * joint by "+".
+     *   * ranking_expression = function, { " + ", function };
+     * Supported functions:
+     *   * double * relevance_score
+     *   * double * dotProduct(embedding_field_path)
+     * Function variables:
+     *   `relevance_score`: pre-defined keywords, used for measure relevance
+     *   between query and document.
+     *   `embedding_field_path`: the document embedding field
+     *   used with query embedding vector.
+     *   `dotProduct`: embedding function between embedding_field_path and query
+     *   embedding vector.
+     *
+     *  Example ranking expression:
+     *    If document has an embedding field doc_embedding, the ranking expression
+     *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+     * 
+ * + * string ranking_expression = 26; + * + * @return The bytes for rankingExpression. + */ + public com.google.protobuf.ByteString getRankingExpressionBytes() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingExpression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ranking expression controls the customized ranking on retrieval
+     * documents. This overrides
+     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+     * The ranking expression is a single function or multiple functions that are
+     * joint by "+".
+     *   * ranking_expression = function, { " + ", function };
+     * Supported functions:
+     *   * double * relevance_score
+     *   * double * dotProduct(embedding_field_path)
+     * Function variables:
+     *   `relevance_score`: pre-defined keywords, used for measure relevance
+     *   between query and document.
+     *   `embedding_field_path`: the document embedding field
+     *   used with query embedding vector.
+     *   `dotProduct`: embedding function between embedding_field_path and query
+     *   embedding vector.
+     *
+     *  Example ranking expression:
+     *    If document has an embedding field doc_embedding, the ranking expression
+     *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+     * 
+ * + * string ranking_expression = 26; + * + * @param value The rankingExpression to set. + * @return This builder for chaining. + */ + public Builder setRankingExpression(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rankingExpression_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranking expression controls the customized ranking on retrieval
+     * documents. This overrides
+     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+     * The ranking expression is a single function or multiple functions that are
+     * joint by "+".
+     *   * ranking_expression = function, { " + ", function };
+     * Supported functions:
+     *   * double * relevance_score
+     *   * double * dotProduct(embedding_field_path)
+     * Function variables:
+     *   `relevance_score`: pre-defined keywords, used for measure relevance
+     *   between query and document.
+     *   `embedding_field_path`: the document embedding field
+     *   used with query embedding vector.
+     *   `dotProduct`: embedding function between embedding_field_path and query
+     *   embedding vector.
+     *
+     *  Example ranking expression:
+     *    If document has an embedding field doc_embedding, the ranking expression
+     *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+     * 
+ * + * string ranking_expression = 26; + * + * @return This builder for chaining. + */ + public Builder clearRankingExpression() { + rankingExpression_ = getDefaultInstance().getRankingExpression(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + return this; + } + /** + * + * + *
+     * The ranking expression controls the customized ranking on retrieval
+     * documents. This overrides
+     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+     * The ranking expression is a single function or multiple functions that are
+     * joint by "+".
+     *   * ranking_expression = function, { " + ", function };
+     * Supported functions:
+     *   * double * relevance_score
+     *   * double * dotProduct(embedding_field_path)
+     * Function variables:
+     *   `relevance_score`: pre-defined keywords, used for measure relevance
+     *   between query and document.
+     *   `embedding_field_path`: the document embedding field
+     *   used with query embedding vector.
+     *   `dotProduct`: embedding function between embedding_field_path and query
+     *   embedding vector.
+     *
+     *  Example ranking expression:
+     *    If document has an embedding field doc_embedding, the ranking expression
+     *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+     * 
+ * + * string ranking_expression = 26; + * + * @param value The bytes for rankingExpression to set. + * @return This builder for chaining. + */ + public Builder setRankingExpressionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rankingExpression_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + private boolean safeSearch_; + /** + * + * + *
+     * Whether to turn on safe search. This is only supported for
+     * website search.
+     * 
+ * + * bool safe_search = 20; + * + * @return The safeSearch. + */ + @java.lang.Override + public boolean getSafeSearch() { + return safeSearch_; + } + /** + * + * + *
+     * Whether to turn on safe search. This is only supported for
+     * website search.
+     * 
+ * + * bool safe_search = 20; + * + * @param value The safeSearch to set. + * @return This builder for chaining. + */ + public Builder setSafeSearch(boolean value) { + + safeSearch_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to turn on safe search. This is only supported for
+     * website search.
+     * 
+ * + * bool safe_search = 20; + * + * @return This builder for chaining. + */ + public Builder clearSafeSearch() { + bitField0_ = (bitField0_ & ~0x00080000); + safeSearch_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField + internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableUserLabels() { + if (userLabels_ == null) { + userLabels_ = + com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + if (!userLabels_.isMutable()) { + userLabels_ = userLabels_.copy(); + } + bitField0_ |= 0x00100000; + onChanged(); + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearUserLabels() { + bitField0_ = (bitField0_ & ~0x00100000); + internalGetMutableUserLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 22; + */ + public Builder removeUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableUserLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableUserLabels() { + bitField0_ |= 0x00100000; + return internalGetMutableUserLabels().getMutableMap(); + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 22; + */ + public Builder putUserLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableUserLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00100000; + return this; + } + /** + * + * + *
+     * The user labels applied to a resource must meet the following requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> user_labels = 22; + */ + public Builder putAllUserLabels(java.util.Map values) { + internalGetMutableUserLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00100000; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchRequest) + private static final com.google.cloud.discoveryengine.v1alpha.SearchRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequestOrBuilder.java new file mode 100644 index 000000000000..e58596511348 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchRequestOrBuilder.java @@ -0,0 +1,1010 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface SearchRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Search serving config, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+   * This field is used to identify the serving configuration name, set
+   * of models used to make the search.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + java.lang.String getServingConfig(); + /** + * + * + *
+   * Required. The resource name of the Search serving config, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
+   * This field is used to identify the serving configuration name, set
+   * of models used to make the search.
+   * 
+ * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + com.google.protobuf.ByteString getServingConfigBytes(); + + /** + * + * + *
+   * The branch resource name, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+   *
+   * Use `default_branch` as the branch ID or leave this field empty, to search
+   * documents under the default branch.
+   * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The branch. + */ + java.lang.String getBranch(); + /** + * + * + *
+   * The branch resource name, such as
+   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
+   *
+   * Use `default_branch` as the branch ID or leave this field empty, to search
+   * documents under the default branch.
+   * 
+ * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for branch. + */ + com.google.protobuf.ByteString getBranchBytes(); + + /** + * + * + *
+   * Raw search query.
+   * 
+ * + * string query = 3; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * Raw search query.
+   * 
+ * + * string query = 3; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * Raw image query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + * + * @return Whether the imageQuery field is set. + */ + boolean hasImageQuery(); + /** + * + * + *
+   * Raw image query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + * + * @return The imageQuery. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery getImageQuery(); + /** + * + * + *
+   * Raw image query.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery image_query = 19; + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQueryOrBuilder + getImageQueryOrBuilder(); + + /** + * + * + *
+   * Maximum number of
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
+   * unspecified, defaults to a reasonable value. The maximum allowed value is
+   * 100. Values above 100 are coerced to 100.
+   *
+   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token received from a previous
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * must match the call that provided the page token. Otherwise, an
+   *  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token received from a previous
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * must match the call that provided the page token. Otherwise, an
+   *  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A 0-indexed integer that specifies the current offset (that is, starting
+   * result location, amongst the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document]s deemed by the
+   * API as relevant) in search results. This field is only considered if
+   * [page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+   * is unset.
+   *
+   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * int32 offset = 6; + * + * @return The offset. + */ + int getOffset(); + + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered. Filter
+   * expression is case-sensitive.
+   *
+   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * string filter = 7; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered. Filter
+   * expression is case-sensitive.
+   *
+   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
+   * 
+ * + * string filter = 7; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The order in which documents are returned. Documents can be ordered by
+   * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * object. Leave it unset if ordered by relevance. `order_by` expression is
+   * case-sensitive.
+   *
+   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+   * 
+ * + * string order_by = 8; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * The order in which documents are returned. Documents can be ordered by
+   * a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
+   * object. Leave it unset if ordered by relevance. `order_by` expression is
+   * case-sensitive.
+   *
+   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
+   * 
+ * + * string order_by = 8; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Information about the end user.
+   * Highly recommended for analytics.
+   * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * is used to deduce `device_type` for analytics.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + * + * @return Whether the userInfo field is set. + */ + boolean hasUserInfo(); + /** + * + * + *
+   * Information about the end user.
+   * Highly recommended for analytics.
+   * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * is used to deduce `device_type` for analytics.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + * + * @return The userInfo. + */ + com.google.cloud.discoveryengine.v1alpha.UserInfo getUserInfo(); + /** + * + * + *
+   * Information about the end user.
+   * Highly recommended for analytics.
+   * [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * is used to deduce `device_type` for analytics.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 21; + */ + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder getUserInfoOrBuilder(); + + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + java.util.List + getFacetSpecsList(); + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec getFacetSpecs(int index); + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + int getFacetSpecsCount(); + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder> + getFacetSpecsOrBuilderList(); + /** + * + * + *
+   * Facet specifications for faceted search. If empty, no facets are returned.
+   *
+   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
+   * error is returned.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec facet_specs = 9; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpecOrBuilder getFacetSpecsOrBuilder( + int index); + + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + * + * @return Whether the boostSpec field is set. + */ + boolean hasBoostSpec(); + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + * + * @return The boostSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec getBoostSpec(); + /** + * + * + *
+   * Boost specification to boost certain documents.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec boost_spec = 10; + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpecOrBuilder getBoostSpecOrBuilder(); + + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + int getParamsCount(); + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + boolean containsParams(java.lang.String key); + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getParams(); + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + java.util.Map getParamsMap(); + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + /* nullable */ + com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + /** + * + * + *
+   * Additional search parameters.
+   *
+   * For public website search only, supported values are:
+   *
+   * * `user_country_code`: string. Default empty. If set to non-empty, results
+   *    are restricted or boosted based on the location provided.
+   * * `search_type`: double. Default empty. Enables non-webpage searching
+   *   depending on the value. The only valid non-default value is 1,
+   *   which enables image searching.
+   * 
+ * + * map<string, .google.protobuf.Value> params = 11; + */ + com.google.protobuf.Value getParamsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The query expansion specification that specifies the conditions under which
+   * query expansion occurs.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return Whether the queryExpansionSpec field is set. + */ + boolean hasQueryExpansionSpec(); + /** + * + * + *
+   * The query expansion specification that specifies the conditions under which
+   * query expansion occurs.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return The queryExpansionSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec getQueryExpansionSpec(); + /** + * + * + *
+   * The query expansion specification that specifies the conditions under which
+   * query expansion occurs.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpecOrBuilder + getQueryExpansionSpecOrBuilder(); + + /** + * + * + *
+   * The spell correction specification that specifies the mode under
+   * which spell correction takes effect.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + boolean hasSpellCorrectionSpec(); + /** + * + * + *
+   * The spell correction specification that specifies the mode under
+   * which spell correction takes effect.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return The spellCorrectionSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec(); + /** + * + * + *
+   * The spell correction specification that specifies the mode under
+   * which spell correction takes effect.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder(); + + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string user_pseudo_id = 15; + * + * @return The userPseudoId. + */ + java.lang.String getUserPseudoId(); + /** + * + * + *
+   * A unique identifier for tracking visitors. For example, this could be
+   * implemented with an HTTP cookie, which should be able to uniquely identify
+   * a visitor on a single device. This unique identifier should not change if
+   * the visitor logs in or out of the website.
+   *
+   * This field should NOT have a fixed value such as `unknown_visitor`.
+   *
+   * This should be the same identifier as
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * and
+   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id]
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
+   * 
+ * + * string user_pseudo_id = 15; + * + * @return The bytes for userPseudoId. + */ + com.google.protobuf.ByteString getUserPseudoIdBytes(); + + /** + * + * + *
+   * A specification for configuring the behavior of content search.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return Whether the contentSearchSpec field is set. + */ + boolean hasContentSearchSpec(); + /** + * + * + *
+   * A specification for configuring the behavior of content search.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return The contentSearchSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec getContentSearchSpec(); + /** + * + * + *
+   * A specification for configuring the behavior of content search.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpecOrBuilder + getContentSearchSpecOrBuilder(); + + /** + * + * + *
+   * Uses the provided embedding to do additional semantic document retrieval.
+   * The retrieval is based on the dot product of
+   * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+   * embedding that is provided in
+   * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+   *
+   * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+   * provided, it will use [ServingConfig.embedding_config.field_paths][].
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return Whether the embeddingSpec field is set. + */ + boolean hasEmbeddingSpec(); + /** + * + * + *
+   * Uses the provided embedding to do additional semantic document retrieval.
+   * The retrieval is based on the dot product of
+   * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+   * embedding that is provided in
+   * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+   *
+   * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+   * provided, it will use [ServingConfig.embedding_config.field_paths][].
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return The embeddingSpec. + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec getEmbeddingSpec(); + /** + * + * + *
+   * Uses the provided embedding to do additional semantic document retrieval.
+   * The retrieval is based on the dot product of
+   * [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
+   * embedding that is provided in
+   * [SearchRequest.embedding_spec.embedding_vectors.field_path][].
+   *
+   * If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
+   * provided, it will use [ServingConfig.embedding_config.field_paths][].
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpecOrBuilder + getEmbeddingSpecOrBuilder(); + + /** + * + * + *
+   * The ranking expression controls the customized ranking on retrieval
+   * documents. This overrides
+   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+   * The ranking expression is a single function or multiple functions that are
+   * joint by "+".
+   *   * ranking_expression = function, { " + ", function };
+   * Supported functions:
+   *   * double * relevance_score
+   *   * double * dotProduct(embedding_field_path)
+   * Function variables:
+   *   `relevance_score`: pre-defined keywords, used for measure relevance
+   *   between query and document.
+   *   `embedding_field_path`: the document embedding field
+   *   used with query embedding vector.
+   *   `dotProduct`: embedding function between embedding_field_path and query
+   *   embedding vector.
+   *
+   *  Example ranking expression:
+   *    If document has an embedding field doc_embedding, the ranking expression
+   *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+   * 
+ * + * string ranking_expression = 26; + * + * @return The rankingExpression. + */ + java.lang.String getRankingExpression(); + /** + * + * + *
+   * The ranking expression controls the customized ranking on retrieval
+   * documents. This overrides
+   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
+   * The ranking expression is a single function or multiple functions that are
+   * joint by "+".
+   *   * ranking_expression = function, { " + ", function };
+   * Supported functions:
+   *   * double * relevance_score
+   *   * double * dotProduct(embedding_field_path)
+   * Function variables:
+   *   `relevance_score`: pre-defined keywords, used for measure relevance
+   *   between query and document.
+   *   `embedding_field_path`: the document embedding field
+   *   used with query embedding vector.
+   *   `dotProduct`: embedding function between embedding_field_path and query
+   *   embedding vector.
+   *
+   *  Example ranking expression:
+   *    If document has an embedding field doc_embedding, the ranking expression
+   *    could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
+   * 
+ * + * string ranking_expression = 26; + * + * @return The bytes for rankingExpression. + */ + com.google.protobuf.ByteString getRankingExpressionBytes(); + + /** + * + * + *
+   * Whether to turn on safe search. This is only supported for
+   * website search.
+   * 
+ * + * bool safe_search = 20; + * + * @return The safeSearch. + */ + boolean getSafeSearch(); + + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + int getUserLabelsCount(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + boolean containsUserLabels(java.lang.String key); + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getUserLabels(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + java.util.Map getUserLabelsMap(); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + /* nullable */ + java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The user labels applied to a resource must meet the following requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> user_labels = 22; + */ + java.lang.String getUserLabelsOrThrow(java.lang.String key); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponse.java new file mode 100644 index 000000000000..eeb429acf90f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponse.java @@ -0,0 +1,15113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Response message for
+ * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse} + */ +public final class SearchResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse) + SearchResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchResponse.newBuilder() to construct. + private SearchResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchResponse() { + results_ = java.util.Collections.emptyList(); + facets_ = java.util.Collections.emptyList(); + attributionToken_ = ""; + redirectUri_ = ""; + nextPageToken_ = ""; + correctedQuery_ = ""; + appliedControls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + geoSearchDebugInfo_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Builder.class); + } + + public interface SearchResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+     * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+     * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * The document data snippet in the search response. Only fields that are
+     * marked as retrievable are populated.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return Whether the document field is set. + */ + boolean hasDocument(); + /** + * + * + *
+     * The document data snippet in the search response. Only fields that are
+     * marked as retrievable are populated.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return The document. + */ + com.google.cloud.discoveryengine.v1alpha.Document getDocument(); + /** + * + * + *
+     * The document data snippet in the search response. Only fields that are
+     * marked as retrievable are populated.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder(); + + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + int getModelScoresCount(); + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + boolean containsModelScores(java.lang.String key); + /** Use {@link #getModelScoresMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getModelScores(); + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + java.util.Map + getModelScoresMap(); + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.DoubleList getModelScoresOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.DoubleList defaultValue); + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + com.google.cloud.discoveryengine.v1alpha.DoubleList getModelScoresOrThrow(java.lang.String key); + } + /** + * + * + *
+   * Represents the search results.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult} + */ + public static final class SearchResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) + SearchResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchResult.newBuilder() to construct. + private SearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchResult() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetModelScores(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+     * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+     * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.Document document_; + /** + * + * + *
+     * The document data snippet in the search response. Only fields that are
+     * marked as retrievable are populated.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return Whether the document field is set. + */ + @java.lang.Override + public boolean hasDocument() { + return document_ != null; + } + /** + * + * + *
+     * The document data snippet in the search response. Only fields that are
+     * marked as retrievable are populated.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return The document. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + /** + * + * + *
+     * The document data snippet in the search response. Only fields that are
+     * marked as retrievable are populated.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + + public static final int MODEL_SCORES_FIELD_NUMBER = 4; + + private static final class ModelScoresDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_ModelScoresEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.discoveryengine.v1alpha.DoubleList.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + modelScores_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + internalGetModelScores() { + if (modelScores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ModelScoresDefaultEntryHolder.defaultEntry); + } + return modelScores_; + } + + public int getModelScoresCount() { + return internalGetModelScores().getMap().size(); + } + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public boolean containsModelScores(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetModelScores().getMap().containsKey(key); + } + /** Use {@link #getModelScoresMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getModelScores() { + return getModelScoresMap(); + } + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public java.util.Map + getModelScoresMap() { + return internalGetModelScores().getMap(); + } + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1alpha.DoubleList + getModelScoresOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.DoubleList defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetModelScores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Google provided available scores.
+     * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DoubleList getModelScoresOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetModelScores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (document_ != null) { + output.writeMessage(2, getDocument()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetModelScores(), ModelScoresDefaultEntryHolder.defaultEntry, 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (document_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDocument()); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + entry : internalGetModelScores().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + modelScores__ = + ModelScoresDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, modelScores__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) obj; + + if (!getId().equals(other.getId())) return false; + if (hasDocument() != other.hasDocument()) return false; + if (hasDocument()) { + if (!getDocument().equals(other.getDocument())) return false; + } + if (!internalGetModelScores().equals(other.internalGetModelScores())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasDocument()) { + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + } + if (!internalGetModelScores().getMap().isEmpty()) { + hash = (37 * hash) + MODEL_SCORES_FIELD_NUMBER; + hash = (53 * hash) + internalGetModelScores().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents the search results.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetModelScores(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableModelScores(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + internalGetMutableModelScores().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.document_ = documentBuilder_ == null ? document_ : documentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.modelScores_ = internalGetModelScores(); + result.modelScores_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDocument()) { + mergeDocument(other.getDocument()); + } + internalGetMutableModelScores().mergeFrom(other.internalGetModelScores()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDocumentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + modelScores__ = + input.readMessage( + ModelScoresDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableModelScores() + .getMutableMap() + .put(modelScores__.getKey(), modelScores__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+       * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+       * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+       * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+       * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+       * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+       * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+       * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+       * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the
+       * searched [Document][google.cloud.discoveryengine.v1alpha.Document].
+       * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.Document document_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + documentBuilder_; + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return Whether the document field is set. + */ + public boolean hasDocument() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + * + * @return The document. + */ + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + if (documentBuilder_ == null) { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } else { + return documentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder setDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + } else { + documentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder setDocument( + com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentBuilder_ == null) { + document_ = builderForValue.build(); + } else { + documentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder mergeDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && document_ != null + && document_ + != com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()) { + getDocumentBuilder().mergeFrom(value); + } else { + document_ = value; + } + } else { + documentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public Builder clearDocument() { + bitField0_ = (bitField0_ & ~0x00000002); + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder getDocumentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDocumentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + if (documentBuilder_ != null) { + return documentBuilder_.getMessageOrBuilder(); + } else { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + } + /** + * + * + *
+       * The document data snippet in the search response. Only fields that are
+       * marked as retrievable are populated.
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Document document = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + getDocumentFieldBuilder() { + if (documentBuilder_ == null) { + documentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder>( + getDocument(), getParentForChildren(), isClean()); + document_ = null; + } + return documentBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + modelScores_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + internalGetModelScores() { + if (modelScores_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ModelScoresDefaultEntryHolder.defaultEntry); + } + return modelScores_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.DoubleList> + internalGetMutableModelScores() { + if (modelScores_ == null) { + modelScores_ = + com.google.protobuf.MapField.newMapField(ModelScoresDefaultEntryHolder.defaultEntry); + } + if (!modelScores_.isMutable()) { + modelScores_ = modelScores_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return modelScores_; + } + + public int getModelScoresCount() { + return internalGetModelScores().getMap().size(); + } + /** + * + * + *
+       * Google provided available scores.
+       * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public boolean containsModelScores(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetModelScores().getMap().containsKey(key); + } + /** Use {@link #getModelScoresMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getModelScores() { + return getModelScoresMap(); + } + /** + * + * + *
+       * Google provided available scores.
+       * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public java.util.Map + getModelScoresMap() { + return internalGetModelScores().getMap(); + } + /** + * + * + *
+       * Google provided available scores.
+       * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1alpha.DoubleList + getModelScoresOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.DoubleList defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetModelScores().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Google provided available scores.
+       * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DoubleList getModelScoresOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetModelScores().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearModelScores() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableModelScores().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Google provided available scores.
+       * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + public Builder removeModelScores(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableModelScores().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableModelScores() { + bitField0_ |= 0x00000004; + return internalGetMutableModelScores().getMutableMap(); + } + /** + * + * + *
+       * Google provided available scores.
+       * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + public Builder putModelScores( + java.lang.String key, com.google.cloud.discoveryengine.v1alpha.DoubleList value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableModelScores().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+       * Google provided available scores.
+       * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.DoubleList> model_scores = 4; + * + */ + public Builder putAllModelScores( + java.util.Map + values) { + internalGetMutableModelScores().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FacetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The key for this facet. E.g., "colors" or "price". It matches
+     * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+     * The key for this facet. E.g., "colors" or "price". It matches
+     * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + java.util.List + getValuesList(); + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue getValues(int index); + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + int getValuesCount(); + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder> + getValuesOrBuilderList(); + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder + getValuesOrBuilder(int index); + + /** + * + * + *
+     * Whether the facet is dynamically generated.
+     * 
+ * + * bool dynamic_facet = 3; + * + * @return The dynamicFacet. + */ + boolean getDynamicFacet(); + } + /** + * + * + *
+   * A facet result.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Facet} + */ + public static final class Facet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) + FacetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Facet.newBuilder() to construct. + private Facet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Facet() { + key_ = ""; + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Facet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder.class); + } + + public interface FacetValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Text value of a facet, such as "Black" for facet "colors".
+       * 
+ * + * string value = 1; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+       * Text value of a facet, such as "Black" for facet "colors".
+       * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+       * Text value of a facet, such as "Black" for facet "colors".
+       * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+       * Interval value for a facet, such as [10, 20) for facet "price". It
+       * matches
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + /** + * + * + *
+       * Interval value for a facet, such as [10, 20) for facet "price". It
+       * matches
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + * + * @return The interval. + */ + com.google.cloud.discoveryengine.v1alpha.Interval getInterval(); + /** + * + * + *
+       * Interval value for a facet, such as [10, 20) for facet "price". It
+       * matches
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+       * Number of items that have this facet value.
+       * 
+ * + * int64 count = 3; + * + * @return The count. + */ + long getCount(); + + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.FacetValueCase + getFacetValueCase(); + } + /** + * + * + *
+     * A facet value which contains value names and their count.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue} + */ + public static final class FacetValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) + FacetValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetValue.newBuilder() to construct. + private FacetValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + .class); + } + + private int facetValueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object facetValue_; + + public enum FacetValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALUE(1), + INTERVAL(2), + FACETVALUE_NOT_SET(0); + private final int value; + + private FacetValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FacetValueCase valueOf(int value) { + return forNumber(value); + } + + public static FacetValueCase forNumber(int value) { + switch (value) { + case 1: + return VALUE; + case 2: + return INTERVAL; + case 0: + return FACETVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public FacetValueCase getFacetValueCase() { + return FacetValueCase.forNumber(facetValueCase_); + } + + public static final int VALUE_FIELD_NUMBER = 1; + /** + * + * + *
+       * Text value of a facet, such as "Black" for facet "colors".
+       * 
+ * + * string value = 1; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return facetValueCase_ == 1; + } + /** + * + * + *
+       * Text value of a facet, such as "Black" for facet "colors".
+       * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (facetValueCase_ == 1) { + ref = facetValue_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (facetValueCase_ == 1) { + facetValue_ = s; + } + return s; + } + } + /** + * + * + *
+       * Text value of a facet, such as "Black" for facet "colors".
+       * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = ""; + if (facetValueCase_ == 1) { + ref = facetValue_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (facetValueCase_ == 1) { + facetValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERVAL_FIELD_NUMBER = 2; + /** + * + * + *
+       * Interval value for a facet, such as [10, 20) for facet "price". It
+       * matches
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return facetValueCase_ == 2; + } + /** + * + * + *
+       * Interval value for a facet, such as [10, 20) for facet "price". It
+       * matches
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + * + * @return The interval. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Interval getInterval() { + if (facetValueCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_; + } + return com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance(); + } + /** + * + * + *
+       * Interval value for a facet, such as [10, 20) for facet "price". It
+       * matches
+       * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+       * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder getIntervalOrBuilder() { + if (facetValueCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_; + } + return com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance(); + } + + public static final int COUNT_FIELD_NUMBER = 3; + private long count_ = 0L; + /** + * + * + *
+       * Number of items that have this facet value.
+       * 
+ * + * int64 count = 3; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (facetValueCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, facetValue_); + } + if (facetValueCase_ == 2) { + output.writeMessage(2, (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_); + } + if (count_ != 0L) { + output.writeInt64(3, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (facetValueCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, facetValue_); + } + if (facetValueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) obj; + + if (getCount() != other.getCount()) return false; + if (!getFacetValueCase().equals(other.getFacetValueCase())) return false; + switch (facetValueCase_) { + case 1: + if (!getValue().equals(other.getValue())) return false; + break; + case 2: + if (!getInterval().equals(other.getInterval())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + switch (facetValueCase_) { + case 1: + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + break; + case 2: + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A facet value which contains value names and their count.
+       * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (intervalBuilder_ != null) { + intervalBuilder_.clear(); + } + count_ = 0L; + facetValueCase_ = 0; + facetValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.count_ = count_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue result) { + result.facetValueCase_ = facetValueCase_; + result.facetValue_ = this.facetValue_; + if (facetValueCase_ == 2 && intervalBuilder_ != null) { + result.facetValue_ = intervalBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + .getDefaultInstance()) return this; + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + switch (other.getFacetValueCase()) { + case VALUE: + { + facetValueCase_ = 1; + facetValue_ = other.facetValue_; + onChanged(); + break; + } + case INTERVAL: + { + mergeInterval(other.getInterval()); + break; + } + case FACETVALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + facetValueCase_ = 1; + facetValue_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(getIntervalFieldBuilder().getBuilder(), extensionRegistry); + facetValueCase_ = 2; + break; + } // case 18 + case 24: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int facetValueCase_ = 0; + private java.lang.Object facetValue_; + + public FacetValueCase getFacetValueCase() { + return FacetValueCase.forNumber(facetValueCase_); + } + + public Builder clearFacetValue() { + facetValueCase_ = 0; + facetValue_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+         * Text value of a facet, such as "Black" for facet "colors".
+         * 
+ * + * string value = 1; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return facetValueCase_ == 1; + } + /** + * + * + *
+         * Text value of a facet, such as "Black" for facet "colors".
+         * 
+ * + * string value = 1; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (facetValueCase_ == 1) { + ref = facetValue_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (facetValueCase_ == 1) { + facetValue_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Text value of a facet, such as "Black" for facet "colors".
+         * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = ""; + if (facetValueCase_ == 1) { + ref = facetValue_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (facetValueCase_ == 1) { + facetValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Text value of a facet, such as "Black" for facet "colors".
+         * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + facetValueCase_ = 1; + facetValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Text value of a facet, such as "Black" for facet "colors".
+         * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + if (facetValueCase_ == 1) { + facetValueCase_ = 0; + facetValue_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Text value of a facet, such as "Black" for facet "colors".
+         * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + facetValueCase_ = 1; + facetValue_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Interval, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder, + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder> + intervalBuilder_; + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return facetValueCase_ == 2; + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + * + * @return The interval. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Interval getInterval() { + if (intervalBuilder_ == null) { + if (facetValueCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_; + } + return com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance(); + } else { + if (facetValueCase_ == 2) { + return intervalBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance(); + } + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + public Builder setInterval(com.google.cloud.discoveryengine.v1alpha.Interval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + facetValue_ = value; + onChanged(); + } else { + intervalBuilder_.setMessage(value); + } + facetValueCase_ = 2; + return this; + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + public Builder setInterval( + com.google.cloud.discoveryengine.v1alpha.Interval.Builder builderForValue) { + if (intervalBuilder_ == null) { + facetValue_ = builderForValue.build(); + onChanged(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + facetValueCase_ = 2; + return this; + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + public Builder mergeInterval(com.google.cloud.discoveryengine.v1alpha.Interval value) { + if (intervalBuilder_ == null) { + if (facetValueCase_ == 2 + && facetValue_ + != com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance()) { + facetValue_ = + com.google.cloud.discoveryengine.v1alpha.Interval.newBuilder( + (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_) + .mergeFrom(value) + .buildPartial(); + } else { + facetValue_ = value; + } + onChanged(); + } else { + if (facetValueCase_ == 2) { + intervalBuilder_.mergeFrom(value); + } else { + intervalBuilder_.setMessage(value); + } + } + facetValueCase_ = 2; + return this; + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + public Builder clearInterval() { + if (intervalBuilder_ == null) { + if (facetValueCase_ == 2) { + facetValueCase_ = 0; + facetValue_ = null; + onChanged(); + } + } else { + if (facetValueCase_ == 2) { + facetValueCase_ = 0; + facetValue_ = null; + } + intervalBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.Interval.Builder getIntervalBuilder() { + return getIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder getIntervalOrBuilder() { + if ((facetValueCase_ == 2) && (intervalBuilder_ != null)) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + if (facetValueCase_ == 2) { + return (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_; + } + return com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance(); + } + } + /** + * + * + *
+         * Interval value for a facet, such as [10, 20) for facet "price". It
+         * matches
+         * [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals].
+         * 
+ * + * .google.cloud.discoveryengine.v1alpha.Interval interval = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Interval, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder, + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder> + getIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + if (!(facetValueCase_ == 2)) { + facetValue_ = com.google.cloud.discoveryengine.v1alpha.Interval.getDefaultInstance(); + } + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Interval, + com.google.cloud.discoveryengine.v1alpha.Interval.Builder, + com.google.cloud.discoveryengine.v1alpha.IntervalOrBuilder>( + (com.google.cloud.discoveryengine.v1alpha.Interval) facetValue_, + getParentForChildren(), + isClean()); + facetValue_ = null; + } + facetValueCase_ = 2; + onChanged(); + return intervalBuilder_; + } + + private long count_; + /** + * + * + *
+         * Number of items that have this facet value.
+         * 
+ * + * int64 count = 3; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+         * Number of items that have this facet value.
+         * 
+ * + * int64 count = 3; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Number of items that have this facet value.
+         * 
+ * + * int64 count = 3; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000004); + count_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+     * The key for this facet. E.g., "colors" or "price". It matches
+     * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+     * The key for this facet. E.g., "colors" or "price". It matches
+     * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + values_; + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + @java.lang.Override + public java.util.List + getValuesList() { + return values_; + } + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder> + getValuesOrBuilderList() { + return values_; + } + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue getValues( + int index) { + return values_.get(index); + } + /** + * + * + *
+     * The facet values for this field.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder + getValuesOrBuilder(int index) { + return values_.get(index); + } + + public static final int DYNAMIC_FACET_FIELD_NUMBER = 3; + private boolean dynamicFacet_ = false; + /** + * + * + *
+     * Whether the facet is dynamically generated.
+     * 
+ * + * bool dynamic_facet = 3; + * + * @return The dynamicFacet. + */ + @java.lang.Override + public boolean getDynamicFacet() { + return dynamicFacet_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(2, values_.get(i)); + } + if (dynamicFacet_ != false) { + output.writeBool(3, dynamicFacet_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, values_.get(i)); + } + if (dynamicFacet_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dynamicFacet_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValuesList().equals(other.getValuesList())) return false; + if (getDynamicFacet() != other.getDynamicFacet()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (37 * hash) + DYNAMIC_FACET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDynamicFacet()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A facet result.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Facet} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + dynamicFacet_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dynamicFacet_ = dynamicFacet_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000002); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + if (other.getDynamicFacet() != false) { + setDynamicFacet(other.getDynamicFacet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + .parser(), + extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + dynamicFacet_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+       * The key for this facet. E.g., "colors" or "price". It matches
+       * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+       * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The key for this facet. E.g., "colors" or "price". It matches
+       * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+       * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The key for this facet. E.g., "colors" or "price". It matches
+       * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+       * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The key for this facet. E.g., "colors" or "price". It matches
+       * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+       * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The key for this facet. E.g., "colors" or "price". It matches
+       * [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key].
+       * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue> + values_ = java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + values_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue>( + values_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder> + valuesBuilder_; + + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue> + getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue getValues( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder setValues( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder setValues( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder addValues( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder addValues( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder addValues( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder addValues( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder addAllValues( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue> + values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder + getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder> + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + addValuesBuilder() { + return getValuesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder + addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue + .getDefaultInstance()); + } + /** + * + * + *
+       * The facet values for this field.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue values = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder> + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet + .FacetValueOrBuilder>( + values_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + private boolean dynamicFacet_; + /** + * + * + *
+       * Whether the facet is dynamically generated.
+       * 
+ * + * bool dynamic_facet = 3; + * + * @return The dynamicFacet. + */ + @java.lang.Override + public boolean getDynamicFacet() { + return dynamicFacet_; + } + /** + * + * + *
+       * Whether the facet is dynamically generated.
+       * 
+ * + * bool dynamic_facet = 3; + * + * @param value The dynamicFacet to set. + * @return This builder for chaining. + */ + public Builder setDynamicFacet(boolean value) { + + dynamicFacet_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the facet is dynamically generated.
+       * 
+ * + * bool dynamic_facet = 3; + * + * @return This builder for chaining. + */ + public Builder clearDynamicFacet() { + bitField0_ = (bitField0_ & ~0x00000004); + dynamicFacet_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Facet) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Facet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GuidedSearchResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute> + getRefinementAttributesList(); + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute + getRefinementAttributes(int index); + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + int getRefinementAttributesCount(); + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder> + getRefinementAttributesOrBuilderList(); + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder + getRefinementAttributesOrBuilder(int index); + + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @return A list containing the followUpQuestions. + */ + java.util.List getFollowUpQuestionsList(); + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @return The count of followUpQuestions. + */ + int getFollowUpQuestionsCount(); + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @param index The index of the element to return. + * @return The followUpQuestions at the given index. + */ + java.lang.String getFollowUpQuestions(int index); + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the followUpQuestions at the given index. + */ + com.google.protobuf.ByteString getFollowUpQuestionsBytes(int index); + } + /** + * + * + *
+   * Guided search result. The guided search helps user to refine the search
+   * results and narrow down to the real needs from a broaded search results.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult} + */ + public static final class GuidedSearchResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) + GuidedSearchResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuidedSearchResult.newBuilder() to construct. + private GuidedSearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuidedSearchResult() { + refinementAttributes_ = java.util.Collections.emptyList(); + followUpQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuidedSearchResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.Builder + .class); + } + + public interface RefinementAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Attribute key used to refine the results e.g. 'movie_type'.
+       * 
+ * + * string attribute_key = 1; + * + * @return The attributeKey. + */ + java.lang.String getAttributeKey(); + /** + * + * + *
+       * Attribute key used to refine the results e.g. 'movie_type'.
+       * 
+ * + * string attribute_key = 1; + * + * @return The bytes for attributeKey. + */ + com.google.protobuf.ByteString getAttributeKeyBytes(); + + /** + * + * + *
+       * Attribute value used to refine the results e.g. 'drama'.
+       * 
+ * + * string attribute_value = 2; + * + * @return The attributeValue. + */ + java.lang.String getAttributeValue(); + /** + * + * + *
+       * Attribute value used to refine the results e.g. 'drama'.
+       * 
+ * + * string attribute_value = 2; + * + * @return The bytes for attributeValue. + */ + com.google.protobuf.ByteString getAttributeValueBytes(); + } + /** + * + * + *
+     * Useful attribute for search result refinements.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute} + */ + public static final class RefinementAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute) + RefinementAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use RefinementAttribute.newBuilder() to construct. + private RefinementAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RefinementAttribute() { + attributeKey_ = ""; + attributeValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RefinementAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder.class); + } + + public static final int ATTRIBUTE_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributeKey_ = ""; + /** + * + * + *
+       * Attribute key used to refine the results e.g. 'movie_type'.
+       * 
+ * + * string attribute_key = 1; + * + * @return The attributeKey. + */ + @java.lang.Override + public java.lang.String getAttributeKey() { + java.lang.Object ref = attributeKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeKey_ = s; + return s; + } + } + /** + * + * + *
+       * Attribute key used to refine the results e.g. 'movie_type'.
+       * 
+ * + * string attribute_key = 1; + * + * @return The bytes for attributeKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeKeyBytes() { + java.lang.Object ref = attributeKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValue_ = ""; + /** + * + * + *
+       * Attribute value used to refine the results e.g. 'drama'.
+       * 
+ * + * string attribute_value = 2; + * + * @return The attributeValue. + */ + @java.lang.Override + public java.lang.String getAttributeValue() { + java.lang.Object ref = attributeValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValue_ = s; + return s; + } + } + /** + * + * + *
+       * Attribute value used to refine the results e.g. 'drama'.
+       * 
+ * + * string attribute_value = 2; + * + * @return The bytes for attributeValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeValueBytes() { + java.lang.Object ref = attributeValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeValue_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributeValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute) + obj; + + if (!getAttributeKey().equals(other.getAttributeKey())) return false; + if (!getAttributeValue().equals(other.getAttributeValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getAttributeKey().hashCode(); + hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Useful attribute for search result refinements.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeKey_ = ""; + attributeValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeKey_ = attributeKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributeValue_ = attributeValue_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.getDefaultInstance()) return this; + if (!other.getAttributeKey().isEmpty()) { + attributeKey_ = other.attributeKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAttributeValue().isEmpty()) { + attributeValue_ = other.attributeValue_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributeKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + attributeValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object attributeKey_ = ""; + /** + * + * + *
+         * Attribute key used to refine the results e.g. 'movie_type'.
+         * 
+ * + * string attribute_key = 1; + * + * @return The attributeKey. + */ + public java.lang.String getAttributeKey() { + java.lang.Object ref = attributeKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Attribute key used to refine the results e.g. 'movie_type'.
+         * 
+ * + * string attribute_key = 1; + * + * @return The bytes for attributeKey. + */ + public com.google.protobuf.ByteString getAttributeKeyBytes() { + java.lang.Object ref = attributeKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Attribute key used to refine the results e.g. 'movie_type'.
+         * 
+ * + * string attribute_key = 1; + * + * @param value The attributeKey to set. + * @return This builder for chaining. + */ + public Builder setAttributeKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributeKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Attribute key used to refine the results e.g. 'movie_type'.
+         * 
+ * + * string attribute_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttributeKey() { + attributeKey_ = getDefaultInstance().getAttributeKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Attribute key used to refine the results e.g. 'movie_type'.
+         * 
+ * + * string attribute_key = 1; + * + * @param value The bytes for attributeKey to set. + * @return This builder for chaining. + */ + public Builder setAttributeKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributeKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object attributeValue_ = ""; + /** + * + * + *
+         * Attribute value used to refine the results e.g. 'drama'.
+         * 
+ * + * string attribute_value = 2; + * + * @return The attributeValue. + */ + public java.lang.String getAttributeValue() { + java.lang.Object ref = attributeValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Attribute value used to refine the results e.g. 'drama'.
+         * 
+ * + * string attribute_value = 2; + * + * @return The bytes for attributeValue. + */ + public com.google.protobuf.ByteString getAttributeValueBytes() { + java.lang.Object ref = attributeValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Attribute value used to refine the results e.g. 'drama'.
+         * 
+ * + * string attribute_value = 2; + * + * @param value The attributeValue to set. + * @return This builder for chaining. + */ + public Builder setAttributeValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributeValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Attribute value used to refine the results e.g. 'drama'.
+         * 
+ * + * string attribute_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearAttributeValue() { + attributeValue_ = getDefaultInstance().getAttributeValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Attribute value used to refine the results e.g. 'drama'.
+         * 
+ * + * string attribute_value = 2; + * + * @param value The bytes for attributeValue to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributeValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse + .GuidedSearchResult.RefinementAttribute + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RefinementAttribute parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int REFINEMENT_ATTRIBUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute> + refinementAttributes_; + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute> + getRefinementAttributesList() { + return refinementAttributes_; + } + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder> + getRefinementAttributesOrBuilderList() { + return refinementAttributes_; + } + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + @java.lang.Override + public int getRefinementAttributesCount() { + return refinementAttributes_.size(); + } + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + getRefinementAttributes(int index) { + return refinementAttributes_.get(index); + } + /** + * + * + *
+     * A list of ranked refinement attributes.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder + getRefinementAttributesOrBuilder(int index) { + return refinementAttributes_.get(index); + } + + public static final int FOLLOW_UP_QUESTIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList followUpQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @return A list containing the followUpQuestions. + */ + public com.google.protobuf.ProtocolStringList getFollowUpQuestionsList() { + return followUpQuestions_; + } + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @return The count of followUpQuestions. + */ + public int getFollowUpQuestionsCount() { + return followUpQuestions_.size(); + } + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @param index The index of the element to return. + * @return The followUpQuestions at the given index. + */ + public java.lang.String getFollowUpQuestions(int index) { + return followUpQuestions_.get(index); + } + /** + * + * + *
+     * Suggested follow-up questions.
+     * 
+ * + * repeated string follow_up_questions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the followUpQuestions at the given index. + */ + public com.google.protobuf.ByteString getFollowUpQuestionsBytes(int index) { + return followUpQuestions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < refinementAttributes_.size(); i++) { + output.writeMessage(1, refinementAttributes_.get(i)); + } + for (int i = 0; i < followUpQuestions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, followUpQuestions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < refinementAttributes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, refinementAttributes_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < followUpQuestions_.size(); i++) { + dataSize += computeStringSizeNoTag(followUpQuestions_.getRaw(i)); + } + size += dataSize; + size += 1 * getFollowUpQuestionsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) obj; + + if (!getRefinementAttributesList().equals(other.getRefinementAttributesList())) return false; + if (!getFollowUpQuestionsList().equals(other.getFollowUpQuestionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRefinementAttributesCount() > 0) { + hash = (37 * hash) + REFINEMENT_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRefinementAttributesList().hashCode(); + } + if (getFollowUpQuestionsCount() > 0) { + hash = (37 * hash) + FOLLOW_UP_QUESTIONS_FIELD_NUMBER; + hash = (53 * hash) + getFollowUpQuestionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Guided search result. The guided search helps user to refine the search
+     * results and narrow down to the real needs from a broaded search results.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (refinementAttributesBuilder_ == null) { + refinementAttributes_ = java.util.Collections.emptyList(); + } else { + refinementAttributes_ = null; + refinementAttributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + followUpQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult result) { + if (refinementAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + refinementAttributes_ = java.util.Collections.unmodifiableList(refinementAttributes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.refinementAttributes_ = refinementAttributes_; + } else { + result.refinementAttributes_ = refinementAttributesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + followUpQuestions_.makeImmutable(); + result.followUpQuestions_ = followUpQuestions_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .getDefaultInstance()) return this; + if (refinementAttributesBuilder_ == null) { + if (!other.refinementAttributes_.isEmpty()) { + if (refinementAttributes_.isEmpty()) { + refinementAttributes_ = other.refinementAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRefinementAttributesIsMutable(); + refinementAttributes_.addAll(other.refinementAttributes_); + } + onChanged(); + } + } else { + if (!other.refinementAttributes_.isEmpty()) { + if (refinementAttributesBuilder_.isEmpty()) { + refinementAttributesBuilder_.dispose(); + refinementAttributesBuilder_ = null; + refinementAttributes_ = other.refinementAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + refinementAttributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRefinementAttributesFieldBuilder() + : null; + } else { + refinementAttributesBuilder_.addAllMessages(other.refinementAttributes_); + } + } + } + if (!other.followUpQuestions_.isEmpty()) { + if (followUpQuestions_.isEmpty()) { + followUpQuestions_ = other.followUpQuestions_; + bitField0_ |= 0x00000002; + } else { + ensureFollowUpQuestionsIsMutable(); + followUpQuestions_.addAll(other.followUpQuestions_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchResponse + .GuidedSearchResult.RefinementAttribute.parser(), + extensionRegistry); + if (refinementAttributesBuilder_ == null) { + ensureRefinementAttributesIsMutable(); + refinementAttributes_.add(m); + } else { + refinementAttributesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFollowUpQuestionsIsMutable(); + followUpQuestions_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute> + refinementAttributes_ = java.util.Collections.emptyList(); + + private void ensureRefinementAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + refinementAttributes_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute>(refinementAttributes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder> + refinementAttributesBuilder_; + + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute> + getRefinementAttributesList() { + if (refinementAttributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(refinementAttributes_); + } else { + return refinementAttributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public int getRefinementAttributesCount() { + if (refinementAttributesBuilder_ == null) { + return refinementAttributes_.size(); + } else { + return refinementAttributesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + getRefinementAttributes(int index) { + if (refinementAttributesBuilder_ == null) { + return refinementAttributes_.get(index); + } else { + return refinementAttributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder setRefinementAttributes( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + value) { + if (refinementAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRefinementAttributesIsMutable(); + refinementAttributes_.set(index, value); + onChanged(); + } else { + refinementAttributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder setRefinementAttributes( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder + builderForValue) { + if (refinementAttributesBuilder_ == null) { + ensureRefinementAttributesIsMutable(); + refinementAttributes_.set(index, builderForValue.build()); + onChanged(); + } else { + refinementAttributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder addRefinementAttributes( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + value) { + if (refinementAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRefinementAttributesIsMutable(); + refinementAttributes_.add(value); + onChanged(); + } else { + refinementAttributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder addRefinementAttributes( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute + value) { + if (refinementAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRefinementAttributesIsMutable(); + refinementAttributes_.add(index, value); + onChanged(); + } else { + refinementAttributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder addRefinementAttributes( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder + builderForValue) { + if (refinementAttributesBuilder_ == null) { + ensureRefinementAttributesIsMutable(); + refinementAttributes_.add(builderForValue.build()); + onChanged(); + } else { + refinementAttributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder addRefinementAttributes( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder + builderForValue) { + if (refinementAttributesBuilder_ == null) { + ensureRefinementAttributesIsMutable(); + refinementAttributes_.add(index, builderForValue.build()); + onChanged(); + } else { + refinementAttributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder addAllRefinementAttributes( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute> + values) { + if (refinementAttributesBuilder_ == null) { + ensureRefinementAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, refinementAttributes_); + onChanged(); + } else { + refinementAttributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder clearRefinementAttributes() { + if (refinementAttributesBuilder_ == null) { + refinementAttributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + refinementAttributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public Builder removeRefinementAttributes(int index) { + if (refinementAttributesBuilder_ == null) { + ensureRefinementAttributesIsMutable(); + refinementAttributes_.remove(index); + onChanged(); + } else { + refinementAttributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder + getRefinementAttributesBuilder(int index) { + return getRefinementAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder + getRefinementAttributesOrBuilder(int index) { + if (refinementAttributesBuilder_ == null) { + return refinementAttributes_.get(index); + } else { + return refinementAttributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder> + getRefinementAttributesOrBuilderList() { + if (refinementAttributesBuilder_ != null) { + return refinementAttributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(refinementAttributes_); + } + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder + addRefinementAttributesBuilder() { + return getRefinementAttributesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.getDefaultInstance()); + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder + addRefinementAttributesBuilder(int index) { + return getRefinementAttributesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.getDefaultInstance()); + } + /** + * + * + *
+       * A list of ranked refinement attributes.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.RefinementAttribute refinement_attributes = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder> + getRefinementAttributesBuilderList() { + return getRefinementAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder> + getRefinementAttributesFieldBuilder() { + if (refinementAttributesBuilder_ == null) { + refinementAttributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttribute.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .RefinementAttributeOrBuilder>( + refinementAttributes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + refinementAttributes_ = null; + } + return refinementAttributesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList followUpQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFollowUpQuestionsIsMutable() { + if (!followUpQuestions_.isModifiable()) { + followUpQuestions_ = new com.google.protobuf.LazyStringArrayList(followUpQuestions_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @return A list containing the followUpQuestions. + */ + public com.google.protobuf.ProtocolStringList getFollowUpQuestionsList() { + followUpQuestions_.makeImmutable(); + return followUpQuestions_; + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @return The count of followUpQuestions. + */ + public int getFollowUpQuestionsCount() { + return followUpQuestions_.size(); + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @param index The index of the element to return. + * @return The followUpQuestions at the given index. + */ + public java.lang.String getFollowUpQuestions(int index) { + return followUpQuestions_.get(index); + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the followUpQuestions at the given index. + */ + public com.google.protobuf.ByteString getFollowUpQuestionsBytes(int index) { + return followUpQuestions_.getByteString(index); + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @param index The index to set the value at. + * @param value The followUpQuestions to set. + * @return This builder for chaining. + */ + public Builder setFollowUpQuestions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFollowUpQuestionsIsMutable(); + followUpQuestions_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @param value The followUpQuestions to add. + * @return This builder for chaining. + */ + public Builder addFollowUpQuestions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFollowUpQuestionsIsMutable(); + followUpQuestions_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @param values The followUpQuestions to add. + * @return This builder for chaining. + */ + public Builder addAllFollowUpQuestions(java.lang.Iterable values) { + ensureFollowUpQuestionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, followUpQuestions_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @return This builder for chaining. + */ + public Builder clearFollowUpQuestions() { + followUpQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Suggested follow-up questions.
+       * 
+ * + * repeated string follow_up_questions = 2; + * + * @param value The bytes of the followUpQuestions to add. + * @return This builder for chaining. + */ + public Builder addFollowUpQuestionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFollowUpQuestionsIsMutable(); + followUpQuestions_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuidedSearchResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The summary content.
+     * 
+ * + * string summary_text = 1; + * + * @return The summaryText. + */ + java.lang.String getSummaryText(); + /** + * + * + *
+     * The summary content.
+     * 
+ * + * string summary_text = 1; + * + * @return The bytes for summaryText. + */ + com.google.protobuf.ByteString getSummaryTextBytes(); + + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return A list containing the summarySkippedReasons. + */ + java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason> + getSummarySkippedReasonsList(); + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return The count of summarySkippedReasons. + */ + int getSummarySkippedReasonsCount(); + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index of the element to return. + * @return The summarySkippedReasons at the given index. + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason + getSummarySkippedReasons(int index); + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return A list containing the enum numeric values on the wire for summarySkippedReasons. + */ + java.util.List getSummarySkippedReasonsValueList(); + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of summarySkippedReasons at the given index. + */ + int getSummarySkippedReasonsValue(int index); + + /** + * + * + *
+     * A collection of Safety Attribute categories and their associated
+     * confidence scores.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + * + * @return Whether the safetyAttributes field is set. + */ + boolean hasSafetyAttributes(); + /** + * + * + *
+     * A collection of Safety Attribute categories and their associated
+     * confidence scores.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + * + * @return The safetyAttributes. + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + getSafetyAttributes(); + /** + * + * + *
+     * A collection of Safety Attribute categories and their associated
+     * confidence scores.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributesOrBuilder + getSafetyAttributesOrBuilder(); + } + /** + * + * + *
+   * Summary of the top N search result specified by the summary spec.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Summary} + */ + public static final class Summary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) + SummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Summary.newBuilder() to construct. + private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Summary() { + summaryText_ = ""; + summarySkippedReasons_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Summary(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder.class); + } + + /** + * + * + *
+     * An Enum for summary-skipped reasons.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason} + */ + public enum SummarySkippedReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value. The summary skipped reason is not specified.
+       * 
+ * + * SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0; + */ + SUMMARY_SKIPPED_REASON_UNSPECIFIED(0), + /** + * + * + *
+       * The adversarial query ignored case.
+       *
+       * Only populated when
+       * [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
+       * is set to `true`.
+       * 
+ * + * ADVERSARIAL_QUERY_IGNORED = 1; + */ + ADVERSARIAL_QUERY_IGNORED(1), + /** + * + * + *
+       * The non-summary seeking query ignored case.
+       *
+       * Only populated when
+       * [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
+       * is set to `true`.
+       * 
+ * + * NON_SUMMARY_SEEKING_QUERY_IGNORED = 2; + */ + NON_SUMMARY_SEEKING_QUERY_IGNORED(2), + /** + * + * + *
+       * The out-of-domain query ignored case.
+       *
+       * Google skips the summary if there are no high-relevance search results.
+       * For example, the data store contains facts about company A but the
+       * user query is asking questions about company B.
+       * 
+ * + * OUT_OF_DOMAIN_QUERY_IGNORED = 3; + */ + OUT_OF_DOMAIN_QUERY_IGNORED(3), + /** + * + * + *
+       * The potential policy violation case.
+       *
+       * Google skips the summary if there is a potential policy violation
+       * detected. This includes content that may be violent or toxic.
+       * 
+ * + * POTENTIAL_POLICY_VIOLATION = 4; + */ + POTENTIAL_POLICY_VIOLATION(4), + /** + * + * + *
+       * The LLM addon not enabled case.
+       *
+       * Google skips the summary if the LLM addon is not enabled.
+       * 
+ * + * LLM_ADDON_NOT_ENABLED = 5; + */ + LLM_ADDON_NOT_ENABLED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default value. The summary skipped reason is not specified.
+       * 
+ * + * SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0; + */ + public static final int SUMMARY_SKIPPED_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The adversarial query ignored case.
+       *
+       * Only populated when
+       * [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
+       * is set to `true`.
+       * 
+ * + * ADVERSARIAL_QUERY_IGNORED = 1; + */ + public static final int ADVERSARIAL_QUERY_IGNORED_VALUE = 1; + /** + * + * + *
+       * The non-summary seeking query ignored case.
+       *
+       * Only populated when
+       * [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
+       * is set to `true`.
+       * 
+ * + * NON_SUMMARY_SEEKING_QUERY_IGNORED = 2; + */ + public static final int NON_SUMMARY_SEEKING_QUERY_IGNORED_VALUE = 2; + /** + * + * + *
+       * The out-of-domain query ignored case.
+       *
+       * Google skips the summary if there are no high-relevance search results.
+       * For example, the data store contains facts about company A but the
+       * user query is asking questions about company B.
+       * 
+ * + * OUT_OF_DOMAIN_QUERY_IGNORED = 3; + */ + public static final int OUT_OF_DOMAIN_QUERY_IGNORED_VALUE = 3; + /** + * + * + *
+       * The potential policy violation case.
+       *
+       * Google skips the summary if there is a potential policy violation
+       * detected. This includes content that may be violent or toxic.
+       * 
+ * + * POTENTIAL_POLICY_VIOLATION = 4; + */ + public static final int POTENTIAL_POLICY_VIOLATION_VALUE = 4; + /** + * + * + *
+       * The LLM addon not enabled case.
+       *
+       * Google skips the summary if the LLM addon is not enabled.
+       * 
+ * + * LLM_ADDON_NOT_ENABLED = 5; + */ + public static final int LLM_ADDON_NOT_ENABLED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SummarySkippedReason valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SummarySkippedReason forNumber(int value) { + switch (value) { + case 0: + return SUMMARY_SKIPPED_REASON_UNSPECIFIED; + case 1: + return ADVERSARIAL_QUERY_IGNORED; + case 2: + return NON_SUMMARY_SEEKING_QUERY_IGNORED; + case 3: + return OUT_OF_DOMAIN_QUERY_IGNORED; + case 4: + return POTENTIAL_POLICY_VIOLATION; + case 5: + return LLM_ADDON_NOT_ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SummarySkippedReason findValueByNumber(int number) { + return SummarySkippedReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SummarySkippedReason[] VALUES = values(); + + public static SummarySkippedReason valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SummarySkippedReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason) + } + + public interface SafetyAttributesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @return A list containing the categories. + */ + java.util.List getCategoriesList(); + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @return The count of categories. + */ + int getCategoriesCount(); + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @param index The index of the element to return. + * @return The categories at the given index. + */ + java.lang.String getCategories(int index); + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @param index The index of the value to return. + * @return The bytes of the categories at the given index. + */ + com.google.protobuf.ByteString getCategoriesBytes(int index); + + /** + * + * + *
+       * The confidence scores of the each category, higher
+       * value means higher confidence. Order matches the Categories.
+       * 
+ * + * repeated float scores = 2; + * + * @return A list containing the scores. + */ + java.util.List getScoresList(); + /** + * + * + *
+       * The confidence scores of the each category, higher
+       * value means higher confidence. Order matches the Categories.
+       * 
+ * + * repeated float scores = 2; + * + * @return The count of scores. + */ + int getScoresCount(); + /** + * + * + *
+       * The confidence scores of the each category, higher
+       * value means higher confidence. Order matches the Categories.
+       * 
+ * + * repeated float scores = 2; + * + * @param index The index of the element to return. + * @return The scores at the given index. + */ + float getScores(int index); + } + /** + * + * + *
+     * Safety Attribute categories and their associated confidence scores.
+     * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes} + */ + public static final class SafetyAttributes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) + SafetyAttributesOrBuilder { + private static final long serialVersionUID = 0L; + // Use SafetyAttributes.newBuilder() to construct. + private SafetyAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SafetyAttributes() { + categories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + scores_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SafetyAttributes(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .Builder.class); + } + + public static final int CATEGORIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList categories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @return A list containing the categories. + */ + public com.google.protobuf.ProtocolStringList getCategoriesList() { + return categories_; + } + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @return The count of categories. + */ + public int getCategoriesCount() { + return categories_.size(); + } + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @param index The index of the element to return. + * @return The categories at the given index. + */ + public java.lang.String getCategories(int index) { + return categories_.get(index); + } + /** + * + * + *
+       * The display names of Safety Attribute categories associated with the
+       * generated content. Order matches the Scores.
+       * 
+ * + * repeated string categories = 1; + * + * @param index The index of the value to return. + * @return The bytes of the categories at the given index. + */ + public com.google.protobuf.ByteString getCategoriesBytes(int index) { + return categories_.getByteString(index); + } + + public static final int SCORES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList scores_; + /** + * + * + *
+       * The confidence scores of the each category, higher
+       * value means higher confidence. Order matches the Categories.
+       * 
+ * + * repeated float scores = 2; + * + * @return A list containing the scores. + */ + @java.lang.Override + public java.util.List getScoresList() { + return scores_; + } + /** + * + * + *
+       * The confidence scores of the each category, higher
+       * value means higher confidence. Order matches the Categories.
+       * 
+ * + * repeated float scores = 2; + * + * @return The count of scores. + */ + public int getScoresCount() { + return scores_.size(); + } + /** + * + * + *
+       * The confidence scores of the each category, higher
+       * value means higher confidence. Order matches the Categories.
+       * 
+ * + * repeated float scores = 2; + * + * @param index The index of the element to return. + * @return The scores at the given index. + */ + public float getScores(int index) { + return scores_.getFloat(index); + } + + private int scoresMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < categories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categories_.getRaw(i)); + } + if (getScoresList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(scoresMemoizedSerializedSize); + } + for (int i = 0; i < scores_.size(); i++) { + output.writeFloatNoTag(scores_.getFloat(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < categories_.size(); i++) { + dataSize += computeStringSizeNoTag(categories_.getRaw(i)); + } + size += dataSize; + size += 1 * getCategoriesList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getScoresList().size(); + size += dataSize; + if (!getScoresList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + scoresMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) obj; + + if (!getCategoriesList().equals(other.getCategoriesList())) return false; + if (!getScoresList().equals(other.getScoresList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCategoriesCount() > 0) { + hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoriesList().hashCode(); + } + if (getScoresCount() > 0) { + hash = (37 * hash) + SCORES_FIELD_NUMBER; + hash = (53 * hash) + getScoresList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Safety Attribute categories and their associated confidence scores.
+       * 
+ * + * Protobuf type {@code + * google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SafetyAttributesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + categories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + scores_ = emptyFloatList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + result) { + if (((bitField0_ & 0x00000002) != 0)) { + scores_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.scores_ = scores_; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + categories_.makeImmutable(); + result.categories_ = categories_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .getDefaultInstance()) return this; + if (!other.categories_.isEmpty()) { + if (categories_.isEmpty()) { + categories_ = other.categories_; + bitField0_ |= 0x00000001; + } else { + ensureCategoriesIsMutable(); + categories_.addAll(other.categories_); + } + onChanged(); + } + if (!other.scores_.isEmpty()) { + if (scores_.isEmpty()) { + scores_ = other.scores_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureScoresIsMutable(); + scores_.addAll(other.scores_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCategoriesIsMutable(); + categories_.add(s); + break; + } // case 10 + case 21: + { + float v = input.readFloat(); + ensureScoresIsMutable(); + scores_.addFloat(v); + break; + } // case 21 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureScoresIsMutable(); + while (input.getBytesUntilLimit() > 0) { + scores_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList categories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCategoriesIsMutable() { + if (!categories_.isModifiable()) { + categories_ = new com.google.protobuf.LazyStringArrayList(categories_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @return A list containing the categories. + */ + public com.google.protobuf.ProtocolStringList getCategoriesList() { + categories_.makeImmutable(); + return categories_; + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @return The count of categories. + */ + public int getCategoriesCount() { + return categories_.size(); + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @param index The index of the element to return. + * @return The categories at the given index. + */ + public java.lang.String getCategories(int index) { + return categories_.get(index); + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @param index The index of the value to return. + * @return The bytes of the categories at the given index. + */ + public com.google.protobuf.ByteString getCategoriesBytes(int index) { + return categories_.getByteString(index); + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @param index The index to set the value at. + * @param value The categories to set. + * @return This builder for chaining. + */ + public Builder setCategories(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @param value The categories to add. + * @return This builder for chaining. + */ + public Builder addCategories(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @param values The categories to add. + * @return This builder for chaining. + */ + public Builder addAllCategories(java.lang.Iterable values) { + ensureCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, categories_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @return This builder for chaining. + */ + public Builder clearCategories() { + categories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+         * The display names of Safety Attribute categories associated with the
+         * generated content. Order matches the Scores.
+         * 
+ * + * repeated string categories = 1; + * + * @param value The bytes of the categories to add. + * @return This builder for chaining. + */ + public Builder addCategoriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCategoriesIsMutable(); + categories_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList scores_ = emptyFloatList(); + + private void ensureScoresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + scores_ = mutableCopy(scores_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+         * The confidence scores of the each category, higher
+         * value means higher confidence. Order matches the Categories.
+         * 
+ * + * repeated float scores = 2; + * + * @return A list containing the scores. + */ + public java.util.List getScoresList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(scores_) + : scores_; + } + /** + * + * + *
+         * The confidence scores of the each category, higher
+         * value means higher confidence. Order matches the Categories.
+         * 
+ * + * repeated float scores = 2; + * + * @return The count of scores. + */ + public int getScoresCount() { + return scores_.size(); + } + /** + * + * + *
+         * The confidence scores of the each category, higher
+         * value means higher confidence. Order matches the Categories.
+         * 
+ * + * repeated float scores = 2; + * + * @param index The index of the element to return. + * @return The scores at the given index. + */ + public float getScores(int index) { + return scores_.getFloat(index); + } + /** + * + * + *
+         * The confidence scores of the each category, higher
+         * value means higher confidence. Order matches the Categories.
+         * 
+ * + * repeated float scores = 2; + * + * @param index The index to set the value at. + * @param value The scores to set. + * @return This builder for chaining. + */ + public Builder setScores(int index, float value) { + + ensureScoresIsMutable(); + scores_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * The confidence scores of the each category, higher
+         * value means higher confidence. Order matches the Categories.
+         * 
+ * + * repeated float scores = 2; + * + * @param value The scores to add. + * @return This builder for chaining. + */ + public Builder addScores(float value) { + + ensureScoresIsMutable(); + scores_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+         * The confidence scores of the each category, higher
+         * value means higher confidence. Order matches the Categories.
+         * 
+ * + * repeated float scores = 2; + * + * @param values The scores to add. + * @return This builder for chaining. + */ + public Builder addAllScores(java.lang.Iterable values) { + ensureScoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scores_); + onChanged(); + return this; + } + /** + * + * + *
+         * The confidence scores of the each category, higher
+         * value means higher confidence. Order matches the Categories.
+         * 
+ * + * repeated float scores = 2; + * + * @return This builder for chaining. + */ + public Builder clearScores() { + scores_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SafetyAttributes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetyAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SUMMARY_TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object summaryText_ = ""; + /** + * + * + *
+     * The summary content.
+     * 
+ * + * string summary_text = 1; + * + * @return The summaryText. + */ + @java.lang.Override + public java.lang.String getSummaryText() { + java.lang.Object ref = summaryText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summaryText_ = s; + return s; + } + } + /** + * + * + *
+     * The summary content.
+     * 
+ * + * string summary_text = 1; + * + * @return The bytes for summaryText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSummaryTextBytes() { + java.lang.Object ref = summaryText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summaryText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUMMARY_SKIPPED_REASONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List summarySkippedReasons_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason> + summarySkippedReasons_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SummarySkippedReason>() { + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SummarySkippedReason + convert(java.lang.Integer from) { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason + result = + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SummarySkippedReason.forNumber(from); + return result == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SummarySkippedReason.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return A list containing the summarySkippedReasons. + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason> + getSummarySkippedReasonsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason>( + summarySkippedReasons_, summarySkippedReasons_converter_); + } + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return The count of summarySkippedReasons. + */ + @java.lang.Override + public int getSummarySkippedReasonsCount() { + return summarySkippedReasons_.size(); + } + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index of the element to return. + * @return The summarySkippedReasons at the given index. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason + getSummarySkippedReasons(int index) { + return summarySkippedReasons_converter_.convert(summarySkippedReasons_.get(index)); + } + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return A list containing the enum numeric values on the wire for summarySkippedReasons. + */ + @java.lang.Override + public java.util.List getSummarySkippedReasonsValueList() { + return summarySkippedReasons_; + } + /** + * + * + *
+     * Additional summary-skipped reasons. This provides the reason for ignored
+     * cases. If nothing is skipped, this field is not set.
+     * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of summarySkippedReasons at the given index. + */ + @java.lang.Override + public int getSummarySkippedReasonsValue(int index) { + return summarySkippedReasons_.get(index); + } + + private int summarySkippedReasonsMemoizedSerializedSize; + + public static final int SAFETY_ATTRIBUTES_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + safetyAttributes_; + /** + * + * + *
+     * A collection of Safety Attribute categories and their associated
+     * confidence scores.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + * + * @return Whether the safetyAttributes field is set. + */ + @java.lang.Override + public boolean hasSafetyAttributes() { + return safetyAttributes_ != null; + } + /** + * + * + *
+     * A collection of Safety Attribute categories and their associated
+     * confidence scores.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + * + * @return The safetyAttributes. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + getSafetyAttributes() { + return safetyAttributes_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .getDefaultInstance() + : safetyAttributes_; + } + /** + * + * + *
+     * A collection of Safety Attribute categories and their associated
+     * confidence scores.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributesOrBuilder + getSafetyAttributesOrBuilder() { + return safetyAttributes_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .getDefaultInstance() + : safetyAttributes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summaryText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, summaryText_); + } + if (getSummarySkippedReasonsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(summarySkippedReasonsMemoizedSerializedSize); + } + for (int i = 0; i < summarySkippedReasons_.size(); i++) { + output.writeEnumNoTag(summarySkippedReasons_.get(i)); + } + if (safetyAttributes_ != null) { + output.writeMessage(3, getSafetyAttributes()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summaryText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, summaryText_); + } + { + int dataSize = 0; + for (int i = 0; i < summarySkippedReasons_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + summarySkippedReasons_.get(i)); + } + size += dataSize; + if (!getSummarySkippedReasonsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + summarySkippedReasonsMemoizedSerializedSize = dataSize; + } + if (safetyAttributes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSafetyAttributes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) obj; + + if (!getSummaryText().equals(other.getSummaryText())) return false; + if (!summarySkippedReasons_.equals(other.summarySkippedReasons_)) return false; + if (hasSafetyAttributes() != other.hasSafetyAttributes()) return false; + if (hasSafetyAttributes()) { + if (!getSafetyAttributes().equals(other.getSafetyAttributes())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUMMARY_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getSummaryText().hashCode(); + if (getSummarySkippedReasonsCount() > 0) { + hash = (37 * hash) + SUMMARY_SKIPPED_REASONS_FIELD_NUMBER; + hash = (53 * hash) + summarySkippedReasons_.hashCode(); + } + if (hasSafetyAttributes()) { + hash = (37 * hash) + SAFETY_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getSafetyAttributes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Summary of the top N search result specified by the summary spec.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.Summary} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + summaryText_ = ""; + summarySkippedReasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + safetyAttributes_ = null; + if (safetyAttributesBuilder_ != null) { + safetyAttributesBuilder_.dispose(); + safetyAttributesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary result) { + if (((bitField0_ & 0x00000002) != 0)) { + summarySkippedReasons_ = java.util.Collections.unmodifiableList(summarySkippedReasons_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.summarySkippedReasons_ = summarySkippedReasons_; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.summaryText_ = summaryText_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.safetyAttributes_ = + safetyAttributesBuilder_ == null + ? safetyAttributes_ + : safetyAttributesBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance()) + return this; + if (!other.getSummaryText().isEmpty()) { + summaryText_ = other.summaryText_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.summarySkippedReasons_.isEmpty()) { + if (summarySkippedReasons_.isEmpty()) { + summarySkippedReasons_ = other.summarySkippedReasons_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSummarySkippedReasonsIsMutable(); + summarySkippedReasons_.addAll(other.summarySkippedReasons_); + } + onChanged(); + } + if (other.hasSafetyAttributes()) { + mergeSafetyAttributes(other.getSafetyAttributes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + summaryText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + int tmpRaw = input.readEnum(); + ensureSummarySkippedReasonsIsMutable(); + summarySkippedReasons_.add(tmpRaw); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSummarySkippedReasonsIsMutable(); + summarySkippedReasons_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 18 + case 26: + { + input.readMessage( + getSafetyAttributesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object summaryText_ = ""; + /** + * + * + *
+       * The summary content.
+       * 
+ * + * string summary_text = 1; + * + * @return The summaryText. + */ + public java.lang.String getSummaryText() { + java.lang.Object ref = summaryText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summaryText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The summary content.
+       * 
+ * + * string summary_text = 1; + * + * @return The bytes for summaryText. + */ + public com.google.protobuf.ByteString getSummaryTextBytes() { + java.lang.Object ref = summaryText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summaryText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The summary content.
+       * 
+ * + * string summary_text = 1; + * + * @param value The summaryText to set. + * @return This builder for chaining. + */ + public Builder setSummaryText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + summaryText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The summary content.
+       * 
+ * + * string summary_text = 1; + * + * @return This builder for chaining. + */ + public Builder clearSummaryText() { + summaryText_ = getDefaultInstance().getSummaryText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The summary content.
+       * 
+ * + * string summary_text = 1; + * + * @param value The bytes for summaryText to set. + * @return This builder for chaining. + */ + public Builder setSummaryTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + summaryText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List summarySkippedReasons_ = + java.util.Collections.emptyList(); + + private void ensureSummarySkippedReasonsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + summarySkippedReasons_ = + new java.util.ArrayList(summarySkippedReasons_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return A list containing the summarySkippedReasons. + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason> + getSummarySkippedReasonsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason>( + summarySkippedReasons_, summarySkippedReasons_converter_); + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return The count of summarySkippedReasons. + */ + public int getSummarySkippedReasonsCount() { + return summarySkippedReasons_.size(); + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index of the element to return. + * @return The summarySkippedReasons at the given index. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason + getSummarySkippedReasons(int index) { + return summarySkippedReasons_converter_.convert(summarySkippedReasons_.get(index)); + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index to set the value at. + * @param value The summarySkippedReasons to set. + * @return This builder for chaining. + */ + public Builder setSummarySkippedReasons( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason + value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSummarySkippedReasonsIsMutable(); + summarySkippedReasons_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param value The summarySkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addSummarySkippedReasons( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason + value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSummarySkippedReasonsIsMutable(); + summarySkippedReasons_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param values The summarySkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addAllSummarySkippedReasons( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SummarySkippedReason> + values) { + ensureSummarySkippedReasonsIsMutable(); + for (com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason + value : values) { + summarySkippedReasons_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearSummarySkippedReasons() { + summarySkippedReasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @return A list containing the enum numeric values on the wire for summarySkippedReasons. + */ + public java.util.List getSummarySkippedReasonsValueList() { + return java.util.Collections.unmodifiableList(summarySkippedReasons_); + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of summarySkippedReasons at the given index. + */ + public int getSummarySkippedReasonsValue(int index) { + return summarySkippedReasons_.get(index); + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for summarySkippedReasons to set. + * @return This builder for chaining. + */ + public Builder setSummarySkippedReasonsValue(int index, int value) { + ensureSummarySkippedReasonsIsMutable(); + summarySkippedReasons_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param value The enum numeric value on the wire for summarySkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addSummarySkippedReasonsValue(int value) { + ensureSummarySkippedReasonsIsMutable(); + summarySkippedReasons_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Additional summary-skipped reasons. This provides the reason for ignored
+       * cases. If nothing is skipped, this field is not set.
+       * 
+ * + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SummarySkippedReason summary_skipped_reasons = 2; + * + * + * @param values The enum numeric values on the wire for summarySkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addAllSummarySkippedReasonsValue( + java.lang.Iterable values) { + ensureSummarySkippedReasonsIsMutable(); + for (int value : values) { + summarySkippedReasons_.add(value); + } + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + safetyAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SafetyAttributesOrBuilder> + safetyAttributesBuilder_; + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + * + * @return Whether the safetyAttributes field is set. + */ + public boolean hasSafetyAttributes() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + * + * @return The safetyAttributes. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + getSafetyAttributes() { + if (safetyAttributesBuilder_ == null) { + return safetyAttributes_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .getDefaultInstance() + : safetyAttributes_; + } else { + return safetyAttributesBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + public Builder setSafetyAttributes( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes value) { + if (safetyAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safetyAttributes_ = value; + } else { + safetyAttributesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + public Builder setSafetyAttributes( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes.Builder + builderForValue) { + if (safetyAttributesBuilder_ == null) { + safetyAttributes_ = builderForValue.build(); + } else { + safetyAttributesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + public Builder mergeSafetyAttributes( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes value) { + if (safetyAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && safetyAttributes_ != null + && safetyAttributes_ + != com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SafetyAttributes.getDefaultInstance()) { + getSafetyAttributesBuilder().mergeFrom(value); + } else { + safetyAttributes_ = value; + } + } else { + safetyAttributesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + public Builder clearSafetyAttributes() { + bitField0_ = (bitField0_ & ~0x00000004); + safetyAttributes_ = null; + if (safetyAttributesBuilder_ != null) { + safetyAttributesBuilder_.dispose(); + safetyAttributesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .Builder + getSafetyAttributesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSafetyAttributesFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SafetyAttributesOrBuilder + getSafetyAttributesOrBuilder() { + if (safetyAttributesBuilder_ != null) { + return safetyAttributesBuilder_.getMessageOrBuilder(); + } else { + return safetyAttributes_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .getDefaultInstance() + : safetyAttributes_; + } + } + /** + * + * + *
+       * A collection of Safety Attribute categories and their associated
+       * confidence scores.
+       * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes safety_attributes = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SafetyAttributesOrBuilder> + getSafetyAttributesFieldBuilder() { + if (safetyAttributesBuilder_ == null) { + safetyAttributesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.SafetyAttributes + .Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .SafetyAttributesOrBuilder>( + getSafetyAttributes(), getParentForChildren(), isClean()); + safetyAttributes_ = null; + } + return safetyAttributesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.Summary) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Summary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GeoSearchDebugInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The address from which forward geocoding ingestion produced issues.
+     * 
+ * + * string original_address_query = 1; + * + * @return The originalAddressQuery. + */ + java.lang.String getOriginalAddressQuery(); + /** + * + * + *
+     * The address from which forward geocoding ingestion produced issues.
+     * 
+ * + * string original_address_query = 1; + * + * @return The bytes for originalAddressQuery. + */ + com.google.protobuf.ByteString getOriginalAddressQueryBytes(); + + /** + * + * + *
+     * The error produced.
+     * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + java.lang.String getErrorMessage(); + /** + * + * + *
+     * The error produced.
+     * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + com.google.protobuf.ByteString getErrorMessageBytes(); + } + /** + * + * + *
+   * Debug information specifically related to forward geocoding issues arising
+   * from Geolocation Search.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo} + */ + public static final class GeoSearchDebugInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) + GeoSearchDebugInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use GeoSearchDebugInfo.newBuilder() to construct. + private GeoSearchDebugInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GeoSearchDebugInfo() { + originalAddressQuery_ = ""; + errorMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GeoSearchDebugInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + .class); + } + + public static final int ORIGINAL_ADDRESS_QUERY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object originalAddressQuery_ = ""; + /** + * + * + *
+     * The address from which forward geocoding ingestion produced issues.
+     * 
+ * + * string original_address_query = 1; + * + * @return The originalAddressQuery. + */ + @java.lang.Override + public java.lang.String getOriginalAddressQuery() { + java.lang.Object ref = originalAddressQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalAddressQuery_ = s; + return s; + } + } + /** + * + * + *
+     * The address from which forward geocoding ingestion produced issues.
+     * 
+ * + * string original_address_query = 1; + * + * @return The bytes for originalAddressQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOriginalAddressQueryBytes() { + java.lang.Object ref = originalAddressQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalAddressQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorMessage_ = ""; + /** + * + * + *
+     * The error produced.
+     * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + @java.lang.Override + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } + } + /** + * + * + *
+     * The error produced.
+     * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalAddressQuery_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, originalAddressQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalAddressQuery_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, originalAddressQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) obj; + + if (!getOriginalAddressQuery().equals(other.getOriginalAddressQuery())) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ORIGINAL_ADDRESS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getOriginalAddressQuery().hashCode(); + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Debug information specifically related to forward geocoding issues arising
+     * from Geolocation Search.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + originalAddressQuery_ = ""; + errorMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.originalAddressQuery_ = originalAddressQuery_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.errorMessage_ = errorMessage_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + .getDefaultInstance()) return this; + if (!other.getOriginalAddressQuery().isEmpty()) { + originalAddressQuery_ = other.originalAddressQuery_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + originalAddressQuery_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + errorMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object originalAddressQuery_ = ""; + /** + * + * + *
+       * The address from which forward geocoding ingestion produced issues.
+       * 
+ * + * string original_address_query = 1; + * + * @return The originalAddressQuery. + */ + public java.lang.String getOriginalAddressQuery() { + java.lang.Object ref = originalAddressQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalAddressQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The address from which forward geocoding ingestion produced issues.
+       * 
+ * + * string original_address_query = 1; + * + * @return The bytes for originalAddressQuery. + */ + public com.google.protobuf.ByteString getOriginalAddressQueryBytes() { + java.lang.Object ref = originalAddressQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalAddressQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The address from which forward geocoding ingestion produced issues.
+       * 
+ * + * string original_address_query = 1; + * + * @param value The originalAddressQuery to set. + * @return This builder for chaining. + */ + public Builder setOriginalAddressQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + originalAddressQuery_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The address from which forward geocoding ingestion produced issues.
+       * 
+ * + * string original_address_query = 1; + * + * @return This builder for chaining. + */ + public Builder clearOriginalAddressQuery() { + originalAddressQuery_ = getDefaultInstance().getOriginalAddressQuery(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The address from which forward geocoding ingestion produced issues.
+       * 
+ * + * string original_address_query = 1; + * + * @param value The bytes for originalAddressQuery to set. + * @return This builder for chaining. + */ + public Builder setOriginalAddressQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + originalAddressQuery_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object errorMessage_ = ""; + /** + * + * + *
+       * The error produced.
+       * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The error produced.
+       * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The error produced.
+       * 
+ * + * string error_message = 2; + * + * @param value The errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The error produced.
+       * 
+ * + * string error_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + errorMessage_ = getDefaultInstance().getErrorMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The error produced.
+       * 
+ * + * string error_message = 2; + * + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeoSearchDebugInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface QueryExpansionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Bool describing whether query expansion has occurred.
+     * 
+ * + * bool expanded_query = 1; + * + * @return The expandedQuery. + */ + boolean getExpandedQuery(); + + /** + * + * + *
+     * Number of pinned results. This field will only be set when expansion
+     * happens and
+     * [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.pin_unexpanded_results]
+     * is set to true.
+     * 
+ * + * int64 pinned_result_count = 2; + * + * @return The pinnedResultCount. + */ + long getPinnedResultCount(); + } + /** + * + * + *
+   * Information describing query expansion including whether expansion has
+   * occurred.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo} + */ + public static final class QueryExpansionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) + QueryExpansionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryExpansionInfo.newBuilder() to construct. + private QueryExpansionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryExpansionInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryExpansionInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.Builder + .class); + } + + public static final int EXPANDED_QUERY_FIELD_NUMBER = 1; + private boolean expandedQuery_ = false; + /** + * + * + *
+     * Bool describing whether query expansion has occurred.
+     * 
+ * + * bool expanded_query = 1; + * + * @return The expandedQuery. + */ + @java.lang.Override + public boolean getExpandedQuery() { + return expandedQuery_; + } + + public static final int PINNED_RESULT_COUNT_FIELD_NUMBER = 2; + private long pinnedResultCount_ = 0L; + /** + * + * + *
+     * Number of pinned results. This field will only be set when expansion
+     * happens and
+     * [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.pin_unexpanded_results]
+     * is set to true.
+     * 
+ * + * int64 pinned_result_count = 2; + * + * @return The pinnedResultCount. + */ + @java.lang.Override + public long getPinnedResultCount() { + return pinnedResultCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (expandedQuery_ != false) { + output.writeBool(1, expandedQuery_); + } + if (pinnedResultCount_ != 0L) { + output.writeInt64(2, pinnedResultCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (expandedQuery_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, expandedQuery_); + } + if (pinnedResultCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, pinnedResultCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) obj; + + if (getExpandedQuery() != other.getExpandedQuery()) return false; + if (getPinnedResultCount() != other.getPinnedResultCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXPANDED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandedQuery()); + hash = (37 * hash) + PINNED_RESULT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPinnedResultCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information describing query expansion including whether expansion has
+     * occurred.
+     * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + expandedQuery_ = false; + pinnedResultCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.expandedQuery_ = expandedQuery_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pinnedResultCount_ = pinnedResultCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + .getDefaultInstance()) return this; + if (other.getExpandedQuery() != false) { + setExpandedQuery(other.getExpandedQuery()); + } + if (other.getPinnedResultCount() != 0L) { + setPinnedResultCount(other.getPinnedResultCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + expandedQuery_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + pinnedResultCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean expandedQuery_; + /** + * + * + *
+       * Bool describing whether query expansion has occurred.
+       * 
+ * + * bool expanded_query = 1; + * + * @return The expandedQuery. + */ + @java.lang.Override + public boolean getExpandedQuery() { + return expandedQuery_; + } + /** + * + * + *
+       * Bool describing whether query expansion has occurred.
+       * 
+ * + * bool expanded_query = 1; + * + * @param value The expandedQuery to set. + * @return This builder for chaining. + */ + public Builder setExpandedQuery(boolean value) { + + expandedQuery_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Bool describing whether query expansion has occurred.
+       * 
+ * + * bool expanded_query = 1; + * + * @return This builder for chaining. + */ + public Builder clearExpandedQuery() { + bitField0_ = (bitField0_ & ~0x00000001); + expandedQuery_ = false; + onChanged(); + return this; + } + + private long pinnedResultCount_; + /** + * + * + *
+       * Number of pinned results. This field will only be set when expansion
+       * happens and
+       * [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.pin_unexpanded_results]
+       * is set to true.
+       * 
+ * + * int64 pinned_result_count = 2; + * + * @return The pinnedResultCount. + */ + @java.lang.Override + public long getPinnedResultCount() { + return pinnedResultCount_; + } + /** + * + * + *
+       * Number of pinned results. This field will only be set when expansion
+       * happens and
+       * [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.pin_unexpanded_results]
+       * is set to true.
+       * 
+ * + * int64 pinned_result_count = 2; + * + * @param value The pinnedResultCount to set. + * @return This builder for chaining. + */ + public Builder setPinnedResultCount(long value) { + + pinnedResultCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of pinned results. This field will only be set when expansion
+       * happens and
+       * [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.pin_unexpanded_results]
+       * is set to true.
+       * 
+ * + * int64 pinned_result_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearPinnedResultCount() { + bitField0_ = (bitField0_ & ~0x00000002); + pinnedResultCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryExpansionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RESULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + results_; + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + @java.lang.Override + public java.util.List + getResultsList() { + return results_; + } + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getResultsOrBuilderList() { + return results_; + } + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult getResults( + int index) { + return results_.get(index); + } + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder + getResultsOrBuilder(int index) { + return results_.get(index); + } + + public static final int FACETS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List facets_; + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + @java.lang.Override + public java.util.List + getFacetsList() { + return facets_; + } + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder> + getFacetsOrBuilderList() { + return facets_; + } + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + @java.lang.Override + public int getFacetsCount() { + return facets_.size(); + } + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet getFacets(int index) { + return facets_.get(index); + } + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder getFacetsOrBuilder( + int index) { + return facets_.get(index); + } + + public static final int GUIDED_SEARCH_RESULT_FIELD_NUMBER = 8; + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + guidedSearchResult_; + /** + * + * + *
+   * Guided search result.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + * + * @return Whether the guidedSearchResult field is set. + */ + @java.lang.Override + public boolean hasGuidedSearchResult() { + return guidedSearchResult_ != null; + } + /** + * + * + *
+   * Guided search result.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + * + * @return The guidedSearchResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + getGuidedSearchResult() { + return guidedSearchResult_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .getDefaultInstance() + : guidedSearchResult_; + } + /** + * + * + *
+   * Guided search result.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResultOrBuilder + getGuidedSearchResultOrBuilder() { + return guidedSearchResult_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .getDefaultInstance() + : guidedSearchResult_; + } + + public static final int TOTAL_SIZE_FIELD_NUMBER = 3; + private int totalSize_ = 0; + /** + * + * + *
+   * The estimated total count of matched items irrespective of pagination. The
+   * count of
+   * [results][google.cloud.discoveryengine.v1alpha.SearchResponse.results]
+   * returned by pagination may be less than the
+   * [total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size]
+   * that matches.
+   * 
+ * + * int32 total_size = 3; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + + public static final int ATTRIBUTION_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributionToken_ = ""; + /** + * + * + *
+   * A unique search token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this search, which enables accurate attribution of search model
+   * performance.
+   * 
+ * + * string attribution_token = 4; + * + * @return The attributionToken. + */ + @java.lang.Override + public java.lang.String getAttributionToken() { + java.lang.Object ref = attributionToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributionToken_ = s; + return s; + } + } + /** + * + * + *
+   * A unique search token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this search, which enables accurate attribution of search model
+   * performance.
+   * 
+ * + * string attribution_token = 4; + * + * @return The bytes for attributionToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributionTokenBytes() { + java.lang.Object ref = attributionToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REDIRECT_URI_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object redirectUri_ = ""; + /** + * + * + *
+   * The URI of a customer-defined redirect page. If redirect action is
+   * triggered, no search is performed, and only
+   * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+   * and
+   * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+   * are set in the response.
+   * 
+ * + * string redirect_uri = 12; + * + * @return The redirectUri. + */ + @java.lang.Override + public java.lang.String getRedirectUri() { + java.lang.Object ref = redirectUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirectUri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of a customer-defined redirect page. If redirect action is
+   * triggered, no search is performed, and only
+   * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+   * and
+   * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+   * are set in the response.
+   * 
+ * + * string redirect_uri = 12; + * + * @return The bytes for redirectUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRedirectUriBytes() { + java.lang.Object ref = redirectUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + redirectUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token that can be sent as
+   * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 5; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token that can be sent as
+   * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 5; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CORRECTED_QUERY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object correctedQuery_ = ""; + /** + * + * + *
+   * Contains the spell corrected query, if found. If the spell correction type
+   * is AUTOMATIC, then the search results are based on corrected_query.
+   * Otherwise the original query is used for search.
+   * 
+ * + * string corrected_query = 7; + * + * @return The correctedQuery. + */ + @java.lang.Override + public java.lang.String getCorrectedQuery() { + java.lang.Object ref = correctedQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedQuery_ = s; + return s; + } + } + /** + * + * + *
+   * Contains the spell corrected query, if found. If the spell correction type
+   * is AUTOMATIC, then the search results are based on corrected_query.
+   * Otherwise the original query is used for search.
+   * 
+ * + * string corrected_query = 7; + * + * @return The bytes for correctedQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCorrectedQueryBytes() { + java.lang.Object ref = correctedQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUMMARY_FIELD_NUMBER = 9; + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary_; + /** + * + * + *
+   * A summary as part of the search results.
+   * This field is only returned if
+   * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+   * is set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + * + * @return Whether the summary field is set. + */ + @java.lang.Override + public boolean hasSummary() { + return summary_ != null; + } + /** + * + * + *
+   * A summary as part of the search results.
+   * This field is only returned if
+   * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+   * is set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + * + * @return The summary. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary getSummary() { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } + /** + * + * + *
+   * A summary as part of the search results.
+   * This field is only returned if
+   * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+   * is set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder + getSummaryOrBuilder() { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } + + public static final int APPLIED_CONTROLS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList appliedControls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @return A list containing the appliedControls. + */ + public com.google.protobuf.ProtocolStringList getAppliedControlsList() { + return appliedControls_; + } + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @return The count of appliedControls. + */ + public int getAppliedControlsCount() { + return appliedControls_.size(); + } + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @param index The index of the element to return. + * @return The appliedControls at the given index. + */ + public java.lang.String getAppliedControls(int index) { + return appliedControls_.get(index); + } + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @param index The index of the value to return. + * @return The bytes of the appliedControls at the given index. + */ + public com.google.protobuf.ByteString getAppliedControlsBytes(int index) { + return appliedControls_.getByteString(index); + } + + public static final int GEO_SEARCH_DEBUG_INFO_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private java.util.List + geoSearchDebugInfo_; + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + @java.lang.Override + public java.util.List + getGeoSearchDebugInfoList() { + return geoSearchDebugInfo_; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder> + getGeoSearchDebugInfoOrBuilderList() { + return geoSearchDebugInfo_; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + @java.lang.Override + public int getGeoSearchDebugInfoCount() { + return geoSearchDebugInfo_.size(); + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + getGeoSearchDebugInfo(int index) { + return geoSearchDebugInfo_.get(index); + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder + getGeoSearchDebugInfoOrBuilder(int index) { + return geoSearchDebugInfo_.get(index); + } + + public static final int QUERY_EXPANSION_INFO_FIELD_NUMBER = 14; + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + queryExpansionInfo_; + /** + * + * + *
+   * Query expansion information for the returned results.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + * + * @return Whether the queryExpansionInfo field is set. + */ + @java.lang.Override + public boolean hasQueryExpansionInfo() { + return queryExpansionInfo_ != null; + } + /** + * + * + *
+   * Query expansion information for the returned results.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + * + * @return The queryExpansionInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + getQueryExpansionInfo() { + return queryExpansionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + .getDefaultInstance() + : queryExpansionInfo_; + } + /** + * + * + *
+   * Query expansion information for the returned results.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfoOrBuilder + getQueryExpansionInfoOrBuilder() { + return queryExpansionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + .getDefaultInstance() + : queryExpansionInfo_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + for (int i = 0; i < facets_.size(); i++) { + output.writeMessage(2, facets_.get(i)); + } + if (totalSize_ != 0) { + output.writeInt32(3, totalSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributionToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, attributionToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, nextPageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedQuery_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, correctedQuery_); + } + if (guidedSearchResult_ != null) { + output.writeMessage(8, getGuidedSearchResult()); + } + if (summary_ != null) { + output.writeMessage(9, getSummary()); + } + for (int i = 0; i < appliedControls_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, appliedControls_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, redirectUri_); + } + if (queryExpansionInfo_ != null) { + output.writeMessage(14, getQueryExpansionInfo()); + } + for (int i = 0; i < geoSearchDebugInfo_.size(); i++) { + output.writeMessage(16, geoSearchDebugInfo_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i)); + } + for (int i = 0; i < facets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, facets_.get(i)); + } + if (totalSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributionToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, attributionToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, nextPageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(correctedQuery_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, correctedQuery_); + } + if (guidedSearchResult_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getGuidedSearchResult()); + } + if (summary_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSummary()); + } + { + int dataSize = 0; + for (int i = 0; i < appliedControls_.size(); i++) { + dataSize += computeStringSizeNoTag(appliedControls_.getRaw(i)); + } + size += dataSize; + size += 1 * getAppliedControlsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, redirectUri_); + } + if (queryExpansionInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getQueryExpansionInfo()); + } + for (int i = 0; i < geoSearchDebugInfo_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(16, geoSearchDebugInfo_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.SearchResponse other = + (com.google.cloud.discoveryengine.v1alpha.SearchResponse) obj; + + if (!getResultsList().equals(other.getResultsList())) return false; + if (!getFacetsList().equals(other.getFacetsList())) return false; + if (hasGuidedSearchResult() != other.hasGuidedSearchResult()) return false; + if (hasGuidedSearchResult()) { + if (!getGuidedSearchResult().equals(other.getGuidedSearchResult())) return false; + } + if (getTotalSize() != other.getTotalSize()) return false; + if (!getAttributionToken().equals(other.getAttributionToken())) return false; + if (!getRedirectUri().equals(other.getRedirectUri())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getCorrectedQuery().equals(other.getCorrectedQuery())) return false; + if (hasSummary() != other.hasSummary()) return false; + if (hasSummary()) { + if (!getSummary().equals(other.getSummary())) return false; + } + if (!getAppliedControlsList().equals(other.getAppliedControlsList())) return false; + if (!getGeoSearchDebugInfoList().equals(other.getGeoSearchDebugInfoList())) return false; + if (hasQueryExpansionInfo() != other.hasQueryExpansionInfo()) return false; + if (hasQueryExpansionInfo()) { + if (!getQueryExpansionInfo().equals(other.getQueryExpansionInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (getFacetsCount() > 0) { + hash = (37 * hash) + FACETS_FIELD_NUMBER; + hash = (53 * hash) + getFacetsList().hashCode(); + } + if (hasGuidedSearchResult()) { + hash = (37 * hash) + GUIDED_SEARCH_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getGuidedSearchResult().hashCode(); + } + hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getTotalSize(); + hash = (37 * hash) + ATTRIBUTION_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAttributionToken().hashCode(); + hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; + hash = (53 * hash) + getRedirectUri().hashCode(); + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (37 * hash) + CORRECTED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getCorrectedQuery().hashCode(); + if (hasSummary()) { + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + } + if (getAppliedControlsCount() > 0) { + hash = (37 * hash) + APPLIED_CONTROLS_FIELD_NUMBER; + hash = (53 * hash) + getAppliedControlsList().hashCode(); + } + if (getGeoSearchDebugInfoCount() > 0) { + hash = (37 * hash) + GEO_SEARCH_DEBUG_INFO_FIELD_NUMBER; + hash = (53 * hash) + getGeoSearchDebugInfoList().hashCode(); + } + if (hasQueryExpansionInfo()) { + hash = (37 * hash) + QUERY_EXPANSION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getQueryExpansionInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.SearchResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.SearchResponse) + com.google.cloud.discoveryengine.v1alpha.SearchResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.class, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.SearchResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + } else { + results_ = null; + resultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (facetsBuilder_ == null) { + facets_ = java.util.Collections.emptyList(); + } else { + facets_ = null; + facetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + guidedSearchResult_ = null; + if (guidedSearchResultBuilder_ != null) { + guidedSearchResultBuilder_.dispose(); + guidedSearchResultBuilder_ = null; + } + totalSize_ = 0; + attributionToken_ = ""; + redirectUri_ = ""; + nextPageToken_ = ""; + correctedQuery_ = ""; + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + appliedControls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (geoSearchDebugInfoBuilder_ == null) { + geoSearchDebugInfo_ = java.util.Collections.emptyList(); + } else { + geoSearchDebugInfo_ = null; + geoSearchDebugInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + queryExpansionInfo_ = null; + if (queryExpansionInfoBuilder_ != null) { + queryExpansionInfoBuilder_.dispose(); + queryExpansionInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.SearchResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse build() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse buildPartial() { + com.google.cloud.discoveryengine.v1alpha.SearchResponse result = + new com.google.cloud.discoveryengine.v1alpha.SearchResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.SearchResponse result) { + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (facetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + facets_ = java.util.Collections.unmodifiableList(facets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.facets_ = facets_; + } else { + result.facets_ = facetsBuilder_.build(); + } + if (geoSearchDebugInfoBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + geoSearchDebugInfo_ = java.util.Collections.unmodifiableList(geoSearchDebugInfo_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.geoSearchDebugInfo_ = geoSearchDebugInfo_; + } else { + result.geoSearchDebugInfo_ = geoSearchDebugInfoBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.SearchResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.guidedSearchResult_ = + guidedSearchResultBuilder_ == null + ? guidedSearchResult_ + : guidedSearchResultBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalSize_ = totalSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.attributionToken_ = attributionToken_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.redirectUri_ = redirectUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.correctedQuery_ = correctedQuery_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.summary_ = summaryBuilder_ == null ? summary_ : summaryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + appliedControls_.makeImmutable(); + result.appliedControls_ = appliedControls_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.queryExpansionInfo_ = + queryExpansionInfoBuilder_ == null + ? queryExpansionInfo_ + : queryExpansionInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.SearchResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.SearchResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.SearchResponse other) { + if (other == com.google.cloud.discoveryengine.v1alpha.SearchResponse.getDefaultInstance()) + return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (facetsBuilder_ == null) { + if (!other.facets_.isEmpty()) { + if (facets_.isEmpty()) { + facets_ = other.facets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFacetsIsMutable(); + facets_.addAll(other.facets_); + } + onChanged(); + } + } else { + if (!other.facets_.isEmpty()) { + if (facetsBuilder_.isEmpty()) { + facetsBuilder_.dispose(); + facetsBuilder_ = null; + facets_ = other.facets_; + bitField0_ = (bitField0_ & ~0x00000002); + facetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFacetsFieldBuilder() + : null; + } else { + facetsBuilder_.addAllMessages(other.facets_); + } + } + } + if (other.hasGuidedSearchResult()) { + mergeGuidedSearchResult(other.getGuidedSearchResult()); + } + if (other.getTotalSize() != 0) { + setTotalSize(other.getTotalSize()); + } + if (!other.getAttributionToken().isEmpty()) { + attributionToken_ = other.attributionToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRedirectUri().isEmpty()) { + redirectUri_ = other.redirectUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getCorrectedQuery().isEmpty()) { + correctedQuery_ = other.correctedQuery_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasSummary()) { + mergeSummary(other.getSummary()); + } + if (!other.appliedControls_.isEmpty()) { + if (appliedControls_.isEmpty()) { + appliedControls_ = other.appliedControls_; + bitField0_ |= 0x00000200; + } else { + ensureAppliedControlsIsMutable(); + appliedControls_.addAll(other.appliedControls_); + } + onChanged(); + } + if (geoSearchDebugInfoBuilder_ == null) { + if (!other.geoSearchDebugInfo_.isEmpty()) { + if (geoSearchDebugInfo_.isEmpty()) { + geoSearchDebugInfo_ = other.geoSearchDebugInfo_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.addAll(other.geoSearchDebugInfo_); + } + onChanged(); + } + } else { + if (!other.geoSearchDebugInfo_.isEmpty()) { + if (geoSearchDebugInfoBuilder_.isEmpty()) { + geoSearchDebugInfoBuilder_.dispose(); + geoSearchDebugInfoBuilder_ = null; + geoSearchDebugInfo_ = other.geoSearchDebugInfo_; + bitField0_ = (bitField0_ & ~0x00000400); + geoSearchDebugInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGeoSearchDebugInfoFieldBuilder() + : null; + } else { + geoSearchDebugInfoBuilder_.addAllMessages(other.geoSearchDebugInfo_); + } + } + } + if (other.hasQueryExpansionInfo()) { + mergeQueryExpansionInfo(other.getQueryExpansionInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.parser(), + extensionRegistry); + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(m); + } else { + facetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + totalSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + attributionToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 58: + { + correctedQuery_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + input.readMessage( + getGuidedSearchResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 66 + case 74: + { + input.readMessage(getSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAppliedControlsIsMutable(); + appliedControls_.add(s); + break; + } // case 82 + case 98: + { + redirectUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 98 + case 114: + { + input.readMessage( + getQueryExpansionInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 114 + case 130: + { + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + .parser(), + extensionRegistry); + if (geoSearchDebugInfoBuilder_ == null) { + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.add(m); + } else { + geoSearchDebugInfoBuilder_.addMessage(m); + } + break; + } // case 130 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + results_ = java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult>(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public java.util.List + getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult getResults( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder setResults( + int index, com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder setResults( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder addResults( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder addResults( + int index, com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder addResults( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder addResults( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder addAllResults( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult> + values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + getResultsBuilder(int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder + getResultsOrBuilder(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + addResultsBuilder() { + return getResultsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder + addResultsBuilder(int index) { + return getResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of matched documents. The order represents the ranking.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder> + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder>( + results_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.util.List facets_ = + java.util.Collections.emptyList(); + + private void ensureFacetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + facets_ = + new java.util.ArrayList( + facets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder> + facetsBuilder_; + + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public java.util.List + getFacetsList() { + if (facetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facets_); + } else { + return facetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public int getFacetsCount() { + if (facetsBuilder_ == null) { + return facets_.size(); + } else { + return facetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet getFacets(int index) { + if (facetsBuilder_ == null) { + return facets_.get(index); + } else { + return facetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder setFacets( + int index, com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet value) { + if (facetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetsIsMutable(); + facets_.set(index, value); + onChanged(); + } else { + facetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder setFacets( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder builderForValue) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.set(index, builderForValue.build()); + onChanged(); + } else { + facetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder addFacets(com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet value) { + if (facetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetsIsMutable(); + facets_.add(value); + onChanged(); + } else { + facetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder addFacets( + int index, com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet value) { + if (facetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetsIsMutable(); + facets_.add(index, value); + onChanged(); + } else { + facetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder addFacets( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder builderForValue) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(builderForValue.build()); + onChanged(); + } else { + facetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder addFacets( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder builderForValue) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(index, builderForValue.build()); + onChanged(); + } else { + facetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder addAllFacets( + java.lang.Iterable + values) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facets_); + onChanged(); + } else { + facetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder clearFacets() { + if (facetsBuilder_ == null) { + facets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + facetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public Builder removeFacets(int index) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.remove(index); + onChanged(); + } else { + facetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder getFacetsBuilder( + int index) { + return getFacetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder + getFacetsOrBuilder(int index) { + if (facetsBuilder_ == null) { + return facets_.get(index); + } else { + return facetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder> + getFacetsOrBuilderList() { + if (facetsBuilder_ != null) { + return facetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facets_); + } + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder + addFacetsBuilder() { + return getFacetsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.getDefaultInstance()); + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder addFacetsBuilder( + int index) { + return getFacetsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.getDefaultInstance()); + } + /** + * + * + *
+     * Results of facets requested by user.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + public java.util.List + getFacetsBuilderList() { + return getFacetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder> + getFacetsFieldBuilder() { + if (facetsBuilder_ == null) { + facetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder>( + facets_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + facets_ = null; + } + return facetsBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + guidedSearchResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResultOrBuilder> + guidedSearchResultBuilder_; + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + * + * @return Whether the guidedSearchResult field is set. + */ + public boolean hasGuidedSearchResult() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + * + * @return The guidedSearchResult. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + getGuidedSearchResult() { + if (guidedSearchResultBuilder_ == null) { + return guidedSearchResult_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .getDefaultInstance() + : guidedSearchResult_; + } else { + return guidedSearchResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + public Builder setGuidedSearchResult( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult value) { + if (guidedSearchResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + guidedSearchResult_ = value; + } else { + guidedSearchResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + public Builder setGuidedSearchResult( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.Builder + builderForValue) { + if (guidedSearchResultBuilder_ == null) { + guidedSearchResult_ = builderForValue.build(); + } else { + guidedSearchResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + public Builder mergeGuidedSearchResult( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult value) { + if (guidedSearchResultBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && guidedSearchResult_ != null + && guidedSearchResult_ + != com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .getDefaultInstance()) { + getGuidedSearchResultBuilder().mergeFrom(value); + } else { + guidedSearchResult_ = value; + } + } else { + guidedSearchResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + public Builder clearGuidedSearchResult() { + bitField0_ = (bitField0_ & ~0x00000004); + guidedSearchResult_ = null; + if (guidedSearchResultBuilder_ != null) { + guidedSearchResultBuilder_.dispose(); + guidedSearchResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.Builder + getGuidedSearchResultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getGuidedSearchResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResultOrBuilder + getGuidedSearchResultOrBuilder() { + if (guidedSearchResultBuilder_ != null) { + return guidedSearchResultBuilder_.getMessageOrBuilder(); + } else { + return guidedSearchResult_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + .getDefaultInstance() + : guidedSearchResult_; + } + } + /** + * + * + *
+     * Guided search result.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResultOrBuilder> + getGuidedSearchResultFieldBuilder() { + if (guidedSearchResultBuilder_ == null) { + guidedSearchResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse + .GuidedSearchResultOrBuilder>( + getGuidedSearchResult(), getParentForChildren(), isClean()); + guidedSearchResult_ = null; + } + return guidedSearchResultBuilder_; + } + + private int totalSize_; + /** + * + * + *
+     * The estimated total count of matched items irrespective of pagination. The
+     * count of
+     * [results][google.cloud.discoveryengine.v1alpha.SearchResponse.results]
+     * returned by pagination may be less than the
+     * [total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size]
+     * that matches.
+     * 
+ * + * int32 total_size = 3; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * The estimated total count of matched items irrespective of pagination. The
+     * count of
+     * [results][google.cloud.discoveryengine.v1alpha.SearchResponse.results]
+     * returned by pagination may be less than the
+     * [total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size]
+     * that matches.
+     * 
+ * + * int32 total_size = 3; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(int value) { + + totalSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The estimated total count of matched items irrespective of pagination. The
+     * count of
+     * [results][google.cloud.discoveryengine.v1alpha.SearchResponse.results]
+     * returned by pagination may be less than the
+     * [total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size]
+     * that matches.
+     * 
+ * + * int32 total_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalSize() { + bitField0_ = (bitField0_ & ~0x00000008); + totalSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object attributionToken_ = ""; + /** + * + * + *
+     * A unique search token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this search, which enables accurate attribution of search model
+     * performance.
+     * 
+ * + * string attribution_token = 4; + * + * @return The attributionToken. + */ + public java.lang.String getAttributionToken() { + java.lang.Object ref = attributionToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributionToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique search token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this search, which enables accurate attribution of search model
+     * performance.
+     * 
+ * + * string attribution_token = 4; + * + * @return The bytes for attributionToken. + */ + public com.google.protobuf.ByteString getAttributionTokenBytes() { + java.lang.Object ref = attributionToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique search token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this search, which enables accurate attribution of search model
+     * performance.
+     * 
+ * + * string attribution_token = 4; + * + * @param value The attributionToken to set. + * @return This builder for chaining. + */ + public Builder setAttributionToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributionToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique search token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this search, which enables accurate attribution of search model
+     * performance.
+     * 
+ * + * string attribution_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearAttributionToken() { + attributionToken_ = getDefaultInstance().getAttributionToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique search token. This should be included in the
+     * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+     * from this search, which enables accurate attribution of search model
+     * performance.
+     * 
+ * + * string attribution_token = 4; + * + * @param value The bytes for attributionToken to set. + * @return This builder for chaining. + */ + public Builder setAttributionTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributionToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object redirectUri_ = ""; + /** + * + * + *
+     * The URI of a customer-defined redirect page. If redirect action is
+     * triggered, no search is performed, and only
+     * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+     * and
+     * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+     * are set in the response.
+     * 
+ * + * string redirect_uri = 12; + * + * @return The redirectUri. + */ + public java.lang.String getRedirectUri() { + java.lang.Object ref = redirectUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirectUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of a customer-defined redirect page. If redirect action is
+     * triggered, no search is performed, and only
+     * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+     * and
+     * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+     * are set in the response.
+     * 
+ * + * string redirect_uri = 12; + * + * @return The bytes for redirectUri. + */ + public com.google.protobuf.ByteString getRedirectUriBytes() { + java.lang.Object ref = redirectUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + redirectUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of a customer-defined redirect page. If redirect action is
+     * triggered, no search is performed, and only
+     * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+     * and
+     * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+     * are set in the response.
+     * 
+ * + * string redirect_uri = 12; + * + * @param value The redirectUri to set. + * @return This builder for chaining. + */ + public Builder setRedirectUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + redirectUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of a customer-defined redirect page. If redirect action is
+     * triggered, no search is performed, and only
+     * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+     * and
+     * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+     * are set in the response.
+     * 
+ * + * string redirect_uri = 12; + * + * @return This builder for chaining. + */ + public Builder clearRedirectUri() { + redirectUri_ = getDefaultInstance().getRedirectUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of a customer-defined redirect page. If redirect action is
+     * triggered, no search is performed, and only
+     * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+     * and
+     * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+     * are set in the response.
+     * 
+ * + * string redirect_uri = 12; + * + * @param value The bytes for redirectUri to set. + * @return This builder for chaining. + */ + public Builder setRedirectUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + redirectUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token that can be sent as
+     * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 5; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token that can be sent as
+     * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 5; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token that can be sent as
+     * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 5; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as
+     * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as
+     * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+     * to retrieve the next page. If this field is omitted, there are no
+     * subsequent pages.
+     * 
+ * + * string next_page_token = 5; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object correctedQuery_ = ""; + /** + * + * + *
+     * Contains the spell corrected query, if found. If the spell correction type
+     * is AUTOMATIC, then the search results are based on corrected_query.
+     * Otherwise the original query is used for search.
+     * 
+ * + * string corrected_query = 7; + * + * @return The correctedQuery. + */ + public java.lang.String getCorrectedQuery() { + java.lang.Object ref = correctedQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + correctedQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Contains the spell corrected query, if found. If the spell correction type
+     * is AUTOMATIC, then the search results are based on corrected_query.
+     * Otherwise the original query is used for search.
+     * 
+ * + * string corrected_query = 7; + * + * @return The bytes for correctedQuery. + */ + public com.google.protobuf.ByteString getCorrectedQueryBytes() { + java.lang.Object ref = correctedQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + correctedQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Contains the spell corrected query, if found. If the spell correction type
+     * is AUTOMATIC, then the search results are based on corrected_query.
+     * Otherwise the original query is used for search.
+     * 
+ * + * string corrected_query = 7; + * + * @param value The correctedQuery to set. + * @return This builder for chaining. + */ + public Builder setCorrectedQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + correctedQuery_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Contains the spell corrected query, if found. If the spell correction type
+     * is AUTOMATIC, then the search results are based on corrected_query.
+     * Otherwise the original query is used for search.
+     * 
+ * + * string corrected_query = 7; + * + * @return This builder for chaining. + */ + public Builder clearCorrectedQuery() { + correctedQuery_ = getDefaultInstance().getCorrectedQuery(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Contains the spell corrected query, if found. If the spell correction type
+     * is AUTOMATIC, then the search results are based on corrected_query.
+     * Otherwise the original query is used for search.
+     * 
+ * + * string corrected_query = 7; + * + * @param value The bytes for correctedQuery to set. + * @return This builder for chaining. + */ + public Builder setCorrectedQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + correctedQuery_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder> + summaryBuilder_; + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + * + * @return Whether the summary field is set. + */ + public boolean hasSummary() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + * + * @return The summary. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary getSummary() { + if (summaryBuilder_ == null) { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } else { + return summaryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + public Builder setSummary( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary value) { + if (summaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summary_ = value; + } else { + summaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + public Builder setSummary( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder builderForValue) { + if (summaryBuilder_ == null) { + summary_ = builderForValue.build(); + } else { + summaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + public Builder mergeSummary( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary value) { + if (summaryBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && summary_ != null + && summary_ + != com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary + .getDefaultInstance()) { + getSummaryBuilder().mergeFrom(value); + } else { + summary_ = value; + } + } else { + summaryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + public Builder clearSummary() { + bitField0_ = (bitField0_ & ~0x00000100); + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder + getSummaryBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder + getSummaryOrBuilder() { + if (summaryBuilder_ != null) { + return summaryBuilder_.getMessageOrBuilder(); + } else { + return summary_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.getDefaultInstance() + : summary_; + } + } + /** + * + * + *
+     * A summary as part of the search results.
+     * This field is only returned if
+     * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+     * is set.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder> + getSummaryFieldBuilder() { + if (summaryBuilder_ == null) { + summaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder>( + getSummary(), getParentForChildren(), isClean()); + summary_ = null; + } + return summaryBuilder_; + } + + private com.google.protobuf.LazyStringArrayList appliedControls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAppliedControlsIsMutable() { + if (!appliedControls_.isModifiable()) { + appliedControls_ = new com.google.protobuf.LazyStringArrayList(appliedControls_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @return A list containing the appliedControls. + */ + public com.google.protobuf.ProtocolStringList getAppliedControlsList() { + appliedControls_.makeImmutable(); + return appliedControls_; + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @return The count of appliedControls. + */ + public int getAppliedControlsCount() { + return appliedControls_.size(); + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @param index The index of the element to return. + * @return The appliedControls at the given index. + */ + public java.lang.String getAppliedControls(int index) { + return appliedControls_.get(index); + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @param index The index of the value to return. + * @return The bytes of the appliedControls at the given index. + */ + public com.google.protobuf.ByteString getAppliedControlsBytes(int index) { + return appliedControls_.getByteString(index); + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @param index The index to set the value at. + * @param value The appliedControls to set. + * @return This builder for chaining. + */ + public Builder setAppliedControls(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAppliedControlsIsMutable(); + appliedControls_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @param value The appliedControls to add. + * @return This builder for chaining. + */ + public Builder addAppliedControls(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAppliedControlsIsMutable(); + appliedControls_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @param values The appliedControls to add. + * @return This builder for chaining. + */ + public Builder addAllAppliedControls(java.lang.Iterable values) { + ensureAppliedControlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, appliedControls_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @return This builder for chaining. + */ + public Builder clearAppliedControls() { + appliedControls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Controls applied as part of the Control service.
+     * 
+ * + * repeated string applied_controls = 10; + * + * @param value The bytes of the appliedControls to add. + * @return This builder for chaining. + */ + public Builder addAppliedControlsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAppliedControlsIsMutable(); + appliedControls_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo> + geoSearchDebugInfo_ = java.util.Collections.emptyList(); + + private void ensureGeoSearchDebugInfoIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + geoSearchDebugInfo_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo>( + geoSearchDebugInfo_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder> + geoSearchDebugInfoBuilder_; + + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo> + getGeoSearchDebugInfoList() { + if (geoSearchDebugInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(geoSearchDebugInfo_); + } else { + return geoSearchDebugInfoBuilder_.getMessageList(); + } + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public int getGeoSearchDebugInfoCount() { + if (geoSearchDebugInfoBuilder_ == null) { + return geoSearchDebugInfo_.size(); + } else { + return geoSearchDebugInfoBuilder_.getCount(); + } + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + getGeoSearchDebugInfo(int index) { + if (geoSearchDebugInfoBuilder_ == null) { + return geoSearchDebugInfo_.get(index); + } else { + return geoSearchDebugInfoBuilder_.getMessage(index); + } + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder setGeoSearchDebugInfo( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo value) { + if (geoSearchDebugInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.set(index, value); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder setGeoSearchDebugInfo( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + builderForValue) { + if (geoSearchDebugInfoBuilder_ == null) { + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder addGeoSearchDebugInfo( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo value) { + if (geoSearchDebugInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.add(value); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.addMessage(value); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder addGeoSearchDebugInfo( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo value) { + if (geoSearchDebugInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.add(index, value); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder addGeoSearchDebugInfo( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + builderForValue) { + if (geoSearchDebugInfoBuilder_ == null) { + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.add(builderForValue.build()); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder addGeoSearchDebugInfo( + int index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + builderForValue) { + if (geoSearchDebugInfoBuilder_ == null) { + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder addAllGeoSearchDebugInfo( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo> + values) { + if (geoSearchDebugInfoBuilder_ == null) { + ensureGeoSearchDebugInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, geoSearchDebugInfo_); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder clearGeoSearchDebugInfo() { + if (geoSearchDebugInfoBuilder_ == null) { + geoSearchDebugInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.clear(); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public Builder removeGeoSearchDebugInfo(int index) { + if (geoSearchDebugInfoBuilder_ == null) { + ensureGeoSearchDebugInfoIsMutable(); + geoSearchDebugInfo_.remove(index); + onChanged(); + } else { + geoSearchDebugInfoBuilder_.remove(index); + } + return this; + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + getGeoSearchDebugInfoBuilder(int index) { + return getGeoSearchDebugInfoFieldBuilder().getBuilder(index); + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder + getGeoSearchDebugInfoOrBuilder(int index) { + if (geoSearchDebugInfoBuilder_ == null) { + return geoSearchDebugInfo_.get(index); + } else { + return geoSearchDebugInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder> + getGeoSearchDebugInfoOrBuilderList() { + if (geoSearchDebugInfoBuilder_ != null) { + return geoSearchDebugInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(geoSearchDebugInfo_); + } + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + addGeoSearchDebugInfoBuilder() { + return getGeoSearchDebugInfoFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + .getDefaultInstance()); + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder + addGeoSearchDebugInfoBuilder(int index) { + return getGeoSearchDebugInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo + .getDefaultInstance()); + } + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder> + getGeoSearchDebugInfoBuilderList() { + return getGeoSearchDebugInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder> + getGeoSearchDebugInfoFieldBuilder() { + if (geoSearchDebugInfoBuilder_ == null) { + geoSearchDebugInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse + .GeoSearchDebugInfoOrBuilder>( + geoSearchDebugInfo_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + geoSearchDebugInfo_ = null; + } + return geoSearchDebugInfoBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + queryExpansionInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfoOrBuilder> + queryExpansionInfoBuilder_; + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + * + * @return Whether the queryExpansionInfo field is set. + */ + public boolean hasQueryExpansionInfo() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + * + * @return The queryExpansionInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + getQueryExpansionInfo() { + if (queryExpansionInfoBuilder_ == null) { + return queryExpansionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + .getDefaultInstance() + : queryExpansionInfo_; + } else { + return queryExpansionInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + public Builder setQueryExpansionInfo( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo value) { + if (queryExpansionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryExpansionInfo_ = value; + } else { + queryExpansionInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + public Builder setQueryExpansionInfo( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.Builder + builderForValue) { + if (queryExpansionInfoBuilder_ == null) { + queryExpansionInfo_ = builderForValue.build(); + } else { + queryExpansionInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + public Builder mergeQueryExpansionInfo( + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo value) { + if (queryExpansionInfoBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && queryExpansionInfo_ != null + && queryExpansionInfo_ + != com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + .getDefaultInstance()) { + getQueryExpansionInfoBuilder().mergeFrom(value); + } else { + queryExpansionInfo_ = value; + } + } else { + queryExpansionInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + public Builder clearQueryExpansionInfo() { + bitField0_ = (bitField0_ & ~0x00000800); + queryExpansionInfo_ = null; + if (queryExpansionInfoBuilder_ != null) { + queryExpansionInfoBuilder_.dispose(); + queryExpansionInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.Builder + getQueryExpansionInfoBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getQueryExpansionInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfoOrBuilder + getQueryExpansionInfoOrBuilder() { + if (queryExpansionInfoBuilder_ != null) { + return queryExpansionInfoBuilder_.getMessageOrBuilder(); + } else { + return queryExpansionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + .getDefaultInstance() + : queryExpansionInfo_; + } + } + /** + * + * + *
+     * Query expansion information for the returned results.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfoOrBuilder> + getQueryExpansionInfoFieldBuilder() { + if (queryExpansionInfoBuilder_ == null) { + queryExpansionInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo, + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchResponse + .QueryExpansionInfoOrBuilder>( + getQueryExpansionInfo(), getParentForChildren(), isClean()); + queryExpansionInfo_ = null; + } + return queryExpansionInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.SearchResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.SearchResponse) + private static final com.google.cloud.discoveryengine.v1alpha.SearchResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.SearchResponse(); + } + + public static com.google.cloud.discoveryengine.v1alpha.SearchResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponseOrBuilder.java new file mode 100644 index 000000000000..1b23ad2af19e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchResponseOrBuilder.java @@ -0,0 +1,500 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface SearchResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SearchResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + java.util.List + getResultsList(); + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult getResults(int index); + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + int getResultsCount(); + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + java.util.List< + ? extends com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder> + getResultsOrBuilderList(); + /** + * + * + *
+   * A list of matched documents. The order represents the ranking.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult results = 1; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResultOrBuilder getResultsOrBuilder( + int index); + + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + java.util.List getFacetsList(); + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Facet getFacets(int index); + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + int getFacetsCount(); + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + java.util.List + getFacetsOrBuilderList(); + /** + * + * + *
+   * Results of facets requested by user.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.Facet facets = 2; + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.FacetOrBuilder getFacetsOrBuilder( + int index); + + /** + * + * + *
+   * Guided search result.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + * + * @return Whether the guidedSearchResult field is set. + */ + boolean hasGuidedSearchResult(); + /** + * + * + *
+   * Guided search result.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + * + * @return The guidedSearchResult. + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult + getGuidedSearchResult(); + /** + * + * + *
+   * Guided search result.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResult guided_search_result = 8; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GuidedSearchResultOrBuilder + getGuidedSearchResultOrBuilder(); + + /** + * + * + *
+   * The estimated total count of matched items irrespective of pagination. The
+   * count of
+   * [results][google.cloud.discoveryengine.v1alpha.SearchResponse.results]
+   * returned by pagination may be less than the
+   * [total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size]
+   * that matches.
+   * 
+ * + * int32 total_size = 3; + * + * @return The totalSize. + */ + int getTotalSize(); + + /** + * + * + *
+   * A unique search token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this search, which enables accurate attribution of search model
+   * performance.
+   * 
+ * + * string attribution_token = 4; + * + * @return The attributionToken. + */ + java.lang.String getAttributionToken(); + /** + * + * + *
+   * A unique search token. This should be included in the
+   * [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting
+   * from this search, which enables accurate attribution of search model
+   * performance.
+   * 
+ * + * string attribution_token = 4; + * + * @return The bytes for attributionToken. + */ + com.google.protobuf.ByteString getAttributionTokenBytes(); + + /** + * + * + *
+   * The URI of a customer-defined redirect page. If redirect action is
+   * triggered, no search is performed, and only
+   * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+   * and
+   * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+   * are set in the response.
+   * 
+ * + * string redirect_uri = 12; + * + * @return The redirectUri. + */ + java.lang.String getRedirectUri(); + /** + * + * + *
+   * The URI of a customer-defined redirect page. If redirect action is
+   * triggered, no search is performed, and only
+   * [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri]
+   * and
+   * [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token]
+   * are set in the response.
+   * 
+ * + * string redirect_uri = 12; + * + * @return The bytes for redirectUri. + */ + com.google.protobuf.ByteString getRedirectUriBytes(); + + /** + * + * + *
+   * A token that can be sent as
+   * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 5; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token that can be sent as
+   * [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token]
+   * to retrieve the next page. If this field is omitted, there are no
+   * subsequent pages.
+   * 
+ * + * string next_page_token = 5; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Contains the spell corrected query, if found. If the spell correction type
+   * is AUTOMATIC, then the search results are based on corrected_query.
+   * Otherwise the original query is used for search.
+   * 
+ * + * string corrected_query = 7; + * + * @return The correctedQuery. + */ + java.lang.String getCorrectedQuery(); + /** + * + * + *
+   * Contains the spell corrected query, if found. If the spell correction type
+   * is AUTOMATIC, then the search results are based on corrected_query.
+   * Otherwise the original query is used for search.
+   * 
+ * + * string corrected_query = 7; + * + * @return The bytes for correctedQuery. + */ + com.google.protobuf.ByteString getCorrectedQueryBytes(); + + /** + * + * + *
+   * A summary as part of the search results.
+   * This field is only returned if
+   * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+   * is set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + * + * @return Whether the summary field is set. + */ + boolean hasSummary(); + /** + * + * + *
+   * A summary as part of the search results.
+   * This field is only returned if
+   * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+   * is set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + * + * @return The summary. + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.Summary getSummary(); + /** + * + * + *
+   * A summary as part of the search results.
+   * This field is only returned if
+   * [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec]
+   * is set.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.Summary summary = 9; + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.SummaryOrBuilder getSummaryOrBuilder(); + + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @return A list containing the appliedControls. + */ + java.util.List getAppliedControlsList(); + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @return The count of appliedControls. + */ + int getAppliedControlsCount(); + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @param index The index of the element to return. + * @return The appliedControls at the given index. + */ + java.lang.String getAppliedControls(int index); + /** + * + * + *
+   * Controls applied as part of the Control service.
+   * 
+ * + * repeated string applied_controls = 10; + * + * @param index The index of the value to return. + * @return The bytes of the appliedControls at the given index. + */ + com.google.protobuf.ByteString getAppliedControlsBytes(int index); + + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + java.util.List + getGeoSearchDebugInfoList(); + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo getGeoSearchDebugInfo( + int index); + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + int getGeoSearchDebugInfoCount(); + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder> + getGeoSearchDebugInfoOrBuilderList(); + /** + * + * repeated .google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.GeoSearchDebugInfoOrBuilder + getGeoSearchDebugInfoOrBuilder(int index); + + /** + * + * + *
+   * Query expansion information for the returned results.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + * + * @return Whether the queryExpansionInfo field is set. + */ + boolean hasQueryExpansionInfo(); + /** + * + * + *
+   * Query expansion information for the returned results.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + * + * @return The queryExpansionInfo. + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo + getQueryExpansionInfo(); + /** + * + * + *
+   * Query expansion information for the returned results.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfo query_expansion_info = 14; + * + */ + com.google.cloud.discoveryengine.v1alpha.SearchResponse.QueryExpansionInfoOrBuilder + getQueryExpansionInfoOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceProto.java new file mode 100644 index 000000000000..573369e6d4d6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SearchServiceProto.java @@ -0,0 +1,660 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class SearchServiceProto { + private SearchServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ParamsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ParamsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_UserLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_UserLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_ModelScoresEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_ModelScoresEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/discoveryengine/v1alpha/s" + + "earch_service.proto\022$google.cloud.discov" + + "eryengine.v1alpha\032\034google/api/annotation" + + "s.proto\032\027google/api/client.proto\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\0321google/cloud/discoveryengi" + + "ne/v1alpha/common.proto\0323google/cloud/di" + + "scoveryengine/v1alpha/document.proto\032\034go" + + "ogle/protobuf/struct.proto\"\254\032\n\rSearchReq" + + "uest\022M\n\016serving_config\030\001 \001(\tB5\342A\001\002\372A.\n,d" + + "iscoveryengine.googleapis.com/ServingCon" + + "fig\022:\n\006branch\030\002 \001(\tB*\372A\'\n%discoveryengin" + + "e.googleapis.com/Branch\022\r\n\005query\030\003 \001(\t\022S" + + "\n\013image_query\030\023 \001(\0132>.google.cloud.disco" + + "veryengine.v1alpha.SearchRequest.ImageQu" + + "ery\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_token\030\005 \001" + + "(\t\022\016\n\006offset\030\006 \001(\005\022\016\n\006filter\030\007 \001(\t\022\020\n\010or" + + "der_by\030\010 \001(\t\022A\n\tuser_info\030\025 \001(\0132..google" + + ".cloud.discoveryengine.v1alpha.UserInfo\022" + + "R\n\013facet_specs\030\t \003(\0132=.google.cloud.disc" + + "overyengine.v1alpha.SearchRequest.FacetS" + + "pec\022Q\n\nboost_spec\030\n \001(\0132=.google.cloud.d" + + "iscoveryengine.v1alpha.SearchRequest.Boo" + + "stSpec\022O\n\006params\030\013 \003(\0132?.google.cloud.di" + + "scoveryengine.v1alpha.SearchRequest.Para" + + "msEntry\022d\n\024query_expansion_spec\030\r \001(\0132F." + + "google.cloud.discoveryengine.v1alpha.Sea" + + "rchRequest.QueryExpansionSpec\022f\n\025spell_c" + + "orrection_spec\030\016 \001(\0132G.google.cloud.disc" + + "overyengine.v1alpha.SearchRequest.SpellC" + + "orrectionSpec\022\026\n\016user_pseudo_id\030\017 \001(\t\022b\n" + + "\023content_search_spec\030\030 \001(\0132E.google.clou" + + "d.discoveryengine.v1alpha.SearchRequest." + + "ContentSearchSpec\022Y\n\016embedding_spec\030\027 \001(" + + "\0132A.google.cloud.discoveryengine.v1alpha" + + ".SearchRequest.EmbeddingSpec\022\032\n\022ranking_" + + "expression\030\032 \001(\t\022\023\n\013safe_search\030\024 \001(\010\022X\n" + + "\013user_labels\030\026 \003(\0132C.google.cloud.discov" + + "eryengine.v1alpha.SearchRequest.UserLabe" + + "lsEntry\032,\n\nImageQuery\022\025\n\013image_bytes\030\001 \001" + + "(\tH\000B\007\n\005image\032\210\003\n\tFacetSpec\022_\n\tfacet_key" + + "\030\001 \001(\0132F.google.cloud.discoveryengine.v1" + + "alpha.SearchRequest.FacetSpec.FacetKeyB\004" + + "\342A\001\002\022\r\n\005limit\030\002 \001(\005\022\034\n\024excluded_filter_k" + + "eys\030\003 \003(\t\022\037\n\027enable_dynamic_position\030\004 \001" + + "(\010\032\313\001\n\010FacetKey\022\021\n\003key\030\001 \001(\tB\004\342A\001\002\022A\n\tin" + + "tervals\030\002 \003(\0132..google.cloud.discoveryen" + + "gine.v1alpha.Interval\022\031\n\021restricted_valu" + + "es\030\003 \003(\t\022\020\n\010prefixes\030\004 \003(\t\022\020\n\010contains\030\005" + + " \003(\t\022\030\n\020case_insensitive\030\006 \001(\010\022\020\n\010order_" + + "by\030\007 \001(\t\032\264\001\n\tBoostSpec\022o\n\025condition_boos" + + "t_specs\030\001 \003(\0132P.google.cloud.discoveryen" + + "gine.v1alpha.SearchRequest.BoostSpec.Con" + + "ditionBoostSpec\0326\n\022ConditionBoostSpec\022\021\n" + + "\tcondition\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002\032\331\001\n\022Quer" + + "yExpansionSpec\022c\n\tcondition\030\001 \001(\0162P.goog" + + "le.cloud.discoveryengine.v1alpha.SearchR" + + "equest.QueryExpansionSpec.Condition\022\036\n\026p" + + "in_unexpanded_results\030\002 \001(\010\">\n\tCondition" + + "\022\031\n\025CONDITION_UNSPECIFIED\020\000\022\014\n\010DISABLED\020" + + "\001\022\010\n\004AUTO\020\002\032\256\001\n\023SpellCorrectionSpec\022Z\n\004m" + + "ode\030\001 \001(\0162L.google.cloud.discoveryengine" + + ".v1alpha.SearchRequest.SpellCorrectionSp" + + "ec.Mode\";\n\004Mode\022\024\n\020MODE_UNSPECIFIED\020\000\022\023\n" + + "\017SUGGESTION_ONLY\020\001\022\010\n\004AUTO\020\002\032\271\006\n\021Content" + + "SearchSpec\022g\n\014snippet_spec\030\001 \001(\0132Q.googl" + + "e.cloud.discoveryengine.v1alpha.SearchRe" + + "quest.ContentSearchSpec.SnippetSpec\022g\n\014s" + + "ummary_spec\030\002 \001(\0132Q.google.cloud.discove" + + "ryengine.v1alpha.SearchRequest.ContentSe" + + "archSpec.SummarySpec\022|\n\027extractive_conte" + + "nt_spec\030\003 \001(\0132[.google.cloud.discoveryen" + + "gine.v1alpha.SearchRequest.ContentSearch" + + "Spec.ExtractiveContentSpec\032`\n\013SnippetSpe" + + "c\022\035\n\021max_snippet_count\030\001 \001(\005B\002\030\001\022\032\n\016refe" + + "rence_only\030\002 \001(\010B\002\030\001\022\026\n\016return_snippet\030\003" + + " \001(\010\032\251\001\n\013SummarySpec\022\034\n\024summary_result_c" + + "ount\030\001 \001(\005\022\031\n\021include_citations\030\002 \001(\010\022 \n" + + "\030ignore_adversarial_query\030\003 \001(\010\022(\n ignor" + + "e_non_summary_seeking_query\030\004 \001(\010\022\025\n\rlan" + + "guage_code\030\006 \001(\t\032\305\001\n\025ExtractiveContentSp" + + "ec\022#\n\033max_extractive_answer_count\030\001 \001(\005\022" + + "$\n\034max_extractive_segment_count\030\002 \001(\005\022\'\n" + + "\037return_extractive_segment_score\030\003 \001(\010\022\035" + + "\n\025num_previous_segments\030\004 \001(\005\022\031\n\021num_nex" + + "t_segments\030\005 \001(\005\032\264\001\n\rEmbeddingSpec\022l\n\021em" + + "bedding_vectors\030\001 \003(\0132Q.google.cloud.dis" + + "coveryengine.v1alpha.SearchRequest.Embed" + + "dingSpec.EmbeddingVector\0325\n\017EmbeddingVec" + + "tor\022\022\n\nfield_path\030\001 \001(\t\022\016\n\006vector\030\002 \003(\002\032" + + "E\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001" + + "(\0132\026.google.protobuf.Value:\0028\001\0321\n\017UserLa" + + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\"\245\021\n\016SearchResponse\022R\n\007results\030\001 \003(\0132A." + + "google.cloud.discoveryengine.v1alpha.Sea" + + "rchResponse.SearchResult\022J\n\006facets\030\002 \003(\013" + + "2:.google.cloud.discoveryengine.v1alpha." + + "SearchResponse.Facet\022e\n\024guided_search_re" + + "sult\030\010 \001(\0132G.google.cloud.discoveryengin" + + "e.v1alpha.SearchResponse.GuidedSearchRes" + + "ult\022\022\n\ntotal_size\030\003 \001(\005\022\031\n\021attribution_t" + + "oken\030\004 \001(\t\022\024\n\014redirect_uri\030\014 \001(\t\022\027\n\017next" + + "_page_token\030\005 \001(\t\022\027\n\017corrected_query\030\007 \001" + + "(\t\022M\n\007summary\030\t \001(\0132<.google.cloud.disco" + + "veryengine.v1alpha.SearchResponse.Summar" + + "y\022\030\n\020applied_controls\030\n \003(\t\022f\n\025geo_searc" + + "h_debug_info\030\020 \003(\0132G.google.cloud.discov" + + "eryengine.v1alpha.SearchResponse.GeoSear" + + "chDebugInfo\022e\n\024query_expansion_info\030\016 \001(" + + "\0132G.google.cloud.discoveryengine.v1alpha" + + ".SearchResponse.QueryExpansionInfo\032\254\002\n\014S" + + "earchResult\022\n\n\002id\030\001 \001(\t\022@\n\010document\030\002 \001(" + + "\0132..google.cloud.discoveryengine.v1alpha" + + ".Document\022h\n\014model_scores\030\004 \003(\0132R.google" + + ".cloud.discoveryengine.v1alpha.SearchRes" + + "ponse.SearchResult.ModelScoresEntry\032d\n\020M" + + "odelScoresEntry\022\013\n\003key\030\001 \001(\t\022?\n\005value\030\002 " + + "\001(\01320.google.cloud.discoveryengine.v1alp" + + "ha.DoubleList:\0028\001\032\203\002\n\005Facet\022\013\n\003key\030\001 \001(\t" + + "\022U\n\006values\030\002 \003(\0132E.google.cloud.discover" + + "yengine.v1alpha.SearchResponse.Facet.Fac" + + "etValue\022\025\n\rdynamic_facet\030\003 \001(\010\032\177\n\nFacetV" + + "alue\022\017\n\005value\030\001 \001(\tH\000\022B\n\010interval\030\002 \001(\0132" + + "..google.cloud.discoveryengine.v1alpha.I" + + "ntervalH\000\022\r\n\005count\030\003 \001(\003B\r\n\013facet_value\032" + + "\364\001\n\022GuidedSearchResult\022z\n\025refinement_att" + + "ributes\030\001 \003(\0132[.google.cloud.discoveryen" + + "gine.v1alpha.SearchResponse.GuidedSearch" + + "Result.RefinementAttribute\022\033\n\023follow_up_" + + "questions\030\002 \003(\t\032E\n\023RefinementAttribute\022\025" + + "\n\rattribute_key\030\001 \001(\t\022\027\n\017attribute_value" + + "\030\002 \001(\t\032\230\004\n\007Summary\022\024\n\014summary_text\030\001 \001(\t" + + "\022r\n\027summary_skipped_reasons\030\002 \003(\0162Q.goog" + + "le.cloud.discoveryengine.v1alpha.SearchR" + + "esponse.Summary.SummarySkippedReason\022h\n\021" + + "safety_attributes\030\003 \001(\0132M.google.cloud.d" + + "iscoveryengine.v1alpha.SearchResponse.Su" + + "mmary.SafetyAttributes\0326\n\020SafetyAttribut" + + "es\022\022\n\ncategories\030\001 \003(\t\022\016\n\006scores\030\002 \003(\002\"\340" + + "\001\n\024SummarySkippedReason\022&\n\"SUMMARY_SKIPP" + + "ED_REASON_UNSPECIFIED\020\000\022\035\n\031ADVERSARIAL_Q" + + "UERY_IGNORED\020\001\022%\n!NON_SUMMARY_SEEKING_QU" + + "ERY_IGNORED\020\002\022\037\n\033OUT_OF_DOMAIN_QUERY_IGN" + + "ORED\020\003\022\036\n\032POTENTIAL_POLICY_VIOLATION\020\004\022\031" + + "\n\025LLM_ADDON_NOT_ENABLED\020\005\032K\n\022GeoSearchDe" + + "bugInfo\022\036\n\026original_address_query\030\001 \001(\t\022" + + "\025\n\rerror_message\030\002 \001(\t\032I\n\022QueryExpansion" + + "Info\022\026\n\016expanded_query\030\001 \001(\010\022\033\n\023pinned_r" + + "esult_count\030\002 \001(\0032\216\004\n\rSearchService\022\250\003\n\006" + + "Search\0223.google.cloud.discoveryengine.v1" + + "alpha.SearchRequest\0324.google.cloud.disco" + + "veryengine.v1alpha.SearchResponse\"\262\002\202\323\344\223" + + "\002\253\002\"U/v1alpha/{serving_config=projects/*" + + "/locations/*/dataStores/*/servingConfigs" + + "/*}:search:\001*Zh\"c/v1alpha/{serving_confi" + + "g=projects/*/locations/*/collections/*/d" + + "ataStores/*/servingConfigs/*}:search:\001*Z" + + "e\"`/v1alpha/{serving_config=projects/*/l" + + "ocations/*/collections/*/engines/*/servi" + + "ngConfigs/*}:search:\001*\032R\312A\036discoveryengi" + + "ne.googleapis.com\322A.https://www.googleap" + + "is.com/auth/cloud-platformB\236\002\n(com.googl" + + "e.cloud.discoveryengine.v1alphaB\022SearchS" + + "erviceProtoP\001ZRcloud.google.com/go/disco" + + "veryengine/apiv1alpha/discoveryenginepb;" + + "discoveryenginepb\242\002\017DISCOVERYENGINE\252\002$Go" + + "ogle.Cloud.DiscoveryEngine.V1Alpha\312\002$Goo" + + "gle\\Cloud\\DiscoveryEngine\\V1alpha\352\002\'Goog" + + "le::Cloud::DiscoveryEngine::V1alphab\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.CommonProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor, + new java.lang.String[] { + "ServingConfig", + "Branch", + "Query", + "ImageQuery", + "PageSize", + "PageToken", + "Offset", + "Filter", + "OrderBy", + "UserInfo", + "FacetSpecs", + "BoostSpec", + "Params", + "QueryExpansionSpec", + "SpellCorrectionSpec", + "UserPseudoId", + "ContentSearchSpec", + "EmbeddingSpec", + "RankingExpression", + "SafeSearch", + "UserLabels", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ImageQuery_descriptor, + new java.lang.String[] { + "ImageBytes", "Image", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_descriptor, + new java.lang.String[] { + "FacetKey", "Limit", "ExcludedFilterKeys", "EnableDynamicPosition", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_FacetSpec_FacetKey_descriptor, + new java.lang.String[] { + "Key", + "Intervals", + "RestrictedValues", + "Prefixes", + "Contains", + "CaseInsensitive", + "OrderBy", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor, + new java.lang.String[] { + "ConditionBoostSpecs", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor, + new java.lang.String[] { + "Condition", "Boost", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_QueryExpansionSpec_descriptor, + new java.lang.String[] { + "Condition", "PinUnexpandedResults", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_SpellCorrectionSpec_descriptor, + new java.lang.String[] { + "Mode", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor, + new java.lang.String[] { + "SnippetSpec", "SummarySpec", "ExtractiveContentSpec", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SnippetSpec_descriptor, + new java.lang.String[] { + "MaxSnippetCount", "ReferenceOnly", "ReturnSnippet", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_SummarySpec_descriptor, + new java.lang.String[] { + "SummaryResultCount", + "IncludeCitations", + "IgnoreAdversarialQuery", + "IgnoreNonSummarySeekingQuery", + "LanguageCode", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor, + new java.lang.String[] { + "MaxExtractiveAnswerCount", + "MaxExtractiveSegmentCount", + "ReturnExtractiveSegmentScore", + "NumPreviousSegments", + "NumNextSegments", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor, + new java.lang.String[] { + "EmbeddingVectors", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor, + new java.lang.String[] { + "FieldPath", "Vector", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ParamsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(7); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ParamsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_ParamsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_UserLabelsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_descriptor + .getNestedTypes() + .get(8); + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_UserLabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchRequest_UserLabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor, + new java.lang.String[] { + "Results", + "Facets", + "GuidedSearchResult", + "TotalSize", + "AttributionToken", + "RedirectUri", + "NextPageToken", + "CorrectedQuery", + "Summary", + "AppliedControls", + "GeoSearchDebugInfo", + "QueryExpansionInfo", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_descriptor, + new java.lang.String[] { + "Id", "Document", "ModelScores", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_ModelScoresEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_ModelScoresEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_SearchResult_ModelScoresEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_descriptor, + new java.lang.String[] { + "Key", "Values", "DynamicFacet", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Facet_FacetValue_descriptor, + new java.lang.String[] { + "Value", "Interval", "Count", "FacetValue", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_descriptor, + new java.lang.String[] { + "RefinementAttributes", "FollowUpQuestions", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GuidedSearchResult_RefinementAttribute_descriptor, + new java.lang.String[] { + "AttributeKey", "AttributeValue", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor, + new java.lang.String[] { + "SummaryText", "SummarySkippedReasons", "SafetyAttributes", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_Summary_SafetyAttributes_descriptor, + new java.lang.String[] { + "Categories", "Scores", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_GeoSearchDebugInfo_descriptor, + new java.lang.String[] { + "OriginalAddressQuery", "ErrorMessage", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchResponse_QueryExpansionInfo_descriptor, + new java.lang.String[] { + "ExpandedQuery", "PinnedResultCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.CommonProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.DocumentProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigName.java new file mode 100644 index 000000000000..b1188c1dc2c6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/ServingConfigName.java @@ -0,0 +1,566 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ServingConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_STORE_SERVING_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_DATA_STORE_SERVING_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_ENGINE_SERVING_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String dataStore; + private final String servingConfig; + private final String collection; + private final String engine; + + @Deprecated + protected ServingConfigName() { + project = null; + location = null; + dataStore = null; + servingConfig = null; + collection = null; + engine = null; + } + + private ServingConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + servingConfig = Preconditions.checkNotNull(builder.getServingConfig()); + collection = null; + engine = null; + pathTemplate = PROJECT_LOCATION_DATA_STORE_SERVING_CONFIG; + } + + private ServingConfigName(ProjectLocationCollectionDataStoreServingConfigBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + servingConfig = Preconditions.checkNotNull(builder.getServingConfig()); + engine = null; + pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE_SERVING_CONFIG; + } + + private ServingConfigName(ProjectLocationCollectionEngineServingConfigBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + engine = Preconditions.checkNotNull(builder.getEngine()); + servingConfig = Preconditions.checkNotNull(builder.getServingConfig()); + dataStore = null; + pathTemplate = PROJECT_LOCATION_COLLECTION_ENGINE_SERVING_CONFIG; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getServingConfig() { + return servingConfig; + } + + public String getCollection() { + return collection; + } + + public String getEngine() { + return engine; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationDataStoreServingConfigBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionDataStoreServingConfigBuilder + newProjectLocationCollectionDataStoreServingConfigBuilder() { + return new ProjectLocationCollectionDataStoreServingConfigBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionEngineServingConfigBuilder + newProjectLocationCollectionEngineServingConfigBuilder() { + return new ProjectLocationCollectionEngineServingConfigBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ServingConfigName of( + String project, String location, String dataStore, String servingConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setServingConfig(servingConfig) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ServingConfigName ofProjectLocationDataStoreServingConfigName( + String project, String location, String dataStore, String servingConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setServingConfig(servingConfig) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ServingConfigName ofProjectLocationCollectionDataStoreServingConfigName( + String project, String location, String collection, String dataStore, String servingConfig) { + return newProjectLocationCollectionDataStoreServingConfigBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setServingConfig(servingConfig) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ServingConfigName ofProjectLocationCollectionEngineServingConfigName( + String project, String location, String collection, String engine, String servingConfig) { + return newProjectLocationCollectionEngineServingConfigBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setEngine(engine) + .setServingConfig(servingConfig) + .build(); + } + + public static String format( + String project, String location, String dataStore, String servingConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setServingConfig(servingConfig) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDataStoreServingConfigName( + String project, String location, String dataStore, String servingConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .setServingConfig(servingConfig) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionDataStoreServingConfigName( + String project, String location, String collection, String dataStore, String servingConfig) { + return newProjectLocationCollectionDataStoreServingConfigBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .setServingConfig(servingConfig) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionEngineServingConfigName( + String project, String location, String collection, String engine, String servingConfig) { + return newProjectLocationCollectionEngineServingConfigBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setEngine(engine) + .setServingConfig(servingConfig) + .build() + .toString(); + } + + public static ServingConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_DATA_STORE_SERVING_CONFIG.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_DATA_STORE_SERVING_CONFIG.match(formattedString); + return ofProjectLocationDataStoreServingConfigName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("data_store"), + matchMap.get("serving_config")); + } else if (PROJECT_LOCATION_COLLECTION_DATA_STORE_SERVING_CONFIG.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_COLLECTION_DATA_STORE_SERVING_CONFIG.match(formattedString); + return ofProjectLocationCollectionDataStoreServingConfigName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("data_store"), + matchMap.get("serving_config")); + } else if (PROJECT_LOCATION_COLLECTION_ENGINE_SERVING_CONFIG.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_COLLECTION_ENGINE_SERVING_CONFIG.match(formattedString); + return ofProjectLocationCollectionEngineServingConfigName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("engine"), + matchMap.get("serving_config")); + } + throw new ValidationException("ServingConfigName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ServingConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_STORE_SERVING_CONFIG.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_DATA_STORE_SERVING_CONFIG.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_ENGINE_SERVING_CONFIG.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataStore != null) { + fieldMapBuilder.put("data_store", dataStore); + } + if (servingConfig != null) { + fieldMapBuilder.put("serving_config", servingConfig); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + if (engine != null) { + fieldMapBuilder.put("engine", engine); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ServingConfigName that = ((ServingConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataStore, that.dataStore) + && Objects.equals(this.servingConfig, that.servingConfig) + && Objects.equals(this.collection, that.collection) + && Objects.equals(this.engine, that.engine); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataStore); + h *= 1000003; + h ^= Objects.hashCode(servingConfig); + h *= 1000003; + h ^= Objects.hashCode(collection); + h *= 1000003; + h ^= Objects.hashCode(engine); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}. + */ + public static class Builder { + private String project; + private String location; + private String dataStore; + private String servingConfig; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getServingConfig() { + return servingConfig; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public Builder setServingConfig(String servingConfig) { + this.servingConfig = servingConfig; + return this; + } + + private Builder(ServingConfigName servingConfigName) { + Preconditions.checkArgument( + Objects.equals( + servingConfigName.pathTemplate, PROJECT_LOCATION_DATA_STORE_SERVING_CONFIG), + "toBuilder is only supported when ServingConfigName has the pattern of projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"); + this.project = servingConfigName.project; + this.location = servingConfigName.location; + this.dataStore = servingConfigName.dataStore; + this.servingConfig = servingConfigName.servingConfig; + } + + public ServingConfigName build() { + return new ServingConfigName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionDataStoreServingConfigBuilder { + private String project; + private String location; + private String collection; + private String dataStore; + private String servingConfig; + + protected ProjectLocationCollectionDataStoreServingConfigBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getDataStore() { + return dataStore; + } + + public String getServingConfig() { + return servingConfig; + } + + public ProjectLocationCollectionDataStoreServingConfigBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionDataStoreServingConfigBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionDataStoreServingConfigBuilder setCollection(String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionDataStoreServingConfigBuilder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public ProjectLocationCollectionDataStoreServingConfigBuilder setServingConfig( + String servingConfig) { + this.servingConfig = servingConfig; + return this; + } + + public ServingConfigName build() { + return new ServingConfigName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionEngineServingConfigBuilder { + private String project; + private String location; + private String collection; + private String engine; + private String servingConfig; + + protected ProjectLocationCollectionEngineServingConfigBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getEngine() { + return engine; + } + + public String getServingConfig() { + return servingConfig; + } + + public ProjectLocationCollectionEngineServingConfigBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionEngineServingConfigBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionEngineServingConfigBuilder setCollection(String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionEngineServingConfigBuilder setEngine(String engine) { + this.engine = engine; + return this; + } + + public ProjectLocationCollectionEngineServingConfigBuilder setServingConfig( + String servingConfig) { + this.servingConfig = servingConfig; + return this; + } + + public ServingConfigName build() { + return new ServingConfigName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineName.java new file mode 100644 index 000000000000..e50ef4d6758b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineName.java @@ -0,0 +1,374 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SiteSearchEngineName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_STORE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine"); + private static final PathTemplate PROJECT_LOCATION_COLLECTION_DATA_STORE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String dataStore; + private final String collection; + + @Deprecated + protected SiteSearchEngineName() { + project = null; + location = null; + dataStore = null; + collection = null; + } + + private SiteSearchEngineName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + collection = null; + pathTemplate = PROJECT_LOCATION_DATA_STORE; + } + + private SiteSearchEngineName(ProjectLocationCollectionDataStoreBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + dataStore = Preconditions.checkNotNull(builder.getDataStore()); + pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public String getCollection() { + return collection; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectLocationDataStoreBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationCollectionDataStoreBuilder + newProjectLocationCollectionDataStoreBuilder() { + return new ProjectLocationCollectionDataStoreBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SiteSearchEngineName of(String project, String location, String dataStore) { + return newBuilder().setProject(project).setLocation(location).setDataStore(dataStore).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SiteSearchEngineName ofProjectLocationDataStoreName( + String project, String location, String dataStore) { + return newBuilder().setProject(project).setLocation(location).setDataStore(dataStore).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SiteSearchEngineName ofProjectLocationCollectionDataStoreName( + String project, String location, String collection, String dataStore) { + return newProjectLocationCollectionDataStoreBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .build(); + } + + public static String format(String project, String location, String dataStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDataStoreName( + String project, String location, String dataStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataStore(dataStore) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationCollectionDataStoreName( + String project, String location, String collection, String dataStore) { + return newProjectLocationCollectionDataStoreBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setDataStore(dataStore) + .build() + .toString(); + } + + public static SiteSearchEngineName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION_DATA_STORE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_DATA_STORE.match(formattedString); + return ofProjectLocationDataStoreName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("data_store")); + } else if (PROJECT_LOCATION_COLLECTION_DATA_STORE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_COLLECTION_DATA_STORE.match(formattedString); + return ofProjectLocationCollectionDataStoreName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("data_store")); + } + throw new ValidationException( + "SiteSearchEngineName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SiteSearchEngineName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_STORE.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_DATA_STORE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (dataStore != null) { + fieldMapBuilder.put("data_store", dataStore); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SiteSearchEngineName that = ((SiteSearchEngineName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataStore, that.dataStore) + && Objects.equals(this.collection, that.collection); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(dataStore); + h *= 1000003; + h ^= Objects.hashCode(collection); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine. + */ + public static class Builder { + private String project; + private String location; + private String dataStore; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataStore() { + return dataStore; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + private Builder(SiteSearchEngineName siteSearchEngineName) { + Preconditions.checkArgument( + Objects.equals(siteSearchEngineName.pathTemplate, PROJECT_LOCATION_DATA_STORE), + "toBuilder is only supported when SiteSearchEngineName has the pattern of projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine"); + this.project = siteSearchEngineName.project; + this.location = siteSearchEngineName.location; + this.dataStore = siteSearchEngineName.dataStore; + } + + public SiteSearchEngineName build() { + return new SiteSearchEngineName(this); + } + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationCollectionDataStoreBuilder { + private String project; + private String location; + private String collection; + private String dataStore; + + protected ProjectLocationCollectionDataStoreBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getDataStore() { + return dataStore; + } + + public ProjectLocationCollectionDataStoreBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionDataStoreBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionDataStoreBuilder setCollection(String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionDataStoreBuilder setDataStore(String dataStore) { + this.dataStore = dataStore; + return this; + } + + public SiteSearchEngineName build() { + return new SiteSearchEngineName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceProto.java new file mode 100644 index 000000000000..b8887b4cff2c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SiteSearchEngineServiceProto.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class SiteSearchEngineServiceProto { + private SiteSearchEngineServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nEgoogle/cloud/discoveryengine/v1alpha/s" + + "ite_search_engine_service.proto\022$google." + + "cloud.discoveryengine.v1alpha\032\034google/ap" + + "i/annotations.proto\032\027google/api/client.p" + + "roto\032\037google/api/field_behavior.proto\032\031g" + + "oogle/api/resource.proto\032#google/longrun" + + "ning/operations.proto\032\037google/protobuf/t" + + "imestamp.proto\"~\n\022RecrawlUrisRequest\022T\n\022" + + "site_search_engine\030\001 \001(\tB8\342A\001\002\372A1\n/disco" + + "veryengine.googleapis.com/SiteSearchEngi" + + "ne\022\022\n\004uris\030\002 \003(\tB\004\342A\001\002\"\367\003\n\023RecrawlUrisRe" + + "sponse\022^\n\017failure_samples\030\001 \003(\0132E.google" + + ".cloud.discoveryengine.v1alpha.RecrawlUr" + + "isResponse.FailureInfo\022\023\n\013failed_uris\030\002 " + + "\003(\t\032\352\002\n\013FailureInfo\022\013\n\003uri\030\001 \001(\t\022l\n\017fail" + + "ure_reasons\030\002 \003(\0132S.google.cloud.discove" + + "ryengine.v1alpha.RecrawlUrisResponse.Fai" + + "lureInfo.FailureReason\032\337\001\n\rFailureReason" + + "\022s\n\013corpus_type\030\001 \001(\0162^.google.cloud.dis" + + "coveryengine.v1alpha.RecrawlUrisResponse" + + ".FailureInfo.FailureReason.CorpusType\022\025\n" + + "\rerror_message\030\002 \001(\t\"B\n\nCorpusType\022\033\n\027CO" + + "RPUS_TYPE_UNSPECIFIED\020\000\022\013\n\007DESKTOP\020\001\022\n\n\006" + + "MOBILE\020\002\"\363\001\n\023RecrawlUrisMetadata\022/\n\013crea" + + "te_time\030\001 \001(\0132\032.google.protobuf.Timestam" + + "p\022/\n\013update_time\030\002 \001(\0132\032.google.protobuf" + + ".Timestamp\022\024\n\014invalid_uris\030\003 \003(\t\022\030\n\020vali" + + "d_uris_count\030\004 \001(\005\022\025\n\rsuccess_count\030\005 \001(" + + "\005\022\025\n\rpending_count\030\006 \001(\005\022\034\n\024quota_exceed" + + "ed_count\030\007 \001(\0052\255\004\n\027SiteSearchEngineServi" + + "ce\022\275\003\n\013RecrawlUris\0228.google.cloud.discov" + + "eryengine.v1alpha.RecrawlUrisRequest\032\035.g" + + "oogle.longrunning.Operation\"\324\002\312At\n8googl" + + "e.cloud.discoveryengine.v1alpha.RecrawlU" + + "risResponse\0228google.cloud.discoveryengin" + + "e.v1alpha.RecrawlUrisMetadata\202\323\344\223\002\326\001\"^/v" + + "1alpha/{site_search_engine=projects/*/lo" + + "cations/*/dataStores/*/siteSearchEngine}" + + ":recrawlUris:\001*Zq\"l/v1alpha/{site_search" + + "_engine=projects/*/locations/*/collectio" + + "ns/*/dataStores/*/siteSearchEngine}:recr" + + "awlUris:\001*\032R\312A\036discoveryengine.googleapi" + + "s.com\322A.https://www.googleapis.com/auth/" + + "cloud-platformB\250\002\n(com.google.cloud.disc" + + "overyengine.v1alphaB\034SiteSearchEngineSer" + + "viceProtoP\001ZRcloud.google.com/go/discove" + + "ryengine/apiv1alpha/discoveryenginepb;di" + + "scoveryenginepb\242\002\017DISCOVERYENGINE\252\002$Goog" + + "le.Cloud.DiscoveryEngine.V1Alpha\312\002$Googl" + + "e\\Cloud\\DiscoveryEngine\\V1alpha\352\002\'Google" + + "::Cloud::DiscoveryEngine::V1alphab\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisRequest_descriptor, + new java.lang.String[] { + "SiteSearchEngine", "Uris", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_descriptor, + new java.lang.String[] { + "FailureSamples", "FailedUris", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_descriptor, + new java.lang.String[] { + "Uri", "FailureReasons", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisResponse_FailureInfo_FailureReason_descriptor, + new java.lang.String[] { + "CorpusType", "ErrorMessage", + }); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_RecrawlUrisMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "UpdateTime", + "InvalidUris", + "ValidUrisCount", + "SuccessCount", + "PendingCount", + "QuotaExceededCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SolutionType.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SolutionType.java new file mode 100644 index 000000000000..74fa61af1cbf --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SolutionType.java @@ -0,0 +1,200 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * The type of solution.
+ * 
+ * + * Protobuf enum {@code google.cloud.discoveryengine.v1alpha.SolutionType} + */ +public enum SolutionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value.
+   * 
+ * + * SOLUTION_TYPE_UNSPECIFIED = 0; + */ + SOLUTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Used for Recommendations AI.
+   * 
+ * + * SOLUTION_TYPE_RECOMMENDATION = 1; + */ + SOLUTION_TYPE_RECOMMENDATION(1), + /** + * + * + *
+   * Used for Discovery Search.
+   * 
+ * + * SOLUTION_TYPE_SEARCH = 2; + */ + SOLUTION_TYPE_SEARCH(2), + /** + * + * + *
+   * Used for use cases related to the Generative AI agent.
+   * 
+ * + * SOLUTION_TYPE_CHAT = 3; + */ + SOLUTION_TYPE_CHAT(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value.
+   * 
+ * + * SOLUTION_TYPE_UNSPECIFIED = 0; + */ + public static final int SOLUTION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Used for Recommendations AI.
+   * 
+ * + * SOLUTION_TYPE_RECOMMENDATION = 1; + */ + public static final int SOLUTION_TYPE_RECOMMENDATION_VALUE = 1; + /** + * + * + *
+   * Used for Discovery Search.
+   * 
+ * + * SOLUTION_TYPE_SEARCH = 2; + */ + public static final int SOLUTION_TYPE_SEARCH_VALUE = 2; + /** + * + * + *
+   * Used for use cases related to the Generative AI agent.
+   * 
+ * + * SOLUTION_TYPE_CHAT = 3; + */ + public static final int SOLUTION_TYPE_CHAT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SolutionType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SolutionType forNumber(int value) { + switch (value) { + case 0: + return SOLUTION_TYPE_UNSPECIFIED; + case 1: + return SOLUTION_TYPE_RECOMMENDATION; + case 2: + return SOLUTION_TYPE_SEARCH; + case 3: + return SOLUTION_TYPE_CHAT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SolutionType findValueByNumber(int number) { + return SolutionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SolutionType[] VALUES = values(); + + public static SolutionType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SolutionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1alpha.SolutionType) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TextInput.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TextInput.java new file mode 100644 index 000000000000..f5610306389c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TextInput.java @@ -0,0 +1,895 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Defines text input.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.TextInput} + */ +public final class TextInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.TextInput) + TextInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextInput.newBuilder() to construct. + private TextInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextInput() { + input_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TextInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_TextInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_TextInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.TextInput.class, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder.class); + } + + public static final int INPUT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object input_ = ""; + /** + * + * + *
+   * Text input.
+   * 
+ * + * string input = 1; + * + * @return The input. + */ + @java.lang.Override + public java.lang.String getInput() { + java.lang.Object ref = input_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + input_ = s; + return s; + } + } + /** + * + * + *
+   * Text input.
+   * 
+ * + * string input = 1; + * + * @return The bytes for input. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputBytes() { + java.lang.Object ref = input_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + input_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTEXT_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.ConversationContext context_; + /** + * + * + *
+   * Conversation context of the input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + * + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + * + * + *
+   * Conversation context of the input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + * + * @return The context. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationContext getContext() { + return context_ == null + ? com.google.cloud.discoveryengine.v1alpha.ConversationContext.getDefaultInstance() + : context_; + } + /** + * + * + *
+   * Conversation context of the input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationContextOrBuilder + getContextOrBuilder() { + return context_ == null + ? com.google.cloud.discoveryengine.v1alpha.ConversationContext.getDefaultInstance() + : context_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(input_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, input_); + } + if (context_ != null) { + output.writeMessage(2, getContext()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(input_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, input_); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContext()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.TextInput)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.TextInput other = + (com.google.cloud.discoveryengine.v1alpha.TextInput) obj; + + if (!getInput().equals(other.getInput())) return false; + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext().equals(other.getContext())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput().hashCode(); + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.TextInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines text input.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.TextInput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.TextInput) + com.google.cloud.discoveryengine.v1alpha.TextInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_TextInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_TextInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.TextInput.class, + com.google.cloud.discoveryengine.v1alpha.TextInput.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.TextInput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + input_ = ""; + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationProto + .internal_static_google_cloud_discoveryengine_v1alpha_TextInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInput getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInput build() { + com.google.cloud.discoveryengine.v1alpha.TextInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInput buildPartial() { + com.google.cloud.discoveryengine.v1alpha.TextInput result = + new com.google.cloud.discoveryengine.v1alpha.TextInput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.TextInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.input_ = input_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.context_ = contextBuilder_ == null ? context_ : contextBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.TextInput) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.TextInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.TextInput other) { + if (other == com.google.cloud.discoveryengine.v1alpha.TextInput.getDefaultInstance()) + return this; + if (!other.getInput().isEmpty()) { + input_ = other.input_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getContextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object input_ = ""; + /** + * + * + *
+     * Text input.
+     * 
+ * + * string input = 1; + * + * @return The input. + */ + public java.lang.String getInput() { + java.lang.Object ref = input_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + input_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Text input.
+     * 
+ * + * string input = 1; + * + * @return The bytes for input. + */ + public com.google.protobuf.ByteString getInputBytes() { + java.lang.Object ref = input_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + input_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Text input.
+     * 
+ * + * string input = 1; + * + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Text input.
+     * 
+ * + * string input = 1; + * + * @return This builder for chaining. + */ + public Builder clearInput() { + input_ = getDefaultInstance().getInput(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Text input.
+     * 
+ * + * string input = 1; + * + * @param value The bytes for input to set. + * @return This builder for chaining. + */ + public Builder setInputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + input_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.ConversationContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ConversationContext, + com.google.cloud.discoveryengine.v1alpha.ConversationContext.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationContextOrBuilder> + contextBuilder_; + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + * + * @return Whether the context field is set. + */ + public boolean hasContext() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + * + * @return The context. + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationContext getContext() { + if (contextBuilder_ == null) { + return context_ == null + ? com.google.cloud.discoveryengine.v1alpha.ConversationContext.getDefaultInstance() + : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + public Builder setContext(com.google.cloud.discoveryengine.v1alpha.ConversationContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + } else { + contextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + public Builder setContext( + com.google.cloud.discoveryengine.v1alpha.ConversationContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + public Builder mergeContext( + com.google.cloud.discoveryengine.v1alpha.ConversationContext value) { + if (contextBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && context_ != null + && context_ + != com.google.cloud.discoveryengine.v1alpha.ConversationContext + .getDefaultInstance()) { + getContextBuilder().mergeFrom(value); + } else { + context_ = value; + } + } else { + contextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + public Builder clearContext() { + bitField0_ = (bitField0_ & ~0x00000002); + context_ = null; + if (contextBuilder_ != null) { + contextBuilder_.dispose(); + contextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationContext.Builder + getContextBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationContextOrBuilder + getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null + ? com.google.cloud.discoveryengine.v1alpha.ConversationContext.getDefaultInstance() + : context_; + } + } + /** + * + * + *
+     * Conversation context of the input.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ConversationContext, + com.google.cloud.discoveryengine.v1alpha.ConversationContext.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.ConversationContext, + com.google.cloud.discoveryengine.v1alpha.ConversationContext.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationContextOrBuilder>( + getContext(), getParentForChildren(), isClean()); + context_ = null; + } + return contextBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.TextInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.TextInput) + private static final com.google.cloud.discoveryengine.v1alpha.TextInput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.TextInput(); + } + + public static com.google.cloud.discoveryengine.v1alpha.TextInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TextInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TextInputOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TextInputOrBuilder.java new file mode 100644 index 000000000000..97c6e94d1ce1 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TextInputOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversation.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface TextInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.TextInput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Text input.
+   * 
+ * + * string input = 1; + * + * @return The input. + */ + java.lang.String getInput(); + /** + * + * + *
+   * Text input.
+   * 
+ * + * string input = 1; + * + * @return The bytes for input. + */ + com.google.protobuf.ByteString getInputBytes(); + + /** + * + * + *
+   * Conversation context of the input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + * + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + * + * + *
+   * Conversation context of the input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + * + * @return The context. + */ + com.google.cloud.discoveryengine.v1alpha.ConversationContext getContext(); + /** + * + * + *
+   * Conversation context of the input.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.ConversationContext context = 2; + */ + com.google.cloud.discoveryengine.v1alpha.ConversationContextOrBuilder getContextOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TransactionInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TransactionInfo.java new file mode 100644 index 000000000000..8573c1d55008 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TransactionInfo.java @@ -0,0 +1,1504 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * A transaction represents the entire purchase transaction.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.TransactionInfo} + */ +public final class TransactionInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.TransactionInfo) + TransactionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransactionInfo.newBuilder() to construct. + private TransactionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransactionInfo() { + currency_ = ""; + transactionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransactionInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.class, + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.Builder.class); + } + + private int bitField0_; + public static final int VALUE_FIELD_NUMBER = 1; + private float value_ = 0F; + /** + * + * + *
+   * Required. Total non-zero value associated with the transaction. This value
+   * may include shipping, tax, or other adjustments to the total value that you
+   * want to include.
+   * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Total non-zero value associated with the transaction. This value
+   * may include shipping, tax, or other adjustments to the total value that you
+   * want to include.
+   * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public float getValue() { + return value_; + } + + public static final int CURRENCY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object currency_ = ""; + /** + * + * + *
+   * Required. Currency code. Use three-character ISO-4217 code.
+   * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The currency. + */ + @java.lang.Override + public java.lang.String getCurrency() { + java.lang.Object ref = currency_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currency_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Currency code. Use three-character ISO-4217 code.
+   * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for currency. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrencyBytes() { + java.lang.Object ref = currency_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currency_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object transactionId_ = ""; + /** + * + * + *
+   * The transaction ID with a length limit of 128 characters.
+   * 
+ * + * string transaction_id = 3; + * + * @return The transactionId. + */ + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } + } + /** + * + * + *
+   * The transaction ID with a length limit of 128 characters.
+   * 
+ * + * string transaction_id = 3; + * + * @return The bytes for transactionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAX_FIELD_NUMBER = 4; + private float tax_ = 0F; + /** + * + * + *
+   * All the taxes associated with the transaction.
+   * 
+ * + * optional float tax = 4; + * + * @return Whether the tax field is set. + */ + @java.lang.Override + public boolean hasTax() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * All the taxes associated with the transaction.
+   * 
+ * + * optional float tax = 4; + * + * @return The tax. + */ + @java.lang.Override + public float getTax() { + return tax_; + } + + public static final int COST_FIELD_NUMBER = 5; + private float cost_ = 0F; + /** + * + * + *
+   * All the costs associated with the products. These can be manufacturing
+   * costs, shipping expenses not borne by the end user, or any other costs,
+   * such that:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float cost = 5; + * + * @return Whether the cost field is set. + */ + @java.lang.Override + public boolean hasCost() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * All the costs associated with the products. These can be manufacturing
+   * costs, shipping expenses not borne by the end user, or any other costs,
+   * such that:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float cost = 5; + * + * @return The cost. + */ + @java.lang.Override + public float getCost() { + return cost_; + } + + public static final int DISCOUNT_VALUE_FIELD_NUMBER = 6; + private float discountValue_ = 0F; + /** + * + * + *
+   * The total discount(s) value applied to this transaction.
+   * This figure should be excluded from
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   *
+   * For example, if a user paid
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * amount, then nominal (pre-discount) value of the transaction is the sum of
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * and
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   *
+   * This means that profit is calculated the same way, regardless of the
+   * discount value, and that
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   * can be larger than
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float discount_value = 6; + * + * @return Whether the discountValue field is set. + */ + @java.lang.Override + public boolean hasDiscountValue() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The total discount(s) value applied to this transaction.
+   * This figure should be excluded from
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   *
+   * For example, if a user paid
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * amount, then nominal (pre-discount) value of the transaction is the sum of
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * and
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   *
+   * This means that profit is calculated the same way, regardless of the
+   * discount value, and that
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   * can be larger than
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float discount_value = 6; + * + * @return The discountValue. + */ + @java.lang.Override + public float getDiscountValue() { + return discountValue_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(1, value_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currency_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, currency_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeFloat(4, tax_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeFloat(5, cost_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeFloat(6, discountValue_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, value_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currency_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, currency_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, tax_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, cost_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, discountValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.TransactionInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.TransactionInfo other = + (com.google.cloud.discoveryengine.v1alpha.TransactionInfo) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (java.lang.Float.floatToIntBits(getValue()) + != java.lang.Float.floatToIntBits(other.getValue())) return false; + } + if (!getCurrency().equals(other.getCurrency())) return false; + if (!getTransactionId().equals(other.getTransactionId())) return false; + if (hasTax() != other.hasTax()) return false; + if (hasTax()) { + if (java.lang.Float.floatToIntBits(getTax()) + != java.lang.Float.floatToIntBits(other.getTax())) return false; + } + if (hasCost() != other.hasCost()) return false; + if (hasCost()) { + if (java.lang.Float.floatToIntBits(getCost()) + != java.lang.Float.floatToIntBits(other.getCost())) return false; + } + if (hasDiscountValue() != other.hasDiscountValue()) return false; + if (hasDiscountValue()) { + if (java.lang.Float.floatToIntBits(getDiscountValue()) + != java.lang.Float.floatToIntBits(other.getDiscountValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getValue()); + } + hash = (37 * hash) + CURRENCY_FIELD_NUMBER; + hash = (53 * hash) + getCurrency().hashCode(); + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + if (hasTax()) { + hash = (37 * hash) + TAX_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTax()); + } + if (hasCost()) { + hash = (37 * hash) + COST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCost()); + } + if (hasDiscountValue()) { + hash = (37 * hash) + DISCOUNT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getDiscountValue()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.TransactionInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A transaction represents the entire purchase transaction.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.TransactionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.TransactionInfo) + com.google.cloud.discoveryengine.v1alpha.TransactionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.class, + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.TransactionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = 0F; + currency_ = ""; + transactionId_ = ""; + tax_ = 0F; + cost_ = 0F; + discountValue_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TransactionInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.TransactionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TransactionInfo build() { + com.google.cloud.discoveryengine.v1alpha.TransactionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TransactionInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.TransactionInfo result = + new com.google.cloud.discoveryengine.v1alpha.TransactionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.TransactionInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = value_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.currency_ = currency_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.transactionId_ = transactionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tax_ = tax_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cost_ = cost_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.discountValue_ = discountValue_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.TransactionInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.TransactionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.TransactionInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.TransactionInfo.getDefaultInstance()) + return this; + if (other.hasValue()) { + setValue(other.getValue()); + } + if (!other.getCurrency().isEmpty()) { + currency_ = other.currency_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTransactionId().isEmpty()) { + transactionId_ = other.transactionId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasTax()) { + setTax(other.getTax()); + } + if (other.hasCost()) { + setCost(other.getCost()); + } + if (other.hasDiscountValue()) { + setDiscountValue(other.getDiscountValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + value_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 18: + { + currency_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + transactionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 37: + { + tax_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 45: + { + cost_ = input.readFloat(); + bitField0_ |= 0x00000010; + break; + } // case 45 + case 53: + { + discountValue_ = input.readFloat(); + bitField0_ |= 0x00000020; + break; + } // case 53 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float value_; + /** + * + * + *
+     * Required. Total non-zero value associated with the transaction. This value
+     * may include shipping, tax, or other adjustments to the total value that you
+     * want to include.
+     * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Total non-zero value associated with the transaction. This value
+     * may include shipping, tax, or other adjustments to the total value that you
+     * want to include.
+     * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public float getValue() { + return value_; + } + /** + * + * + *
+     * Required. Total non-zero value associated with the transaction. This value
+     * may include shipping, tax, or other adjustments to the total value that you
+     * want to include.
+     * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(float value) { + + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Total non-zero value associated with the transaction. This value
+     * may include shipping, tax, or other adjustments to the total value that you
+     * want to include.
+     * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object currency_ = ""; + /** + * + * + *
+     * Required. Currency code. Use three-character ISO-4217 code.
+     * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The currency. + */ + public java.lang.String getCurrency() { + java.lang.Object ref = currency_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currency_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Currency code. Use three-character ISO-4217 code.
+     * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for currency. + */ + public com.google.protobuf.ByteString getCurrencyBytes() { + java.lang.Object ref = currency_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currency_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Currency code. Use three-character ISO-4217 code.
+     * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The currency to set. + * @return This builder for chaining. + */ + public Builder setCurrency(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + currency_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Currency code. Use three-character ISO-4217 code.
+     * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCurrency() { + currency_ = getDefaultInstance().getCurrency(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Currency code. Use three-character ISO-4217 code.
+     * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for currency to set. + * @return This builder for chaining. + */ + public Builder setCurrencyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + currency_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + * + * + *
+     * The transaction ID with a length limit of 128 characters.
+     * 
+ * + * string transaction_id = 3; + * + * @return The transactionId. + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The transaction ID with a length limit of 128 characters.
+     * 
+ * + * string transaction_id = 3; + * + * @return The bytes for transactionId. + */ + public com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The transaction ID with a length limit of 128 characters.
+     * 
+ * + * string transaction_id = 3; + * + * @param value The transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The transaction ID with a length limit of 128 characters.
+     * 
+ * + * string transaction_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearTransactionId() { + transactionId_ = getDefaultInstance().getTransactionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The transaction ID with a length limit of 128 characters.
+     * 
+ * + * string transaction_id = 3; + * + * @param value The bytes for transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private float tax_; + /** + * + * + *
+     * All the taxes associated with the transaction.
+     * 
+ * + * optional float tax = 4; + * + * @return Whether the tax field is set. + */ + @java.lang.Override + public boolean hasTax() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * All the taxes associated with the transaction.
+     * 
+ * + * optional float tax = 4; + * + * @return The tax. + */ + @java.lang.Override + public float getTax() { + return tax_; + } + /** + * + * + *
+     * All the taxes associated with the transaction.
+     * 
+ * + * optional float tax = 4; + * + * @param value The tax to set. + * @return This builder for chaining. + */ + public Builder setTax(float value) { + + tax_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * All the taxes associated with the transaction.
+     * 
+ * + * optional float tax = 4; + * + * @return This builder for chaining. + */ + public Builder clearTax() { + bitField0_ = (bitField0_ & ~0x00000008); + tax_ = 0F; + onChanged(); + return this; + } + + private float cost_; + /** + * + * + *
+     * All the costs associated with the products. These can be manufacturing
+     * costs, shipping expenses not borne by the end user, or any other costs,
+     * such that:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float cost = 5; + * + * @return Whether the cost field is set. + */ + @java.lang.Override + public boolean hasCost() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * All the costs associated with the products. These can be manufacturing
+     * costs, shipping expenses not borne by the end user, or any other costs,
+     * such that:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float cost = 5; + * + * @return The cost. + */ + @java.lang.Override + public float getCost() { + return cost_; + } + /** + * + * + *
+     * All the costs associated with the products. These can be manufacturing
+     * costs, shipping expenses not borne by the end user, or any other costs,
+     * such that:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float cost = 5; + * + * @param value The cost to set. + * @return This builder for chaining. + */ + public Builder setCost(float value) { + + cost_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * All the costs associated with the products. These can be manufacturing
+     * costs, shipping expenses not borne by the end user, or any other costs,
+     * such that:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float cost = 5; + * + * @return This builder for chaining. + */ + public Builder clearCost() { + bitField0_ = (bitField0_ & ~0x00000010); + cost_ = 0F; + onChanged(); + return this; + } + + private float discountValue_; + /** + * + * + *
+     * The total discount(s) value applied to this transaction.
+     * This figure should be excluded from
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     *
+     * For example, if a user paid
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * amount, then nominal (pre-discount) value of the transaction is the sum of
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * and
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     *
+     * This means that profit is calculated the same way, regardless of the
+     * discount value, and that
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     * can be larger than
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float discount_value = 6; + * + * @return Whether the discountValue field is set. + */ + @java.lang.Override + public boolean hasDiscountValue() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The total discount(s) value applied to this transaction.
+     * This figure should be excluded from
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     *
+     * For example, if a user paid
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * amount, then nominal (pre-discount) value of the transaction is the sum of
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * and
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     *
+     * This means that profit is calculated the same way, regardless of the
+     * discount value, and that
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     * can be larger than
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float discount_value = 6; + * + * @return The discountValue. + */ + @java.lang.Override + public float getDiscountValue() { + return discountValue_; + } + /** + * + * + *
+     * The total discount(s) value applied to this transaction.
+     * This figure should be excluded from
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     *
+     * For example, if a user paid
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * amount, then nominal (pre-discount) value of the transaction is the sum of
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * and
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     *
+     * This means that profit is calculated the same way, regardless of the
+     * discount value, and that
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     * can be larger than
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float discount_value = 6; + * + * @param value The discountValue to set. + * @return This builder for chaining. + */ + public Builder setDiscountValue(float value) { + + discountValue_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The total discount(s) value applied to this transaction.
+     * This figure should be excluded from
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     *
+     * For example, if a user paid
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * amount, then nominal (pre-discount) value of the transaction is the sum of
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+     * and
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     *
+     * This means that profit is calculated the same way, regardless of the
+     * discount value, and that
+     * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+     * can be larger than
+     * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+     *
+     * * Profit =
+     * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+     * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+     * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+     * 
+ * + * optional float discount_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearDiscountValue() { + bitField0_ = (bitField0_ & ~0x00000020); + discountValue_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.TransactionInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.TransactionInfo) + private static final com.google.cloud.discoveryengine.v1alpha.TransactionInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.TransactionInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.TransactionInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransactionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TransactionInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TransactionInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TransactionInfoOrBuilder.java new file mode 100644 index 000000000000..2c50bf8c9490 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/TransactionInfoOrBuilder.java @@ -0,0 +1,233 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface TransactionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.TransactionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Total non-zero value associated with the transaction. This value
+   * may include shipping, tax, or other adjustments to the total value that you
+   * want to include.
+   * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+   * Required. Total non-zero value associated with the transaction. This value
+   * may include shipping, tax, or other adjustments to the total value that you
+   * want to include.
+   * 
+ * + * optional float value = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + float getValue(); + + /** + * + * + *
+   * Required. Currency code. Use three-character ISO-4217 code.
+   * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The currency. + */ + java.lang.String getCurrency(); + /** + * + * + *
+   * Required. Currency code. Use three-character ISO-4217 code.
+   * 
+ * + * string currency = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for currency. + */ + com.google.protobuf.ByteString getCurrencyBytes(); + + /** + * + * + *
+   * The transaction ID with a length limit of 128 characters.
+   * 
+ * + * string transaction_id = 3; + * + * @return The transactionId. + */ + java.lang.String getTransactionId(); + /** + * + * + *
+   * The transaction ID with a length limit of 128 characters.
+   * 
+ * + * string transaction_id = 3; + * + * @return The bytes for transactionId. + */ + com.google.protobuf.ByteString getTransactionIdBytes(); + + /** + * + * + *
+   * All the taxes associated with the transaction.
+   * 
+ * + * optional float tax = 4; + * + * @return Whether the tax field is set. + */ + boolean hasTax(); + /** + * + * + *
+   * All the taxes associated with the transaction.
+   * 
+ * + * optional float tax = 4; + * + * @return The tax. + */ + float getTax(); + + /** + * + * + *
+   * All the costs associated with the products. These can be manufacturing
+   * costs, shipping expenses not borne by the end user, or any other costs,
+   * such that:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float cost = 5; + * + * @return Whether the cost field is set. + */ + boolean hasCost(); + /** + * + * + *
+   * All the costs associated with the products. These can be manufacturing
+   * costs, shipping expenses not borne by the end user, or any other costs,
+   * such that:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float cost = 5; + * + * @return The cost. + */ + float getCost(); + + /** + * + * + *
+   * The total discount(s) value applied to this transaction.
+   * This figure should be excluded from
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   *
+   * For example, if a user paid
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * amount, then nominal (pre-discount) value of the transaction is the sum of
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * and
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   *
+   * This means that profit is calculated the same way, regardless of the
+   * discount value, and that
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   * can be larger than
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float discount_value = 6; + * + * @return Whether the discountValue field is set. + */ + boolean hasDiscountValue(); + /** + * + * + *
+   * The total discount(s) value applied to this transaction.
+   * This figure should be excluded from
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   *
+   * For example, if a user paid
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * amount, then nominal (pre-discount) value of the transaction is the sum of
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]
+   * and
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   *
+   * This means that profit is calculated the same way, regardless of the
+   * discount value, and that
+   * [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value]
+   * can be larger than
+   * [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]:
+   *
+   * * Profit =
+   * [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] -
+   * [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] -
+   * [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost]
+   * 
+ * + * optional float discount_value = 6; + * + * @return The discountValue. + */ + float getDiscountValue(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateConversationRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateConversationRequest.java new file mode 100644 index 000000000000..61c563623d45 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateConversationRequest.java @@ -0,0 +1,1077 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request for UpdateConversation method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateConversationRequest} + */ +public final class UpdateConversationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) + UpdateConversationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateConversationRequest.newBuilder() to construct. + private UpdateConversationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateConversationRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateConversationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest.Builder.class); + } + + public static final int CONVERSATION_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + /** + * + * + *
+   * Required. The Conversation to update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + @java.lang.Override + public boolean hasConversation() { + return conversation_ != null; + } + /** + * + * + *
+   * Required. The Conversation to update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + /** + * + * + *
+   * Required. The Conversation to update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder() { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Indicates which fields in the provided
+   * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+   * update. The following are NOT supported:
+   *
+   * * [conversation.name][]
+   *
+   * If not set or empty, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Indicates which fields in the provided
+   * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+   * update. The following are NOT supported:
+   *
+   * * [conversation.name][]
+   *
+   * If not set or empty, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Indicates which fields in the provided
+   * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+   * update. The following are NOT supported:
+   *
+   * * [conversation.name][]
+   *
+   * If not set or empty, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (conversation_ != null) { + output.writeMessage(1, getConversation()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (conversation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConversation()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest other = + (com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) obj; + + if (hasConversation() != other.hasConversation()) return false; + if (hasConversation()) { + if (!getConversation().equals(other.getConversation())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConversation()) { + hash = (37 * hash) + CONVERSATION_FIELD_NUMBER; + hash = (53 * hash) + getConversation().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for UpdateConversation method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateConversationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest.class, + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateConversationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest build() { + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest result = + new com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.conversation_ = + conversationBuilder_ == null ? conversation_ : conversationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + .getDefaultInstance()) return this; + if (other.hasConversation()) { + mergeConversation(other.getConversation()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getConversationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1alpha.Conversation conversation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + conversationBuilder_; + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + public boolean hasConversation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation getConversation() { + if (conversationBuilder_ == null) { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } else { + return conversationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conversation_ = value; + } else { + conversationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConversation( + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder builderForValue) { + if (conversationBuilder_ == null) { + conversation_ = builderForValue.build(); + } else { + conversationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConversation(com.google.cloud.discoveryengine.v1alpha.Conversation value) { + if (conversationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && conversation_ != null + && conversation_ + != com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance()) { + getConversationBuilder().mergeFrom(value); + } else { + conversation_ = value; + } + } else { + conversationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConversation() { + bitField0_ = (bitField0_ & ~0x00000001); + conversation_ = null; + if (conversationBuilder_ != null) { + conversationBuilder_.dispose(); + conversationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Conversation.Builder getConversationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConversationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder + getConversationOrBuilder() { + if (conversationBuilder_ != null) { + return conversationBuilder_.getMessageOrBuilder(); + } else { + return conversation_ == null + ? com.google.cloud.discoveryengine.v1alpha.Conversation.getDefaultInstance() + : conversation_; + } + } + /** + * + * + *
+     * Required. The Conversation to update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder> + getConversationFieldBuilder() { + if (conversationBuilder_ == null) { + conversationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Conversation, + com.google.cloud.discoveryengine.v1alpha.Conversation.Builder, + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder>( + getConversation(), getParentForChildren(), isClean()); + conversation_ = null; + } + return conversationBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Indicates which fields in the provided
+     * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+     * update. The following are NOT supported:
+     *
+     * * [conversation.name][]
+     *
+     * If not set or empty, all supported fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) + private static final com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateConversationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateConversationRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateConversationRequestOrBuilder.java new file mode 100644 index 000000000000..1b1f4301d9a3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateConversationRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/conversational_search_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface UpdateConversationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.UpdateConversationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Conversation to update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the conversation field is set. + */ + boolean hasConversation(); + /** + * + * + *
+   * Required. The Conversation to update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversation. + */ + com.google.cloud.discoveryengine.v1alpha.Conversation getConversation(); + /** + * + * + *
+   * Required. The Conversation to update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Conversation conversation = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.ConversationOrBuilder getConversationOrBuilder(); + + /** + * + * + *
+   * Indicates which fields in the provided
+   * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+   * update. The following are NOT supported:
+   *
+   * * [conversation.name][]
+   *
+   * If not set or empty, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided
+   * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+   * update. The following are NOT supported:
+   *
+   * * [conversation.name][]
+   *
+   * If not set or empty, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Indicates which fields in the provided
+   * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
+   * update. The following are NOT supported:
+   *
+   * * [conversation.name][]
+   *
+   * If not set or empty, all supported fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateDocumentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateDocumentRequest.java new file mode 100644 index 000000000000..18f9ce7302b5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateDocumentRequest.java @@ -0,0 +1,955 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest} + */ +public final class UpdateDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) + UpdateDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDocumentRequest.newBuilder() to construct. + private UpdateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDocumentRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDocumentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.Builder.class); + } + + public static final int DOCUMENT_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1alpha.Document document_; + /** + * + * + *
+   * Required. The document to update/create.
+   *
+   * If the caller does not have permission to update the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+   * does not exist and
+   * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+   * is not set, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the document field is set. + */ + @java.lang.Override + public boolean hasDocument() { + return document_ != null; + } + /** + * + * + *
+   * Required. The document to update/create.
+   *
+   * If the caller does not have permission to update the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+   * does not exist and
+   * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+   * is not set, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The document. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + /** + * + * + *
+   * Required. The document to update/create.
+   *
+   * If the caller does not have permission to update the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+   * does not exist and
+   * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+   * is not set, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 2; + private boolean allowMissing_ = false; + /** + * + * + *
+   * If set to true, and the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] is not found, a
+   * new [Document][google.cloud.discoveryengine.v1alpha.Document] will be
+   * created.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (document_ != null) { + output.writeMessage(1, getDocument()); + } + if (allowMissing_ != false) { + output.writeBool(2, allowMissing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (document_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDocument()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMissing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest other = + (com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) obj; + + if (hasDocument() != other.hasDocument()) return false; + if (hasDocument()) { + if (!getDocument().equals(other.getDocument())) return false; + } + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDocument()) { + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateDocumentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateDocumentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.class, + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + allowMissing_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.DocumentServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateDocumentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest build() { + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest result = + new com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.document_ = documentBuilder_ == null ? document_ : documentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.allowMissing_ = allowMissing_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.getDefaultInstance()) + return this; + if (other.hasDocument()) { + mergeDocument(other.getDocument()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDocumentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1alpha.Document document_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + documentBuilder_; + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the document field is set. + */ + public boolean hasDocument() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The document. + */ + public com.google.cloud.discoveryengine.v1alpha.Document getDocument() { + if (documentBuilder_ == null) { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } else { + return documentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + } else { + documentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDocument( + com.google.cloud.discoveryengine.v1alpha.Document.Builder builderForValue) { + if (documentBuilder_ == null) { + document_ = builderForValue.build(); + } else { + documentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDocument(com.google.cloud.discoveryengine.v1alpha.Document value) { + if (documentBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && document_ != null + && document_ + != com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance()) { + getDocumentBuilder().mergeFrom(value); + } else { + document_ = value; + } + } else { + documentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDocument() { + bitField0_ = (bitField0_ & ~0x00000001); + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Document.Builder getDocumentBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDocumentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder() { + if (documentBuilder_ != null) { + return documentBuilder_.getMessageOrBuilder(); + } else { + return document_ == null + ? com.google.cloud.discoveryengine.v1alpha.Document.getDefaultInstance() + : document_; + } + } + /** + * + * + *
+     * Required. The document to update/create.
+     *
+     * If the caller does not have permission to update the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+     * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+     *
+     * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+     * does not exist and
+     * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+     * is not set, a `NOT_FOUND` error is returned.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder> + getDocumentFieldBuilder() { + if (documentBuilder_ == null) { + documentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Document, + com.google.cloud.discoveryengine.v1alpha.Document.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder>( + getDocument(), getParentForChildren(), isClean()); + document_ = null; + } + return documentBuilder_; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true, and the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] is not found, a
+     * new [Document][google.cloud.discoveryengine.v1alpha.Document] will be
+     * created.
+     * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true, and the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] is not found, a
+     * new [Document][google.cloud.discoveryengine.v1alpha.Document] will be
+     * created.
+     * 
+ * + * bool allow_missing = 2; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, and the
+     * [Document][google.cloud.discoveryengine.v1alpha.Document] is not found, a
+     * new [Document][google.cloud.discoveryengine.v1alpha.Document] will be
+     * created.
+     * 
+ * + * bool allow_missing = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + allowMissing_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) + private static final com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDocumentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateDocumentRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateDocumentRequestOrBuilder.java new file mode 100644 index 000000000000..0b76b2ef561e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateDocumentRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/document_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface UpdateDocumentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The document to update/create.
+   *
+   * If the caller does not have permission to update the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+   * does not exist and
+   * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+   * is not set, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the document field is set. + */ + boolean hasDocument(); + /** + * + * + *
+   * Required. The document to update/create.
+   *
+   * If the caller does not have permission to update the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+   * does not exist and
+   * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+   * is not set, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The document. + */ + com.google.cloud.discoveryengine.v1alpha.Document getDocument(); + /** + * + * + *
+   * Required. The document to update/create.
+   *
+   * If the caller does not have permission to update the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
+   * whether or not it exists, a `PERMISSION_DENIED` error is returned.
+   *
+   * If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
+   * does not exist and
+   * [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
+   * is not set, a `NOT_FOUND` error is returned.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.DocumentOrBuilder getDocumentOrBuilder(); + + /** + * + * + *
+   * If set to true, and the
+   * [Document][google.cloud.discoveryengine.v1alpha.Document] is not found, a
+   * new [Document][google.cloud.discoveryengine.v1alpha.Document] will be
+   * created.
+   * 
+ * + * bool allow_missing = 2; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaMetadata.java new file mode 100644 index 000000000000..1dbc9c97865d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaMetadata.java @@ -0,0 +1,978 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Metadata for UpdateSchema LRO.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata} + */ +public final class UpdateSchemaMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) + UpdateSchemaMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSchemaMetadata.newBuilder() to construct. + private UpdateSchemaMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSchemaMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSchemaMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata.class, + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(2, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata other = + (com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata for UpdateSchema LRO.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata.class, + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata build() { + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata buildPartial() { + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata result = + new com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Operation create time.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Operation last update time. If the operation is done, this is also the
+     * finish time.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) + private static final com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata(); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSchemaMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaMetadataOrBuilder.java new file mode 100644 index 000000000000..4f684652dbf7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaMetadataOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface UpdateSchemaMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Operation create time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Operation last update time. If the operation is done, this is also the
+   * finish time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaRequest.java new file mode 100644 index 000000000000..51b7d71aed57 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaRequest.java @@ -0,0 +1,856 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for
+ * [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest} + */ +public final class UpdateSchemaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) + UpdateSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSchemaRequest.newBuilder() to construct. + private UpdateSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSchemaRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSchemaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1alpha.Schema schema_; + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return schema_ != null; + } + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.Schema getSchema() { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemaOrBuilder() { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_ = false; + /** + * + * + *
+   * If set to true, and the
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not found, a new
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] will be created. In
+   * this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (schema_ != null) { + output.writeMessage(1, getSchema()); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (schema_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSchema()); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest other = + (com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) obj; + + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema().equals(other.getSchema())) return false; + } + if (getAllowMissing() != other.getAllowMissing()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.class, + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + allowMissing_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.SchemaServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_UpdateSchemaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest build() { + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest result = + new com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schema_ = schemaBuilder_ == null ? schema_ : schemaBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.allowMissing_ = allowMissing_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest.getDefaultInstance()) + return this; + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1alpha.Schema schema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder> + schemaBuilder_; + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schema. + */ + public com.google.cloud.discoveryengine.v1alpha.Schema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchema(com.google.cloud.discoveryengine.v1alpha.Schema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchema( + com.google.cloud.discoveryengine.v1alpha.Schema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSchema(com.google.cloud.discoveryengine.v1alpha.Schema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && schema_ != null + && schema_ != com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance()) { + getSchemaBuilder().mergeFrom(value); + } else { + schema_ = value; + } + } else { + schemaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + schema_ = null; + if (schemaBuilder_ != null) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.Schema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null + ? com.google.cloud.discoveryengine.v1alpha.Schema.getDefaultInstance() + : schema_; + } + } + /** + * + * + *
+     * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+     * update.
+     * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.Schema, + com.google.cloud.discoveryengine.v1alpha.Schema.Builder, + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder>( + getSchema(), getParentForChildren(), isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private boolean allowMissing_; + /** + * + * + *
+     * If set to true, and the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not found, a new
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] will be created. In
+     * this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * If set to true, and the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not found, a new
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] will be created. In
+     * this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, and the
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not found, a new
+     * [Schema][google.cloud.discoveryengine.v1alpha.Schema] will be created. In
+     * this situation, `update_mask` is ignored.
+     * 
+ * + * bool allow_missing = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + allowMissing_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) + private static final com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSchemaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaRequestOrBuilder.java new file mode 100644 index 000000000000..4e620be6c5fd --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UpdateSchemaRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/schema_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface UpdateSchemaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schema field is set. + */ + boolean hasSchema(); + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schema. + */ + com.google.cloud.discoveryengine.v1alpha.Schema getSchema(); + /** + * + * + *
+   * Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to
+   * update.
+   * 
+ * + * + * .google.cloud.discoveryengine.v1alpha.Schema schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.SchemaOrBuilder getSchemaOrBuilder(); + + /** + * + * + *
+   * If set to true, and the
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not found, a new
+   * [Schema][google.cloud.discoveryengine.v1alpha.Schema] will be created. In
+   * this situation, `update_mask` is ignored.
+   * 
+ * + * bool allow_missing = 3; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEvent.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEvent.java new file mode 100644 index 000000000000..5cf51fb9cb7d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEvent.java @@ -0,0 +1,6448 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * UserEvent captures all metadata information Discovery Engine API needs to
+ * know about how end users interact with customers' website.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UserEvent} + */ +public final class UserEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.UserEvent) + UserEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserEvent.newBuilder() to construct. + private UserEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserEvent() { + eventType_ = ""; + userPseudoId_ = ""; + sessionId_ = ""; + attributionToken_ = ""; + filter_ = ""; + documents_ = java.util.Collections.emptyList(); + tagIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 17: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UserEvent.class, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder.class); + } + + public static final int EVENT_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventType_ = ""; + /** + * + * + *
+   * Required. User event type. Allowed values are:
+   *
+   * Generic values:
+   *
+   * * `search`: Search for Documents.
+   * * `view-item`: Detailed page view of a Document.
+   * * `view-item-list`: View of a panel or ordered list of Documents.
+   * * `view-home-page`: View of the home page.
+   * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+   *
+   * Retail-related values:
+   *
+   * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+   * * `purchase`: Purchase an item(s)
+   *
+   * Media-related values:
+   *
+   * * `media-play`: Start/resume watching a video, playing a song, etc.
+   * * `media-complete`: Finished or stopped midway through a video, song, etc.
+   * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventType. + */ + @java.lang.Override + public java.lang.String getEventType() { + java.lang.Object ref = eventType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User event type. Allowed values are:
+   *
+   * Generic values:
+   *
+   * * `search`: Search for Documents.
+   * * `view-item`: Detailed page view of a Document.
+   * * `view-item-list`: View of a panel or ordered list of Documents.
+   * * `view-home-page`: View of the home page.
+   * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+   *
+   * Retail-related values:
+   *
+   * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+   * * `purchase`: Purchase an item(s)
+   *
+   * Media-related values:
+   *
+   * * `media-play`: Start/resume watching a video, playing a song, etc.
+   * * `media-complete`: Finished or stopped midway through a video, song, etc.
+   * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventTypeBytes() { + java.lang.Object ref = eventType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+   * Required. A unique identifier for tracking visitors.
+   *
+   * For example, this could be implemented with an HTTP cookie, which should be
+   * able to uniquely identify a visitor on a single device. This unique
+   * identifier should not change if the visitor log in/out of the website.
+   *
+   * Do not set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded model
+   * quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * The field should not contain PII or user-data. We recommend to use Google
+   * Analytics [Client
+   * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+   * for this field.
+   * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userPseudoId. + */ + @java.lang.Override + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A unique identifier for tracking visitors.
+   *
+   * For example, this could be implemented with an HTTP cookie, which should be
+   * able to uniquely identify a visitor on a single device. This unique
+   * identifier should not change if the visitor log in/out of the website.
+   *
+   * Do not set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded model
+   * quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * The field should not contain PII or user-data. We recommend to use Google
+   * Analytics [Client
+   * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+   * for this field.
+   * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userPseudoId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp eventTime_; + /** + * + * + *
+   * Only required for
+   * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+   * method. Timestamp of when the user event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 3; + * + * @return Whether the eventTime field is set. + */ + @java.lang.Override + public boolean hasEventTime() { + return eventTime_ != null; + } + /** + * + * + *
+   * Only required for
+   * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+   * method. Timestamp of when the user event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 3; + * + * @return The eventTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEventTime() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + /** + * + * + *
+   * Only required for
+   * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+   * method. Timestamp of when the user event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + + public static final int USER_INFO_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1alpha.UserInfo userInfo_; + /** + * + * + *
+   * Information about the end user.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + * + * @return Whether the userInfo field is set. + */ + @java.lang.Override + public boolean hasUserInfo() { + return userInfo_ != null; + } + /** + * + * + *
+   * Information about the end user.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + * + * @return The userInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfo getUserInfo() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } + /** + * + * + *
+   * Information about the end user.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder getUserInfoOrBuilder() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } + + public static final int DIRECT_USER_REQUEST_FIELD_NUMBER = 5; + private boolean directUserRequest_ = false; + /** + * + * + *
+   * Should set to true if the request is made directly from the end user, in
+   * which case the
+   * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * can be populated from the HTTP request.
+   *
+   * This flag should be set only if the API request is made directly from the
+   * end user such as a mobile app (and not if a gateway or a server is
+   * processing and pushing the user events).
+   *
+   * This should not be set when using the JavaScript tag in
+   * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent].
+   * 
+ * + * bool direct_user_request = 5; + * + * @return The directUserRequest. + */ + @java.lang.Override + public boolean getDirectUserRequest() { + return directUserRequest_; + } + + public static final int SESSION_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + /** + * + * + *
+   * A unique identifier for tracking a visitor session with a length limit of
+   * 128 bytes. A session is an aggregation of an end user behavior in a time
+   * span.
+   *
+   * A general guideline to populate the session_id:
+   *
+   * 1. If user has no activity for 30 min, a new session_id should be assigned.
+   * 2. The session_id should be unique across users, suggest use uuid or add
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * as prefix.
+   * 
+ * + * string session_id = 6; + * + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } + } + /** + * + * + *
+   * A unique identifier for tracking a visitor session with a length limit of
+   * 128 bytes. A session is an aggregation of an end user behavior in a time
+   * span.
+   *
+   * A general guideline to populate the session_id:
+   *
+   * 1. If user has no activity for 30 min, a new session_id should be assigned.
+   * 2. The session_id should be unique across users, suggest use uuid or add
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * as prefix.
+   * 
+ * + * string session_id = 6; + * + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_INFO_FIELD_NUMBER = 7; + private com.google.cloud.discoveryengine.v1alpha.PageInfo pageInfo_; + /** + * + * + *
+   * Page metadata such as categories and other critical information for certain
+   * event types such as `view-category-page`.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + * + * @return Whether the pageInfo field is set. + */ + @java.lang.Override + public boolean hasPageInfo() { + return pageInfo_ != null; + } + /** + * + * + *
+   * Page metadata such as categories and other critical information for certain
+   * event types such as `view-category-page`.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + * + * @return The pageInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PageInfo getPageInfo() { + return pageInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.PageInfo.getDefaultInstance() + : pageInfo_; + } + /** + * + * + *
+   * Page metadata such as categories and other critical information for certain
+   * event types such as `view-category-page`.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PageInfoOrBuilder getPageInfoOrBuilder() { + return pageInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.PageInfo.getDefaultInstance() + : pageInfo_; + } + + public static final int ATTRIBUTION_TOKEN_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributionToken_ = ""; + /** + * + * + *
+   * Token to attribute an API response to user action(s) to trigger the event.
+   *
+   * Highly recommended for user events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * This field enables accurate attribution of recommendation model
+   * performance.
+   *
+   * The value must be one of:
+   *
+   * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * This token enables us to accurately attribute page view or conversion
+   * completion back to the event and the particular predict response containing
+   * this clicked/purchased product. If user clicks on product K in the
+   * recommendation results, pass
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * as a URL parameter to product K's page. When recording events on product
+   * K's page, log the
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * to this field.
+   * 
+ * + * string attribution_token = 8; + * + * @return The attributionToken. + */ + @java.lang.Override + public java.lang.String getAttributionToken() { + java.lang.Object ref = attributionToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributionToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to attribute an API response to user action(s) to trigger the event.
+   *
+   * Highly recommended for user events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * This field enables accurate attribution of recommendation model
+   * performance.
+   *
+   * The value must be one of:
+   *
+   * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * This token enables us to accurately attribute page view or conversion
+   * completion back to the event and the particular predict response containing
+   * this clicked/purchased product. If user clicks on product K in the
+   * recommendation results, pass
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * as a URL parameter to product K's page. When recording events on product
+   * K's page, log the
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * to this field.
+   * 
+ * + * string attribution_token = 8; + * + * @return The bytes for attributionToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributionTokenBytes() { + java.lang.Object ref = attributionToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered.
+   *
+   * One example is for `search` events, the associated
+   * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+   * contain a filter expression in
+   * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+   * conforming to https://google.aip.dev/160#filtering.
+   *
+   * Similarly, for `view-item-list` events that are generated from a
+   * [RecommendationService.RecommendRequest][], this field may be populated
+   * directly from [RecommendationService.RecommendRequest.filter][] conforming
+   * to https://google.aip.dev/160#filtering.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string filter = 9; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered.
+   *
+   * One example is for `search` events, the associated
+   * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+   * contain a filter expression in
+   * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+   * conforming to https://google.aip.dev/160#filtering.
+   *
+   * Similarly, for `view-item-list` events that are generated from a
+   * [RecommendationService.RecommendRequest][], this field may be populated
+   * directly from [RecommendationService.RecommendRequest.filter][] conforming
+   * to https://google.aip.dev/160#filtering.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string filter = 9; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENTS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List documents_; + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + @java.lang.Override + public java.util.List getDocumentsList() { + return documents_; + } + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + @java.lang.Override + public java.util.List + getDocumentsOrBuilderList() { + return documents_; + } + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + @java.lang.Override + public int getDocumentsCount() { + return documents_.size(); + } + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo getDocuments(int index) { + return documents_.get(index); + } + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.DocumentInfoOrBuilder getDocumentsOrBuilder( + int index) { + return documents_.get(index); + } + + public static final int PANEL_FIELD_NUMBER = 11; + private com.google.cloud.discoveryengine.v1alpha.PanelInfo panel_; + /** + * + * + *
+   * Panel metadata associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + * + * @return Whether the panel field is set. + */ + @java.lang.Override + public boolean hasPanel() { + return panel_ != null; + } + /** + * + * + *
+   * Panel metadata associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + * + * @return The panel. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PanelInfo getPanel() { + return panel_ == null + ? com.google.cloud.discoveryengine.v1alpha.PanelInfo.getDefaultInstance() + : panel_; + } + /** + * + * + *
+   * Panel metadata associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.PanelInfoOrBuilder getPanelOrBuilder() { + return panel_ == null + ? com.google.cloud.discoveryengine.v1alpha.PanelInfo.getDefaultInstance() + : panel_; + } + + public static final int SEARCH_INFO_FIELD_NUMBER = 12; + private com.google.cloud.discoveryengine.v1alpha.SearchInfo searchInfo_; + /** + * + * + *
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * details related to the event.
+   *
+   * This field should be set for `search` event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + * + * @return Whether the searchInfo field is set. + */ + @java.lang.Override + public boolean hasSearchInfo() { + return searchInfo_ != null; + } + /** + * + * + *
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * details related to the event.
+   *
+   * This field should be set for `search` event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + * + * @return The searchInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchInfo getSearchInfo() { + return searchInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchInfo.getDefaultInstance() + : searchInfo_; + } + /** + * + * + *
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * details related to the event.
+   *
+   * This field should be set for `search` event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.SearchInfoOrBuilder getSearchInfoOrBuilder() { + return searchInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchInfo.getDefaultInstance() + : searchInfo_; + } + + public static final int COMPLETION_INFO_FIELD_NUMBER = 13; + private com.google.cloud.discoveryengine.v1alpha.CompletionInfo completionInfo_; + /** + * + * + *
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * details related to the event.
+   *
+   * This field should be set for `search` event when autocomplete function is
+   * enabled and the user clicks a suggestion for search.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + * + * @return Whether the completionInfo field is set. + */ + @java.lang.Override + public boolean hasCompletionInfo() { + return completionInfo_ != null; + } + /** + * + * + *
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * details related to the event.
+   *
+   * This field should be set for `search` event when autocomplete function is
+   * enabled and the user clicks a suggestion for search.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + * + * @return The completionInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompletionInfo getCompletionInfo() { + return completionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.CompletionInfo.getDefaultInstance() + : completionInfo_; + } + /** + * + * + *
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * details related to the event.
+   *
+   * This field should be set for `search` event when autocomplete function is
+   * enabled and the user clicks a suggestion for search.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CompletionInfoOrBuilder + getCompletionInfoOrBuilder() { + return completionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.CompletionInfo.getDefaultInstance() + : completionInfo_; + } + + public static final int TRANSACTION_INFO_FIELD_NUMBER = 14; + private com.google.cloud.discoveryengine.v1alpha.TransactionInfo transactionInfo_; + /** + * + * + *
+   * The transaction metadata (if any) associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + * + * @return Whether the transactionInfo field is set. + */ + @java.lang.Override + public boolean hasTransactionInfo() { + return transactionInfo_ != null; + } + /** + * + * + *
+   * The transaction metadata (if any) associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + * + * @return The transactionInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TransactionInfo getTransactionInfo() { + return transactionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.TransactionInfo.getDefaultInstance() + : transactionInfo_; + } + /** + * + * + *
+   * The transaction metadata (if any) associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.TransactionInfoOrBuilder + getTransactionInfoOrBuilder() { + return transactionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.TransactionInfo.getDefaultInstance() + : transactionInfo_; + } + + public static final int TAG_IDS_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tagIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @return A list containing the tagIds. + */ + public com.google.protobuf.ProtocolStringList getTagIdsList() { + return tagIds_; + } + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @return The count of tagIds. + */ + public int getTagIdsCount() { + return tagIds_.size(); + } + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @param index The index of the element to return. + * @return The tagIds at the given index. + */ + public java.lang.String getTagIds(int index) { + return tagIds_.get(index); + } + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @param index The index of the value to return. + * @return The bytes of the tagIds at the given index. + */ + public com.google.protobuf.ByteString getTagIdsBytes(int index) { + return tagIds_.getByteString(index); + } + + public static final int PROMOTION_IDS_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList promotionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @return A list containing the promotionIds. + */ + public com.google.protobuf.ProtocolStringList getPromotionIdsList() { + return promotionIds_; + } + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @return The count of promotionIds. + */ + public int getPromotionIdsCount() { + return promotionIds_.size(); + } + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @param index The index of the element to return. + * @return The promotionIds at the given index. + */ + public java.lang.String getPromotionIds(int index) { + return promotionIds_.get(index); + } + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @param index The index of the value to return. + * @return The bytes of the promotionIds at the given index. + */ + public com.google.protobuf.ByteString getPromotionIdsBytes(int index) { + return promotionIds_.getByteString(index); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 17; + + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.discoveryengine.v1alpha.CustomAttribute + .getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + attributes_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public java.util.Map + getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1alpha.CustomAttribute + getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.CustomAttribute defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CustomAttribute getAttributesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MEDIA_INFO_FIELD_NUMBER = 18; + private com.google.cloud.discoveryengine.v1alpha.MediaInfo mediaInfo_; + /** + * + * + *
+   * Media-specific info.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + * + * @return Whether the mediaInfo field is set. + */ + @java.lang.Override + public boolean hasMediaInfo() { + return mediaInfo_ != null; + } + /** + * + * + *
+   * Media-specific info.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + * + * @return The mediaInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.MediaInfo getMediaInfo() { + return mediaInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.MediaInfo.getDefaultInstance() + : mediaInfo_; + } + /** + * + * + *
+   * Media-specific info.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.MediaInfoOrBuilder getMediaInfoOrBuilder() { + return mediaInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.MediaInfo.getDefaultInstance() + : mediaInfo_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, eventType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userPseudoId_); + } + if (eventTime_ != null) { + output.writeMessage(3, getEventTime()); + } + if (userInfo_ != null) { + output.writeMessage(4, getUserInfo()); + } + if (directUserRequest_ != false) { + output.writeBool(5, directUserRequest_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sessionId_); + } + if (pageInfo_ != null) { + output.writeMessage(7, getPageInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributionToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, attributionToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, filter_); + } + for (int i = 0; i < documents_.size(); i++) { + output.writeMessage(10, documents_.get(i)); + } + if (panel_ != null) { + output.writeMessage(11, getPanel()); + } + if (searchInfo_ != null) { + output.writeMessage(12, getSearchInfo()); + } + if (completionInfo_ != null) { + output.writeMessage(13, getCompletionInfo()); + } + if (transactionInfo_ != null) { + output.writeMessage(14, getTransactionInfo()); + } + for (int i = 0; i < tagIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, tagIds_.getRaw(i)); + } + for (int i = 0; i < promotionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, promotionIds_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 17); + if (mediaInfo_ != null) { + output.writeMessage(18, getMediaInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, eventType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userPseudoId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userPseudoId_); + } + if (eventTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEventTime()); + } + if (userInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUserInfo()); + } + if (directUserRequest_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, directUserRequest_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sessionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sessionId_); + } + if (pageInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPageInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributionToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, attributionToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, filter_); + } + for (int i = 0; i < documents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, documents_.get(i)); + } + if (panel_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getPanel()); + } + if (searchInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getSearchInfo()); + } + if (completionInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCompletionInfo()); + } + if (transactionInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTransactionInfo()); + } + { + int dataSize = 0; + for (int i = 0; i < tagIds_.size(); i++) { + dataSize += computeStringSizeNoTag(tagIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < promotionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(promotionIds_.getRaw(i)); + } + size += dataSize; + size += 2 * getPromotionIdsList().size(); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + entry : internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + attributes__ = + AttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, attributes__); + } + if (mediaInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getMediaInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.UserEvent)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.UserEvent other = + (com.google.cloud.discoveryengine.v1alpha.UserEvent) obj; + + if (!getEventType().equals(other.getEventType())) return false; + if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; + if (hasEventTime() != other.hasEventTime()) return false; + if (hasEventTime()) { + if (!getEventTime().equals(other.getEventTime())) return false; + } + if (hasUserInfo() != other.hasUserInfo()) return false; + if (hasUserInfo()) { + if (!getUserInfo().equals(other.getUserInfo())) return false; + } + if (getDirectUserRequest() != other.getDirectUserRequest()) return false; + if (!getSessionId().equals(other.getSessionId())) return false; + if (hasPageInfo() != other.hasPageInfo()) return false; + if (hasPageInfo()) { + if (!getPageInfo().equals(other.getPageInfo())) return false; + } + if (!getAttributionToken().equals(other.getAttributionToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getDocumentsList().equals(other.getDocumentsList())) return false; + if (hasPanel() != other.hasPanel()) return false; + if (hasPanel()) { + if (!getPanel().equals(other.getPanel())) return false; + } + if (hasSearchInfo() != other.hasSearchInfo()) return false; + if (hasSearchInfo()) { + if (!getSearchInfo().equals(other.getSearchInfo())) return false; + } + if (hasCompletionInfo() != other.hasCompletionInfo()) return false; + if (hasCompletionInfo()) { + if (!getCompletionInfo().equals(other.getCompletionInfo())) return false; + } + if (hasTransactionInfo() != other.hasTransactionInfo()) return false; + if (hasTransactionInfo()) { + if (!getTransactionInfo().equals(other.getTransactionInfo())) return false; + } + if (!getTagIdsList().equals(other.getTagIdsList())) return false; + if (!getPromotionIdsList().equals(other.getPromotionIdsList())) return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; + if (hasMediaInfo() != other.hasMediaInfo()) return false; + if (hasMediaInfo()) { + if (!getMediaInfo().equals(other.getMediaInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEventType().hashCode(); + hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserPseudoId().hashCode(); + if (hasEventTime()) { + hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEventTime().hashCode(); + } + if (hasUserInfo()) { + hash = (37 * hash) + USER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUserInfo().hashCode(); + } + hash = (37 * hash) + DIRECT_USER_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDirectUserRequest()); + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); + if (hasPageInfo()) { + hash = (37 * hash) + PAGE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPageInfo().hashCode(); + } + hash = (37 * hash) + ATTRIBUTION_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAttributionToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + if (getDocumentsCount() > 0) { + hash = (37 * hash) + DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getDocumentsList().hashCode(); + } + if (hasPanel()) { + hash = (37 * hash) + PANEL_FIELD_NUMBER; + hash = (53 * hash) + getPanel().hashCode(); + } + if (hasSearchInfo()) { + hash = (37 * hash) + SEARCH_INFO_FIELD_NUMBER; + hash = (53 * hash) + getSearchInfo().hashCode(); + } + if (hasCompletionInfo()) { + hash = (37 * hash) + COMPLETION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCompletionInfo().hashCode(); + } + if (hasTransactionInfo()) { + hash = (37 * hash) + TRANSACTION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getTransactionInfo().hashCode(); + } + if (getTagIdsCount() > 0) { + hash = (37 * hash) + TAG_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTagIdsList().hashCode(); + } + if (getPromotionIdsCount() > 0) { + hash = (37 * hash) + PROMOTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getPromotionIdsList().hashCode(); + } + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + if (hasMediaInfo()) { + hash = (37 * hash) + MEDIA_INFO_FIELD_NUMBER; + hash = (53 * hash) + getMediaInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.UserEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * UserEvent captures all metadata information Discovery Engine API needs to
+   * know about how end users interact with customers' website.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UserEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.UserEvent) + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 17: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 17: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UserEvent.class, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.UserEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + eventType_ = ""; + userPseudoId_ = ""; + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + directUserRequest_ = false; + sessionId_ = ""; + pageInfo_ = null; + if (pageInfoBuilder_ != null) { + pageInfoBuilder_.dispose(); + pageInfoBuilder_ = null; + } + attributionToken_ = ""; + filter_ = ""; + if (documentsBuilder_ == null) { + documents_ = java.util.Collections.emptyList(); + } else { + documents_ = null; + documentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + panel_ = null; + if (panelBuilder_ != null) { + panelBuilder_.dispose(); + panelBuilder_ = null; + } + searchInfo_ = null; + if (searchInfoBuilder_ != null) { + searchInfoBuilder_.dispose(); + searchInfoBuilder_ = null; + } + completionInfo_ = null; + if (completionInfoBuilder_ != null) { + completionInfoBuilder_.dispose(); + completionInfoBuilder_ = null; + } + transactionInfo_ = null; + if (transactionInfoBuilder_ != null) { + transactionInfoBuilder_.dispose(); + transactionInfoBuilder_ = null; + } + tagIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + internalGetMutableAttributes().clear(); + mediaInfo_ = null; + if (mediaInfoBuilder_ != null) { + mediaInfoBuilder_.dispose(); + mediaInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEvent getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEvent build() { + com.google.cloud.discoveryengine.v1alpha.UserEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEvent buildPartial() { + com.google.cloud.discoveryengine.v1alpha.UserEvent result = + new com.google.cloud.discoveryengine.v1alpha.UserEvent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1alpha.UserEvent result) { + if (documentsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + documents_ = java.util.Collections.unmodifiableList(documents_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.documents_ = documents_; + } else { + result.documents_ = documentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.UserEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.eventType_ = eventType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userPseudoId_ = userPseudoId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.eventTime_ = eventTimeBuilder_ == null ? eventTime_ : eventTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.directUserRequest_ = directUserRequest_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sessionId_ = sessionId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pageInfo_ = pageInfoBuilder_ == null ? pageInfo_ : pageInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.attributionToken_ = attributionToken_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.panel_ = panelBuilder_ == null ? panel_ : panelBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.searchInfo_ = searchInfoBuilder_ == null ? searchInfo_ : searchInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.completionInfo_ = + completionInfoBuilder_ == null ? completionInfo_ : completionInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.transactionInfo_ = + transactionInfoBuilder_ == null ? transactionInfo_ : transactionInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + tagIds_.makeImmutable(); + result.tagIds_ = tagIds_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + promotionIds_.makeImmutable(); + result.promotionIds_ = promotionIds_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.mediaInfo_ = mediaInfoBuilder_ == null ? mediaInfo_ : mediaInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.UserEvent) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.UserEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.UserEvent other) { + if (other == com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance()) + return this; + if (!other.getEventType().isEmpty()) { + eventType_ = other.eventType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserPseudoId().isEmpty()) { + userPseudoId_ = other.userPseudoId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasEventTime()) { + mergeEventTime(other.getEventTime()); + } + if (other.hasUserInfo()) { + mergeUserInfo(other.getUserInfo()); + } + if (other.getDirectUserRequest() != false) { + setDirectUserRequest(other.getDirectUserRequest()); + } + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasPageInfo()) { + mergePageInfo(other.getPageInfo()); + } + if (!other.getAttributionToken().isEmpty()) { + attributionToken_ = other.attributionToken_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (documentsBuilder_ == null) { + if (!other.documents_.isEmpty()) { + if (documents_.isEmpty()) { + documents_ = other.documents_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureDocumentsIsMutable(); + documents_.addAll(other.documents_); + } + onChanged(); + } + } else { + if (!other.documents_.isEmpty()) { + if (documentsBuilder_.isEmpty()) { + documentsBuilder_.dispose(); + documentsBuilder_ = null; + documents_ = other.documents_; + bitField0_ = (bitField0_ & ~0x00000200); + documentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDocumentsFieldBuilder() + : null; + } else { + documentsBuilder_.addAllMessages(other.documents_); + } + } + } + if (other.hasPanel()) { + mergePanel(other.getPanel()); + } + if (other.hasSearchInfo()) { + mergeSearchInfo(other.getSearchInfo()); + } + if (other.hasCompletionInfo()) { + mergeCompletionInfo(other.getCompletionInfo()); + } + if (other.hasTransactionInfo()) { + mergeTransactionInfo(other.getTransactionInfo()); + } + if (!other.tagIds_.isEmpty()) { + if (tagIds_.isEmpty()) { + tagIds_ = other.tagIds_; + bitField0_ |= 0x00004000; + } else { + ensureTagIdsIsMutable(); + tagIds_.addAll(other.tagIds_); + } + onChanged(); + } + if (!other.promotionIds_.isEmpty()) { + if (promotionIds_.isEmpty()) { + promotionIds_ = other.promotionIds_; + bitField0_ |= 0x00008000; + } else { + ensurePromotionIdsIsMutable(); + promotionIds_.addAll(other.promotionIds_); + } + onChanged(); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00010000; + if (other.hasMediaInfo()) { + mergeMediaInfo(other.getMediaInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + eventType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + userPseudoId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEventTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + directUserRequest_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getPageInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + attributionToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + com.google.cloud.discoveryengine.v1alpha.DocumentInfo m = + input.readMessage( + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.parser(), + extensionRegistry); + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(m); + } else { + documentsBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + input.readMessage(getPanelFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + input.readMessage(getSearchInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + input.readMessage(getCompletionInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + input.readMessage(getTransactionInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagIdsIsMutable(); + tagIds_.add(s); + break; + } // case 122 + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePromotionIdsIsMutable(); + promotionIds_.add(s); + break; + } // case 130 + case 138: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: + { + input.readMessage(getMediaInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object eventType_ = ""; + /** + * + * + *
+     * Required. User event type. Allowed values are:
+     *
+     * Generic values:
+     *
+     * * `search`: Search for Documents.
+     * * `view-item`: Detailed page view of a Document.
+     * * `view-item-list`: View of a panel or ordered list of Documents.
+     * * `view-home-page`: View of the home page.
+     * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+     *
+     * Retail-related values:
+     *
+     * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+     * * `purchase`: Purchase an item(s)
+     *
+     * Media-related values:
+     *
+     * * `media-play`: Start/resume watching a video, playing a song, etc.
+     * * `media-complete`: Finished or stopped midway through a video, song, etc.
+     * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventType. + */ + public java.lang.String getEventType() { + java.lang.Object ref = eventType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User event type. Allowed values are:
+     *
+     * Generic values:
+     *
+     * * `search`: Search for Documents.
+     * * `view-item`: Detailed page view of a Document.
+     * * `view-item-list`: View of a panel or ordered list of Documents.
+     * * `view-home-page`: View of the home page.
+     * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+     *
+     * Retail-related values:
+     *
+     * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+     * * `purchase`: Purchase an item(s)
+     *
+     * Media-related values:
+     *
+     * * `media-play`: Start/resume watching a video, playing a song, etc.
+     * * `media-complete`: Finished or stopped midway through a video, song, etc.
+     * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventType. + */ + public com.google.protobuf.ByteString getEventTypeBytes() { + java.lang.Object ref = eventType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User event type. Allowed values are:
+     *
+     * Generic values:
+     *
+     * * `search`: Search for Documents.
+     * * `view-item`: Detailed page view of a Document.
+     * * `view-item-list`: View of a panel or ordered list of Documents.
+     * * `view-home-page`: View of the home page.
+     * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+     *
+     * Retail-related values:
+     *
+     * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+     * * `purchase`: Purchase an item(s)
+     *
+     * Media-related values:
+     *
+     * * `media-play`: Start/resume watching a video, playing a song, etc.
+     * * `media-complete`: Finished or stopped midway through a video, song, etc.
+     * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The eventType to set. + * @return This builder for chaining. + */ + public Builder setEventType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User event type. Allowed values are:
+     *
+     * Generic values:
+     *
+     * * `search`: Search for Documents.
+     * * `view-item`: Detailed page view of a Document.
+     * * `view-item-list`: View of a panel or ordered list of Documents.
+     * * `view-home-page`: View of the home page.
+     * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+     *
+     * Retail-related values:
+     *
+     * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+     * * `purchase`: Purchase an item(s)
+     *
+     * Media-related values:
+     *
+     * * `media-play`: Start/resume watching a video, playing a song, etc.
+     * * `media-complete`: Finished or stopped midway through a video, song, etc.
+     * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEventType() { + eventType_ = getDefaultInstance().getEventType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User event type. Allowed values are:
+     *
+     * Generic values:
+     *
+     * * `search`: Search for Documents.
+     * * `view-item`: Detailed page view of a Document.
+     * * `view-item-list`: View of a panel or ordered list of Documents.
+     * * `view-home-page`: View of the home page.
+     * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+     *
+     * Retail-related values:
+     *
+     * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+     * * `purchase`: Purchase an item(s)
+     *
+     * Media-related values:
+     *
+     * * `media-play`: Start/resume watching a video, playing a song, etc.
+     * * `media-complete`: Finished or stopped midway through a video, song, etc.
+     * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for eventType to set. + * @return This builder for chaining. + */ + public Builder setEventTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userPseudoId_ = ""; + /** + * + * + *
+     * Required. A unique identifier for tracking visitors.
+     *
+     * For example, this could be implemented with an HTTP cookie, which should be
+     * able to uniquely identify a visitor on a single device. This unique
+     * identifier should not change if the visitor log in/out of the website.
+     *
+     * Do not set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded model
+     * quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * The field should not contain PII or user-data. We recommend to use Google
+     * Analytics [Client
+     * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+     * for this field.
+     * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userPseudoId. + */ + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A unique identifier for tracking visitors.
+     *
+     * For example, this could be implemented with an HTTP cookie, which should be
+     * able to uniquely identify a visitor on a single device. This unique
+     * identifier should not change if the visitor log in/out of the website.
+     *
+     * Do not set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded model
+     * quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * The field should not contain PII or user-data. We recommend to use Google
+     * Analytics [Client
+     * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+     * for this field.
+     * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userPseudoId. + */ + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A unique identifier for tracking visitors.
+     *
+     * For example, this could be implemented with an HTTP cookie, which should be
+     * able to uniquely identify a visitor on a single device. This unique
+     * identifier should not change if the visitor log in/out of the website.
+     *
+     * Do not set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded model
+     * quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * The field should not contain PII or user-data. We recommend to use Google
+     * Analytics [Client
+     * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+     * for this field.
+     * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPseudoId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique identifier for tracking visitors.
+     *
+     * For example, this could be implemented with an HTTP cookie, which should be
+     * able to uniquely identify a visitor on a single device. This unique
+     * identifier should not change if the visitor log in/out of the website.
+     *
+     * Do not set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded model
+     * quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * The field should not contain PII or user-data. We recommend to use Google
+     * Analytics [Client
+     * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+     * for this field.
+     * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUserPseudoId() { + userPseudoId_ = getDefaultInstance().getUserPseudoId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique identifier for tracking visitors.
+     *
+     * For example, this could be implemented with an HTTP cookie, which should be
+     * able to uniquely identify a visitor on a single device. This unique
+     * identifier should not change if the visitor log in/out of the website.
+     *
+     * Do not set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded model
+     * quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * The field should not contain PII or user-data. We recommend to use Google
+     * Analytics [Client
+     * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+     * for this field.
+     * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPseudoId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp eventTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + eventTimeBuilder_; + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + * + * @return Whether the eventTime field is set. + */ + public boolean hasEventTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + * + * @return The eventTime. + */ + public com.google.protobuf.Timestamp getEventTime() { + if (eventTimeBuilder_ == null) { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } else { + return eventTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + public Builder setEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventTime_ = value; + } else { + eventTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (eventTimeBuilder_ == null) { + eventTime_ = builderForValue.build(); + } else { + eventTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + public Builder mergeEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && eventTime_ != null + && eventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEventTimeBuilder().mergeFrom(value); + } else { + eventTime_ = value; + } + } else { + eventTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + public Builder clearEventTime() { + bitField0_ = (bitField0_ & ~0x00000004); + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEventTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + if (eventTimeBuilder_ != null) { + return eventTimeBuilder_.getMessageOrBuilder(); + } else { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + } + /** + * + * + *
+     * Only required for
+     * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+     * method. Timestamp of when the user event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEventTimeFieldBuilder() { + if (eventTimeBuilder_ == null) { + eventTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEventTime(), getParentForChildren(), isClean()); + eventTime_ = null; + } + return eventTimeBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.UserInfo userInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserInfo, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder> + userInfoBuilder_; + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + * + * @return Whether the userInfo field is set. + */ + public boolean hasUserInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + * + * @return The userInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.UserInfo getUserInfo() { + if (userInfoBuilder_ == null) { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } else { + return userInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + public Builder setUserInfo(com.google.cloud.discoveryengine.v1alpha.UserInfo value) { + if (userInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInfo_ = value; + } else { + userInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + public Builder setUserInfo( + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder builderForValue) { + if (userInfoBuilder_ == null) { + userInfo_ = builderForValue.build(); + } else { + userInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1alpha.UserInfo value) { + if (userInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && userInfo_ != null + && userInfo_ + != com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance()) { + getUserInfoBuilder().mergeFrom(value); + } else { + userInfo_ = value; + } + } else { + userInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + public Builder clearUserInfo() { + bitField0_ = (bitField0_ & ~0x00000008); + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder getUserInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUserInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + public com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder getUserInfoOrBuilder() { + if (userInfoBuilder_ != null) { + return userInfoBuilder_.getMessageOrBuilder(); + } else { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance() + : userInfo_; + } + } + /** + * + * + *
+     * Information about the end user.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserInfo, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder> + getUserInfoFieldBuilder() { + if (userInfoBuilder_ == null) { + userInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserInfo, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder>( + getUserInfo(), getParentForChildren(), isClean()); + userInfo_ = null; + } + return userInfoBuilder_; + } + + private boolean directUserRequest_; + /** + * + * + *
+     * Should set to true if the request is made directly from the end user, in
+     * which case the
+     * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * can be populated from the HTTP request.
+     *
+     * This flag should be set only if the API request is made directly from the
+     * end user such as a mobile app (and not if a gateway or a server is
+     * processing and pushing the user events).
+     *
+     * This should not be set when using the JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent].
+     * 
+ * + * bool direct_user_request = 5; + * + * @return The directUserRequest. + */ + @java.lang.Override + public boolean getDirectUserRequest() { + return directUserRequest_; + } + /** + * + * + *
+     * Should set to true if the request is made directly from the end user, in
+     * which case the
+     * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * can be populated from the HTTP request.
+     *
+     * This flag should be set only if the API request is made directly from the
+     * end user such as a mobile app (and not if a gateway or a server is
+     * processing and pushing the user events).
+     *
+     * This should not be set when using the JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent].
+     * 
+ * + * bool direct_user_request = 5; + * + * @param value The directUserRequest to set. + * @return This builder for chaining. + */ + public Builder setDirectUserRequest(boolean value) { + + directUserRequest_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Should set to true if the request is made directly from the end user, in
+     * which case the
+     * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+     * can be populated from the HTTP request.
+     *
+     * This flag should be set only if the API request is made directly from the
+     * end user such as a mobile app (and not if a gateway or a server is
+     * processing and pushing the user events).
+     *
+     * This should not be set when using the JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent].
+     * 
+ * + * bool direct_user_request = 5; + * + * @return This builder for chaining. + */ + public Builder clearDirectUserRequest() { + bitField0_ = (bitField0_ & ~0x00000010); + directUserRequest_ = false; + onChanged(); + return this; + } + + private java.lang.Object sessionId_ = ""; + /** + * + * + *
+     * A unique identifier for tracking a visitor session with a length limit of
+     * 128 bytes. A session is an aggregation of an end user behavior in a time
+     * span.
+     *
+     * A general guideline to populate the session_id:
+     *
+     * 1. If user has no activity for 30 min, a new session_id should be assigned.
+     * 2. The session_id should be unique across users, suggest use uuid or add
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * as prefix.
+     * 
+ * + * string session_id = 6; + * + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking a visitor session with a length limit of
+     * 128 bytes. A session is an aggregation of an end user behavior in a time
+     * span.
+     *
+     * A general guideline to populate the session_id:
+     *
+     * 1. If user has no activity for 30 min, a new session_id should be assigned.
+     * 2. The session_id should be unique across users, suggest use uuid or add
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * as prefix.
+     * 
+ * + * string session_id = 6; + * + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique identifier for tracking a visitor session with a length limit of
+     * 128 bytes. A session is an aggregation of an end user behavior in a time
+     * span.
+     *
+     * A general guideline to populate the session_id:
+     *
+     * 1. If user has no activity for 30 min, a new session_id should be assigned.
+     * 2. The session_id should be unique across users, suggest use uuid or add
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * as prefix.
+     * 
+ * + * string session_id = 6; + * + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sessionId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking a visitor session with a length limit of
+     * 128 bytes. A session is an aggregation of an end user behavior in a time
+     * span.
+     *
+     * A general guideline to populate the session_id:
+     *
+     * 1. If user has no activity for 30 min, a new session_id should be assigned.
+     * 2. The session_id should be unique across users, suggest use uuid or add
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * as prefix.
+     * 
+ * + * string session_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique identifier for tracking a visitor session with a length limit of
+     * 128 bytes. A session is an aggregation of an end user behavior in a time
+     * span.
+     *
+     * A general guideline to populate the session_id:
+     *
+     * 1. If user has no activity for 30 min, a new session_id should be assigned.
+     * 2. The session_id should be unique across users, suggest use uuid or add
+     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+     * as prefix.
+     * 
+ * + * string session_id = 6; + * + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.PageInfo pageInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.PageInfo, + com.google.cloud.discoveryengine.v1alpha.PageInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.PageInfoOrBuilder> + pageInfoBuilder_; + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + * + * @return Whether the pageInfo field is set. + */ + public boolean hasPageInfo() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + * + * @return The pageInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.PageInfo getPageInfo() { + if (pageInfoBuilder_ == null) { + return pageInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.PageInfo.getDefaultInstance() + : pageInfo_; + } else { + return pageInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + public Builder setPageInfo(com.google.cloud.discoveryengine.v1alpha.PageInfo value) { + if (pageInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageInfo_ = value; + } else { + pageInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + public Builder setPageInfo( + com.google.cloud.discoveryengine.v1alpha.PageInfo.Builder builderForValue) { + if (pageInfoBuilder_ == null) { + pageInfo_ = builderForValue.build(); + } else { + pageInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + public Builder mergePageInfo(com.google.cloud.discoveryengine.v1alpha.PageInfo value) { + if (pageInfoBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && pageInfo_ != null + && pageInfo_ + != com.google.cloud.discoveryengine.v1alpha.PageInfo.getDefaultInstance()) { + getPageInfoBuilder().mergeFrom(value); + } else { + pageInfo_ = value; + } + } else { + pageInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + public Builder clearPageInfo() { + bitField0_ = (bitField0_ & ~0x00000040); + pageInfo_ = null; + if (pageInfoBuilder_ != null) { + pageInfoBuilder_.dispose(); + pageInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + public com.google.cloud.discoveryengine.v1alpha.PageInfo.Builder getPageInfoBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getPageInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + public com.google.cloud.discoveryengine.v1alpha.PageInfoOrBuilder getPageInfoOrBuilder() { + if (pageInfoBuilder_ != null) { + return pageInfoBuilder_.getMessageOrBuilder(); + } else { + return pageInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.PageInfo.getDefaultInstance() + : pageInfo_; + } + } + /** + * + * + *
+     * Page metadata such as categories and other critical information for certain
+     * event types such as `view-category-page`.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.PageInfo, + com.google.cloud.discoveryengine.v1alpha.PageInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.PageInfoOrBuilder> + getPageInfoFieldBuilder() { + if (pageInfoBuilder_ == null) { + pageInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.PageInfo, + com.google.cloud.discoveryengine.v1alpha.PageInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.PageInfoOrBuilder>( + getPageInfo(), getParentForChildren(), isClean()); + pageInfo_ = null; + } + return pageInfoBuilder_; + } + + private java.lang.Object attributionToken_ = ""; + /** + * + * + *
+     * Token to attribute an API response to user action(s) to trigger the event.
+     *
+     * Highly recommended for user events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * This field enables accurate attribution of recommendation model
+     * performance.
+     *
+     * The value must be one of:
+     *
+     * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * This token enables us to accurately attribute page view or conversion
+     * completion back to the event and the particular predict response containing
+     * this clicked/purchased product. If user clicks on product K in the
+     * recommendation results, pass
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * as a URL parameter to product K's page. When recording events on product
+     * K's page, log the
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * to this field.
+     * 
+ * + * string attribution_token = 8; + * + * @return The attributionToken. + */ + public java.lang.String getAttributionToken() { + java.lang.Object ref = attributionToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributionToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to attribute an API response to user action(s) to trigger the event.
+     *
+     * Highly recommended for user events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * This field enables accurate attribution of recommendation model
+     * performance.
+     *
+     * The value must be one of:
+     *
+     * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * This token enables us to accurately attribute page view or conversion
+     * completion back to the event and the particular predict response containing
+     * this clicked/purchased product. If user clicks on product K in the
+     * recommendation results, pass
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * as a URL parameter to product K's page. When recording events on product
+     * K's page, log the
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * to this field.
+     * 
+ * + * string attribution_token = 8; + * + * @return The bytes for attributionToken. + */ + public com.google.protobuf.ByteString getAttributionTokenBytes() { + java.lang.Object ref = attributionToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to attribute an API response to user action(s) to trigger the event.
+     *
+     * Highly recommended for user events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * This field enables accurate attribution of recommendation model
+     * performance.
+     *
+     * The value must be one of:
+     *
+     * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * This token enables us to accurately attribute page view or conversion
+     * completion back to the event and the particular predict response containing
+     * this clicked/purchased product. If user clicks on product K in the
+     * recommendation results, pass
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * as a URL parameter to product K's page. When recording events on product
+     * K's page, log the
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * to this field.
+     * 
+ * + * string attribution_token = 8; + * + * @param value The attributionToken to set. + * @return This builder for chaining. + */ + public Builder setAttributionToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributionToken_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to attribute an API response to user action(s) to trigger the event.
+     *
+     * Highly recommended for user events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * This field enables accurate attribution of recommendation model
+     * performance.
+     *
+     * The value must be one of:
+     *
+     * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * This token enables us to accurately attribute page view or conversion
+     * completion back to the event and the particular predict response containing
+     * this clicked/purchased product. If user clicks on product K in the
+     * recommendation results, pass
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * as a URL parameter to product K's page. When recording events on product
+     * K's page, log the
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * to this field.
+     * 
+ * + * string attribution_token = 8; + * + * @return This builder for chaining. + */ + public Builder clearAttributionToken() { + attributionToken_ = getDefaultInstance().getAttributionToken(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to attribute an API response to user action(s) to trigger the event.
+     *
+     * Highly recommended for user events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * This field enables accurate attribution of recommendation model
+     * performance.
+     *
+     * The value must be one of:
+     *
+     * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+     * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+     * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+     *
+     * This token enables us to accurately attribute page view or conversion
+     * completion back to the event and the particular predict response containing
+     * this clicked/purchased product. If user clicks on product K in the
+     * recommendation results, pass
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * as a URL parameter to product K's page. When recording events on product
+     * K's page, log the
+     * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+     * to this field.
+     * 
+ * + * string attribution_token = 8; + * + * @param value The bytes for attributionToken to set. + * @return This builder for chaining. + */ + public Builder setAttributionTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributionToken_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered.
+     *
+     * One example is for `search` events, the associated
+     * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+     * contain a filter expression in
+     * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+     * conforming to https://google.aip.dev/160#filtering.
+     *
+     * Similarly, for `view-item-list` events that are generated from a
+     * [RecommendationService.RecommendRequest][], this field may be populated
+     * directly from [RecommendationService.RecommendRequest.filter][] conforming
+     * to https://google.aip.dev/160#filtering.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string filter = 9; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered.
+     *
+     * One example is for `search` events, the associated
+     * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+     * contain a filter expression in
+     * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+     * conforming to https://google.aip.dev/160#filtering.
+     *
+     * Similarly, for `view-item-list` events that are generated from a
+     * [RecommendationService.RecommendRequest][], this field may be populated
+     * directly from [RecommendationService.RecommendRequest.filter][] conforming
+     * to https://google.aip.dev/160#filtering.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string filter = 9; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered.
+     *
+     * One example is for `search` events, the associated
+     * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+     * contain a filter expression in
+     * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+     * conforming to https://google.aip.dev/160#filtering.
+     *
+     * Similarly, for `view-item-list` events that are generated from a
+     * [RecommendationService.RecommendRequest][], this field may be populated
+     * directly from [RecommendationService.RecommendRequest.filter][] conforming
+     * to https://google.aip.dev/160#filtering.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string filter = 9; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered.
+     *
+     * One example is for `search` events, the associated
+     * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+     * contain a filter expression in
+     * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+     * conforming to https://google.aip.dev/160#filtering.
+     *
+     * Similarly, for `view-item-list` events that are generated from a
+     * [RecommendationService.RecommendRequest][], this field may be populated
+     * directly from [RecommendationService.RecommendRequest.filter][] conforming
+     * to https://google.aip.dev/160#filtering.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string filter = 9; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter syntax consists of an expression language for constructing a
+     * predicate from one or more fields of the documents being filtered.
+     *
+     * One example is for `search` events, the associated
+     * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+     * contain a filter expression in
+     * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+     * conforming to https://google.aip.dev/160#filtering.
+     *
+     * Similarly, for `view-item-list` events that are generated from a
+     * [RecommendationService.RecommendRequest][], this field may be populated
+     * directly from [RecommendationService.RecommendRequest.filter][] conforming
+     * to https://google.aip.dev/160#filtering.
+     *
+     * The value must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string filter = 9; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.util.List documents_ = + java.util.Collections.emptyList(); + + private void ensureDocumentsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + documents_ = + new java.util.ArrayList( + documents_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.DocumentInfo, + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentInfoOrBuilder> + documentsBuilder_; + + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public java.util.List + getDocumentsList() { + if (documentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(documents_); + } else { + return documentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public int getDocumentsCount() { + if (documentsBuilder_ == null) { + return documents_.size(); + } else { + return documentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo getDocuments(int index) { + if (documentsBuilder_ == null) { + return documents_.get(index); + } else { + return documentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder setDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.DocumentInfo value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.set(index, value); + onChanged(); + } else { + documentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder setDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.set(index, builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder addDocuments(com.google.cloud.discoveryengine.v1alpha.DocumentInfo value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.add(value); + onChanged(); + } else { + documentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder addDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.DocumentInfo value) { + if (documentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentsIsMutable(); + documents_.add(index, value); + onChanged(); + } else { + documentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder addDocuments( + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder addDocuments( + int index, com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder builderForValue) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.add(index, builderForValue.build()); + onChanged(); + } else { + documentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder addAllDocuments( + java.lang.Iterable + values) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documents_); + onChanged(); + } else { + documentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder clearDocuments() { + if (documentsBuilder_ == null) { + documents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + documentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public Builder removeDocuments(int index) { + if (documentsBuilder_ == null) { + ensureDocumentsIsMutable(); + documents_.remove(index); + onChanged(); + } else { + documentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder getDocumentsBuilder( + int index) { + return getDocumentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentInfoOrBuilder getDocumentsOrBuilder( + int index) { + if (documentsBuilder_ == null) { + return documents_.get(index); + } else { + return documentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public java.util.List + getDocumentsOrBuilderList() { + if (documentsBuilder_ != null) { + return documentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(documents_); + } + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder addDocumentsBuilder() { + return getDocumentsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1alpha.DocumentInfo.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder addDocumentsBuilder( + int index) { + return getDocumentsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1alpha.DocumentInfo.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+     * associated with this user event.
+     *
+     * This field is optional except for the following event types:
+     *
+     * * `view-item`
+     * * `add-to-cart`
+     * * `purchase`
+     * * `media-play`
+     * * `media-complete`
+     *
+     * In a `search` event, this field represents the documents returned to the
+     * end user on the current page (the end user may have not finished browsing
+     * the whole page yet). When a new page is returned to the end user, after
+     * pagination/filtering/ordering even for the same query, a new `search` event
+     * with different
+     * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+     * is desired.
+     * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + public java.util.List + getDocumentsBuilderList() { + return getDocumentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.DocumentInfo, + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentInfoOrBuilder> + getDocumentsFieldBuilder() { + if (documentsBuilder_ == null) { + documentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.DocumentInfo, + com.google.cloud.discoveryengine.v1alpha.DocumentInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.DocumentInfoOrBuilder>( + documents_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + documents_ = null; + } + return documentsBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.PanelInfo panel_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.PanelInfo, + com.google.cloud.discoveryengine.v1alpha.PanelInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.PanelInfoOrBuilder> + panelBuilder_; + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + * + * @return Whether the panel field is set. + */ + public boolean hasPanel() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + * + * @return The panel. + */ + public com.google.cloud.discoveryengine.v1alpha.PanelInfo getPanel() { + if (panelBuilder_ == null) { + return panel_ == null + ? com.google.cloud.discoveryengine.v1alpha.PanelInfo.getDefaultInstance() + : panel_; + } else { + return panelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + public Builder setPanel(com.google.cloud.discoveryengine.v1alpha.PanelInfo value) { + if (panelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + panel_ = value; + } else { + panelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + public Builder setPanel( + com.google.cloud.discoveryengine.v1alpha.PanelInfo.Builder builderForValue) { + if (panelBuilder_ == null) { + panel_ = builderForValue.build(); + } else { + panelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + public Builder mergePanel(com.google.cloud.discoveryengine.v1alpha.PanelInfo value) { + if (panelBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && panel_ != null + && panel_ != com.google.cloud.discoveryengine.v1alpha.PanelInfo.getDefaultInstance()) { + getPanelBuilder().mergeFrom(value); + } else { + panel_ = value; + } + } else { + panelBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + public Builder clearPanel() { + bitField0_ = (bitField0_ & ~0x00000400); + panel_ = null; + if (panelBuilder_ != null) { + panelBuilder_.dispose(); + panelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + public com.google.cloud.discoveryengine.v1alpha.PanelInfo.Builder getPanelBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getPanelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + public com.google.cloud.discoveryengine.v1alpha.PanelInfoOrBuilder getPanelOrBuilder() { + if (panelBuilder_ != null) { + return panelBuilder_.getMessageOrBuilder(); + } else { + return panel_ == null + ? com.google.cloud.discoveryengine.v1alpha.PanelInfo.getDefaultInstance() + : panel_; + } + } + /** + * + * + *
+     * Panel metadata associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.PanelInfo, + com.google.cloud.discoveryengine.v1alpha.PanelInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.PanelInfoOrBuilder> + getPanelFieldBuilder() { + if (panelBuilder_ == null) { + panelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.PanelInfo, + com.google.cloud.discoveryengine.v1alpha.PanelInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.PanelInfoOrBuilder>( + getPanel(), getParentForChildren(), isClean()); + panel_ = null; + } + return panelBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.SearchInfo searchInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchInfo, + com.google.cloud.discoveryengine.v1alpha.SearchInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchInfoOrBuilder> + searchInfoBuilder_; + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + * + * @return Whether the searchInfo field is set. + */ + public boolean hasSearchInfo() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + * + * @return The searchInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.SearchInfo getSearchInfo() { + if (searchInfoBuilder_ == null) { + return searchInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchInfo.getDefaultInstance() + : searchInfo_; + } else { + return searchInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + public Builder setSearchInfo(com.google.cloud.discoveryengine.v1alpha.SearchInfo value) { + if (searchInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchInfo_ = value; + } else { + searchInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + public Builder setSearchInfo( + com.google.cloud.discoveryengine.v1alpha.SearchInfo.Builder builderForValue) { + if (searchInfoBuilder_ == null) { + searchInfo_ = builderForValue.build(); + } else { + searchInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + public Builder mergeSearchInfo(com.google.cloud.discoveryengine.v1alpha.SearchInfo value) { + if (searchInfoBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && searchInfo_ != null + && searchInfo_ + != com.google.cloud.discoveryengine.v1alpha.SearchInfo.getDefaultInstance()) { + getSearchInfoBuilder().mergeFrom(value); + } else { + searchInfo_ = value; + } + } else { + searchInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + public Builder clearSearchInfo() { + bitField0_ = (bitField0_ & ~0x00000800); + searchInfo_ = null; + if (searchInfoBuilder_ != null) { + searchInfoBuilder_.dispose(); + searchInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchInfo.Builder getSearchInfoBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getSearchInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + public com.google.cloud.discoveryengine.v1alpha.SearchInfoOrBuilder getSearchInfoOrBuilder() { + if (searchInfoBuilder_ != null) { + return searchInfoBuilder_.getMessageOrBuilder(); + } else { + return searchInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.SearchInfo.getDefaultInstance() + : searchInfo_; + } + } + /** + * + * + *
+     * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+     * details related to the event.
+     *
+     * This field should be set for `search` event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchInfo, + com.google.cloud.discoveryengine.v1alpha.SearchInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchInfoOrBuilder> + getSearchInfoFieldBuilder() { + if (searchInfoBuilder_ == null) { + searchInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.SearchInfo, + com.google.cloud.discoveryengine.v1alpha.SearchInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.SearchInfoOrBuilder>( + getSearchInfo(), getParentForChildren(), isClean()); + searchInfo_ = null; + } + return searchInfoBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.CompletionInfo completionInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CompletionInfo, + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.CompletionInfoOrBuilder> + completionInfoBuilder_; + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + * + * @return Whether the completionInfo field is set. + */ + public boolean hasCompletionInfo() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + * + * @return The completionInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.CompletionInfo getCompletionInfo() { + if (completionInfoBuilder_ == null) { + return completionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.CompletionInfo.getDefaultInstance() + : completionInfo_; + } else { + return completionInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + public Builder setCompletionInfo( + com.google.cloud.discoveryengine.v1alpha.CompletionInfo value) { + if (completionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completionInfo_ = value; + } else { + completionInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + public Builder setCompletionInfo( + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.Builder builderForValue) { + if (completionInfoBuilder_ == null) { + completionInfo_ = builderForValue.build(); + } else { + completionInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + public Builder mergeCompletionInfo( + com.google.cloud.discoveryengine.v1alpha.CompletionInfo value) { + if (completionInfoBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && completionInfo_ != null + && completionInfo_ + != com.google.cloud.discoveryengine.v1alpha.CompletionInfo.getDefaultInstance()) { + getCompletionInfoBuilder().mergeFrom(value); + } else { + completionInfo_ = value; + } + } else { + completionInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + public Builder clearCompletionInfo() { + bitField0_ = (bitField0_ & ~0x00001000); + completionInfo_ = null; + if (completionInfoBuilder_ != null) { + completionInfoBuilder_.dispose(); + completionInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + public com.google.cloud.discoveryengine.v1alpha.CompletionInfo.Builder + getCompletionInfoBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getCompletionInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + public com.google.cloud.discoveryengine.v1alpha.CompletionInfoOrBuilder + getCompletionInfoOrBuilder() { + if (completionInfoBuilder_ != null) { + return completionInfoBuilder_.getMessageOrBuilder(); + } else { + return completionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.CompletionInfo.getDefaultInstance() + : completionInfo_; + } + } + /** + * + * + *
+     * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+     * details related to the event.
+     *
+     * This field should be set for `search` event when autocomplete function is
+     * enabled and the user clicks a suggestion for search.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CompletionInfo, + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.CompletionInfoOrBuilder> + getCompletionInfoFieldBuilder() { + if (completionInfoBuilder_ == null) { + completionInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.CompletionInfo, + com.google.cloud.discoveryengine.v1alpha.CompletionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.CompletionInfoOrBuilder>( + getCompletionInfo(), getParentForChildren(), isClean()); + completionInfo_ = null; + } + return completionInfoBuilder_; + } + + private com.google.cloud.discoveryengine.v1alpha.TransactionInfo transactionInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TransactionInfo, + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.TransactionInfoOrBuilder> + transactionInfoBuilder_; + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + * + * @return Whether the transactionInfo field is set. + */ + public boolean hasTransactionInfo() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + * + * @return The transactionInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.TransactionInfo getTransactionInfo() { + if (transactionInfoBuilder_ == null) { + return transactionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.TransactionInfo.getDefaultInstance() + : transactionInfo_; + } else { + return transactionInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + public Builder setTransactionInfo( + com.google.cloud.discoveryengine.v1alpha.TransactionInfo value) { + if (transactionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transactionInfo_ = value; + } else { + transactionInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + public Builder setTransactionInfo( + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.Builder builderForValue) { + if (transactionInfoBuilder_ == null) { + transactionInfo_ = builderForValue.build(); + } else { + transactionInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + public Builder mergeTransactionInfo( + com.google.cloud.discoveryengine.v1alpha.TransactionInfo value) { + if (transactionInfoBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && transactionInfo_ != null + && transactionInfo_ + != com.google.cloud.discoveryengine.v1alpha.TransactionInfo.getDefaultInstance()) { + getTransactionInfoBuilder().mergeFrom(value); + } else { + transactionInfo_ = value; + } + } else { + transactionInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + public Builder clearTransactionInfo() { + bitField0_ = (bitField0_ & ~0x00002000); + transactionInfo_ = null; + if (transactionInfoBuilder_ != null) { + transactionInfoBuilder_.dispose(); + transactionInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + public com.google.cloud.discoveryengine.v1alpha.TransactionInfo.Builder + getTransactionInfoBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getTransactionInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + public com.google.cloud.discoveryengine.v1alpha.TransactionInfoOrBuilder + getTransactionInfoOrBuilder() { + if (transactionInfoBuilder_ != null) { + return transactionInfoBuilder_.getMessageOrBuilder(); + } else { + return transactionInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.TransactionInfo.getDefaultInstance() + : transactionInfo_; + } + } + /** + * + * + *
+     * The transaction metadata (if any) associated with this user event.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TransactionInfo, + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.TransactionInfoOrBuilder> + getTransactionInfoFieldBuilder() { + if (transactionInfoBuilder_ == null) { + transactionInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.TransactionInfo, + com.google.cloud.discoveryengine.v1alpha.TransactionInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.TransactionInfoOrBuilder>( + getTransactionInfo(), getParentForChildren(), isClean()); + transactionInfo_ = null; + } + return transactionInfoBuilder_; + } + + private com.google.protobuf.LazyStringArrayList tagIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTagIdsIsMutable() { + if (!tagIds_.isModifiable()) { + tagIds_ = new com.google.protobuf.LazyStringArrayList(tagIds_); + } + bitField0_ |= 0x00004000; + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @return A list containing the tagIds. + */ + public com.google.protobuf.ProtocolStringList getTagIdsList() { + tagIds_.makeImmutable(); + return tagIds_; + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @return The count of tagIds. + */ + public int getTagIdsCount() { + return tagIds_.size(); + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @param index The index of the element to return. + * @return The tagIds at the given index. + */ + public java.lang.String getTagIds(int index) { + return tagIds_.get(index); + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @param index The index of the value to return. + * @return The bytes of the tagIds at the given index. + */ + public com.google.protobuf.ByteString getTagIdsBytes(int index) { + return tagIds_.getByteString(index); + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @param index The index to set the value at. + * @param value The tagIds to set. + * @return This builder for chaining. + */ + public Builder setTagIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIdsIsMutable(); + tagIds_.set(index, value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @param value The tagIds to add. + * @return This builder for chaining. + */ + public Builder addTagIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIdsIsMutable(); + tagIds_.add(value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @param values The tagIds to add. + * @return This builder for chaining. + */ + public Builder addAllTagIds(java.lang.Iterable values) { + ensureTagIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tagIds_); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @return This builder for chaining. + */ + public Builder clearTagIds() { + tagIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of identifiers for the independent experiment groups this user event
+     * belongs to. This is used to distinguish between user events associated with
+     * different experiment setups on the customer end.
+     * 
+ * + * repeated string tag_ids = 15; + * + * @param value The bytes of the tagIds to add. + * @return This builder for chaining. + */ + public Builder addTagIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagIdsIsMutable(); + tagIds_.add(value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList promotionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePromotionIdsIsMutable() { + if (!promotionIds_.isModifiable()) { + promotionIds_ = new com.google.protobuf.LazyStringArrayList(promotionIds_); + } + bitField0_ |= 0x00008000; + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @return A list containing the promotionIds. + */ + public com.google.protobuf.ProtocolStringList getPromotionIdsList() { + promotionIds_.makeImmutable(); + return promotionIds_; + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @return The count of promotionIds. + */ + public int getPromotionIdsCount() { + return promotionIds_.size(); + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @param index The index of the element to return. + * @return The promotionIds at the given index. + */ + public java.lang.String getPromotionIds(int index) { + return promotionIds_.get(index); + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @param index The index of the value to return. + * @return The bytes of the promotionIds at the given index. + */ + public com.google.protobuf.ByteString getPromotionIdsBytes(int index) { + return promotionIds_.getByteString(index); + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @param index The index to set the value at. + * @param value The promotionIds to set. + * @return This builder for chaining. + */ + public Builder setPromotionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromotionIdsIsMutable(); + promotionIds_.set(index, value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @param value The promotionIds to add. + * @return This builder for chaining. + */ + public Builder addPromotionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromotionIdsIsMutable(); + promotionIds_.add(value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @param values The promotionIds to add. + * @return This builder for chaining. + */ + public Builder addAllPromotionIds(java.lang.Iterable values) { + ensurePromotionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promotionIds_); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @return This builder for chaining. + */ + public Builder clearPromotionIds() { + promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The promotion IDs if this is an event associated with promotions.
+     * Currently, this field is restricted to at most one ID.
+     * 
+ * + * repeated string promotion_ids = 16; + * + * @param value The bytes of the promotionIds to add. + * @return This builder for chaining. + */ + public Builder addPromotionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePromotionIdsIsMutable(); + promotionIds_.add(value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + attributes_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1alpha.CustomAttribute> + internalGetMutableAttributes() { + if (attributes_ == null) { + attributes_ = + com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + bitField0_ |= 0x00010000; + onChanged(); + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + * + * + *
+     * Extra user event features to include in the recommendation model.
+     * These attributes must NOT contain data that needs to be parsed or processed
+     * further, e.g. JSON or other encodings.
+     *
+     * If you provide custom attributes for ingested user events, also include
+     * them in the user events that you associate with prediction requests. Custom
+     * attribute formatting must be consistent between imported events and events
+     * provided with prediction requests. This lets the Discovery Engine API use
+     * those custom attributes when training models and serving predictions, which
+     * helps improve recommendation quality.
+     *
+     * This field needs to pass all below criteria, otherwise an
+     * `INVALID_ARGUMENT` error is returned:
+     *
+     * * The key must be a UTF-8 encoded string with a length limit of 5,000
+     *   characters.
+     * * For text attributes, at most 400 values are allowed. Empty values are not
+     *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+     *   256 characters.
+     * * For number attributes, at most 400 values are allowed.
+     *
+     * For product recommendations, an example of extra user information is
+     * `traffic_channel`, which is how a user arrives at the site. Users can
+     * arrive
+     * at the site by coming to the site directly, coming through Google
+     * search, or in other ways.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttributes().getMap().containsKey(key); + } + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getAttributes() { + return getAttributesMap(); + } + /** + * + * + *
+     * Extra user event features to include in the recommendation model.
+     * These attributes must NOT contain data that needs to be parsed or processed
+     * further, e.g. JSON or other encodings.
+     *
+     * If you provide custom attributes for ingested user events, also include
+     * them in the user events that you associate with prediction requests. Custom
+     * attribute formatting must be consistent between imported events and events
+     * provided with prediction requests. This lets the Discovery Engine API use
+     * those custom attributes when training models and serving predictions, which
+     * helps improve recommendation quality.
+     *
+     * This field needs to pass all below criteria, otherwise an
+     * `INVALID_ARGUMENT` error is returned:
+     *
+     * * The key must be a UTF-8 encoded string with a length limit of 5,000
+     *   characters.
+     * * For text attributes, at most 400 values are allowed. Empty values are not
+     *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+     *   256 characters.
+     * * For number attributes, at most 400 values are allowed.
+     *
+     * For product recommendations, an example of extra user information is
+     * `traffic_channel`, which is how a user arrives at the site. Users can
+     * arrive
+     * at the site by coming to the site directly, coming through Google
+     * search, or in other ways.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public java.util.Map + getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + * + * + *
+     * Extra user event features to include in the recommendation model.
+     * These attributes must NOT contain data that needs to be parsed or processed
+     * further, e.g. JSON or other encodings.
+     *
+     * If you provide custom attributes for ingested user events, also include
+     * them in the user events that you associate with prediction requests. Custom
+     * attribute formatting must be consistent between imported events and events
+     * provided with prediction requests. This lets the Discovery Engine API use
+     * those custom attributes when training models and serving predictions, which
+     * helps improve recommendation quality.
+     *
+     * This field needs to pass all below criteria, otherwise an
+     * `INVALID_ARGUMENT` error is returned:
+     *
+     * * The key must be a UTF-8 encoded string with a length limit of 5,000
+     *   characters.
+     * * For text attributes, at most 400 values are allowed. Empty values are not
+     *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+     *   256 characters.
+     * * For number attributes, at most 400 values are allowed.
+     *
+     * For product recommendations, an example of extra user information is
+     * `traffic_channel`, which is how a user arrives at the site. Users can
+     * arrive
+     * at the site by coming to the site directly, coming through Google
+     * search, or in other ways.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1alpha.CustomAttribute + getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.CustomAttribute defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Extra user event features to include in the recommendation model.
+     * These attributes must NOT contain data that needs to be parsed or processed
+     * further, e.g. JSON or other encodings.
+     *
+     * If you provide custom attributes for ingested user events, also include
+     * them in the user events that you associate with prediction requests. Custom
+     * attribute formatting must be consistent between imported events and events
+     * provided with prediction requests. This lets the Discovery Engine API use
+     * those custom attributes when training models and serving predictions, which
+     * helps improve recommendation quality.
+     *
+     * This field needs to pass all below criteria, otherwise an
+     * `INVALID_ARGUMENT` error is returned:
+     *
+     * * The key must be a UTF-8 encoded string with a length limit of 5,000
+     *   characters.
+     * * For text attributes, at most 400 values are allowed. Empty values are not
+     *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+     *   256 characters.
+     * * For number attributes, at most 400 values are allowed.
+     *
+     * For product recommendations, an example of extra user information is
+     * `traffic_channel`, which is how a user arrives at the site. Users can
+     * arrive
+     * at the site by coming to the site directly, coming through Google
+     * search, or in other ways.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.CustomAttribute getAttributesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00010000); + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Extra user event features to include in the recommendation model.
+     * These attributes must NOT contain data that needs to be parsed or processed
+     * further, e.g. JSON or other encodings.
+     *
+     * If you provide custom attributes for ingested user events, also include
+     * them in the user events that you associate with prediction requests. Custom
+     * attribute formatting must be consistent between imported events and events
+     * provided with prediction requests. This lets the Discovery Engine API use
+     * those custom attributes when training models and serving predictions, which
+     * helps improve recommendation quality.
+     *
+     * This field needs to pass all below criteria, otherwise an
+     * `INVALID_ARGUMENT` error is returned:
+     *
+     * * The key must be a UTF-8 encoded string with a length limit of 5,000
+     *   characters.
+     * * For text attributes, at most 400 values are allowed. Empty values are not
+     *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+     *   256 characters.
+     * * For number attributes, at most 400 values are allowed.
+     *
+     * For product recommendations, an example of extra user information is
+     * `traffic_channel`, which is how a user arrives at the site. Users can
+     * arrive
+     * at the site by coming to the site directly, coming through Google
+     * search, or in other ways.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableAttributes() { + bitField0_ |= 0x00010000; + return internalGetMutableAttributes().getMutableMap(); + } + /** + * + * + *
+     * Extra user event features to include in the recommendation model.
+     * These attributes must NOT contain data that needs to be parsed or processed
+     * further, e.g. JSON or other encodings.
+     *
+     * If you provide custom attributes for ingested user events, also include
+     * them in the user events that you associate with prediction requests. Custom
+     * attribute formatting must be consistent between imported events and events
+     * provided with prediction requests. This lets the Discovery Engine API use
+     * those custom attributes when training models and serving predictions, which
+     * helps improve recommendation quality.
+     *
+     * This field needs to pass all below criteria, otherwise an
+     * `INVALID_ARGUMENT` error is returned:
+     *
+     * * The key must be a UTF-8 encoded string with a length limit of 5,000
+     *   characters.
+     * * For text attributes, at most 400 values are allowed. Empty values are not
+     *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+     *   256 characters.
+     * * For number attributes, at most 400 values are allowed.
+     *
+     * For product recommendations, an example of extra user information is
+     * `traffic_channel`, which is how a user arrives at the site. Users can
+     * arrive
+     * at the site by coming to the site directly, coming through Google
+     * search, or in other ways.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + public Builder putAttributes( + java.lang.String key, com.google.cloud.discoveryengine.v1alpha.CustomAttribute value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttributes().getMutableMap().put(key, value); + bitField0_ |= 0x00010000; + return this; + } + /** + * + * + *
+     * Extra user event features to include in the recommendation model.
+     * These attributes must NOT contain data that needs to be parsed or processed
+     * further, e.g. JSON or other encodings.
+     *
+     * If you provide custom attributes for ingested user events, also include
+     * them in the user events that you associate with prediction requests. Custom
+     * attribute formatting must be consistent between imported events and events
+     * provided with prediction requests. This lets the Discovery Engine API use
+     * those custom attributes when training models and serving predictions, which
+     * helps improve recommendation quality.
+     *
+     * This field needs to pass all below criteria, otherwise an
+     * `INVALID_ARGUMENT` error is returned:
+     *
+     * * The key must be a UTF-8 encoded string with a length limit of 5,000
+     *   characters.
+     * * For text attributes, at most 400 values are allowed. Empty values are not
+     *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+     *   256 characters.
+     * * For number attributes, at most 400 values are allowed.
+     *
+     * For product recommendations, an example of extra user information is
+     * `traffic_channel`, which is how a user arrives at the site. Users can
+     * arrive
+     * at the site by coming to the site directly, coming through Google
+     * search, or in other ways.
+     * 
+ * + * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + public Builder putAllAttributes( + java.util.Map + values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + bitField0_ |= 0x00010000; + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.MediaInfo mediaInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.MediaInfo, + com.google.cloud.discoveryengine.v1alpha.MediaInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.MediaInfoOrBuilder> + mediaInfoBuilder_; + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + * + * @return Whether the mediaInfo field is set. + */ + public boolean hasMediaInfo() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + * + * @return The mediaInfo. + */ + public com.google.cloud.discoveryengine.v1alpha.MediaInfo getMediaInfo() { + if (mediaInfoBuilder_ == null) { + return mediaInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.MediaInfo.getDefaultInstance() + : mediaInfo_; + } else { + return mediaInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + public Builder setMediaInfo(com.google.cloud.discoveryengine.v1alpha.MediaInfo value) { + if (mediaInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaInfo_ = value; + } else { + mediaInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + public Builder setMediaInfo( + com.google.cloud.discoveryengine.v1alpha.MediaInfo.Builder builderForValue) { + if (mediaInfoBuilder_ == null) { + mediaInfo_ = builderForValue.build(); + } else { + mediaInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + public Builder mergeMediaInfo(com.google.cloud.discoveryengine.v1alpha.MediaInfo value) { + if (mediaInfoBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && mediaInfo_ != null + && mediaInfo_ + != com.google.cloud.discoveryengine.v1alpha.MediaInfo.getDefaultInstance()) { + getMediaInfoBuilder().mergeFrom(value); + } else { + mediaInfo_ = value; + } + } else { + mediaInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + public Builder clearMediaInfo() { + bitField0_ = (bitField0_ & ~0x00020000); + mediaInfo_ = null; + if (mediaInfoBuilder_ != null) { + mediaInfoBuilder_.dispose(); + mediaInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + public com.google.cloud.discoveryengine.v1alpha.MediaInfo.Builder getMediaInfoBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getMediaInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + public com.google.cloud.discoveryengine.v1alpha.MediaInfoOrBuilder getMediaInfoOrBuilder() { + if (mediaInfoBuilder_ != null) { + return mediaInfoBuilder_.getMessageOrBuilder(); + } else { + return mediaInfo_ == null + ? com.google.cloud.discoveryengine.v1alpha.MediaInfo.getDefaultInstance() + : mediaInfo_; + } + } + /** + * + * + *
+     * Media-specific info.
+     * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.MediaInfo, + com.google.cloud.discoveryengine.v1alpha.MediaInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.MediaInfoOrBuilder> + getMediaInfoFieldBuilder() { + if (mediaInfoBuilder_ == null) { + mediaInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.MediaInfo, + com.google.cloud.discoveryengine.v1alpha.MediaInfo.Builder, + com.google.cloud.discoveryengine.v1alpha.MediaInfoOrBuilder>( + getMediaInfo(), getParentForChildren(), isClean()); + mediaInfo_ = null; + } + return mediaInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.UserEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.UserEvent) + private static final com.google.cloud.discoveryengine.v1alpha.UserEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.UserEvent(); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventOrBuilder.java new file mode 100644 index 000000000000..17beafabe965 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventOrBuilder.java @@ -0,0 +1,1085 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface UserEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.UserEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. User event type. Allowed values are:
+   *
+   * Generic values:
+   *
+   * * `search`: Search for Documents.
+   * * `view-item`: Detailed page view of a Document.
+   * * `view-item-list`: View of a panel or ordered list of Documents.
+   * * `view-home-page`: View of the home page.
+   * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+   *
+   * Retail-related values:
+   *
+   * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+   * * `purchase`: Purchase an item(s)
+   *
+   * Media-related values:
+   *
+   * * `media-play`: Start/resume watching a video, playing a song, etc.
+   * * `media-complete`: Finished or stopped midway through a video, song, etc.
+   * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventType. + */ + java.lang.String getEventType(); + /** + * + * + *
+   * Required. User event type. Allowed values are:
+   *
+   * Generic values:
+   *
+   * * `search`: Search for Documents.
+   * * `view-item`: Detailed page view of a Document.
+   * * `view-item-list`: View of a panel or ordered list of Documents.
+   * * `view-home-page`: View of the home page.
+   * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+   *
+   * Retail-related values:
+   *
+   * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+   * * `purchase`: Purchase an item(s)
+   *
+   * Media-related values:
+   *
+   * * `media-play`: Start/resume watching a video, playing a song, etc.
+   * * `media-complete`: Finished or stopped midway through a video, song, etc.
+   * 
+ * + * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventType. + */ + com.google.protobuf.ByteString getEventTypeBytes(); + + /** + * + * + *
+   * Required. A unique identifier for tracking visitors.
+   *
+   * For example, this could be implemented with an HTTP cookie, which should be
+   * able to uniquely identify a visitor on a single device. This unique
+   * identifier should not change if the visitor log in/out of the website.
+   *
+   * Do not set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded model
+   * quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * The field should not contain PII or user-data. We recommend to use Google
+   * Analytics [Client
+   * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+   * for this field.
+   * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userPseudoId. + */ + java.lang.String getUserPseudoId(); + /** + * + * + *
+   * Required. A unique identifier for tracking visitors.
+   *
+   * For example, this could be implemented with an HTTP cookie, which should be
+   * able to uniquely identify a visitor on a single device. This unique
+   * identifier should not change if the visitor log in/out of the website.
+   *
+   * Do not set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded model
+   * quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * The field should not contain PII or user-data. We recommend to use Google
+   * Analytics [Client
+   * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+   * for this field.
+   * 
+ * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userPseudoId. + */ + com.google.protobuf.ByteString getUserPseudoIdBytes(); + + /** + * + * + *
+   * Only required for
+   * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+   * method. Timestamp of when the user event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 3; + * + * @return Whether the eventTime field is set. + */ + boolean hasEventTime(); + /** + * + * + *
+   * Only required for
+   * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+   * method. Timestamp of when the user event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 3; + * + * @return The eventTime. + */ + com.google.protobuf.Timestamp getEventTime(); + /** + * + * + *
+   * Only required for
+   * [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents]
+   * method. Timestamp of when the user event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder(); + + /** + * + * + *
+   * Information about the end user.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + * + * @return Whether the userInfo field is set. + */ + boolean hasUserInfo(); + /** + * + * + *
+   * Information about the end user.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + * + * @return The userInfo. + */ + com.google.cloud.discoveryengine.v1alpha.UserInfo getUserInfo(); + /** + * + * + *
+   * Information about the end user.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.UserInfo user_info = 4; + */ + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder getUserInfoOrBuilder(); + + /** + * + * + *
+   * Should set to true if the request is made directly from the end user, in
+   * which case the
+   * [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent]
+   * can be populated from the HTTP request.
+   *
+   * This flag should be set only if the API request is made directly from the
+   * end user such as a mobile app (and not if a gateway or a server is
+   * processing and pushing the user events).
+   *
+   * This should not be set when using the JavaScript tag in
+   * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent].
+   * 
+ * + * bool direct_user_request = 5; + * + * @return The directUserRequest. + */ + boolean getDirectUserRequest(); + + /** + * + * + *
+   * A unique identifier for tracking a visitor session with a length limit of
+   * 128 bytes. A session is an aggregation of an end user behavior in a time
+   * span.
+   *
+   * A general guideline to populate the session_id:
+   *
+   * 1. If user has no activity for 30 min, a new session_id should be assigned.
+   * 2. The session_id should be unique across users, suggest use uuid or add
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * as prefix.
+   * 
+ * + * string session_id = 6; + * + * @return The sessionId. + */ + java.lang.String getSessionId(); + /** + * + * + *
+   * A unique identifier for tracking a visitor session with a length limit of
+   * 128 bytes. A session is an aggregation of an end user behavior in a time
+   * span.
+   *
+   * A general guideline to populate the session_id:
+   *
+   * 1. If user has no activity for 30 min, a new session_id should be assigned.
+   * 2. The session_id should be unique across users, suggest use uuid or add
+   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id]
+   * as prefix.
+   * 
+ * + * string session_id = 6; + * + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString getSessionIdBytes(); + + /** + * + * + *
+   * Page metadata such as categories and other critical information for certain
+   * event types such as `view-category-page`.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + * + * @return Whether the pageInfo field is set. + */ + boolean hasPageInfo(); + /** + * + * + *
+   * Page metadata such as categories and other critical information for certain
+   * event types such as `view-category-page`.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + * + * @return The pageInfo. + */ + com.google.cloud.discoveryengine.v1alpha.PageInfo getPageInfo(); + /** + * + * + *
+   * Page metadata such as categories and other critical information for certain
+   * event types such as `view-category-page`.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PageInfo page_info = 7; + */ + com.google.cloud.discoveryengine.v1alpha.PageInfoOrBuilder getPageInfoOrBuilder(); + + /** + * + * + *
+   * Token to attribute an API response to user action(s) to trigger the event.
+   *
+   * Highly recommended for user events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * This field enables accurate attribution of recommendation model
+   * performance.
+   *
+   * The value must be one of:
+   *
+   * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * This token enables us to accurately attribute page view or conversion
+   * completion back to the event and the particular predict response containing
+   * this clicked/purchased product. If user clicks on product K in the
+   * recommendation results, pass
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * as a URL parameter to product K's page. When recording events on product
+   * K's page, log the
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * to this field.
+   * 
+ * + * string attribution_token = 8; + * + * @return The attributionToken. + */ + java.lang.String getAttributionToken(); + /** + * + * + *
+   * Token to attribute an API response to user action(s) to trigger the event.
+   *
+   * Highly recommended for user events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * This field enables accurate attribution of recommendation model
+   * performance.
+   *
+   * The value must be one of:
+   *
+   * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of
+   * [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
+   * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
+   *
+   * This token enables us to accurately attribute page view or conversion
+   * completion back to the event and the particular predict response containing
+   * this clicked/purchased product. If user clicks on product K in the
+   * recommendation results, pass
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * as a URL parameter to product K's page. When recording events on product
+   * K's page, log the
+   * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token]
+   * to this field.
+   * 
+ * + * string attribution_token = 8; + * + * @return The bytes for attributionToken. + */ + com.google.protobuf.ByteString getAttributionTokenBytes(); + + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered.
+   *
+   * One example is for `search` events, the associated
+   * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+   * contain a filter expression in
+   * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+   * conforming to https://google.aip.dev/160#filtering.
+   *
+   * Similarly, for `view-item-list` events that are generated from a
+   * [RecommendationService.RecommendRequest][], this field may be populated
+   * directly from [RecommendationService.RecommendRequest.filter][] conforming
+   * to https://google.aip.dev/160#filtering.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string filter = 9; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter syntax consists of an expression language for constructing a
+   * predicate from one or more fields of the documents being filtered.
+   *
+   * One example is for `search` events, the associated
+   * [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may
+   * contain a filter expression in
+   * [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
+   * conforming to https://google.aip.dev/160#filtering.
+   *
+   * Similarly, for `view-item-list` events that are generated from a
+   * [RecommendationService.RecommendRequest][], this field may be populated
+   * directly from [RecommendationService.RecommendRequest.filter][] conforming
+   * to https://google.aip.dev/160#filtering.
+   *
+   * The value must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string filter = 9; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + java.util.List getDocumentsList(); + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + com.google.cloud.discoveryengine.v1alpha.DocumentInfo getDocuments(int index); + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + int getDocumentsCount(); + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + java.util.List + getDocumentsOrBuilderList(); + /** + * + * + *
+   * List of [Document][google.cloud.discoveryengine.v1alpha.Document]s
+   * associated with this user event.
+   *
+   * This field is optional except for the following event types:
+   *
+   * * `view-item`
+   * * `add-to-cart`
+   * * `purchase`
+   * * `media-play`
+   * * `media-complete`
+   *
+   * In a `search` event, this field represents the documents returned to the
+   * end user on the current page (the end user may have not finished browsing
+   * the whole page yet). When a new page is returned to the end user, after
+   * pagination/filtering/ordering even for the same query, a new `search` event
+   * with different
+   * [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents]
+   * is desired.
+   * 
+ * + * repeated .google.cloud.discoveryengine.v1alpha.DocumentInfo documents = 10; + */ + com.google.cloud.discoveryengine.v1alpha.DocumentInfoOrBuilder getDocumentsOrBuilder(int index); + + /** + * + * + *
+   * Panel metadata associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + * + * @return Whether the panel field is set. + */ + boolean hasPanel(); + /** + * + * + *
+   * Panel metadata associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + * + * @return The panel. + */ + com.google.cloud.discoveryengine.v1alpha.PanelInfo getPanel(); + /** + * + * + *
+   * Panel metadata associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.PanelInfo panel = 11; + */ + com.google.cloud.discoveryengine.v1alpha.PanelInfoOrBuilder getPanelOrBuilder(); + + /** + * + * + *
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * details related to the event.
+   *
+   * This field should be set for `search` event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + * + * @return Whether the searchInfo field is set. + */ + boolean hasSearchInfo(); + /** + * + * + *
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * details related to the event.
+   *
+   * This field should be set for `search` event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + * + * @return The searchInfo. + */ + com.google.cloud.discoveryengine.v1alpha.SearchInfo getSearchInfo(); + /** + * + * + *
+   * [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]
+   * details related to the event.
+   *
+   * This field should be set for `search` event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.SearchInfo search_info = 12; + */ + com.google.cloud.discoveryengine.v1alpha.SearchInfoOrBuilder getSearchInfoOrBuilder(); + + /** + * + * + *
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * details related to the event.
+   *
+   * This field should be set for `search` event when autocomplete function is
+   * enabled and the user clicks a suggestion for search.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + * + * @return Whether the completionInfo field is set. + */ + boolean hasCompletionInfo(); + /** + * + * + *
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * details related to the event.
+   *
+   * This field should be set for `search` event when autocomplete function is
+   * enabled and the user clicks a suggestion for search.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + * + * @return The completionInfo. + */ + com.google.cloud.discoveryengine.v1alpha.CompletionInfo getCompletionInfo(); + /** + * + * + *
+   * [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
+   * details related to the event.
+   *
+   * This field should be set for `search` event when autocomplete function is
+   * enabled and the user clicks a suggestion for search.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.CompletionInfo completion_info = 13; + */ + com.google.cloud.discoveryengine.v1alpha.CompletionInfoOrBuilder getCompletionInfoOrBuilder(); + + /** + * + * + *
+   * The transaction metadata (if any) associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + * + * @return Whether the transactionInfo field is set. + */ + boolean hasTransactionInfo(); + /** + * + * + *
+   * The transaction metadata (if any) associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + * + * @return The transactionInfo. + */ + com.google.cloud.discoveryengine.v1alpha.TransactionInfo getTransactionInfo(); + /** + * + * + *
+   * The transaction metadata (if any) associated with this user event.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.TransactionInfo transaction_info = 14; + */ + com.google.cloud.discoveryengine.v1alpha.TransactionInfoOrBuilder getTransactionInfoOrBuilder(); + + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @return A list containing the tagIds. + */ + java.util.List getTagIdsList(); + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @return The count of tagIds. + */ + int getTagIdsCount(); + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @param index The index of the element to return. + * @return The tagIds at the given index. + */ + java.lang.String getTagIds(int index); + /** + * + * + *
+   * A list of identifiers for the independent experiment groups this user event
+   * belongs to. This is used to distinguish between user events associated with
+   * different experiment setups on the customer end.
+   * 
+ * + * repeated string tag_ids = 15; + * + * @param index The index of the value to return. + * @return The bytes of the tagIds at the given index. + */ + com.google.protobuf.ByteString getTagIdsBytes(int index); + + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @return A list containing the promotionIds. + */ + java.util.List getPromotionIdsList(); + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @return The count of promotionIds. + */ + int getPromotionIdsCount(); + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @param index The index of the element to return. + * @return The promotionIds at the given index. + */ + java.lang.String getPromotionIds(int index); + /** + * + * + *
+   * The promotion IDs if this is an event associated with promotions.
+   * Currently, this field is restricted to at most one ID.
+   * 
+ * + * repeated string promotion_ids = 16; + * + * @param index The index of the value to return. + * @return The bytes of the promotionIds at the given index. + */ + com.google.protobuf.ByteString getPromotionIdsBytes(int index); + + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + int getAttributesCount(); + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + boolean containsAttributes(java.lang.String key); + /** Use {@link #getAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getAttributes(); + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + java.util.Map + getAttributesMap(); + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.CustomAttribute getAttributesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1alpha.CustomAttribute defaultValue); + /** + * + * + *
+   * Extra user event features to include in the recommendation model.
+   * These attributes must NOT contain data that needs to be parsed or processed
+   * further, e.g. JSON or other encodings.
+   *
+   * If you provide custom attributes for ingested user events, also include
+   * them in the user events that you associate with prediction requests. Custom
+   * attribute formatting must be consistent between imported events and events
+   * provided with prediction requests. This lets the Discovery Engine API use
+   * those custom attributes when training models and serving predictions, which
+   * helps improve recommendation quality.
+   *
+   * This field needs to pass all below criteria, otherwise an
+   * `INVALID_ARGUMENT` error is returned:
+   *
+   * * The key must be a UTF-8 encoded string with a length limit of 5,000
+   *   characters.
+   * * For text attributes, at most 400 values are allowed. Empty values are not
+   *   allowed. Each value must be a UTF-8 encoded string with a length limit of
+   *   256 characters.
+   * * For number attributes, at most 400 values are allowed.
+   *
+   * For product recommendations, an example of extra user information is
+   * `traffic_channel`, which is how a user arrives at the site. Users can
+   * arrive
+   * at the site by coming to the site directly, coming through Google
+   * search, or in other ways.
+   * 
+ * + * map<string, .google.cloud.discoveryengine.v1alpha.CustomAttribute> attributes = 17; + * + */ + com.google.cloud.discoveryengine.v1alpha.CustomAttribute getAttributesOrThrow( + java.lang.String key); + + /** + * + * + *
+   * Media-specific info.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + * + * @return Whether the mediaInfo field is set. + */ + boolean hasMediaInfo(); + /** + * + * + *
+   * Media-specific info.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + * + * @return The mediaInfo. + */ + com.google.cloud.discoveryengine.v1alpha.MediaInfo getMediaInfo(); + /** + * + * + *
+   * Media-specific info.
+   * 
+ * + * .google.cloud.discoveryengine.v1alpha.MediaInfo media_info = 18; + */ + com.google.cloud.discoveryengine.v1alpha.MediaInfoOrBuilder getMediaInfoOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventProto.java new file mode 100644 index 000000000000..ba1cc4c6a71d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventProto.java @@ -0,0 +1,268 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class UserEventProto { + private UserEventProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_AttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_AttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/discoveryengine/v1alpha/u" + + "ser_event.proto\022$google.cloud.discoverye" + + "ngine.v1alpha\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\0321googl" + + "e/cloud/discoveryengine/v1alpha/common.p" + + "roto\032\036google/protobuf/duration.proto\032\037go" + + "ogle/protobuf/timestamp.proto\"\357\007\n\tUserEv" + + "ent\022\030\n\nevent_type\030\001 \001(\tB\004\342A\001\002\022\034\n\016user_ps" + + "eudo_id\030\002 \001(\tB\004\342A\001\002\022.\n\nevent_time\030\003 \001(\0132" + + "\032.google.protobuf.Timestamp\022A\n\tuser_info" + + "\030\004 \001(\0132..google.cloud.discoveryengine.v1" + + "alpha.UserInfo\022\033\n\023direct_user_request\030\005 " + + "\001(\010\022\022\n\nsession_id\030\006 \001(\t\022A\n\tpage_info\030\007 \001" + + "(\0132..google.cloud.discoveryengine.v1alph" + + "a.PageInfo\022\031\n\021attribution_token\030\010 \001(\t\022\016\n" + + "\006filter\030\t \001(\t\022E\n\tdocuments\030\n \003(\01322.googl" + + "e.cloud.discoveryengine.v1alpha.Document" + + "Info\022>\n\005panel\030\013 \001(\0132/.google.cloud.disco" + + "veryengine.v1alpha.PanelInfo\022E\n\013search_i" + + "nfo\030\014 \001(\01320.google.cloud.discoveryengine" + + ".v1alpha.SearchInfo\022M\n\017completion_info\030\r" + + " \001(\01324.google.cloud.discoveryengine.v1al" + + "pha.CompletionInfo\022O\n\020transaction_info\030\016" + + " \001(\01325.google.cloud.discoveryengine.v1al" + + "pha.TransactionInfo\022\017\n\007tag_ids\030\017 \003(\t\022\025\n\r" + + "promotion_ids\030\020 \003(\t\022S\n\nattributes\030\021 \003(\0132" + + "?.google.cloud.discoveryengine.v1alpha.U" + + "serEvent.AttributesEntry\022C\n\nmedia_info\030\022" + + " \001(\0132/.google.cloud.discoveryengine.v1al" + + "pha.MediaInfo\032h\n\017AttributesEntry\022\013\n\003key\030" + + "\001 \001(\t\022D\n\005value\030\002 \001(\01325.google.cloud.disc" + + "overyengine.v1alpha.CustomAttribute:\0028\001\"" + + "Y\n\010PageInfo\022\023\n\013pageview_id\030\001 \001(\t\022\025\n\rpage" + + "_category\030\002 \001(\t\022\013\n\003uri\030\003 \001(\t\022\024\n\014referrer" + + "_uri\030\004 \001(\t\"T\n\nSearchInfo\022\024\n\014search_query" + + "\030\001 \001(\t\022\020\n\010order_by\030\002 \001(\t\022\023\n\006offset\030\003 \001(\005" + + "H\000\210\001\001B\t\n\007_offset\"H\n\016CompletionInfo\022\033\n\023se" + + "lected_suggestion\030\001 \001(\t\022\031\n\021selected_posi" + + "tion\030\002 \001(\005\"\313\001\n\017TransactionInfo\022\030\n\005value\030" + + "\001 \001(\002B\004\342A\001\002H\000\210\001\001\022\026\n\010currency\030\002 \001(\tB\004\342A\001\002" + + "\022\026\n\016transaction_id\030\003 \001(\t\022\020\n\003tax\030\004 \001(\002H\001\210" + + "\001\001\022\021\n\004cost\030\005 \001(\002H\002\210\001\001\022\033\n\016discount_value\030" + + "\006 \001(\002H\003\210\001\001B\010\n\006_valueB\006\n\004_taxB\007\n\005_costB\021\n" + + "\017_discount_value\"\273\001\n\014DocumentInfo\022\014\n\002id\030" + + "\001 \001(\tH\000\022<\n\004name\030\002 \001(\tB,\372A)\n\'discoveryeng" + + "ine.googleapis.com/DocumentH\000\022\r\n\003uri\030\006 \001" + + "(\tH\000\022\025\n\010quantity\030\003 \001(\005H\001\210\001\001\022\025\n\rpromotion" + + "_ids\030\004 \003(\tB\025\n\023document_descriptorB\013\n\t_qu" + + "antity\"\225\001\n\tPanelInfo\022\026\n\010panel_id\030\002 \001(\tB\004" + + "\342A\001\002\022\024\n\014display_name\030\003 \001(\t\022\033\n\016panel_posi" + + "tion\030\004 \001(\005H\000\210\001\001\022\031\n\014total_panels\030\005 \001(\005H\001\210" + + "\001\001B\021\n\017_panel_positionB\017\n\r_total_panels\"\215" + + "\001\n\tMediaInfo\022:\n\027media_progress_duration\030" + + "\001 \001(\0132\031.google.protobuf.Duration\022&\n\031medi" + + "a_progress_percentage\030\002 \001(\002H\000\210\001\001B\034\n\032_med" + + "ia_progress_percentageB\232\002\n(com.google.cl" + + "oud.discoveryengine.v1alphaB\016UserEventPr" + + "otoP\001ZRcloud.google.com/go/discoveryengi" + + "ne/apiv1alpha/discoveryenginepb;discover" + + "yenginepb\242\002\017DISCOVERYENGINE\252\002$Google.Clo" + + "ud.DiscoveryEngine.V1Alpha\312\002$Google\\Clou" + + "d\\DiscoveryEngine\\V1alpha\352\002\'Google::Clou" + + "d::DiscoveryEngine::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1alpha.CommonProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_descriptor, + new java.lang.String[] { + "EventType", + "UserPseudoId", + "EventTime", + "UserInfo", + "DirectUserRequest", + "SessionId", + "PageInfo", + "AttributionToken", + "Filter", + "Documents", + "Panel", + "SearchInfo", + "CompletionInfo", + "TransactionInfo", + "TagIds", + "PromotionIds", + "Attributes", + "MediaInfo", + }); + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_AttributesEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_AttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_UserEvent_AttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PageInfo_descriptor, + new java.lang.String[] { + "PageviewId", "PageCategory", "Uri", "ReferrerUri", + }); + internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_SearchInfo_descriptor, + new java.lang.String[] { + "SearchQuery", "OrderBy", "Offset", "Offset", + }); + internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_CompletionInfo_descriptor, + new java.lang.String[] { + "SelectedSuggestion", "SelectedPosition", + }); + internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_TransactionInfo_descriptor, + new java.lang.String[] { + "Value", + "Currency", + "TransactionId", + "Tax", + "Cost", + "DiscountValue", + "Value", + "Tax", + "Cost", + "DiscountValue", + }); + internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_DocumentInfo_descriptor, + new java.lang.String[] { + "Id", "Name", "Uri", "Quantity", "PromotionIds", "DocumentDescriptor", "Quantity", + }); + internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_PanelInfo_descriptor, + new java.lang.String[] { + "PanelId", + "DisplayName", + "PanelPosition", + "TotalPanels", + "PanelPosition", + "TotalPanels", + }); + internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1alpha_MediaInfo_descriptor, + new java.lang.String[] { + "MediaProgressDuration", "MediaProgressPercentage", "MediaProgressPercentage", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1alpha.CommonProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceProto.java new file mode 100644 index 000000000000..9cb03a649b29 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserEventServiceProto.java @@ -0,0 +1,167 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public final class UserEventServiceProto { + private UserEventServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_WriteUserEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_WriteUserEventRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1alpha_CollectUserEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1alpha_CollectUserEventRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n=google/cloud/discoveryengine/v1alpha/u" + + "ser_event_service.proto\022$google.cloud.di" + + "scoveryengine.v1alpha\032\034google/api/annota" + + "tions.proto\032\027google/api/client.proto\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/httpbody.proto\032\031google/api/resource.pr" + + "oto\0328google/cloud/discoveryengine/v1alph" + + "a/import_config.proto\0327google/cloud/disc" + + "overyengine/v1alpha/purge_config.proto\0325" + + "google/cloud/discoveryengine/v1alpha/use" + + "r_event.proto\032#google/longrunning/operat" + + "ions.proto\"\271\001\n\025WriteUserEventRequest\022A\n\006" + + "parent\030\001 \001(\tB1\342A\001\002\372A*\n(discoveryengine.g" + + "oogleapis.com/DataStore\022N\n\nuser_event\030\002 " + + "\001(\0132/.google.cloud.discoveryengine.v1alp" + + "ha.UserEventB\004\342A\001\002H\000\210\001\001B\r\n\013_user_event\"\252" + + "\001\n\027CollectUserEventRequest\022A\n\006parent\030\001 \001" + + "(\tB1\342A\001\002\372A*\n(discoveryengine.googleapis." + + "com/DataStore\022\030\n\nuser_event\030\002 \001(\tB\004\342A\001\002\022" + + "\020\n\003uri\030\003 \001(\tH\000\210\001\001\022\020\n\003ets\030\004 \001(\003H\001\210\001\001B\006\n\004_" + + "uriB\006\n\004_ets2\207\014\n\020UserEventService\022\300\002\n\016Wri" + + "teUserEvent\022;.google.cloud.discoveryengi" + + "ne.v1alpha.WriteUserEventRequest\032/.googl" + + "e.cloud.discoveryengine.v1alpha.UserEven" + + "t\"\277\001\202\323\344\223\002\270\001\"F/v1alpha/{parent=projects/*" + + "/locations/*/dataStores/*}/userEvents:wr" + + "ite:\nuser_eventZb\"T/v1alpha/{parent=proj" + + "ects/*/locations/*/collections/*/dataSto" + + "res/*}/userEvents:write:\nuser_event\022\225\002\n\020" + + "CollectUserEvent\022=.google.cloud.discover" + + "yengine.v1alpha.CollectUserEventRequest\032" + + "\024.google.api.HttpBody\"\253\001\202\323\344\223\002\244\001\022H/v1alph" + + "a/{parent=projects/*/locations/*/dataSto" + + "res/*}/userEvents:collectZX\022V/v1alpha/{p" + + "arent=projects/*/locations/*/collections" + + "/*/dataStores/*}/userEvents:collect\022\235\003\n\017" + + "PurgeUserEvents\022<.google.cloud.discovery" + + "engine.v1alpha.PurgeUserEventsRequest\032\035." + + "google.longrunning.Operation\"\254\002\312A|\n + * Information of an end user. + * + * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UserInfo} + */ +public final class UserInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.UserInfo) + UserInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserInfo.newBuilder() to construct. + private UserInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserInfo() { + userId_ = ""; + userAgent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UserInfo.class, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder.class); + } + + public static final int USER_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; + /** + * + * + *
+   * Highly recommended for logged-in users. Unique identifier for logged-in
+   * user, such as a user name. Don't set for anonymous users.
+   *
+   * Always use a hashed value for this ID.
+   *
+   * Don't set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded
+   * model quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_id = 1; + * + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } + } + /** + * + * + *
+   * Highly recommended for logged-in users. Unique identifier for logged-in
+   * user, such as a user name. Don't set for anonymous users.
+   *
+   * Always use a hashed value for this ID.
+   *
+   * Don't set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded
+   * model quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_id = 1; + * + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_AGENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object userAgent_ = ""; + /** + * + * + *
+   * User agent as included in the HTTP header.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This should not be set when using the client side event reporting with
+   * GTM or JavaScript tag in
+   * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+   * or if
+   * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+   * is set.
+   * 
+ * + * string user_agent = 2; + * + * @return The userAgent. + */ + @java.lang.Override + public java.lang.String getUserAgent() { + java.lang.Object ref = userAgent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userAgent_ = s; + return s; + } + } + /** + * + * + *
+   * User agent as included in the HTTP header.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This should not be set when using the client side event reporting with
+   * GTM or JavaScript tag in
+   * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+   * or if
+   * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+   * is set.
+   * 
+ * + * string user_agent = 2; + * + * @return The bytes for userAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserAgentBytes() { + java.lang.Object ref = userAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userAgent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userAgent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.UserInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.UserInfo other = + (com.google.cloud.discoveryengine.v1alpha.UserInfo) obj; + + if (!getUserId().equals(other.getUserId())) return false; + if (!getUserAgent().equals(other.getUserAgent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + hash = (37 * hash) + USER_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getUserAgent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1alpha.UserInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Information of an end user.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.UserInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.UserInfo) + com.google.cloud.discoveryengine.v1alpha.UserInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.UserInfo.class, + com.google.cloud.discoveryengine.v1alpha.UserInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.UserInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = ""; + userAgent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.CommonProto + .internal_static_google_cloud_discoveryengine_v1alpha_UserInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfo build() { + com.google.cloud.discoveryengine.v1alpha.UserInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfo buildPartial() { + com.google.cloud.discoveryengine.v1alpha.UserInfo result = + new com.google.cloud.discoveryengine.v1alpha.UserInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1alpha.UserInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userAgent_ = userAgent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.UserInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.UserInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.UserInfo other) { + if (other == com.google.cloud.discoveryengine.v1alpha.UserInfo.getDefaultInstance()) + return this; + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserAgent().isEmpty()) { + userAgent_ = other.userAgent_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + userAgent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object userId_ = ""; + /** + * + * + *
+     * Highly recommended for logged-in users. Unique identifier for logged-in
+     * user, such as a user name. Don't set for anonymous users.
+     *
+     * Always use a hashed value for this ID.
+     *
+     * Don't set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded
+     * model quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_id = 1; + * + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Highly recommended for logged-in users. Unique identifier for logged-in
+     * user, such as a user name. Don't set for anonymous users.
+     *
+     * Always use a hashed value for this ID.
+     *
+     * Don't set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded
+     * model quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_id = 1; + * + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Highly recommended for logged-in users. Unique identifier for logged-in
+     * user, such as a user name. Don't set for anonymous users.
+     *
+     * Always use a hashed value for this ID.
+     *
+     * Don't set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded
+     * model quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_id = 1; + * + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Highly recommended for logged-in users. Unique identifier for logged-in
+     * user, such as a user name. Don't set for anonymous users.
+     *
+     * Always use a hashed value for this ID.
+     *
+     * Don't set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded
+     * model quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Highly recommended for logged-in users. Unique identifier for logged-in
+     * user, such as a user name. Don't set for anonymous users.
+     *
+     * Always use a hashed value for this ID.
+     *
+     * Don't set the field to the same fixed ID for different users. This mixes
+     * the event history of those users together, which results in degraded
+     * model quality.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 128
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     * 
+ * + * string user_id = 1; + * + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userAgent_ = ""; + /** + * + * + *
+     * User agent as included in the HTTP header.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This should not be set when using the client side event reporting with
+     * GTM or JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+     * or if
+     * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+     * is set.
+     * 
+ * + * string user_agent = 2; + * + * @return The userAgent. + */ + public java.lang.String getUserAgent() { + java.lang.Object ref = userAgent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userAgent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User agent as included in the HTTP header.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This should not be set when using the client side event reporting with
+     * GTM or JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+     * or if
+     * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+     * is set.
+     * 
+ * + * string user_agent = 2; + * + * @return The bytes for userAgent. + */ + public com.google.protobuf.ByteString getUserAgentBytes() { + java.lang.Object ref = userAgent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User agent as included in the HTTP header.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This should not be set when using the client side event reporting with
+     * GTM or JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+     * or if
+     * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+     * is set.
+     * 
+ * + * string user_agent = 2; + * + * @param value The userAgent to set. + * @return This builder for chaining. + */ + public Builder setUserAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userAgent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * User agent as included in the HTTP header.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This should not be set when using the client side event reporting with
+     * GTM or JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+     * or if
+     * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+     * is set.
+     * 
+ * + * string user_agent = 2; + * + * @return This builder for chaining. + */ + public Builder clearUserAgent() { + userAgent_ = getDefaultInstance().getUserAgent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * User agent as included in the HTTP header.
+     *
+     * The field must be a UTF-8 encoded string with a length limit of 1,000
+     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+     *
+     * This should not be set when using the client side event reporting with
+     * GTM or JavaScript tag in
+     * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+     * or if
+     * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+     * is set.
+     * 
+ * + * string user_agent = 2; + * + * @param value The bytes for userAgent to set. + * @return This builder for chaining. + */ + public Builder setUserAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userAgent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.UserInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.UserInfo) + private static final com.google.cloud.discoveryengine.v1alpha.UserInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.UserInfo(); + } + + public static com.google.cloud.discoveryengine.v1alpha.UserInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserInfoOrBuilder.java new file mode 100644 index 000000000000..bdf121901f08 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/UserInfoOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/common.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface UserInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.UserInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Highly recommended for logged-in users. Unique identifier for logged-in
+   * user, such as a user name. Don't set for anonymous users.
+   *
+   * Always use a hashed value for this ID.
+   *
+   * Don't set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded
+   * model quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_id = 1; + * + * @return The userId. + */ + java.lang.String getUserId(); + /** + * + * + *
+   * Highly recommended for logged-in users. Unique identifier for logged-in
+   * user, such as a user name. Don't set for anonymous users.
+   *
+   * Always use a hashed value for this ID.
+   *
+   * Don't set the field to the same fixed ID for different users. This mixes
+   * the event history of those users together, which results in degraded
+   * model quality.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 128
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   * 
+ * + * string user_id = 1; + * + * @return The bytes for userId. + */ + com.google.protobuf.ByteString getUserIdBytes(); + + /** + * + * + *
+   * User agent as included in the HTTP header.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This should not be set when using the client side event reporting with
+   * GTM or JavaScript tag in
+   * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+   * or if
+   * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+   * is set.
+   * 
+ * + * string user_agent = 2; + * + * @return The userAgent. + */ + java.lang.String getUserAgent(); + /** + * + * + *
+   * User agent as included in the HTTP header.
+   *
+   * The field must be a UTF-8 encoded string with a length limit of 1,000
+   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
+   *
+   * This should not be set when using the client side event reporting with
+   * GTM or JavaScript tag in
+   * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
+   * or if
+   * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
+   * is set.
+   * 
+ * + * string user_agent = 2; + * + * @return The bytes for userAgent. + */ + com.google.protobuf.ByteString getUserAgentBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/WriteUserEventRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/WriteUserEventRequest.java new file mode 100644 index 000000000000..1056f4d7348a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/WriteUserEventRequest.java @@ -0,0 +1,955 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +/** + * + * + *
+ * Request message for WriteUserEvent method.
+ * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.WriteUserEventRequest} + */ +public final class WriteUserEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) + WriteUserEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use WriteUserEventRequest.newBuilder() to construct. + private WriteUserEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WriteUserEventRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WriteUserEventRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_WriteUserEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_WriteUserEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.class, + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_EVENT_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1alpha.UserEvent userEvent_; + /** + * + * + *
+   * Required. User event to write.
+   * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userEvent field is set. + */ + @java.lang.Override + public boolean hasUserEvent() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. User event to write.
+   * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userEvent. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvent() { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } + /** + * + * + *
+   * Required. User event to write.
+   * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventOrBuilder() { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUserEvent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserEvent()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest other = + (com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasUserEvent() != other.hasUserEvent()) return false; + if (hasUserEvent()) { + if (!getUserEvent().equals(other.getUserEvent())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasUserEvent()) { + hash = (37 * hash) + USER_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getUserEvent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for WriteUserEvent method.
+   * 
+ * + * Protobuf type {@code google.cloud.discoveryengine.v1alpha.WriteUserEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_WriteUserEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_WriteUserEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.class, + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUserEventFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + userEvent_ = null; + if (userEventBuilder_ != null) { + userEventBuilder_.dispose(); + userEventBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1alpha.UserEventServiceProto + .internal_static_google_cloud_discoveryengine_v1alpha_WriteUserEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest build() { + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest buildPartial() { + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest result = + new com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userEvent_ = userEventBuilder_ == null ? userEvent_ : userEventBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest other) { + if (other + == com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUserEvent()) { + mergeUserEvent(other.getUserEvent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent DataStore resource name, such as
+     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1alpha.UserEvent userEvent_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder> + userEventBuilder_; + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userEvent field is set. + */ + public boolean hasUserEvent() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userEvent. + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvent() { + if (userEventBuilder_ == null) { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } else { + return userEventBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserEvent(com.google.cloud.discoveryengine.v1alpha.UserEvent value) { + if (userEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userEvent_ = value; + } else { + userEventBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserEvent( + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder builderForValue) { + if (userEventBuilder_ == null) { + userEvent_ = builderForValue.build(); + } else { + userEventBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserEvent(com.google.cloud.discoveryengine.v1alpha.UserEvent value) { + if (userEventBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && userEvent_ != null + && userEvent_ + != com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance()) { + getUserEventBuilder().mergeFrom(value); + } else { + userEvent_ = value; + } + } else { + userEventBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserEvent() { + bitField0_ = (bitField0_ & ~0x00000002); + userEvent_ = null; + if (userEventBuilder_ != null) { + userEventBuilder_.dispose(); + userEventBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder getUserEventBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventOrBuilder() { + if (userEventBuilder_ != null) { + return userEventBuilder_.getMessageOrBuilder(); + } else { + return userEvent_ == null + ? com.google.cloud.discoveryengine.v1alpha.UserEvent.getDefaultInstance() + : userEvent_; + } + } + /** + * + * + *
+     * Required. User event to write.
+     * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder> + getUserEventFieldBuilder() { + if (userEventBuilder_ == null) { + userEventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.discoveryengine.v1alpha.UserEvent, + com.google.cloud.discoveryengine.v1alpha.UserEvent.Builder, + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder>( + getUserEvent(), getParentForChildren(), isClean()); + userEvent_ = null; + } + return userEventBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) + private static final com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest(); + } + + public static com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteUserEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/WriteUserEventRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/WriteUserEventRequestOrBuilder.java new file mode 100644 index 000000000000..b0c8a586b68a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/WriteUserEventRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/discoveryengine/v1alpha/user_event_service.proto + +package com.google.cloud.discoveryengine.v1alpha; + +public interface WriteUserEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.WriteUserEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent DataStore resource name, such as
+   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User event to write.
+   * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userEvent field is set. + */ + boolean hasUserEvent(); + /** + * + * + *
+   * Required. User event to write.
+   * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userEvent. + */ + com.google.cloud.discoveryengine.v1alpha.UserEvent getUserEvent(); + /** + * + * + *
+   * Required. User event to write.
+   * 
+ * + * + * optional .google.cloud.discoveryengine.v1alpha.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1alpha.UserEventOrBuilder getUserEventOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/common.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/common.proto new file mode 100644 index 000000000000..927770088343 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/common.proto @@ -0,0 +1,155 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/Branch" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}" +}; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/DataStore" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}" +}; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/ServingConfig" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}" +}; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/SiteSearchEngine", + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine" +}; + +// The type of solution. +enum SolutionType { + // Default value. + SOLUTION_TYPE_UNSPECIFIED = 0; + + // Used for Recommendations AI. + SOLUTION_TYPE_RECOMMENDATION = 1; + + // Used for Discovery Search. + SOLUTION_TYPE_SEARCH = 2; + + // Used for use cases related to the Generative AI agent. + SOLUTION_TYPE_CHAT = 3; +} + +// A floating point interval. +message Interval { + // The lower bound of the interval. If neither of the min fields are + // set, then the lower bound is negative infinity. + // + // This field must be not larger than max. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + oneof min { + // Inclusive lower bound. + double minimum = 1; + + // Exclusive lower bound. + double exclusive_minimum = 2; + } + + // The upper bound of the interval. If neither of the max fields are + // set, then the upper bound is positive infinity. + // + // This field must be not smaller than min. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + oneof max { + // Inclusive upper bound. + double maximum = 3; + + // Exclusive upper bound. + double exclusive_maximum = 4; + } +} + +// A custom attribute that is not explicitly modeled in a resource, e.g. +// [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent]. +message CustomAttribute { + // The textual values of this custom attribute. For example, `["yellow", + // "green"]` when the key is "color". + // + // Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is + // returned. + // + // Exactly one of + // [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] + // or + // [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] + // should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + repeated string text = 1; + + // The numerical values of this custom attribute. For example, `[2.3, 15.4]` + // when the key is "lengths_cm". + // + // Exactly one of + // [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text] + // or + // [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers] + // should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + repeated double numbers = 2; +} + +// Information of an end user. +message UserInfo { + // Highly recommended for logged-in users. Unique identifier for logged-in + // user, such as a user name. Don't set for anonymous users. + // + // Always use a hashed value for this ID. + // + // Don't set the field to the same fixed ID for different users. This mixes + // the event history of those users together, which results in degraded + // model quality. + // + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + string user_id = 1; + + // User agent as included in the HTTP header. + // + // The field must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + // + // This should not be set when using the client side event reporting with + // GTM or JavaScript tag in + // [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent] + // or if + // [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request] + // is set. + string user_agent = 2; +} + +// Double list. +message DoubleList { + // Double values. + repeated double values = 1; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/completion_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/completion_service.proto new file mode 100644 index 000000000000..d035688e3bc6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/completion_service.proto @@ -0,0 +1,134 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "CompletionServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for Auto-Completion. +service CompletionService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Completes the specified user input with keyword suggestions. + rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { + option (google.api.http) = { + get: "/v1alpha/{data_store=projects/*/locations/*/dataStores/*}:completeQuery" + additional_bindings { + get: "/v1alpha/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery" + } + }; + } +} + +// Request message for +// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] +// method. +message CompleteQueryRequest { + // Required. The parent data store resource name for which the completion is + // performed, such as + // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + string data_store = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. The typeahead input used to fetch suggestions. Maximum length is + // 128 characters. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Selects data model of query suggestions for serving. Currently supported + // values: + // + // * `document` - Using suggestions generated from user-imported documents. + // * `search-history` - Using suggestions generated from the past history of + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + // API calls. Do not use it when there is no traffic for Search API. + // * `user-event` - Using suggestions generated from user-imported search + // events. + // * `document-completable` - Using suggestions taken directly from + // user-imported document fields marked as completable. + // + // Default values: + // + // * `document` is the default model for regular dataStores. + // * `search-history` is the default model for site search dataStores. + string query_model = 3; + + // A unique identifier for tracking visitors. For example, this could be + // implemented with an HTTP cookie, which should be able to uniquely identify + // a visitor on a single device. This unique identifier should not change if + // the visitor logs in or out of the website. + // + // This field should NOT have a fixed value such as `unknown_visitor`. + // + // This should be the same identifier as + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + // and + // [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.SearchRequest.user_pseudo_id]. + // + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + string user_pseudo_id = 4; + + // Indicates if tail suggestions should be returned if there are no + // suggestions that match the full query. Even if set to true, if there are + // suggestions that match the full query, those are returned and no + // tail suggestions are returned. + bool include_tail_suggestions = 5; +} + +// Response message for +// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] +// method. +message CompleteQueryResponse { + // Suggestions as search queries. + message QuerySuggestion { + // The suggestion for the query. + string suggestion = 1; + + // The unique document field paths that serve as the source of this + // suggestion if it was generated from completable fields. + // + // This field is only populated for the document-completable model. + repeated string completable_field_paths = 2; + } + + // Results of the matched query suggestions. The result list is ordered and + // the first result is a top suggestion. + repeated QuerySuggestion query_suggestions = 1; + + // True if the returned suggestions are all tail suggestions. + // + // For tail matching to be triggered, include_tail_suggestions in the request + // must be true and there must be no suggestions that match the full query. + bool tail_match_triggered = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/conversation.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/conversation.proto new file mode 100644 index 000000000000..8da3bdeb4efa --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/conversation.proto @@ -0,0 +1,138 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/search_service.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "ConversationProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// External conversation proto definition. +message Conversation { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/Conversation" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}" + }; + + // Enumeration of the state of the conversation. + enum State { + // Unknown. + STATE_UNSPECIFIED = 0; + + // Conversation is currently open. + IN_PROGRESS = 1; + + // Conversation has been completed. + COMPLETED = 2; + } + + // Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The state of the Conversation. + State state = 2; + + // A unique identifier for tracking users. + string user_pseudo_id = 3; + + // Conversation messages. + repeated ConversationMessage messages = 4; + + // Output only. The time the conversation started. + google.protobuf.Timestamp start_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the conversation finished. + google.protobuf.Timestamp end_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Defines a reply message to user. +message Reply { + // Defines reference in reply. + message Reference { + option deprecated = true; + + // URI link reference. + string uri = 1; + + // Anchor text. + string anchor_text = 2; + + // Anchor text start index. + int32 start = 3; + + // Anchor text end index. + int32 end = 4; + } + + // DEPRECATED: use `summary` instead. + // Text reply. + string reply = 1 [deprecated = true]; + + // References in the reply. + repeated Reference references = 2 [deprecated = true]; + + // Summary based on search results. + SearchResponse.Summary summary = 3; +} + +// Defines context of the conversation +message ConversationContext { + // The current list of documents the user is seeing. + // It contains the document resource references. + repeated string context_documents = 1; + + // The current active document the user opened. + // It contains the document resource reference. + string active_document = 2; +} + +// Defines text input. +message TextInput { + // Text input. + string input = 1; + + // Conversation context of the input. + ConversationContext context = 2; +} + +// Defines a conversation message. +message ConversationMessage { + oneof message { + // User text input. + TextInput user_input = 1; + + // Search reply. + Reply reply = 2; + } + + // Output only. Message creation timestamp. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto new file mode 100644 index 000000000000..ffa61ad43edc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto @@ -0,0 +1,306 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/conversation.proto"; +import "google/cloud/discoveryengine/v1alpha/search_service.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "ConversationalSearchServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for conversational search. +service ConversationalSearchService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Converses a conversation. + rpc ConverseConversation(ConverseConversationRequest) + returns (ConverseConversationResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse" + body: "*" + additional_bindings { + post: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse" + body: "*" + } + }; + option (google.api.method_signature) = "name,query"; + } + + // Creates a Conversation. + // + // If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to + // create already exists, an ALREADY_EXISTS error is returned. + rpc CreateConversation(CreateConversationRequest) returns (Conversation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/conversations" + body: "conversation" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations" + body: "conversation" + } + }; + option (google.api.method_signature) = "parent,conversation"; + } + + // Deletes a Conversation. + // + // If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to + // delete does not exist, a NOT_FOUND error is returned. + rpc DeleteConversation(DeleteConversationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/dataStores/*/conversations/*}" + additional_bindings { + delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates a Conversation. + // + // [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action + // type cannot be changed. If the + // [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update + // does not exist, a NOT_FOUND error is returned. + rpc UpdateConversation(UpdateConversationRequest) returns (Conversation) { + option (google.api.http) = { + patch: "/v1alpha/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}" + body: "conversation" + additional_bindings { + patch: "/v1alpha/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}" + body: "conversation" + } + }; + option (google.api.method_signature) = "conversation,update_mask"; + } + + // Gets a Conversation. + rpc GetConversation(GetConversationRequest) returns (Conversation) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/conversations/*}" + additional_bindings { + get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists all Conversations by their parent + // [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + rpc ListConversations(ListConversationsRequest) + returns (ListConversationsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/conversations" + additional_bindings { + get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations" + } + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for +// [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] +// method. +message ConverseConversationRequest { + // Required. The resource name of the Conversation to get. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. + // Use + // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` + // to activate auto session mode, which automatically creates a new + // conversation inside a ConverseConversation session. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Conversation" + } + ]; + + // Required. Current user input. + TextInput query = 2 [(google.api.field_behavior) = REQUIRED]; + + // The resource name of the Serving Config to use. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` + // If this is not set, the default serving config will be used. + string serving_config = 3 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/ServingConfig" + }]; + + // The conversation to be used by auto session only. The name field will be + // ignored as we automatically assign new name for the conversation in auto + // session. + Conversation conversation = 5; + + // Whether to turn on safe search. + bool safe_search = 6; + + // The user labels applied to a resource must meet the following requirements: + // + // * Each resource can have multiple labels, up to a maximum of 64. + // * Each label must be a key-value pair. + // * Keys have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a maximum + // length of 63 characters. + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. All characters must use UTF-8 encoding, and + // international characters are allowed. + // * The key portion of a label must be unique. However, you can use the same + // key with multiple resources. + // * Keys must start with a lowercase letter or international character. + // + // See [Google Cloud + // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + map user_labels = 7; + + // A specification for configuring the summary returned in the response. + SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8; +} + +// Response message for +// [ConversationalSearchService.ConverseConversation][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.ConverseConversation] +// method. +message ConverseConversationResponse { + // Answer to the current query. + Reply reply = 1; + + // Updated conversation including the answer. + Conversation conversation = 2; + + // Suggested related questions. + repeated string related_questions = 6; + + // Search Results. + repeated SearchResponse.SearchResult search_results = 3; +} + +// Request for CreateConversation method. +message CreateConversationRequest { + // Required. Full resource name of parent data store. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. The conversation to create. + Conversation conversation = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for UpdateConversation method. +message UpdateConversationRequest { + // Required. The Conversation to update. + Conversation conversation = 1 [(google.api.field_behavior) = REQUIRED]; + + // Indicates which fields in the provided + // [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to + // update. The following are NOT supported: + // + // * [conversation.name][] + // + // If not set or empty, all supported fields are updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request for DeleteConversation method. +message DeleteConversationRequest { + // Required. The resource name of the Conversation to delete. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Conversation" + } + ]; +} + +// Request for GetConversation method. +message GetConversationRequest { + // Required. The resource name of the Conversation to get. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Conversation" + } + ]; +} + +// Request for ListConversations method. +message ListConversationsRequest { + // Required. The data store resource name. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Maximum number of results to return. If unspecified, defaults + // to 50. Max allowed value is 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListConversations` call. + // Provide this to retrieve the subsequent page. + string page_token = 3; + + // A filter to apply on the list results. The supported features are: + // user_pseudo_id, state. + // + // Example: + // "user_pseudo_id = some_id" + string filter = 4; + + // A comma-separated list of fields to order by, sorted in ascending order. + // Use "desc" after a field name for descending. + // Supported fields: + // * `update_time` + // * `create_time` + // * `conversation_name` + // + // Example: + // "update_time desc" + // "create_time" + string order_by = 5; +} + +// Response for ListConversations method. +message ListConversationsResponse { + // All the Conversations for a given data store. + repeated Conversation conversations = 1; + + // Pagination token, if not returned indicates the last page. + string next_page_token = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document.proto new file mode 100644 index 000000000000..eb93e786f3fb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document.proto @@ -0,0 +1,121 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "DocumentProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Document captures all raw metadata information of items to be recommended or +// searched. +message Document { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/Document" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}" + }; + + // Unstructured data linked to this document. + message Content { + oneof content { + // The content represented as a stream of bytes. The maximum length is + // 1,000,000 bytes (1 MB / ~0.95 MiB). + // + // Note: As with all `bytes` fields, this field is represented as pure + // binary in Protocol Buffers and base64-encoded string in JSON. For + // example, `abc123!?$*&()'-=@~` should be represented as + // `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. + bytes raw_bytes = 2; + + // The URI of the content. Only Cloud Storage URIs (e.g. + // `gs://bucket-name/path/to/file`) are supported. The maximum file size + // is 100 MB. + string uri = 3; + } + + // The MIME type of the content. Supported types: + // + // * `application/pdf` (PDF, only native PDFs are supported for now) + // * `text/html` (HTML) + // * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) + // * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) + // * `text/plain` (TXT) + // + // See https://www.iana.org/assignments/media-types/media-types.xhtml. + string mime_type = 1; + } + + // Data representation. One of + // [struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data] or + // [json_data][google.cloud.discoveryengine.v1alpha.Document.json_data] should + // be provided otherwise an `INVALID_ARGUMENT` error is thrown. + oneof data { + // The structured JSON data for the document. It should conform to the + // registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an + // `INVALID_ARGUMENT` error is thrown. + google.protobuf.Struct struct_data = 4; + + // The JSON string representation of the document. It should conform to the + // registered [Schema][google.cloud.discoveryengine.v1alpha.Schema] or an + // `INVALID_ARGUMENT` error is thrown. + string json_data = 5; + } + + // Immutable. The full resource name of the document. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. + // + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The identifier of the document. + // + // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + // standard with a length limit of 63 characters. + string id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // The identifier of the schema located in the same data store. + string schema_id = 3; + + // The unstructured data linked to this document. Content must be set if this + // document is under a + // `CONTENT_REQUIRED` data store. + Content content = 10; + + // The identifier of the parent document. Currently supports at most two level + // document hierarchy. + // + // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + // standard with a length limit of 63 characters. + string parent_document_id = 7; + + // Output only. This field is OUTPUT_ONLY. + // It contains derived data that are not in the original input document. + google.protobuf.Struct derived_struct_data = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document_service.proto new file mode 100644 index 000000000000..84dfae08727d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/document_service.proto @@ -0,0 +1,318 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/document.proto"; +import "google/cloud/discoveryengine/v1alpha/import_config.proto"; +import "google/cloud/discoveryengine/v1alpha/purge_config.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "DocumentServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for ingesting +// [Document][google.cloud.discoveryengine.v1alpha.Document] information of the +// customer's website. +service DocumentService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets a [Document][google.cloud.discoveryengine.v1alpha.Document]. + rpc GetDocument(GetDocumentRequest) returns (Document) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}" + additional_bindings { + get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s. + rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents" + additional_bindings { + get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + rpc CreateDocument(CreateDocumentRequest) returns (Document) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents" + body: "document" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents" + body: "document" + } + }; + option (google.api.method_signature) = "parent,document,document_id"; + } + + // Updates a [Document][google.cloud.discoveryengine.v1alpha.Document]. + rpc UpdateDocument(UpdateDocumentRequest) returns (Document) { + option (google.api.http) = { + patch: "/v1alpha/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}" + body: "document" + additional_bindings { + patch: "/v1alpha/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}" + body: "document" + } + }; + } + + // Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document]. + rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}" + additional_bindings { + delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Bulk import of multiple + // [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request + // processing may be synchronous. Non-existing items will be created. + // + // Note: It is possible for a subset of the + // [Document][google.cloud.discoveryengine.v1alpha.Document]s to be + // successfully updated. + rpc ImportDocuments(ImportDocumentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse" + metadata_type: "google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata" + }; + } + + // Permanently deletes all selected + // [Document][google.cloud.discoveryengine.v1alpha.Document]s in a branch. + // + // This process is asynchronous. Depending on the number of + // [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, + // this operation can take hours to complete. Before the delete operation + // completes, some [Document][google.cloud.discoveryengine.v1alpha.Document]s + // might still be returned by + // [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] + // or + // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]. + // + // To get a list of the + // [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, + // set + // [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force] + // to false. + rpc PurgeDocuments(PurgeDocumentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse" + metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata" + }; + } +} + +// Request message for +// [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument] +// method. +message GetDocumentRequest { + // Required. Full resource name of + // [Document][google.cloud.discoveryengine.v1alpha.Document], such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + // + // If the caller does not have permission to access the + // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of + // whether or not it exists, a `PERMISSION_DENIED` error is returned. + // + // If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] + // does not exist, a `NOT_FOUND` error is returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + } + ]; +} + +// Request message for +// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] +// method. +message ListDocumentsRequest { + // Required. The parent branch resource name, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + // Use `default_branch` as the branch ID, to list documents under the default + // branch. + // + // If the caller does not have permission to list + // [Document][google.cloud.discoveryengine.v1alpha.Document]s under this + // branch, regardless of whether or not this branch exists, a + // `PERMISSION_DENIED` error is returned. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Branch" + } + ]; + + // Maximum number of + // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If + // unspecified, defaults to 100. The maximum allowed value is 1000. Values + // above 1000 will be coerced to 1000. + // + // If this field is negative, an `INVALID_ARGUMENT` error is returned. + int32 page_size = 2; + + // A page token + // [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token], + // received from a previous + // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] + // must match the call that provided the page token. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + string page_token = 3; +} + +// Response message for +// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments] +// method. +message ListDocumentsResponse { + // The [Document][google.cloud.discoveryengine.v1alpha.Document]s. + repeated Document documents = 1; + + // A token that can be sent as + // [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument] +// method. +message CreateDocumentRequest { + // Required. The parent resource name, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Branch" + } + ]; + + // Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to + // create. + Document document = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the + // [Document][google.cloud.discoveryengine.v1alpha.Document], which will + // become the final component of the + // [Document.name][google.cloud.discoveryengine.v1alpha.Document.name]. + // + // If the caller does not have permission to create the + // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of + // whether or not it exists, a `PERMISSION_DENIED` error is returned. + // + // This field must be unique among all + // [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same + // [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. + // Otherwise, an `ALREADY_EXISTS` error is returned. + // + // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + // standard with a length limit of 63 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + string document_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument] +// method. +message UpdateDocumentRequest { + // Required. The document to update/create. + // + // If the caller does not have permission to update the + // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of + // whether or not it exists, a `PERMISSION_DENIED` error is returned. + // + // If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update + // does not exist and + // [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing] + // is not set, a `NOT_FOUND` error is returned. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set to true, and the + // [Document][google.cloud.discoveryengine.v1alpha.Document] is not found, a + // new [Document][google.cloud.discoveryengine.v1alpha.Document] will be + // created. + bool allow_missing = 2; +} + +// Request message for +// [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument] +// method. +message DeleteDocumentRequest { + // Required. Full resource name of + // [Document][google.cloud.discoveryengine.v1alpha.Document], such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. + // + // If the caller does not have permission to delete the + // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of + // whether or not it exists, a `PERMISSION_DENIED` error is returned. + // + // If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete + // does not exist, a `NOT_FOUND` error is returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + } + ]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/import_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/import_config.proto new file mode 100644 index 000000000000..8902565bad38 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/import_config.proto @@ -0,0 +1,343 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/document.proto"; +import "google/cloud/discoveryengine/v1alpha/user_event.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/date.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "ImportConfigProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Cloud Storage location for input content. +message GcsSource { + // Required. Cloud Storage URIs to input files. URI can be up to + // 2000 characters long. URIs can match the full object path (for example, + // `gs://bucket/directory/object.json`) or a pattern matching one or more + // files, such as `gs://bucket/directory/*.json`. + // + // A request can contain at most 100 files (or 100,000 files if `data_schema` + // is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + // `content`). + repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED]; + + // The schema to use when parsing the data from the source. + // + // Supported values for document imports: + // + // * `document` (default): One JSON + // [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each + // document must + // have a valid + // [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]. + // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + // `input_uris` becomes a document, with the ID set to the first 128 + // bits of SHA256(URI) encoded as a hex string. + // * `custom`: One custom data JSON per row in arbitrary format that conforms + // to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of + // the data store. This can only be used by Gen App Builder. + // * `csv`: A CSV file with header conforming to the defined + // [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the + // data store. Each entry after the header is imported as a Document. + // This can only be used by Gen App Builder. + // + // Supported values for user even imports: + // + // * `user_event` (default): One JSON + // [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line. + string data_schema = 2; +} + +// BigQuery source import data from. +message BigQuerySource { + // BigQuery table partition info. Leave this empty if the BigQuery table + // is not partitioned. + oneof partition { + // BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + google.type.Date partition_date = 5; + } + + // The project ID (can be project # or ID) that the BigQuery source is in with + // a length limit of 128 characters. If not specified, inherits the project + // ID from the parent request. + string project_id = 1; + + // Required. The BigQuery data set to copy the data from with a length limit + // of 1,024 characters. + string dataset_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery table to copy the data from with a length limit of + // 1,024 characters. + string table_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Intermediate Cloud Storage directory used for the import with a length + // limit of 2,000 characters. Can be specified if one wants to have the + // BigQuery export to a specific Cloud Storage directory. + string gcs_staging_dir = 4; + + // The schema to use when parsing the data from the source. + // + // Supported values for user event imports: + // + // * `user_event` (default): One + // [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row. + // + // Supported values for document imports: + // + // * `document` (default): One + // [Document][google.cloud.discoveryengine.v1alpha.Document] format per + // row. Each document must have a valid + // [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one + // of + // [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data] + // or + // [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data]. + // * `custom`: One custom data per row in arbitrary format that conforms to + // the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the + // data store. This can only be used by Gen App Builder. + string data_schema = 6; +} + +// Configuration of destination for Import related errors. +message ImportErrorConfig { + // Required. Errors destination. + oneof destination { + // Cloud Storage prefix for import errors. This must be an empty, + // existing Cloud Storage directory. Import errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + string gcs_prefix = 1; + } +} + +// Request message for the ImportUserEvents request. +message ImportUserEventsRequest { + // The inline source for the input config for ImportUserEvents method. + message InlineSource { + // Required. A list of user events to import. Recommended max of 10k items. + repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Required - The desired input source of the user event data. + oneof source { + // The Inline source for the input content for UserEvents. + InlineSource inline_source = 2; + + // Cloud Storage location for the input content. + GcsSource gcs_source = 3; + + // BigQuery input source. + BigQuerySource bigquery_source = 4; + } + + // Required. Parent DataStore resource name, of the form + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // The desired location of errors incurred during the Import. Cannot be set + // for inline user event imports. + ImportErrorConfig error_config = 5; +} + +// Response of the ImportUserEventsRequest. If the long running +// operation was successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was successful. +message ImportUserEventsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; + + // Echoes the destination for the complete errors if this field was set in + // the request. + ImportErrorConfig error_config = 2; + + // Count of user events imported with complete existing Documents. + int64 joined_events_count = 3; + + // Count of user events imported, but with Document information not found + // in the existing Branch. + int64 unjoined_events_count = 4; +} + +// Metadata related to the progress of the Import operation. This is +// returned by the google.longrunning.Operation.metadata field. +message ImportUserEventsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were processed successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} + +// Metadata related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +message ImportDocumentsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were processed successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} + +// Request message for Import methods. +message ImportDocumentsRequest { + // The inline source for the input config for ImportDocuments method. + message InlineSource { + // Required. A list of documents to update/create. Each document must have a + // valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]. + // Recommended max of 100 items. + repeated Document documents = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Indicates how imported documents are reconciled with the existing documents + // created or imported before. + enum ReconciliationMode { + // Defaults to `INCREMENTAL`. + RECONCILIATION_MODE_UNSPECIFIED = 0; + + // Inserts new documents or updates existing documents. + INCREMENTAL = 1; + + // Calculates diff and replaces the entire document dataset. Existing + // documents may be deleted if they are not present in the source location. + FULL = 2; + } + + // Required. The source of the input. + oneof source { + // The Inline source for the input content for documents. + InlineSource inline_source = 2; + + // Cloud Storage location for the input content. + GcsSource gcs_source = 3; + + // BigQuery input source. + BigQuerySource bigquery_source = 4; + } + + // Required. The parent branch resource name, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + // Requires create/update permission. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Branch" + } + ]; + + // The desired location of errors incurred during the Import. + ImportErrorConfig error_config = 5; + + // The mode of reconciliation between existing documents and the documents to + // be imported. Defaults to + // [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + ReconciliationMode reconciliation_mode = 6; + + // Whether to automatically generate IDs for the documents if absent. + // + // If set to `true`, + // [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s are + // automatically generated based on the hash of the payload, where IDs may not + // be consistent during multiple imports. In which case + // [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL] + // is highly recommended to avoid duplicate contents. If unset or set to + // `false`, [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s + // have to be specified using + // [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field], + // otherwise, documents without IDs fail to be imported. + // + // Only set this field when using + // [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or + // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and + // when + // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] + // or + // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] + // is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + bool auto_generate_ids = 8; + + // The field in the Cloud Storage and BigQuery sources that indicates the + // unique IDs of the documents. + // + // For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the + // key of the JSON field. For instance, `my_id` for JSON `{"my_id": + // "some_uuid"}`. For + // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is + // the column name of the BigQuery table where the unique ids are stored. + // + // The values of the JSON field or the BigQuery column are used as the + // [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON + // field or the BigQuery column must be of string type, and the values must be + // set as valid strings conform to + // [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. + // Otherwise, documents without valid IDs fail to be imported. + // + // Only set this field when using + // [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or + // [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and + // when + // [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema] + // or + // [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema] + // is `custom`. And only set this field when + // [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids] + // is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. + // + // If it is unset, a default value `_id` is used when importing from the + // allowed data sources. + string id_field = 9; +} + +// Response of the +// [ImportDocumentsRequest][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest]. +// If the long running operation is done, then this message is returned by the +// google.longrunning.Operations.response field if the operation was successful. +message ImportDocumentsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; + + // Echoes the destination for the complete errors in the request if set. + ImportErrorConfig error_config = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/purge_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/purge_config.proto new file mode 100644 index 000000000000..ae6158bf2a7d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/purge_config.proto @@ -0,0 +1,159 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "PurgeConfigProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Request message for PurgeUserEvents method. +message PurgeUserEventsRequest { + // Required. The resource name of the catalog under which the events are + // created. The format is + // `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. The filter string to specify the events to be deleted with a + // length limit of 5,000 characters. The eligible fields for filtering are: + // + // * `eventType`: Double quoted + // [UserEvent.event_type][google.cloud.discoveryengine.v1alpha.UserEvent.event_type] + // string. + // * `eventTime`: in ISO 8601 "zulu" format. + // * `userPseudoId`: Double quoted string. Specifying this will delete all + // events associated with a visitor. + // * `userId`: Double quoted string. Specifying this will delete all events + // associated with a user. + // + // Examples: + // + // * Deleting all events in a time range: + // `eventTime > "2012-04-23T18:25:43.511Z" + // eventTime < "2012-04-23T18:30:43.511Z"` + // * Deleting specific eventType: + // `eventType = "search"` + // * Deleting all events for a specific visitor: + // `userPseudoId = "visitor1024"` + // * Deleting all events inside a DataStore: + // `*` + // + // The filtering fields are assumed to have an implicit AND. + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // The `force` field is currently not supported. Purge user event requests + // will permanently delete all purgeable events. Once the development is + // complete: + // If `force` is set to false, the method will return the expected + // purge count without deleting any user events. This field will default to + // false if not included in the request. + bool force = 3; +} + +// Response of the PurgeUserEventsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +message PurgeUserEventsResponse { + // The total count of events purged as a result of the operation. + int64 purge_count = 1; +} + +// Metadata related to the progress of the PurgeUserEvents operation. +// This will be returned by the google.longrunning.Operation.metadata field. +message PurgeUserEventsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were deleted successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} + +// Request message for +// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] +// method. +message PurgeDocumentsRequest { + // Required. The parent resource name, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Branch" + } + ]; + + // Required. Filter matching documents to purge. Only currently supported + // value is + // `*` (all items). + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Actually performs the purge. If `force` is set to false, return the + // expected purge count without deleting any documents. + bool force = 3; +} + +// Response message for +// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments] +// method. If the long running operation is successfully done, then this message +// is returned by the google.longrunning.Operations.response field. +message PurgeDocumentsResponse { + // The total count of documents purged as a result of the operation. + int64 purge_count = 1; + + // A sample of document names that will be deleted. Only populated if `force` + // is set to false. A max of 100 names will be returned and the names are + // chosen at random. + repeated string purge_sample = 2 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + }]; +} + +// Metadata related to the progress of the PurgeDocuments operation. +// This will be returned by the google.longrunning.Operation.metadata field. +message PurgeDocumentsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were deleted successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/recommendation_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/recommendation_service.proto new file mode 100644 index 000000000000..65206827606c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/recommendation_service.proto @@ -0,0 +1,221 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/document.proto"; +import "google/cloud/discoveryengine/v1alpha/user_event.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "RecommendationServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for making recommendations. +service RecommendationService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Makes a recommendation, which requires a contextual user event. + rpc Recommend(RecommendRequest) returns (RecommendResponse) { + option (google.api.http) = { + post: "/v1alpha/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend" + body: "*" + additional_bindings { + post: "/v1alpha/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:recommend" + body: "*" + } + additional_bindings { + post: "/v1alpha/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:recommend" + body: "*" + } + }; + } +} + +// Request message for Recommend method. +message RecommendRequest { + // Required. Full resource name of the format: + // `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + // + // Before you can request recommendations from your model, you must create at + // least one serving config for it. + string serving_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/ServingConfig" + } + ]; + + // Required. Context about the user, what they are looking at and what action + // they took to trigger the Recommend request. Note that this user event + // detail won't be ingested to userEvent logs. Thus, a separate userEvent + // write request is required for event logging. + // + // Don't set + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + // or + // [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id] + // to the same fixed ID for different users. If you are trying to receive + // non-personalized recommendations (not recommended; this can negatively + // impact model performance), instead set + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + // to a random unique ID and leave + // [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1alpha.UserInfo.user_id] + // unset. + UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // Maximum number of results to return. Set this property + // to the number of recommendation results needed. If zero, the service will + // choose a reasonable default. The maximum allowed value is 100. Values + // above 100 will be coerced to 100. + int32 page_size = 3; + + // Filter for restricting recommendation results with a length limit of 5,000 + // characters. Currently, only filter expressions on the `filter_tags` + // attribute is supported. + // + // + // Examples: + // + // * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + // * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + // + // If `attributeFilteringSyntax` is set to true under the `params` field, then + // attribute-based expressions are expected instead of the above described + // tag-based syntax. Examples: + // + // * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + // * (available: true) AND + // (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + // + // If your filter blocks all results, the API will return generic + // (unfiltered) popular Documents. If you only want results strictly matching + // the filters, set `strictFiltering` to True in + // [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params] + // to receive empty results instead. + // + // Note that the API will never return + // [Document][google.cloud.discoveryengine.v1alpha.Document]s with + // `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + string filter = 4; + + // Use validate only mode for this recommendation query. If set to true, a + // fake model will be used that returns arbitrary Document IDs. + // Note that the validate only mode should only be used for testing the API, + // or if the model is not ready. + bool validate_only = 5; + + // Additional domain specific parameters for the recommendations. + // + // Allowed values: + // + // * `returnDocument`: Boolean. If set to true, the associated Document + // object will be returned in + // [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.document]. + // * `returnScore`: Boolean. If set to true, the recommendation 'score' + // corresponding to each returned Document will be set in + // [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult.metadata]. + // The given 'score' indicates the probability of a Document conversion + // given the user's context and history. + // * `strictFiltering`: Boolean. True by default. If set to false, the service + // will return generic (unfiltered) popular Documents instead of empty if + // your filter blocks all recommendation results. + // * `diversityLevel`: String. Default empty. If set to be non-empty, then + // it needs to be one of: + // * `no-diversity` + // * `low-diversity` + // * `medium-diversity` + // * `high-diversity` + // * `auto-diversity` + // This gives request-level control and adjusts recommendation results + // based on Document category. + // * `attributeFilteringSyntax`: Boolean. False by default. If set to true, + // the `filter` field is interpreted according to the new, + // attribute-based syntax. + map params = 6; + + // The user labels applied to a resource must meet the following requirements: + // + // * Each resource can have multiple labels, up to a maximum of 64. + // * Each label must be a key-value pair. + // * Keys have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a maximum + // length of 63 characters. + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. All characters must use UTF-8 encoding, and + // international characters are allowed. + // * The key portion of a label must be unique. However, you can use the same + // key with multiple resources. + // * Keys must start with a lowercase letter or international character. + // + // See [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + map user_labels = 8; +} + +// Response message for Recommend method. +message RecommendResponse { + // RecommendationResult represents a generic recommendation result with + // associated metadata. + message RecommendationResult { + // Resource ID of the recommended Document. + string id = 1; + + // Set if `returnDocument` is set to true in + // [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]. + Document document = 2; + + // Additional Document metadata / annotations. + // + // Possible values: + // + // * `score`: Recommendation score in double value. Is set if + // `returnScore` is set to true in + // [RecommendRequest.params][google.cloud.discoveryengine.v1alpha.RecommendRequest.params]. + map metadata = 3; + } + + // A list of recommended Documents. The order represents the ranking (from the + // most relevant Document to the least). + repeated RecommendationResult results = 1; + + // A unique attribution token. This should be included in the + // [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting + // from this recommendation, which enables accurate attribution of + // recommendation model performance. + string attribution_token = 2; + + // IDs of documents in the request that were missing from the default Branch + // associated with the requested ServingConfig. + repeated string missing_ids = 3; + + // True if + // [RecommendRequest.validate_only][google.cloud.discoveryengine.v1alpha.RecommendRequest.validate_only] + // was set. + bool validate_only = 4; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/schema.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/schema.proto new file mode 100644 index 000000000000..1c073962aa4d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/schema.proto @@ -0,0 +1,312 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SchemaProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Defines the structure and layout of a type of document data. +message Schema { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/Schema" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}" + }; + + // Schema representation. One of + // [struct_schema][google.cloud.discoveryengine.v1alpha.Schema.struct_schema] + // or [json_schema][google.cloud.discoveryengine.v1alpha.Schema.json_schema] + // should be provided otherwise an `INVALID_ARGUMENT` error is thrown. + oneof schema { + // The structured representation of the schema. + google.protobuf.Struct struct_schema = 2; + + // The JSON representation of the schema. + string json_schema = 3; + } + + // Immutable. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + // + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Configurations for fields of the schema. + repeated FieldConfig field_configs = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configurations for fields of a schema. For example, configuring a field is +// indexable, or searchable. +message FieldConfig { + // Field value type in the Schema. + enum FieldType { + // Field type is unspecified. + FIELD_TYPE_UNSPECIFIED = 0; + + // Field value type is Object. + OBJECT = 1; + + // Field value type is String. + STRING = 2; + + // Field value type is Number. + NUMBER = 3; + + // Field value type is Integer. + INTEGER = 4; + + // Field value type is Boolean. + BOOLEAN = 5; + + // Field value type is Geolocation. + GEOLOCATION = 6; + } + + // The setting of Indexable options in schema. + enum IndexableOption { + // Value used when unset. + INDEXABLE_OPTION_UNSPECIFIED = 0; + + // Indexable option enabled for a schema field. + INDEXABLE_ENABLED = 1; + + // Indexable option disabled for a schema field. + INDEXABLE_DISABLED = 2; + } + + // The status of the dynamic facetable option of a schema field. + enum DynamicFacetableOption { + // Value used when unset. + DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0; + + // Dynamic facetable option enabled for a schema field. + DYNAMIC_FACETABLE_ENABLED = 1; + + // Dynamic facetable option disabled for a schema field. + DYNAMIC_FACETABLE_DISABLED = 2; + } + + // The setting of Searchable options in schema. + enum SearchableOption { + // Value used when unset. + SEARCHABLE_OPTION_UNSPECIFIED = 0; + + // Searchable option enabled for a schema field. + SEARCHABLE_ENABLED = 1; + + // Searchable option disabled for a schema field. + SEARCHABLE_DISABLED = 2; + } + + // The setting of Retrievable options in schema. + enum RetrievableOption { + // Value used when unset. + RETRIEVABLE_OPTION_UNSPECIFIED = 0; + + // Retrievable option enabled for a schema field. + RETRIEVABLE_ENABLED = 1; + + // Retrievable option disabled for a schema field. + RETRIEVABLE_DISABLED = 2; + } + + // The setting of Completable options in schema. + enum CompletableOption { + // Value used when unset. + COMPLETABLE_OPTION_UNSPECIFIED = 0; + + // Completable option enabled for a schema field. + COMPLETABLE_ENABLED = 1; + + // Completable option disabled for a schema field. + COMPLETABLE_DISABLED = 2; + } + + // Sets the filterable option for schema fields. + enum FilterableOption { + // Value used when unset. + FILTERABLE_OPTION_UNSPECIFIED = 0; + + // Filterable option enabled for a schema field. + FILTERABLE_ENABLED = 1; + + // Filterable option disabled for a schema field. + FILTERABLE_DISABLED = 2; + } + + // Required. Field path of the schema field. + // For example: `title`, `description`, `release_info.release_year`. + string field_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Raw type of the field. + FieldType field_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // If + // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + // is + // [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED], + // field values are indexed so that it can be filtered or faceted in + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]. + // + // If + // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + // is unset, the server behavior defaults to + // [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED] + // for fields that support setting indexable options. For those fields that do + // not support setting indexable options, such as `object` and `boolean` and + // key properties, the server will skip + // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + // setting, and setting + // [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + // for those fields will throw `INVALID_ARGUMENT` error. + IndexableOption indexable_option = 3; + + // If + // [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] + // is + // [DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED], + // field values are available for dynamic facet. Could only be + // [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED] + // if + // [FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] + // is + // [INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED]. + // Otherwise, an `INVALID_ARGUMENT` error will be returned. + // + // If + // [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] + // is unset, the server behavior defaults to + // [DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED] + // for fields that support setting dynamic facetable options. For those fields + // that do not support setting dynamic facetable options, such as `object` and + // `boolean`, the server will skip dynamic facetable option setting, and + // setting + // [dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option] + // for those fields will throw `INVALID_ARGUMENT` error. + DynamicFacetableOption dynamic_facetable_option = 4; + + // If + // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] + // is + // [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED], + // field values are searchable by text queries in + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]. + // + // If + // [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED] + // but field type is numerical, field values will not be searchable by text + // queries in + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search], + // as there are no text values associated to numerical fields. + // + // If + // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] + // is unset, the server behavior defaults to + // [SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED] + // for fields that support setting searchable options. Only `string` fields + // that have no key property mapping support setting + // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]. + // + // For those fields that do not support setting searchable options, the server + // will skip searchable option setting, and setting + // [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] + // for those fields will throw `INVALID_ARGUMENT` error. + SearchableOption searchable_option = 5; + + // If + // [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] + // is + // [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED], + // field values are included in the search results. + // + // If + // [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] + // is unset, the server behavior defaults to + // [RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_DISABLED] + // for fields that support setting retrievable options. For those fields + // that do not support setting retrievable options, such as `object` and + // `boolean`, the server will skip retrievable option setting, and setting + // [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] + // for those fields will throw `INVALID_ARGUMENT` error. + RetrievableOption retrievable_option = 6; + + // If + // [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] + // is + // [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED], + // field values are directly used and returned as suggestions for Autocomplete + // in + // [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]. + // + // If + // [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] + // is unset, the server behavior defaults to + // [COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_DISABLED] + // for fields that support setting completable options, which are just + // `string` fields. For those fields that do not support setting completable + // options, the server will skip completable option setting, and setting + // [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] + // for those fields will throw `INVALID_ARGUMENT` error. + CompletableOption completable_option = 8; + + // If + // [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] + // is + // [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED], + // field values are filterable by filter expression in + // [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. + // + // If + // [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED] + // but the field type is numerical, field values are not filterable by text + // queries in + // [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. + // Only textual fields are supported. + // + // If + // [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] + // is unset, the default setting is + // [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_DISABLED] + // for fields that support setting filterable options. + // + // When a field set to [FILTERABLE_DISABLED] is filtered, a warning is + // generated and an empty result is returned. + FilterableOption recs_filterable_option = 9; + + // Output only. Type of the key property that this field is mapped to. Empty + // string if this is not annotated as mapped to a key property. + // + // Example types are `title`, `description`. Full list is defined + // by `keyPropertyMapping` in the schema field annotation. + // + // If the schema field has a `KeyPropertyMapping` annotation, + // `indexable_option` and `searchable_option` of this field cannot be + // modified. + string key_property_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/schema_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/schema_service.proto new file mode 100644 index 000000000000..9d5e4ee9936d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/schema_service.proto @@ -0,0 +1,260 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/schema.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SchemaServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for managing [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. +service SchemaService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + rpc GetSchema(GetSchemaRequest) returns (Schema) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/schemas/*}" + additional_bindings { + get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + rpc ListSchemas(ListSchemasRequest) returns (ListSchemasResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/schemas" + additional_bindings { + get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + rpc CreateSchema(CreateSchemaRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/schemas" + body: "schema" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas" + body: "schema" + } + }; + option (google.api.method_signature) = "parent,schema,schema_id"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1alpha.Schema" + metadata_type: "google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata" + }; + } + + // Updates a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + rpc UpdateSchema(UpdateSchemaRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}" + body: "schema" + additional_bindings { + patch: "/v1alpha/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" + body: "schema" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1alpha.Schema" + metadata_type: "google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata" + }; + } + + // Deletes a [Schema][google.cloud.discoveryengine.v1alpha.Schema]. + rpc DeleteSchema(DeleteSchemaRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/dataStores/*/schemas/*}" + additional_bindings { + delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata" + }; + } +} + +// Request message for +// [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema] +// method. +message GetSchemaRequest { + // Required. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Schema" + } + ]; +} + +// Request message for +// [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] +// method. +message ListSchemasRequest { + // Required. The parent data store resource name, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // The maximum number of + // [Schema][google.cloud.discoveryengine.v1alpha.Schema]s to return. The + // service may return fewer than this value. + // + // If unspecified, at most 100 + // [Schema][google.cloud.discoveryengine.v1alpha.Schema]s will be returned. + // + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous + // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for +// [SchemaService.ListSchemas][google.cloud.discoveryengine.v1alpha.SchemaService.ListSchemas] +// method. +message ListSchemasResponse { + // The [Schema][google.cloud.discoveryengine.v1alpha.Schema]s. + repeated Schema schemas = 1; + + // A token that can be sent as + // [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1alpha.ListSchemasRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [SchemaService.CreateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.CreateSchema] +// method. +message CreateSchemaRequest { + // Required. The parent data store resource name, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to + // create. + Schema schema = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the + // [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become + // the final component of the + // [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.name]. + // + // This field should conform to + // [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + string schema_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1alpha.SchemaService.UpdateSchema] +// method. +message UpdateSchemaRequest { + // Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to + // update. + Schema schema = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set to true, and the + // [Schema][google.cloud.discoveryengine.v1alpha.Schema] is not found, a new + // [Schema][google.cloud.discoveryengine.v1alpha.Schema] will be created. In + // this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for +// [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1alpha.SchemaService.DeleteSchema] +// method. +message DeleteSchemaRequest { + // Required. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Schema" + } + ]; +} + +// Metadata for Create Schema LRO. +message CreateSchemaMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} + +// Metadata for UpdateSchema LRO. +message UpdateSchemaMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} + +// Metadata for DeleteSchema LRO. +message DeleteSchemaMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_service.proto new file mode 100644 index 000000000000..4021b8484b49 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/search_service.proto @@ -0,0 +1,851 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/common.proto"; +import "google/cloud/discoveryengine/v1alpha/document.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SearchServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for search. +service SearchService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Performs a search. + rpc Search(SearchRequest) returns (SearchResponse) { + option (google.api.http) = { + post: "/v1alpha/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search" + body: "*" + additional_bindings { + post: "/v1alpha/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search" + body: "*" + } + additional_bindings { + post: "/v1alpha/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:search" + body: "*" + } + }; + } +} + +// Request message for +// [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] +// method. +message SearchRequest { + // Specifies the image query input. + message ImageQuery { + oneof image { + // Base64 encoded image bytes. Supported image formats: JPEG, PNG, and + // BMP. + string image_bytes = 1; + } + } + + // A facet specification to perform faceted search. + message FacetSpec { + // Specifies how a facet is computed. + message FacetKey { + // Required. Supported textual and numerical facet keys in + // [Document][google.cloud.discoveryengine.v1alpha.Document] object, over + // which the facet values are computed. Facet key is case-sensitive. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Set only if values should be bucketed into intervals. Must be set + // for facets with numerical values. Must not be set for facet with text + // values. Maximum number of intervals is 30. + repeated Interval intervals = 2; + + // Only get facet for the given restricted values. Only supported on + // textual fields. For example, suppose "category" has three values + // "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + // "restricted_values" to "Action > 2022", the "category" facet only + // contains "Action > 2022". Only supported on textual fields. Maximum + // is 10. + repeated string restricted_values = 3; + + // Only get facet values that start with the given string prefix. For + // example, suppose "category" has three values "Action > 2022", + // "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the + // "category" facet only contains "Action > 2022" and "Action > 2021". + // Only supported on textual fields. Maximum is 10. + repeated string prefixes = 4; + + // Only get facet values that contains the given strings. For example, + // suppose "category" has three values "Action > 2022", + // "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + // Only supported on textual fields. Maximum is 10. + repeated string contains = 5; + + // True to make facet keys case insensitive when getting faceting + // values with prefixes or contains; false otherwise. + bool case_insensitive = 6; + + // The order in which documents are returned. + // + // Allowed values are: + // + // * "count desc", which means order by + // [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.count] + // descending. + // + // * "value desc", which means order by + // [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1alpha.SearchResponse.Facet.FacetValue.value] + // descending. + // Only applies to textual facets. + // + // If not set, textual values are sorted in [natural + // order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical + // intervals are sorted in the order given by + // [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals]. + string order_by = 7; + } + + // Required. The facet key specification. + FacetKey facet_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Maximum of facet values that should be returned for this facet. If + // unspecified, defaults to 20. The maximum allowed value is 300. Values + // above 300 are coerced to 300. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. + int32 limit = 2; + + // List of keys to exclude when faceting. + // + // + // By default, + // [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key] + // is not excluded from the filter unless it is listed in this field. + // + // Listing a facet key in this field allows its values to appear as facet + // results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. + // + // For example, suppose there are 100 documents with the color facet "Red" + // and 200 documents with the color facet "Blue". A query containing the + // filter "color:ANY("Red")" and having "color" as + // [FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key] + // would by default return only "Red" documents in the search results, and + // also return "Red" with count 100 as the only color facet. Although there + // are also blue documents available, "Blue" would not be shown as an + // available facet value. + // + // If "color" is listed in "excludedFilterKeys", then the query returns the + // facet values "Red" with count 100 and "Blue" with count 200, because the + // "color" key is now excluded from the filter. Because this field doesn't + // affect search results, the search results are still correctly filtered to + // return only "Red" documents. + // + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + repeated string excluded_filter_keys = 3; + + // Enables dynamic position for this facet. If set to true, the position of + // this facet among all facets in the response is determined automatically. + // If dynamic facets are enabled, it is ordered together. + // If set to false, the position of this facet in the + // response is the same as in the request, and it is ranked before + // the facets with dynamic position enable and all dynamic facets. + // + // For example, you may always want to have rating facet returned in + // the response, but it's not necessarily to always display the rating facet + // at the top. In that case, you can set enable_dynamic_position to true so + // that the position of rating facet in response is determined + // automatically. + // + // Another example, assuming you have the following facets in the request: + // + // * "rating", enable_dynamic_position = true + // + // * "price", enable_dynamic_position = false + // + // * "brands", enable_dynamic_position = false + // + // And also you have a dynamic facets enabled, which generates a facet + // `gender`. Then the final order of the facets in the response can be + // ("price", "brands", "rating", "gender") or ("price", "brands", "gender", + // "rating") depends on how API orders "gender" and "rating" facets. + // However, notice that "price" and "brands" are always + // ranked at first and second position because their enable_dynamic_position + // is false. + bool enable_dynamic_position = 4; + } + + // Boost specification to boost certain documents. + message BoostSpec { + // Boost applies to documents which match a condition. + message ConditionBoostSpec { + // An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. See + // [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter] + // for detail syntax and limitations. + // + // Examples: + // + // * To boost documents with document ID "doc_1" or "doc_2", and + // color + // "Red" or "Blue": + // * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + string condition = 1; + + // Strength of the condition boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0. + // + // Setting to 1.0 gives the document a big promotion. However, it does not + // necessarily mean that the boosted document will be the top result at + // all times, nor that other documents will be excluded. Results could + // still be shown even when none of them matches the condition. And + // results that are significantly more relevant to the search query can + // still trump your heavily favored but irrelevant documents. + // + // Setting to -1.0 gives the document a big demotion. However, results + // that are deeply relevant might still be shown. The document will have + // an upstream battle to get a fairly high ranking, but it is not blocked + // out completely. + // + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. + float boost = 2; + } + + // Condition boost specifications. If a document matches multiple conditions + // in the specifictions, boost scores from these specifications are all + // applied and combined in a non-linear way. Maximum number of + // specifications is 20. + repeated ConditionBoostSpec condition_boost_specs = 1; + } + + // Specification to determine under which conditions query expansion should + // occur. + message QueryExpansionSpec { + // Enum describing under which condition query expansion should occur. + enum Condition { + // Unspecified query expansion condition. In this case, server behavior + // defaults to + // [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + CONDITION_UNSPECIFIED = 0; + + // Disabled query expansion. Only the exact search query is used, even if + // [SearchResponse.total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size] + // is zero. + DISABLED = 1; + + // Automatic query expansion built by the Search API. + AUTO = 2; + } + + // The condition under which query expansion should occur. Default to + // [Condition.DISABLED][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + Condition condition = 1; + + // Whether to pin unexpanded results. If this field is set to true, + // unexpanded products are always at the top of the search results, followed + // by the expanded results. + bool pin_unexpanded_results = 2; + } + + // The specification for query spell correction. + message SpellCorrectionSpec { + // Enum describing under which mode spell correction should occur. + enum Mode { + // Unspecified spell correction mode. In this case, server behavior + // defaults to + // [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + MODE_UNSPECIFIED = 0; + + // Search API will try to find a spell suggestion if there + // is any and put in the + // [SearchResponse.corrected_query][google.cloud.discoveryengine.v1alpha.SearchResponse.corrected_query]. + // The spell suggestion will not be used as the search query. + SUGGESTION_ONLY = 1; + + // Automatic spell correction built by the Search API. Search will + // be based on the corrected query if found. + AUTO = 2; + } + + // The mode under which spell correction should take effect to + // replace the original search query. Default to + // [Mode.AUTO][google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + Mode mode = 1; + } + + // A specification for configuring the behavior of content search. + message ContentSearchSpec { + // A specification for configuring snippets in a search response. + message SnippetSpec { + // [DEPRECATED] This field is deprecated. To control snippet return, use + // `return_snippet` field. For backwards compatibility, we will return + // snippet if max_snippet_count > 0. + int32 max_snippet_count = 1 [deprecated = true]; + + // [DEPRECATED] This field is deprecated and will have no affect on the + // snippet. + bool reference_only = 2 [deprecated = true]; + + // If `true`, then return snippet. If no snippet can be generated, we + // return "No snippet is available for this page." A `snippet_status` with + // `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + bool return_snippet = 3; + } + + // A specification for configuring a summary returned in a search + // response. + message SummarySpec { + // The number of top results to generate the summary from. If the number + // of results returned is less than `summaryResultCount`, the summary is + // generated from all of the results. + // + // At most five results can be used to generate a summary. + int32 summary_result_count = 1; + + // Specifies whether to include citations in the summary. The default + // value is `false`. + // + // When this field is set to `true`, summaries include in-line citation + // numbers. + // + // Example summary including citations: + // + // BigQuery is Google Cloud's fully managed and completely serverless + // enterprise data warehouse [1]. BigQuery supports all data types, works + // across clouds, and has built-in machine learning and business + // intelligence, all within a unified platform [2, 3]. + // + // The citation numbers refer to the returned search results and are + // 1-indexed. For example, [1] means that the sentence is attributed to + // the first search result. [2, 3] means that the sentence is attributed + // to both the second and third search results. + bool include_citations = 2; + + // Specifies whether to filter out adversarial queries. The default value + // is `false`. + // + // Google employs search-query classification to detect adversarial + // queries. No summary is returned if the search query is classified as an + // adversarial query. For example, a user might ask a question regarding + // negative comments about the company or submit a query designed to + // generate unsafe, policy-violating output. If this field is set to + // `true`, we skip generating summaries for adversarial queries and return + // fallback messages instead. + bool ignore_adversarial_query = 3; + + // Specifies whether to filter out queries that are not summary-seeking. + // The default value is `false`. + // + // Google employs search-query classification to detect summary-seeking + // queries. No summary is returned if the search query is classified as a + // non-summary seeking query. For example, `why is the sky blue` and `Who + // is the best soccer player in the world?` are summary-seeking queries, + // but `SFO airport` and `world cup 2026` are not. They are most likely + // navigational queries. If this field is set to `true`, we skip + // generating summaries for non-summary seeking queries and return + // fallback messages instead. + bool ignore_non_summary_seeking_query = 4; + + // Language code for Summary. Use language tags defined by + // [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + // Note: This is an experimental feature. + string language_code = 6; + } + + // A specification for configuring the extractive content in a search + // response. + message ExtractiveContentSpec { + // The maximum number of extractive answers returned in each search + // result. + // + // An extractive answer is a verbatim answer extracted from the original + // document, which provides a precise and contextually relevant answer to + // the search query. + // + // If the number of matching answers is less than the + // `max_extractive_answer_count`, return all of the answers. Otherwise, + // return the `max_extractive_answer_count`. + // + // At most one answer is returned for each + // [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult]. + int32 max_extractive_answer_count = 1; + + // The max number of extractive segments returned in each search result. + // Only applied if the + // [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is set to + // [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.CONTENT_REQUIRED] + // or + // [DataStore.solution_types][google.cloud.discoveryengine.v1alpha.DataStore.solution_types] + // is + // [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT]. + // + // An extractive segment is a text segment extracted from the original + // document that is relevant to the search query, and, in general, more + // verbose than an extractive answer. The segment could then be used as + // input for LLMs to generate summaries and answers. + // + // If the number of matching segments is less than + // `max_extractive_segment_count`, return all of the segments. Otherwise, + // return the `max_extractive_segment_count`. + int32 max_extractive_segment_count = 2; + + // Specifies whether to return the confidence score from the extractive + // segments in each search result. The default value is `false`. + // + // Note: this is a priavte preview feature and only works for allowlisted + // users, please reach out to Cloud Support team if you want to use it. + bool return_extractive_segment_score = 3; + + // Specifies whether to also include the adjacent from each selected + // segments. + // Return at most `num_previous_segments` segments before each selected + // segments. + int32 num_previous_segments = 4; + + // Return at most `num_next_segments` segments after each selected + // segments. + int32 num_next_segments = 5; + } + + // If `snippetSpec` is not specified, snippets are not included in the + // search response. + SnippetSpec snippet_spec = 1; + + // If `summarySpec` is not specified, summaries are not included in the + // search response. + SummarySpec summary_spec = 2; + + // If there is no extractive_content_spec provided, there will be no + // extractive answer in the search response. + ExtractiveContentSpec extractive_content_spec = 3; + } + + // The specification that uses customized query embedding vector to do + // semantic document retrieval. + message EmbeddingSpec { + // Embedding vector. + message EmbeddingVector { + // Embedding field path in schema. + string field_path = 1; + + // Query embedding vector. + repeated float vector = 2; + } + + // The embedding vector used for retrieval. Limit to 1. + repeated EmbeddingVector embedding_vectors = 1; + } + + // Required. The resource name of the Search serving config, such as + // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + // This field is used to identify the serving configuration name, set + // of models used to make the search. + string serving_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/ServingConfig" + } + ]; + + // The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + // + // Use `default_branch` as the branch ID or leave this field empty, to search + // documents under the default branch. + string branch = 2 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Branch" + }]; + + // Raw search query. + string query = 3; + + // Raw image query. + ImageQuery image_query = 19; + + // Maximum number of + // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If + // unspecified, defaults to a reasonable value. The maximum allowed value is + // 100. Values above 100 are coerced to 100. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. + int32 page_size = 4; + + // A page token received from a previous + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + // must match the call that provided the page token. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + string page_token = 5; + + // A 0-indexed integer that specifies the current offset (that is, starting + // result location, amongst the + // [Document][google.cloud.discoveryengine.v1alpha.Document]s deemed by the + // API as relevant) in search results. This field is only considered if + // [page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token] + // is unset. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. + int32 offset = 6; + + // The filter syntax consists of an expression language for constructing a + // predicate from one or more fields of the documents being filtered. Filter + // expression is case-sensitive. + // + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + string filter = 7; + + // The order in which documents are returned. Documents can be ordered by + // a field in an [Document][google.cloud.discoveryengine.v1alpha.Document] + // object. Leave it unset if ordered by relevance. `order_by` expression is + // case-sensitive. + // + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + string order_by = 8; + + // Information about the end user. + // Highly recommended for analytics. + // [UserInfo.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent] + // is used to deduce `device_type` for analytics. + UserInfo user_info = 21; + + // Facet specifications for faceted search. If empty, no facets are returned. + // + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + repeated FacetSpec facet_specs = 9; + + // Boost specification to boost certain documents. + BoostSpec boost_spec = 10; + + // Additional search parameters. + // + // For public website search only, supported values are: + // + // * `user_country_code`: string. Default empty. If set to non-empty, results + // are restricted or boosted based on the location provided. + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, + // which enables image searching. + map params = 11; + + // The query expansion specification that specifies the conditions under which + // query expansion occurs. + QueryExpansionSpec query_expansion_spec = 13; + + // The spell correction specification that specifies the mode under + // which spell correction takes effect. + SpellCorrectionSpec spell_correction_spec = 14; + + // A unique identifier for tracking visitors. For example, this could be + // implemented with an HTTP cookie, which should be able to uniquely identify + // a visitor on a single device. This unique identifier should not change if + // the visitor logs in or out of the website. + // + // This field should NOT have a fixed value such as `unknown_visitor`. + // + // This should be the same identifier as + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + // and + // [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id] + // + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + string user_pseudo_id = 15; + + // A specification for configuring the behavior of content search. + ContentSearchSpec content_search_spec = 24; + + // Uses the provided embedding to do additional semantic document retrieval. + // The retrieval is based on the dot product of + // [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document + // embedding that is provided in + // [SearchRequest.embedding_spec.embedding_vectors.field_path][]. + // + // If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not + // provided, it will use [ServingConfig.embedding_config.field_paths][]. + EmbeddingSpec embedding_spec = 23; + + // The ranking expression controls the customized ranking on retrieval + // documents. This overrides + // [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression]. + // The ranking expression is a single function or multiple functions that are + // joint by "+". + // * ranking_expression = function, { " + ", function }; + // Supported functions: + // * double * relevance_score + // * double * dotProduct(embedding_field_path) + // Function variables: + // `relevance_score`: pre-defined keywords, used for measure relevance + // between query and document. + // `embedding_field_path`: the document embedding field + // used with query embedding vector. + // `dotProduct`: embedding function between embedding_field_path and query + // embedding vector. + // + // Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + string ranking_expression = 26; + + // Whether to turn on safe search. This is only supported for + // website search. + bool safe_search = 20; + + // The user labels applied to a resource must meet the following requirements: + // + // * Each resource can have multiple labels, up to a maximum of 64. + // * Each label must be a key-value pair. + // * Keys have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a maximum + // length of 63 characters. + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. All characters must use UTF-8 encoding, and + // international characters are allowed. + // * The key portion of a label must be unique. However, you can use the same + // key with multiple resources. + // * Keys must start with a lowercase letter or international character. + // + // See [Google Cloud + // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + map user_labels = 22; +} + +// Response message for +// [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] +// method. +message SearchResponse { + // Represents the search results. + message SearchResult { + // [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] of the + // searched [Document][google.cloud.discoveryengine.v1alpha.Document]. + string id = 1; + + // The document data snippet in the search response. Only fields that are + // marked as retrievable are populated. + Document document = 2; + + // Google provided available scores. + map model_scores = 4; + } + + // A facet result. + message Facet { + // A facet value which contains value names and their count. + message FacetValue { + // A facet value which contains values. + oneof facet_value { + // Text value of a facet, such as "Black" for facet "colors". + string value = 1; + + // Interval value for a facet, such as [10, 20) for facet "price". It + // matches + // [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.intervals]. + Interval interval = 2; + } + + // Number of items that have this facet value. + int64 count = 3; + } + + // The key for this facet. E.g., "colors" or "price". It matches + // [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1alpha.SearchRequest.FacetSpec.FacetKey.key]. + string key = 1; + + // The facet values for this field. + repeated FacetValue values = 2; + + // Whether the facet is dynamically generated. + bool dynamic_facet = 3; + } + + // Guided search result. The guided search helps user to refine the search + // results and narrow down to the real needs from a broaded search results. + message GuidedSearchResult { + // Useful attribute for search result refinements. + message RefinementAttribute { + // Attribute key used to refine the results e.g. 'movie_type'. + string attribute_key = 1; + + // Attribute value used to refine the results e.g. 'drama'. + string attribute_value = 2; + } + + // A list of ranked refinement attributes. + repeated RefinementAttribute refinement_attributes = 1; + + // Suggested follow-up questions. + repeated string follow_up_questions = 2; + } + + // Summary of the top N search result specified by the summary spec. + message Summary { + // Safety Attribute categories and their associated confidence scores. + message SafetyAttributes { + // The display names of Safety Attribute categories associated with the + // generated content. Order matches the Scores. + repeated string categories = 1; + + // The confidence scores of the each category, higher + // value means higher confidence. Order matches the Categories. + repeated float scores = 2; + } + + // An Enum for summary-skipped reasons. + enum SummarySkippedReason { + // Default value. The summary skipped reason is not specified. + SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0; + + // The adversarial query ignored case. + // + // Only populated when + // [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query] + // is set to `true`. + ADVERSARIAL_QUERY_IGNORED = 1; + + // The non-summary seeking query ignored case. + // + // Only populated when + // [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query] + // is set to `true`. + NON_SUMMARY_SEEKING_QUERY_IGNORED = 2; + + // The out-of-domain query ignored case. + // + // Google skips the summary if there are no high-relevance search results. + // For example, the data store contains facts about company A but the + // user query is asking questions about company B. + OUT_OF_DOMAIN_QUERY_IGNORED = 3; + + // The potential policy violation case. + // + // Google skips the summary if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + POTENTIAL_POLICY_VIOLATION = 4; + + // The LLM addon not enabled case. + // + // Google skips the summary if the LLM addon is not enabled. + LLM_ADDON_NOT_ENABLED = 5; + } + + // The summary content. + string summary_text = 1; + + // Additional summary-skipped reasons. This provides the reason for ignored + // cases. If nothing is skipped, this field is not set. + repeated SummarySkippedReason summary_skipped_reasons = 2; + + // A collection of Safety Attribute categories and their associated + // confidence scores. + SafetyAttributes safety_attributes = 3; + } + + // Debug information specifically related to forward geocoding issues arising + // from Geolocation Search. + message GeoSearchDebugInfo { + // The address from which forward geocoding ingestion produced issues. + string original_address_query = 1; + + // The error produced. + string error_message = 2; + } + + // Information describing query expansion including whether expansion has + // occurred. + message QueryExpansionInfo { + // Bool describing whether query expansion has occurred. + bool expanded_query = 1; + + // Number of pinned results. This field will only be set when expansion + // happens and + // [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec.pin_unexpanded_results] + // is set to true. + int64 pinned_result_count = 2; + } + + // A list of matched documents. The order represents the ranking. + repeated SearchResult results = 1; + + // Results of facets requested by user. + repeated Facet facets = 2; + + // Guided search result. + GuidedSearchResult guided_search_result = 8; + + // The estimated total count of matched items irrespective of pagination. The + // count of + // [results][google.cloud.discoveryengine.v1alpha.SearchResponse.results] + // returned by pagination may be less than the + // [total_size][google.cloud.discoveryengine.v1alpha.SearchResponse.total_size] + // that matches. + int32 total_size = 3; + + // A unique search token. This should be included in the + // [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] logs resulting + // from this search, which enables accurate attribution of search model + // performance. + string attribution_token = 4; + + // The URI of a customer-defined redirect page. If redirect action is + // triggered, no search is performed, and only + // [redirect_uri][google.cloud.discoveryengine.v1alpha.SearchResponse.redirect_uri] + // and + // [attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] + // are set in the response. + string redirect_uri = 12; + + // A token that can be sent as + // [SearchRequest.page_token][google.cloud.discoveryengine.v1alpha.SearchRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 5; + + // Contains the spell corrected query, if found. If the spell correction type + // is AUTOMATIC, then the search results are based on corrected_query. + // Otherwise the original query is used for search. + string corrected_query = 7; + + // A summary as part of the search results. + // This field is only returned if + // [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.summary_spec] + // is set. + Summary summary = 9; + + // Controls applied as part of the Control service. + repeated string applied_controls = 10; + + repeated GeoSearchDebugInfo geo_search_debug_info = 16; + + // Query expansion information for the returned results. + QueryExpansionInfo query_expansion_info = 14; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto new file mode 100644 index 000000000000..c73ae34c1714 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto @@ -0,0 +1,152 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SiteSearchEngineServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for managing site search related resources. +service SiteSearchEngineService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Request on-demand recrawl for a list of URIs. + rpc RecrawlUris(RecrawlUrisRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{site_search_engine=projects/*/locations/*/dataStores/*/siteSearchEngine}:recrawlUris" + body: "*" + additional_bindings { + post: "/v1alpha/{site_search_engine=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}:recrawlUris" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse" + metadata_type: "google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata" + }; + } +} + +// Request message for +// [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] +// method. +message RecrawlUrisRequest { + // Required. Full resource name of the + // [SiteSearchEngine][google.cloud.discoveryengine.v1alpha.SiteSearchEngine], + // such as + // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. + string site_search_engine = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/SiteSearchEngine" + } + ]; + + // Required. List of URIs to crawl. At most 10K URIs are supported, otherwise + // an INVALID_ARGUMENT error is thrown. Each URI should match at least one + // [TargetSite][google.cloud.discoveryengine.v1alpha.TargetSite] in + // `site_search_engine`. + repeated string uris = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] +// method. +message RecrawlUrisResponse { + // Details about why a particular URI failed to be crawled. Each FailureInfo + // contains one FailureReason per CorpusType. + message FailureInfo { + // Details about why crawling failed for a particular CorpusType, e.g. + // DESKTOP and MOBILE crawling may fail for different reasons. + message FailureReason { + // CorpusType for the failed crawling operation. + enum CorpusType { + // Default value. + CORPUS_TYPE_UNSPECIFIED = 0; + + // Denotes a crawling attempt for the desktop version of a page. + DESKTOP = 1; + + // Denotes a crawling attempt for the mobile version of a page. + MOBILE = 2; + } + + // DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. + CorpusType corpus_type = 1; + + // Reason why the URI was not crawled. + string error_message = 2; + } + + // URI that failed to be crawled. + string uri = 1; + + // List of failure reasons by corpus type (e.g. desktop, mobile). + repeated FailureReason failure_reasons = 2; + } + + // Details for a sample of up to 10 `failed_uris`. + repeated FailureInfo failure_samples = 1; + + // URIs that were not crawled before the LRO terminated. + repeated string failed_uris = 2; +} + +// Metadata related to the progress of the +// [SiteSearchEngineService.RecrawlUris][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.RecrawlUris] +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message RecrawlUrisMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Unique URIs in the request that don't match any TargetSite in the + // DataStore, only match TargetSites that haven't been fully indexed, or match + // a TargetSite with type EXCLUDE. + repeated string invalid_uris = 3; + + // Total number of unique URIs in the request that are not in invalid_uris. + int32 valid_uris_count = 4; + + // Total number of URIs that have been crawled so far. + int32 success_count = 5; + + // Total number of URIs that have yet to be crawled. + int32 pending_count = 6; + + // Total number of URIs that were rejected due to insufficient indexing + // resources. + int32 quota_exceeded_count = 7; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/user_event.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/user_event.proto new file mode 100644 index 000000000000..7ba96f7e27d2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/user_event.proto @@ -0,0 +1,475 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/common.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "UserEventProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// UserEvent captures all metadata information Discovery Engine API needs to +// know about how end users interact with customers' website. +message UserEvent { + // Required. User event type. Allowed values are: + // + // Generic values: + // + // * `search`: Search for Documents. + // * `view-item`: Detailed page view of a Document. + // * `view-item-list`: View of a panel or ordered list of Documents. + // * `view-home-page`: View of the home page. + // * `view-category-page`: View of a category page, e.g. Home > Men > Jeans + // + // Retail-related values: + // + // * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + // * `purchase`: Purchase an item(s) + // + // Media-related values: + // + // * `media-play`: Start/resume watching a video, playing a song, etc. + // * `media-complete`: Finished or stopped midway through a video, song, etc. + string event_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A unique identifier for tracking visitors. + // + // For example, this could be implemented with an HTTP cookie, which should be + // able to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor log in/out of the website. + // + // Do not set the field to the same fixed ID for different users. This mixes + // the event history of those users together, which results in degraded model + // quality. + // + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + // + // The field should not contain PII or user-data. We recommend to use Google + // Analytics [Client + // ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + // for this field. + string user_pseudo_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Only required for + // [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents] + // method. Timestamp of when the user event happened. + google.protobuf.Timestamp event_time = 3; + + // Information about the end user. + UserInfo user_info = 4; + + // Should set to true if the request is made directly from the end user, in + // which case the + // [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1alpha.UserInfo.user_agent] + // can be populated from the HTTP request. + // + // This flag should be set only if the API request is made directly from the + // end user such as a mobile app (and not if a gateway or a server is + // processing and pushing the user events). + // + // This should not be set when using the JavaScript tag in + // [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]. + bool direct_user_request = 5; + + // A unique identifier for tracking a visitor session with a length limit of + // 128 bytes. A session is an aggregation of an end user behavior in a time + // span. + // + // A general guideline to populate the session_id: + // + // 1. If user has no activity for 30 min, a new session_id should be assigned. + // 2. The session_id should be unique across users, suggest use uuid or add + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id] + // as prefix. + string session_id = 6; + + // Page metadata such as categories and other critical information for certain + // event types such as `view-category-page`. + PageInfo page_info = 7; + + // Token to attribute an API response to user action(s) to trigger the event. + // + // Highly recommended for user events that are the result of + // [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. + // This field enables accurate attribution of recommendation model + // performance. + // + // The value must be one of: + // + // * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] for events that are the result of + // [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. + // * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1alpha.SearchResponse.attribution_token] for events that are the result of + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search]. + // + // This token enables us to accurately attribute page view or conversion + // completion back to the event and the particular predict response containing + // this clicked/purchased product. If user clicks on product K in the + // recommendation results, pass + // [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] + // as a URL parameter to product K's page. When recording events on product + // K's page, log the + // [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1alpha.RecommendResponse.attribution_token] + // to this field. + string attribution_token = 8; + + // The filter syntax consists of an expression language for constructing a + // predicate from one or more fields of the documents being filtered. + // + // One example is for `search` events, the associated + // [SearchRequest][google.cloud.discoveryengine.v1alpha.SearchRequest] may + // contain a filter expression in + // [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter] + // conforming to https://google.aip.dev/160#filtering. + // + // Similarly, for `view-item-list` events that are generated from a + // [RecommendationService.RecommendRequest][], this field may be populated + // directly from [RecommendationService.RecommendRequest.filter][] conforming + // to https://google.aip.dev/160#filtering. + // + // The value must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + string filter = 9; + + // List of [Document][google.cloud.discoveryengine.v1alpha.Document]s + // associated with this user event. + // + // This field is optional except for the following event types: + // + // * `view-item` + // * `add-to-cart` + // * `purchase` + // * `media-play` + // * `media-complete` + // + // In a `search` event, this field represents the documents returned to the + // end user on the current page (the end user may have not finished browsing + // the whole page yet). When a new page is returned to the end user, after + // pagination/filtering/ordering even for the same query, a new `search` event + // with different + // [UserEvent.documents][google.cloud.discoveryengine.v1alpha.UserEvent.documents] + // is desired. + repeated DocumentInfo documents = 10; + + // Panel metadata associated with this user event. + PanelInfo panel = 11; + + // [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search] + // details related to the event. + // + // This field should be set for `search` event. + SearchInfo search_info = 12; + + // [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery] + // details related to the event. + // + // This field should be set for `search` event when autocomplete function is + // enabled and the user clicks a suggestion for search. + CompletionInfo completion_info = 13; + + // The transaction metadata (if any) associated with this user event. + TransactionInfo transaction_info = 14; + + // A list of identifiers for the independent experiment groups this user event + // belongs to. This is used to distinguish between user events associated with + // different experiment setups on the customer end. + repeated string tag_ids = 15; + + // The promotion IDs if this is an event associated with promotions. + // Currently, this field is restricted to at most one ID. + repeated string promotion_ids = 16; + + // Extra user event features to include in the recommendation model. + // These attributes must NOT contain data that needs to be parsed or processed + // further, e.g. JSON or other encodings. + // + // If you provide custom attributes for ingested user events, also include + // them in the user events that you associate with prediction requests. Custom + // attribute formatting must be consistent between imported events and events + // provided with prediction requests. This lets the Discovery Engine API use + // those custom attributes when training models and serving predictions, which + // helps improve recommendation quality. + // + // This field needs to pass all below criteria, otherwise an + // `INVALID_ARGUMENT` error is returned: + // + // * The key must be a UTF-8 encoded string with a length limit of 5,000 + // characters. + // * For text attributes, at most 400 values are allowed. Empty values are not + // allowed. Each value must be a UTF-8 encoded string with a length limit of + // 256 characters. + // * For number attributes, at most 400 values are allowed. + // + // For product recommendations, an example of extra user information is + // `traffic_channel`, which is how a user arrives at the site. Users can + // arrive + // at the site by coming to the site directly, coming through Google + // search, or in other ways. + map attributes = 17; + + // Media-specific info. + MediaInfo media_info = 18; +} + +// Detailed page information. +message PageInfo { + // A unique ID of a web page view. + // + // This should be kept the same for all user events triggered from the same + // pageview. For example, an item detail page view could trigger multiple + // events as the user is browsing the page. The `pageview_id` property should + // be kept the same for all these events so that they can be grouped together + // properly. + // + // When using the client side event reporting with JavaScript pixel and Google + // Tag Manager, this value is filled in automatically. + string pageview_id = 1; + + // The most specific category associated with a category page. + // + // To represent full path of category, use '>' sign to separate different + // hierarchies. If '>' is part of the category name, please replace it with + // other character(s). + // + // Category pages include special pages such as sales or promotions. For + // instance, a special sale page may have the category hierarchy: + // `"pageCategory" : "Sales > 2017 Black Friday Deals"`. + // + // Required for `view-category-page` events. Other event types should not set + // this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + string page_category = 2; + + // Complete URL (window.location.href) of the user's current page. + // + // When using the client side event reporting with JavaScript pixel and Google + // Tag Manager, this value is filled in automatically. Maximum length 5,000 + // characters. + string uri = 3; + + // The referrer URL of the current page. + // + // When using the client side event reporting with JavaScript pixel and Google + // Tag Manager, this value is filled in automatically. However, some browser + // privacy restrictions may cause this field to be empty. + string referrer_uri = 4; +} + +// Detailed search information. +message SearchInfo { + // The user's search query. + // + // See + // [SearchRequest.query][google.cloud.discoveryengine.v1alpha.SearchRequest.query] + // for definition. + // + // The value must be a UTF-8 encoded string with a length limit of 5,000 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + // + // At least one of + // [search_query][google.cloud.discoveryengine.v1alpha.SearchInfo.search_query] + // or + // [PageInfo.page_category][google.cloud.discoveryengine.v1alpha.PageInfo.page_category] + // is required for `search` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + string search_query = 1; + + // The order in which products are returned, if applicable. + // + // See + // [SearchRequest.order_by][google.cloud.discoveryengine.v1alpha.SearchRequest.order_by] + // for definition and syntax. + // + // The value must be a UTF-8 encoded string with a length limit of 1,000 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + // + // This can only be set for `search` events. Other event types should not set + // this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + string order_by = 2; + + // An integer that specifies the current offset for pagination (the 0-indexed + // starting location, amongst the products deemed by the API as relevant). + // + // See + // [SearchRequest.offset][google.cloud.discoveryengine.v1alpha.SearchRequest.offset] + // for definition. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. + // + // This can only be set for `search` events. Other event types should not set + // this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + optional int32 offset = 3; +} + +// Detailed completion information including completion attribution token and +// clicked completion info. +message CompletionInfo { + // End user selected + // [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion]. + string selected_suggestion = 1; + + // End user selected + // [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1alpha.CompleteQueryResponse.QuerySuggestion.suggestion] + // position, starting from 0. + int32 selected_position = 2; +} + +// A transaction represents the entire purchase transaction. +message TransactionInfo { + // Required. Total non-zero value associated with the transaction. This value + // may include shipping, tax, or other adjustments to the total value that you + // want to include. + optional float value = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Currency code. Use three-character ISO-4217 code. + string currency = 2 [(google.api.field_behavior) = REQUIRED]; + + // The transaction ID with a length limit of 128 characters. + string transaction_id = 3; + + // All the taxes associated with the transaction. + optional float tax = 4; + + // All the costs associated with the products. These can be manufacturing + // costs, shipping expenses not borne by the end user, or any other costs, + // such that: + // + // * Profit = + // [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] - + // [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] - + // [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost] + optional float cost = 5; + + // The total discount(s) value applied to this transaction. + // This figure should be excluded from + // [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] + // + // For example, if a user paid + // [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] + // amount, then nominal (pre-discount) value of the transaction is the sum of + // [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] + // and + // [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value] + // + // This means that profit is calculated the same way, regardless of the + // discount value, and that + // [TransactionInfo.discount_value][google.cloud.discoveryengine.v1alpha.TransactionInfo.discount_value] + // can be larger than + // [TransactionInfo.value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value]: + // + // * Profit = + // [value][google.cloud.discoveryengine.v1alpha.TransactionInfo.value] - + // [tax][google.cloud.discoveryengine.v1alpha.TransactionInfo.tax] - + // [cost][google.cloud.discoveryengine.v1alpha.TransactionInfo.cost] + optional float discount_value = 6; +} + +// Detailed document information associated with a user event. +message DocumentInfo { + // A required descriptor of the associated + // [Document][google.cloud.discoveryengine.v1alpha.Document]. + // + // * If [id][google.cloud.discoveryengine.v1alpha.DocumentInfo.id] is + // specified, then the default values for + // `{location}`, `{collection_id}`, `{data_store_id}`, and `{branch_id}` are + // used when annotating with the stored Document. + // + // * If [name][google.cloud.discoveryengine.v1alpha.DocumentInfo.name] is + // specified, then the provided values (default values allowed) for + // `{location}`, `{collection_id}`, `{data_store_id}`, and + // `{branch_id}` are used when annotating with the stored Document. + oneof document_descriptor { + // The [Document][google.cloud.discoveryengine.v1alpha.Document] resource + // ID. + string id = 1; + + // The [Document][google.cloud.discoveryengine.v1alpha.Document] resource + // full name, of the form: + // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + string name = 2 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + }]; + + // The [Document][google.cloud.discoveryengine.v1alpha.Document] URI - only + // allowed for website data stores. + string uri = 6; + } + + // Quantity of the Document associated with the user event. Defaults to 1. + // + // For example, this field will be 2 if two quantities of the same Document + // are involved in a `add-to-cart` event. + // + // Required for events of the following event types: + // + // * `add-to-cart` + // * `purchase` + optional int32 quantity = 3; + + // The promotion IDs associated with this Document. + // Currently, this field is restricted to at most one ID. + repeated string promotion_ids = 4; +} + +// Detailed panel information associated with a user event. +message PanelInfo { + // Required. The panel ID. + string panel_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the panel. + string display_name = 3; + + // The ordered position of the panel, if shown to the user with other panels. + // If set, then + // [total_panels][google.cloud.discoveryengine.v1alpha.PanelInfo.total_panels] + // must also be set. + optional int32 panel_position = 4; + + // The total number of panels, including this one, shown to the user. + // Must be set if + // [panel_position][google.cloud.discoveryengine.v1alpha.PanelInfo.panel_position] + // is set. + optional int32 total_panels = 5; +} + +// Media-specific user event information. +message MediaInfo { + // The media progress time in seconds, if applicable. + // For example, if the end user has finished 90 seconds of a playback video, + // then + // [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds] + // should be set to 90. + google.protobuf.Duration media_progress_duration = 1; + + // Media progress should be computed using only the + // [media_progress_duration][google.cloud.discoveryengine.v1alpha.MediaInfo.media_progress_duration] + // relative to the media total length. + // + // This value must be between `[0, 1.0]` inclusive. + // + // If this is not a playback or the progress cannot be computed (e.g. ongoing + // livestream), this field should be unset. + optional float media_progress_percentage = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/user_event_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/user_event_service.proto new file mode 100644 index 000000000000..9919d67fcd89 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/proto/google/cloud/discoveryengine/v1alpha/user_event_service.proto @@ -0,0 +1,154 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1alpha/import_config.proto"; +import "google/cloud/discoveryengine/v1alpha/purge_config.proto"; +import "google/cloud/discoveryengine/v1alpha/user_event.proto"; +import "google/longrunning/operations.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "UserEventServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1alpha"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha"; + +// Service for ingesting end user actions on a website to Discovery Engine API. +service UserEventService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Writes a single user event. + rpc WriteUserEvent(WriteUserEventRequest) returns (UserEvent) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:write" + body: "user_event" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write" + body: "user_event" + } + }; + } + + // Writes a single user event from the browser. This uses a GET request to + // due to browser restriction of POST-ing to a third-party domain. + // + // This method is used only by the Discovery Engine API JavaScript pixel and + // Google Tag Manager. Users should not call this method directly. + rpc CollectUserEvent(CollectUserEventRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect" + additional_bindings { + get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + } + }; + } + + // Deletes permanently all user events specified by the filter provided. + // Depending on the number of events specified by the filter, this operation + // could take hours or days to complete. To test a filter, use the list + // command first. + rpc PurgeUserEvents(PurgeUserEventsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:purge" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:purge" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse" + metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata" + }; + } + + // Bulk import of User events. Request processing might be + // synchronous. Events that already exist are skipped. + // Use this method for backfilling historical user events. + // + // Operation.response is of type ImportResponse. Note that it is + // possible for a subset of the items to be successfully inserted. + // Operation.metadata is of type ImportMetadata. + rpc ImportUserEvents(ImportUserEventsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:import" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse" + metadata_type: "google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata" + }; + } +} + +// Request message for WriteUserEvent method. +message WriteUserEventRequest { + // Required. The parent DataStore resource name, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. User event to write. + optional UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CollectUserEvent method. +message CollectUserEventRequest { + // Required. The parent DataStore resource name, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. URL encoded UserEvent proto with a length limit of 2,000,000 + // characters. + string user_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // The URL including cgi-parameters but excluding the hash fragment with a + // length limit of 5,000 characters. This is often more useful than the + // referer URL, because many browsers only send the domain for third-party + // requests. + optional string uri = 3; + + // The event timestamp in milliseconds. This prevents browser caching of + // otherwise identical get requests. The name is abbreviated to reduce the + // payload bytes. + optional int64 ets = 4; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/pom.xml b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/pom.xml index b8a0274b7912..a0669507f094 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/pom.xml +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-discoveryengine-v1beta - 0.24.0 + 0.25.0 proto-google-cloud-discoveryengine-v1beta Proto library for google-cloud-discoveryengine com.google.cloud google-cloud-discoveryengine-parent - 0.24.0 + 0.25.0 diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/completequery/AsyncCompleteQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/completequery/AsyncCompleteQuery.java new file mode 100644 index 000000000000..3837443d819b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/completequery/AsyncCompleteQuery.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_CompletionService_CompleteQuery_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse; +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class AsyncCompleteQuery { + + public static void main(String[] args) throws Exception { + asyncCompleteQuery(); + } + + public static void asyncCompleteQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) { + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setDataStore( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setQuery("query107944136") + .setQueryModel("queryModel-184930495") + .setUserPseudoId("userPseudoId-1155274652") + .setIncludeTailSuggestions(true) + .build(); + ApiFuture future = + completionServiceClient.completeQueryCallable().futureCall(request); + // Do something. + CompleteQueryResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_CompletionService_CompleteQuery_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/completequery/SyncCompleteQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/completequery/SyncCompleteQuery.java new file mode 100644 index 000000000000..c3519d41329a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/completequery/SyncCompleteQuery.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_CompletionService_CompleteQuery_sync] +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest; +import com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse; +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class SyncCompleteQuery { + + public static void main(String[] args) throws Exception { + syncCompleteQuery(); + } + + public static void syncCompleteQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) { + CompleteQueryRequest request = + CompleteQueryRequest.newBuilder() + .setDataStore( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setQuery("query107944136") + .setQueryModel("queryModel-184930495") + .setUserPseudoId("userPseudoId-1155274652") + .setIncludeTailSuggestions(true) + .build(); + CompleteQueryResponse response = completionServiceClient.completeQuery(request); + } + } +} +// [END discoveryengine_v1alpha_generated_CompletionService_CompleteQuery_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..8b5e5a772a70 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_CompletionService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceClient; +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CompletionServiceSettings completionServiceSettings = + CompletionServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CompletionServiceClient completionServiceClient = + CompletionServiceClient.create(completionServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_CompletionService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..6e7511b3d326 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_CompletionService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceClient; +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CompletionServiceSettings completionServiceSettings = + CompletionServiceSettings.newHttpJsonBuilder().build(); + CompletionServiceClient completionServiceClient = + CompletionServiceClient.create(completionServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_CompletionService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..98bfd8788d39 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_CompletionService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceClient; +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CompletionServiceSettings completionServiceSettings = + CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + CompletionServiceClient completionServiceClient = + CompletionServiceClient.create(completionServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_CompletionService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservicesettings/completequery/SyncCompleteQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservicesettings/completequery/SyncCompleteQuery.java new file mode 100644 index 000000000000..3344411c8e3f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/completionservicesettings/completequery/SyncCompleteQuery.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_CompletionServiceSettings_CompleteQuery_sync] +import com.google.cloud.discoveryengine.v1alpha.CompletionServiceSettings; +import java.time.Duration; + +public class SyncCompleteQuery { + + public static void main(String[] args) throws Exception { + syncCompleteQuery(); + } + + public static void syncCompleteQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CompletionServiceSettings.Builder completionServiceSettingsBuilder = + CompletionServiceSettings.newBuilder(); + completionServiceSettingsBuilder + .completeQuerySettings() + .setRetrySettings( + completionServiceSettingsBuilder + .completeQuerySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_CompletionServiceSettings_CompleteQuery_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/AsyncConverseConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/AsyncConverseConversation.java new file mode 100644 index 000000000000..c2adc928e7bc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/AsyncConverseConversation.java @@ -0,0 +1,68 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.ServingConfigName; +import com.google.cloud.discoveryengine.v1alpha.TextInput; +import java.util.HashMap; + +public class AsyncConverseConversation { + + public static void main(String[] args) throws Exception { + asyncConverseConversation(); + } + + public static void asyncConverseConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ConverseConversationRequest request = + ConverseConversationRequest.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setQuery(TextInput.newBuilder().build()) + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setConversation(Conversation.newBuilder().build()) + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .setSummarySpec(SearchRequest.ContentSearchSpec.SummarySpec.newBuilder().build()) + .build(); + ApiFuture future = + conversationalSearchServiceClient.converseConversationCallable().futureCall(request); + // Do something. + ConverseConversationResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversation.java new file mode 100644 index 000000000000..2e9d806d5a28 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversation.java @@ -0,0 +1,65 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.ServingConfigName; +import com.google.cloud.discoveryengine.v1alpha.TextInput; +import java.util.HashMap; + +public class SyncConverseConversation { + + public static void main(String[] args) throws Exception { + syncConverseConversation(); + } + + public static void syncConverseConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ConverseConversationRequest request = + ConverseConversationRequest.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .setQuery(TextInput.newBuilder().build()) + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setConversation(Conversation.newBuilder().build()) + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .setSummarySpec(SearchRequest.ContentSearchSpec.SummarySpec.newBuilder().build()) + .build(); + ConverseConversationResponse response = + conversationalSearchServiceClient.converseConversation(request); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversationConversationnameTextinput.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversationConversationnameTextinput.java new file mode 100644 index 000000000000..96704c26cf29 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversationConversationnameTextinput.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_ConversationnameTextinput_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.TextInput; + +public class SyncConverseConversationConversationnameTextinput { + + public static void main(String[] args) throws Exception { + syncConverseConversationConversationnameTextinput(); + } + + public static void syncConverseConversationConversationnameTextinput() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + TextInput query = TextInput.newBuilder().build(); + ConverseConversationResponse response = + conversationalSearchServiceClient.converseConversation(name, query); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_ConversationnameTextinput_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversationStringTextinput.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversationStringTextinput.java new file mode 100644 index 000000000000..e87efc311010 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/converseconversation/SyncConverseConversationStringTextinput.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_StringTextinput_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ConverseConversationResponse; +import com.google.cloud.discoveryengine.v1alpha.TextInput; + +public class SyncConverseConversationStringTextinput { + + public static void main(String[] args) throws Exception { + syncConverseConversationStringTextinput(); + } + + public static void syncConverseConversationStringTextinput() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + String name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString(); + TextInput query = TextInput.newBuilder().build(); + ConverseConversationResponse response = + conversationalSearchServiceClient.converseConversation(name, query); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ConverseConversation_StringTextinput_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..e88a7fb25f50 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConversationalSearchServiceSettings conversationalSearchServiceSettings = + ConversationalSearchServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create(conversationalSearchServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..7ee82e20ac0f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConversationalSearchServiceSettings conversationalSearchServiceSettings = + ConversationalSearchServiceSettings.newHttpJsonBuilder().build(); + ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create(conversationalSearchServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..75e9149de128 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConversationalSearchServiceSettings conversationalSearchServiceSettings = + ConversationalSearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create(conversationalSearchServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/AsyncCreateConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/AsyncCreateConversation.java new file mode 100644 index 000000000000..9fec34923b81 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/AsyncCreateConversation.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class AsyncCreateConversation { + + public static void main(String[] args) throws Exception { + asyncCreateConversation(); + } + + public static void asyncCreateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setConversation(Conversation.newBuilder().build()) + .build(); + ApiFuture future = + conversationalSearchServiceClient.createConversationCallable().futureCall(request); + // Do something. + Conversation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversation.java new file mode 100644 index 000000000000..2aad833373fa --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversation.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.CreateConversationRequest; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class SyncCreateConversation { + + public static void main(String[] args) throws Exception { + syncCreateConversation(); + } + + public static void syncCreateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + CreateConversationRequest request = + CreateConversationRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setConversation(Conversation.newBuilder().build()) + .build(); + Conversation response = conversationalSearchServiceClient.createConversation(request); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversationDatastorenameConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversationDatastorenameConversation.java new file mode 100644 index 000000000000..2324afd451a4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversationDatastorenameConversation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_DatastorenameConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class SyncCreateConversationDatastorenameConversation { + + public static void main(String[] args) throws Exception { + syncCreateConversationDatastorenameConversation(); + } + + public static void syncCreateConversationDatastorenameConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Conversation conversation = Conversation.newBuilder().build(); + Conversation response = + conversationalSearchServiceClient.createConversation(parent, conversation); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_DatastorenameConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversationStringConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversationStringConversation.java new file mode 100644 index 000000000000..68142b7cac71 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/createconversation/SyncCreateConversationStringConversation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_StringConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class SyncCreateConversationStringConversation { + + public static void main(String[] args) throws Exception { + syncCreateConversationStringConversation(); + } + + public static void syncCreateConversationStringConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + String parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString(); + Conversation conversation = Conversation.newBuilder().build(); + Conversation response = + conversationalSearchServiceClient.createConversation(parent, conversation); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_CreateConversation_StringConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/AsyncDeleteConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/AsyncDeleteConversation.java new file mode 100644 index 000000000000..ae388f9b18dc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/AsyncDeleteConversation.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest; +import com.google.protobuf.Empty; + +public class AsyncDeleteConversation { + + public static void main(String[] args) throws Exception { + asyncDeleteConversation(); + } + + public static void asyncDeleteConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .build(); + ApiFuture future = + conversationalSearchServiceClient.deleteConversationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversation.java new file mode 100644 index 000000000000..a899030844f6 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DeleteConversationRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteConversation { + + public static void main(String[] args) throws Exception { + syncDeleteConversation(); + } + + public static void syncDeleteConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + DeleteConversationRequest request = + DeleteConversationRequest.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .build(); + conversationalSearchServiceClient.deleteConversation(request); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversationConversationname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversationConversationname.java new file mode 100644 index 000000000000..4d5d2259ae5d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversationConversationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_Conversationname_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteConversationConversationname { + + public static void main(String[] args) throws Exception { + syncDeleteConversationConversationname(); + } + + public static void syncDeleteConversationConversationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + conversationalSearchServiceClient.deleteConversation(name); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_Conversationname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversationString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversationString.java new file mode 100644 index 000000000000..f27b357ddbce --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/deleteconversation/SyncDeleteConversationString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_String_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteConversationString { + + public static void main(String[] args) throws Exception { + syncDeleteConversationString(); + } + + public static void syncDeleteConversationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + String name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString(); + conversationalSearchServiceClient.deleteConversation(name); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_DeleteConversation_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/AsyncGetConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/AsyncGetConversation.java new file mode 100644 index 000000000000..db3b55f39318 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/AsyncGetConversation.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.GetConversationRequest; + +public class AsyncGetConversation { + + public static void main(String[] args) throws Exception { + asyncGetConversation(); + } + + public static void asyncGetConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + GetConversationRequest request = + GetConversationRequest.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .build(); + ApiFuture future = + conversationalSearchServiceClient.getConversationCallable().futureCall(request); + // Do something. + Conversation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversation.java new file mode 100644 index 000000000000..fdebb54f2642 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.GetConversationRequest; + +public class SyncGetConversation { + + public static void main(String[] args) throws Exception { + syncGetConversation(); + } + + public static void syncGetConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + GetConversationRequest request = + GetConversationRequest.newBuilder() + .setName( + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString()) + .build(); + Conversation response = conversationalSearchServiceClient.getConversation(request); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversationConversationname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversationConversationname.java new file mode 100644 index 000000000000..14a424c59ea5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversationConversationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_Conversationname_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; + +public class SyncGetConversationConversationname { + + public static void main(String[] args) throws Exception { + syncGetConversationConversationname(); + } + + public static void syncGetConversationConversationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ConversationName name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]"); + Conversation response = conversationalSearchServiceClient.getConversation(name); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_Conversationname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversationString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversationString.java new file mode 100644 index 000000000000..ddce3e081527 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/getconversation/SyncGetConversationString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_String_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationName; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; + +public class SyncGetConversationString { + + public static void main(String[] args) throws Exception { + syncGetConversationString(); + } + + public static void syncGetConversationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + String name = + ConversationName.ofProjectLocationDataStoreConversationName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]") + .toString(); + Conversation response = conversationalSearchServiceClient.getConversation(name); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_GetConversation_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/AsyncListConversations.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/AsyncListConversations.java new file mode 100644 index 000000000000..c3d9e584dff7 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/AsyncListConversations.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest; + +public class AsyncListConversations { + + public static void main(String[] args) throws Exception { + asyncListConversations(); + } + + public static void asyncListConversations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + conversationalSearchServiceClient.listConversationsPagedCallable().futureCall(request); + // Do something. + for (Conversation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/AsyncListConversationsPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/AsyncListConversationsPaged.java new file mode 100644 index 000000000000..83e1e79bec50 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/AsyncListConversationsPaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_Paged_async] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsResponse; +import com.google.common.base.Strings; + +public class AsyncListConversationsPaged { + + public static void main(String[] args) throws Exception { + asyncListConversationsPaged(); + } + + public static void asyncListConversationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListConversationsResponse response = + conversationalSearchServiceClient.listConversationsCallable().call(request); + for (Conversation element : response.getConversationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversations.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversations.java new file mode 100644 index 000000000000..97186512b46e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversations.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ListConversationsRequest; + +public class SyncListConversations { + + public static void main(String[] args) throws Exception { + syncListConversations(); + } + + public static void syncListConversations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + ListConversationsRequest request = + ListConversationsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Conversation element : + conversationalSearchServiceClient.listConversations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversationsDatastorename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversationsDatastorename.java new file mode 100644 index 000000000000..2d9de10e2d1e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversationsDatastorename.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_Datastorename_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class SyncListConversationsDatastorename { + + public static void main(String[] args) throws Exception { + syncListConversationsDatastorename(); + } + + public static void syncListConversationsDatastorename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + for (Conversation element : + conversationalSearchServiceClient.listConversations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_Datastorename_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversationsString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversationsString.java new file mode 100644 index 000000000000..ece22916b32b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/listconversations/SyncListConversationsString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_String_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; + +public class SyncListConversationsString { + + public static void main(String[] args) throws Exception { + syncListConversationsString(); + } + + public static void syncListConversationsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + String parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString(); + for (Conversation element : + conversationalSearchServiceClient.listConversations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/AsyncUpdateConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/AsyncUpdateConversation.java new file mode 100644 index 000000000000..31b35dad5416 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/AsyncUpdateConversation.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_UpdateConversation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateConversation { + + public static void main(String[] args) throws Exception { + asyncUpdateConversation(); + } + + public static void asyncUpdateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + UpdateConversationRequest request = + UpdateConversationRequest.newBuilder() + .setConversation(Conversation.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + conversationalSearchServiceClient.updateConversationCallable().futureCall(request); + // Do something. + Conversation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_UpdateConversation_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/SyncUpdateConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/SyncUpdateConversation.java new file mode 100644 index 000000000000..2c5563278ef5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/SyncUpdateConversation.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_UpdateConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UpdateConversationRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateConversation { + + public static void main(String[] args) throws Exception { + syncUpdateConversation(); + } + + public static void syncUpdateConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + UpdateConversationRequest request = + UpdateConversationRequest.newBuilder() + .setConversation(Conversation.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Conversation response = conversationalSearchServiceClient.updateConversation(request); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_UpdateConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/SyncUpdateConversationConversationFieldmask.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/SyncUpdateConversationConversationFieldmask.java new file mode 100644 index 000000000000..c3dd3c0ab884 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservice/updateconversation/SyncUpdateConversationConversationFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchService_UpdateConversation_ConversationFieldmask_sync] +import com.google.cloud.discoveryengine.v1alpha.Conversation; +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateConversationConversationFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateConversationConversationFieldmask(); + } + + public static void syncUpdateConversationConversationFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + Conversation conversation = Conversation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Conversation response = + conversationalSearchServiceClient.updateConversation(conversation, updateMask); + } + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchService_UpdateConversation_ConversationFieldmask_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservicesettings/converseconversation/SyncConverseConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservicesettings/converseconversation/SyncConverseConversation.java new file mode 100644 index 000000000000..3045524a6297 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/conversationalsearchservicesettings/converseconversation/SyncConverseConversation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchServiceSettings_ConverseConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.ConversationalSearchServiceSettings; +import java.time.Duration; + +public class SyncConverseConversation { + + public static void main(String[] args) throws Exception { + syncConverseConversation(); + } + + public static void syncConverseConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConversationalSearchServiceSettings.Builder conversationalSearchServiceSettingsBuilder = + ConversationalSearchServiceSettings.newBuilder(); + conversationalSearchServiceSettingsBuilder + .converseConversationSettings() + .setRetrySettings( + conversationalSearchServiceSettingsBuilder + .converseConversationSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ConversationalSearchServiceSettings conversationalSearchServiceSettings = + conversationalSearchServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchServiceSettings_ConverseConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..8a44fcbfaa6a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DocumentServiceSettings documentServiceSettings = + DocumentServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DocumentServiceClient documentServiceClient = + DocumentServiceClient.create(documentServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..d12de59f3db5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DocumentServiceSettings documentServiceSettings = + DocumentServiceSettings.newHttpJsonBuilder().build(); + DocumentServiceClient documentServiceClient = + DocumentServiceClient.create(documentServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..345ab0da0baf --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DocumentServiceSettings documentServiceSettings = + DocumentServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DocumentServiceClient documentServiceClient = + DocumentServiceClient.create(documentServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/AsyncCreateDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/AsyncCreateDocument.java new file mode 100644 index 000000000000..439a8eb77ff8 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/AsyncCreateDocument.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_CreateDocument_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class AsyncCreateDocument { + + public static void main(String[] args) throws Exception { + asyncCreateDocument(); + } + + public static void asyncCreateDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + CreateDocumentRequest request = + CreateDocumentRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setDocument(Document.newBuilder().build()) + .setDocumentId("documentId-814940266") + .build(); + ApiFuture future = + documentServiceClient.createDocumentCallable().futureCall(request); + // Do something. + Document response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_CreateDocument_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocument.java new file mode 100644 index 000000000000..24b4e82ec100 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocument.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_CreateDocument_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.CreateDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class SyncCreateDocument { + + public static void main(String[] args) throws Exception { + syncCreateDocument(); + } + + public static void syncCreateDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + CreateDocumentRequest request = + CreateDocumentRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setDocument(Document.newBuilder().build()) + .setDocumentId("documentId-814940266") + .build(); + Document response = documentServiceClient.createDocument(request); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_CreateDocument_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocumentBranchnameDocumentString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocumentBranchnameDocumentString.java new file mode 100644 index 000000000000..419d7e3b07ff --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocumentBranchnameDocumentString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_CreateDocument_BranchnameDocumentString_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class SyncCreateDocumentBranchnameDocumentString { + + public static void main(String[] args) throws Exception { + syncCreateDocumentBranchnameDocumentString(); + } + + public static void syncCreateDocumentBranchnameDocumentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + Document response = documentServiceClient.createDocument(parent, document, documentId); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_CreateDocument_BranchnameDocumentString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocumentStringDocumentString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocumentStringDocumentString.java new file mode 100644 index 000000000000..b781437695bc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/createdocument/SyncCreateDocumentStringDocumentString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_CreateDocument_StringDocumentString_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class SyncCreateDocumentStringDocumentString { + + public static void main(String[] args) throws Exception { + syncCreateDocumentStringDocumentString(); + } + + public static void syncCreateDocumentStringDocumentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString(); + Document document = Document.newBuilder().build(); + String documentId = "documentId-814940266"; + Document response = documentServiceClient.createDocument(parent, document, documentId); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_CreateDocument_StringDocumentString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/AsyncDeleteDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/AsyncDeleteDocument.java new file mode 100644 index 000000000000..194fcd9821ea --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/AsyncDeleteDocument.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteDocument { + + public static void main(String[] args) throws Exception { + asyncDeleteDocument(); + } + + public static void asyncDeleteDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + DeleteDocumentRequest request = + DeleteDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + ApiFuture future = documentServiceClient.deleteDocumentCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocument.java new file mode 100644 index 000000000000..07eaf0238a75 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocument.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_sync] +import com.google.cloud.discoveryengine.v1alpha.DeleteDocumentRequest; +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDocument { + + public static void main(String[] args) throws Exception { + syncDeleteDocument(); + } + + public static void syncDeleteDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + DeleteDocumentRequest request = + DeleteDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + documentServiceClient.deleteDocument(request); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocumentDocumentname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocumentDocumentname.java new file mode 100644 index 000000000000..fcb006a6953e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocumentDocumentname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_Documentname_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDocumentDocumentname { + + public static void main(String[] args) throws Exception { + syncDeleteDocumentDocumentname(); + } + + public static void syncDeleteDocumentDocumentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + documentServiceClient.deleteDocument(name); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_Documentname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocumentString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocumentString.java new file mode 100644 index 000000000000..2321dd6f0465 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/deletedocument/SyncDeleteDocumentString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_String_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDocumentString { + + public static void main(String[] args) throws Exception { + syncDeleteDocumentString(); + } + + public static void syncDeleteDocumentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString(); + documentServiceClient.deleteDocument(name); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_DeleteDocument_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/AsyncGetDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/AsyncGetDocument.java new file mode 100644 index 000000000000..93bfc340d985 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/AsyncGetDocument.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetDocument_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; + +public class AsyncGetDocument { + + public static void main(String[] args) throws Exception { + asyncGetDocument(); + } + + public static void asyncGetDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + GetDocumentRequest request = + GetDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + ApiFuture future = documentServiceClient.getDocumentCallable().futureCall(request); + // Do something. + Document response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetDocument_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocument.java new file mode 100644 index 000000000000..061cecb502d5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocument.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetDocument_sync] +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.GetDocumentRequest; + +public class SyncGetDocument { + + public static void main(String[] args) throws Exception { + syncGetDocument(); + } + + public static void syncGetDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + GetDocumentRequest request = + GetDocumentRequest.newBuilder() + .setName( + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString()) + .build(); + Document response = documentServiceClient.getDocument(request); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetDocument_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocumentDocumentname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocumentDocumentname.java new file mode 100644 index 000000000000..f34d7683c1ee --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocumentDocumentname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetDocument_Documentname_sync] +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class SyncGetDocumentDocumentname { + + public static void main(String[] args) throws Exception { + syncGetDocumentDocumentname(); + } + + public static void syncGetDocumentDocumentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + DocumentName name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]"); + Document response = documentServiceClient.getDocument(name); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetDocument_Documentname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocumentString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocumentString.java new file mode 100644 index 000000000000..fb89416e1bd7 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/getdocument/SyncGetDocumentString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_GetDocument_String_sync] +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class SyncGetDocumentString { + + public static void main(String[] args) throws Exception { + syncGetDocumentString(); + } + + public static void syncGetDocumentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String name = + DocumentName.ofProjectLocationDataStoreBranchDocumentName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]") + .toString(); + Document response = documentServiceClient.getDocument(name); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_GetDocument_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocuments.java new file mode 100644 index 000000000000..eeaa4d9ab359 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocuments.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ImportDocuments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; +import com.google.longrunning.Operation; + +public class AsyncImportDocuments { + + public static void main(String[] args) throws Exception { + asyncImportDocuments(); + } + + public static void asyncImportDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setAutoGenerateIds(true) + .setIdField("idField1629396127") + .build(); + ApiFuture future = + documentServiceClient.importDocumentsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ImportDocuments_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocumentsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocumentsLRO.java new file mode 100644 index 000000000000..047583e8f2de --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/AsyncImportDocumentsLRO.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ImportDocuments_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; + +public class AsyncImportDocumentsLRO { + + public static void main(String[] args) throws Exception { + asyncImportDocumentsLRO(); + } + + public static void asyncImportDocumentsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setAutoGenerateIds(true) + .setIdField("idField1629396127") + .build(); + OperationFuture future = + documentServiceClient.importDocumentsOperationCallable().futureCall(request); + // Do something. + ImportDocumentsResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ImportDocuments_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/SyncImportDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/SyncImportDocuments.java new file mode 100644 index 000000000000..94d8ac163205 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/importdocuments/SyncImportDocuments.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ImportDocuments_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse; +import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; + +public class SyncImportDocuments { + + public static void main(String[] args) throws Exception { + syncImportDocuments(); + } + + public static void syncImportDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .setAutoGenerateIds(true) + .setIdField("idField1629396127") + .build(); + ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ImportDocuments_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/AsyncListDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/AsyncListDocuments.java new file mode 100644 index 000000000000..807a25d933eb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/AsyncListDocuments.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ListDocuments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; + +public class AsyncListDocuments { + + public static void main(String[] args) throws Exception { + asyncListDocuments(); + } + + public static void asyncListDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ListDocumentsRequest request = + ListDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + documentServiceClient.listDocumentsPagedCallable().futureCall(request); + // Do something. + for (Document element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ListDocuments_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/AsyncListDocumentsPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/AsyncListDocumentsPaged.java new file mode 100644 index 000000000000..dd7f3a4b2d6e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/AsyncListDocumentsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ListDocuments_Paged_async] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsResponse; +import com.google.common.base.Strings; + +public class AsyncListDocumentsPaged { + + public static void main(String[] args) throws Exception { + asyncListDocumentsPaged(); + } + + public static void asyncListDocumentsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ListDocumentsRequest request = + ListDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListDocumentsResponse response = + documentServiceClient.listDocumentsCallable().call(request); + for (Document element : response.getDocumentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ListDocuments_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocuments.java new file mode 100644 index 000000000000..2f8fe8fab93c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocuments.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ListDocuments_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ListDocumentsRequest; + +public class SyncListDocuments { + + public static void main(String[] args) throws Exception { + syncListDocuments(); + } + + public static void syncListDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + ListDocumentsRequest request = + ListDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Document element : documentServiceClient.listDocuments(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ListDocuments_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocumentsBranchname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocumentsBranchname.java new file mode 100644 index 000000000000..8471a43b21b7 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocumentsBranchname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ListDocuments_Branchname_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class SyncListDocumentsBranchname { + + public static void main(String[] args) throws Exception { + syncListDocumentsBranchname(); + } + + public static void syncListDocumentsBranchname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + BranchName parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]"); + for (Document element : documentServiceClient.listDocuments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ListDocuments_Branchname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocumentsString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocumentsString.java new file mode 100644 index 000000000000..46bb4aaa6ece --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/listdocuments/SyncListDocumentsString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_ListDocuments_String_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; + +public class SyncListDocumentsString { + + public static void main(String[] args) throws Exception { + syncListDocumentsString(); + } + + public static void syncListDocumentsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + String parent = + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString(); + for (Document element : documentServiceClient.listDocuments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_ListDocuments_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/AsyncPurgeDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/AsyncPurgeDocuments.java new file mode 100644 index 000000000000..6eba64ef18eb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/AsyncPurgeDocuments.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_PurgeDocuments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; +import com.google.longrunning.Operation; + +public class AsyncPurgeDocuments { + + public static void main(String[] args) throws Exception { + asyncPurgeDocuments(); + } + + public static void asyncPurgeDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + PurgeDocumentsRequest request = + PurgeDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + ApiFuture future = + documentServiceClient.purgeDocumentsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_PurgeDocuments_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/AsyncPurgeDocumentsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/AsyncPurgeDocumentsLRO.java new file mode 100644 index 000000000000..68b796095192 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/AsyncPurgeDocumentsLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_PurgeDocuments_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; + +public class AsyncPurgeDocumentsLRO { + + public static void main(String[] args) throws Exception { + asyncPurgeDocumentsLRO(); + } + + public static void asyncPurgeDocumentsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + PurgeDocumentsRequest request = + PurgeDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + OperationFuture future = + documentServiceClient.purgeDocumentsOperationCallable().futureCall(request); + // Do something. + PurgeDocumentsResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_PurgeDocuments_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/SyncPurgeDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/SyncPurgeDocuments.java new file mode 100644 index 000000000000..2b51f48da3e7 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/purgedocuments/SyncPurgeDocuments.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_PurgeDocuments_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse; + +public class SyncPurgeDocuments { + + public static void main(String[] args) throws Exception { + syncPurgeDocuments(); + } + + public static void syncPurgeDocuments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + PurgeDocumentsRequest request = + PurgeDocumentsRequest.newBuilder() + .setParent( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + PurgeDocumentsResponse response = documentServiceClient.purgeDocumentsAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_PurgeDocuments_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/updatedocument/AsyncUpdateDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/updatedocument/AsyncUpdateDocument.java new file mode 100644 index 000000000000..dd27b1a95d44 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/updatedocument/AsyncUpdateDocument.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_UpdateDocument_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest; + +public class AsyncUpdateDocument { + + public static void main(String[] args) throws Exception { + asyncUpdateDocument(); + } + + public static void asyncUpdateDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + UpdateDocumentRequest request = + UpdateDocumentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiFuture future = + documentServiceClient.updateDocumentCallable().futureCall(request); + // Do something. + Document response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_UpdateDocument_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/updatedocument/SyncUpdateDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/updatedocument/SyncUpdateDocument.java new file mode 100644 index 000000000000..36cf8c1ef25f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservice/updatedocument/SyncUpdateDocument.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentService_UpdateDocument_sync] +import com.google.cloud.discoveryengine.v1alpha.Document; +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest; + +public class SyncUpdateDocument { + + public static void main(String[] args) throws Exception { + syncUpdateDocument(); + } + + public static void syncUpdateDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) { + UpdateDocumentRequest request = + UpdateDocumentRequest.newBuilder() + .setDocument(Document.newBuilder().build()) + .setAllowMissing(true) + .build(); + Document response = documentServiceClient.updateDocument(request); + } + } +} +// [END discoveryengine_v1alpha_generated_DocumentService_UpdateDocument_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservicesettings/getdocument/SyncGetDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservicesettings/getdocument/SyncGetDocument.java new file mode 100644 index 000000000000..cc7401614792 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/documentservicesettings/getdocument/SyncGetDocument.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_DocumentServiceSettings_GetDocument_sync] +import com.google.cloud.discoveryengine.v1alpha.DocumentServiceSettings; +import java.time.Duration; + +public class SyncGetDocument { + + public static void main(String[] args) throws Exception { + syncGetDocument(); + } + + public static void syncGetDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DocumentServiceSettings.Builder documentServiceSettingsBuilder = + DocumentServiceSettings.newBuilder(); + documentServiceSettingsBuilder + .getDocumentSettings() + .setRetrySettings( + documentServiceSettingsBuilder + .getDocumentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DocumentServiceSettings documentServiceSettings = documentServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_DocumentServiceSettings_GetDocument_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..935f8b9e8e89 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RecommendationService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RecommendationServiceSettings recommendationServiceSettings = + RecommendationServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RecommendationServiceClient recommendationServiceClient = + RecommendationServiceClient.create(recommendationServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_RecommendationService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..73c159063179 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RecommendationService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RecommendationServiceSettings recommendationServiceSettings = + RecommendationServiceSettings.newHttpJsonBuilder().build(); + RecommendationServiceClient recommendationServiceClient = + RecommendationServiceClient.create(recommendationServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_RecommendationService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a294a77db518 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RecommendationService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceClient; +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RecommendationServiceSettings recommendationServiceSettings = + RecommendationServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + RecommendationServiceClient recommendationServiceClient = + RecommendationServiceClient.create(recommendationServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_RecommendationService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/recommend/AsyncRecommend.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/recommend/AsyncRecommend.java new file mode 100644 index 000000000000..35b565d7c02c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/recommend/AsyncRecommend.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RecommendationService_Recommend_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.RecommendRequest; +import com.google.cloud.discoveryengine.v1alpha.RecommendResponse; +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ServingConfigName; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.protobuf.Value; +import java.util.HashMap; + +public class AsyncRecommend { + + public static void main(String[] args) throws Exception { + asyncRecommend(); + } + + public static void asyncRecommend() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecommendationServiceClient recommendationServiceClient = + RecommendationServiceClient.create()) { + RecommendRequest request = + RecommendRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .setPageSize(883849137) + .setFilter("filter-1274492040") + .setValidateOnly(true) + .putAllParams(new HashMap()) + .putAllUserLabels(new HashMap()) + .build(); + ApiFuture future = + recommendationServiceClient.recommendCallable().futureCall(request); + // Do something. + RecommendResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_RecommendationService_Recommend_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/recommend/SyncRecommend.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/recommend/SyncRecommend.java new file mode 100644 index 000000000000..ea81d3fc1d47 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservice/recommend/SyncRecommend.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RecommendationService_Recommend_sync] +import com.google.cloud.discoveryengine.v1alpha.RecommendRequest; +import com.google.cloud.discoveryengine.v1alpha.RecommendResponse; +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ServingConfigName; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.protobuf.Value; +import java.util.HashMap; + +public class SyncRecommend { + + public static void main(String[] args) throws Exception { + syncRecommend(); + } + + public static void syncRecommend() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RecommendationServiceClient recommendationServiceClient = + RecommendationServiceClient.create()) { + RecommendRequest request = + RecommendRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .setPageSize(883849137) + .setFilter("filter-1274492040") + .setValidateOnly(true) + .putAllParams(new HashMap()) + .putAllUserLabels(new HashMap()) + .build(); + RecommendResponse response = recommendationServiceClient.recommend(request); + } + } +} +// [END discoveryengine_v1alpha_generated_RecommendationService_Recommend_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservicesettings/recommend/SyncRecommend.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservicesettings/recommend/SyncRecommend.java new file mode 100644 index 000000000000..bedbe15386fb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/recommendationservicesettings/recommend/SyncRecommend.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_RecommendationServiceSettings_Recommend_sync] +import com.google.cloud.discoveryengine.v1alpha.RecommendationServiceSettings; +import java.time.Duration; + +public class SyncRecommend { + + public static void main(String[] args) throws Exception { + syncRecommend(); + } + + public static void syncRecommend() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RecommendationServiceSettings.Builder recommendationServiceSettingsBuilder = + RecommendationServiceSettings.newBuilder(); + recommendationServiceSettingsBuilder + .recommendSettings() + .setRetrySettings( + recommendationServiceSettingsBuilder + .recommendSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RecommendationServiceSettings recommendationServiceSettings = + recommendationServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_RecommendationServiceSettings_Recommend_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..bcdc742c5dc0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SchemaServiceSettings schemaServiceSettings = + SchemaServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..b0152c1b3a8c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SchemaServiceSettings schemaServiceSettings = + SchemaServiceSettings.newHttpJsonBuilder().build(); + SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..29d97e81e45c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SchemaServiceSettings schemaServiceSettings = + SchemaServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/AsyncCreateSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/AsyncCreateSchema.java new file mode 100644 index 000000000000..7a96d2286e27 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/AsyncCreateSchema.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_CreateSchema_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreateSchema { + + public static void main(String[] args) throws Exception { + asyncCreateSchema(); + } + + public static void asyncCreateSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + CreateSchemaRequest request = + CreateSchemaRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setSchema(Schema.newBuilder().build()) + .setSchemaId("schemaId-697673060") + .build(); + ApiFuture future = schemaServiceClient.createSchemaCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_CreateSchema_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/AsyncCreateSchemaLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/AsyncCreateSchemaLRO.java new file mode 100644 index 000000000000..6d9b2ad915b2 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/AsyncCreateSchemaLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_CreateSchema_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class AsyncCreateSchemaLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSchemaLRO(); + } + + public static void asyncCreateSchemaLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + CreateSchemaRequest request = + CreateSchemaRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setSchema(Schema.newBuilder().build()) + .setSchemaId("schemaId-697673060") + .build(); + OperationFuture future = + schemaServiceClient.createSchemaOperationCallable().futureCall(request); + // Do something. + Schema response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_CreateSchema_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchema.java new file mode 100644 index 000000000000..603d717b0eeb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchema.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_CreateSchema_sync] +import com.google.cloud.discoveryengine.v1alpha.CreateSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncCreateSchema { + + public static void main(String[] args) throws Exception { + syncCreateSchema(); + } + + public static void syncCreateSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + CreateSchemaRequest request = + CreateSchemaRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setSchema(Schema.newBuilder().build()) + .setSchemaId("schemaId-697673060") + .build(); + Schema response = schemaServiceClient.createSchemaAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_CreateSchema_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchemaDatastorenameSchemaString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchemaDatastorenameSchemaString.java new file mode 100644 index 000000000000..a8c6f3d88539 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchemaDatastorenameSchemaString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_CreateSchema_DatastorenameSchemaString_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncCreateSchemaDatastorenameSchemaString { + + public static void main(String[] args) throws Exception { + syncCreateSchemaDatastorenameSchemaString(); + } + + public static void syncCreateSchemaDatastorenameSchemaString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + Schema response = schemaServiceClient.createSchemaAsync(parent, schema, schemaId).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_CreateSchema_DatastorenameSchemaString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchemaStringSchemaString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchemaStringSchemaString.java new file mode 100644 index 000000000000..588919deceb5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/createschema/SyncCreateSchemaStringSchemaString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_CreateSchema_StringSchemaString_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncCreateSchemaStringSchemaString { + + public static void main(String[] args) throws Exception { + syncCreateSchemaStringSchemaString(); + } + + public static void syncCreateSchemaStringSchemaString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + String parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString(); + Schema schema = Schema.newBuilder().build(); + String schemaId = "schemaId-697673060"; + Schema response = schemaServiceClient.createSchemaAsync(parent, schema, schemaId).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_CreateSchema_StringSchemaString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/AsyncDeleteSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/AsyncDeleteSchema.java new file mode 100644 index 000000000000..242940c87f9f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/AsyncDeleteSchema.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteSchema { + + public static void main(String[] args) throws Exception { + asyncDeleteSchema(); + } + + public static void asyncDeleteSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + DeleteSchemaRequest request = + DeleteSchemaRequest.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .build(); + ApiFuture future = schemaServiceClient.deleteSchemaCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/AsyncDeleteSchemaLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/AsyncDeleteSchemaLRO.java new file mode 100644 index 000000000000..a07296d72415 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/AsyncDeleteSchemaLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteSchemaLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSchemaLRO(); + } + + public static void asyncDeleteSchemaLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + DeleteSchemaRequest request = + DeleteSchemaRequest.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .build(); + OperationFuture future = + schemaServiceClient.deleteSchemaOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchema.java new file mode 100644 index 000000000000..dcc27f913c7b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchema.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_sync] +import com.google.cloud.discoveryengine.v1alpha.DeleteSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteSchema { + + public static void main(String[] args) throws Exception { + syncDeleteSchema(); + } + + public static void syncDeleteSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + DeleteSchemaRequest request = + DeleteSchemaRequest.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .build(); + schemaServiceClient.deleteSchemaAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchemaSchemaname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchemaSchemaname.java new file mode 100644 index 000000000000..5ff33a9dd6ac --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchemaSchemaname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_Schemaname_sync] +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteSchemaSchemaname { + + public static void main(String[] args) throws Exception { + syncDeleteSchemaSchemaname(); + } + + public static void syncDeleteSchemaSchemaname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + schemaServiceClient.deleteSchemaAsync(name).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_Schemaname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchemaString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchemaString.java new file mode 100644 index 000000000000..f81eee36bf3f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/deleteschema/SyncDeleteSchemaString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_String_sync] +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteSchemaString { + + public static void main(String[] args) throws Exception { + syncDeleteSchemaString(); + } + + public static void syncDeleteSchemaString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + String name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString(); + schemaServiceClient.deleteSchemaAsync(name).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_DeleteSchema_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/AsyncGetSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/AsyncGetSchema.java new file mode 100644 index 000000000000..bacbb204686c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/AsyncGetSchema.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_GetSchema_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class AsyncGetSchema { + + public static void main(String[] args) throws Exception { + asyncGetSchema(); + } + + public static void asyncGetSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + GetSchemaRequest request = + GetSchemaRequest.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .build(); + ApiFuture future = schemaServiceClient.getSchemaCallable().futureCall(request); + // Do something. + Schema response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_GetSchema_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchema.java new file mode 100644 index 000000000000..b240bf3d81c0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchema.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_GetSchema_sync] +import com.google.cloud.discoveryengine.v1alpha.GetSchemaRequest; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncGetSchema { + + public static void main(String[] args) throws Exception { + syncGetSchema(); + } + + public static void syncGetSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + GetSchemaRequest request = + GetSchemaRequest.newBuilder() + .setName( + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString()) + .build(); + Schema response = schemaServiceClient.getSchema(request); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_GetSchema_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchemaSchemaname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchemaSchemaname.java new file mode 100644 index 000000000000..ebd415234769 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchemaSchemaname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_GetSchema_Schemaname_sync] +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncGetSchemaSchemaname { + + public static void main(String[] args) throws Exception { + syncGetSchemaSchemaname(); + } + + public static void syncGetSchemaSchemaname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + SchemaName name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]"); + Schema response = schemaServiceClient.getSchema(name); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_GetSchema_Schemaname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchemaString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchemaString.java new file mode 100644 index 000000000000..2bd7bc29acf4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/getschema/SyncGetSchemaString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_GetSchema_String_sync] +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaName; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncGetSchemaString { + + public static void main(String[] args) throws Exception { + syncGetSchemaString(); + } + + public static void syncGetSchemaString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + String name = + SchemaName.ofProjectLocationDataStoreSchemaName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]") + .toString(); + Schema response = schemaServiceClient.getSchema(name); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_GetSchema_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/AsyncListSchemas.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/AsyncListSchemas.java new file mode 100644 index 000000000000..c1a589deaf0c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/AsyncListSchemas.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_ListSchemas_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class AsyncListSchemas { + + public static void main(String[] args) throws Exception { + asyncListSchemas(); + } + + public static void asyncListSchemas() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + ListSchemasRequest request = + ListSchemasRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = schemaServiceClient.listSchemasPagedCallable().futureCall(request); + // Do something. + for (Schema element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_ListSchemas_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/AsyncListSchemasPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/AsyncListSchemasPaged.java new file mode 100644 index 000000000000..76c1217713cc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/AsyncListSchemasPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_ListSchemas_Paged_async] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasResponse; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.common.base.Strings; + +public class AsyncListSchemasPaged { + + public static void main(String[] args) throws Exception { + asyncListSchemasPaged(); + } + + public static void asyncListSchemasPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + ListSchemasRequest request = + ListSchemasRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListSchemasResponse response = schemaServiceClient.listSchemasCallable().call(request); + for (Schema element : response.getSchemasList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_ListSchemas_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemas.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemas.java new file mode 100644 index 000000000000..47db3fbb789f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemas.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_ListSchemas_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ListSchemasRequest; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncListSchemas { + + public static void main(String[] args) throws Exception { + syncListSchemas(); + } + + public static void syncListSchemas() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + ListSchemasRequest request = + ListSchemasRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Schema element : schemaServiceClient.listSchemas(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_ListSchemas_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemasDatastorename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemasDatastorename.java new file mode 100644 index 000000000000..845a5a0b1526 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemasDatastorename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_ListSchemas_Datastorename_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncListSchemasDatastorename { + + public static void main(String[] args) throws Exception { + syncListSchemasDatastorename(); + } + + public static void syncListSchemasDatastorename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + for (Schema element : schemaServiceClient.listSchemas(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_ListSchemas_Datastorename_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemasString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemasString.java new file mode 100644 index 000000000000..1e9b950ea255 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/listschemas/SyncListSchemasString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_ListSchemas_String_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; + +public class SyncListSchemasString { + + public static void main(String[] args) throws Exception { + syncListSchemasString(); + } + + public static void syncListSchemasString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + String parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString(); + for (Schema element : schemaServiceClient.listSchemas(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_ListSchemas_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/AsyncUpdateSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/AsyncUpdateSchema.java new file mode 100644 index 000000000000..184788033dbc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/AsyncUpdateSchema.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_UpdateSchema_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateSchema { + + public static void main(String[] args) throws Exception { + asyncUpdateSchema(); + } + + public static void asyncUpdateSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + UpdateSchemaRequest request = + UpdateSchemaRequest.newBuilder() + .setSchema(Schema.newBuilder().build()) + .setAllowMissing(true) + .build(); + ApiFuture future = schemaServiceClient.updateSchemaCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_UpdateSchema_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/AsyncUpdateSchemaLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/AsyncUpdateSchemaLRO.java new file mode 100644 index 000000000000..c9d5e44e2f67 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/AsyncUpdateSchemaLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_UpdateSchema_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaMetadata; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest; + +public class AsyncUpdateSchemaLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSchemaLRO(); + } + + public static void asyncUpdateSchemaLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + UpdateSchemaRequest request = + UpdateSchemaRequest.newBuilder() + .setSchema(Schema.newBuilder().build()) + .setAllowMissing(true) + .build(); + OperationFuture future = + schemaServiceClient.updateSchemaOperationCallable().futureCall(request); + // Do something. + Schema response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_UpdateSchema_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/SyncUpdateSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/SyncUpdateSchema.java new file mode 100644 index 000000000000..f2ebd0eccffc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservice/updateschema/SyncUpdateSchema.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaService_UpdateSchema_sync] +import com.google.cloud.discoveryengine.v1alpha.Schema; +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UpdateSchemaRequest; + +public class SyncUpdateSchema { + + public static void main(String[] args) throws Exception { + syncUpdateSchema(); + } + + public static void syncUpdateSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) { + UpdateSchemaRequest request = + UpdateSchemaRequest.newBuilder() + .setSchema(Schema.newBuilder().build()) + .setAllowMissing(true) + .build(); + Schema response = schemaServiceClient.updateSchemaAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SchemaService_UpdateSchema_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservicesettings/getschema/SyncGetSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservicesettings/getschema/SyncGetSchema.java new file mode 100644 index 000000000000..1864fe9de7bf --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/schemaservicesettings/getschema/SyncGetSchema.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SchemaServiceSettings_GetSchema_sync] +import com.google.cloud.discoveryengine.v1alpha.SchemaServiceSettings; +import java.time.Duration; + +public class SyncGetSchema { + + public static void main(String[] args) throws Exception { + syncGetSchema(); + } + + public static void syncGetSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SchemaServiceSettings.Builder schemaServiceSettingsBuilder = SchemaServiceSettings.newBuilder(); + schemaServiceSettingsBuilder + .getSchemaSettings() + .setRetrySettings( + schemaServiceSettingsBuilder + .getSchemaSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SchemaServiceSettings schemaServiceSettings = schemaServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_SchemaServiceSettings_GetSchema_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..914e96be0169 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SearchService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SearchServiceSettings searchServiceSettings = + SearchServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SearchService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..5c3e2ef9de66 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SearchService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.SearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SearchServiceSettings searchServiceSettings = + SearchServiceSettings.newHttpJsonBuilder().build(); + SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SearchService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..cc9e5fa53eea --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SearchService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.SearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SearchServiceSettings searchServiceSettings = + SearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SearchService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/AsyncSearch.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/AsyncSearch.java new file mode 100644 index 000000000000..5156745be826 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/AsyncSearch.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SearchService_Search_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.SearchResponse; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ServingConfigName; +import com.google.cloud.discoveryengine.v1alpha.UserInfo; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.HashMap; + +public class AsyncSearch { + + public static void main(String[] args) throws Exception { + asyncSearch(); + } + + public static void asyncSearch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) { + SearchRequest request = + SearchRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setBranch( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setQuery("query107944136") + .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOffset(-1019779949) + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setUserInfo(UserInfo.newBuilder().build()) + .addAllFacetSpecs(new ArrayList()) + .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build()) + .putAllParams(new HashMap()) + .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) + .setUserPseudoId("userPseudoId-1155274652") + .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build()) + .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .build(); + ApiFuture future = + searchServiceClient.searchPagedCallable().futureCall(request); + // Do something. + for (SearchResponse.SearchResult element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_SearchService_Search_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/AsyncSearchPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/AsyncSearchPaged.java new file mode 100644 index 000000000000..5dab6d1236e6 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/AsyncSearchPaged.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SearchService_Search_Paged_async] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.SearchResponse; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ServingConfigName; +import com.google.cloud.discoveryengine.v1alpha.UserInfo; +import com.google.common.base.Strings; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.HashMap; + +public class AsyncSearchPaged { + + public static void main(String[] args) throws Exception { + asyncSearchPaged(); + } + + public static void asyncSearchPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) { + SearchRequest request = + SearchRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setBranch( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setQuery("query107944136") + .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOffset(-1019779949) + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setUserInfo(UserInfo.newBuilder().build()) + .addAllFacetSpecs(new ArrayList()) + .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build()) + .putAllParams(new HashMap()) + .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) + .setUserPseudoId("userPseudoId-1155274652") + .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build()) + .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .build(); + while (true) { + SearchResponse response = searchServiceClient.searchCallable().call(request); + for (SearchResponse.SearchResult element : response.getResultsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1alpha_generated_SearchService_Search_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/SyncSearch.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/SyncSearch.java new file mode 100644 index 000000000000..e23bc7a6f1b9 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservice/search/SyncSearch.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SearchService_Search_sync] +import com.google.cloud.discoveryengine.v1alpha.BranchName; +import com.google.cloud.discoveryengine.v1alpha.SearchRequest; +import com.google.cloud.discoveryengine.v1alpha.SearchResponse; +import com.google.cloud.discoveryengine.v1alpha.SearchServiceClient; +import com.google.cloud.discoveryengine.v1alpha.ServingConfigName; +import com.google.cloud.discoveryengine.v1alpha.UserInfo; +import com.google.protobuf.Value; +import java.util.ArrayList; +import java.util.HashMap; + +public class SyncSearch { + + public static void main(String[] args) throws Exception { + syncSearch(); + } + + public static void syncSearch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) { + SearchRequest request = + SearchRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setBranch( + BranchName.ofProjectLocationDataStoreBranchName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") + .toString()) + .setQuery("query107944136") + .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOffset(-1019779949) + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setUserInfo(UserInfo.newBuilder().build()) + .addAllFacetSpecs(new ArrayList()) + .setBoostSpec(SearchRequest.BoostSpec.newBuilder().build()) + .putAllParams(new HashMap()) + .setQueryExpansionSpec(SearchRequest.QueryExpansionSpec.newBuilder().build()) + .setSpellCorrectionSpec(SearchRequest.SpellCorrectionSpec.newBuilder().build()) + .setUserPseudoId("userPseudoId-1155274652") + .setContentSearchSpec(SearchRequest.ContentSearchSpec.newBuilder().build()) + .setEmbeddingSpec(SearchRequest.EmbeddingSpec.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setSafeSearch(true) + .putAllUserLabels(new HashMap()) + .build(); + for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1alpha_generated_SearchService_Search_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservicesettings/search/SyncSearch.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservicesettings/search/SyncSearch.java new file mode 100644 index 000000000000..a66b7500ae93 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/searchservicesettings/search/SyncSearch.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SearchServiceSettings_Search_sync] +import com.google.cloud.discoveryengine.v1alpha.SearchServiceSettings; +import java.time.Duration; + +public class SyncSearch { + + public static void main(String[] args) throws Exception { + syncSearch(); + } + + public static void syncSearch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder(); + searchServiceSettingsBuilder + .searchSettings() + .setRetrySettings( + searchServiceSettingsBuilder + .searchSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_SearchServiceSettings_Search_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2ed6bea9a17b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SiteSearchEngineServiceSettings siteSearchEngineServiceSettings = + SiteSearchEngineServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SiteSearchEngineServiceClient siteSearchEngineServiceClient = + SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..d2a41ef3b6ae --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SiteSearchEngineServiceSettings siteSearchEngineServiceSettings = + SiteSearchEngineServiceSettings.newHttpJsonBuilder().build(); + SiteSearchEngineServiceClient siteSearchEngineServiceClient = + SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..1df29eaf95e0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClient; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SiteSearchEngineServiceSettings siteSearchEngineServiceSettings = + SiteSearchEngineServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + SiteSearchEngineServiceClient siteSearchEngineServiceClient = + SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/AsyncRecrawlUris.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/AsyncRecrawlUris.java new file mode 100644 index 000000000000..9cb0e34566f0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/AsyncRecrawlUris.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineService_RecrawlUris_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineName; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncRecrawlUris { + + public static void main(String[] args) throws Exception { + asyncRecrawlUris(); + } + + public static void asyncRecrawlUris() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SiteSearchEngineServiceClient siteSearchEngineServiceClient = + SiteSearchEngineServiceClient.create()) { + RecrawlUrisRequest request = + RecrawlUrisRequest.newBuilder() + .setSiteSearchEngine( + SiteSearchEngineName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .addAllUris(new ArrayList()) + .build(); + ApiFuture future = + siteSearchEngineServiceClient.recrawlUrisCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineService_RecrawlUris_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/AsyncRecrawlUrisLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/AsyncRecrawlUrisLRO.java new file mode 100644 index 000000000000..bac950d79bbf --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/AsyncRecrawlUrisLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineService_RecrawlUris_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineName; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClient; +import java.util.ArrayList; + +public class AsyncRecrawlUrisLRO { + + public static void main(String[] args) throws Exception { + asyncRecrawlUrisLRO(); + } + + public static void asyncRecrawlUrisLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SiteSearchEngineServiceClient siteSearchEngineServiceClient = + SiteSearchEngineServiceClient.create()) { + RecrawlUrisRequest request = + RecrawlUrisRequest.newBuilder() + .setSiteSearchEngine( + SiteSearchEngineName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .addAllUris(new ArrayList()) + .build(); + OperationFuture future = + siteSearchEngineServiceClient.recrawlUrisOperationCallable().futureCall(request); + // Do something. + RecrawlUrisResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineService_RecrawlUris_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/SyncRecrawlUris.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/SyncRecrawlUris.java new file mode 100644 index 000000000000..8eb02c376fa1 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservice/recrawluris/SyncRecrawlUris.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineService_RecrawlUris_sync] +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisRequest; +import com.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineName; +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceClient; +import java.util.ArrayList; + +public class SyncRecrawlUris { + + public static void main(String[] args) throws Exception { + syncRecrawlUris(); + } + + public static void syncRecrawlUris() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SiteSearchEngineServiceClient siteSearchEngineServiceClient = + SiteSearchEngineServiceClient.create()) { + RecrawlUrisRequest request = + RecrawlUrisRequest.newBuilder() + .setSiteSearchEngine( + SiteSearchEngineName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .addAllUris(new ArrayList()) + .build(); + RecrawlUrisResponse response = siteSearchEngineServiceClient.recrawlUrisAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineService_RecrawlUris_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservicesettings/recrawluris/SyncRecrawlUris.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservicesettings/recrawluris/SyncRecrawlUris.java new file mode 100644 index 000000000000..63102988a039 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/sitesearchengineservicesettings/recrawluris/SyncRecrawlUris.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineServiceSettings_RecrawlUris_sync] +import com.google.cloud.discoveryengine.v1alpha.SiteSearchEngineServiceSettings; +import java.time.Duration; + +public class SyncRecrawlUris { + + public static void main(String[] args) throws Exception { + syncRecrawlUris(); + } + + public static void syncRecrawlUris() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SiteSearchEngineServiceSettings.Builder siteSearchEngineServiceSettingsBuilder = + SiteSearchEngineServiceSettings.newBuilder(); + siteSearchEngineServiceSettingsBuilder + .recrawlUrisSettings() + .setRetrySettings( + siteSearchEngineServiceSettingsBuilder + .recrawlUrisSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SiteSearchEngineServiceSettings siteSearchEngineServiceSettings = + siteSearchEngineServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineServiceSettings_RecrawlUris_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java new file mode 100644 index 000000000000..d19923a4351d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_CompletionServiceStubSettings_CompleteQuery_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.CompletionServiceStubSettings; +import java.time.Duration; + +public class SyncCompleteQuery { + + public static void main(String[] args) throws Exception { + syncCompleteQuery(); + } + + public static void syncCompleteQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CompletionServiceStubSettings.Builder completionServiceSettingsBuilder = + CompletionServiceStubSettings.newBuilder(); + completionServiceSettingsBuilder + .completeQuerySettings() + .setRetrySettings( + completionServiceSettingsBuilder + .completeQuerySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CompletionServiceStubSettings completionServiceSettings = + completionServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_CompletionServiceStubSettings_CompleteQuery_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/conversationalsearchservicestubsettings/converseconversation/SyncConverseConversation.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/conversationalsearchservicestubsettings/converseconversation/SyncConverseConversation.java new file mode 100644 index 000000000000..94a5577b065d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/conversationalsearchservicestubsettings/converseconversation/SyncConverseConversation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_ConversationalSearchServiceStubSettings_ConverseConversation_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.ConversationalSearchServiceStubSettings; +import java.time.Duration; + +public class SyncConverseConversation { + + public static void main(String[] args) throws Exception { + syncConverseConversation(); + } + + public static void syncConverseConversation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConversationalSearchServiceStubSettings.Builder conversationalSearchServiceSettingsBuilder = + ConversationalSearchServiceStubSettings.newBuilder(); + conversationalSearchServiceSettingsBuilder + .converseConversationSettings() + .setRetrySettings( + conversationalSearchServiceSettingsBuilder + .converseConversationSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ConversationalSearchServiceStubSettings conversationalSearchServiceSettings = + conversationalSearchServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_ConversationalSearchServiceStubSettings_ConverseConversation_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/documentservicestubsettings/getdocument/SyncGetDocument.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/documentservicestubsettings/getdocument/SyncGetDocument.java new file mode 100644 index 000000000000..105ca62e705b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/documentservicestubsettings/getdocument/SyncGetDocument.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_DocumentServiceStubSettings_GetDocument_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.DocumentServiceStubSettings; +import java.time.Duration; + +public class SyncGetDocument { + + public static void main(String[] args) throws Exception { + syncGetDocument(); + } + + public static void syncGetDocument() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DocumentServiceStubSettings.Builder documentServiceSettingsBuilder = + DocumentServiceStubSettings.newBuilder(); + documentServiceSettingsBuilder + .getDocumentSettings() + .setRetrySettings( + documentServiceSettingsBuilder + .getDocumentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DocumentServiceStubSettings documentServiceSettings = documentServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_DocumentServiceStubSettings_GetDocument_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/recommendationservicestubsettings/recommend/SyncRecommend.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/recommendationservicestubsettings/recommend/SyncRecommend.java new file mode 100644 index 000000000000..ab94e4ededa3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/recommendationservicestubsettings/recommend/SyncRecommend.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_RecommendationServiceStubSettings_Recommend_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.RecommendationServiceStubSettings; +import java.time.Duration; + +public class SyncRecommend { + + public static void main(String[] args) throws Exception { + syncRecommend(); + } + + public static void syncRecommend() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RecommendationServiceStubSettings.Builder recommendationServiceSettingsBuilder = + RecommendationServiceStubSettings.newBuilder(); + recommendationServiceSettingsBuilder + .recommendSettings() + .setRetrySettings( + recommendationServiceSettingsBuilder + .recommendSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + RecommendationServiceStubSettings recommendationServiceSettings = + recommendationServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_RecommendationServiceStubSettings_Recommend_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/schemaservicestubsettings/getschema/SyncGetSchema.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/schemaservicestubsettings/getschema/SyncGetSchema.java new file mode 100644 index 000000000000..a40e4c1396a0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/schemaservicestubsettings/getschema/SyncGetSchema.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_SchemaServiceStubSettings_GetSchema_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.SchemaServiceStubSettings; +import java.time.Duration; + +public class SyncGetSchema { + + public static void main(String[] args) throws Exception { + syncGetSchema(); + } + + public static void syncGetSchema() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SchemaServiceStubSettings.Builder schemaServiceSettingsBuilder = + SchemaServiceStubSettings.newBuilder(); + schemaServiceSettingsBuilder + .getSchemaSettings() + .setRetrySettings( + schemaServiceSettingsBuilder + .getSchemaSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SchemaServiceStubSettings schemaServiceSettings = schemaServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_SchemaServiceStubSettings_GetSchema_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/searchservicestubsettings/search/SyncSearch.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/searchservicestubsettings/search/SyncSearch.java new file mode 100644 index 000000000000..705f3f69dcc9 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/searchservicestubsettings/search/SyncSearch.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_SearchServiceStubSettings_Search_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.SearchServiceStubSettings; +import java.time.Duration; + +public class SyncSearch { + + public static void main(String[] args) throws Exception { + syncSearch(); + } + + public static void syncSearch() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SearchServiceStubSettings.Builder searchServiceSettingsBuilder = + SearchServiceStubSettings.newBuilder(); + searchServiceSettingsBuilder + .searchSettings() + .setRetrySettings( + searchServiceSettingsBuilder + .searchSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_SearchServiceStubSettings_Search_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/sitesearchengineservicestubsettings/recrawluris/SyncRecrawlUris.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/sitesearchengineservicestubsettings/recrawluris/SyncRecrawlUris.java new file mode 100644 index 000000000000..58a92e336437 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/sitesearchengineservicestubsettings/recrawluris/SyncRecrawlUris.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_SiteSearchEngineServiceStubSettings_RecrawlUris_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.SiteSearchEngineServiceStubSettings; +import java.time.Duration; + +public class SyncRecrawlUris { + + public static void main(String[] args) throws Exception { + syncRecrawlUris(); + } + + public static void syncRecrawlUris() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + SiteSearchEngineServiceStubSettings.Builder siteSearchEngineServiceSettingsBuilder = + SiteSearchEngineServiceStubSettings.newBuilder(); + siteSearchEngineServiceSettingsBuilder + .recrawlUrisSettings() + .setRetrySettings( + siteSearchEngineServiceSettingsBuilder + .recrawlUrisSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SiteSearchEngineServiceStubSettings siteSearchEngineServiceSettings = + siteSearchEngineServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_SiteSearchEngineServiceStubSettings_RecrawlUris_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java new file mode 100644 index 000000000000..81b2ff95b5b3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.stub.samples; + +// [START discoveryengine_v1alpha_generated_UserEventServiceStubSettings_WriteUserEvent_sync] +import com.google.cloud.discoveryengine.v1alpha.stub.UserEventServiceStubSettings; +import java.time.Duration; + +public class SyncWriteUserEvent { + + public static void main(String[] args) throws Exception { + syncWriteUserEvent(); + } + + public static void syncWriteUserEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder = + UserEventServiceStubSettings.newBuilder(); + userEventServiceSettingsBuilder + .writeUserEventSettings() + .setRetrySettings( + userEventServiceSettingsBuilder + .writeUserEventSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_UserEventServiceStubSettings_WriteUserEvent_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/collectuserevent/AsyncCollectUserEvent.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/collectuserevent/AsyncCollectUserEvent.java new file mode 100644 index 000000000000..4e4c1f7269b6 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/collectuserevent/AsyncCollectUserEvent.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_CollectUserEvent_async] +import com.google.api.HttpBody; +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; + +public class AsyncCollectUserEvent { + + public static void main(String[] args) throws Exception { + asyncCollectUserEvent(); + } + + public static void asyncCollectUserEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + CollectUserEventRequest request = + CollectUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent("userEvent315571599") + .setUri("uri116076") + .setEts(100772) + .build(); + ApiFuture future = + userEventServiceClient.collectUserEventCallable().futureCall(request); + // Do something. + HttpBody response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_CollectUserEvent_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/collectuserevent/SyncCollectUserEvent.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/collectuserevent/SyncCollectUserEvent.java new file mode 100644 index 000000000000..f9b11a7abc4e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/collectuserevent/SyncCollectUserEvent.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_CollectUserEvent_sync] +import com.google.api.HttpBody; +import com.google.cloud.discoveryengine.v1alpha.CollectUserEventRequest; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; + +public class SyncCollectUserEvent { + + public static void main(String[] args) throws Exception { + syncCollectUserEvent(); + } + + public static void syncCollectUserEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + CollectUserEventRequest request = + CollectUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent("userEvent315571599") + .setUri("uri116076") + .setEts(100772) + .build(); + HttpBody response = userEventServiceClient.collectUserEvent(request); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_CollectUserEvent_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..41b0a03b5085 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UserEventServiceSettings userEventServiceSettings = + UserEventServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + UserEventServiceClient userEventServiceClient = + UserEventServiceClient.create(userEventServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetCredentialsProvider1.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..1388644c00a2 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UserEventServiceSettings userEventServiceSettings = + UserEventServiceSettings.newHttpJsonBuilder().build(); + UserEventServiceClient userEventServiceClient = + UserEventServiceClient.create(userEventServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_Create_SetCredentialsProvider1_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..461bc05b8e6e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceSettings; +import com.google.cloud.discoveryengine.v1alpha.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UserEventServiceSettings userEventServiceSettings = + UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + UserEventServiceClient userEventServiceClient = + UserEventServiceClient.create(userEventServiceSettings); + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/AsyncImportUserEvents.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/AsyncImportUserEvents.java new file mode 100644 index 000000000000..57822f42121f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/AsyncImportUserEvents.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_ImportUserEvents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; +import com.google.longrunning.Operation; + +public class AsyncImportUserEvents { + + public static void main(String[] args) throws Exception { + asyncImportUserEvents(); + } + + public static void asyncImportUserEvents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + ImportUserEventsRequest request = + ImportUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + ApiFuture future = + userEventServiceClient.importUserEventsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_ImportUserEvents_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/AsyncImportUserEventsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/AsyncImportUserEventsLRO.java new file mode 100644 index 000000000000..f83503b75790 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/AsyncImportUserEventsLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_ImportUserEvents_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; + +public class AsyncImportUserEventsLRO { + + public static void main(String[] args) throws Exception { + asyncImportUserEventsLRO(); + } + + public static void asyncImportUserEventsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + ImportUserEventsRequest request = + ImportUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + OperationFuture future = + userEventServiceClient.importUserEventsOperationCallable().futureCall(request); + // Do something. + ImportUserEventsResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_ImportUserEvents_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/SyncImportUserEvents.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/SyncImportUserEvents.java new file mode 100644 index 000000000000..aa08e1423f4b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/importuserevents/SyncImportUserEvents.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_ImportUserEvents_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.ImportErrorConfig; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; + +public class SyncImportUserEvents { + + public static void main(String[] args) throws Exception { + syncImportUserEvents(); + } + + public static void syncImportUserEvents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + ImportUserEventsRequest request = + ImportUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setErrorConfig(ImportErrorConfig.newBuilder().build()) + .build(); + ImportUserEventsResponse response = + userEventServiceClient.importUserEventsAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_ImportUserEvents_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/AsyncPurgeUserEvents.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/AsyncPurgeUserEvents.java new file mode 100644 index 000000000000..12ac07358185 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/AsyncPurgeUserEvents.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_PurgeUserEvents_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; +import com.google.longrunning.Operation; + +public class AsyncPurgeUserEvents { + + public static void main(String[] args) throws Exception { + asyncPurgeUserEvents(); + } + + public static void asyncPurgeUserEvents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + PurgeUserEventsRequest request = + PurgeUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + ApiFuture future = + userEventServiceClient.purgeUserEventsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_PurgeUserEvents_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/AsyncPurgeUserEventsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/AsyncPurgeUserEventsLRO.java new file mode 100644 index 000000000000..cce940c93a0e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/AsyncPurgeUserEventsLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_PurgeUserEvents_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; + +public class AsyncPurgeUserEventsLRO { + + public static void main(String[] args) throws Exception { + asyncPurgeUserEventsLRO(); + } + + public static void asyncPurgeUserEventsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + PurgeUserEventsRequest request = + PurgeUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + OperationFuture future = + userEventServiceClient.purgeUserEventsOperationCallable().futureCall(request); + // Do something. + PurgeUserEventsResponse response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_PurgeUserEvents_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/SyncPurgeUserEvents.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/SyncPurgeUserEvents.java new file mode 100644 index 000000000000..2612cc84d480 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/purgeuserevents/SyncPurgeUserEvents.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_PurgeUserEvents_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsRequest; +import com.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; + +public class SyncPurgeUserEvents { + + public static void main(String[] args) throws Exception { + syncPurgeUserEvents(); + } + + public static void syncPurgeUserEvents() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + PurgeUserEventsRequest request = + PurgeUserEventsRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + PurgeUserEventsResponse response = userEventServiceClient.purgeUserEventsAsync(request).get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_PurgeUserEvents_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/writeuserevent/AsyncWriteUserEvent.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/writeuserevent/AsyncWriteUserEvent.java new file mode 100644 index 000000000000..605d9fb95535 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/writeuserevent/AsyncWriteUserEvent.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_WriteUserEvent_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; +import com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest; + +public class AsyncWriteUserEvent { + + public static void main(String[] args) throws Exception { + asyncWriteUserEvent(); + } + + public static void asyncWriteUserEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + WriteUserEventRequest request = + WriteUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .build(); + ApiFuture future = + userEventServiceClient.writeUserEventCallable().futureCall(request); + // Do something. + UserEvent response = future.get(); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_WriteUserEvent_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/writeuserevent/SyncWriteUserEvent.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/writeuserevent/SyncWriteUserEvent.java new file mode 100644 index 000000000000..c4566cd8db1b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservice/writeuserevent/SyncWriteUserEvent.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventService_WriteUserEvent_sync] +import com.google.cloud.discoveryengine.v1alpha.DataStoreName; +import com.google.cloud.discoveryengine.v1alpha.UserEvent; +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceClient; +import com.google.cloud.discoveryengine.v1alpha.WriteUserEventRequest; + +public class SyncWriteUserEvent { + + public static void main(String[] args) throws Exception { + syncWriteUserEvent(); + } + + public static void syncWriteUserEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) { + WriteUserEventRequest request = + WriteUserEventRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setUserEvent(UserEvent.newBuilder().build()) + .build(); + UserEvent response = userEventServiceClient.writeUserEvent(request); + } + } +} +// [END discoveryengine_v1alpha_generated_UserEventService_WriteUserEvent_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java new file mode 100644 index 000000000000..751c88433e00 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1alpha/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.discoveryengine.v1alpha.samples; + +// [START discoveryengine_v1alpha_generated_UserEventServiceSettings_WriteUserEvent_sync] +import com.google.cloud.discoveryengine.v1alpha.UserEventServiceSettings; +import java.time.Duration; + +public class SyncWriteUserEvent { + + public static void main(String[] args) throws Exception { + syncWriteUserEvent(); + } + + public static void syncWriteUserEvent() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + UserEventServiceSettings.Builder userEventServiceSettingsBuilder = + UserEventServiceSettings.newBuilder(); + userEventServiceSettingsBuilder + .writeUserEventSettings() + .setRetrySettings( + userEventServiceSettingsBuilder + .writeUserEventSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1alpha_generated_UserEventServiceSettings_WriteUserEvent_sync] diff --git a/java-distributedcloudedge/CHANGELOG.md b/java-distributedcloudedge/CHANGELOG.md index 4258ee2663e1..1b387ccfc5b4 100644 --- a/java-distributedcloudedge/CHANGELOG.md +++ b/java-distributedcloudedge/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.26.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.25.0 (2023-10-11) ### Dependencies diff --git a/java-distributedcloudedge/README.md b/java-distributedcloudedge/README.md index 41bedf7807d3..e918c7c5f675 100644 --- a/java-distributedcloudedge/README.md +++ b/java-distributedcloudedge/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-distributedcloudedge - 0.25.0 + 0.26.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-distributedcloudedge:0.25.0' +implementation 'com.google.cloud:google-cloud-distributedcloudedge:0.26.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-distributedcloudedge" % "0.25.0" +libraryDependencies += "com.google.cloud" % "google-cloud-distributedcloudedge" % "0.26.0" ``` diff --git a/java-distributedcloudedge/google-cloud-distributedcloudedge-bom/pom.xml b/java-distributedcloudedge/google-cloud-distributedcloudedge-bom/pom.xml index 527101899d45..2c9d58f00f04 100644 --- a/java-distributedcloudedge/google-cloud-distributedcloudedge-bom/pom.xml +++ b/java-distributedcloudedge/google-cloud-distributedcloudedge-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-distributedcloudedge-bom - 0.25.0 + 0.26.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-distributedcloudedge - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-distributedcloudedge-v1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-distributedcloudedge-v1 - 0.25.0 + 0.26.0 diff --git a/java-distributedcloudedge/google-cloud-distributedcloudedge/pom.xml b/java-distributedcloudedge/google-cloud-distributedcloudedge/pom.xml index 63f7396d55ee..c6f2b663a99a 100644 --- a/java-distributedcloudedge/google-cloud-distributedcloudedge/pom.xml +++ b/java-distributedcloudedge/google-cloud-distributedcloudedge/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-distributedcloudedge - 0.25.0 + 0.26.0 jar Google Google Distributed Cloud Edge Google Distributed Cloud Edge Google Distributed Cloud Edge allows you to run Kubernetes clusters on dedicated hardware provided and maintained by Google that is separate from the Google Cloud data center. com.google.cloud google-cloud-distributedcloudedge-parent - 0.25.0 + 0.26.0 google-cloud-distributedcloudedge diff --git a/java-distributedcloudedge/grpc-google-cloud-distributedcloudedge-v1/pom.xml b/java-distributedcloudedge/grpc-google-cloud-distributedcloudedge-v1/pom.xml index 5eecb44abea6..93a862de5637 100644 --- a/java-distributedcloudedge/grpc-google-cloud-distributedcloudedge-v1/pom.xml +++ b/java-distributedcloudedge/grpc-google-cloud-distributedcloudedge-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-distributedcloudedge-v1 - 0.25.0 + 0.26.0 grpc-google-cloud-distributedcloudedge-v1 GRPC library for google-cloud-distributedcloudedge com.google.cloud google-cloud-distributedcloudedge-parent - 0.25.0 + 0.26.0 diff --git a/java-distributedcloudedge/pom.xml b/java-distributedcloudedge/pom.xml index 439acf51b01e..b163e19f5bb9 100644 --- a/java-distributedcloudedge/pom.xml +++ b/java-distributedcloudedge/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-distributedcloudedge-parent pom - 0.25.0 + 0.26.0 Google Google Distributed Cloud Edge Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-distributedcloudedge - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-distributedcloudedge-v1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-distributedcloudedge-v1 - 0.25.0 + 0.26.0 diff --git a/java-distributedcloudedge/proto-google-cloud-distributedcloudedge-v1/pom.xml b/java-distributedcloudedge/proto-google-cloud-distributedcloudedge-v1/pom.xml index 4691794d32eb..cceae33e3063 100644 --- a/java-distributedcloudedge/proto-google-cloud-distributedcloudedge-v1/pom.xml +++ b/java-distributedcloudedge/proto-google-cloud-distributedcloudedge-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-distributedcloudedge-v1 - 0.25.0 + 0.26.0 proto-google-cloud-distributedcloudedge-v1 Proto library for google-cloud-distributedcloudedge com.google.cloud google-cloud-distributedcloudedge-parent - 0.25.0 + 0.26.0 diff --git a/java-dlp/CHANGELOG.md b/java-dlp/CHANGELOG.md index 991788119f0f..3e506ef1e40d 100644 --- a/java-dlp/CHANGELOG.md +++ b/java-dlp/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.33.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.32.0 (2023-10-11) ### Dependencies diff --git a/java-dlp/README.md b/java-dlp/README.md index 90dc2596a3a6..659c2ce1e70b 100644 --- a/java-dlp/README.md +++ b/java-dlp/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dlp - 3.32.0 + 3.33.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dlp:3.32.0' +implementation 'com.google.cloud:google-cloud-dlp:3.33.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dlp" % "3.32.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dlp" % "3.33.0" ``` diff --git a/java-dlp/google-cloud-dlp-bom/pom.xml b/java-dlp/google-cloud-dlp-bom/pom.xml index 14558ee91937..1ce861bcdac2 100644 --- a/java-dlp/google-cloud-dlp-bom/pom.xml +++ b/java-dlp/google-cloud-dlp-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dlp-bom - 3.32.0 + 3.33.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-dlp - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-dlp-v2 - 3.32.0 + 3.33.0 com.google.api.grpc proto-google-cloud-dlp-v2 - 3.32.0 + 3.33.0 diff --git a/java-dlp/google-cloud-dlp/pom.xml b/java-dlp/google-cloud-dlp/pom.xml index 6640c4f977d0..90c1aff811a0 100644 --- a/java-dlp/google-cloud-dlp/pom.xml +++ b/java-dlp/google-cloud-dlp/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dlp - 3.32.0 + 3.33.0 jar Google Cloud DLP Java idiomatic client for Google Cloud DLP com.google.cloud google-cloud-dlp-parent - 3.32.0 + 3.33.0 google-cloud-dlp diff --git a/java-dlp/grpc-google-cloud-dlp-v2/pom.xml b/java-dlp/grpc-google-cloud-dlp-v2/pom.xml index 62cd978a63b9..4949ca1a21ea 100644 --- a/java-dlp/grpc-google-cloud-dlp-v2/pom.xml +++ b/java-dlp/grpc-google-cloud-dlp-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dlp-v2 - 3.32.0 + 3.33.0 grpc-google-cloud-dlp-v2 GRPC library for grpc-google-cloud-dlp-v2 com.google.cloud google-cloud-dlp-parent - 3.32.0 + 3.33.0 diff --git a/java-dlp/pom.xml b/java-dlp/pom.xml index 4f89b64547e5..31fa6e33b8f4 100644 --- a/java-dlp/pom.xml +++ b/java-dlp/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dlp-parent pom - 3.32.0 + 3.33.0 Google Cloud DLP Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-dlp-v2 - 3.32.0 + 3.33.0 com.google.api.grpc grpc-google-cloud-dlp-v2 - 3.32.0 + 3.33.0 com.google.cloud google-cloud-dlp - 3.32.0 + 3.33.0 diff --git a/java-dlp/proto-google-cloud-dlp-v2/pom.xml b/java-dlp/proto-google-cloud-dlp-v2/pom.xml index 7da0ed9d2a96..ab123dd124d1 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/pom.xml +++ b/java-dlp/proto-google-cloud-dlp-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dlp-v2 - 3.32.0 + 3.33.0 proto-google-cloud-dlp-v2 PROTO library for proto-google-cloud-dlp-v2 com.google.cloud google-cloud-dlp-parent - 3.32.0 + 3.33.0 diff --git a/java-dms/CHANGELOG.md b/java-dms/CHANGELOG.md index a652dad11668..21f03cfc3a43 100644 --- a/java-dms/CHANGELOG.md +++ b/java-dms/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.27.0 (2023-10-11) ### Dependencies diff --git a/java-dms/README.md b/java-dms/README.md index ca4291c7bbd3..9635219a4057 100644 --- a/java-dms/README.md +++ b/java-dms/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dms - 2.27.0 + 2.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dms:2.27.0' +implementation 'com.google.cloud:google-cloud-dms:2.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dms" % "2.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dms" % "2.28.0" ``` diff --git a/java-dms/google-cloud-dms-bom/pom.xml b/java-dms/google-cloud-dms-bom/pom.xml index e2942bf35996..984eded2cf58 100644 --- a/java-dms/google-cloud-dms-bom/pom.xml +++ b/java-dms/google-cloud-dms-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-dms-bom - 2.27.0 + 2.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-dms - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-dms-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-dms-v1 - 2.27.0 + 2.28.0 diff --git a/java-dms/google-cloud-dms/pom.xml b/java-dms/google-cloud-dms/pom.xml index d4bde2c855d4..3fec9eed2657 100644 --- a/java-dms/google-cloud-dms/pom.xml +++ b/java-dms/google-cloud-dms/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-dms - 2.27.0 + 2.28.0 jar Google Database Migration Service Database Migration Service makes it easier for you to migrate your data to Google Cloud. This service helps you lift and shift your MySQL and PostgreSQL workloads into Cloud SQL. com.google.cloud google-cloud-dms-parent - 2.27.0 + 2.28.0 google-cloud-dms diff --git a/java-dms/grpc-google-cloud-dms-v1/pom.xml b/java-dms/grpc-google-cloud-dms-v1/pom.xml index e033ed28f2c3..fa9449b1b8f5 100644 --- a/java-dms/grpc-google-cloud-dms-v1/pom.xml +++ b/java-dms/grpc-google-cloud-dms-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-dms-v1 - 2.27.0 + 2.28.0 grpc-google-cloud-dms-v1 GRPC library for google-cloud-dms com.google.cloud google-cloud-dms-parent - 2.27.0 + 2.28.0 diff --git a/java-dms/pom.xml b/java-dms/pom.xml index a6848f7d78b7..3d05e213bdea 100644 --- a/java-dms/pom.xml +++ b/java-dms/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dms-parent pom - 2.27.0 + 2.28.0 Google Database Migration Service Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,18 +29,18 @@ com.google.cloud google-cloud-dms - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-dms-v1 - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-dms-v1 - 2.27.0 + 2.28.0 diff --git a/java-dms/proto-google-cloud-dms-v1/pom.xml b/java-dms/proto-google-cloud-dms-v1/pom.xml index 2e2b5f3768d5..724d38c5cda4 100644 --- a/java-dms/proto-google-cloud-dms-v1/pom.xml +++ b/java-dms/proto-google-cloud-dms-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-dms-v1 - 2.27.0 + 2.28.0 proto-google-cloud-dms-v1 Proto library for google-cloud-dms com.google.cloud google-cloud-dms-parent - 2.27.0 + 2.28.0 diff --git a/java-dns/CHANGELOG.md b/java-dns/CHANGELOG.md index cf25b6ca5874..3176b7b61294 100644 --- a/java-dns/CHANGELOG.md +++ b/java-dns/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.26.0 (2023-10-11) ### Dependencies diff --git a/java-dns/README.md b/java-dns/README.md index 287a164ec615..e37332aff82e 100644 --- a/java-dns/README.md +++ b/java-dns/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-dns - 2.26.0 + 2.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dns:2.26.0' +implementation 'com.google.cloud:google-cloud-dns:2.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dns" % "2.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-dns" % "2.27.0" ``` diff --git a/java-dns/pom.xml b/java-dns/pom.xml index de1de0f27cf3..31b796623b78 100644 --- a/java-dns/pom.xml +++ b/java-dns/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-dns jar - 2.26.0 + 2.27.0 Google Cloud DNS Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml diff --git a/java-document-ai/CHANGELOG.md b/java-document-ai/CHANGELOG.md index ec3bf1bea6d9..dab46d33dbae 100644 --- a/java-document-ai/CHANGELOG.md +++ b/java-document-ai/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 2.33.0 (2023-10-25) + +### Features + +* minor clarification on fields related to page range ([#9955](https://github.com/googleapis/google-cloud-java/issues/9955)) ([ff54c9f](https://github.com/googleapis/google-cloud-java/commit/ff54c9fc8293782dc10af0622ea79f41dbcb007b)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.32.0 (2023-10-11) ### Dependencies diff --git a/java-document-ai/README.md b/java-document-ai/README.md index 8ca51a53a79b..acfd963d1834 100644 --- a/java-document-ai/README.md +++ b/java-document-ai/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-document-ai - 2.32.0 + 2.33.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-document-ai:2.32.0' +implementation 'com.google.cloud:google-cloud-document-ai:2.33.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "2.32.0" +libraryDependencies += "com.google.cloud" % "google-cloud-document-ai" % "2.33.0" ``` @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-document-ai.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.28.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-document-ai/2.32.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-document-ai/google-cloud-document-ai-bom/pom.xml b/java-document-ai/google-cloud-document-ai-bom/pom.xml index af0565222e45..5854332fca26 100644 --- a/java-document-ai/google-cloud-document-ai-bom/pom.xml +++ b/java-document-ai/google-cloud-document-ai-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-document-ai-bom - 2.32.0 + 2.33.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -21,47 +21,47 @@ com.google.cloud google-cloud-document-ai - 2.32.0 + 2.33.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.44.0 + 0.45.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.44.0 + 0.45.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.44.0 + 0.45.0 com.google.api.grpc grpc-google-cloud-document-ai-v1 - 2.32.0 + 2.33.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.44.0 + 0.45.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.44.0 + 0.45.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.44.0 + 0.45.0 com.google.api.grpc proto-google-cloud-document-ai-v1 - 2.32.0 + 2.33.0 diff --git a/java-document-ai/google-cloud-document-ai/pom.xml b/java-document-ai/google-cloud-document-ai/pom.xml index aca2bfb5b4a2..e768dddcdeb7 100644 --- a/java-document-ai/google-cloud-document-ai/pom.xml +++ b/java-document-ai/google-cloud-document-ai/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-document-ai - 2.32.0 + 2.33.0 jar Google Cloud Document AI Java idiomatic client for Google Cloud Document AI com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 google-cloud-document-ai diff --git a/java-document-ai/grpc-google-cloud-document-ai-v1/pom.xml b/java-document-ai/grpc-google-cloud-document-ai-v1/pom.xml index 098a05d49437..0bfc0769ea96 100644 --- a/java-document-ai/grpc-google-cloud-document-ai-v1/pom.xml +++ b/java-document-ai/grpc-google-cloud-document-ai-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1 - 2.32.0 + 2.33.0 grpc-google-cloud-document-ai-v1 GRPC library for google-cloud-document-ai com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-document-ai/grpc-google-cloud-document-ai-v1beta1/pom.xml b/java-document-ai/grpc-google-cloud-document-ai-v1beta1/pom.xml index 8747e8c9387d..3ac1b7ed5b96 100644 --- a/java-document-ai/grpc-google-cloud-document-ai-v1beta1/pom.xml +++ b/java-document-ai/grpc-google-cloud-document-ai-v1beta1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.44.0 + 0.45.0 grpc-google-cloud-document-ai-v1beta1 GRPC library for grpc-google-cloud-document-ai-v1beta1 com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-document-ai/grpc-google-cloud-document-ai-v1beta2/pom.xml b/java-document-ai/grpc-google-cloud-document-ai-v1beta2/pom.xml index f6e7beb38234..f990c1d9e395 100644 --- a/java-document-ai/grpc-google-cloud-document-ai-v1beta2/pom.xml +++ b/java-document-ai/grpc-google-cloud-document-ai-v1beta2/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.44.0 + 0.45.0 grpc-google-cloud-document-ai-v1beta2 GRPC library for grpc-google-cloud-document-ai-v1beta2 com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-document-ai/grpc-google-cloud-document-ai-v1beta3/pom.xml b/java-document-ai/grpc-google-cloud-document-ai-v1beta3/pom.xml index 777f14e0b1be..1cfc60bac6fc 100644 --- a/java-document-ai/grpc-google-cloud-document-ai-v1beta3/pom.xml +++ b/java-document-ai/grpc-google-cloud-document-ai-v1beta3/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.44.0 + 0.45.0 grpc-google-cloud-document-ai-v1beta3 GRPC library for grpc-google-cloud-document-ai-v1beta3 com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-document-ai/pom.xml b/java-document-ai/pom.xml index b18478997727..191faf5ccb77 100644 --- a/java-document-ai/pom.xml +++ b/java-document-ai/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-document-ai-parent pom - 2.32.0 + 2.33.0 Google Cloud Document AI Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,47 +29,47 @@ com.google.api.grpc grpc-google-cloud-document-ai-v1beta1 - 0.44.0 + 0.45.0 com.google.api.grpc proto-google-cloud-document-ai-v1 - 2.32.0 + 2.33.0 com.google.api.grpc grpc-google-cloud-document-ai-v1 - 2.32.0 + 2.33.0 com.google.cloud google-cloud-document-ai - 2.32.0 + 2.33.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta2 - 0.44.0 + 0.45.0 com.google.api.grpc grpc-google-cloud-document-ai-v1beta3 - 0.44.0 + 0.45.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.44.0 + 0.45.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.44.0 + 0.45.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.44.0 + 0.45.0 diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/pom.xml b/java-document-ai/proto-google-cloud-document-ai-v1/pom.xml index 2fcbaf5a450c..83eb8ca6cad6 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/pom.xml +++ b/java-document-ai/proto-google-cloud-document-ai-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1 - 2.32.0 + 2.33.0 proto-google-cloud-document-ai-v1 Proto library for google-cloud-document-ai com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java index d7ce5a8e9af8..9a7e17566e36 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptions.java @@ -907,8 +907,8 @@ public boolean hasIndividualPageSelector() { * * *
-   * Only process certain pages from the start. Process all if the document
-   * has fewer pages.
+   * Only process certain pages from the start, process all if the document
+   * has less pages.
    * 
* * int32 from_start = 6; @@ -923,8 +923,8 @@ public boolean hasFromStart() { * * *
-   * Only process certain pages from the start. Process all if the document
-   * has fewer pages.
+   * Only process certain pages from the start, process all if the document
+   * has less pages.
    * 
* * int32 from_start = 6; @@ -1743,8 +1743,8 @@ public Builder clearIndividualPageSelector() { * * *
-     * Only process certain pages from the start. Process all if the document
-     * has fewer pages.
+     * Only process certain pages from the start, process all if the document
+     * has less pages.
      * 
* * int32 from_start = 6; @@ -1758,8 +1758,8 @@ public boolean hasFromStart() { * * *
-     * Only process certain pages from the start. Process all if the document
-     * has fewer pages.
+     * Only process certain pages from the start, process all if the document
+     * has less pages.
      * 
* * int32 from_start = 6; @@ -1776,8 +1776,8 @@ public int getFromStart() { * * *
-     * Only process certain pages from the start. Process all if the document
-     * has fewer pages.
+     * Only process certain pages from the start, process all if the document
+     * has less pages.
      * 
* * int32 from_start = 6; @@ -1796,8 +1796,8 @@ public Builder setFromStart(int value) { * * *
-     * Only process certain pages from the start. Process all if the document
-     * has fewer pages.
+     * Only process certain pages from the start, process all if the document
+     * has less pages.
      * 
* * int32 from_start = 6; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java index 3de84195f844..84494d57ba86 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/ProcessOptionsOrBuilder.java @@ -69,8 +69,8 @@ public interface ProcessOptionsOrBuilder * * *
-   * Only process certain pages from the start. Process all if the document
-   * has fewer pages.
+   * Only process certain pages from the start, process all if the document
+   * has less pages.
    * 
* * int32 from_start = 6; @@ -82,8 +82,8 @@ public interface ProcessOptionsOrBuilder * * *
-   * Only process certain pages from the start. Process all if the document
-   * has fewer pages.
+   * Only process certain pages from the start, process all if the document
+   * has less pages.
    * 
* * int32 from_start = 6; diff --git a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto index 5bc7845f896d..6d77bd9384c0 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto +++ b/java-document-ai/proto-google-cloud-document-ai-v1/src/main/proto/google/cloud/documentai/v1/document_processor_service.proto @@ -337,15 +337,14 @@ message ProcessOptions { // A subset of pages to process. If not specified, all pages will be // processed. NOTICE: If any of the page range is set, we will extract and // process only the given pages from the document. In the output document, - // [Document.Page.page_number][google.cloud.documentai.v1.Document.Page.page_number] - // is referring to the page number in the original document. This - // configuration only applies to sync requests. + // the page_number is referring to the page number in the original document. + // This config only applies to sync requests. oneof page_range { // Which pages to process (1-indexed). IndividualPageSelector individual_page_selector = 5; - // Only process certain pages from the start. Process all if the document - // has fewer pages. + // Only process certain pages from the start, process all if the document + // has less pages. int32 from_start = 6; // Only process certain pages from the end, same as above. diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta1/pom.xml b/java-document-ai/proto-google-cloud-document-ai-v1beta1/pom.xml index 635a53c3e68f..d0c4828f7413 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta1/pom.xml +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta1 - 0.44.0 + 0.45.0 proto-google-cloud-document-ai-v1beta1 PROTO library for proto-google-cloud-document-ai-v1beta1 com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta2/pom.xml b/java-document-ai/proto-google-cloud-document-ai-v1beta2/pom.xml index 7535388b41f8..2320b0b25615 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta2/pom.xml +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta2/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta2 - 0.44.0 + 0.45.0 proto-google-cloud-document-ai-v1beta2 PROTO library for proto-google-cloud-document-ai-v1beta2 com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-document-ai/proto-google-cloud-document-ai-v1beta3/pom.xml b/java-document-ai/proto-google-cloud-document-ai-v1beta3/pom.xml index 219ec870bfc1..d015a5bfd50e 100644 --- a/java-document-ai/proto-google-cloud-document-ai-v1beta3/pom.xml +++ b/java-document-ai/proto-google-cloud-document-ai-v1beta3/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-document-ai-v1beta3 - 0.44.0 + 0.45.0 proto-google-cloud-document-ai-v1beta3 PROTO library for proto-google-cloud-document-ai-v1beta3 com.google.cloud google-cloud-document-ai-parent - 2.32.0 + 2.33.0 diff --git a/java-domains/CHANGELOG.md b/java-domains/CHANGELOG.md index 005cfaf28d9a..2349ac4ad01a 100644 --- a/java-domains/CHANGELOG.md +++ b/java-domains/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.26.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.25.0 (2023-10-11) ### Dependencies diff --git a/java-domains/README.md b/java-domains/README.md index 9c649c7d78bd..b781c6280428 100644 --- a/java-domains/README.md +++ b/java-domains/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-domains - 1.25.0 + 1.26.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-domains:1.25.0' +implementation 'com.google.cloud:google-cloud-domains:1.26.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-domains" % "1.25.0" +libraryDependencies += "com.google.cloud" % "google-cloud-domains" % "1.26.0" ``` diff --git a/java-domains/google-cloud-domains-bom/pom.xml b/java-domains/google-cloud-domains-bom/pom.xml index 9697e3d58339..35ed0e4c0ea7 100644 --- a/java-domains/google-cloud-domains-bom/pom.xml +++ b/java-domains/google-cloud-domains-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-domains-bom - 1.25.0 + 1.26.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,37 +27,37 @@ com.google.cloud google-cloud-domains - 1.25.0 + 1.26.0 com.google.api.grpc grpc-google-cloud-domains-v1beta1 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-domains-v1alpha2 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-domains-v1 - 1.25.0 + 1.26.0 com.google.api.grpc proto-google-cloud-domains-v1beta1 - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-domains-v1alpha2 - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-domains-v1 - 1.25.0 + 1.26.0 diff --git a/java-domains/google-cloud-domains/pom.xml b/java-domains/google-cloud-domains/pom.xml index bf694f40748f..37fa9f95d4da 100644 --- a/java-domains/google-cloud-domains/pom.xml +++ b/java-domains/google-cloud-domains/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-domains - 1.25.0 + 1.26.0 jar Google Cloud Domains allows you to register and manage domains by using Cloud Domains. com.google.cloud google-cloud-domains-parent - 1.25.0 + 1.26.0 google-cloud-domains diff --git a/java-domains/grpc-google-cloud-domains-v1/pom.xml b/java-domains/grpc-google-cloud-domains-v1/pom.xml index 24d3d63f2330..6993729ec778 100644 --- a/java-domains/grpc-google-cloud-domains-v1/pom.xml +++ b/java-domains/grpc-google-cloud-domains-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-domains-v1 - 1.25.0 + 1.26.0 grpc-google-cloud-domains-v1 GRPC library for google-cloud-domains com.google.cloud google-cloud-domains-parent - 1.25.0 + 1.26.0 diff --git a/java-domains/grpc-google-cloud-domains-v1alpha2/pom.xml b/java-domains/grpc-google-cloud-domains-v1alpha2/pom.xml index dc92bab2ca43..f7f7b2bbb01a 100644 --- a/java-domains/grpc-google-cloud-domains-v1alpha2/pom.xml +++ b/java-domains/grpc-google-cloud-domains-v1alpha2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-domains-v1alpha2 - 0.33.0 + 0.34.0 grpc-google-cloud-domains-v1alpha2 GRPC library for google-cloud-domains com.google.cloud google-cloud-domains-parent - 1.25.0 + 1.26.0 diff --git a/java-domains/grpc-google-cloud-domains-v1beta1/pom.xml b/java-domains/grpc-google-cloud-domains-v1beta1/pom.xml index 30fb9dcff0ec..e11e8136a4a1 100644 --- a/java-domains/grpc-google-cloud-domains-v1beta1/pom.xml +++ b/java-domains/grpc-google-cloud-domains-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-domains-v1beta1 - 0.33.0 + 0.34.0 grpc-google-cloud-domains-v1beta1 GRPC library for google-cloud-domains com.google.cloud google-cloud-domains-parent - 1.25.0 + 1.26.0 diff --git a/java-domains/pom.xml b/java-domains/pom.xml index 9b5f0b93e9fb..c334fef7c20b 100644 --- a/java-domains/pom.xml +++ b/java-domains/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-domains-parent pom - 1.25.0 + 1.26.0 Google Cloud Domains Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.cloud google-cloud-domains - 1.25.0 + 1.26.0 com.google.api.grpc proto-google-cloud-domains-v1 - 1.25.0 + 1.26.0 com.google.api.grpc grpc-google-cloud-domains-v1 - 1.25.0 + 1.26.0 com.google.api.grpc proto-google-cloud-domains-v1alpha2 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-domains-v1alpha2 - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-domains-v1beta1 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-domains-v1beta1 - 0.33.0 + 0.34.0 diff --git a/java-domains/proto-google-cloud-domains-v1/pom.xml b/java-domains/proto-google-cloud-domains-v1/pom.xml index e7749c0b4268..64790aa0627b 100644 --- a/java-domains/proto-google-cloud-domains-v1/pom.xml +++ b/java-domains/proto-google-cloud-domains-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-domains-v1 - 1.25.0 + 1.26.0 proto-google-cloud-domains-v1 Proto library for google-cloud-domains com.google.cloud google-cloud-domains-parent - 1.25.0 + 1.26.0 diff --git a/java-domains/proto-google-cloud-domains-v1alpha2/pom.xml b/java-domains/proto-google-cloud-domains-v1alpha2/pom.xml index a82312b9798e..7605a83db3d3 100644 --- a/java-domains/proto-google-cloud-domains-v1alpha2/pom.xml +++ b/java-domains/proto-google-cloud-domains-v1alpha2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-domains-v1alpha2 - 0.33.0 + 0.34.0 proto-google-cloud-domains-v1alpha2 Proto library for google-cloud-domains com.google.cloud google-cloud-domains-parent - 1.25.0 + 1.26.0 diff --git a/java-domains/proto-google-cloud-domains-v1beta1/pom.xml b/java-domains/proto-google-cloud-domains-v1beta1/pom.xml index 5703a97ac841..d2a2f0fd4aa7 100644 --- a/java-domains/proto-google-cloud-domains-v1beta1/pom.xml +++ b/java-domains/proto-google-cloud-domains-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-domains-v1beta1 - 0.33.0 + 0.34.0 proto-google-cloud-domains-v1beta1 Proto library for google-cloud-domains com.google.cloud google-cloud-domains-parent - 1.25.0 + 1.26.0 diff --git a/java-enterpriseknowledgegraph/CHANGELOG.md b/java-enterpriseknowledgegraph/CHANGELOG.md index e385bd2a8382..b9abd48f7aea 100644 --- a/java-enterpriseknowledgegraph/CHANGELOG.md +++ b/java-enterpriseknowledgegraph/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.25.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.24.0 (2023-10-11) ### Dependencies diff --git a/java-enterpriseknowledgegraph/README.md b/java-enterpriseknowledgegraph/README.md index 1ef366e8d7fb..2c21965a67a4 100644 --- a/java-enterpriseknowledgegraph/README.md +++ b/java-enterpriseknowledgegraph/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-enterpriseknowledgegraph - 0.24.0 + 0.25.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-enterpriseknowledgegraph:0.24.0' +implementation 'com.google.cloud:google-cloud-enterpriseknowledgegraph:0.25.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-enterpriseknowledgegraph" % "0.24.0" +libraryDependencies += "com.google.cloud" % "google-cloud-enterpriseknowledgegraph" % "0.25.0" ``` diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml index 60b60e2b7dad..68b7fa98ac61 100644 --- a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-enterpriseknowledgegraph-bom - 0.24.0 + 0.25.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-enterpriseknowledgegraph - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-enterpriseknowledgegraph-v1 - 0.24.0 + 0.25.0 com.google.api.grpc proto-google-cloud-enterpriseknowledgegraph-v1 - 0.24.0 + 0.25.0 diff --git a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml index c106daedc336..1203d3beb984 100644 --- a/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml +++ b/java-enterpriseknowledgegraph/google-cloud-enterpriseknowledgegraph/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-enterpriseknowledgegraph - 0.24.0 + 0.25.0 jar Google Enterprise Knowledge Graph Enterprise Knowledge Graph Enterprise Knowledge Graph organizes siloed information into organizational knowledge, which involves consolidating, standardizing, and reconciling data in an efficient and useful way. com.google.cloud google-cloud-enterpriseknowledgegraph-parent - 0.24.0 + 0.25.0 google-cloud-enterpriseknowledgegraph diff --git a/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml b/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml index 228d4913094a..5688ad770106 100644 --- a/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml +++ b/java-enterpriseknowledgegraph/grpc-google-cloud-enterpriseknowledgegraph-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-enterpriseknowledgegraph-v1 - 0.24.0 + 0.25.0 grpc-google-cloud-enterpriseknowledgegraph-v1 GRPC library for google-cloud-enterpriseknowledgegraph com.google.cloud google-cloud-enterpriseknowledgegraph-parent - 0.24.0 + 0.25.0 diff --git a/java-enterpriseknowledgegraph/pom.xml b/java-enterpriseknowledgegraph/pom.xml index 86487e22a0dc..208a10f02e6c 100644 --- a/java-enterpriseknowledgegraph/pom.xml +++ b/java-enterpriseknowledgegraph/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-enterpriseknowledgegraph-parent pom - 0.24.0 + 0.25.0 Google Enterprise Knowledge Graph Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-enterpriseknowledgegraph - 0.24.0 + 0.25.0 com.google.api.grpc grpc-google-cloud-enterpriseknowledgegraph-v1 - 0.24.0 + 0.25.0 com.google.api.grpc proto-google-cloud-enterpriseknowledgegraph-v1 - 0.24.0 + 0.25.0 diff --git a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml index 154080f5d750..70d1b7c8a30a 100644 --- a/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml +++ b/java-enterpriseknowledgegraph/proto-google-cloud-enterpriseknowledgegraph-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-enterpriseknowledgegraph-v1 - 0.24.0 + 0.25.0 proto-google-cloud-enterpriseknowledgegraph-v1 Proto library for google-cloud-enterpriseknowledgegraph com.google.cloud google-cloud-enterpriseknowledgegraph-parent - 0.24.0 + 0.25.0 diff --git a/java-errorreporting/CHANGELOG.md b/java-errorreporting/CHANGELOG.md index 87b74ae5e36e..affeeaac54ff 100644 --- a/java-errorreporting/CHANGELOG.md +++ b/java-errorreporting/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.150.0-beta (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.149.0-beta (2023-10-11) ### Dependencies diff --git a/java-errorreporting/README.md b/java-errorreporting/README.md index 642a0e3045c9..eede3312fc6c 100644 --- a/java-errorreporting/README.md +++ b/java-errorreporting/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-errorreporting - 0.149.0-beta + 0.150.0-beta ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-errorreporting:0.149.0-beta' +implementation 'com.google.cloud:google-cloud-errorreporting:0.150.0-beta' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-errorreporting" % "0.149.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-errorreporting" % "0.150.0-beta" ``` diff --git a/java-errorreporting/google-cloud-errorreporting-bom/pom.xml b/java-errorreporting/google-cloud-errorreporting-bom/pom.xml index 447bd7cd4067..73fdb30dc162 100644 --- a/java-errorreporting/google-cloud-errorreporting-bom/pom.xml +++ b/java-errorreporting/google-cloud-errorreporting-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-errorreporting-bom - 0.149.0-beta + 0.150.0-beta pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-errorreporting - 0.149.0-beta + 0.150.0-beta com.google.api.grpc grpc-google-cloud-error-reporting-v1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-error-reporting-v1beta1 - 0.115.0 + 0.116.0 diff --git a/java-errorreporting/google-cloud-errorreporting/pom.xml b/java-errorreporting/google-cloud-errorreporting/pom.xml index f9526a09e624..de264f915178 100644 --- a/java-errorreporting/google-cloud-errorreporting/pom.xml +++ b/java-errorreporting/google-cloud-errorreporting/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-errorreporting - 0.149.0-beta + 0.150.0-beta jar Google Cloud Error Reporting Java idiomatic client for Google Cloud Error Reporting com.google.cloud google-cloud-errorreporting-parent - 0.149.0-beta + 0.150.0-beta google-cloud-errorreporting diff --git a/java-errorreporting/grpc-google-cloud-error-reporting-v1beta1/pom.xml b/java-errorreporting/grpc-google-cloud-error-reporting-v1beta1/pom.xml index b29b32ac8e26..7f84e897c9bc 100644 --- a/java-errorreporting/grpc-google-cloud-error-reporting-v1beta1/pom.xml +++ b/java-errorreporting/grpc-google-cloud-error-reporting-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-error-reporting-v1beta1 - 0.115.0 + 0.116.0 grpc-google-cloud-error-reporting-v1beta1 GRPC library for grpc-google-cloud-error-reporting-v1beta1 com.google.cloud google-cloud-errorreporting-parent - 0.149.0-beta + 0.150.0-beta diff --git a/java-errorreporting/pom.xml b/java-errorreporting/pom.xml index acc3343c3861..c8ecd7f921cd 100644 --- a/java-errorreporting/pom.xml +++ b/java-errorreporting/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-errorreporting-parent pom - 0.149.0-beta + 0.150.0-beta Google Cloud Error Reporting Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,18 +29,18 @@ com.google.cloud google-cloud-errorreporting - 0.149.0-beta + 0.150.0-beta com.google.api.grpc proto-google-cloud-error-reporting-v1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-error-reporting-v1beta1 - 0.115.0 + 0.116.0 diff --git a/java-errorreporting/proto-google-cloud-error-reporting-v1beta1/pom.xml b/java-errorreporting/proto-google-cloud-error-reporting-v1beta1/pom.xml index 065d9fb99d7b..da18709760c4 100644 --- a/java-errorreporting/proto-google-cloud-error-reporting-v1beta1/pom.xml +++ b/java-errorreporting/proto-google-cloud-error-reporting-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-error-reporting-v1beta1 - 0.115.0 + 0.116.0 proto-google-cloud-error-reporting-v1beta1 PROTO library for proto-google-cloud-error-reporting-v1beta1 com.google.cloud google-cloud-errorreporting-parent - 0.149.0-beta + 0.150.0-beta diff --git a/java-essential-contacts/CHANGELOG.md b/java-essential-contacts/CHANGELOG.md index 2e3f88eaf5e0..cf3f7af1ed1a 100644 --- a/java-essential-contacts/CHANGELOG.md +++ b/java-essential-contacts/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-essential-contacts/README.md b/java-essential-contacts/README.md index 45b011c004a1..8cfc86ca1a7f 100644 --- a/java-essential-contacts/README.md +++ b/java-essential-contacts/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-essential-contacts - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-essential-contacts:2.28.0' +implementation 'com.google.cloud:google-cloud-essential-contacts:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-essential-contacts" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-essential-contacts" % "2.29.0" ``` diff --git a/java-essential-contacts/google-cloud-essential-contacts-bom/pom.xml b/java-essential-contacts/google-cloud-essential-contacts-bom/pom.xml index 4dbcb434671a..531d83378ccb 100644 --- a/java-essential-contacts/google-cloud-essential-contacts-bom/pom.xml +++ b/java-essential-contacts/google-cloud-essential-contacts-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-essential-contacts-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-essential-contacts - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-essential-contacts-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-essential-contacts-v1 - 2.28.0 + 2.29.0 diff --git a/java-essential-contacts/google-cloud-essential-contacts/pom.xml b/java-essential-contacts/google-cloud-essential-contacts/pom.xml index e2569780119b..1a86d13a1c74 100644 --- a/java-essential-contacts/google-cloud-essential-contacts/pom.xml +++ b/java-essential-contacts/google-cloud-essential-contacts/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-essential-contacts - 2.28.0 + 2.29.0 jar Google Essential Contacts API Essential Contacts API helps you customize who receives notifications by providing your own list of contacts in many Google Cloud services. com.google.cloud google-cloud-essential-contacts-parent - 2.28.0 + 2.29.0 google-cloud-essential-contacts diff --git a/java-essential-contacts/grpc-google-cloud-essential-contacts-v1/pom.xml b/java-essential-contacts/grpc-google-cloud-essential-contacts-v1/pom.xml index 6e6323e5b948..6e7cc43112b8 100644 --- a/java-essential-contacts/grpc-google-cloud-essential-contacts-v1/pom.xml +++ b/java-essential-contacts/grpc-google-cloud-essential-contacts-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-essential-contacts-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-essential-contacts-v1 GRPC library for google-cloud-essential-contacts com.google.cloud google-cloud-essential-contacts-parent - 2.28.0 + 2.29.0 diff --git a/java-essential-contacts/pom.xml b/java-essential-contacts/pom.xml index 4b0df2a8a263..c0c99645a0a0 100644 --- a/java-essential-contacts/pom.xml +++ b/java-essential-contacts/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-essential-contacts-parent pom - 2.28.0 + 2.29.0 Google Essential Contacts API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-essential-contacts - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-essential-contacts-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-essential-contacts-v1 - 2.28.0 + 2.29.0 diff --git a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/pom.xml b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/pom.xml index 6852771effc7..f55be61c40fd 100644 --- a/java-essential-contacts/proto-google-cloud-essential-contacts-v1/pom.xml +++ b/java-essential-contacts/proto-google-cloud-essential-contacts-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-essential-contacts-v1 - 2.28.0 + 2.29.0 proto-google-cloud-essential-contacts-v1 Proto library for google-cloud-essential-contacts com.google.cloud google-cloud-essential-contacts-parent - 2.28.0 + 2.29.0 diff --git a/java-eventarc-publishing/CHANGELOG.md b/java-eventarc-publishing/CHANGELOG.md index 1e1b5613bbba..1de5909b8565 100644 --- a/java-eventarc-publishing/CHANGELOG.md +++ b/java-eventarc-publishing/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.28.0 (2023-10-11) ### Dependencies diff --git a/java-eventarc-publishing/README.md b/java-eventarc-publishing/README.md index f4ffff665b07..d71a2bfe744f 100644 --- a/java-eventarc-publishing/README.md +++ b/java-eventarc-publishing/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-eventarc-publishing - 0.28.0 + 0.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-eventarc-publishing:0.28.0' +implementation 'com.google.cloud:google-cloud-eventarc-publishing:0.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-eventarc-publishing" % "0.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-eventarc-publishing" % "0.29.0" ``` diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing-bom/pom.xml b/java-eventarc-publishing/google-cloud-eventarc-publishing-bom/pom.xml index 521f9f89e007..079d88900b71 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing-bom/pom.xml +++ b/java-eventarc-publishing/google-cloud-eventarc-publishing-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-eventarc-publishing-bom - 0.28.0 + 0.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-eventarc-publishing - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-eventarc-publishing-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-eventarc-publishing-v1 - 0.28.0 + 0.29.0 diff --git a/java-eventarc-publishing/google-cloud-eventarc-publishing/pom.xml b/java-eventarc-publishing/google-cloud-eventarc-publishing/pom.xml index 89a5c5358f67..25c7cb0f8c71 100644 --- a/java-eventarc-publishing/google-cloud-eventarc-publishing/pom.xml +++ b/java-eventarc-publishing/google-cloud-eventarc-publishing/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-eventarc-publishing - 0.28.0 + 0.29.0 jar Google Eventarc Publishing Eventarc Publishing lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. com.google.cloud google-cloud-eventarc-publishing-parent - 0.28.0 + 0.29.0 google-cloud-eventarc-publishing diff --git a/java-eventarc-publishing/grpc-google-cloud-eventarc-publishing-v1/pom.xml b/java-eventarc-publishing/grpc-google-cloud-eventarc-publishing-v1/pom.xml index b2e730b55b39..0007756eccf8 100644 --- a/java-eventarc-publishing/grpc-google-cloud-eventarc-publishing-v1/pom.xml +++ b/java-eventarc-publishing/grpc-google-cloud-eventarc-publishing-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-eventarc-publishing-v1 - 0.28.0 + 0.29.0 grpc-google-cloud-eventarc-publishing-v1 GRPC library for google-cloud-eventarc-publishing com.google.cloud google-cloud-eventarc-publishing-parent - 0.28.0 + 0.29.0 diff --git a/java-eventarc-publishing/pom.xml b/java-eventarc-publishing/pom.xml index e90abf1b969b..a1b874d3afe0 100644 --- a/java-eventarc-publishing/pom.xml +++ b/java-eventarc-publishing/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-eventarc-publishing-parent pom - 0.28.0 + 0.29.0 Google Eventarc Publishing Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-eventarc-publishing - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-eventarc-publishing-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-eventarc-publishing-v1 - 0.28.0 + 0.29.0 diff --git a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/pom.xml b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/pom.xml index c244652e7429..3b262c45980a 100644 --- a/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/pom.xml +++ b/java-eventarc-publishing/proto-google-cloud-eventarc-publishing-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-eventarc-publishing-v1 - 0.28.0 + 0.29.0 proto-google-cloud-eventarc-publishing-v1 Proto library for google-cloud-eventarc-publishing com.google.cloud google-cloud-eventarc-publishing-parent - 0.28.0 + 0.29.0 diff --git a/java-eventarc/CHANGELOG.md b/java-eventarc/CHANGELOG.md index d3dacfe580b3..f2a618161073 100644 --- a/java-eventarc/CHANGELOG.md +++ b/java-eventarc/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-eventarc/README.md b/java-eventarc/README.md index 19687e0eb768..dfcaea1ac57b 100644 --- a/java-eventarc/README.md +++ b/java-eventarc/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-eventarc - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-eventarc:1.28.0' +implementation 'com.google.cloud:google-cloud-eventarc:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-eventarc" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-eventarc" % "1.29.0" ``` diff --git a/java-eventarc/google-cloud-eventarc-bom/pom.xml b/java-eventarc/google-cloud-eventarc-bom/pom.xml index 938e43cd1983..0626f5d0ee88 100644 --- a/java-eventarc/google-cloud-eventarc-bom/pom.xml +++ b/java-eventarc/google-cloud-eventarc-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-eventarc-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-eventarc - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-eventarc-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-eventarc-v1 - 1.28.0 + 1.29.0 diff --git a/java-eventarc/google-cloud-eventarc/pom.xml b/java-eventarc/google-cloud-eventarc/pom.xml index 75c246c629be..83664ab25681 100644 --- a/java-eventarc/google-cloud-eventarc/pom.xml +++ b/java-eventarc/google-cloud-eventarc/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-eventarc - 1.28.0 + 1.29.0 jar Google Eventarc Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. com.google.cloud google-cloud-eventarc-parent - 1.28.0 + 1.29.0 google-cloud-eventarc diff --git a/java-eventarc/grpc-google-cloud-eventarc-v1/pom.xml b/java-eventarc/grpc-google-cloud-eventarc-v1/pom.xml index d6e906fb62fc..419658df3d2f 100644 --- a/java-eventarc/grpc-google-cloud-eventarc-v1/pom.xml +++ b/java-eventarc/grpc-google-cloud-eventarc-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-eventarc-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-eventarc-v1 GRPC library for google-cloud-eventarc com.google.cloud google-cloud-eventarc-parent - 1.28.0 + 1.29.0 diff --git a/java-eventarc/pom.xml b/java-eventarc/pom.xml index 41d7cb58b56b..6d4eef9aa6b5 100644 --- a/java-eventarc/pom.xml +++ b/java-eventarc/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-eventarc-parent pom - 1.28.0 + 1.29.0 Google Eventarc Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-eventarc - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-eventarc-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-eventarc-v1 - 1.28.0 + 1.29.0 diff --git a/java-eventarc/proto-google-cloud-eventarc-v1/pom.xml b/java-eventarc/proto-google-cloud-eventarc-v1/pom.xml index 5b86dfa7689b..be3c1d37bdf2 100644 --- a/java-eventarc/proto-google-cloud-eventarc-v1/pom.xml +++ b/java-eventarc/proto-google-cloud-eventarc-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-eventarc-v1 - 1.28.0 + 1.29.0 proto-google-cloud-eventarc-v1 Proto library for google-cloud-eventarc com.google.cloud google-cloud-eventarc-parent - 1.28.0 + 1.29.0 diff --git a/java-filestore/CHANGELOG.md b/java-filestore/CHANGELOG.md index d0684cebf3f6..9082172e9cfa 100644 --- a/java-filestore/CHANGELOG.md +++ b/java-filestore/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.29.0 (2023-10-11) ### Dependencies diff --git a/java-filestore/README.md b/java-filestore/README.md index 064e782c1b9b..aae1a54ca66b 100644 --- a/java-filestore/README.md +++ b/java-filestore/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-filestore - 1.29.0 + 1.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-filestore:1.29.0' +implementation 'com.google.cloud:google-cloud-filestore:1.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-filestore" % "1.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-filestore" % "1.30.0" ``` diff --git a/java-filestore/google-cloud-filestore-bom/pom.xml b/java-filestore/google-cloud-filestore-bom/pom.xml index 4e61be00e197..b548b560db47 100644 --- a/java-filestore/google-cloud-filestore-bom/pom.xml +++ b/java-filestore/google-cloud-filestore-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-filestore-bom - 1.29.0 + 1.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-filestore - 1.29.0 + 1.30.0 com.google.api.grpc grpc-google-cloud-filestore-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-filestore-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-cloud-filestore-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-cloud-filestore-v1beta1 - 0.31.0 + 0.32.0 diff --git a/java-filestore/google-cloud-filestore/pom.xml b/java-filestore/google-cloud-filestore/pom.xml index 0486b1b50ce4..5ce85d4fed82 100644 --- a/java-filestore/google-cloud-filestore/pom.xml +++ b/java-filestore/google-cloud-filestore/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-filestore - 1.29.0 + 1.30.0 jar Google Cloud Filestore API Cloud Filestore API instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machines (VMs) instances or Google Kubernetes Engine clusters. com.google.cloud google-cloud-filestore-parent - 1.29.0 + 1.30.0 google-cloud-filestore diff --git a/java-filestore/grpc-google-cloud-filestore-v1/pom.xml b/java-filestore/grpc-google-cloud-filestore-v1/pom.xml index 61218eff12b5..80877c0af75c 100644 --- a/java-filestore/grpc-google-cloud-filestore-v1/pom.xml +++ b/java-filestore/grpc-google-cloud-filestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-filestore-v1 - 1.29.0 + 1.30.0 grpc-google-cloud-filestore-v1 GRPC library for google-cloud-filestore com.google.cloud google-cloud-filestore-parent - 1.29.0 + 1.30.0 diff --git a/java-filestore/grpc-google-cloud-filestore-v1beta1/pom.xml b/java-filestore/grpc-google-cloud-filestore-v1beta1/pom.xml index 36df52273369..ce5a29975302 100644 --- a/java-filestore/grpc-google-cloud-filestore-v1beta1/pom.xml +++ b/java-filestore/grpc-google-cloud-filestore-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-filestore-v1beta1 - 0.31.0 + 0.32.0 grpc-google-cloud-filestore-v1beta1 GRPC library for google-cloud-filestore com.google.cloud google-cloud-filestore-parent - 1.29.0 + 1.30.0 diff --git a/java-filestore/pom.xml b/java-filestore/pom.xml index 74303081d618..82251b235e9d 100644 --- a/java-filestore/pom.xml +++ b/java-filestore/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-filestore-parent pom - 1.29.0 + 1.30.0 Google Cloud Filestore API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-filestore - 1.29.0 + 1.30.0 com.google.api.grpc grpc-google-cloud-filestore-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-filestore-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-cloud-filestore-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-cloud-filestore-v1beta1 - 0.31.0 + 0.32.0 diff --git a/java-filestore/proto-google-cloud-filestore-v1/pom.xml b/java-filestore/proto-google-cloud-filestore-v1/pom.xml index f507037cb0c5..397401688db2 100644 --- a/java-filestore/proto-google-cloud-filestore-v1/pom.xml +++ b/java-filestore/proto-google-cloud-filestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-filestore-v1 - 1.29.0 + 1.30.0 proto-google-cloud-filestore-v1 Proto library for google-cloud-filestore com.google.cloud google-cloud-filestore-parent - 1.29.0 + 1.30.0 diff --git a/java-filestore/proto-google-cloud-filestore-v1beta1/pom.xml b/java-filestore/proto-google-cloud-filestore-v1beta1/pom.xml index bae6a8b7a391..720264cf6de7 100644 --- a/java-filestore/proto-google-cloud-filestore-v1beta1/pom.xml +++ b/java-filestore/proto-google-cloud-filestore-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-filestore-v1beta1 - 0.31.0 + 0.32.0 proto-google-cloud-filestore-v1beta1 Proto library for google-cloud-filestore com.google.cloud google-cloud-filestore-parent - 1.29.0 + 1.30.0 diff --git a/java-functions/CHANGELOG.md b/java-functions/CHANGELOG.md index e75d044aab2e..65ac883c23b3 100644 --- a/java-functions/CHANGELOG.md +++ b/java-functions/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.30.0 (2023-10-11) ### Dependencies diff --git a/java-functions/README.md b/java-functions/README.md index 89485dec482b..c0965d684872 100644 --- a/java-functions/README.md +++ b/java-functions/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-functions - 2.30.0 + 2.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-functions:2.30.0' +implementation 'com.google.cloud:google-cloud-functions:2.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-functions" % "2.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-functions" % "2.31.0" ``` diff --git a/java-functions/google-cloud-functions-bom/pom.xml b/java-functions/google-cloud-functions-bom/pom.xml index 402380131096..42eb7c61a180 100644 --- a/java-functions/google-cloud-functions-bom/pom.xml +++ b/java-functions/google-cloud-functions-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-functions-bom - 2.30.0 + 2.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,47 +27,47 @@ com.google.cloud google-cloud-functions - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v2beta - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v2 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v2beta - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v2 - 2.30.0 + 2.31.0 diff --git a/java-functions/google-cloud-functions/pom.xml b/java-functions/google-cloud-functions/pom.xml index 69f004d9325d..fe0090a9b700 100644 --- a/java-functions/google-cloud-functions/pom.xml +++ b/java-functions/google-cloud-functions/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-functions - 2.30.0 + 2.31.0 jar Google Cloud Functions is a scalable pay as you go Functions-as-a-Service (FaaS) to run your code with zero server management. com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 google-cloud-functions diff --git a/java-functions/grpc-google-cloud-functions-v1/pom.xml b/java-functions/grpc-google-cloud-functions-v1/pom.xml index 151597418baf..1f1393634483 100644 --- a/java-functions/grpc-google-cloud-functions-v1/pom.xml +++ b/java-functions/grpc-google-cloud-functions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-functions-v1 - 2.30.0 + 2.31.0 grpc-google-cloud-functions-v1 GRPC library for grpc-google-cloud-functions-v1 com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-functions/grpc-google-cloud-functions-v2/pom.xml b/java-functions/grpc-google-cloud-functions-v2/pom.xml index d805da6447ca..35604d4e53b1 100644 --- a/java-functions/grpc-google-cloud-functions-v2/pom.xml +++ b/java-functions/grpc-google-cloud-functions-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-functions-v2 - 2.30.0 + 2.31.0 grpc-google-cloud-functions-v2 GRPC library for google-cloud-functions com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-functions/grpc-google-cloud-functions-v2alpha/pom.xml b/java-functions/grpc-google-cloud-functions-v2alpha/pom.xml index 55c34cd79008..e8581143c9c0 100644 --- a/java-functions/grpc-google-cloud-functions-v2alpha/pom.xml +++ b/java-functions/grpc-google-cloud-functions-v2alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-functions-v2alpha - 2.30.0 + 2.31.0 grpc-google-cloud-functions-v2alpha GRPC library for google-cloud-functions com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-functions/grpc-google-cloud-functions-v2beta/pom.xml b/java-functions/grpc-google-cloud-functions-v2beta/pom.xml index 51d6d8468677..e9a277297de3 100644 --- a/java-functions/grpc-google-cloud-functions-v2beta/pom.xml +++ b/java-functions/grpc-google-cloud-functions-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-functions-v2beta - 2.30.0 + 2.31.0 grpc-google-cloud-functions-v2beta GRPC library for google-cloud-functions com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-functions/pom.xml b/java-functions/pom.xml index 05b19e2b2a61..1e49fd830db6 100644 --- a/java-functions/pom.xml +++ b/java-functions/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-functions-parent pom - 2.30.0 + 2.31.0 Google Cloud Functions Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,47 +29,47 @@ com.google.cloud google-cloud-functions - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v2 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v2 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v2beta - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v2beta - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-functions-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-functions-v1 - 2.30.0 + 2.31.0 diff --git a/java-functions/proto-google-cloud-functions-v1/pom.xml b/java-functions/proto-google-cloud-functions-v1/pom.xml index 6e0c59b08a7d..e97cdef6d65a 100644 --- a/java-functions/proto-google-cloud-functions-v1/pom.xml +++ b/java-functions/proto-google-cloud-functions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-functions-v1 - 2.30.0 + 2.31.0 proto-google-cloud-functions-v1 PROTO library for proto-google-cloud-functions-v1 com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-functions/proto-google-cloud-functions-v2/pom.xml b/java-functions/proto-google-cloud-functions-v2/pom.xml index 7be71fb44af6..99d953c80b99 100644 --- a/java-functions/proto-google-cloud-functions-v2/pom.xml +++ b/java-functions/proto-google-cloud-functions-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-functions-v2 - 2.30.0 + 2.31.0 proto-google-cloud-functions-v2 Proto library for google-cloud-functions com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-functions/proto-google-cloud-functions-v2alpha/pom.xml b/java-functions/proto-google-cloud-functions-v2alpha/pom.xml index c307fc4a83ff..2f1ead86f632 100644 --- a/java-functions/proto-google-cloud-functions-v2alpha/pom.xml +++ b/java-functions/proto-google-cloud-functions-v2alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-functions-v2alpha - 2.30.0 + 2.31.0 proto-google-cloud-functions-v2alpha Proto library for google-cloud-functions com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-functions/proto-google-cloud-functions-v2beta/pom.xml b/java-functions/proto-google-cloud-functions-v2beta/pom.xml index 92613f351015..dee2ec654f30 100644 --- a/java-functions/proto-google-cloud-functions-v2beta/pom.xml +++ b/java-functions/proto-google-cloud-functions-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-functions-v2beta - 2.30.0 + 2.31.0 proto-google-cloud-functions-v2beta Proto library for google-cloud-functions com.google.cloud google-cloud-functions-parent - 2.30.0 + 2.31.0 diff --git a/java-gke-backup/CHANGELOG.md b/java-gke-backup/CHANGELOG.md index 3f9ef95da3c9..b142aebd1c1e 100644 --- a/java-gke-backup/CHANGELOG.md +++ b/java-gke-backup/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.27.0 (2023-10-11) ### Dependencies diff --git a/java-gke-backup/README.md b/java-gke-backup/README.md index 5ed7c0aa3d0b..39f52c9ccb5a 100644 --- a/java-gke-backup/README.md +++ b/java-gke-backup/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-gke-backup - 0.27.0 + 0.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-gke-backup:0.27.0' +implementation 'com.google.cloud:google-cloud-gke-backup:0.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-gke-backup" % "0.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-gke-backup" % "0.28.0" ``` diff --git a/java-gke-backup/google-cloud-gke-backup-bom/pom.xml b/java-gke-backup/google-cloud-gke-backup-bom/pom.xml index 2505a6a1b974..e60363e05886 100644 --- a/java-gke-backup/google-cloud-gke-backup-bom/pom.xml +++ b/java-gke-backup/google-cloud-gke-backup-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-gke-backup-bom - 0.27.0 + 0.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-gke-backup - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-gke-backup-v1 - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-gke-backup-v1 - 0.27.0 + 0.28.0 diff --git a/java-gke-backup/google-cloud-gke-backup/pom.xml b/java-gke-backup/google-cloud-gke-backup/pom.xml index 295cc29d262d..df3348c410f7 100644 --- a/java-gke-backup/google-cloud-gke-backup/pom.xml +++ b/java-gke-backup/google-cloud-gke-backup/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-gke-backup - 0.27.0 + 0.28.0 jar Google Backup for GKE Backup for GKE is a service for backing up and restoring workloads in GKE. com.google.cloud google-cloud-gke-backup-parent - 0.27.0 + 0.28.0 google-cloud-gke-backup diff --git a/java-gke-backup/grpc-google-cloud-gke-backup-v1/pom.xml b/java-gke-backup/grpc-google-cloud-gke-backup-v1/pom.xml index 258d5830a269..273d786992d6 100644 --- a/java-gke-backup/grpc-google-cloud-gke-backup-v1/pom.xml +++ b/java-gke-backup/grpc-google-cloud-gke-backup-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gke-backup-v1 - 0.27.0 + 0.28.0 grpc-google-cloud-gke-backup-v1 GRPC library for google-cloud-gke-backup com.google.cloud google-cloud-gke-backup-parent - 0.27.0 + 0.28.0 diff --git a/java-gke-backup/pom.xml b/java-gke-backup/pom.xml index 724681b64f97..4c8bfc3153b2 100644 --- a/java-gke-backup/pom.xml +++ b/java-gke-backup/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-gke-backup-parent pom - 0.27.0 + 0.28.0 Google Backup for GKE Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-gke-backup - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-gke-backup-v1 - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-gke-backup-v1 - 0.27.0 + 0.28.0 diff --git a/java-gke-backup/proto-google-cloud-gke-backup-v1/pom.xml b/java-gke-backup/proto-google-cloud-gke-backup-v1/pom.xml index cd155cfbfd13..3880f3f8344d 100644 --- a/java-gke-backup/proto-google-cloud-gke-backup-v1/pom.xml +++ b/java-gke-backup/proto-google-cloud-gke-backup-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gke-backup-v1 - 0.27.0 + 0.28.0 proto-google-cloud-gke-backup-v1 Proto library for google-cloud-gke-backup com.google.cloud google-cloud-gke-backup-parent - 0.27.0 + 0.28.0 diff --git a/java-gke-connect-gateway/CHANGELOG.md b/java-gke-connect-gateway/CHANGELOG.md index 24bfbfc9f4c1..b270a453b5fd 100644 --- a/java-gke-connect-gateway/CHANGELOG.md +++ b/java-gke-connect-gateway/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.29.0 (2023-10-11) ### Dependencies diff --git a/java-gke-connect-gateway/README.md b/java-gke-connect-gateway/README.md index 9af35e878011..c018ed1a2398 100644 --- a/java-gke-connect-gateway/README.md +++ b/java-gke-connect-gateway/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-gke-connect-gateway - 0.29.0 + 0.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-gke-connect-gateway:0.29.0' +implementation 'com.google.cloud:google-cloud-gke-connect-gateway:0.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-gke-connect-gateway" % "0.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-gke-connect-gateway" % "0.30.0" ``` diff --git a/java-gke-connect-gateway/google-cloud-gke-connect-gateway-bom/pom.xml b/java-gke-connect-gateway/google-cloud-gke-connect-gateway-bom/pom.xml index c92583d07096..7206a5c7d4d8 100644 --- a/java-gke-connect-gateway/google-cloud-gke-connect-gateway-bom/pom.xml +++ b/java-gke-connect-gateway/google-cloud-gke-connect-gateway-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-gke-connect-gateway-bom - 0.29.0 + 0.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-gke-connect-gateway - 0.29.0 + 0.30.0 com.google.api.grpc grpc-google-cloud-gke-connect-gateway-v1beta1 - 0.29.0 + 0.30.0 com.google.api.grpc proto-google-cloud-gke-connect-gateway-v1beta1 - 0.29.0 + 0.30.0 diff --git a/java-gke-connect-gateway/google-cloud-gke-connect-gateway/pom.xml b/java-gke-connect-gateway/google-cloud-gke-connect-gateway/pom.xml index 538941115c52..eeba10b4672e 100644 --- a/java-gke-connect-gateway/google-cloud-gke-connect-gateway/pom.xml +++ b/java-gke-connect-gateway/google-cloud-gke-connect-gateway/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-gke-connect-gateway - 0.29.0 + 0.30.0 jar Google Connect Gateway API Connect Gateway API builds on the power of fleets to let Anthos users connect to and run commands against registered Anthos clusters in a simple, consistent, and secured way, whether the clusters are on Google Cloud, other public clouds, or on premises, and makes it easier to automate DevOps processes across all your clusters. com.google.cloud google-cloud-gke-connect-gateway-parent - 0.29.0 + 0.30.0 google-cloud-gke-connect-gateway diff --git a/java-gke-connect-gateway/grpc-google-cloud-gke-connect-gateway-v1beta1/pom.xml b/java-gke-connect-gateway/grpc-google-cloud-gke-connect-gateway-v1beta1/pom.xml index d8956f11b84c..b351da6a68c3 100644 --- a/java-gke-connect-gateway/grpc-google-cloud-gke-connect-gateway-v1beta1/pom.xml +++ b/java-gke-connect-gateway/grpc-google-cloud-gke-connect-gateway-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gke-connect-gateway-v1beta1 - 0.29.0 + 0.30.0 grpc-google-cloud-gke-connect-gateway-v1beta1 GRPC library for google-cloud-gke-connect-gateway com.google.cloud google-cloud-gke-connect-gateway-parent - 0.29.0 + 0.30.0 diff --git a/java-gke-connect-gateway/pom.xml b/java-gke-connect-gateway/pom.xml index 1010714b70f6..ae41db118d24 100644 --- a/java-gke-connect-gateway/pom.xml +++ b/java-gke-connect-gateway/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-gke-connect-gateway-parent pom - 0.29.0 + 0.30.0 Google Connect Gateway API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-gke-connect-gateway - 0.29.0 + 0.30.0 com.google.api.grpc grpc-google-cloud-gke-connect-gateway-v1beta1 - 0.29.0 + 0.30.0 com.google.api.grpc proto-google-cloud-gke-connect-gateway-v1beta1 - 0.29.0 + 0.30.0 diff --git a/java-gke-connect-gateway/proto-google-cloud-gke-connect-gateway-v1beta1/pom.xml b/java-gke-connect-gateway/proto-google-cloud-gke-connect-gateway-v1beta1/pom.xml index 169a843997f8..4d6056a958fb 100644 --- a/java-gke-connect-gateway/proto-google-cloud-gke-connect-gateway-v1beta1/pom.xml +++ b/java-gke-connect-gateway/proto-google-cloud-gke-connect-gateway-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gke-connect-gateway-v1beta1 - 0.29.0 + 0.30.0 proto-google-cloud-gke-connect-gateway-v1beta1 Proto library for google-cloud-gke-connect-gateway com.google.cloud google-cloud-gke-connect-gateway-parent - 0.29.0 + 0.30.0 diff --git a/java-gke-multi-cloud/CHANGELOG.md b/java-gke-multi-cloud/CHANGELOG.md index d621f4e65c26..1878d9f17fcc 100644 --- a/java-gke-multi-cloud/CHANGELOG.md +++ b/java-gke-multi-cloud/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.27.0 (2023-10-11) ### Dependencies diff --git a/java-gke-multi-cloud/README.md b/java-gke-multi-cloud/README.md index c96bbef0003c..0665049879d9 100644 --- a/java-gke-multi-cloud/README.md +++ b/java-gke-multi-cloud/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-gke-multi-cloud - 0.27.0 + 0.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-gke-multi-cloud:0.27.0' +implementation 'com.google.cloud:google-cloud-gke-multi-cloud:0.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-gke-multi-cloud" % "0.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-gke-multi-cloud" % "0.28.0" ``` diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud-bom/pom.xml b/java-gke-multi-cloud/google-cloud-gke-multi-cloud-bom/pom.xml index 08aeb72464c9..3840ea8befdf 100644 --- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud-bom/pom.xml +++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-gke-multi-cloud-bom - 0.27.0 + 0.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-gke-multi-cloud - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-gke-multi-cloud-v1 - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-gke-multi-cloud-v1 - 0.27.0 + 0.28.0 diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/pom.xml b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/pom.xml index e411eed5cda2..1eda557225f7 100644 --- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/pom.xml +++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-gke-multi-cloud - 0.27.0 + 0.28.0 jar Google Anthos Multicloud Anthos Multicloud enables you to provision and manage GKE clusters running on AWS and Azure infrastructure through a centralized Google Cloud backed control plane. com.google.cloud google-cloud-gke-multi-cloud-parent - 0.27.0 + 0.28.0 google-cloud-gke-multi-cloud diff --git a/java-gke-multi-cloud/grpc-google-cloud-gke-multi-cloud-v1/pom.xml b/java-gke-multi-cloud/grpc-google-cloud-gke-multi-cloud-v1/pom.xml index 158ba30d6450..0fc469a4aedc 100644 --- a/java-gke-multi-cloud/grpc-google-cloud-gke-multi-cloud-v1/pom.xml +++ b/java-gke-multi-cloud/grpc-google-cloud-gke-multi-cloud-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gke-multi-cloud-v1 - 0.27.0 + 0.28.0 grpc-google-cloud-gke-multi-cloud-v1 GRPC library for google-cloud-gke-multi-cloud com.google.cloud google-cloud-gke-multi-cloud-parent - 0.27.0 + 0.28.0 diff --git a/java-gke-multi-cloud/pom.xml b/java-gke-multi-cloud/pom.xml index d2887f74c888..02a2dae098d0 100644 --- a/java-gke-multi-cloud/pom.xml +++ b/java-gke-multi-cloud/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-gke-multi-cloud-parent pom - 0.27.0 + 0.28.0 Google Anthos Multicloud Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-gke-multi-cloud - 0.27.0 + 0.28.0 com.google.api.grpc grpc-google-cloud-gke-multi-cloud-v1 - 0.27.0 + 0.28.0 com.google.api.grpc proto-google-cloud-gke-multi-cloud-v1 - 0.27.0 + 0.28.0 diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/pom.xml b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/pom.xml index 769b5db1c87a..42550408624c 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/pom.xml +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gke-multi-cloud-v1 - 0.27.0 + 0.28.0 proto-google-cloud-gke-multi-cloud-v1 Proto library for google-cloud-gke-multi-cloud com.google.cloud google-cloud-gke-multi-cloud-parent - 0.27.0 + 0.28.0 diff --git a/java-gkehub/CHANGELOG.md b/java-gkehub/CHANGELOG.md index 7ee5f70c6e68..7a5e6dc33f63 100644 --- a/java-gkehub/CHANGELOG.md +++ b/java-gkehub/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-gkehub/README.md b/java-gkehub/README.md index cc6b87001dec..0e3ca249d4ac 100644 --- a/java-gkehub/README.md +++ b/java-gkehub/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-gkehub - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-gkehub:1.28.0' +implementation 'com.google.cloud:google-cloud-gkehub:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-gkehub" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-gkehub" % "1.29.0" ``` diff --git a/java-gkehub/google-cloud-gkehub-bom/pom.xml b/java-gkehub/google-cloud-gkehub-bom/pom.xml index 86b77088e13e..fd15cfe5489b 100644 --- a/java-gkehub/google-cloud-gkehub-bom/pom.xml +++ b/java-gkehub/google-cloud-gkehub-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-gkehub-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,57 +27,57 @@ com.google.cloud google-cloud-gkehub - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-gkehub-v1beta1 - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-gkehub-v1 - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-gkehub-v1alpha - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-gkehub-v1beta - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-gkehub-v1alpha2 - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-gkehub-v1beta1 - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-gkehub-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-gkehub-v1alpha - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-gkehub-v1alpha2 - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-gkehub-v1beta - 0.34.0 + 0.35.0 diff --git a/java-gkehub/google-cloud-gkehub/pom.xml b/java-gkehub/google-cloud-gkehub/pom.xml index e1be872ed0b2..13c7d7f576da 100644 --- a/java-gkehub/google-cloud-gkehub/pom.xml +++ b/java-gkehub/google-cloud-gkehub/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-gkehub - 1.28.0 + 1.29.0 jar Google GKE Hub API provides a unified way to work with Kubernetes clusters as part of Anthos, extending GKE to work in multiple environments. You have consistent, unified, and secure infrastructure, cluster, and container management, whether you're using Anthos on Google Cloud (with traditional GKE), hybrid cloud, or multiple public clouds. com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 google-cloud-gkehub diff --git a/java-gkehub/grpc-google-cloud-gkehub-v1/pom.xml b/java-gkehub/grpc-google-cloud-gkehub-v1/pom.xml index 70ff3e0c5154..86abbcecc61e 100644 --- a/java-gkehub/grpc-google-cloud-gkehub-v1/pom.xml +++ b/java-gkehub/grpc-google-cloud-gkehub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gkehub-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-gkehub-v1 GRPC library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/grpc-google-cloud-gkehub-v1alpha/pom.xml b/java-gkehub/grpc-google-cloud-gkehub-v1alpha/pom.xml index 9ad347e23b6c..99424f2122b5 100644 --- a/java-gkehub/grpc-google-cloud-gkehub-v1alpha/pom.xml +++ b/java-gkehub/grpc-google-cloud-gkehub-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gkehub-v1alpha - 0.34.0 + 0.35.0 grpc-google-cloud-gkehub-v1alpha GRPC library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/grpc-google-cloud-gkehub-v1alpha2/pom.xml b/java-gkehub/grpc-google-cloud-gkehub-v1alpha2/pom.xml index 83704a8a2e16..486ca50aa59f 100644 --- a/java-gkehub/grpc-google-cloud-gkehub-v1alpha2/pom.xml +++ b/java-gkehub/grpc-google-cloud-gkehub-v1alpha2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gkehub-v1alpha2 - 0.34.0 + 0.35.0 grpc-google-cloud-gkehub-v1alpha2 GRPC library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/grpc-google-cloud-gkehub-v1beta/pom.xml b/java-gkehub/grpc-google-cloud-gkehub-v1beta/pom.xml index 777e7100922d..3a0d541b5852 100644 --- a/java-gkehub/grpc-google-cloud-gkehub-v1beta/pom.xml +++ b/java-gkehub/grpc-google-cloud-gkehub-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gkehub-v1beta - 0.34.0 + 0.35.0 grpc-google-cloud-gkehub-v1beta GRPC library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/grpc-google-cloud-gkehub-v1beta1/pom.xml b/java-gkehub/grpc-google-cloud-gkehub-v1beta1/pom.xml index 65feda94087a..ea7ef471205d 100644 --- a/java-gkehub/grpc-google-cloud-gkehub-v1beta1/pom.xml +++ b/java-gkehub/grpc-google-cloud-gkehub-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gkehub-v1beta1 - 0.34.0 + 0.35.0 grpc-google-cloud-gkehub-v1beta1 GRPC library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/pom.xml b/java-gkehub/pom.xml index 6454ee0a78c6..348324ccf73e 100644 --- a/java-gkehub/pom.xml +++ b/java-gkehub/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-gkehub-parent pom - 1.28.0 + 1.29.0 Google GKE Hub API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,57 +29,57 @@ com.google.cloud google-cloud-gkehub - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-gkehub-v1beta - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-gkehub-v1alpha2 - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-gkehub-v1alpha - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-gkehub-v1 - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-gkehub-v1alpha2 - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-gkehub-v1beta - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-gkehub-v1alpha - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-gkehub-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-gkehub-v1beta1 - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-gkehub-v1beta1 - 0.34.0 + 0.35.0 diff --git a/java-gkehub/proto-google-cloud-gkehub-v1/pom.xml b/java-gkehub/proto-google-cloud-gkehub-v1/pom.xml index 19fa97d58da8..975b7fcbffc7 100644 --- a/java-gkehub/proto-google-cloud-gkehub-v1/pom.xml +++ b/java-gkehub/proto-google-cloud-gkehub-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gkehub-v1 - 1.28.0 + 1.29.0 proto-google-cloud-gkehub-v1 Proto library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/proto-google-cloud-gkehub-v1alpha/pom.xml b/java-gkehub/proto-google-cloud-gkehub-v1alpha/pom.xml index 89b122eb7416..fcb099b8d827 100644 --- a/java-gkehub/proto-google-cloud-gkehub-v1alpha/pom.xml +++ b/java-gkehub/proto-google-cloud-gkehub-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gkehub-v1alpha - 0.34.0 + 0.35.0 proto-google-cloud-gkehub-v1alpha Proto library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/proto-google-cloud-gkehub-v1alpha2/pom.xml b/java-gkehub/proto-google-cloud-gkehub-v1alpha2/pom.xml index 57ff1bc90316..12820a432b0a 100644 --- a/java-gkehub/proto-google-cloud-gkehub-v1alpha2/pom.xml +++ b/java-gkehub/proto-google-cloud-gkehub-v1alpha2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gkehub-v1alpha2 - 0.34.0 + 0.35.0 proto-google-cloud-gkehub-v1alpha2 Proto library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/proto-google-cloud-gkehub-v1beta/pom.xml b/java-gkehub/proto-google-cloud-gkehub-v1beta/pom.xml index cf159c1a38f3..43e2277df31f 100644 --- a/java-gkehub/proto-google-cloud-gkehub-v1beta/pom.xml +++ b/java-gkehub/proto-google-cloud-gkehub-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gkehub-v1beta - 0.34.0 + 0.35.0 proto-google-cloud-gkehub-v1beta Proto library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-gkehub/proto-google-cloud-gkehub-v1beta1/pom.xml b/java-gkehub/proto-google-cloud-gkehub-v1beta1/pom.xml index 27bce1839dc8..f7fbcc9b1d1e 100644 --- a/java-gkehub/proto-google-cloud-gkehub-v1beta1/pom.xml +++ b/java-gkehub/proto-google-cloud-gkehub-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gkehub-v1beta1 - 0.34.0 + 0.35.0 proto-google-cloud-gkehub-v1beta1 Proto library for google-cloud-gkehub com.google.cloud google-cloud-gkehub-parent - 1.28.0 + 1.29.0 diff --git a/java-grafeas/CHANGELOG.md b/java-grafeas/CHANGELOG.md index fc3debb8648d..a406e902d906 100644 --- a/java-grafeas/CHANGELOG.md +++ b/java-grafeas/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-grafeas/README.md b/java-grafeas/README.md index 8e4d53cae490..7cb3a6b68d62 100644 --- a/java-grafeas/README.md +++ b/java-grafeas/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: io.grafeas grafeas - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'io.grafeas:grafeas:2.29.0' +implementation 'io.grafeas:grafeas:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "io.grafeas" % "grafeas" % "2.29.0" +libraryDependencies += "io.grafeas" % "grafeas" % "2.30.0" ``` diff --git a/java-grafeas/pom.xml b/java-grafeas/pom.xml index 071a726cf73c..0fd0164a109b 100644 --- a/java-grafeas/pom.xml +++ b/java-grafeas/pom.xml @@ -5,7 +5,7 @@ 4.0.0 io.grafeas grafeas - 2.29.0 + 2.30.0 jar Grafeas Client @@ -15,7 +15,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml diff --git a/java-gsuite-addons/CHANGELOG.md b/java-gsuite-addons/CHANGELOG.md index 11bcc6eba6cd..aa324e030158 100644 --- a/java-gsuite-addons/CHANGELOG.md +++ b/java-gsuite-addons/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-gsuite-addons/README.md b/java-gsuite-addons/README.md index 221ae600b739..17c83c959f3e 100644 --- a/java-gsuite-addons/README.md +++ b/java-gsuite-addons/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-gsuite-addons - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-gsuite-addons:2.28.0' +implementation 'com.google.cloud:google-cloud-gsuite-addons:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-gsuite-addons" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-gsuite-addons" % "2.29.0" ``` diff --git a/java-gsuite-addons/google-cloud-gsuite-addons-bom/pom.xml b/java-gsuite-addons/google-cloud-gsuite-addons-bom/pom.xml index be5a0ce34195..e35c0ed36873 100644 --- a/java-gsuite-addons/google-cloud-gsuite-addons-bom/pom.xml +++ b/java-gsuite-addons/google-cloud-gsuite-addons-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-gsuite-addons-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,22 +27,22 @@ com.google.cloud google-cloud-gsuite-addons - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-gsuite-addons-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-gsuite-addons-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-apps-script-type-protos - 2.28.0 + 2.29.0 diff --git a/java-gsuite-addons/google-cloud-gsuite-addons/pom.xml b/java-gsuite-addons/google-cloud-gsuite-addons/pom.xml index 30ef57166a86..45187502495a 100644 --- a/java-gsuite-addons/google-cloud-gsuite-addons/pom.xml +++ b/java-gsuite-addons/google-cloud-gsuite-addons/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-gsuite-addons - 2.28.0 + 2.29.0 jar Google Google Workspace Add-ons API Google Workspace Add-ons API are customized applications that integrate with Google Workspace productivity applications. com.google.cloud google-cloud-gsuite-addons-parent - 2.28.0 + 2.29.0 google-cloud-gsuite-addons diff --git a/java-gsuite-addons/grpc-google-cloud-gsuite-addons-v1/pom.xml b/java-gsuite-addons/grpc-google-cloud-gsuite-addons-v1/pom.xml index 0fafd8aa8b96..85a4b80b7c56 100644 --- a/java-gsuite-addons/grpc-google-cloud-gsuite-addons-v1/pom.xml +++ b/java-gsuite-addons/grpc-google-cloud-gsuite-addons-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-gsuite-addons-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-gsuite-addons-v1 GRPC library for google-cloud-gsuite-addons com.google.cloud google-cloud-gsuite-addons-parent - 2.28.0 + 2.29.0 diff --git a/java-gsuite-addons/pom.xml b/java-gsuite-addons/pom.xml index 4aad1c031271..2aa4b6fc43d2 100644 --- a/java-gsuite-addons/pom.xml +++ b/java-gsuite-addons/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-gsuite-addons-parent pom - 2.28.0 + 2.29.0 Google Google Workspace Add-ons API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,22 +29,22 @@ com.google.cloud google-cloud-gsuite-addons - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-apps-script-type-protos - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-gsuite-addons-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-gsuite-addons-v1 - 2.28.0 + 2.29.0 diff --git a/java-gsuite-addons/proto-google-apps-script-type-protos/pom.xml b/java-gsuite-addons/proto-google-apps-script-type-protos/pom.xml index 065d5e086f07..590c8761accc 100644 --- a/java-gsuite-addons/proto-google-apps-script-type-protos/pom.xml +++ b/java-gsuite-addons/proto-google-apps-script-type-protos/pom.xml @@ -5,13 +5,13 @@ com.google.cloud google-cloud-gsuite-addons-parent - 2.28.0 + 2.29.0 4.0.0 com.google.api.grpc proto-google-apps-script-type-protos proto-google-apps-script-type-protos - 2.28.0 + 2.29.0 diff --git a/java-gsuite-addons/proto-google-cloud-gsuite-addons-v1/pom.xml b/java-gsuite-addons/proto-google-cloud-gsuite-addons-v1/pom.xml index 6a9d9c2f7ea1..c0080ed8cfc7 100644 --- a/java-gsuite-addons/proto-google-cloud-gsuite-addons-v1/pom.xml +++ b/java-gsuite-addons/proto-google-cloud-gsuite-addons-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-gsuite-addons-v1 - 2.28.0 + 2.29.0 proto-google-cloud-gsuite-addons-v1 Proto library for google-cloud-gsuite-addons com.google.cloud google-cloud-gsuite-addons-parent - 2.28.0 + 2.29.0 diff --git a/java-iam-admin/CHANGELOG.md b/java-iam-admin/CHANGELOG.md index 8f0747dfc9a3..7f0a6219d814 100644 --- a/java-iam-admin/CHANGELOG.md +++ b/java-iam-admin/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.24.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.23.0 (2023-10-11) ### Dependencies diff --git a/java-iam-admin/README.md b/java-iam-admin/README.md index 2d8277cfbd37..aebfda9417f6 100644 --- a/java-iam-admin/README.md +++ b/java-iam-admin/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-iam-admin - 3.23.0 + 3.24.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-iam-admin:3.23.0' +implementation 'com.google.cloud:google-iam-admin:3.24.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-iam-admin" % "3.23.0" +libraryDependencies += "com.google.cloud" % "google-iam-admin" % "3.24.0" ``` diff --git a/java-iam-admin/google-iam-admin-bom/pom.xml b/java-iam-admin/google-iam-admin-bom/pom.xml index 067e1ff8750a..fb8e0f326b33 100644 --- a/java-iam-admin/google-iam-admin-bom/pom.xml +++ b/java-iam-admin/google-iam-admin-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-iam-admin-bom - 3.23.0 + 3.24.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-iam-admin - 3.23.0 + 3.24.0 com.google.api.grpc grpc-google-iam-admin-v1 - 3.23.0 + 3.24.0 com.google.api.grpc proto-google-iam-admin-v1 - 3.23.0 + 3.24.0 diff --git a/java-iam-admin/google-iam-admin/pom.xml b/java-iam-admin/google-iam-admin/pom.xml index 0041a02c6a65..b1843d33d2f4 100644 --- a/java-iam-admin/google-iam-admin/pom.xml +++ b/java-iam-admin/google-iam-admin/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-iam-admin - 3.23.0 + 3.24.0 jar Google IAM Admin API IAM Admin API you to manage your Service Accounts and IAM bindings. com.google.cloud google-iam-admin-parent - 3.23.0 + 3.24.0 google-iam-admin diff --git a/java-iam-admin/grpc-google-iam-admin-v1/pom.xml b/java-iam-admin/grpc-google-iam-admin-v1/pom.xml index debe4b081d44..860114266b57 100644 --- a/java-iam-admin/grpc-google-iam-admin-v1/pom.xml +++ b/java-iam-admin/grpc-google-iam-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-admin-v1 - 3.23.0 + 3.24.0 grpc-google-iam-admin-v1 GRPC library for google-iam-admin com.google.cloud google-iam-admin-parent - 3.23.0 + 3.24.0 diff --git a/java-iam-admin/pom.xml b/java-iam-admin/pom.xml index 3b7cd166b8a4..c784336a1a3d 100644 --- a/java-iam-admin/pom.xml +++ b/java-iam-admin/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-admin-parent pom - 3.23.0 + 3.24.0 Google IAM Admin API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-iam-admin - 3.23.0 + 3.24.0 com.google.api.grpc grpc-google-iam-admin-v1 - 3.23.0 + 3.24.0 com.google.api.grpc proto-google-iam-admin-v1 - 3.23.0 + 3.24.0 diff --git a/java-iam-admin/proto-google-iam-admin-v1/pom.xml b/java-iam-admin/proto-google-iam-admin-v1/pom.xml index b1d9dd5fac83..db4d12bf599e 100644 --- a/java-iam-admin/proto-google-iam-admin-v1/pom.xml +++ b/java-iam-admin/proto-google-iam-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-admin-v1 - 3.23.0 + 3.24.0 proto-google-iam-admin-v1 Proto library for google-iam-admin com.google.cloud google-iam-admin-parent - 3.23.0 + 3.24.0 diff --git a/java-iam/CHANGELOG.md b/java-iam/CHANGELOG.md index fa9a16051891..8c0bf1f7127e 100644 --- a/java-iam/CHANGELOG.md +++ b/java-iam/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.26.0 (2023-10-11) ### Dependencies diff --git a/java-iam/README.md b/java-iam/README.md index 621a8b8488da..b4856d2d6ced 100644 --- a/java-iam/README.md +++ b/java-iam/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-iam-policy - 1.26.0 + 1.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-iam-policy:1.26.0' +implementation 'com.google.cloud:google-iam-policy:1.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-iam-policy" % "1.26.0" +libraryDependencies += "com.google.cloud" % "google-iam-policy" % "1.27.0" ``` diff --git a/java-iam/google-iam-policy-bom/pom.xml b/java-iam/google-iam-policy-bom/pom.xml index a3bad82fb190..9934671a1742 100644 --- a/java-iam/google-iam-policy-bom/pom.xml +++ b/java-iam/google-iam-policy-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-iam-policy-bom - 1.26.0 + 1.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,7 +27,7 @@ com.google.cloud google-iam-policy - 1.26.0 + 1.27.0 diff --git a/java-iam/google-iam-policy/pom.xml b/java-iam/google-iam-policy/pom.xml index 579195165914..975faf98d7c6 100644 --- a/java-iam/google-iam-policy/pom.xml +++ b/java-iam/google-iam-policy/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-iam-policy - 1.26.0 + 1.27.0 jar Google IAM Policy Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. com.google.cloud google-iam-policy-parent - 1.26.0 + 1.27.0 google-iam-policy diff --git a/java-iam/pom.xml b/java-iam/pom.xml index fd99f7439258..9ce35197b24e 100644 --- a/java-iam/pom.xml +++ b/java-iam/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-policy-parent pom - 1.26.0 + 1.27.0 Google IAM Policy Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml diff --git a/java-iamcredentials/CHANGELOG.md b/java-iamcredentials/CHANGELOG.md index 3b17d406554e..265b22fc0b1f 100644 --- a/java-iamcredentials/CHANGELOG.md +++ b/java-iamcredentials/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-iamcredentials/README.md b/java-iamcredentials/README.md index a287e0311b5d..db93c564c9fb 100644 --- a/java-iamcredentials/README.md +++ b/java-iamcredentials/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-iamcredentials - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-iamcredentials:2.28.0' +implementation 'com.google.cloud:google-cloud-iamcredentials:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-iamcredentials" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-iamcredentials" % "2.29.0" ``` diff --git a/java-iamcredentials/google-cloud-iamcredentials-bom/pom.xml b/java-iamcredentials/google-cloud-iamcredentials-bom/pom.xml index 4aba317cfa77..af7aef6a63c0 100644 --- a/java-iamcredentials/google-cloud-iamcredentials-bom/pom.xml +++ b/java-iamcredentials/google-cloud-iamcredentials-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-iamcredentials-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-iamcredentials - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-iamcredentials-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-iamcredentials-v1 - 2.28.0 + 2.29.0 diff --git a/java-iamcredentials/google-cloud-iamcredentials/pom.xml b/java-iamcredentials/google-cloud-iamcredentials/pom.xml index b923eb43e10c..18f28d91e279 100644 --- a/java-iamcredentials/google-cloud-iamcredentials/pom.xml +++ b/java-iamcredentials/google-cloud-iamcredentials/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-iamcredentials - 2.28.0 + 2.29.0 jar Google Cloud IAM Service Account Credentials Java idiomatic client for Google Cloud IAM Service Account Credentials com.google.cloud google-cloud-iamcredentials-parent - 2.28.0 + 2.29.0 google-cloud-iamcredentials diff --git a/java-iamcredentials/grpc-google-cloud-iamcredentials-v1/pom.xml b/java-iamcredentials/grpc-google-cloud-iamcredentials-v1/pom.xml index 5beeb2776c35..8d74b588e2d7 100644 --- a/java-iamcredentials/grpc-google-cloud-iamcredentials-v1/pom.xml +++ b/java-iamcredentials/grpc-google-cloud-iamcredentials-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-iamcredentials-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-iamcredentials-v1 GRPC library for grpc-google-cloud-iamcredentials-v1 com.google.cloud google-cloud-iamcredentials-parent - 2.28.0 + 2.29.0 diff --git a/java-iamcredentials/pom.xml b/java-iamcredentials/pom.xml index 8cc0405982eb..ab158584c810 100644 --- a/java-iamcredentials/pom.xml +++ b/java-iamcredentials/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-iamcredentials-parent pom - 2.28.0 + 2.29.0 Google Cloud IAM Service Account Credentials Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-iamcredentials-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-iamcredentials-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-iamcredentials - 2.28.0 + 2.29.0 diff --git a/java-iamcredentials/proto-google-cloud-iamcredentials-v1/pom.xml b/java-iamcredentials/proto-google-cloud-iamcredentials-v1/pom.xml index 1e7527016c64..49bb19d62fc8 100644 --- a/java-iamcredentials/proto-google-cloud-iamcredentials-v1/pom.xml +++ b/java-iamcredentials/proto-google-cloud-iamcredentials-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-iamcredentials-v1 - 2.28.0 + 2.29.0 proto-google-cloud-iamcredentials-v1 PROTO library for proto-google-cloud-iamcredentials-v1 com.google.cloud google-cloud-iamcredentials-parent - 2.28.0 + 2.29.0 diff --git a/java-ids/CHANGELOG.md b/java-ids/CHANGELOG.md index 8b358ebd607f..8af593e1faf9 100644 --- a/java-ids/CHANGELOG.md +++ b/java-ids/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.27.0 (2023-10-11) ### Dependencies diff --git a/java-ids/README.md b/java-ids/README.md index 9b485f3994c7..abd364c7995d 100644 --- a/java-ids/README.md +++ b/java-ids/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-ids - 1.27.0 + 1.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-ids:1.27.0' +implementation 'com.google.cloud:google-cloud-ids:1.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-ids" % "1.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-ids" % "1.28.0" ``` diff --git a/java-ids/google-cloud-ids-bom/pom.xml b/java-ids/google-cloud-ids-bom/pom.xml index bc4de1aafa61..dea68da00816 100644 --- a/java-ids/google-cloud-ids-bom/pom.xml +++ b/java-ids/google-cloud-ids-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-ids-bom - 1.27.0 + 1.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-ids - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-ids-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-ids-v1 - 1.27.0 + 1.28.0 diff --git a/java-ids/google-cloud-ids/pom.xml b/java-ids/google-cloud-ids/pom.xml index 483725cfc21a..81bc594ffebc 100644 --- a/java-ids/google-cloud-ids/pom.xml +++ b/java-ids/google-cloud-ids/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-ids - 1.27.0 + 1.28.0 jar Google Intrusion Detection System Intrusion Detection System monitors your networks, and it alerts you when it detects malicious activity. Cloud IDS is powered by Palo Alto Networks. com.google.cloud google-cloud-ids-parent - 1.27.0 + 1.28.0 google-cloud-ids diff --git a/java-ids/grpc-google-cloud-ids-v1/pom.xml b/java-ids/grpc-google-cloud-ids-v1/pom.xml index d6c3cb6a12b5..0e028578c809 100644 --- a/java-ids/grpc-google-cloud-ids-v1/pom.xml +++ b/java-ids/grpc-google-cloud-ids-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-ids-v1 - 1.27.0 + 1.28.0 grpc-google-cloud-ids-v1 GRPC library for google-cloud-ids com.google.cloud google-cloud-ids-parent - 1.27.0 + 1.28.0 diff --git a/java-ids/pom.xml b/java-ids/pom.xml index bce61911b9ea..1067f06d9ec4 100644 --- a/java-ids/pom.xml +++ b/java-ids/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-ids-parent pom - 1.27.0 + 1.28.0 Google Intrusion Detection System Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-ids - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-ids-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-ids-v1 - 1.27.0 + 1.28.0 diff --git a/java-ids/proto-google-cloud-ids-v1/pom.xml b/java-ids/proto-google-cloud-ids-v1/pom.xml index c657e8fac941..4f1561327ec8 100644 --- a/java-ids/proto-google-cloud-ids-v1/pom.xml +++ b/java-ids/proto-google-cloud-ids-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-ids-v1 - 1.27.0 + 1.28.0 proto-google-cloud-ids-v1 Proto library for google-cloud-ids com.google.cloud google-cloud-ids-parent - 1.27.0 + 1.28.0 diff --git a/java-infra-manager/CHANGELOG.md b/java-infra-manager/CHANGELOG.md index 6224205e7d69..30cc08e632ea 100644 --- a/java-infra-manager/CHANGELOG.md +++ b/java-infra-manager/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.6.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.5.0 (2023-10-11) ### Dependencies diff --git a/java-infra-manager/README.md b/java-infra-manager/README.md index f4cc7b479f1f..67c2a94fa3c6 100644 --- a/java-infra-manager/README.md +++ b/java-infra-manager/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-infra-manager - 0.5.0 + 0.6.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-infra-manager:0.5.0' +implementation 'com.google.cloud:google-cloud-infra-manager:0.6.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-infra-manager" % "0.5.0" +libraryDependencies += "com.google.cloud" % "google-cloud-infra-manager" % "0.6.0" ``` diff --git a/java-infra-manager/google-cloud-infra-manager-bom/pom.xml b/java-infra-manager/google-cloud-infra-manager-bom/pom.xml index cb8aed241432..e3fc0d52bcb0 100644 --- a/java-infra-manager/google-cloud-infra-manager-bom/pom.xml +++ b/java-infra-manager/google-cloud-infra-manager-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-infra-manager-bom - 0.5.0 + 0.6.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-infra-manager - 0.5.0 + 0.6.0 com.google.api.grpc grpc-google-cloud-infra-manager-v1 - 0.5.0 + 0.6.0 com.google.api.grpc proto-google-cloud-infra-manager-v1 - 0.5.0 + 0.6.0 diff --git a/java-infra-manager/google-cloud-infra-manager/pom.xml b/java-infra-manager/google-cloud-infra-manager/pom.xml index 593823fb4563..8f41bc92909f 100644 --- a/java-infra-manager/google-cloud-infra-manager/pom.xml +++ b/java-infra-manager/google-cloud-infra-manager/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-infra-manager - 0.5.0 + 0.6.0 jar Google Infrastructure Manager API Infrastructure Manager API Creates and manages Google Cloud Platform resources and infrastructure. com.google.cloud google-cloud-infra-manager-parent - 0.5.0 + 0.6.0 google-cloud-infra-manager diff --git a/java-infra-manager/grpc-google-cloud-infra-manager-v1/pom.xml b/java-infra-manager/grpc-google-cloud-infra-manager-v1/pom.xml index 8ed7e9154b3f..aa4c3d08895e 100644 --- a/java-infra-manager/grpc-google-cloud-infra-manager-v1/pom.xml +++ b/java-infra-manager/grpc-google-cloud-infra-manager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-infra-manager-v1 - 0.5.0 + 0.6.0 grpc-google-cloud-infra-manager-v1 GRPC library for google-cloud-infra-manager com.google.cloud google-cloud-infra-manager-parent - 0.5.0 + 0.6.0 diff --git a/java-infra-manager/pom.xml b/java-infra-manager/pom.xml index d7a337f7e40c..8afc6b15762d 100644 --- a/java-infra-manager/pom.xml +++ b/java-infra-manager/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-infra-manager-parent pom - 0.5.0 + 0.6.0 Google Infrastructure Manager API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-infra-manager - 0.5.0 + 0.6.0 com.google.api.grpc grpc-google-cloud-infra-manager-v1 - 0.5.0 + 0.6.0 com.google.api.grpc proto-google-cloud-infra-manager-v1 - 0.5.0 + 0.6.0 diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/pom.xml b/java-infra-manager/proto-google-cloud-infra-manager-v1/pom.xml index d57f71524a26..32724f05f0d9 100644 --- a/java-infra-manager/proto-google-cloud-infra-manager-v1/pom.xml +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-infra-manager-v1 - 0.5.0 + 0.6.0 proto-google-cloud-infra-manager-v1 Proto library for google-cloud-infra-manager com.google.cloud google-cloud-infra-manager-parent - 0.5.0 + 0.6.0 diff --git a/java-iot/CHANGELOG.md b/java-iot/CHANGELOG.md index 8cecb319325a..b576f2de749b 100644 --- a/java-iot/CHANGELOG.md +++ b/java-iot/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-iot/README.md b/java-iot/README.md index ea7de82c0968..3b0929a4faba 100644 --- a/java-iot/README.md +++ b/java-iot/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-iot - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-iot:2.28.0' +implementation 'com.google.cloud:google-cloud-iot:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-iot" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-iot" % "2.29.0" ``` diff --git a/java-iot/google-cloud-iot-bom/pom.xml b/java-iot/google-cloud-iot-bom/pom.xml index 16b97b8c354d..e4128c0727f6 100644 --- a/java-iot/google-cloud-iot-bom/pom.xml +++ b/java-iot/google-cloud-iot-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-iot-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-iot - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-iot-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-iot-v1 - 2.28.0 + 2.29.0 diff --git a/java-iot/google-cloud-iot/pom.xml b/java-iot/google-cloud-iot/pom.xml index 4a1b33273fc1..b9051b292dea 100644 --- a/java-iot/google-cloud-iot/pom.xml +++ b/java-iot/google-cloud-iot/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-iot - 2.28.0 + 2.29.0 jar Google Cloud IoT Core Java idiomatic client for Google Cloud IoT Core com.google.cloud google-cloud-iot-parent - 2.28.0 + 2.29.0 google-cloud-iot diff --git a/java-iot/grpc-google-cloud-iot-v1/pom.xml b/java-iot/grpc-google-cloud-iot-v1/pom.xml index 967b1a7e36d1..73d3f7ad9f09 100644 --- a/java-iot/grpc-google-cloud-iot-v1/pom.xml +++ b/java-iot/grpc-google-cloud-iot-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-iot-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-iot-v1 GRPC library for grpc-google-cloud-iot-v1 com.google.cloud google-cloud-iot-parent - 2.28.0 + 2.29.0 diff --git a/java-iot/pom.xml b/java-iot/pom.xml index 6f417644773a..48a436995da3 100644 --- a/java-iot/pom.xml +++ b/java-iot/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-iot-parent pom - 2.28.0 + 2.29.0 Google Cloud IoT Core Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-iot-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-iot-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-iot - 2.28.0 + 2.29.0 diff --git a/java-iot/proto-google-cloud-iot-v1/pom.xml b/java-iot/proto-google-cloud-iot-v1/pom.xml index 33381bc7b176..038c8a39d63b 100644 --- a/java-iot/proto-google-cloud-iot-v1/pom.xml +++ b/java-iot/proto-google-cloud-iot-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-iot-v1 - 2.28.0 + 2.29.0 proto-google-cloud-iot-v1 PROTO library for proto-google-cloud-iot-v1 com.google.cloud google-cloud-iot-parent - 2.28.0 + 2.29.0 diff --git a/java-kms/CHANGELOG.md b/java-kms/CHANGELOG.md index 58335907b2b3..cea50726c228 100644 --- a/java-kms/CHANGELOG.md +++ b/java-kms/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.32.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.31.0 (2023-10-11) ### Dependencies diff --git a/java-kms/README.md b/java-kms/README.md index 7dab24c64eba..bb97702c7551 100644 --- a/java-kms/README.md +++ b/java-kms/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-kms - 2.31.0 + 2.32.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-kms:2.31.0' +implementation 'com.google.cloud:google-cloud-kms:2.32.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "2.31.0" +libraryDependencies += "com.google.cloud" % "google-cloud-kms" % "2.32.0" ``` diff --git a/java-kms/google-cloud-kms-bom/pom.xml b/java-kms/google-cloud-kms-bom/pom.xml index ec756b90040b..2deeff9d7225 100644 --- a/java-kms/google-cloud-kms-bom/pom.xml +++ b/java-kms/google-cloud-kms-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-kms-bom - 2.31.0 + 2.32.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-kms - 2.31.0 + 2.32.0 com.google.api.grpc grpc-google-cloud-kms-v1 - 0.122.0 + 0.123.0 com.google.api.grpc proto-google-cloud-kms-v1 - 0.122.0 + 0.123.0 diff --git a/java-kms/google-cloud-kms/pom.xml b/java-kms/google-cloud-kms/pom.xml index 79cf60677a95..306a232105da 100644 --- a/java-kms/google-cloud-kms/pom.xml +++ b/java-kms/google-cloud-kms/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-kms - 2.31.0 + 2.32.0 jar Google Cloud KMS Java idiomatic client for Google Cloud KMS com.google.cloud google-cloud-kms-parent - 2.31.0 + 2.32.0 google-cloud-kms diff --git a/java-kms/grpc-google-cloud-kms-v1/pom.xml b/java-kms/grpc-google-cloud-kms-v1/pom.xml index fcac0b1803a3..4dfc42b04e15 100644 --- a/java-kms/grpc-google-cloud-kms-v1/pom.xml +++ b/java-kms/grpc-google-cloud-kms-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-kms-v1 - 0.122.0 + 0.123.0 grpc-google-cloud-kms-v1 GRPC library for grpc-google-cloud-kms-v1 com.google.cloud google-cloud-kms-parent - 2.31.0 + 2.32.0 diff --git a/java-kms/pom.xml b/java-kms/pom.xml index 17ab2e0019d9..dbd4fe264604 100644 --- a/java-kms/pom.xml +++ b/java-kms/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-kms-parent pom - 2.31.0 + 2.32.0 Google Cloud KMS Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,22 +29,22 @@ com.google.api.grpc proto-google-cloud-kms-v1 - 0.122.0 + 0.123.0 com.google.api.grpc grpc-google-cloud-kms-v1 - 0.122.0 + 0.123.0 com.google.cloud google-cloud-kms - 2.31.0 + 2.32.0 com.google.cloud google-cloud-kms-bom - 2.31.0 + 2.32.0 diff --git a/java-kms/proto-google-cloud-kms-v1/pom.xml b/java-kms/proto-google-cloud-kms-v1/pom.xml index a62c8e2bbe82..8bbb6ae8803d 100644 --- a/java-kms/proto-google-cloud-kms-v1/pom.xml +++ b/java-kms/proto-google-cloud-kms-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-kms-v1 - 0.122.0 + 0.123.0 proto-google-cloud-kms-v1 PROTO library for proto-google-cloud-kms-v1 com.google.cloud google-cloud-kms-parent - 2.31.0 + 2.32.0 diff --git a/java-kmsinventory/CHANGELOG.md b/java-kmsinventory/CHANGELOG.md index e9986e7ed86a..454790c4bfd3 100644 --- a/java-kmsinventory/CHANGELOG.md +++ b/java-kmsinventory/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.18.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.17.0 (2023-10-11) ### Dependencies diff --git a/java-kmsinventory/README.md b/java-kmsinventory/README.md index a789b758fbea..e89c4c964a93 100644 --- a/java-kmsinventory/README.md +++ b/java-kmsinventory/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-kmsinventory - 0.17.0 + 0.18.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-kmsinventory:0.17.0' +implementation 'com.google.cloud:google-cloud-kmsinventory:0.18.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-kmsinventory" % "0.17.0" +libraryDependencies += "com.google.cloud" % "google-cloud-kmsinventory" % "0.18.0" ``` diff --git a/java-kmsinventory/google-cloud-kmsinventory-bom/pom.xml b/java-kmsinventory/google-cloud-kmsinventory-bom/pom.xml index 6c5040a32e02..ac93f0f241fd 100644 --- a/java-kmsinventory/google-cloud-kmsinventory-bom/pom.xml +++ b/java-kmsinventory/google-cloud-kmsinventory-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-kmsinventory-bom - 0.17.0 + 0.18.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-kmsinventory - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-kmsinventory-v1 - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-kmsinventory-v1 - 0.17.0 + 0.18.0 diff --git a/java-kmsinventory/google-cloud-kmsinventory/pom.xml b/java-kmsinventory/google-cloud-kmsinventory/pom.xml index 1167ef1085e4..0b009f438bee 100644 --- a/java-kmsinventory/google-cloud-kmsinventory/pom.xml +++ b/java-kmsinventory/google-cloud-kmsinventory/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-kmsinventory - 0.17.0 + 0.18.0 jar Google KMS Inventory API KMS Inventory API KMS Inventory API. com.google.cloud google-cloud-kmsinventory-parent - 0.17.0 + 0.18.0 google-cloud-kmsinventory diff --git a/java-kmsinventory/grpc-google-cloud-kmsinventory-v1/pom.xml b/java-kmsinventory/grpc-google-cloud-kmsinventory-v1/pom.xml index 7f3c90bcbad4..a15f072d9db0 100644 --- a/java-kmsinventory/grpc-google-cloud-kmsinventory-v1/pom.xml +++ b/java-kmsinventory/grpc-google-cloud-kmsinventory-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-kmsinventory-v1 - 0.17.0 + 0.18.0 grpc-google-cloud-kmsinventory-v1 GRPC library for google-cloud-kmsinventory com.google.cloud google-cloud-kmsinventory-parent - 0.17.0 + 0.18.0 diff --git a/java-kmsinventory/pom.xml b/java-kmsinventory/pom.xml index 99b265971935..782c88a4902f 100644 --- a/java-kmsinventory/pom.xml +++ b/java-kmsinventory/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-kmsinventory-parent pom - 0.17.0 + 0.18.0 Google KMS Inventory API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,22 +29,22 @@ com.google.cloud google-cloud-kmsinventory - 0.17.0 + 0.18.0 com.google.api.grpc grpc-google-cloud-kmsinventory-v1 - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-kmsinventory-v1 - 0.17.0 + 0.18.0 com.google.api.grpc proto-google-cloud-kms-v1 - 0.122.0 + 0.123.0 diff --git a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/pom.xml b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/pom.xml index 650344fe3871..e02dc9d5f6ef 100644 --- a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/pom.xml +++ b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-kmsinventory-v1 - 0.17.0 + 0.18.0 proto-google-cloud-kmsinventory-v1 Proto library for google-cloud-kmsinventory com.google.cloud google-cloud-kmsinventory-parent - 0.17.0 + 0.18.0 diff --git a/java-language/CHANGELOG.md b/java-language/CHANGELOG.md index 692f2ac78b41..04332e0b26d5 100644 --- a/java-language/CHANGELOG.md +++ b/java-language/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-language/README.md b/java-language/README.md index 29f04acb5267..59ad919ed29d 100644 --- a/java-language/README.md +++ b/java-language/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-language - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-language:2.29.0' +implementation 'com.google.cloud:google-cloud-language:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-language" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-language" % "2.30.0" ``` diff --git a/java-language/google-cloud-language-bom/pom.xml b/java-language/google-cloud-language-bom/pom.xml index d50928a7dce5..e0c738771916 100644 --- a/java-language/google-cloud-language-bom/pom.xml +++ b/java-language/google-cloud-language-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-language-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,37 +23,37 @@ com.google.cloud google-cloud-language - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-language-v1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-language-v1beta2 - 0.116.0 + 0.117.0 com.google.api.grpc grpc-google-cloud-language-v2 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-language-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-language-v1beta2 - 0.116.0 + 0.117.0 com.google.api.grpc proto-google-cloud-language-v2 - 2.29.0 + 2.30.0 diff --git a/java-language/google-cloud-language/pom.xml b/java-language/google-cloud-language/pom.xml index 477eb80842d9..dafc10f4ac68 100644 --- a/java-language/google-cloud-language/pom.xml +++ b/java-language/google-cloud-language/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-language - 2.29.0 + 2.30.0 jar Google Cloud Natural Language Java idiomatic client for Google Clould Natural Language com.google.cloud google-cloud-language-parent - 2.29.0 + 2.30.0 google-cloud-language diff --git a/java-language/grpc-google-cloud-language-v1/pom.xml b/java-language/grpc-google-cloud-language-v1/pom.xml index 3bcae4c4a8b8..d11da9e6bb4f 100644 --- a/java-language/grpc-google-cloud-language-v1/pom.xml +++ b/java-language/grpc-google-cloud-language-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-language-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-language-v1 GRPC library for grpc-google-cloud-language-v1 com.google.cloud google-cloud-language-parent - 2.29.0 + 2.30.0 diff --git a/java-language/grpc-google-cloud-language-v1beta2/pom.xml b/java-language/grpc-google-cloud-language-v1beta2/pom.xml index 157c3cf50442..90796e584da9 100644 --- a/java-language/grpc-google-cloud-language-v1beta2/pom.xml +++ b/java-language/grpc-google-cloud-language-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-language-v1beta2 - 0.116.0 + 0.117.0 grpc-google-cloud-language-v1beta2 GRPC library for grpc-google-cloud-language-v1beta2 com.google.cloud google-cloud-language-parent - 2.29.0 + 2.30.0 diff --git a/java-language/grpc-google-cloud-language-v2/pom.xml b/java-language/grpc-google-cloud-language-v2/pom.xml index a8c535357330..bdb961cb6b05 100644 --- a/java-language/grpc-google-cloud-language-v2/pom.xml +++ b/java-language/grpc-google-cloud-language-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-language-v2 - 2.29.0 + 2.30.0 grpc-google-cloud-language-v2 GRPC library for google-cloud-language com.google.cloud google-cloud-language-parent - 2.29.0 + 2.30.0 diff --git a/java-language/pom.xml b/java-language/pom.xml index 2898064c02b2..2c67b855c600 100644 --- a/java-language/pom.xml +++ b/java-language/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-language-parent pom - 2.29.0 + 2.30.0 Google Cloud Natural Language Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.api.grpc proto-google-cloud-language-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-language-v2 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-language-v2 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-language-v1beta2 - 0.116.0 + 0.117.0 com.google.api.grpc grpc-google-cloud-language-v1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-language-v1beta2 - 0.116.0 + 0.117.0 com.google.cloud google-cloud-language - 2.29.0 + 2.30.0 diff --git a/java-language/proto-google-cloud-language-v1/pom.xml b/java-language/proto-google-cloud-language-v1/pom.xml index 31806a143fdd..2092a992af27 100644 --- a/java-language/proto-google-cloud-language-v1/pom.xml +++ b/java-language/proto-google-cloud-language-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-language-v1 - 2.29.0 + 2.30.0 proto-google-cloud-language-v1 PROTO library for proto-google-cloud-language-v1 com.google.cloud google-cloud-language-parent - 2.29.0 + 2.30.0 diff --git a/java-language/proto-google-cloud-language-v1beta2/pom.xml b/java-language/proto-google-cloud-language-v1beta2/pom.xml index d2fb0fba9727..1a7476a0f9a5 100644 --- a/java-language/proto-google-cloud-language-v1beta2/pom.xml +++ b/java-language/proto-google-cloud-language-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-language-v1beta2 - 0.116.0 + 0.117.0 proto-google-cloud-language-v1beta2 PROTO library for proto-google-cloud-language-v1beta2 com.google.cloud google-cloud-language-parent - 2.29.0 + 2.30.0 diff --git a/java-language/proto-google-cloud-language-v2/pom.xml b/java-language/proto-google-cloud-language-v2/pom.xml index 7abf2e071f50..0eb00e26423f 100644 --- a/java-language/proto-google-cloud-language-v2/pom.xml +++ b/java-language/proto-google-cloud-language-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-language-v2 - 2.29.0 + 2.30.0 proto-google-cloud-language-v2 Proto library for google-cloud-language com.google.cloud google-cloud-language-parent - 2.29.0 + 2.30.0 diff --git a/java-life-sciences/CHANGELOG.md b/java-life-sciences/CHANGELOG.md index add930325798..7e414687885d 100644 --- a/java-life-sciences/CHANGELOG.md +++ b/java-life-sciences/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.30.0 (2023-10-11) ### Dependencies diff --git a/java-life-sciences/README.md b/java-life-sciences/README.md index 0b2576912ddd..1df196e81a44 100644 --- a/java-life-sciences/README.md +++ b/java-life-sciences/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-life-sciences - 0.30.0 + 0.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-life-sciences:0.30.0' +implementation 'com.google.cloud:google-cloud-life-sciences:0.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-life-sciences" % "0.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-life-sciences" % "0.31.0" ``` diff --git a/java-life-sciences/google-cloud-life-sciences-bom/pom.xml b/java-life-sciences/google-cloud-life-sciences-bom/pom.xml index d01eb856a550..232aa3fd5f48 100644 --- a/java-life-sciences/google-cloud-life-sciences-bom/pom.xml +++ b/java-life-sciences/google-cloud-life-sciences-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-life-sciences-bom - 0.30.0 + 0.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-life-sciences - 0.30.0 + 0.31.0 com.google.api.grpc grpc-google-cloud-life-sciences-v2beta - 0.30.0 + 0.31.0 com.google.api.grpc proto-google-cloud-life-sciences-v2beta - 0.30.0 + 0.31.0 diff --git a/java-life-sciences/google-cloud-life-sciences/pom.xml b/java-life-sciences/google-cloud-life-sciences/pom.xml index 2a17817d21c3..9218f2519437 100644 --- a/java-life-sciences/google-cloud-life-sciences/pom.xml +++ b/java-life-sciences/google-cloud-life-sciences/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-life-sciences - 0.30.0 + 0.31.0 jar Google Cloud Life Sciences Cloud Life Sciences is a suite of services and tools for managing, processing, and transforming life sciences data. com.google.cloud google-cloud-life-sciences-parent - 0.30.0 + 0.31.0 google-cloud-life-sciences diff --git a/java-life-sciences/grpc-google-cloud-life-sciences-v2beta/pom.xml b/java-life-sciences/grpc-google-cloud-life-sciences-v2beta/pom.xml index 47e10dd31e13..0e4edc139f74 100644 --- a/java-life-sciences/grpc-google-cloud-life-sciences-v2beta/pom.xml +++ b/java-life-sciences/grpc-google-cloud-life-sciences-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-life-sciences-v2beta - 0.30.0 + 0.31.0 grpc-google-cloud-life-sciences-v2beta GRPC library for google-cloud-life-sciences com.google.cloud google-cloud-life-sciences-parent - 0.30.0 + 0.31.0 diff --git a/java-life-sciences/pom.xml b/java-life-sciences/pom.xml index 1376dec57536..e16a80fa6d1b 100644 --- a/java-life-sciences/pom.xml +++ b/java-life-sciences/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-life-sciences-parent pom - 0.30.0 + 0.31.0 Google Cloud Life Sciences Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-life-sciences - 0.30.0 + 0.31.0 com.google.api.grpc grpc-google-cloud-life-sciences-v2beta - 0.30.0 + 0.31.0 com.google.api.grpc proto-google-cloud-life-sciences-v2beta - 0.30.0 + 0.31.0 diff --git a/java-life-sciences/proto-google-cloud-life-sciences-v2beta/pom.xml b/java-life-sciences/proto-google-cloud-life-sciences-v2beta/pom.xml index d6df969903e1..6e4b12a3442d 100644 --- a/java-life-sciences/proto-google-cloud-life-sciences-v2beta/pom.xml +++ b/java-life-sciences/proto-google-cloud-life-sciences-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-life-sciences-v2beta - 0.30.0 + 0.31.0 proto-google-cloud-life-sciences-v2beta Proto library for google-cloud-life-sciences com.google.cloud google-cloud-life-sciences-parent - 0.30.0 + 0.31.0 diff --git a/java-managed-identities/CHANGELOG.md b/java-managed-identities/CHANGELOG.md index e3bae3a6ecc2..64322f88478f 100644 --- a/java-managed-identities/CHANGELOG.md +++ b/java-managed-identities/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.26.0 (2023-10-11) ### Dependencies diff --git a/java-managed-identities/README.md b/java-managed-identities/README.md index 84d56f6af75c..5e1d01fa5459 100644 --- a/java-managed-identities/README.md +++ b/java-managed-identities/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-managed-identities - 1.26.0 + 1.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-managed-identities:1.26.0' +implementation 'com.google.cloud:google-cloud-managed-identities:1.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-managed-identities" % "1.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-managed-identities" % "1.27.0" ``` diff --git a/java-managed-identities/google-cloud-managed-identities-bom/pom.xml b/java-managed-identities/google-cloud-managed-identities-bom/pom.xml index e3edd14e22ec..e9621c52c695 100644 --- a/java-managed-identities/google-cloud-managed-identities-bom/pom.xml +++ b/java-managed-identities/google-cloud-managed-identities-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-managed-identities-bom - 1.26.0 + 1.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-managed-identities - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-managed-identities-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-managed-identities-v1 - 1.26.0 + 1.27.0 diff --git a/java-managed-identities/google-cloud-managed-identities/pom.xml b/java-managed-identities/google-cloud-managed-identities/pom.xml index a5a5752f3174..2788d03988aa 100644 --- a/java-managed-identities/google-cloud-managed-identities/pom.xml +++ b/java-managed-identities/google-cloud-managed-identities/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-managed-identities - 1.26.0 + 1.27.0 jar Google Managed Service for Microsoft Active Directory is a highly available, hardened Google Cloud service running actual Microsoft AD that enables you to manage authentication and authorization for your AD-dependent workloads, automate AD server maintenance and security configuration, and connect your on-premises AD domain to the cloud. com.google.cloud google-cloud-managed-identities-parent - 1.26.0 + 1.27.0 google-cloud-managed-identities diff --git a/java-managed-identities/grpc-google-cloud-managed-identities-v1/pom.xml b/java-managed-identities/grpc-google-cloud-managed-identities-v1/pom.xml index dc7b0693bfa7..2f437c822ab2 100644 --- a/java-managed-identities/grpc-google-cloud-managed-identities-v1/pom.xml +++ b/java-managed-identities/grpc-google-cloud-managed-identities-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-managed-identities-v1 - 1.26.0 + 1.27.0 grpc-google-cloud-managed-identities-v1 GRPC library for google-cloud-managed-identities com.google.cloud google-cloud-managed-identities-parent - 1.26.0 + 1.27.0 diff --git a/java-managed-identities/pom.xml b/java-managed-identities/pom.xml index 3cda758504d8..17da6223d869 100644 --- a/java-managed-identities/pom.xml +++ b/java-managed-identities/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-managed-identities-parent pom - 1.26.0 + 1.27.0 Google Managed Service for Microsoft Active Directory Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-managed-identities - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-managed-identities-v1 - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-managed-identities-v1 - 1.26.0 + 1.27.0 diff --git a/java-managed-identities/proto-google-cloud-managed-identities-v1/pom.xml b/java-managed-identities/proto-google-cloud-managed-identities-v1/pom.xml index 026747f33816..9f95914b9ffc 100644 --- a/java-managed-identities/proto-google-cloud-managed-identities-v1/pom.xml +++ b/java-managed-identities/proto-google-cloud-managed-identities-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-managed-identities-v1 - 1.26.0 + 1.27.0 proto-google-cloud-managed-identities-v1 Proto library for google-cloud-managed-identities com.google.cloud google-cloud-managed-identities-parent - 1.26.0 + 1.27.0 diff --git a/java-maps-addressvalidation/CHANGELOG.md b/java-maps-addressvalidation/CHANGELOG.md index e257d67b5fa9..dfcf28091d9c 100644 --- a/java-maps-addressvalidation/CHANGELOG.md +++ b/java-maps-addressvalidation/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.23.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.22.0 (2023-10-11) ### Dependencies diff --git a/java-maps-addressvalidation/README.md b/java-maps-addressvalidation/README.md index 39ad2efe25da..31d1b62a14eb 100644 --- a/java-maps-addressvalidation/README.md +++ b/java-maps-addressvalidation/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.maps google-maps-addressvalidation - 0.22.0 + 0.23.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.maps:google-maps-addressvalidation:0.22.0' +implementation 'com.google.maps:google-maps-addressvalidation:0.23.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.maps" % "google-maps-addressvalidation" % "0.22.0" +libraryDependencies += "com.google.maps" % "google-maps-addressvalidation" % "0.23.0" ``` diff --git a/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml b/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml index 09c99cb18dae..c29e0ded0c6b 100644 --- a/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml +++ b/java-maps-addressvalidation/google-maps-addressvalidation-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.maps google-maps-addressvalidation-bom - 0.22.0 + 0.23.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.maps google-maps-addressvalidation - 0.22.0 + 0.23.0 com.google.maps.api.grpc grpc-google-maps-addressvalidation-v1 - 0.22.0 + 0.23.0 com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 - 0.22.0 + 0.23.0 diff --git a/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml b/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml index b7c65b9a7626..d4ccd4355767 100644 --- a/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml +++ b/java-maps-addressvalidation/google-maps-addressvalidation/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.maps google-maps-addressvalidation - 0.22.0 + 0.23.0 jar Google Address Validation API Address Validation API The Address Validation API allows developers to verify the accuracy of addresses. Given an address, it returns information about the correctness of the components of the parsed address, a geocode, and a verdict on the deliverability of the parsed address. com.google.maps google-maps-addressvalidation-parent - 0.22.0 + 0.23.0 google-maps-addressvalidation diff --git a/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml b/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml index 66a5932debbe..590073c0f493 100644 --- a/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml +++ b/java-maps-addressvalidation/grpc-google-maps-addressvalidation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc grpc-google-maps-addressvalidation-v1 - 0.22.0 + 0.23.0 grpc-google-maps-addressvalidation-v1 GRPC library for google-maps-addressvalidation com.google.maps google-maps-addressvalidation-parent - 0.22.0 + 0.23.0 diff --git a/java-maps-addressvalidation/pom.xml b/java-maps-addressvalidation/pom.xml index 959d90a8a1b4..c3fb1c0fc4b7 100644 --- a/java-maps-addressvalidation/pom.xml +++ b/java-maps-addressvalidation/pom.xml @@ -4,7 +4,7 @@ com.google.maps google-maps-addressvalidation-parent pom - 0.22.0 + 0.23.0 Google Address Validation API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.maps google-maps-addressvalidation - 0.22.0 + 0.23.0 com.google.maps.api.grpc grpc-google-maps-addressvalidation-v1 - 0.22.0 + 0.23.0 com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 - 0.22.0 + 0.23.0 diff --git a/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml b/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml index 8e1cd3f8acd4..6f93f508e5c4 100644 --- a/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml +++ b/java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc proto-google-maps-addressvalidation-v1 - 0.22.0 + 0.23.0 proto-google-maps-addressvalidation-v1 Proto library for google-maps-addressvalidation com.google.maps google-maps-addressvalidation-parent - 0.22.0 + 0.23.0 diff --git a/java-maps-mapsplatformdatasets/CHANGELOG.md b/java-maps-mapsplatformdatasets/CHANGELOG.md index 2d3b9098865a..7d5c7258975e 100644 --- a/java-maps-mapsplatformdatasets/CHANGELOG.md +++ b/java-maps-mapsplatformdatasets/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.18.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.17.0 (2023-10-11) ### Dependencies diff --git a/java-maps-mapsplatformdatasets/README.md b/java-maps-mapsplatformdatasets/README.md index a0cb65b2b6d2..9fd821a1e23f 100644 --- a/java-maps-mapsplatformdatasets/README.md +++ b/java-maps-mapsplatformdatasets/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.maps google-maps-mapsplatformdatasets - 0.17.0 + 0.18.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.maps:google-maps-mapsplatformdatasets:0.17.0' +implementation 'com.google.maps:google-maps-mapsplatformdatasets:0.18.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.maps" % "google-maps-mapsplatformdatasets" % "0.17.0" +libraryDependencies += "com.google.maps" % "google-maps-mapsplatformdatasets" % "0.18.0" ``` diff --git a/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets-bom/pom.xml b/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets-bom/pom.xml index 6fc73cf45977..1e7e4b68efd8 100644 --- a/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets-bom/pom.xml +++ b/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.maps google-maps-mapsplatformdatasets-bom - 0.17.0 + 0.18.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.maps google-maps-mapsplatformdatasets - 0.17.0 + 0.18.0 com.google.maps.api.grpc grpc-google-maps-mapsplatformdatasets-v1alpha - 0.17.0 + 0.18.0 com.google.maps.api.grpc grpc-google-maps-mapsplatformdatasets-v1 - 0.17.0 + 0.18.0 com.google.maps.api.grpc proto-google-maps-mapsplatformdatasets-v1alpha - 0.17.0 + 0.18.0 com.google.maps.api.grpc proto-google-maps-mapsplatformdatasets-v1 - 0.17.0 + 0.18.0 diff --git a/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets/pom.xml b/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets/pom.xml index 9f6e0a7b992c..f1f7f5ac0bff 100644 --- a/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets/pom.xml +++ b/java-maps-mapsplatformdatasets/google-maps-mapsplatformdatasets/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.maps google-maps-mapsplatformdatasets - 0.17.0 + 0.18.0 jar Google Maps Platform Datasets API Maps Platform Datasets API The Maps Platform Datasets API enables developers to ingest geospatially-tied datasets @@ -11,7 +11,7 @@ com.google.maps google-maps-mapsplatformdatasets-parent - 0.17.0 + 0.18.0 google-maps-mapsplatformdatasets diff --git a/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1/pom.xml b/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1/pom.xml index 6a94d01f7f7f..906a5246f6b0 100644 --- a/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1/pom.xml +++ b/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc grpc-google-maps-mapsplatformdatasets-v1 - 0.17.0 + 0.18.0 grpc-google-maps-mapsplatformdatasets-v1 GRPC library for google-maps-mapsplatformdatasets com.google.maps google-maps-mapsplatformdatasets-parent - 0.17.0 + 0.18.0 diff --git a/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1alpha/pom.xml b/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1alpha/pom.xml index 34c220443a3a..48d8efa91eb9 100644 --- a/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1alpha/pom.xml +++ b/java-maps-mapsplatformdatasets/grpc-google-maps-mapsplatformdatasets-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc grpc-google-maps-mapsplatformdatasets-v1alpha - 0.17.0 + 0.18.0 grpc-google-maps-mapsplatformdatasets-v1alpha GRPC library for google-maps-mapsplatformdatasets com.google.maps google-maps-mapsplatformdatasets-parent - 0.17.0 + 0.18.0 diff --git a/java-maps-mapsplatformdatasets/pom.xml b/java-maps-mapsplatformdatasets/pom.xml index 80bd0049ba5a..3ad663538a0c 100644 --- a/java-maps-mapsplatformdatasets/pom.xml +++ b/java-maps-mapsplatformdatasets/pom.xml @@ -4,7 +4,7 @@ com.google.maps google-maps-mapsplatformdatasets-parent pom - 0.17.0 + 0.18.0 Google Maps Platform Datasets API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.maps google-maps-mapsplatformdatasets - 0.17.0 + 0.18.0 com.google.maps.api.grpc proto-google-maps-mapsplatformdatasets-v1 - 0.17.0 + 0.18.0 com.google.maps.api.grpc grpc-google-maps-mapsplatformdatasets-v1 - 0.17.0 + 0.18.0 com.google.maps.api.grpc grpc-google-maps-mapsplatformdatasets-v1alpha - 0.17.0 + 0.18.0 com.google.maps.api.grpc proto-google-maps-mapsplatformdatasets-v1alpha - 0.17.0 + 0.18.0 diff --git a/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1/pom.xml b/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1/pom.xml index d81ec869bc18..b5465cf6e6e5 100644 --- a/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1/pom.xml +++ b/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc proto-google-maps-mapsplatformdatasets-v1 - 0.17.0 + 0.18.0 proto-google-maps-mapsplatformdatasets-v1 Proto library for google-maps-mapsplatformdatasets com.google.maps google-maps-mapsplatformdatasets-parent - 0.17.0 + 0.18.0 diff --git a/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1alpha/pom.xml b/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1alpha/pom.xml index 8194ce512152..9a8bbb31fb73 100644 --- a/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1alpha/pom.xml +++ b/java-maps-mapsplatformdatasets/proto-google-maps-mapsplatformdatasets-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc proto-google-maps-mapsplatformdatasets-v1alpha - 0.17.0 + 0.18.0 proto-google-maps-mapsplatformdatasets-v1alpha Proto library for google-maps-mapsplatformdatasets com.google.maps google-maps-mapsplatformdatasets-parent - 0.17.0 + 0.18.0 diff --git a/java-maps-routing/CHANGELOG.md b/java-maps-routing/CHANGELOG.md index 0ba1a977935b..1e55339b5ec6 100644 --- a/java-maps-routing/CHANGELOG.md +++ b/java-maps-routing/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.14.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.13.0 (2023-10-11) ### Dependencies diff --git a/java-maps-routing/README.md b/java-maps-routing/README.md index 66c9965b0397..46eb10c66e92 100644 --- a/java-maps-routing/README.md +++ b/java-maps-routing/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.maps google-maps-routing - 1.13.0 + 1.14.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.maps:google-maps-routing:1.13.0' +implementation 'com.google.maps:google-maps-routing:1.14.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.maps" % "google-maps-routing" % "1.13.0" +libraryDependencies += "com.google.maps" % "google-maps-routing" % "1.14.0" ``` diff --git a/java-maps-routing/google-maps-routing-bom/pom.xml b/java-maps-routing/google-maps-routing-bom/pom.xml index 46d8e7a59802..3a060471c1cd 100644 --- a/java-maps-routing/google-maps-routing-bom/pom.xml +++ b/java-maps-routing/google-maps-routing-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.maps google-maps-routing-bom - 1.13.0 + 1.14.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.maps google-maps-routing - 1.13.0 + 1.14.0 com.google.maps.api.grpc grpc-google-maps-routing-v2 - 1.13.0 + 1.14.0 com.google.maps.api.grpc proto-google-maps-routing-v2 - 1.13.0 + 1.14.0 diff --git a/java-maps-routing/google-maps-routing/pom.xml b/java-maps-routing/google-maps-routing/pom.xml index 3997ac0d7afb..cbf73bf41a85 100644 --- a/java-maps-routing/google-maps-routing/pom.xml +++ b/java-maps-routing/google-maps-routing/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.maps google-maps-routing - 1.13.0 + 1.14.0 jar Google Routes API Routes API Routes API is the next generation, performance optimized version of the existing Directions API and Distance Matrix API. It helps you find the ideal route from A to Z, calculates ETAs and distances for matrices of origin and destination locations, and also offers new features. com.google.maps google-maps-routing-parent - 1.13.0 + 1.14.0 google-maps-routing diff --git a/java-maps-routing/grpc-google-maps-routing-v2/pom.xml b/java-maps-routing/grpc-google-maps-routing-v2/pom.xml index 5a9ce6b2b611..4a5bbdece235 100644 --- a/java-maps-routing/grpc-google-maps-routing-v2/pom.xml +++ b/java-maps-routing/grpc-google-maps-routing-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc grpc-google-maps-routing-v2 - 1.13.0 + 1.14.0 grpc-google-maps-routing-v2 GRPC library for google-maps-routing com.google.maps google-maps-routing-parent - 1.13.0 + 1.14.0 diff --git a/java-maps-routing/pom.xml b/java-maps-routing/pom.xml index 2f750df197e7..a3948b83849b 100644 --- a/java-maps-routing/pom.xml +++ b/java-maps-routing/pom.xml @@ -4,7 +4,7 @@ com.google.maps google-maps-routing-parent pom - 1.13.0 + 1.14.0 Google Routes API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.maps google-maps-routing - 1.13.0 + 1.14.0 com.google.maps.api.grpc grpc-google-maps-routing-v2 - 1.13.0 + 1.14.0 com.google.maps.api.grpc proto-google-maps-routing-v2 - 1.13.0 + 1.14.0 diff --git a/java-maps-routing/proto-google-maps-routing-v2/pom.xml b/java-maps-routing/proto-google-maps-routing-v2/pom.xml index aa4cc1022198..afd1066581d5 100644 --- a/java-maps-routing/proto-google-maps-routing-v2/pom.xml +++ b/java-maps-routing/proto-google-maps-routing-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.maps.api.grpc proto-google-maps-routing-v2 - 1.13.0 + 1.14.0 proto-google-maps-routing-v2 Proto library for google-maps-routing com.google.maps google-maps-routing-parent - 1.13.0 + 1.14.0 diff --git a/java-mediatranslation/CHANGELOG.md b/java-mediatranslation/CHANGELOG.md index 92f629a86991..3d105ffaea70 100644 --- a/java-mediatranslation/CHANGELOG.md +++ b/java-mediatranslation/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.35.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.34.0 (2023-10-11) ### Dependencies diff --git a/java-mediatranslation/README.md b/java-mediatranslation/README.md index babda99c2224..cd7bc850aab3 100644 --- a/java-mediatranslation/README.md +++ b/java-mediatranslation/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-mediatranslation - 0.34.0 + 0.35.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-mediatranslation:0.34.0' +implementation 'com.google.cloud:google-cloud-mediatranslation:0.35.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-mediatranslation" % "0.34.0" +libraryDependencies += "com.google.cloud" % "google-cloud-mediatranslation" % "0.35.0" ``` diff --git a/java-mediatranslation/google-cloud-mediatranslation-bom/pom.xml b/java-mediatranslation/google-cloud-mediatranslation-bom/pom.xml index bc29e817e305..e125ac82b92b 100644 --- a/java-mediatranslation/google-cloud-mediatranslation-bom/pom.xml +++ b/java-mediatranslation/google-cloud-mediatranslation-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-mediatranslation-bom - 0.34.0 + 0.35.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-mediatranslation - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-mediatranslation-v1beta1 - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-mediatranslation-v1beta1 - 0.34.0 + 0.35.0 diff --git a/java-mediatranslation/google-cloud-mediatranslation/pom.xml b/java-mediatranslation/google-cloud-mediatranslation/pom.xml index efc7a2e61fe8..f1e6360b465c 100644 --- a/java-mediatranslation/google-cloud-mediatranslation/pom.xml +++ b/java-mediatranslation/google-cloud-mediatranslation/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-mediatranslation - 0.34.0 + 0.35.0 jar Google Media Translation API provides enterprise quality translation from/to various media types. com.google.cloud google-cloud-mediatranslation-parent - 0.34.0 + 0.35.0 google-cloud-mediatranslation diff --git a/java-mediatranslation/grpc-google-cloud-mediatranslation-v1beta1/pom.xml b/java-mediatranslation/grpc-google-cloud-mediatranslation-v1beta1/pom.xml index 93cdc7bfd370..64456505cd68 100644 --- a/java-mediatranslation/grpc-google-cloud-mediatranslation-v1beta1/pom.xml +++ b/java-mediatranslation/grpc-google-cloud-mediatranslation-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-mediatranslation-v1beta1 - 0.34.0 + 0.35.0 grpc-google-cloud-mediatranslation-v1beta1 GRPC library for grpc-google-cloud-mediatranslation-v1beta1 com.google.cloud google-cloud-mediatranslation-parent - 0.34.0 + 0.35.0 diff --git a/java-mediatranslation/pom.xml b/java-mediatranslation/pom.xml index 899425a7fc7a..9043f79d18b1 100644 --- a/java-mediatranslation/pom.xml +++ b/java-mediatranslation/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-mediatranslation-parent pom - 0.34.0 + 0.35.0 Google Media Translation API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-mediatranslation - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-mediatranslation-v1beta1 - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-mediatranslation-v1beta1 - 0.34.0 + 0.35.0 diff --git a/java-mediatranslation/proto-google-cloud-mediatranslation-v1beta1/pom.xml b/java-mediatranslation/proto-google-cloud-mediatranslation-v1beta1/pom.xml index 1cc90d6d92d3..0f60a6ace7b8 100644 --- a/java-mediatranslation/proto-google-cloud-mediatranslation-v1beta1/pom.xml +++ b/java-mediatranslation/proto-google-cloud-mediatranslation-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-mediatranslation-v1beta1 - 0.34.0 + 0.35.0 proto-google-cloud-mediatranslation-v1beta1 PROTO library for proto-google-cloud-mediatranslation-v1beta1 com.google.cloud google-cloud-mediatranslation-parent - 0.34.0 + 0.35.0 diff --git a/java-memcache/CHANGELOG.md b/java-memcache/CHANGELOG.md index 19a6736548ed..3c19312ff145 100644 --- a/java-memcache/CHANGELOG.md +++ b/java-memcache/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-memcache/README.md b/java-memcache/README.md index 5207f6b6f01f..242946351580 100644 --- a/java-memcache/README.md +++ b/java-memcache/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-memcache - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-memcache:2.28.0' +implementation 'com.google.cloud:google-cloud-memcache:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-memcache" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-memcache" % "2.29.0" ``` diff --git a/java-memcache/google-cloud-memcache-bom/pom.xml b/java-memcache/google-cloud-memcache-bom/pom.xml index e529a55ab063..9e62a99b1358 100644 --- a/java-memcache/google-cloud-memcache-bom/pom.xml +++ b/java-memcache/google-cloud-memcache-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-memcache-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-memcache - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-memcache-v1beta2 - 0.35.0 + 0.36.0 com.google.api.grpc grpc-google-cloud-memcache-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-memcache-v1beta2 - 0.35.0 + 0.36.0 com.google.api.grpc proto-google-cloud-memcache-v1 - 2.28.0 + 2.29.0 diff --git a/java-memcache/google-cloud-memcache/pom.xml b/java-memcache/google-cloud-memcache/pom.xml index 0834109861c1..3be85ca7b83e 100644 --- a/java-memcache/google-cloud-memcache/pom.xml +++ b/java-memcache/google-cloud-memcache/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-memcache - 2.28.0 + 2.29.0 jar Google Cloud Memcache Java idiomatic client for Google Cloud memcache com.google.cloud google-cloud-memcache-parent - 2.28.0 + 2.29.0 google-cloud-memcache diff --git a/java-memcache/grpc-google-cloud-memcache-v1/pom.xml b/java-memcache/grpc-google-cloud-memcache-v1/pom.xml index bcc8710f2bda..836b83dd1c54 100644 --- a/java-memcache/grpc-google-cloud-memcache-v1/pom.xml +++ b/java-memcache/grpc-google-cloud-memcache-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-memcache-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-memcache-v1 GRPC library for grpc-google-cloud-memcache-v1 com.google.cloud google-cloud-memcache-parent - 2.28.0 + 2.29.0 diff --git a/java-memcache/grpc-google-cloud-memcache-v1beta2/pom.xml b/java-memcache/grpc-google-cloud-memcache-v1beta2/pom.xml index f9bb0ea3d797..e0e7808ddbe3 100644 --- a/java-memcache/grpc-google-cloud-memcache-v1beta2/pom.xml +++ b/java-memcache/grpc-google-cloud-memcache-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-memcache-v1beta2 - 0.35.0 + 0.36.0 grpc-google-cloud-memcache-v1beta2 GRPC library for grpc-google-cloud-memcache-v1beta2 com.google.cloud google-cloud-memcache-parent - 2.28.0 + 2.29.0 diff --git a/java-memcache/pom.xml b/java-memcache/pom.xml index 6495360c6854..343dc2bb27c8 100644 --- a/java-memcache/pom.xml +++ b/java-memcache/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-memcache-parent pom - 2.28.0 + 2.29.0 Google Cloud Memcache Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-memcache-v1beta2 - 0.35.0 + 0.36.0 com.google.api.grpc grpc-google-cloud-memcache-v1beta2 - 0.35.0 + 0.36.0 com.google.api.grpc proto-google-cloud-memcache-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-memcache-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-memcache - 2.28.0 + 2.29.0 diff --git a/java-memcache/proto-google-cloud-memcache-v1/pom.xml b/java-memcache/proto-google-cloud-memcache-v1/pom.xml index 86ed987312c7..8d8edad9b9a7 100644 --- a/java-memcache/proto-google-cloud-memcache-v1/pom.xml +++ b/java-memcache/proto-google-cloud-memcache-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-memcache-v1 - 2.28.0 + 2.29.0 proto-google-cloud-memcache-v1 PROTO library for proto-google-cloud-memcache-v1 com.google.cloud google-cloud-memcache-parent - 2.28.0 + 2.29.0 diff --git a/java-memcache/proto-google-cloud-memcache-v1beta2/pom.xml b/java-memcache/proto-google-cloud-memcache-v1beta2/pom.xml index cb4a08961880..a5c0896ff5fe 100644 --- a/java-memcache/proto-google-cloud-memcache-v1beta2/pom.xml +++ b/java-memcache/proto-google-cloud-memcache-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-memcache-v1beta2 - 0.35.0 + 0.36.0 proto-google-cloud-memcache-v1beta2 PROTO library for proto-google-cloud-memcache-v1beta2 com.google.cloud google-cloud-memcache-parent - 2.28.0 + 2.29.0 diff --git a/java-migrationcenter/CHANGELOG.md b/java-migrationcenter/CHANGELOG.md index 526b38909266..1c623fbce6d9 100644 --- a/java-migrationcenter/CHANGELOG.md +++ b/java-migrationcenter/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.11.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.10.0 (2023-10-11) ### Dependencies diff --git a/java-migrationcenter/README.md b/java-migrationcenter/README.md index f7eccb76c978..bc1487258ce7 100644 --- a/java-migrationcenter/README.md +++ b/java-migrationcenter/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-migrationcenter - 0.10.0 + 0.11.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-migrationcenter:0.10.0' +implementation 'com.google.cloud:google-cloud-migrationcenter:0.11.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-migrationcenter" % "0.10.0" +libraryDependencies += "com.google.cloud" % "google-cloud-migrationcenter" % "0.11.0" ``` diff --git a/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml index 29ed3c691626..1a3d730e3926 100644 --- a/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml +++ b/java-migrationcenter/google-cloud-migrationcenter-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-migrationcenter-bom - 0.10.0 + 0.11.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-migrationcenter - 0.10.0 + 0.11.0 com.google.api.grpc grpc-google-cloud-migrationcenter-v1 - 0.10.0 + 0.11.0 com.google.api.grpc proto-google-cloud-migrationcenter-v1 - 0.10.0 + 0.11.0 diff --git a/java-migrationcenter/google-cloud-migrationcenter/pom.xml b/java-migrationcenter/google-cloud-migrationcenter/pom.xml index a7e2bf43ea6c..2df176afe9af 100644 --- a/java-migrationcenter/google-cloud-migrationcenter/pom.xml +++ b/java-migrationcenter/google-cloud-migrationcenter/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-migrationcenter - 0.10.0 + 0.11.0 jar Google Migration Center API Migration Center API Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud com.google.cloud google-cloud-migrationcenter-parent - 0.10.0 + 0.11.0 google-cloud-migrationcenter diff --git a/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml b/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml index 64e95602d6ab..ad41940e6700 100644 --- a/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml +++ b/java-migrationcenter/grpc-google-cloud-migrationcenter-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-migrationcenter-v1 - 0.10.0 + 0.11.0 grpc-google-cloud-migrationcenter-v1 GRPC library for google-cloud-migrationcenter com.google.cloud google-cloud-migrationcenter-parent - 0.10.0 + 0.11.0 diff --git a/java-migrationcenter/pom.xml b/java-migrationcenter/pom.xml index 46695fc3783f..abbbae50baa6 100644 --- a/java-migrationcenter/pom.xml +++ b/java-migrationcenter/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-migrationcenter-parent pom - 0.10.0 + 0.11.0 Google Migration Center API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-migrationcenter - 0.10.0 + 0.11.0 com.google.api.grpc grpc-google-cloud-migrationcenter-v1 - 0.10.0 + 0.11.0 com.google.api.grpc proto-google-cloud-migrationcenter-v1 - 0.10.0 + 0.11.0 diff --git a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml index 6c4309e339f6..42cc5644eb83 100644 --- a/java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml +++ b/java-migrationcenter/proto-google-cloud-migrationcenter-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-migrationcenter-v1 - 0.10.0 + 0.11.0 proto-google-cloud-migrationcenter-v1 Proto library for google-cloud-migrationcenter com.google.cloud google-cloud-migrationcenter-parent - 0.10.0 + 0.11.0 diff --git a/java-monitoring-dashboards/CHANGELOG.md b/java-monitoring-dashboards/CHANGELOG.md index 58d6249fed31..c65aedc686fc 100644 --- a/java-monitoring-dashboards/CHANGELOG.md +++ b/java-monitoring-dashboards/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.30.0 (2023-10-11) ### Dependencies diff --git a/java-monitoring-dashboards/README.md b/java-monitoring-dashboards/README.md index ccf3afc20c1b..d90e72fbf36d 100644 --- a/java-monitoring-dashboards/README.md +++ b/java-monitoring-dashboards/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-monitoring-dashboard - 2.30.0 + 2.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-monitoring-dashboard:2.30.0' +implementation 'com.google.cloud:google-cloud-monitoring-dashboard:2.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-monitoring-dashboard" % "2.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-monitoring-dashboard" % "2.31.0" ``` diff --git a/java-monitoring-dashboards/google-cloud-monitoring-dashboard-bom/pom.xml b/java-monitoring-dashboards/google-cloud-monitoring-dashboard-bom/pom.xml index 393dd7b93043..b3778e6bd8ae 100644 --- a/java-monitoring-dashboards/google-cloud-monitoring-dashboard-bom/pom.xml +++ b/java-monitoring-dashboards/google-cloud-monitoring-dashboard-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-monitoring-dashboard-bom - 2.30.0 + 2.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-monitoring-dashboard - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-monitoring-dashboard-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-monitoring-dashboard-v1 - 2.30.0 + 2.31.0 diff --git a/java-monitoring-dashboards/google-cloud-monitoring-dashboard/pom.xml b/java-monitoring-dashboards/google-cloud-monitoring-dashboard/pom.xml index b86fb47cb554..618a2831bb45 100644 --- a/java-monitoring-dashboards/google-cloud-monitoring-dashboard/pom.xml +++ b/java-monitoring-dashboards/google-cloud-monitoring-dashboard/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-monitoring-dashboard - 2.30.0 + 2.31.0 jar Google Cloud Monitoring Dashboard Java idiomatic client for Google Cloud Monitoring Dashboard com.google.cloud google-cloud-monitoring-dashboard-parent - 2.30.0 + 2.31.0 google-cloud-monitoring-dashboard diff --git a/java-monitoring-dashboards/grpc-google-cloud-monitoring-dashboard-v1/pom.xml b/java-monitoring-dashboards/grpc-google-cloud-monitoring-dashboard-v1/pom.xml index 45ade0724612..814086a23f4f 100644 --- a/java-monitoring-dashboards/grpc-google-cloud-monitoring-dashboard-v1/pom.xml +++ b/java-monitoring-dashboards/grpc-google-cloud-monitoring-dashboard-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-monitoring-dashboard-v1 - 2.30.0 + 2.31.0 grpc-google-cloud-monitoring-dashboard-v1 GRPC library for grpc-google-cloud-monitoring-dashboard-v1 com.google.cloud google-cloud-monitoring-dashboard-parent - 2.30.0 + 2.31.0 diff --git a/java-monitoring-dashboards/pom.xml b/java-monitoring-dashboards/pom.xml index be26cd2b2c5f..357308427f64 100644 --- a/java-monitoring-dashboards/pom.xml +++ b/java-monitoring-dashboards/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-monitoring-dashboard-parent pom - 2.30.0 + 2.31.0 Google Cloud Monitoring Dashboard Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-monitoring-dashboard-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-monitoring-dashboard-v1 - 2.30.0 + 2.31.0 com.google.cloud google-cloud-monitoring-dashboard - 2.30.0 + 2.31.0 diff --git a/java-monitoring-dashboards/proto-google-cloud-monitoring-dashboard-v1/pom.xml b/java-monitoring-dashboards/proto-google-cloud-monitoring-dashboard-v1/pom.xml index a414f8ddd066..d5af0da36bf5 100644 --- a/java-monitoring-dashboards/proto-google-cloud-monitoring-dashboard-v1/pom.xml +++ b/java-monitoring-dashboards/proto-google-cloud-monitoring-dashboard-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-monitoring-dashboard-v1 - 2.30.0 + 2.31.0 proto-google-cloud-monitoring-dashboard-v1 PROTO library for proto-google-cloud-monitoring-dashboard-v1 com.google.cloud google-cloud-monitoring-dashboard-parent - 2.30.0 + 2.31.0 diff --git a/java-monitoring-metricsscope/CHANGELOG.md b/java-monitoring-metricsscope/CHANGELOG.md index e257d67b5fa9..dfcf28091d9c 100644 --- a/java-monitoring-metricsscope/CHANGELOG.md +++ b/java-monitoring-metricsscope/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.23.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.22.0 (2023-10-11) ### Dependencies diff --git a/java-monitoring-metricsscope/README.md b/java-monitoring-metricsscope/README.md index 882ace8c0888..68bb8cbda15a 100644 --- a/java-monitoring-metricsscope/README.md +++ b/java-monitoring-metricsscope/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-monitoring-metricsscope - 0.22.0 + 0.23.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-monitoring-metricsscope:0.22.0' +implementation 'com.google.cloud:google-cloud-monitoring-metricsscope:0.23.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-monitoring-metricsscope" % "0.22.0" +libraryDependencies += "com.google.cloud" % "google-cloud-monitoring-metricsscope" % "0.23.0" ``` diff --git a/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope-bom/pom.xml b/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope-bom/pom.xml index 27de6fafc9cf..0333124c224b 100644 --- a/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope-bom/pom.xml +++ b/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-monitoring-metricsscope-bom - 0.22.0 + 0.23.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-monitoring-metricsscope - 0.22.0 + 0.23.0 com.google.api.grpc grpc-google-cloud-monitoring-metricsscope-v1 - 0.22.0 + 0.23.0 com.google.api.grpc proto-google-cloud-monitoring-metricsscope-v1 - 0.22.0 + 0.23.0 diff --git a/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope/pom.xml b/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope/pom.xml index 4bcfcda10b20..c00a628f0210 100644 --- a/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope/pom.xml +++ b/java-monitoring-metricsscope/google-cloud-monitoring-metricsscope/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-monitoring-metricsscope - 0.22.0 + 0.23.0 jar Google Monitoring Metrics Scopes Monitoring Metrics Scopes The metrics scope defines the set of Google Cloud projects whose metrics the current Google Cloud project can access. com.google.cloud google-cloud-monitoring-metricsscope-parent - 0.22.0 + 0.23.0 google-cloud-monitoring-metricsscope diff --git a/java-monitoring-metricsscope/grpc-google-cloud-monitoring-metricsscope-v1/pom.xml b/java-monitoring-metricsscope/grpc-google-cloud-monitoring-metricsscope-v1/pom.xml index 4bda39a9a0db..a1a33bf58c52 100644 --- a/java-monitoring-metricsscope/grpc-google-cloud-monitoring-metricsscope-v1/pom.xml +++ b/java-monitoring-metricsscope/grpc-google-cloud-monitoring-metricsscope-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-monitoring-metricsscope-v1 - 0.22.0 + 0.23.0 grpc-google-cloud-monitoring-metricsscope-v1 GRPC library for google-cloud-monitoring-metricsscope com.google.cloud google-cloud-monitoring-metricsscope-parent - 0.22.0 + 0.23.0 diff --git a/java-monitoring-metricsscope/pom.xml b/java-monitoring-metricsscope/pom.xml index 7c52de60f5c1..999f93eddc9e 100644 --- a/java-monitoring-metricsscope/pom.xml +++ b/java-monitoring-metricsscope/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-monitoring-metricsscope-parent pom - 0.22.0 + 0.23.0 Google Monitoring Metrics Scopes Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-monitoring-metricsscope - 0.22.0 + 0.23.0 com.google.api.grpc grpc-google-cloud-monitoring-metricsscope-v1 - 0.22.0 + 0.23.0 com.google.api.grpc proto-google-cloud-monitoring-metricsscope-v1 - 0.22.0 + 0.23.0 diff --git a/java-monitoring-metricsscope/proto-google-cloud-monitoring-metricsscope-v1/pom.xml b/java-monitoring-metricsscope/proto-google-cloud-monitoring-metricsscope-v1/pom.xml index 328db6b13ce8..8adbc2bec8b5 100644 --- a/java-monitoring-metricsscope/proto-google-cloud-monitoring-metricsscope-v1/pom.xml +++ b/java-monitoring-metricsscope/proto-google-cloud-monitoring-metricsscope-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-monitoring-metricsscope-v1 - 0.22.0 + 0.23.0 proto-google-cloud-monitoring-metricsscope-v1 Proto library for google-cloud-monitoring-metricsscope com.google.cloud google-cloud-monitoring-metricsscope-parent - 0.22.0 + 0.23.0 diff --git a/java-monitoring/CHANGELOG.md b/java-monitoring/CHANGELOG.md index 5ec0c9897474..712592106ea0 100644 --- a/java-monitoring/CHANGELOG.md +++ b/java-monitoring/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.29.0 (2023-10-11) ### Dependencies diff --git a/java-monitoring/README.md b/java-monitoring/README.md index 592f4f5d1957..ed857933f753 100644 --- a/java-monitoring/README.md +++ b/java-monitoring/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-monitoring - 3.29.0 + 3.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-monitoring:3.29.0' +implementation 'com.google.cloud:google-cloud-monitoring:3.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "3.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "3.30.0" ``` diff --git a/java-monitoring/google-cloud-monitoring-bom/pom.xml b/java-monitoring/google-cloud-monitoring-bom/pom.xml index 2e01fd06cdb8..bbc38deb7175 100644 --- a/java-monitoring/google-cloud-monitoring-bom/pom.xml +++ b/java-monitoring/google-cloud-monitoring-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-monitoring-bom - 3.29.0 + 3.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-monitoring - 3.29.0 + 3.30.0 com.google.api.grpc grpc-google-cloud-monitoring-v3 - 3.29.0 + 3.30.0 com.google.api.grpc proto-google-cloud-monitoring-v3 - 3.29.0 + 3.30.0 diff --git a/java-monitoring/google-cloud-monitoring/pom.xml b/java-monitoring/google-cloud-monitoring/pom.xml index c22f55ade357..0b3a10dd92b8 100644 --- a/java-monitoring/google-cloud-monitoring/pom.xml +++ b/java-monitoring/google-cloud-monitoring/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-monitoring - 3.29.0 + 3.30.0 jar Google Cloud Monitoring Java idiomatic client for Stackdriver Monitoring com.google.cloud google-cloud-monitoring-parent - 3.29.0 + 3.30.0 google-cloud-monitoring diff --git a/java-monitoring/grpc-google-cloud-monitoring-v3/pom.xml b/java-monitoring/grpc-google-cloud-monitoring-v3/pom.xml index f74e7400e22a..d29035575ab7 100644 --- a/java-monitoring/grpc-google-cloud-monitoring-v3/pom.xml +++ b/java-monitoring/grpc-google-cloud-monitoring-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-monitoring-v3 - 3.29.0 + 3.30.0 grpc-google-cloud-monitoring-v3 GRPC library for grpc-google-cloud-monitoring-v3 com.google.cloud google-cloud-monitoring-parent - 3.29.0 + 3.30.0 diff --git a/java-monitoring/pom.xml b/java-monitoring/pom.xml index 8267feb7a125..716cee65131a 100644 --- a/java-monitoring/pom.xml +++ b/java-monitoring/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-monitoring-parent pom - 3.29.0 + 3.30.0 Google Cloud Monitoring Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-monitoring-v3 - 3.29.0 + 3.30.0 com.google.api.grpc grpc-google-cloud-monitoring-v3 - 3.29.0 + 3.30.0 com.google.cloud google-cloud-monitoring - 3.29.0 + 3.30.0 diff --git a/java-monitoring/proto-google-cloud-monitoring-v3/pom.xml b/java-monitoring/proto-google-cloud-monitoring-v3/pom.xml index 1933d661a050..1440d2d94768 100644 --- a/java-monitoring/proto-google-cloud-monitoring-v3/pom.xml +++ b/java-monitoring/proto-google-cloud-monitoring-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-monitoring-v3 - 3.29.0 + 3.30.0 proto-google-cloud-monitoring-v3 PROTO library for proto-google-cloud-monitoring-v3 com.google.cloud google-cloud-monitoring-parent - 3.29.0 + 3.30.0 diff --git a/java-netapp/CHANGELOG.md b/java-netapp/CHANGELOG.md index 3cef69111138..b7a3b66b4239 100644 --- a/java-netapp/CHANGELOG.md +++ b/java-netapp/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.8.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.7.0 (2023-10-11) ### Dependencies diff --git a/java-netapp/README.md b/java-netapp/README.md index c3a13d866636..f9a210e23244 100644 --- a/java-netapp/README.md +++ b/java-netapp/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-netapp - 0.7.0 + 0.8.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-netapp:0.7.0' +implementation 'com.google.cloud:google-cloud-netapp:0.8.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-netapp" % "0.7.0" +libraryDependencies += "com.google.cloud" % "google-cloud-netapp" % "0.8.0" ``` diff --git a/java-netapp/google-cloud-netapp-bom/pom.xml b/java-netapp/google-cloud-netapp-bom/pom.xml index 39d2fa65e4cb..e3b0912f06f2 100644 --- a/java-netapp/google-cloud-netapp-bom/pom.xml +++ b/java-netapp/google-cloud-netapp-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-netapp-bom - 0.7.0 + 0.8.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-netapp - 0.7.0 + 0.8.0 com.google.api.grpc grpc-google-cloud-netapp-v1 - 0.7.0 + 0.8.0 com.google.api.grpc proto-google-cloud-netapp-v1 - 0.7.0 + 0.8.0 diff --git a/java-netapp/google-cloud-netapp/pom.xml b/java-netapp/google-cloud-netapp/pom.xml index 40fd254b4756..453528a6143a 100644 --- a/java-netapp/google-cloud-netapp/pom.xml +++ b/java-netapp/google-cloud-netapp/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-netapp - 0.7.0 + 0.8.0 jar Google NetApp API NetApp API Google Cloud NetApp Volumes is a fully-managed, cloud-based data storage service that provides advanced data management capabilities and highly scalable performance with global availability. com.google.cloud google-cloud-netapp-parent - 0.7.0 + 0.8.0 google-cloud-netapp diff --git a/java-netapp/grpc-google-cloud-netapp-v1/pom.xml b/java-netapp/grpc-google-cloud-netapp-v1/pom.xml index 62c16291d655..4f3a6f30a34b 100644 --- a/java-netapp/grpc-google-cloud-netapp-v1/pom.xml +++ b/java-netapp/grpc-google-cloud-netapp-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-netapp-v1 - 0.7.0 + 0.8.0 grpc-google-cloud-netapp-v1 GRPC library for google-cloud-netapp com.google.cloud google-cloud-netapp-parent - 0.7.0 + 0.8.0 diff --git a/java-netapp/pom.xml b/java-netapp/pom.xml index 57e269ced74f..ac1d33aaaf0a 100644 --- a/java-netapp/pom.xml +++ b/java-netapp/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-netapp-parent pom - 0.7.0 + 0.8.0 Google NetApp API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-netapp - 0.7.0 + 0.8.0 com.google.api.grpc proto-google-cloud-netapp-v1 - 0.7.0 + 0.8.0 com.google.api.grpc grpc-google-cloud-netapp-v1 - 0.7.0 + 0.8.0 diff --git a/java-netapp/proto-google-cloud-netapp-v1/pom.xml b/java-netapp/proto-google-cloud-netapp-v1/pom.xml index a45f4445dae2..d14abd3b0a18 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/pom.xml +++ b/java-netapp/proto-google-cloud-netapp-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-netapp-v1 - 0.7.0 + 0.8.0 proto-google-cloud-netapp-v1 Proto library for google-cloud-netapp com.google.cloud google-cloud-netapp-parent - 0.7.0 + 0.8.0 diff --git a/java-network-management/CHANGELOG.md b/java-network-management/CHANGELOG.md index 00cfd5c7f29b..cc4b336de64b 100644 --- a/java-network-management/CHANGELOG.md +++ b/java-network-management/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.29.0 (2023-10-11) ### Dependencies diff --git a/java-network-management/README.md b/java-network-management/README.md index 75758ef0999a..939804ae8fed 100644 --- a/java-network-management/README.md +++ b/java-network-management/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-network-management - 1.29.0 + 1.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-network-management:1.29.0' +implementation 'com.google.cloud:google-cloud-network-management:1.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-network-management" % "1.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-network-management" % "1.30.0" ``` diff --git a/java-network-management/google-cloud-network-management-bom/pom.xml b/java-network-management/google-cloud-network-management-bom/pom.xml index 249990a1b94f..28722362b859 100644 --- a/java-network-management/google-cloud-network-management-bom/pom.xml +++ b/java-network-management/google-cloud-network-management-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-network-management-bom - 1.29.0 + 1.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-network-management - 1.29.0 + 1.30.0 com.google.api.grpc grpc-google-cloud-network-management-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-network-management-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-cloud-network-management-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-network-management-v1 - 1.29.0 + 1.30.0 diff --git a/java-network-management/google-cloud-network-management/pom.xml b/java-network-management/google-cloud-network-management/pom.xml index be0f05d9f6e8..7efc7f76ab84 100644 --- a/java-network-management/google-cloud-network-management/pom.xml +++ b/java-network-management/google-cloud-network-management/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-network-management - 1.29.0 + 1.30.0 jar Google Network Management API Network Management API provides a collection of network performance monitoring and diagnostic capabilities. com.google.cloud google-cloud-network-management-parent - 1.29.0 + 1.30.0 google-cloud-network-management diff --git a/java-network-management/grpc-google-cloud-network-management-v1/pom.xml b/java-network-management/grpc-google-cloud-network-management-v1/pom.xml index 983a65c3f297..6b7e069c4775 100644 --- a/java-network-management/grpc-google-cloud-network-management-v1/pom.xml +++ b/java-network-management/grpc-google-cloud-network-management-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-network-management-v1 - 1.29.0 + 1.30.0 grpc-google-cloud-network-management-v1 GRPC library for google-cloud-network-management com.google.cloud google-cloud-network-management-parent - 1.29.0 + 1.30.0 diff --git a/java-network-management/grpc-google-cloud-network-management-v1beta1/pom.xml b/java-network-management/grpc-google-cloud-network-management-v1beta1/pom.xml index 906163df3db5..dfcdb806c2ae 100644 --- a/java-network-management/grpc-google-cloud-network-management-v1beta1/pom.xml +++ b/java-network-management/grpc-google-cloud-network-management-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-network-management-v1beta1 - 0.31.0 + 0.32.0 grpc-google-cloud-network-management-v1beta1 GRPC library for google-cloud-network-management com.google.cloud google-cloud-network-management-parent - 1.29.0 + 1.30.0 diff --git a/java-network-management/pom.xml b/java-network-management/pom.xml index 66861551e3ad..910638f10b93 100644 --- a/java-network-management/pom.xml +++ b/java-network-management/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-network-management-parent pom - 1.29.0 + 1.30.0 Google Network Management API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-network-management - 1.29.0 + 1.30.0 com.google.api.grpc grpc-google-cloud-network-management-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-network-management-v1 - 1.29.0 + 1.30.0 com.google.api.grpc proto-google-cloud-network-management-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-network-management-v1 - 1.29.0 + 1.30.0 diff --git a/java-network-management/proto-google-cloud-network-management-v1/pom.xml b/java-network-management/proto-google-cloud-network-management-v1/pom.xml index ed1a9c0cbf76..bba0aeb0b047 100644 --- a/java-network-management/proto-google-cloud-network-management-v1/pom.xml +++ b/java-network-management/proto-google-cloud-network-management-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-network-management-v1 - 1.29.0 + 1.30.0 proto-google-cloud-network-management-v1 Proto library for google-cloud-network-management com.google.cloud google-cloud-network-management-parent - 1.29.0 + 1.30.0 diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/pom.xml b/java-network-management/proto-google-cloud-network-management-v1beta1/pom.xml index afccee79287b..126ffdb4a4cd 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/pom.xml +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-network-management-v1beta1 - 0.31.0 + 0.32.0 proto-google-cloud-network-management-v1beta1 Proto library for google-cloud-network-management com.google.cloud google-cloud-network-management-parent - 1.29.0 + 1.30.0 diff --git a/java-network-security/CHANGELOG.md b/java-network-security/CHANGELOG.md index 508808a1a470..04b7831c7d7a 100644 --- a/java-network-security/CHANGELOG.md +++ b/java-network-security/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.32.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.31.0 (2023-10-11) ### Dependencies diff --git a/java-network-security/README.md b/java-network-security/README.md index 02773ce9fb34..f561ec3ff95e 100644 --- a/java-network-security/README.md +++ b/java-network-security/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-network-security - 0.31.0 + 0.32.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-network-security:0.31.0' +implementation 'com.google.cloud:google-cloud-network-security:0.32.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-network-security" % "0.31.0" +libraryDependencies += "com.google.cloud" % "google-cloud-network-security" % "0.32.0" ``` diff --git a/java-network-security/google-cloud-network-security-bom/pom.xml b/java-network-security/google-cloud-network-security-bom/pom.xml index fc66d8ad9e89..c2a094c9f120 100644 --- a/java-network-security/google-cloud-network-security-bom/pom.xml +++ b/java-network-security/google-cloud-network-security-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-network-security-bom - 0.31.0 + 0.32.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-network-security - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-network-security-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-network-security-v1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-network-security-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-network-security-v1 - 0.31.0 + 0.32.0 diff --git a/java-network-security/google-cloud-network-security/pom.xml b/java-network-security/google-cloud-network-security/pom.xml index a5ea178a749f..7a3231d6a9f8 100644 --- a/java-network-security/google-cloud-network-security/pom.xml +++ b/java-network-security/google-cloud-network-security/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-network-security - 0.31.0 + 0.32.0 jar Google Network Security API Network Security API n/a com.google.cloud google-cloud-network-security-parent - 0.31.0 + 0.32.0 google-cloud-network-security diff --git a/java-network-security/grpc-google-cloud-network-security-v1/pom.xml b/java-network-security/grpc-google-cloud-network-security-v1/pom.xml index 2dcde55af2fb..f0dc3ccf6b8f 100644 --- a/java-network-security/grpc-google-cloud-network-security-v1/pom.xml +++ b/java-network-security/grpc-google-cloud-network-security-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-network-security-v1 - 0.31.0 + 0.32.0 grpc-google-cloud-network-security-v1 GRPC library for google-cloud-network-security com.google.cloud google-cloud-network-security-parent - 0.31.0 + 0.32.0 diff --git a/java-network-security/grpc-google-cloud-network-security-v1beta1/pom.xml b/java-network-security/grpc-google-cloud-network-security-v1beta1/pom.xml index 325281abd6ef..3e20cd7e2385 100644 --- a/java-network-security/grpc-google-cloud-network-security-v1beta1/pom.xml +++ b/java-network-security/grpc-google-cloud-network-security-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-network-security-v1beta1 - 0.31.0 + 0.32.0 grpc-google-cloud-network-security-v1beta1 GRPC library for google-cloud-network-security com.google.cloud google-cloud-network-security-parent - 0.31.0 + 0.32.0 diff --git a/java-network-security/pom.xml b/java-network-security/pom.xml index 3f9ab55f8014..3ebf00801336 100644 --- a/java-network-security/pom.xml +++ b/java-network-security/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-network-security-parent pom - 0.31.0 + 0.32.0 Google Network Security API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-network-security - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-network-security-v1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-network-security-v1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-network-security-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-network-security-v1beta1 - 0.31.0 + 0.32.0 diff --git a/java-network-security/proto-google-cloud-network-security-v1/pom.xml b/java-network-security/proto-google-cloud-network-security-v1/pom.xml index fd7b580d23ff..51d4d49604bc 100644 --- a/java-network-security/proto-google-cloud-network-security-v1/pom.xml +++ b/java-network-security/proto-google-cloud-network-security-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-network-security-v1 - 0.31.0 + 0.32.0 proto-google-cloud-network-security-v1 Proto library for google-cloud-network-security com.google.cloud google-cloud-network-security-parent - 0.31.0 + 0.32.0 diff --git a/java-network-security/proto-google-cloud-network-security-v1beta1/pom.xml b/java-network-security/proto-google-cloud-network-security-v1beta1/pom.xml index a1f9f2ec8ec8..9645c1948c18 100644 --- a/java-network-security/proto-google-cloud-network-security-v1beta1/pom.xml +++ b/java-network-security/proto-google-cloud-network-security-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-network-security-v1beta1 - 0.31.0 + 0.32.0 proto-google-cloud-network-security-v1beta1 Proto library for google-cloud-network-security com.google.cloud google-cloud-network-security-parent - 0.31.0 + 0.32.0 diff --git a/java-networkconnectivity/CHANGELOG.md b/java-networkconnectivity/CHANGELOG.md index b8f0a6a9e204..eedd2b68b219 100644 --- a/java-networkconnectivity/CHANGELOG.md +++ b/java-networkconnectivity/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.27.0 (2023-10-11) ### Features diff --git a/java-networkconnectivity/README.md b/java-networkconnectivity/README.md index cd2159496377..d55396db714e 100644 --- a/java-networkconnectivity/README.md +++ b/java-networkconnectivity/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-networkconnectivity - 1.27.0 + 1.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-networkconnectivity:1.27.0' +implementation 'com.google.cloud:google-cloud-networkconnectivity:1.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-networkconnectivity" % "1.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-networkconnectivity" % "1.28.0" ``` diff --git a/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml b/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml index 35e9bcbd28af..da478432744c 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml +++ b/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-networkconnectivity-bom - 1.27.0 + 1.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-networkconnectivity - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.27.0 + 1.28.0 diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml b/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml index 5e0f4a9f6dec..2699bfeacb45 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml +++ b/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-networkconnectivity - 1.27.0 + 1.28.0 jar Google Network Connectivity Center Google's suite of products that provide enterprise connectivity from your on-premises network or from another cloud provider to your Virtual Private Cloud (VPC) network com.google.cloud google-cloud-networkconnectivity-parent - 1.27.0 + 1.28.0 google-cloud-networkconnectivity diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/pom.xml b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/pom.xml index cbf2579a1460..b05b18ddcc12 100644 --- a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/pom.xml +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.27.0 + 1.28.0 grpc-google-cloud-networkconnectivity-v1 GRPC library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.27.0 + 1.28.0 diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml index 463977fe35c0..5c7af0571f25 100644 --- a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.33.0 + 0.34.0 grpc-google-cloud-networkconnectivity-v1alpha1 GRPC library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.27.0 + 1.28.0 diff --git a/java-networkconnectivity/pom.xml b/java-networkconnectivity/pom.xml index 81836d73f5c3..16b82f040a69 100644 --- a/java-networkconnectivity/pom.xml +++ b/java-networkconnectivity/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-networkconnectivity-parent pom - 1.27.0 + 1.28.0 Google Network Connectivity Center Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-networkconnectivity - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.33.0 + 0.34.0 diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/pom.xml b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/pom.xml index 308fcb2ed17b..b93c57aafad2 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/pom.xml +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.27.0 + 1.28.0 proto-google-cloud-networkconnectivity-v1 Proto library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.27.0 + 1.28.0 diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml index af615eb61fcf..a4185675eebc 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.33.0 + 0.34.0 proto-google-cloud-networkconnectivity-v1alpha1 Proto library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.27.0 + 1.28.0 diff --git a/java-notebooks/CHANGELOG.md b/java-notebooks/CHANGELOG.md index a44d722abc83..7293e08c2c92 100644 --- a/java-notebooks/CHANGELOG.md +++ b/java-notebooks/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.26.0 (2023-10-11) ### Dependencies diff --git a/java-notebooks/README.md b/java-notebooks/README.md index 60349ae2a43d..f32d3618a2cb 100644 --- a/java-notebooks/README.md +++ b/java-notebooks/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-notebooks - 1.26.0 + 1.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-notebooks:1.26.0' +implementation 'com.google.cloud:google-cloud-notebooks:1.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-notebooks" % "1.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-notebooks" % "1.27.0" ``` diff --git a/java-notebooks/google-cloud-notebooks-bom/pom.xml b/java-notebooks/google-cloud-notebooks-bom/pom.xml index 8cc404fd3348..6d39a0339e95 100644 --- a/java-notebooks/google-cloud-notebooks-bom/pom.xml +++ b/java-notebooks/google-cloud-notebooks-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-notebooks-bom - 1.26.0 + 1.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,37 +27,37 @@ com.google.cloud google-cloud-notebooks - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-notebooks-v1 - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-notebooks-v2 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.33.0 + 0.34.0 com.google.api.grpc proto-google-cloud-notebooks-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-notebooks-v2 - 1.26.0 + 1.27.0 diff --git a/java-notebooks/google-cloud-notebooks/pom.xml b/java-notebooks/google-cloud-notebooks/pom.xml index d361845eeb09..d7870c5dd18f 100644 --- a/java-notebooks/google-cloud-notebooks/pom.xml +++ b/java-notebooks/google-cloud-notebooks/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-notebooks - 1.26.0 + 1.27.0 jar Google AI Platform Notebooks is a managed service that offers an integrated and secure JupyterLab environment for data scientists and machine learning developers to experiment, develop, and deploy models into production. Users can create instances running JupyterLab that come pre-installed with the latest data science and machine learning frameworks in a single click. com.google.cloud google-cloud-notebooks-parent - 1.26.0 + 1.27.0 google-cloud-notebooks diff --git a/java-notebooks/grpc-google-cloud-notebooks-v1/pom.xml b/java-notebooks/grpc-google-cloud-notebooks-v1/pom.xml index fa7adf0dec54..35ad214696ec 100644 --- a/java-notebooks/grpc-google-cloud-notebooks-v1/pom.xml +++ b/java-notebooks/grpc-google-cloud-notebooks-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-notebooks-v1 - 1.26.0 + 1.27.0 grpc-google-cloud-notebooks-v1 GRPC library for google-cloud-notebooks com.google.cloud google-cloud-notebooks-parent - 1.26.0 + 1.27.0 diff --git a/java-notebooks/grpc-google-cloud-notebooks-v1beta1/pom.xml b/java-notebooks/grpc-google-cloud-notebooks-v1beta1/pom.xml index fda5e7f2770e..a77a3eee987c 100644 --- a/java-notebooks/grpc-google-cloud-notebooks-v1beta1/pom.xml +++ b/java-notebooks/grpc-google-cloud-notebooks-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.33.0 + 0.34.0 grpc-google-cloud-notebooks-v1beta1 GRPC library for grpc-google-cloud-notebooks-v1beta1 com.google.cloud google-cloud-notebooks-parent - 1.26.0 + 1.27.0 diff --git a/java-notebooks/grpc-google-cloud-notebooks-v2/pom.xml b/java-notebooks/grpc-google-cloud-notebooks-v2/pom.xml index f28063ba9953..5f9318273325 100644 --- a/java-notebooks/grpc-google-cloud-notebooks-v2/pom.xml +++ b/java-notebooks/grpc-google-cloud-notebooks-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-notebooks-v2 - 1.26.0 + 1.27.0 grpc-google-cloud-notebooks-v2 GRPC library for google-cloud-notebooks com.google.cloud google-cloud-notebooks-parent - 1.26.0 + 1.27.0 diff --git a/java-notebooks/pom.xml b/java-notebooks/pom.xml index feca747fe8ed..6bb8f086bd0b 100644 --- a/java-notebooks/pom.xml +++ b/java-notebooks/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-notebooks-parent pom - 1.26.0 + 1.27.0 Google AI Platform Notebooks Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.cloud google-cloud-notebooks - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-notebooks-v2 - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-notebooks-v2 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-notebooks-v1 - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-notebooks-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.33.0 + 0.34.0 com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.33.0 + 0.34.0 diff --git a/java-notebooks/proto-google-cloud-notebooks-v1/pom.xml b/java-notebooks/proto-google-cloud-notebooks-v1/pom.xml index 861c8b1b8205..99349ba868ec 100644 --- a/java-notebooks/proto-google-cloud-notebooks-v1/pom.xml +++ b/java-notebooks/proto-google-cloud-notebooks-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-notebooks-v1 - 1.26.0 + 1.27.0 proto-google-cloud-notebooks-v1 Proto library for google-cloud-notebooks com.google.cloud google-cloud-notebooks-parent - 1.26.0 + 1.27.0 diff --git a/java-notebooks/proto-google-cloud-notebooks-v1beta1/pom.xml b/java-notebooks/proto-google-cloud-notebooks-v1beta1/pom.xml index 6363f3d52cc3..b90348ed5d9c 100644 --- a/java-notebooks/proto-google-cloud-notebooks-v1beta1/pom.xml +++ b/java-notebooks/proto-google-cloud-notebooks-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.33.0 + 0.34.0 proto-google-cloud-notebooks-v1beta1 PROTO library for proto-google-cloud-notebooks-v1beta1 com.google.cloud google-cloud-notebooks-parent - 1.26.0 + 1.27.0 diff --git a/java-notebooks/proto-google-cloud-notebooks-v2/pom.xml b/java-notebooks/proto-google-cloud-notebooks-v2/pom.xml index f08c2c5eca1a..dc9902fd7c5c 100644 --- a/java-notebooks/proto-google-cloud-notebooks-v2/pom.xml +++ b/java-notebooks/proto-google-cloud-notebooks-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-notebooks-v2 - 1.26.0 + 1.27.0 proto-google-cloud-notebooks-v2 Proto library for google-cloud-notebooks com.google.cloud google-cloud-notebooks-parent - 1.26.0 + 1.27.0 diff --git a/java-notification/CHANGELOG.md b/java-notification/CHANGELOG.md index fe16fe3a8753..e9efe48435eb 100644 --- a/java-notification/CHANGELOG.md +++ b/java-notification/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.147.0-beta (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.146.0-beta (2023-10-11) ### Dependencies diff --git a/java-notification/README.md b/java-notification/README.md index 200e1cfdd23c..3aca72c9be5e 100644 --- a/java-notification/README.md +++ b/java-notification/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-notification - 0.146.0-beta + 0.147.0-beta ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-notification:0.146.0-beta' +implementation 'com.google.cloud:google-cloud-notification:0.147.0-beta' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-notification" % "0.146.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-notification" % "0.147.0-beta" ``` diff --git a/java-notification/pom.xml b/java-notification/pom.xml index 3b3570c95682..e7cba724b7ed 100644 --- a/java-notification/pom.xml +++ b/java-notification/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.google.cloud google-cloud-notification - 0.146.0-beta + 0.147.0-beta jar Google Cloud Pub/Sub Notifications for GCS @@ -15,7 +15,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml diff --git a/java-optimization/CHANGELOG.md b/java-optimization/CHANGELOG.md index d919832a6aed..4d77d10dc231 100644 --- a/java-optimization/CHANGELOG.md +++ b/java-optimization/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 1.27.0 (2023-10-25) + +### Features + +* added the route modifiers ([#9963](https://github.com/googleapis/google-cloud-java/issues/9963)) ([1f558b0](https://github.com/googleapis/google-cloud-java/commit/1f558b06a7564d843148fb7a10be94df9d61578f)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.26.0 (2023-10-11) ### Dependencies diff --git a/java-optimization/README.md b/java-optimization/README.md index 523223ae2e39..3a8489cfbc19 100644 --- a/java-optimization/README.md +++ b/java-optimization/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.24.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-optimization - 1.26.0 + 1.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-optimization:1.26.0' +implementation 'com.google.cloud:google-cloud-optimization:1.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-optimization" % "1.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-optimization" % "1.27.0" ``` @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-optimization.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-optimization/1.22.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-optimization/1.26.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-optimization/google-cloud-optimization-bom/pom.xml b/java-optimization/google-cloud-optimization-bom/pom.xml index 567b301d3382..c42fe3810fd3 100644 --- a/java-optimization/google-cloud-optimization-bom/pom.xml +++ b/java-optimization/google-cloud-optimization-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-optimization-bom - 1.26.0 + 1.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-optimization - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-optimization-v1 - 1.26.0 + 1.27.0 diff --git a/java-optimization/google-cloud-optimization/pom.xml b/java-optimization/google-cloud-optimization/pom.xml index 63fb72a7bd7b..c1c9e4f3bc90 100644 --- a/java-optimization/google-cloud-optimization/pom.xml +++ b/java-optimization/google-cloud-optimization/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-optimization - 1.26.0 + 1.27.0 jar Google Cloud Fleet Routing Cloud Fleet Routing is a managed routing service that takes your list of orders, vehicles, constraints, and objectives and returns the most efficient plan for your entire fleet in near real-time. com.google.cloud google-cloud-optimization-parent - 1.26.0 + 1.27.0 google-cloud-optimization diff --git a/java-optimization/google-cloud-optimization/src/main/resources/META-INF/native-image/com.google.cloud.optimization.v1/reflect-config.json b/java-optimization/google-cloud-optimization/src/main/resources/META-INF/native-image/com.google.cloud.optimization.v1/reflect-config.json index 8612ff1cc92a..16a85dbfd881 100644 --- a/java-optimization/google-cloud-optimization/src/main/resources/META-INF/native-image/com.google.cloud.optimization.v1/reflect-config.json +++ b/java-optimization/google-cloud-optimization/src/main/resources/META-INF/native-image/com.google.cloud.optimization.v1/reflect-config.json @@ -854,6 +854,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.optimization.v1.RouteModifiers", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.optimization.v1.RouteModifiers$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.optimization.v1.Shipment", "queryAllDeclaredConstructors": true, diff --git a/java-optimization/grpc-google-cloud-optimization-v1/pom.xml b/java-optimization/grpc-google-cloud-optimization-v1/pom.xml index ccd68dd8100d..e18e8fb2eb27 100644 --- a/java-optimization/grpc-google-cloud-optimization-v1/pom.xml +++ b/java-optimization/grpc-google-cloud-optimization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.26.0 + 1.27.0 grpc-google-cloud-optimization-v1 GRPC library for google-cloud-optimization com.google.cloud google-cloud-optimization-parent - 1.26.0 + 1.27.0 diff --git a/java-optimization/pom.xml b/java-optimization/pom.xml index bf39e97d827e..40711493ba94 100644 --- a/java-optimization/pom.xml +++ b/java-optimization/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-optimization-parent pom - 1.26.0 + 1.27.0 Google Cloud Fleet Routing Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-optimization - 1.26.0 + 1.27.0 com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.26.0 + 1.27.0 com.google.api.grpc proto-google-cloud-optimization-v1 - 1.26.0 + 1.27.0 diff --git a/java-optimization/proto-google-cloud-optimization-v1/pom.xml b/java-optimization/proto-google-cloud-optimization-v1/pom.xml index 29319bad9b49..6a3cf7e94c8f 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/pom.xml +++ b/java-optimization/proto-google-cloud-optimization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-optimization-v1 - 1.26.0 + 1.27.0 proto-google-cloud-optimization-v1 Proto library for google-cloud-optimization com.google.cloud google-cloud-optimization-parent - 1.26.0 + 1.27.0 diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetrics.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetrics.java index 51c998880426..3ac4515cb902 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetrics.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetrics.java @@ -704,7 +704,7 @@ public double getCostsOrThrow(java.lang.String key) { * double total_cost = 11 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2351 + * google/cloud/optimization/v1/fleet_routing.proto;l=2381 * @return The totalCost. */ @java.lang.Override @@ -3087,7 +3087,7 @@ public Builder putAllCosts(java.util.Map val * double total_cost = 11 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2351 + * google/cloud/optimization/v1/fleet_routing.proto;l=2381 * @return The totalCost. */ @java.lang.Override @@ -3109,7 +3109,7 @@ public double getTotalCost() { * double total_cost = 11 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2351 + * google/cloud/optimization/v1/fleet_routing.proto;l=2381 * @param value The totalCost to set. * @return This builder for chaining. */ @@ -3135,7 +3135,7 @@ public Builder setTotalCost(double value) { * double total_cost = 11 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2351 + * google/cloud/optimization/v1/fleet_routing.proto;l=2381 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetricsOrBuilder.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetricsOrBuilder.java index 0742ccd02fd8..97dbaa196547 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetricsOrBuilder.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/AggregatedMetricsOrBuilder.java @@ -456,7 +456,7 @@ com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow( * double total_cost = 11 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2351 + * google/cloud/optimization/v1/fleet_routing.proto;l=2381 * @return The totalCost. */ @java.lang.Deprecated diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/FleetRoutingProto.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/FleetRoutingProto.java index 1776db6fc382..2ef1ddfa4bbe 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/FleetRoutingProto.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/FleetRoutingProto.java @@ -111,6 +111,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_optimization_v1_ShipmentTypeRequirement_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_optimization_v1_ShipmentTypeRequirement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_optimization_v1_RouteModifiers_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_optimization_v1_RouteModifiers_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_optimization_v1_Vehicle_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -440,274 +444,279 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ode\022 \n\034REQUIREMENT_MODE_UNSPECIFIED\020\000\022\035\n" + "\031PERFORMED_BY_SAME_VEHICLE\020\001\022\"\n\036IN_SAME_" + "VEHICLE_AT_PICKUP_TIME\020\002\022$\n IN_SAME_VEHI" - + "CLE_AT_DELIVERY_TIME\020\003\"\316\024\n\007Vehicle\022E\n\013tr" - + "avel_mode\030\001 \001(\01620.google.cloud.optimizat" - + "ion.v1.Vehicle.TravelMode\022+\n\016start_locat" - + "ion\030\003 \001(\0132\023.google.type.LatLng\022>\n\016start_" - + "waypoint\030\004 \001(\0132&.google.cloud.optimizati" - + "on.v1.Waypoint\022)\n\014end_location\030\005 \001(\0132\023.g" - + "oogle.type.LatLng\022<\n\014end_waypoint\030\006 \001(\0132" - + "&.google.cloud.optimization.v1.Waypoint\022" - + "\022\n\nstart_tags\030\007 \003(\t\022\020\n\010end_tags\030\010 \003(\t\022D\n" - + "\022start_time_windows\030\t \003(\0132(.google.cloud" - + ".optimization.v1.TimeWindow\022B\n\020end_time_" - + "windows\030\n \003(\0132(.google.cloud.optimizatio" - + "n.v1.TimeWindow\022%\n\030travel_duration_multi" - + "ple\030\013 \001(\001H\000\210\001\001\022O\n\020unloading_policy\030\014 \001(\016" - + "25.google.cloud.optimization.v1.Vehicle." - + "UnloadingPolicy\022J\n\013load_limits\030\036 \003(\01325.g" - + "oogle.cloud.optimization.v1.Vehicle.Load" - + "LimitsEntry\022\025\n\rcost_per_hour\030\020 \001(\001\022\036\n\026co" - + "st_per_traveled_hour\030\021 \001(\001\022\032\n\022cost_per_k" - + "ilometer\030\022 \001(\001\022\022\n\nfixed_cost\030\023 \001(\001\022\036\n\026us" - + "ed_if_route_is_empty\030\024 \001(\010\022Q\n\024route_dura" - + "tion_limit\030\025 \001(\01323.google.cloud.optimiza" - + "tion.v1.Vehicle.DurationLimit\022R\n\025travel_" - + "duration_limit\030\026 \001(\01323.google.cloud.opti" - + "mization.v1.Vehicle.DurationLimit\022I\n\024rou" - + "te_distance_limit\030\027 \001(\0132+.google.cloud.o" - + "ptimization.v1.DistanceLimit\022v\n#extra_vi" - + "sit_duration_for_visit_type\030\030 \003(\0132I.goog" - + "le.cloud.optimization.v1.Vehicle.ExtraVi" - + "sitDurationForVisitTypeEntry\022;\n\nbreak_ru" - + "le\030\031 \001(\0132\'.google.cloud.optimization.v1." - + "BreakRule\022\r\n\005label\030\033 \001(\t\022\016\n\006ignore\030\034 \001(\010" - + "\022\036\n\022break_rule_indices\030\035 \003(\005B\002\030\001\022F\n\ncapa" - + "cities\030\r \003(\0132..google.cloud.optimization" - + ".v1.CapacityQuantityB\002\030\001\022X\n\024start_load_i" - + "ntervals\030\016 \003(\01326.google.cloud.optimizati" - + "on.v1.CapacityQuantityIntervalB\002\030\001\022V\n\022en" - + "d_load_intervals\030\017 \003(\01326.google.cloud.op" - + "timization.v1.CapacityQuantityIntervalB\002" - + "\030\001\032\313\002\n\tLoadLimit\022\025\n\010max_load\030\001 \001(\003H\000\210\001\001\022" - + "\025\n\rsoft_max_load\030\002 \001(\003\022$\n\034cost_per_unit_" - + "above_soft_max\030\003 \001(\001\022U\n\023start_load_inter" - + "val\030\004 \001(\01328.google.cloud.optimization.v1" - + ".Vehicle.LoadLimit.Interval\022S\n\021end_load_" - + "interval\030\005 \001(\01328.google.cloud.optimizati" - + "on.v1.Vehicle.LoadLimit.Interval\0321\n\010Inte" - + "rval\022\013\n\003min\030\001 \001(\003\022\020\n\003max\030\002 \001(\003H\000\210\001\001B\006\n\004_" - + "maxB\013\n\t_max_load\032\360\002\n\rDurationLimit\022/\n\014ma" - + "x_duration\030\001 \001(\0132\031.google.protobuf.Durat" - + "ion\0224\n\021soft_max_duration\030\002 \001(\0132\031.google." - + "protobuf.Duration\022)\n\034cost_per_hour_after" - + "_soft_max\030\003 \001(\001H\000\210\001\001\022>\n\033quadratic_soft_m" - + "ax_duration\030\004 \001(\0132\031.google.protobuf.Dura" - + "tion\022:\n-cost_per_square_hour_after_quadr" - + "atic_soft_max\030\005 \001(\001H\001\210\001\001B\037\n\035_cost_per_ho" - + "ur_after_soft_maxB0\n._cost_per_square_ho" - + "ur_after_quadratic_soft_max\032b\n\017LoadLimit" - + "sEntry\022\013\n\003key\030\001 \001(\t\022>\n\005value\030\002 \001(\0132/.goo" - + "gle.cloud.optimization.v1.Vehicle.LoadLi" - + "mit:\0028\001\032`\n#ExtraVisitDurationForVisitTyp" - + "eEntry\022\013\n\003key\030\001 \001(\t\022(\n\005value\030\002 \001(\0132\031.goo" - + "gle.protobuf.Duration:\0028\001\"C\n\nTravelMode\022" - + "\033\n\027TRAVEL_MODE_UNSPECIFIED\020\000\022\013\n\007DRIVING\020" - + "\001\022\013\n\007WALKING\020\002\"b\n\017UnloadingPolicy\022 \n\034UNL" - + "OADING_POLICY_UNSPECIFIED\020\000\022\025\n\021LAST_IN_F" - + "IRST_OUT\020\001\022\026\n\022FIRST_IN_FIRST_OUT\020\002B\033\n\031_t" - + "ravel_duration_multiple\"\204\003\n\nTimeWindow\022." - + "\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Tim" - + "estamp\022,\n\010end_time\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\0223\n\017soft_start_time\030\003 \001(\0132\032." - + "google.protobuf.Timestamp\0221\n\rsoft_end_ti" - + "me\030\004 \001(\0132\032.google.protobuf.Timestamp\0221\n$" - + "cost_per_hour_before_soft_start_time\030\005 \001" - + "(\001H\000\210\001\001\022.\n!cost_per_hour_after_soft_end_" - + "time\030\006 \001(\001H\001\210\001\001B\'\n%_cost_per_hour_before" - + "_soft_start_timeB$\n\"_cost_per_hour_after" - + "_soft_end_time\"3\n\020CapacityQuantity\022\014\n\004ty" - + "pe\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\002\030\001\"x\n\030CapacityQ" - + "uantityInterval\022\014\n\004type\030\001 \001(\t\022\026\n\tmin_val" - + "ue\030\002 \001(\003H\000\210\001\001\022\026\n\tmax_value\030\003 \001(\003H\001\210\001\001:\002\030" - + "\001B\014\n\n_min_valueB\014\n\n_max_value\"\225\002\n\rDistan" - + "ceLimit\022\027\n\nmax_meters\030\001 \001(\003H\000\210\001\001\022\034\n\017soft" - + "_max_meters\030\002 \001(\003H\001\210\001\001\022.\n!cost_per_kilom" - + "eter_below_soft_max\030\004 \001(\001H\002\210\001\001\022.\n!cost_p" - + "er_kilometer_above_soft_max\030\003 \001(\001H\003\210\001\001B\r" - + "\n\013_max_metersB\022\n\020_soft_max_metersB$\n\"_co" - + "st_per_kilometer_below_soft_maxB$\n\"_cost" - + "_per_kilometer_above_soft_max\"\205\002\n\024Transi" - + "tionAttributes\022\017\n\007src_tag\030\001 \001(\t\022\030\n\020exclu" - + "ded_src_tag\030\002 \001(\t\022\017\n\007dst_tag\030\003 \001(\t\022\030\n\020ex" - + "cluded_dst_tag\030\004 \001(\t\022\014\n\004cost\030\005 \001(\001\022\032\n\022co" - + "st_per_kilometer\030\006 \001(\001\022C\n\016distance_limit" - + "\030\007 \001(\0132+.google.cloud.optimization.v1.Di" - + "stanceLimit\022(\n\005delay\030\010 \001(\0132\031.google.prot" - + "obuf.Duration\"\201\001\n\010Waypoint\022:\n\010location\030\001" - + " \001(\0132&.google.cloud.optimization.v1.Loca" - + "tionH\000\022\022\n\010place_id\030\002 \001(\tH\000\022\024\n\014side_of_ro" - + "ad\030\003 \001(\010B\017\n\rlocation_type\"R\n\010Location\022$\n" - + "\007lat_lng\030\001 \001(\0132\023.google.type.LatLng\022\024\n\007h" - + "eading\030\002 \001(\005H\000\210\001\001B\n\n\010_heading\"\221\004\n\tBreakR" - + "ule\022L\n\016break_requests\030\001 \003(\01324.google.clo" - + "ud.optimization.v1.BreakRule.BreakReques" - + "t\022Z\n\025frequency_constraints\030\002 \003(\0132;.googl" - + "e.cloud.optimization.v1.BreakRule.Freque" - + "ncyConstraint\032\301\001\n\014BreakRequest\022=\n\023earlie" - + "st_start_time\030\001 \001(\0132\032.google.protobuf.Ti" - + "mestampB\004\342A\001\002\022;\n\021latest_start_time\030\002 \001(\013" - + "2\032.google.protobuf.TimestampB\004\342A\001\002\0225\n\014mi" - + "n_duration\030\003 \001(\0132\031.google.protobuf.Durat" - + "ionB\004\342A\001\002\032\225\001\n\023FrequencyConstraint\022;\n\022min" - + "_break_duration\030\001 \001(\0132\031.google.protobuf." - + "DurationB\004\342A\001\002\022A\n\030max_inter_break_durati" - + "on\030\002 \001(\0132\031.google.protobuf.DurationB\004\342A\001" - + "\002\"\303\026\n\rShipmentRoute\022\025\n\rvehicle_index\030\001 \001" - + "(\005\022\025\n\rvehicle_label\030\002 \001(\t\0226\n\022vehicle_sta" - + "rt_time\030\005 \001(\0132\032.google.protobuf.Timestam" - + "p\0224\n\020vehicle_end_time\030\006 \001(\0132\032.google.pro" - + "tobuf.Timestamp\022A\n\006visits\030\007 \003(\01321.google" - + ".cloud.optimization.v1.ShipmentRoute.Vis" - + "it\022K\n\013transitions\030\010 \003(\01326.google.cloud.o" - + "ptimization.v1.ShipmentRoute.Transition\022" - + "#\n\033has_traffic_infeasibilities\030\t \001(\010\022S\n\016" - + "route_polyline\030\n \001(\0132;.google.cloud.opti" - + "mization.v1.ShipmentRoute.EncodedPolylin" - + "e\022A\n\006breaks\030\013 \003(\01321.google.cloud.optimiz" - + "ation.v1.ShipmentRoute.Break\022@\n\007metrics\030" - + "\014 \001(\0132/.google.cloud.optimization.v1.Agg" - + "regatedMetrics\022P\n\013route_costs\030\021 \003(\0132;.go" + + "CLE_AT_DELIVERY_TIME\020\003\"p\n\016RouteModifiers" + + "\022\023\n\013avoid_tolls\030\002 \001(\010\022\026\n\016avoid_highways\030" + + "\003 \001(\010\022\025\n\ravoid_ferries\030\004 \001(\010\022\032\n\014avoid_in" + + "door\030\005 \001(\010B\004\342A\001\001\"\233\025\n\007Vehicle\022E\n\013travel_m" + + "ode\030\001 \001(\01620.google.cloud.optimization.v1" + + ".Vehicle.TravelMode\022K\n\017route_modifiers\030\002" + + " \001(\0132,.google.cloud.optimization.v1.Rout" + + "eModifiersB\004\342A\001\001\022+\n\016start_location\030\003 \001(\013" + + "2\023.google.type.LatLng\022>\n\016start_waypoint\030" + + "\004 \001(\0132&.google.cloud.optimization.v1.Way" + + "point\022)\n\014end_location\030\005 \001(\0132\023.google.typ" + + "e.LatLng\022<\n\014end_waypoint\030\006 \001(\0132&.google." + + "cloud.optimization.v1.Waypoint\022\022\n\nstart_" + + "tags\030\007 \003(\t\022\020\n\010end_tags\030\010 \003(\t\022D\n\022start_ti" + + "me_windows\030\t \003(\0132(.google.cloud.optimiza" + + "tion.v1.TimeWindow\022B\n\020end_time_windows\030\n" + + " \003(\0132(.google.cloud.optimization.v1.Time" + + "Window\022%\n\030travel_duration_multiple\030\013 \001(\001" + + "H\000\210\001\001\022O\n\020unloading_policy\030\014 \001(\01625.google" + + ".cloud.optimization.v1.Vehicle.Unloading" + + "Policy\022J\n\013load_limits\030\036 \003(\01325.google.clo" + + "ud.optimization.v1.Vehicle.LoadLimitsEnt" + + "ry\022\025\n\rcost_per_hour\030\020 \001(\001\022\036\n\026cost_per_tr" + + "aveled_hour\030\021 \001(\001\022\032\n\022cost_per_kilometer\030" + + "\022 \001(\001\022\022\n\nfixed_cost\030\023 \001(\001\022\036\n\026used_if_rou" + + "te_is_empty\030\024 \001(\010\022Q\n\024route_duration_limi" + + "t\030\025 \001(\01323.google.cloud.optimization.v1.V" + + "ehicle.DurationLimit\022R\n\025travel_duration_" + + "limit\030\026 \001(\01323.google.cloud.optimization." + + "v1.Vehicle.DurationLimit\022I\n\024route_distan" + + "ce_limit\030\027 \001(\0132+.google.cloud.optimizati" + + "on.v1.DistanceLimit\022v\n#extra_visit_durat" + + "ion_for_visit_type\030\030 \003(\0132I.google.cloud." + + "optimization.v1.Vehicle.ExtraVisitDurati" + + "onForVisitTypeEntry\022;\n\nbreak_rule\030\031 \001(\0132" + + "\'.google.cloud.optimization.v1.BreakRule" + + "\022\r\n\005label\030\033 \001(\t\022\016\n\006ignore\030\034 \001(\010\022\036\n\022break" + + "_rule_indices\030\035 \003(\005B\002\030\001\022F\n\ncapacities\030\r " + + "\003(\0132..google.cloud.optimization.v1.Capac" + + "ityQuantityB\002\030\001\022X\n\024start_load_intervals\030" + + "\016 \003(\01326.google.cloud.optimization.v1.Cap" + + "acityQuantityIntervalB\002\030\001\022V\n\022end_load_in" + + "tervals\030\017 \003(\01326.google.cloud.optimizatio" + + "n.v1.CapacityQuantityIntervalB\002\030\001\032\313\002\n\tLo" + + "adLimit\022\025\n\010max_load\030\001 \001(\003H\000\210\001\001\022\025\n\rsoft_m" + + "ax_load\030\002 \001(\003\022$\n\034cost_per_unit_above_sof" + + "t_max\030\003 \001(\001\022U\n\023start_load_interval\030\004 \001(\013" + + "28.google.cloud.optimization.v1.Vehicle." + + "LoadLimit.Interval\022S\n\021end_load_interval\030" + + "\005 \001(\01328.google.cloud.optimization.v1.Veh" + + "icle.LoadLimit.Interval\0321\n\010Interval\022\013\n\003m" + + "in\030\001 \001(\003\022\020\n\003max\030\002 \001(\003H\000\210\001\001B\006\n\004_maxB\013\n\t_m" + + "ax_load\032\360\002\n\rDurationLimit\022/\n\014max_duratio" + + "n\030\001 \001(\0132\031.google.protobuf.Duration\0224\n\021so" + + "ft_max_duration\030\002 \001(\0132\031.google.protobuf." + + "Duration\022)\n\034cost_per_hour_after_soft_max" + + "\030\003 \001(\001H\000\210\001\001\022>\n\033quadratic_soft_max_durati" + + "on\030\004 \001(\0132\031.google.protobuf.Duration\022:\n-c" + + "ost_per_square_hour_after_quadratic_soft" + + "_max\030\005 \001(\001H\001\210\001\001B\037\n\035_cost_per_hour_after_" + + "soft_maxB0\n._cost_per_square_hour_after_" + + "quadratic_soft_max\032b\n\017LoadLimitsEntry\022\013\n" + + "\003key\030\001 \001(\t\022>\n\005value\030\002 \001(\0132/.google.cloud" + + ".optimization.v1.Vehicle.LoadLimit:\0028\001\032`" + + "\n#ExtraVisitDurationForVisitTypeEntry\022\013\n" + + "\003key\030\001 \001(\t\022(\n\005value\030\002 \001(\0132\031.google.proto" + + "buf.Duration:\0028\001\"C\n\nTravelMode\022\033\n\027TRAVEL" + + "_MODE_UNSPECIFIED\020\000\022\013\n\007DRIVING\020\001\022\013\n\007WALK" + + "ING\020\002\"b\n\017UnloadingPolicy\022 \n\034UNLOADING_PO" + + "LICY_UNSPECIFIED\020\000\022\025\n\021LAST_IN_FIRST_OUT\020" + + "\001\022\026\n\022FIRST_IN_FIRST_OUT\020\002B\033\n\031_travel_dur" + + "ation_multiple\"\204\003\n\nTimeWindow\022.\n\nstart_t" + + "ime\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "amp\0223\n\017soft_start_time\030\003 \001(\0132\032.google.pr" + + "otobuf.Timestamp\0221\n\rsoft_end_time\030\004 \001(\0132" + + "\032.google.protobuf.Timestamp\0221\n$cost_per_" + + "hour_before_soft_start_time\030\005 \001(\001H\000\210\001\001\022." + + "\n!cost_per_hour_after_soft_end_time\030\006 \001(" + + "\001H\001\210\001\001B\'\n%_cost_per_hour_before_soft_sta" + + "rt_timeB$\n\"_cost_per_hour_after_soft_end" + + "_time\"3\n\020CapacityQuantity\022\014\n\004type\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\003:\002\030\001\"x\n\030CapacityQuantityIn" + + "terval\022\014\n\004type\030\001 \001(\t\022\026\n\tmin_value\030\002 \001(\003H" + + "\000\210\001\001\022\026\n\tmax_value\030\003 \001(\003H\001\210\001\001:\002\030\001B\014\n\n_min" + + "_valueB\014\n\n_max_value\"\225\002\n\rDistanceLimit\022\027" + + "\n\nmax_meters\030\001 \001(\003H\000\210\001\001\022\034\n\017soft_max_mete" + + "rs\030\002 \001(\003H\001\210\001\001\022.\n!cost_per_kilometer_belo" + + "w_soft_max\030\004 \001(\001H\002\210\001\001\022.\n!cost_per_kilome" + + "ter_above_soft_max\030\003 \001(\001H\003\210\001\001B\r\n\013_max_me" + + "tersB\022\n\020_soft_max_metersB$\n\"_cost_per_ki" + + "lometer_below_soft_maxB$\n\"_cost_per_kilo" + + "meter_above_soft_max\"\205\002\n\024TransitionAttri" + + "butes\022\017\n\007src_tag\030\001 \001(\t\022\030\n\020excluded_src_t" + + "ag\030\002 \001(\t\022\017\n\007dst_tag\030\003 \001(\t\022\030\n\020excluded_ds" + + "t_tag\030\004 \001(\t\022\014\n\004cost\030\005 \001(\001\022\032\n\022cost_per_ki" + + "lometer\030\006 \001(\001\022C\n\016distance_limit\030\007 \001(\0132+." + + "google.cloud.optimization.v1.DistanceLim" + + "it\022(\n\005delay\030\010 \001(\0132\031.google.protobuf.Dura" + + "tion\"\201\001\n\010Waypoint\022:\n\010location\030\001 \001(\0132&.go" + + "ogle.cloud.optimization.v1.LocationH\000\022\022\n" + + "\010place_id\030\002 \001(\tH\000\022\024\n\014side_of_road\030\003 \001(\010B" + + "\017\n\rlocation_type\"R\n\010Location\022$\n\007lat_lng\030" + + "\001 \001(\0132\023.google.type.LatLng\022\024\n\007heading\030\002 " + + "\001(\005H\000\210\001\001B\n\n\010_heading\"\221\004\n\tBreakRule\022L\n\016br" + + "eak_requests\030\001 \003(\01324.google.cloud.optimi" + + "zation.v1.BreakRule.BreakRequest\022Z\n\025freq" + + "uency_constraints\030\002 \003(\0132;.google.cloud.o" + + "ptimization.v1.BreakRule.FrequencyConstr" + + "aint\032\301\001\n\014BreakRequest\022=\n\023earliest_start_" + + "time\030\001 \001(\0132\032.google.protobuf.TimestampB\004" + + "\342A\001\002\022;\n\021latest_start_time\030\002 \001(\0132\032.google" + + ".protobuf.TimestampB\004\342A\001\002\0225\n\014min_duratio" + + "n\030\003 \001(\0132\031.google.protobuf.DurationB\004\342A\001\002" + + "\032\225\001\n\023FrequencyConstraint\022;\n\022min_break_du" + + "ration\030\001 \001(\0132\031.google.protobuf.DurationB" + + "\004\342A\001\002\022A\n\030max_inter_break_duration\030\002 \001(\0132" + + "\031.google.protobuf.DurationB\004\342A\001\002\"\303\026\n\rShi" + + "pmentRoute\022\025\n\rvehicle_index\030\001 \001(\005\022\025\n\rveh" + + "icle_label\030\002 \001(\t\0226\n\022vehicle_start_time\030\005" + + " \001(\0132\032.google.protobuf.Timestamp\0224\n\020vehi" + + "cle_end_time\030\006 \001(\0132\032.google.protobuf.Tim" + + "estamp\022A\n\006visits\030\007 \003(\01321.google.cloud.op" + + "timization.v1.ShipmentRoute.Visit\022K\n\013tra" + + "nsitions\030\010 \003(\01326.google.cloud.optimizati" + + "on.v1.ShipmentRoute.Transition\022#\n\033has_tr" + + "affic_infeasibilities\030\t \001(\010\022S\n\016route_pol" + + "yline\030\n \001(\0132;.google.cloud.optimization." + + "v1.ShipmentRoute.EncodedPolyline\022A\n\006brea" + + "ks\030\013 \003(\01321.google.cloud.optimization.v1." + + "ShipmentRoute.Break\022@\n\007metrics\030\014 \001(\0132/.g" + + "oogle.cloud.optimization.v1.AggregatedMe" + + "trics\022P\n\013route_costs\030\021 \003(\0132;.google.clou" + + "d.optimization.v1.ShipmentRoute.RouteCos" + + "tsEntry\022\030\n\020route_total_cost\030\022 \001(\001\022E\n\tend" + + "_loads\030\r \003(\0132..google.cloud.optimization" + + ".v1.CapacityQuantityB\002\030\001\022P\n\014travel_steps" + + "\030\016 \003(\01326.google.cloud.optimization.v1.Sh" + + "ipmentRoute.TravelStepB\002\030\001\0225\n\016vehicle_de" + + "tour\030\017 \001(\0132\031.google.protobuf.DurationB\002\030" + + "\001\022W\n\030delay_before_vehicle_end\030\020 \001(\01321.go" + "ogle.cloud.optimization.v1.ShipmentRoute" - + ".RouteCostsEntry\022\030\n\020route_total_cost\030\022 \001" - + "(\001\022E\n\tend_loads\030\r \003(\0132..google.cloud.opt" - + "imization.v1.CapacityQuantityB\002\030\001\022P\n\014tra" - + "vel_steps\030\016 \003(\01326.google.cloud.optimizat" - + "ion.v1.ShipmentRoute.TravelStepB\002\030\001\0225\n\016v" - + "ehicle_detour\030\017 \001(\0132\031.google.protobuf.Du" - + "rationB\002\030\001\022W\n\030delay_before_vehicle_end\030\020" - + " \001(\01321.google.cloud.optimization.v1.Ship" - + "mentRoute.DelayB\002\030\001\032h\n\005Delay\022.\n\nstart_ti" - + "me\030\001 \001(\0132\032.google.protobuf.Timestamp\022+\n\010" - + "duration\030\002 \001(\0132\031.google.protobuf.Duratio" - + "n:\002\030\001\032\365\004\n\005Visit\022\026\n\016shipment_index\030\001 \001(\005\022" - + "\021\n\tis_pickup\030\002 \001(\010\022\033\n\023visit_request_inde" - + "x\030\003 \001(\005\022.\n\nstart_time\030\004 \001(\0132\032.google.pro" - + "tobuf.Timestamp\022X\n\014load_demands\030\013 \003(\0132B." - + "google.cloud.optimization.v1.ShipmentRou" - + "te.Visit.LoadDemandsEntry\022)\n\006detour\030\006 \001(" - + "\0132\031.google.protobuf.Duration\022\026\n\016shipment" - + "_label\030\007 \001(\t\022\023\n\013visit_label\030\010 \001(\t\022I\n\rarr" - + "ival_loads\030\t \003(\0132..google.cloud.optimiza" - + "tion.v1.CapacityQuantityB\002\030\001\022Q\n\022delay_be" - + "fore_start\030\n \001(\01321.google.cloud.optimiza" - + "tion.v1.ShipmentRoute.DelayB\002\030\001\022C\n\007deman" - + "ds\030\005 \003(\0132..google.cloud.optimization.v1." - + "CapacityQuantityB\002\030\001\032_\n\020LoadDemandsEntry" - + "\022\013\n\003key\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.google.cl" - + "oud.optimization.v1.Shipment.Load:\0028\001\032\344\005" - + "\n\nTransition\0222\n\017travel_duration\030\001 \001(\0132\031." - + "google.protobuf.Duration\022\036\n\026travel_dista" - + "nce_meters\030\002 \001(\001\022 \n\030traffic_info_unavail" - + "able\030\003 \001(\010\0221\n\016delay_duration\030\004 \001(\0132\031.goo" - + "gle.protobuf.Duration\0221\n\016break_duration\030" - + "\005 \001(\0132\031.google.protobuf.Duration\0220\n\rwait" - + "_duration\030\006 \001(\0132\031.google.protobuf.Durati" - + "on\0221\n\016total_duration\030\007 \001(\0132\031.google.prot" - + "obuf.Duration\022.\n\nstart_time\030\010 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022S\n\016route_polyline\030" - + "\t \001(\0132;.google.cloud.optimization.v1.Shi" - + "pmentRoute.EncodedPolyline\022_\n\rvehicle_lo" - + "ads\030\013 \003(\0132H.google.cloud.optimization.v1" - + ".ShipmentRoute.Transition.VehicleLoadsEn" - + "try\022A\n\005loads\030\n \003(\0132..google.cloud.optimi" - + "zation.v1.CapacityQuantityB\002\030\001\032l\n\021Vehicl" - + "eLoadsEntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\0132" - + "7.google.cloud.optimization.v1.ShipmentR" - + "oute.VehicleLoad:\0028\001\032\035\n\013VehicleLoad\022\016\n\006a" - + "mount\030\001 \001(\003\032!\n\017EncodedPolyline\022\016\n\006points" - + "\030\001 \001(\t\032d\n\005Break\022.\n\nstart_time\030\001 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\022+\n\010duration\030\002 \001(" - + "\0132\031.google.protobuf.Duration\032\315\001\n\nTravelS" - + "tep\022+\n\010duration\030\001 \001(\0132\031.google.protobuf." - + "Duration\022\027\n\017distance_meters\030\002 \001(\001\022 \n\030tra" - + "ffic_info_unavailable\030\003 \001(\010\022S\n\016route_pol" - + "yline\030\004 \001(\0132;.google.cloud.optimization." - + "v1.ShipmentRoute.EncodedPolyline:\002\030\001\0321\n\017" - + "RouteCostsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\001:\0028\001\"\376\004\n\017SkippedShipment\022\r\n\005index\030\001 \001" - + "(\005\022\r\n\005label\030\002 \001(\t\022E\n\007reasons\030\003 \003(\01324.goo" - + "gle.cloud.optimization.v1.SkippedShipmen" - + "t.Reason\032\205\004\n\006Reason\022G\n\004code\030\001 \001(\01629.goog" - + "le.cloud.optimization.v1.SkippedShipment" - + ".Reason.Code\022\"\n\025example_vehicle_index\030\002 " - + "\001(\005H\000\210\001\001\022&\n\036example_exceeded_capacity_ty" - + "pe\030\003 \001(\t\"\313\002\n\004Code\022\024\n\020CODE_UNSPECIFIED\020\000\022" - + "\016\n\nNO_VEHICLE\020\001\022#\n\037DEMAND_EXCEEDS_VEHICL" - + "E_CAPACITY\020\002\0225\n1CANNOT_BE_PERFORMED_WITH" - + "IN_VEHICLE_DISTANCE_LIMIT\020\003\0225\n1CANNOT_BE" - + "_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT" - + "\020\004\022<\n8CANNOT_BE_PERFORMED_WITHIN_VEHICLE" - + "_TRAVEL_DURATION_LIMIT\020\005\0223\n/CANNOT_BE_PE" - + "RFORMED_WITHIN_VEHICLE_TIME_WINDOWS\020\006\022\027\n" - + "\023VEHICLE_NOT_ALLOWED\020\007B\030\n\026_example_vehic" - + "le_index\"\330\005\n\021AggregatedMetrics\022 \n\030perfor" - + "med_shipment_count\030\001 \001(\005\0222\n\017travel_durat" - + "ion\030\002 \001(\0132\031.google.protobuf.Duration\0220\n\r" - + "wait_duration\030\003 \001(\0132\031.google.protobuf.Du" - + "ration\0221\n\016delay_duration\030\004 \001(\0132\031.google." - + "protobuf.Duration\0221\n\016break_duration\030\005 \001(" - + "\0132\031.google.protobuf.Duration\0221\n\016visit_du" - + "ration\030\006 \001(\0132\031.google.protobuf.Duration\022" - + "1\n\016total_duration\030\007 \001(\0132\031.google.protobu" - + "f.Duration\022\036\n\026travel_distance_meters\030\010 \001" - + "(\001\022P\n\tmax_loads\030\t \003(\0132=.google.cloud.opt" - + "imization.v1.AggregatedMetrics.MaxLoadsE" - + "ntry\022M\n\005costs\030\n \003(\0132:.google.cloud.optim" - + "ization.v1.AggregatedMetrics.CostsEntryB" - + "\002\030\001\022\026\n\ntotal_cost\030\013 \001(\001B\002\030\001\032h\n\rMaxLoadsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.googl" - + "e.cloud.optimization.v1.ShipmentRoute.Ve" - + "hicleLoad:\0028\001\032,\n\nCostsEntry\022\013\n\003key\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\001:\0028\001\"\237\006\n\032InjectedSolution" - + "Constraint\022;\n\006routes\030\001 \003(\0132+.google.clou" - + "d.optimization.v1.ShipmentRoute\022H\n\021skipp" - + "ed_shipments\030\002 \003(\0132-.google.cloud.optimi" - + "zation.v1.SkippedShipment\022m\n\026constraint_" - + "relaxations\030\003 \003(\0132M.google.cloud.optimiz" - + "ation.v1.InjectedSolutionConstraint.Cons" - + "traintRelaxation\032\212\004\n\024ConstraintRelaxatio" - + "n\022m\n\013relaxations\030\001 \003(\0132X.google.cloud.op", - "timization.v1.InjectedSolutionConstraint" - + ".ConstraintRelaxation.Relaxation\022\027\n\017vehi" - + "cle_indices\030\002 \003(\005\032\351\002\n\nRelaxation\022m\n\005leve" - + "l\030\001 \001(\0162^.google.cloud.optimization.v1.I" - + "njectedSolutionConstraint.ConstraintRela" - + "xation.Relaxation.Level\0222\n\016threshold_tim" - + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\022\035\n\025t" - + "hreshold_visit_count\030\003 \001(\005\"\230\001\n\005Level\022\025\n\021" - + "LEVEL_UNSPECIFIED\020\000\022%\n!RELAX_VISIT_TIMES" - + "_AFTER_THRESHOLD\020\001\0222\n.RELAX_VISIT_TIMES_" - + "AND_SEQUENCE_AFTER_THRESHOLD\020\002\022\035\n\031RELAX_" - + "ALL_AFTER_THRESHOLD\020\003\"\375\002\n\034OptimizeToursV" - + "alidationError\022\014\n\004code\030\001 \001(\005\022\024\n\014display_" - + "name\030\002 \001(\t\022Y\n\006fields\030\003 \003(\0132I.google.clou" - + "d.optimization.v1.OptimizeToursValidatio" - + "nError.FieldReference\022\025\n\rerror_message\030\004" - + " \001(\t\022\030\n\020offending_values\030\005 \001(\t\032\254\001\n\016Field" - + "Reference\022\014\n\004name\030\001 \001(\t\022\017\n\005index\030\002 \001(\005H\000" - + "\022\r\n\003key\030\004 \001(\tH\000\022\\\n\tsub_field\030\003 \001(\0132I.goo" - + "gle.cloud.optimization.v1.OptimizeToursV" - + "alidationError.FieldReferenceB\016\n\014index_o" - + "r_key2\340\004\n\014FleetRouting\022\342\001\n\rOptimizeTours" - + "\0222.google.cloud.optimization.v1.Optimize" - + "ToursRequest\0323.google.cloud.optimization" - + ".v1.OptimizeToursResponse\"h\202\323\344\223\002b\"1/v1/{" - + "parent=projects/*/locations/*}:optimizeT" - + "ours:\001*Z*\"%/v1/{parent=projects/*}:optim" - + "izeTours:\001*\022\224\002\n\022BatchOptimizeTours\0227.goo" - + "gle.cloud.optimization.v1.BatchOptimizeT" - + "oursRequest\032\035.google.longrunning.Operati" - + "on\"\245\001\312A0\n\032BatchOptimizeToursResponse\022\022As" - + "yncModelMetadata\202\323\344\223\002l\"6/v1/{parent=proj" - + "ects/*/locations/*}:batchOptimizeTours:\001" - + "*Z/\"*/v1/{parent=projects/*}:batchOptimi" - + "zeTours:\001*\032T\312A cloudoptimization.googlea" - + "pis.com\322A.https://www.googleapis.com/aut" - + "h/cloud-platformB}\n com.google.cloud.opt" - + "imization.v1B\021FleetRoutingProtoP\001ZDcloud" - + ".google.com/go/optimization/apiv1/optimi" - + "zationpb;optimizationpbb\006proto3" + + ".DelayB\002\030\001\032h\n\005Delay\022.\n\nstart_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\022+\n\010duration\030" + + "\002 \001(\0132\031.google.protobuf.Duration:\002\030\001\032\365\004\n" + + "\005Visit\022\026\n\016shipment_index\030\001 \001(\005\022\021\n\tis_pic" + + "kup\030\002 \001(\010\022\033\n\023visit_request_index\030\003 \001(\005\022." + + "\n\nstart_time\030\004 \001(\0132\032.google.protobuf.Tim" + + "estamp\022X\n\014load_demands\030\013 \003(\0132B.google.cl" + + "oud.optimization.v1.ShipmentRoute.Visit." + + "LoadDemandsEntry\022)\n\006detour\030\006 \001(\0132\031.googl" + + "e.protobuf.Duration\022\026\n\016shipment_label\030\007 " + + "\001(\t\022\023\n\013visit_label\030\010 \001(\t\022I\n\rarrival_load" + + "s\030\t \003(\0132..google.cloud.optimization.v1.C" + + "apacityQuantityB\002\030\001\022Q\n\022delay_before_star" + + "t\030\n \001(\01321.google.cloud.optimization.v1.S" + + "hipmentRoute.DelayB\002\030\001\022C\n\007demands\030\005 \003(\0132" + + "..google.cloud.optimization.v1.CapacityQ" + + "uantityB\002\030\001\032_\n\020LoadDemandsEntry\022\013\n\003key\030\001" + + " \001(\t\022:\n\005value\030\002 \001(\0132+.google.cloud.optim" + + "ization.v1.Shipment.Load:\0028\001\032\344\005\n\nTransit" + + "ion\0222\n\017travel_duration\030\001 \001(\0132\031.google.pr" + + "otobuf.Duration\022\036\n\026travel_distance_meter" + + "s\030\002 \001(\001\022 \n\030traffic_info_unavailable\030\003 \001(" + + "\010\0221\n\016delay_duration\030\004 \001(\0132\031.google.proto" + + "buf.Duration\0221\n\016break_duration\030\005 \001(\0132\031.g" + + "oogle.protobuf.Duration\0220\n\rwait_duration" + + "\030\006 \001(\0132\031.google.protobuf.Duration\0221\n\016tot" + + "al_duration\030\007 \001(\0132\031.google.protobuf.Dura" + + "tion\022.\n\nstart_time\030\010 \001(\0132\032.google.protob" + + "uf.Timestamp\022S\n\016route_polyline\030\t \001(\0132;.g" + + "oogle.cloud.optimization.v1.ShipmentRout" + + "e.EncodedPolyline\022_\n\rvehicle_loads\030\013 \003(\013" + + "2H.google.cloud.optimization.v1.Shipment" + + "Route.Transition.VehicleLoadsEntry\022A\n\005lo" + + "ads\030\n \003(\0132..google.cloud.optimization.v1" + + ".CapacityQuantityB\002\030\001\032l\n\021VehicleLoadsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.google." + + "cloud.optimization.v1.ShipmentRoute.Vehi" + + "cleLoad:\0028\001\032\035\n\013VehicleLoad\022\016\n\006amount\030\001 \001" + + "(\003\032!\n\017EncodedPolyline\022\016\n\006points\030\001 \001(\t\032d\n" + + "\005Break\022.\n\nstart_time\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022+\n\010duration\030\002 \001(\0132\031.googl" + + "e.protobuf.Duration\032\315\001\n\nTravelStep\022+\n\010du" + + "ration\030\001 \001(\0132\031.google.protobuf.Duration\022" + + "\027\n\017distance_meters\030\002 \001(\001\022 \n\030traffic_info" + + "_unavailable\030\003 \001(\010\022S\n\016route_polyline\030\004 \001" + + "(\0132;.google.cloud.optimization.v1.Shipme" + + "ntRoute.EncodedPolyline:\002\030\001\0321\n\017RouteCost" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\001:\0028\001\"\376" + + "\004\n\017SkippedShipment\022\r\n\005index\030\001 \001(\005\022\r\n\005lab" + + "el\030\002 \001(\t\022E\n\007reasons\030\003 \003(\01324.google.cloud" + + ".optimization.v1.SkippedShipment.Reason\032" + + "\205\004\n\006Reason\022G\n\004code\030\001 \001(\01629.google.cloud." + + "optimization.v1.SkippedShipment.Reason.C" + + "ode\022\"\n\025example_vehicle_index\030\002 \001(\005H\000\210\001\001\022" + + "&\n\036example_exceeded_capacity_type\030\003 \001(\t\"" + + "\313\002\n\004Code\022\024\n\020CODE_UNSPECIFIED\020\000\022\016\n\nNO_VEH" + + "ICLE\020\001\022#\n\037DEMAND_EXCEEDS_VEHICLE_CAPACIT" + + "Y\020\002\0225\n1CANNOT_BE_PERFORMED_WITHIN_VEHICL" + + "E_DISTANCE_LIMIT\020\003\0225\n1CANNOT_BE_PERFORME" + + "D_WITHIN_VEHICLE_DURATION_LIMIT\020\004\022<\n8CAN" + + "NOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_D" + + "URATION_LIMIT\020\005\0223\n/CANNOT_BE_PERFORMED_W" + + "ITHIN_VEHICLE_TIME_WINDOWS\020\006\022\027\n\023VEHICLE_" + + "NOT_ALLOWED\020\007B\030\n\026_example_vehicle_index\"" + + "\330\005\n\021AggregatedMetrics\022 \n\030performed_shipm" + + "ent_count\030\001 \001(\005\0222\n\017travel_duration\030\002 \001(\013" + + "2\031.google.protobuf.Duration\0220\n\rwait_dura" + + "tion\030\003 \001(\0132\031.google.protobuf.Duration\0221\n" + + "\016delay_duration\030\004 \001(\0132\031.google.protobuf." + + "Duration\0221\n\016break_duration\030\005 \001(\0132\031.googl" + + "e.protobuf.Duration\0221\n\016visit_duration\030\006 " + + "\001(\0132\031.google.protobuf.Duration\0221\n\016total_" + + "duration\030\007 \001(\0132\031.google.protobuf.Duratio" + + "n\022\036\n\026travel_distance_meters\030\010 \001(\001\022P\n\tmax" + + "_loads\030\t \003(\0132=.google.cloud.optimization" + + ".v1.AggregatedMetrics.MaxLoadsEntry\022M\n\005c" + + "osts\030\n \003(\0132:.google.cloud.optimization.v" + + "1.AggregatedMetrics.CostsEntryB\002\030\001\022\026\n\nto" + + "tal_cost\030\013 \001(\001B\002\030\001\032h\n\rMaxLoadsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.google.cloud.o" + + "ptimization.v1.ShipmentRoute.VehicleLoad" + + ":\0028\001\032,\n\nCostsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\001:\0028\001\"\237\006\n\032InjectedSolutionConstrain" + + "t\022;\n\006routes\030\001 \003(\0132+.google.cloud.optimiz" + + "ation.v1.ShipmentRoute\022H\n\021skipped_shipme" + + "nts\030\002 \003(\0132-.google.cloud.optimization.v1", + ".SkippedShipment\022m\n\026constraint_relaxatio" + + "ns\030\003 \003(\0132M.google.cloud.optimization.v1." + + "InjectedSolutionConstraint.ConstraintRel" + + "axation\032\212\004\n\024ConstraintRelaxation\022m\n\013rela" + + "xations\030\001 \003(\0132X.google.cloud.optimizatio" + + "n.v1.InjectedSolutionConstraint.Constrai" + + "ntRelaxation.Relaxation\022\027\n\017vehicle_indic" + + "es\030\002 \003(\005\032\351\002\n\nRelaxation\022m\n\005level\030\001 \001(\0162^" + + ".google.cloud.optimization.v1.InjectedSo" + + "lutionConstraint.ConstraintRelaxation.Re" + + "laxation.Level\0222\n\016threshold_time\030\002 \001(\0132\032" + + ".google.protobuf.Timestamp\022\035\n\025threshold_" + + "visit_count\030\003 \001(\005\"\230\001\n\005Level\022\025\n\021LEVEL_UNS" + + "PECIFIED\020\000\022%\n!RELAX_VISIT_TIMES_AFTER_TH" + + "RESHOLD\020\001\0222\n.RELAX_VISIT_TIMES_AND_SEQUE" + + "NCE_AFTER_THRESHOLD\020\002\022\035\n\031RELAX_ALL_AFTER" + + "_THRESHOLD\020\003\"\375\002\n\034OptimizeToursValidation" + + "Error\022\014\n\004code\030\001 \001(\005\022\024\n\014display_name\030\002 \001(" + + "\t\022Y\n\006fields\030\003 \003(\0132I.google.cloud.optimiz" + + "ation.v1.OptimizeToursValidationError.Fi" + + "eldReference\022\025\n\rerror_message\030\004 \001(\t\022\030\n\020o" + + "ffending_values\030\005 \001(\t\032\254\001\n\016FieldReference" + + "\022\014\n\004name\030\001 \001(\t\022\017\n\005index\030\002 \001(\005H\000\022\r\n\003key\030\004" + + " \001(\tH\000\022\\\n\tsub_field\030\003 \001(\0132I.google.cloud" + + ".optimization.v1.OptimizeToursValidation" + + "Error.FieldReferenceB\016\n\014index_or_key2\340\004\n" + + "\014FleetRouting\022\342\001\n\rOptimizeTours\0222.google" + + ".cloud.optimization.v1.OptimizeToursRequ" + + "est\0323.google.cloud.optimization.v1.Optim" + + "izeToursResponse\"h\202\323\344\223\002b\"1/v1/{parent=pr" + + "ojects/*/locations/*}:optimizeTours:\001*Z*" + + "\"%/v1/{parent=projects/*}:optimizeTours:" + + "\001*\022\224\002\n\022BatchOptimizeTours\0227.google.cloud" + + ".optimization.v1.BatchOptimizeToursReque" + + "st\032\035.google.longrunning.Operation\"\245\001\312A0\n" + + "\032BatchOptimizeToursResponse\022\022AsyncModelM" + + "etadata\202\323\344\223\002l\"6/v1/{parent=projects/*/lo" + + "cations/*}:batchOptimizeTours:\001*Z/\"*/v1/" + + "{parent=projects/*}:batchOptimizeTours:\001" + + "*\032T\312A cloudoptimization.googleapis.com\322A" + + ".https://www.googleapis.com/auth/cloud-p" + + "latformB}\n com.google.cloud.optimization" + + ".v1B\021FleetRoutingProtoP\001ZDcloud.google.c" + + "om/go/optimization/apiv1/optimizationpb;" + + "optimizationpbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -984,13 +993,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "RequiredShipmentTypeAlternatives", "DependentShipmentTypes", "RequirementMode", }); - internal_static_google_cloud_optimization_v1_Vehicle_descriptor = + internal_static_google_cloud_optimization_v1_RouteModifiers_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_optimization_v1_RouteModifiers_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_optimization_v1_RouteModifiers_descriptor, + new java.lang.String[] { + "AvoidTolls", "AvoidHighways", "AvoidFerries", "AvoidIndoor", + }); + internal_static_google_cloud_optimization_v1_Vehicle_descriptor = + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_optimization_v1_Vehicle_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_Vehicle_descriptor, new java.lang.String[] { "TravelMode", + "RouteModifiers", "StartLocation", "StartWaypoint", "EndLocation", @@ -1074,7 +1092,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_optimization_v1_TimeWindow_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_optimization_v1_TimeWindow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_TimeWindow_descriptor, @@ -1089,7 +1107,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CostPerHourAfterSoftEndTime", }); internal_static_google_cloud_optimization_v1_CapacityQuantity_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_optimization_v1_CapacityQuantity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_CapacityQuantity_descriptor, @@ -1097,7 +1115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", "Value", }); internal_static_google_cloud_optimization_v1_CapacityQuantityInterval_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_optimization_v1_CapacityQuantityInterval_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_CapacityQuantityInterval_descriptor, @@ -1105,7 +1123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", "MinValue", "MaxValue", "MinValue", "MaxValue", }); internal_static_google_cloud_optimization_v1_DistanceLimit_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_optimization_v1_DistanceLimit_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_DistanceLimit_descriptor, @@ -1120,7 +1138,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CostPerKilometerAboveSoftMax", }); internal_static_google_cloud_optimization_v1_TransitionAttributes_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_optimization_v1_TransitionAttributes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_TransitionAttributes_descriptor, @@ -1135,7 +1153,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Delay", }); internal_static_google_cloud_optimization_v1_Waypoint_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_optimization_v1_Waypoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_Waypoint_descriptor, @@ -1143,7 +1161,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Location", "PlaceId", "SideOfRoad", "LocationType", }); internal_static_google_cloud_optimization_v1_Location_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_optimization_v1_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_Location_descriptor, @@ -1151,7 +1169,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LatLng", "Heading", "Heading", }); internal_static_google_cloud_optimization_v1_BreakRule_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_optimization_v1_BreakRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_BreakRule_descriptor, @@ -1175,7 +1193,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MinBreakDuration", "MaxInterBreakDuration", }); internal_static_google_cloud_optimization_v1_ShipmentRoute_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_optimization_v1_ShipmentRoute_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_ShipmentRoute_descriptor, @@ -1318,7 +1336,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_optimization_v1_SkippedShipment_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_optimization_v1_SkippedShipment_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_SkippedShipment_descriptor, @@ -1336,7 +1354,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Code", "ExampleVehicleIndex", "ExampleExceededCapacityType", "ExampleVehicleIndex", }); internal_static_google_cloud_optimization_v1_AggregatedMetrics_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_optimization_v1_AggregatedMetrics_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_AggregatedMetrics_descriptor, @@ -1374,7 +1392,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_optimization_v1_InjectedSolutionConstraint_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_optimization_v1_InjectedSolutionConstraint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_InjectedSolutionConstraint_descriptor, @@ -1402,7 +1420,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Level", "ThresholdTime", "ThresholdVisitCount", }); internal_static_google_cloud_optimization_v1_OptimizeToursValidationError_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_optimization_v1_OptimizeToursValidationError_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_optimization_v1_OptimizeToursValidationError_descriptor, diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationError.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationError.java index 914a5b43ce46..ea678a418f41 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationError.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationError.java @@ -1809,6 +1809,13 @@ public com.google.protobuf.Parser getParserForType() { * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; * * BREAK_ERROR = 48; * * BREAK_RULE_EMPTY = 4800; * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; @@ -2848,6 +2855,13 @@ public Builder mergeFrom( * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; * * BREAK_ERROR = 48; * * BREAK_RULE_EMPTY = 4800; * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; @@ -3099,6 +3113,13 @@ public int getCode() { * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; * * BREAK_ERROR = 48; * * BREAK_RULE_EMPTY = 4800; * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; @@ -3354,6 +3375,13 @@ public Builder setCode(int value) { * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; * * BREAK_ERROR = 48; * * BREAK_RULE_EMPTY = 4800; * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationErrorOrBuilder.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationErrorOrBuilder.java index bd0f8d69a5c4..2e2d9a3e6699 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationErrorOrBuilder.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/OptimizeToursValidationErrorOrBuilder.java @@ -219,6 +219,13 @@ public interface OptimizeToursValidationErrorOrBuilder * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; * * BREAK_ERROR = 48; * * BREAK_RULE_EMPTY = 4800; * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/RouteModifiers.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/RouteModifiers.java new file mode 100644 index 000000000000..d322b4f7f0e5 --- /dev/null +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/RouteModifiers.java @@ -0,0 +1,851 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/optimization/v1/fleet_routing.proto + +package com.google.cloud.optimization.v1; + +/** + * + * + *
+ * Encapsulates a set of optional conditions to satisfy when calculating
+ * vehicle routes. This is similar to `RouteModifiers` in the Google Maps
+ * Platform API; see:
+ * https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.
+ * 
+ * + * Protobuf type {@code google.cloud.optimization.v1.RouteModifiers} + */ +public final class RouteModifiers extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.RouteModifiers) + RouteModifiersOrBuilder { + private static final long serialVersionUID = 0L; + // Use RouteModifiers.newBuilder() to construct. + private RouteModifiers(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RouteModifiers() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RouteModifiers(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.optimization.v1.FleetRoutingProto + .internal_static_google_cloud_optimization_v1_RouteModifiers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.optimization.v1.FleetRoutingProto + .internal_static_google_cloud_optimization_v1_RouteModifiers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.optimization.v1.RouteModifiers.class, + com.google.cloud.optimization.v1.RouteModifiers.Builder.class); + } + + public static final int AVOID_TOLLS_FIELD_NUMBER = 2; + private boolean avoidTolls_ = false; + /** + * + * + *
+   * Specifies whether to avoid toll roads where reasonable. Preference will be
+   * given to routes not containing toll roads. Applies only to motorized travel
+   * modes.
+   * 
+ * + * bool avoid_tolls = 2; + * + * @return The avoidTolls. + */ + @java.lang.Override + public boolean getAvoidTolls() { + return avoidTolls_; + } + + public static final int AVOID_HIGHWAYS_FIELD_NUMBER = 3; + private boolean avoidHighways_ = false; + /** + * + * + *
+   * Specifies whether to avoid highways where reasonable. Preference will be
+   * given to routes not containing highways. Applies only to motorized travel
+   * modes.
+   * 
+ * + * bool avoid_highways = 3; + * + * @return The avoidHighways. + */ + @java.lang.Override + public boolean getAvoidHighways() { + return avoidHighways_; + } + + public static final int AVOID_FERRIES_FIELD_NUMBER = 4; + private boolean avoidFerries_ = false; + /** + * + * + *
+   * Specifies whether to avoid ferries where reasonable. Preference will be
+   * given to routes not containing travel by ferries. Applies only to motorized
+   * travel modes.
+   * 
+ * + * bool avoid_ferries = 4; + * + * @return The avoidFerries. + */ + @java.lang.Override + public boolean getAvoidFerries() { + return avoidFerries_; + } + + public static final int AVOID_INDOOR_FIELD_NUMBER = 5; + private boolean avoidIndoor_ = false; + /** + * + * + *
+   * Optional. Specifies whether to avoid navigating indoors where reasonable.
+   * Preference will be given to routes not containing indoor navigation.
+   * Applies only to the `WALKING` travel mode.
+   * 
+ * + * bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The avoidIndoor. + */ + @java.lang.Override + public boolean getAvoidIndoor() { + return avoidIndoor_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (avoidTolls_ != false) { + output.writeBool(2, avoidTolls_); + } + if (avoidHighways_ != false) { + output.writeBool(3, avoidHighways_); + } + if (avoidFerries_ != false) { + output.writeBool(4, avoidFerries_); + } + if (avoidIndoor_ != false) { + output.writeBool(5, avoidIndoor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (avoidTolls_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, avoidTolls_); + } + if (avoidHighways_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, avoidHighways_); + } + if (avoidFerries_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, avoidFerries_); + } + if (avoidIndoor_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, avoidIndoor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.optimization.v1.RouteModifiers)) { + return super.equals(obj); + } + com.google.cloud.optimization.v1.RouteModifiers other = + (com.google.cloud.optimization.v1.RouteModifiers) obj; + + if (getAvoidTolls() != other.getAvoidTolls()) return false; + if (getAvoidHighways() != other.getAvoidHighways()) return false; + if (getAvoidFerries() != other.getAvoidFerries()) return false; + if (getAvoidIndoor() != other.getAvoidIndoor()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AVOID_TOLLS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAvoidTolls()); + hash = (37 * hash) + AVOID_HIGHWAYS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAvoidHighways()); + hash = (37 * hash) + AVOID_FERRIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAvoidFerries()); + hash = (37 * hash) + AVOID_INDOOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAvoidIndoor()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.optimization.v1.RouteModifiers parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.optimization.v1.RouteModifiers prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Encapsulates a set of optional conditions to satisfy when calculating
+   * vehicle routes. This is similar to `RouteModifiers` in the Google Maps
+   * Platform API; see:
+   * https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.
+   * 
+ * + * Protobuf type {@code google.cloud.optimization.v1.RouteModifiers} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.RouteModifiers) + com.google.cloud.optimization.v1.RouteModifiersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.optimization.v1.FleetRoutingProto + .internal_static_google_cloud_optimization_v1_RouteModifiers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.optimization.v1.FleetRoutingProto + .internal_static_google_cloud_optimization_v1_RouteModifiers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.optimization.v1.RouteModifiers.class, + com.google.cloud.optimization.v1.RouteModifiers.Builder.class); + } + + // Construct using com.google.cloud.optimization.v1.RouteModifiers.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avoidTolls_ = false; + avoidHighways_ = false; + avoidFerries_ = false; + avoidIndoor_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.optimization.v1.FleetRoutingProto + .internal_static_google_cloud_optimization_v1_RouteModifiers_descriptor; + } + + @java.lang.Override + public com.google.cloud.optimization.v1.RouteModifiers getDefaultInstanceForType() { + return com.google.cloud.optimization.v1.RouteModifiers.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.optimization.v1.RouteModifiers build() { + com.google.cloud.optimization.v1.RouteModifiers result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.optimization.v1.RouteModifiers buildPartial() { + com.google.cloud.optimization.v1.RouteModifiers result = + new com.google.cloud.optimization.v1.RouteModifiers(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.optimization.v1.RouteModifiers result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.avoidTolls_ = avoidTolls_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.avoidHighways_ = avoidHighways_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.avoidFerries_ = avoidFerries_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.avoidIndoor_ = avoidIndoor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.optimization.v1.RouteModifiers) { + return mergeFrom((com.google.cloud.optimization.v1.RouteModifiers) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.optimization.v1.RouteModifiers other) { + if (other == com.google.cloud.optimization.v1.RouteModifiers.getDefaultInstance()) + return this; + if (other.getAvoidTolls() != false) { + setAvoidTolls(other.getAvoidTolls()); + } + if (other.getAvoidHighways() != false) { + setAvoidHighways(other.getAvoidHighways()); + } + if (other.getAvoidFerries() != false) { + setAvoidFerries(other.getAvoidFerries()); + } + if (other.getAvoidIndoor() != false) { + setAvoidIndoor(other.getAvoidIndoor()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + avoidTolls_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 16 + case 24: + { + avoidHighways_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 32: + { + avoidFerries_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 40: + { + avoidIndoor_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean avoidTolls_; + /** + * + * + *
+     * Specifies whether to avoid toll roads where reasonable. Preference will be
+     * given to routes not containing toll roads. Applies only to motorized travel
+     * modes.
+     * 
+ * + * bool avoid_tolls = 2; + * + * @return The avoidTolls. + */ + @java.lang.Override + public boolean getAvoidTolls() { + return avoidTolls_; + } + /** + * + * + *
+     * Specifies whether to avoid toll roads where reasonable. Preference will be
+     * given to routes not containing toll roads. Applies only to motorized travel
+     * modes.
+     * 
+ * + * bool avoid_tolls = 2; + * + * @param value The avoidTolls to set. + * @return This builder for chaining. + */ + public Builder setAvoidTolls(boolean value) { + + avoidTolls_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether to avoid toll roads where reasonable. Preference will be
+     * given to routes not containing toll roads. Applies only to motorized travel
+     * modes.
+     * 
+ * + * bool avoid_tolls = 2; + * + * @return This builder for chaining. + */ + public Builder clearAvoidTolls() { + bitField0_ = (bitField0_ & ~0x00000001); + avoidTolls_ = false; + onChanged(); + return this; + } + + private boolean avoidHighways_; + /** + * + * + *
+     * Specifies whether to avoid highways where reasonable. Preference will be
+     * given to routes not containing highways. Applies only to motorized travel
+     * modes.
+     * 
+ * + * bool avoid_highways = 3; + * + * @return The avoidHighways. + */ + @java.lang.Override + public boolean getAvoidHighways() { + return avoidHighways_; + } + /** + * + * + *
+     * Specifies whether to avoid highways where reasonable. Preference will be
+     * given to routes not containing highways. Applies only to motorized travel
+     * modes.
+     * 
+ * + * bool avoid_highways = 3; + * + * @param value The avoidHighways to set. + * @return This builder for chaining. + */ + public Builder setAvoidHighways(boolean value) { + + avoidHighways_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether to avoid highways where reasonable. Preference will be
+     * given to routes not containing highways. Applies only to motorized travel
+     * modes.
+     * 
+ * + * bool avoid_highways = 3; + * + * @return This builder for chaining. + */ + public Builder clearAvoidHighways() { + bitField0_ = (bitField0_ & ~0x00000002); + avoidHighways_ = false; + onChanged(); + return this; + } + + private boolean avoidFerries_; + /** + * + * + *
+     * Specifies whether to avoid ferries where reasonable. Preference will be
+     * given to routes not containing travel by ferries. Applies only to motorized
+     * travel modes.
+     * 
+ * + * bool avoid_ferries = 4; + * + * @return The avoidFerries. + */ + @java.lang.Override + public boolean getAvoidFerries() { + return avoidFerries_; + } + /** + * + * + *
+     * Specifies whether to avoid ferries where reasonable. Preference will be
+     * given to routes not containing travel by ferries. Applies only to motorized
+     * travel modes.
+     * 
+ * + * bool avoid_ferries = 4; + * + * @param value The avoidFerries to set. + * @return This builder for chaining. + */ + public Builder setAvoidFerries(boolean value) { + + avoidFerries_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether to avoid ferries where reasonable. Preference will be
+     * given to routes not containing travel by ferries. Applies only to motorized
+     * travel modes.
+     * 
+ * + * bool avoid_ferries = 4; + * + * @return This builder for chaining. + */ + public Builder clearAvoidFerries() { + bitField0_ = (bitField0_ & ~0x00000004); + avoidFerries_ = false; + onChanged(); + return this; + } + + private boolean avoidIndoor_; + /** + * + * + *
+     * Optional. Specifies whether to avoid navigating indoors where reasonable.
+     * Preference will be given to routes not containing indoor navigation.
+     * Applies only to the `WALKING` travel mode.
+     * 
+ * + * bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The avoidIndoor. + */ + @java.lang.Override + public boolean getAvoidIndoor() { + return avoidIndoor_; + } + /** + * + * + *
+     * Optional. Specifies whether to avoid navigating indoors where reasonable.
+     * Preference will be given to routes not containing indoor navigation.
+     * Applies only to the `WALKING` travel mode.
+     * 
+ * + * bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The avoidIndoor to set. + * @return This builder for chaining. + */ + public Builder setAvoidIndoor(boolean value) { + + avoidIndoor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies whether to avoid navigating indoors where reasonable.
+     * Preference will be given to routes not containing indoor navigation.
+     * Applies only to the `WALKING` travel mode.
+     * 
+ * + * bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAvoidIndoor() { + bitField0_ = (bitField0_ & ~0x00000008); + avoidIndoor_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.RouteModifiers) + } + + // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.RouteModifiers) + private static final com.google.cloud.optimization.v1.RouteModifiers DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.optimization.v1.RouteModifiers(); + } + + public static com.google.cloud.optimization.v1.RouteModifiers getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouteModifiers parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.optimization.v1.RouteModifiers getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/RouteModifiersOrBuilder.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/RouteModifiersOrBuilder.java new file mode 100644 index 000000000000..abae3a932858 --- /dev/null +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/RouteModifiersOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/optimization/v1/fleet_routing.proto + +package com.google.cloud.optimization.v1; + +public interface RouteModifiersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.RouteModifiers) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specifies whether to avoid toll roads where reasonable. Preference will be
+   * given to routes not containing toll roads. Applies only to motorized travel
+   * modes.
+   * 
+ * + * bool avoid_tolls = 2; + * + * @return The avoidTolls. + */ + boolean getAvoidTolls(); + + /** + * + * + *
+   * Specifies whether to avoid highways where reasonable. Preference will be
+   * given to routes not containing highways. Applies only to motorized travel
+   * modes.
+   * 
+ * + * bool avoid_highways = 3; + * + * @return The avoidHighways. + */ + boolean getAvoidHighways(); + + /** + * + * + *
+   * Specifies whether to avoid ferries where reasonable. Preference will be
+   * given to routes not containing travel by ferries. Applies only to motorized
+   * travel modes.
+   * 
+ * + * bool avoid_ferries = 4; + * + * @return The avoidFerries. + */ + boolean getAvoidFerries(); + + /** + * + * + *
+   * Optional. Specifies whether to avoid navigating indoors where reasonable.
+   * Preference will be given to routes not containing indoor navigation.
+   * Applies only to the `WALKING` travel mode.
+   * 
+ * + * bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The avoidIndoor. + */ + boolean getAvoidIndoor(); +} diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRoute.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRoute.java index 57f3c3eb0166..f0266777cb96 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRoute.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRoute.java @@ -1616,7 +1616,7 @@ com.google.cloud.optimization.v1.Shipment.Load getLoadDemandsOrDefault( * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1935 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965 * @return Whether the delayBeforeStart field is set. */ @java.lang.Deprecated @@ -1635,7 +1635,7 @@ com.google.cloud.optimization.v1.Shipment.Load getLoadDemandsOrDefault( * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1935 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965 * @return The delayBeforeStart. */ @java.lang.Deprecated @@ -2376,7 +2376,7 @@ public com.google.cloud.optimization.v1.CapacityQuantityOrBuilder getArrivalLoad * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1935 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965 * @return Whether the delayBeforeStart field is set. */ @java.lang.Override @@ -2398,7 +2398,7 @@ public boolean hasDelayBeforeStart() { * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1935 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965 * @return The delayBeforeStart. */ @java.lang.Override @@ -4957,7 +4957,7 @@ public com.google.cloud.optimization.v1.CapacityQuantity.Builder addArrivalLoads * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1935 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965 * @return Whether the delayBeforeStart field is set. */ @java.lang.Deprecated @@ -4978,7 +4978,7 @@ public boolean hasDelayBeforeStart() { * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1935 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965 * @return The delayBeforeStart. */ @java.lang.Deprecated @@ -14638,7 +14638,7 @@ public com.google.cloud.optimization.v1.ShipmentRoute.TravelStepOrBuilder getTra * .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2185 + * google/cloud/optimization/v1/fleet_routing.proto;l=2215 * @return Whether the vehicleDetour field is set. */ @java.lang.Override @@ -14665,7 +14665,7 @@ public boolean hasVehicleDetour() { * .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2185 + * google/cloud/optimization/v1/fleet_routing.proto;l=2215 * @return The vehicleDetour. */ @java.lang.Override @@ -14716,7 +14716,7 @@ public com.google.protobuf.DurationOrBuilder getVehicleDetourOrBuilder() { * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. - * See google/cloud/optimization/v1/fleet_routing.proto;l=2189 + * See google/cloud/optimization/v1/fleet_routing.proto;l=2219 * @return Whether the delayBeforeVehicleEnd field is set. */ @java.lang.Override @@ -14737,7 +14737,7 @@ public boolean hasDelayBeforeVehicleEnd() { * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. - * See google/cloud/optimization/v1/fleet_routing.proto;l=2189 + * See google/cloud/optimization/v1/fleet_routing.proto;l=2219 * @return The delayBeforeVehicleEnd. */ @java.lang.Override @@ -19380,7 +19380,7 @@ public com.google.cloud.optimization.v1.ShipmentRoute.TravelStep.Builder addTrav * .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2185 + * google/cloud/optimization/v1/fleet_routing.proto;l=2215 * @return Whether the vehicleDetour field is set. */ @java.lang.Deprecated @@ -19406,7 +19406,7 @@ public boolean hasVehicleDetour() { * .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2185 + * google/cloud/optimization/v1/fleet_routing.proto;l=2215 * @return The vehicleDetour. */ @java.lang.Deprecated @@ -19650,7 +19650,7 @@ public com.google.protobuf.DurationOrBuilder getVehicleDetourOrBuilder() { * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2189 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2219 * @return Whether the delayBeforeVehicleEnd field is set. */ @java.lang.Deprecated @@ -19670,7 +19670,7 @@ public boolean hasDelayBeforeVehicleEnd() { * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is - * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2189 + * deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2219 * @return The delayBeforeVehicleEnd. */ @java.lang.Deprecated diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRouteOrBuilder.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRouteOrBuilder.java index 7ac866b13d39..90fb3dea9b76 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRouteOrBuilder.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/ShipmentRouteOrBuilder.java @@ -740,7 +740,7 @@ com.google.cloud.optimization.v1.ShipmentRoute.TravelStepOrBuilder getTravelStep * .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2185 + * google/cloud/optimization/v1/fleet_routing.proto;l=2215 * @return Whether the vehicleDetour field is set. */ @java.lang.Deprecated @@ -764,7 +764,7 @@ com.google.cloud.optimization.v1.ShipmentRoute.TravelStepOrBuilder getTravelStep * .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=2185 + * google/cloud/optimization/v1/fleet_routing.proto;l=2215 * @return The vehicleDetour. */ @java.lang.Deprecated @@ -803,7 +803,7 @@ com.google.cloud.optimization.v1.ShipmentRoute.TravelStepOrBuilder getTravelStep * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. - * See google/cloud/optimization/v1/fleet_routing.proto;l=2189 + * See google/cloud/optimization/v1/fleet_routing.proto;l=2219 * @return Whether the delayBeforeVehicleEnd field is set. */ @java.lang.Deprecated @@ -821,7 +821,7 @@ com.google.cloud.optimization.v1.ShipmentRoute.TravelStepOrBuilder getTravelStep * * * @deprecated google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. - * See google/cloud/optimization/v1/fleet_routing.proto;l=2189 + * See google/cloud/optimization/v1/fleet_routing.proto;l=2219 * @return The delayBeforeVehicleEnd. */ @java.lang.Deprecated diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/Vehicle.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/Vehicle.java index 06ffe046aefe..3dd2904dcd36 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/Vehicle.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/Vehicle.java @@ -4735,6 +4735,65 @@ public com.google.cloud.optimization.v1.Vehicle.TravelMode getTravelMode() { : result; } + public static final int ROUTE_MODIFIERS_FIELD_NUMBER = 2; + private com.google.cloud.optimization.v1.RouteModifiers routeModifiers_; + /** + * + * + *
+   * Optional. A set of conditions to satisfy that affect the way routes are
+   * calculated for the given vehicle.
+   * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routeModifiers field is set. + */ + @java.lang.Override + public boolean hasRouteModifiers() { + return routeModifiers_ != null; + } + /** + * + * + *
+   * Optional. A set of conditions to satisfy that affect the way routes are
+   * calculated for the given vehicle.
+   * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routeModifiers. + */ + @java.lang.Override + public com.google.cloud.optimization.v1.RouteModifiers getRouteModifiers() { + return routeModifiers_ == null + ? com.google.cloud.optimization.v1.RouteModifiers.getDefaultInstance() + : routeModifiers_; + } + /** + * + * + *
+   * Optional. A set of conditions to satisfy that affect the way routes are
+   * calculated for the given vehicle.
+   * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.optimization.v1.RouteModifiersOrBuilder getRouteModifiersOrBuilder() { + return routeModifiers_ == null + ? com.google.cloud.optimization.v1.RouteModifiers.getDefaultInstance() + : routeModifiers_; + } + public static final int START_LOCATION_FIELD_NUMBER = 3; private com.google.type.LatLng startLocation_; /** @@ -6195,7 +6254,7 @@ public boolean getIgnore() { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @return A list containing the breakRuleIndices. */ @java.lang.Override @@ -6218,7 +6277,7 @@ public java.util.List getBreakRuleIndicesList() { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @return The count of breakRuleIndices. */ @java.lang.Deprecated @@ -6240,7 +6299,7 @@ public int getBreakRuleIndicesCount() { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @param index The index of the element to return. * @return The breakRuleIndices at the given index. */ @@ -6569,6 +6628,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, travelMode_); } + if (routeModifiers_ != null) { + output.writeMessage(2, getRouteModifiers()); + } if (startLocation_ != null) { output.writeMessage(3, getStartLocation()); } @@ -6671,6 +6733,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, travelMode_); } + if (routeModifiers_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRouteModifiers()); + } if (startLocation_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartLocation()); } @@ -6813,6 +6878,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.optimization.v1.Vehicle other = (com.google.cloud.optimization.v1.Vehicle) obj; if (travelMode_ != other.travelMode_) return false; + if (hasRouteModifiers() != other.hasRouteModifiers()) return false; + if (hasRouteModifiers()) { + if (!getRouteModifiers().equals(other.getRouteModifiers())) return false; + } if (hasStartLocation() != other.hasStartLocation()) return false; if (hasStartLocation()) { if (!getStartLocation().equals(other.getStartLocation())) return false; @@ -6886,6 +6955,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TRAVEL_MODE_FIELD_NUMBER; hash = (53 * hash) + travelMode_; + if (hasRouteModifiers()) { + hash = (37 * hash) + ROUTE_MODIFIERS_FIELD_NUMBER; + hash = (53 * hash) + getRouteModifiers().hashCode(); + } if (hasStartLocation()) { hash = (37 * hash) + START_LOCATION_FIELD_NUMBER; hash = (53 * hash) + getStartLocation().hashCode(); @@ -7159,6 +7232,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; travelMode_ = 0; + routeModifiers_ = null; + if (routeModifiersBuilder_ != null) { + routeModifiersBuilder_.dispose(); + routeModifiersBuilder_ = null; + } startLocation_ = null; if (startLocationBuilder_ != null) { startLocationBuilder_.dispose(); @@ -7187,14 +7265,14 @@ public Builder clear() { startTimeWindows_ = null; startTimeWindowsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); if (endTimeWindowsBuilder_ == null) { endTimeWindows_ = java.util.Collections.emptyList(); } else { endTimeWindows_ = null; endTimeWindowsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); travelDurationMultiple_ = 0D; unloadingPolicy_ = 0; internalGetMutableLoadLimits().clear(); @@ -7233,21 +7311,21 @@ public Builder clear() { capacities_ = null; capacitiesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); if (startLoadIntervalsBuilder_ == null) { startLoadIntervals_ = java.util.Collections.emptyList(); } else { startLoadIntervals_ = null; startLoadIntervalsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); if (endLoadIntervalsBuilder_ == null) { endLoadIntervals_ = java.util.Collections.emptyList(); } else { endLoadIntervals_ = null; endLoadIntervalsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x10000000); return this; } @@ -7285,50 +7363,50 @@ public com.google.cloud.optimization.v1.Vehicle buildPartial() { private void buildPartialRepeatedFields(com.google.cloud.optimization.v1.Vehicle result) { if (startTimeWindowsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { startTimeWindows_ = java.util.Collections.unmodifiableList(startTimeWindows_); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } result.startTimeWindows_ = startTimeWindows_; } else { result.startTimeWindows_ = startTimeWindowsBuilder_.build(); } if (endTimeWindowsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { endTimeWindows_ = java.util.Collections.unmodifiableList(endTimeWindows_); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); } result.endTimeWindows_ = endTimeWindows_; } else { result.endTimeWindows_ = endTimeWindowsBuilder_.build(); } - if (((bitField0_ & 0x01000000) != 0)) { + if (((bitField0_ & 0x02000000) != 0)) { breakRuleIndices_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x02000000); } result.breakRuleIndices_ = breakRuleIndices_; if (capacitiesBuilder_ == null) { - if (((bitField0_ & 0x02000000) != 0)) { + if (((bitField0_ & 0x04000000) != 0)) { capacities_ = java.util.Collections.unmodifiableList(capacities_); - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); } result.capacities_ = capacities_; } else { result.capacities_ = capacitiesBuilder_.build(); } if (startLoadIntervalsBuilder_ == null) { - if (((bitField0_ & 0x04000000) != 0)) { + if (((bitField0_ & 0x08000000) != 0)) { startLoadIntervals_ = java.util.Collections.unmodifiableList(startLoadIntervals_); - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); } result.startLoadIntervals_ = startLoadIntervals_; } else { result.startLoadIntervals_ = startLoadIntervalsBuilder_.build(); } if (endLoadIntervalsBuilder_ == null) { - if (((bitField0_ & 0x08000000) != 0)) { + if (((bitField0_ & 0x10000000) != 0)) { endLoadIntervals_ = java.util.Collections.unmodifiableList(endLoadIntervals_); - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x10000000); } result.endLoadIntervals_ = endLoadIntervals_; } else { @@ -7342,85 +7420,89 @@ private void buildPartial0(com.google.cloud.optimization.v1.Vehicle result) { result.travelMode_ = travelMode_; } if (((from_bitField0_ & 0x00000002) != 0)) { + result.routeModifiers_ = + routeModifiersBuilder_ == null ? routeModifiers_ : routeModifiersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { result.startLocation_ = startLocationBuilder_ == null ? startLocation_ : startLocationBuilder_.build(); } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.startWaypoint_ = startWaypointBuilder_ == null ? startWaypoint_ : startWaypointBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.endLocation_ = endLocationBuilder_ == null ? endLocation_ : endLocationBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.endWaypoint_ = endWaypointBuilder_ == null ? endWaypoint_ : endWaypointBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { startTags_.makeImmutable(); result.startTags_ = startTags_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { endTags_.makeImmutable(); result.endTags_ = endTags_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.travelDurationMultiple_ = travelDurationMultiple_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.unloadingPolicy_ = unloadingPolicy_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.loadLimits_ = internalGetLoadLimits(); result.loadLimits_.makeImmutable(); } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.costPerHour_ = costPerHour_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.costPerTraveledHour_ = costPerTraveledHour_; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.costPerKilometer_ = costPerKilometer_; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.fixedCost_ = fixedCost_; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.usedIfRouteIsEmpty_ = usedIfRouteIsEmpty_; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.routeDurationLimit_ = routeDurationLimitBuilder_ == null ? routeDurationLimit_ : routeDurationLimitBuilder_.build(); } - if (((from_bitField0_ & 0x00040000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.travelDurationLimit_ = travelDurationLimitBuilder_ == null ? travelDurationLimit_ : travelDurationLimitBuilder_.build(); } - if (((from_bitField0_ & 0x00080000) != 0)) { + if (((from_bitField0_ & 0x00100000) != 0)) { result.routeDistanceLimit_ = routeDistanceLimitBuilder_ == null ? routeDistanceLimit_ : routeDistanceLimitBuilder_.build(); } - if (((from_bitField0_ & 0x00100000) != 0)) { + if (((from_bitField0_ & 0x00200000) != 0)) { result.extraVisitDurationForVisitType_ = internalGetExtraVisitDurationForVisitType(); result.extraVisitDurationForVisitType_.makeImmutable(); } - if (((from_bitField0_ & 0x00200000) != 0)) { + if (((from_bitField0_ & 0x00400000) != 0)) { result.breakRule_ = breakRuleBuilder_ == null ? breakRule_ : breakRuleBuilder_.build(); } - if (((from_bitField0_ & 0x00400000) != 0)) { + if (((from_bitField0_ & 0x00800000) != 0)) { result.label_ = label_; } - if (((from_bitField0_ & 0x00800000) != 0)) { + if (((from_bitField0_ & 0x01000000) != 0)) { result.ignore_ = ignore_; } result.bitField0_ |= to_bitField0_; @@ -7474,6 +7556,9 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (other.travelMode_ != 0) { setTravelModeValue(other.getTravelModeValue()); } + if (other.hasRouteModifiers()) { + mergeRouteModifiers(other.getRouteModifiers()); + } if (other.hasStartLocation()) { mergeStartLocation(other.getStartLocation()); } @@ -7489,7 +7574,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.startTags_.isEmpty()) { if (startTags_.isEmpty()) { startTags_ = other.startTags_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; } else { ensureStartTagsIsMutable(); startTags_.addAll(other.startTags_); @@ -7499,7 +7584,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.endTags_.isEmpty()) { if (endTags_.isEmpty()) { endTags_ = other.endTags_; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } else { ensureEndTagsIsMutable(); endTags_.addAll(other.endTags_); @@ -7510,7 +7595,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.startTimeWindows_.isEmpty()) { if (startTimeWindows_.isEmpty()) { startTimeWindows_ = other.startTimeWindows_; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensureStartTimeWindowsIsMutable(); startTimeWindows_.addAll(other.startTimeWindows_); @@ -7523,7 +7608,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { startTimeWindowsBuilder_.dispose(); startTimeWindowsBuilder_ = null; startTimeWindows_ = other.startTimeWindows_; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); startTimeWindowsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getStartTimeWindowsFieldBuilder() @@ -7537,7 +7622,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.endTimeWindows_.isEmpty()) { if (endTimeWindows_.isEmpty()) { endTimeWindows_ = other.endTimeWindows_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); } else { ensureEndTimeWindowsIsMutable(); endTimeWindows_.addAll(other.endTimeWindows_); @@ -7550,7 +7635,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { endTimeWindowsBuilder_.dispose(); endTimeWindowsBuilder_ = null; endTimeWindows_ = other.endTimeWindows_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); endTimeWindowsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndTimeWindowsFieldBuilder() @@ -7567,7 +7652,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { setUnloadingPolicyValue(other.getUnloadingPolicyValue()); } internalGetMutableLoadLimits().mergeFrom(other.internalGetLoadLimits()); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; if (other.getCostPerHour() != 0D) { setCostPerHour(other.getCostPerHour()); } @@ -7594,13 +7679,13 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { } internalGetMutableExtraVisitDurationForVisitType() .mergeFrom(other.internalGetExtraVisitDurationForVisitType()); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; if (other.hasBreakRule()) { mergeBreakRule(other.getBreakRule()); } if (!other.getLabel().isEmpty()) { label_ = other.label_; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); } if (other.getIgnore() != false) { @@ -7609,7 +7694,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.breakRuleIndices_.isEmpty()) { if (breakRuleIndices_.isEmpty()) { breakRuleIndices_ = other.breakRuleIndices_; - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x02000000); } else { ensureBreakRuleIndicesIsMutable(); breakRuleIndices_.addAll(other.breakRuleIndices_); @@ -7620,7 +7705,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.capacities_.isEmpty()) { if (capacities_.isEmpty()) { capacities_ = other.capacities_; - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); } else { ensureCapacitiesIsMutable(); capacities_.addAll(other.capacities_); @@ -7633,7 +7718,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { capacitiesBuilder_.dispose(); capacitiesBuilder_ = null; capacities_ = other.capacities_; - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); capacitiesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getCapacitiesFieldBuilder() @@ -7647,7 +7732,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.startLoadIntervals_.isEmpty()) { if (startLoadIntervals_.isEmpty()) { startLoadIntervals_ = other.startLoadIntervals_; - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); } else { ensureStartLoadIntervalsIsMutable(); startLoadIntervals_.addAll(other.startLoadIntervals_); @@ -7660,7 +7745,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { startLoadIntervalsBuilder_.dispose(); startLoadIntervalsBuilder_ = null; startLoadIntervals_ = other.startLoadIntervals_; - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); startLoadIntervalsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getStartLoadIntervalsFieldBuilder() @@ -7674,7 +7759,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { if (!other.endLoadIntervals_.isEmpty()) { if (endLoadIntervals_.isEmpty()) { endLoadIntervals_ = other.endLoadIntervals_; - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x10000000); } else { ensureEndLoadIntervalsIsMutable(); endLoadIntervals_.addAll(other.endLoadIntervals_); @@ -7687,7 +7772,7 @@ public Builder mergeFrom(com.google.cloud.optimization.v1.Vehicle other) { endLoadIntervalsBuilder_.dispose(); endLoadIntervalsBuilder_ = null; endLoadIntervals_ = other.endLoadIntervals_; - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x10000000); endLoadIntervalsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndLoadIntervalsFieldBuilder() @@ -7729,28 +7814,34 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 18: + { + input.readMessage(getRouteModifiersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 case 26: { input.readMessage(getStartLocationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage(getStartWaypointFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage(getEndLocationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage(getEndWaypointFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 50 case 58: @@ -7796,13 +7887,13 @@ public Builder mergeFrom( case 89: { travelDurationMultiple_ = input.readDouble(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 89 case 96: { unloadingPolicy_ = input.readEnum(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 96 case 106: @@ -7850,52 +7941,52 @@ public Builder mergeFrom( case 129: { costPerHour_ = input.readDouble(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 129 case 137: { costPerTraveledHour_ = input.readDouble(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 137 case 145: { costPerKilometer_ = input.readDouble(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 145 case 153: { fixedCost_ = input.readDouble(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 153 case 160: { usedIfRouteIsEmpty_ = input.readBool(); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 160 case 170: { input.readMessage( getRouteDurationLimitFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 170 case 178: { input.readMessage( getTravelDurationLimitFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; break; } // case 178 case 186: { input.readMessage( getRouteDistanceLimitFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 186 case 194: @@ -7911,25 +8002,25 @@ public Builder mergeFrom( .put( extraVisitDurationForVisitType__.getKey(), extraVisitDurationForVisitType__.getValue()); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; break; } // case 194 case 202: { input.readMessage(getBreakRuleFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; break; } // case 202 case 218: { label_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; break; } // case 218 case 224: { ignore_ = input.readBool(); - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; break; } // case 224 case 232: @@ -7961,7 +8052,7 @@ public Builder mergeFrom( internalGetMutableLoadLimits() .getMutableMap() .put(loadLimits__.getKey(), loadLimits__.getValue()); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 242 default: @@ -8080,6 +8171,218 @@ public Builder clearTravelMode() { return this; } + private com.google.cloud.optimization.v1.RouteModifiers routeModifiers_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.optimization.v1.RouteModifiers, + com.google.cloud.optimization.v1.RouteModifiers.Builder, + com.google.cloud.optimization.v1.RouteModifiersOrBuilder> + routeModifiersBuilder_; + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routeModifiers field is set. + */ + public boolean hasRouteModifiers() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routeModifiers. + */ + public com.google.cloud.optimization.v1.RouteModifiers getRouteModifiers() { + if (routeModifiersBuilder_ == null) { + return routeModifiers_ == null + ? com.google.cloud.optimization.v1.RouteModifiers.getDefaultInstance() + : routeModifiers_; + } else { + return routeModifiersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRouteModifiers(com.google.cloud.optimization.v1.RouteModifiers value) { + if (routeModifiersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routeModifiers_ = value; + } else { + routeModifiersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRouteModifiers( + com.google.cloud.optimization.v1.RouteModifiers.Builder builderForValue) { + if (routeModifiersBuilder_ == null) { + routeModifiers_ = builderForValue.build(); + } else { + routeModifiersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRouteModifiers(com.google.cloud.optimization.v1.RouteModifiers value) { + if (routeModifiersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && routeModifiers_ != null + && routeModifiers_ + != com.google.cloud.optimization.v1.RouteModifiers.getDefaultInstance()) { + getRouteModifiersBuilder().mergeFrom(value); + } else { + routeModifiers_ = value; + } + } else { + routeModifiersBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRouteModifiers() { + bitField0_ = (bitField0_ & ~0x00000002); + routeModifiers_ = null; + if (routeModifiersBuilder_ != null) { + routeModifiersBuilder_.dispose(); + routeModifiersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.optimization.v1.RouteModifiers.Builder getRouteModifiersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRouteModifiersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.optimization.v1.RouteModifiersOrBuilder getRouteModifiersOrBuilder() { + if (routeModifiersBuilder_ != null) { + return routeModifiersBuilder_.getMessageOrBuilder(); + } else { + return routeModifiers_ == null + ? com.google.cloud.optimization.v1.RouteModifiers.getDefaultInstance() + : routeModifiers_; + } + } + /** + * + * + *
+     * Optional. A set of conditions to satisfy that affect the way routes are
+     * calculated for the given vehicle.
+     * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.optimization.v1.RouteModifiers, + com.google.cloud.optimization.v1.RouteModifiers.Builder, + com.google.cloud.optimization.v1.RouteModifiersOrBuilder> + getRouteModifiersFieldBuilder() { + if (routeModifiersBuilder_ == null) { + routeModifiersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.optimization.v1.RouteModifiers, + com.google.cloud.optimization.v1.RouteModifiers.Builder, + com.google.cloud.optimization.v1.RouteModifiersOrBuilder>( + getRouteModifiers(), getParentForChildren(), isClean()); + routeModifiers_ = null; + } + return routeModifiersBuilder_; + } + private com.google.type.LatLng startLocation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> @@ -8099,7 +8402,7 @@ public Builder clearTravelMode() { * @return Whether the startLocation field is set. */ public boolean hasStartLocation() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -8145,7 +8448,7 @@ public Builder setStartLocation(com.google.type.LatLng value) { } else { startLocationBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -8167,7 +8470,7 @@ public Builder setStartLocation(com.google.type.LatLng.Builder builderForValue) } else { startLocationBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -8185,7 +8488,7 @@ public Builder setStartLocation(com.google.type.LatLng.Builder builderForValue) */ public Builder mergeStartLocation(com.google.type.LatLng value) { if (startLocationBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) + if (((bitField0_ & 0x00000004) != 0) && startLocation_ != null && startLocation_ != com.google.type.LatLng.getDefaultInstance()) { getStartLocationBuilder().mergeFrom(value); @@ -8195,7 +8498,7 @@ public Builder mergeStartLocation(com.google.type.LatLng value) { } else { startLocationBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -8212,7 +8515,7 @@ public Builder mergeStartLocation(com.google.type.LatLng value) { * .google.type.LatLng start_location = 3; */ public Builder clearStartLocation() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); startLocation_ = null; if (startLocationBuilder_ != null) { startLocationBuilder_.dispose(); @@ -8234,7 +8537,7 @@ public Builder clearStartLocation() { * .google.type.LatLng start_location = 3; */ public com.google.type.LatLng.Builder getStartLocationBuilder() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return getStartLocationFieldBuilder().getBuilder(); } @@ -8308,7 +8611,7 @@ public com.google.type.LatLngOrBuilder getStartLocationOrBuilder() { * @return Whether the startWaypoint field is set. */ public boolean hasStartWaypoint() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -8356,7 +8659,7 @@ public Builder setStartWaypoint(com.google.cloud.optimization.v1.Waypoint value) } else { startWaypointBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -8380,7 +8683,7 @@ public Builder setStartWaypoint( } else { startWaypointBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -8399,7 +8702,7 @@ public Builder setStartWaypoint( */ public Builder mergeStartWaypoint(com.google.cloud.optimization.v1.Waypoint value) { if (startWaypointBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && startWaypoint_ != null && startWaypoint_ != com.google.cloud.optimization.v1.Waypoint.getDefaultInstance()) { getStartWaypointBuilder().mergeFrom(value); @@ -8409,7 +8712,7 @@ public Builder mergeStartWaypoint(com.google.cloud.optimization.v1.Waypoint valu } else { startWaypointBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -8427,7 +8730,7 @@ public Builder mergeStartWaypoint(com.google.cloud.optimization.v1.Waypoint valu * .google.cloud.optimization.v1.Waypoint start_waypoint = 4; */ public Builder clearStartWaypoint() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); startWaypoint_ = null; if (startWaypointBuilder_ != null) { startWaypointBuilder_.dispose(); @@ -8450,7 +8753,7 @@ public Builder clearStartWaypoint() { * .google.cloud.optimization.v1.Waypoint start_waypoint = 4; */ public com.google.cloud.optimization.v1.Waypoint.Builder getStartWaypointBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return getStartWaypointFieldBuilder().getBuilder(); } @@ -8526,7 +8829,7 @@ public com.google.cloud.optimization.v1.WaypointOrBuilder getStartWaypointOrBuil * @return Whether the endLocation field is set. */ public boolean hasEndLocation() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -8572,7 +8875,7 @@ public Builder setEndLocation(com.google.type.LatLng value) { } else { endLocationBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -8595,7 +8898,7 @@ public Builder setEndLocation(com.google.type.LatLng.Builder builderForValue) { } else { endLocationBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -8614,7 +8917,7 @@ public Builder setEndLocation(com.google.type.LatLng.Builder builderForValue) { */ public Builder mergeEndLocation(com.google.type.LatLng value) { if (endLocationBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && endLocation_ != null && endLocation_ != com.google.type.LatLng.getDefaultInstance()) { getEndLocationBuilder().mergeFrom(value); @@ -8624,7 +8927,7 @@ public Builder mergeEndLocation(com.google.type.LatLng value) { } else { endLocationBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -8642,7 +8945,7 @@ public Builder mergeEndLocation(com.google.type.LatLng value) { * .google.type.LatLng end_location = 5; */ public Builder clearEndLocation() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); endLocation_ = null; if (endLocationBuilder_ != null) { endLocationBuilder_.dispose(); @@ -8665,7 +8968,7 @@ public Builder clearEndLocation() { * .google.type.LatLng end_location = 5; */ public com.google.type.LatLng.Builder getEndLocationBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getEndLocationFieldBuilder().getBuilder(); } @@ -8740,7 +9043,7 @@ public com.google.type.LatLngOrBuilder getEndLocationOrBuilder() { * @return Whether the endWaypoint field is set. */ public boolean hasEndWaypoint() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -8790,7 +9093,7 @@ public Builder setEndWaypoint(com.google.cloud.optimization.v1.Waypoint value) { } else { endWaypointBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8815,7 +9118,7 @@ public Builder setEndWaypoint( } else { endWaypointBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8835,7 +9138,7 @@ public Builder setEndWaypoint( */ public Builder mergeEndWaypoint(com.google.cloud.optimization.v1.Waypoint value) { if (endWaypointBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && endWaypoint_ != null && endWaypoint_ != com.google.cloud.optimization.v1.Waypoint.getDefaultInstance()) { getEndWaypointBuilder().mergeFrom(value); @@ -8845,7 +9148,7 @@ public Builder mergeEndWaypoint(com.google.cloud.optimization.v1.Waypoint value) } else { endWaypointBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -8864,7 +9167,7 @@ public Builder mergeEndWaypoint(com.google.cloud.optimization.v1.Waypoint value) * .google.cloud.optimization.v1.Waypoint end_waypoint = 6; */ public Builder clearEndWaypoint() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); endWaypoint_ = null; if (endWaypointBuilder_ != null) { endWaypointBuilder_.dispose(); @@ -8888,7 +9191,7 @@ public Builder clearEndWaypoint() { * .google.cloud.optimization.v1.Waypoint end_waypoint = 6; */ public com.google.cloud.optimization.v1.Waypoint.Builder getEndWaypointBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getEndWaypointFieldBuilder().getBuilder(); } @@ -8953,7 +9256,7 @@ private void ensureStartTagsIsMutable() { if (!startTags_.isModifiable()) { startTags_ = new com.google.protobuf.LazyStringArrayList(startTags_); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; } /** * @@ -9043,7 +9346,7 @@ public Builder setStartTags(int index, java.lang.String value) { } ensureStartTagsIsMutable(); startTags_.set(index, value); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9067,7 +9370,7 @@ public Builder addStartTags(java.lang.String value) { } ensureStartTagsIsMutable(); startTags_.add(value); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9088,7 +9391,7 @@ public Builder addStartTags(java.lang.String value) { public Builder addAllStartTags(java.lang.Iterable values) { ensureStartTagsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, startTags_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9107,7 +9410,7 @@ public Builder addAllStartTags(java.lang.Iterable values) { */ public Builder clearStartTags() { startTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); ; onChanged(); return this; @@ -9133,7 +9436,7 @@ public Builder addStartTagsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureStartTagsIsMutable(); startTags_.add(value); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9145,7 +9448,7 @@ private void ensureEndTagsIsMutable() { if (!endTags_.isModifiable()) { endTags_ = new com.google.protobuf.LazyStringArrayList(endTags_); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } /** * @@ -9235,7 +9538,7 @@ public Builder setEndTags(int index, java.lang.String value) { } ensureEndTagsIsMutable(); endTags_.set(index, value); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9259,7 +9562,7 @@ public Builder addEndTags(java.lang.String value) { } ensureEndTagsIsMutable(); endTags_.add(value); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9280,7 +9583,7 @@ public Builder addEndTags(java.lang.String value) { public Builder addAllEndTags(java.lang.Iterable values) { ensureEndTagsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endTags_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9299,7 +9602,7 @@ public Builder addAllEndTags(java.lang.Iterable values) { */ public Builder clearEndTags() { endTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); ; onChanged(); return this; @@ -9325,7 +9628,7 @@ public Builder addEndTagsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureEndTagsIsMutable(); endTags_.add(value); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9334,10 +9637,10 @@ public Builder addEndTagsBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureStartTimeWindowsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { + if (!((bitField0_ & 0x00000100) != 0)) { startTimeWindows_ = new java.util.ArrayList(startTimeWindows_); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; } } @@ -9676,7 +9979,7 @@ public Builder addAllStartTimeWindows( public Builder clearStartTimeWindows() { if (startTimeWindowsBuilder_ == null) { startTimeWindows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { startTimeWindowsBuilder_.clear(); @@ -9879,7 +10182,7 @@ public com.google.cloud.optimization.v1.TimeWindow.Builder addStartTimeWindowsBu com.google.cloud.optimization.v1.TimeWindow.Builder, com.google.cloud.optimization.v1.TimeWindowOrBuilder>( startTimeWindows_, - ((bitField0_ & 0x00000080) != 0), + ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); startTimeWindows_ = null; @@ -9891,10 +10194,10 @@ public com.google.cloud.optimization.v1.TimeWindow.Builder addStartTimeWindowsBu java.util.Collections.emptyList(); private void ensureEndTimeWindowsIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { + if (!((bitField0_ & 0x00000200) != 0)) { endTimeWindows_ = new java.util.ArrayList(endTimeWindows_); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } } @@ -10231,7 +10534,7 @@ public Builder addAllEndTimeWindows( public Builder clearEndTimeWindows() { if (endTimeWindowsBuilder_ == null) { endTimeWindows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); } else { endTimeWindowsBuilder_.clear(); @@ -10432,7 +10735,7 @@ public com.google.cloud.optimization.v1.TimeWindow.Builder addEndTimeWindowsBuil com.google.cloud.optimization.v1.TimeWindow.Builder, com.google.cloud.optimization.v1.TimeWindowOrBuilder>( endTimeWindows_, - ((bitField0_ & 0x00000100) != 0), + ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); endTimeWindows_ = null; @@ -10466,7 +10769,7 @@ public com.google.cloud.optimization.v1.TimeWindow.Builder addEndTimeWindowsBuil */ @java.lang.Override public boolean hasTravelDurationMultiple() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -10522,7 +10825,7 @@ public double getTravelDurationMultiple() { public Builder setTravelDurationMultiple(double value) { travelDurationMultiple_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -10550,7 +10853,7 @@ public Builder setTravelDurationMultiple(double value) { * @return This builder for chaining. */ public Builder clearTravelDurationMultiple() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); travelDurationMultiple_ = 0D; onChanged(); return this; @@ -10586,7 +10889,7 @@ public int getUnloadingPolicyValue() { */ public Builder setUnloadingPolicyValue(int value) { unloadingPolicy_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -10626,7 +10929,7 @@ public Builder setUnloadingPolicy( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; unloadingPolicy_ = value.getNumber(); onChanged(); return this; @@ -10643,7 +10946,7 @@ public Builder setUnloadingPolicy( * @return This builder for chaining. */ public Builder clearUnloadingPolicy() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); unloadingPolicy_ = 0; onChanged(); return this; @@ -10673,7 +10976,7 @@ public Builder clearUnloadingPolicy() { if (!loadLimits_.isMutable()) { loadLimits_ = loadLimits_.copy(); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return loadLimits_; } @@ -10787,7 +11090,7 @@ public com.google.cloud.optimization.v1.Vehicle.LoadLimit getLoadLimitsOrThrow( } public Builder clearLoadLimits() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); internalGetMutableLoadLimits().getMutableMap().clear(); return this; } @@ -10817,7 +11120,7 @@ public Builder removeLoadLimits(java.lang.String key) { @java.lang.Deprecated public java.util.Map getMutableLoadLimits() { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; return internalGetMutableLoadLimits().getMutableMap(); } /** @@ -10844,7 +11147,7 @@ public Builder putLoadLimits( throw new NullPointerException("map value"); } internalGetMutableLoadLimits().getMutableMap().put(key, value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; return this; } /** @@ -10866,7 +11169,7 @@ public Builder putAllLoadLimits( java.util.Map values) { internalGetMutableLoadLimits().getMutableMap().putAll(values); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; return this; } @@ -10913,7 +11216,7 @@ public double getCostPerHour() { public Builder setCostPerHour(double value) { costPerHour_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -10935,7 +11238,7 @@ public Builder setCostPerHour(double value) { * @return This builder for chaining. */ public Builder clearCostPerHour() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); costPerHour_ = 0D; onChanged(); return this; @@ -10978,7 +11281,7 @@ public double getCostPerTraveledHour() { public Builder setCostPerTraveledHour(double value) { costPerTraveledHour_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -10997,7 +11300,7 @@ public Builder setCostPerTraveledHour(double value) { * @return This builder for chaining. */ public Builder clearCostPerTraveledHour() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); costPerTraveledHour_ = 0D; onChanged(); return this; @@ -11042,7 +11345,7 @@ public double getCostPerKilometer() { public Builder setCostPerKilometer(double value) { costPerKilometer_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -11062,7 +11365,7 @@ public Builder setCostPerKilometer(double value) { * @return This builder for chaining. */ public Builder clearCostPerKilometer() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); costPerKilometer_ = 0D; onChanged(); return this; @@ -11099,7 +11402,7 @@ public double getFixedCost() { public Builder setFixedCost(double value) { fixedCost_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -11115,7 +11418,7 @@ public Builder setFixedCost(double value) { * @return This builder for chaining. */ public Builder clearFixedCost() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); fixedCost_ = 0D; onChanged(); return this; @@ -11174,7 +11477,7 @@ public boolean getUsedIfRouteIsEmpty() { public Builder setUsedIfRouteIsEmpty(boolean value) { usedIfRouteIsEmpty_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -11201,7 +11504,7 @@ public Builder setUsedIfRouteIsEmpty(boolean value) { * @return This builder for chaining. */ public Builder clearUsedIfRouteIsEmpty() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); usedIfRouteIsEmpty_ = false; onChanged(); return this; @@ -11227,7 +11530,7 @@ public Builder clearUsedIfRouteIsEmpty() { * @return Whether the routeDurationLimit field is set. */ public boolean hasRouteDurationLimit() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -11272,7 +11575,7 @@ public Builder setRouteDurationLimit( } else { routeDurationLimitBuilder_.setMessage(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -11294,7 +11597,7 @@ public Builder setRouteDurationLimit( } else { routeDurationLimitBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -11312,7 +11615,7 @@ public Builder setRouteDurationLimit( public Builder mergeRouteDurationLimit( com.google.cloud.optimization.v1.Vehicle.DurationLimit value) { if (routeDurationLimitBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) + if (((bitField0_ & 0x00040000) != 0) && routeDurationLimit_ != null && routeDurationLimit_ != com.google.cloud.optimization.v1.Vehicle.DurationLimit.getDefaultInstance()) { @@ -11323,7 +11626,7 @@ public Builder mergeRouteDurationLimit( } else { routeDurationLimitBuilder_.mergeFrom(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -11339,7 +11642,7 @@ public Builder mergeRouteDurationLimit( * .google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21; */ public Builder clearRouteDurationLimit() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); routeDurationLimit_ = null; if (routeDurationLimitBuilder_ != null) { routeDurationLimitBuilder_.dispose(); @@ -11361,7 +11664,7 @@ public Builder clearRouteDurationLimit() { */ public com.google.cloud.optimization.v1.Vehicle.DurationLimit.Builder getRouteDurationLimitBuilder() { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return getRouteDurationLimitFieldBuilder().getBuilder(); } @@ -11434,7 +11737,7 @@ public Builder clearRouteDurationLimit() { * @return Whether the travelDurationLimit field is set. */ public boolean hasTravelDurationLimit() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -11479,7 +11782,7 @@ public Builder setTravelDurationLimit( } else { travelDurationLimitBuilder_.setMessage(value); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -11501,7 +11804,7 @@ public Builder setTravelDurationLimit( } else { travelDurationLimitBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -11519,7 +11822,7 @@ public Builder setTravelDurationLimit( public Builder mergeTravelDurationLimit( com.google.cloud.optimization.v1.Vehicle.DurationLimit value) { if (travelDurationLimitBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) + if (((bitField0_ & 0x00080000) != 0) && travelDurationLimit_ != null && travelDurationLimit_ != com.google.cloud.optimization.v1.Vehicle.DurationLimit.getDefaultInstance()) { @@ -11530,7 +11833,7 @@ public Builder mergeTravelDurationLimit( } else { travelDurationLimitBuilder_.mergeFrom(value); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -11546,7 +11849,7 @@ public Builder mergeTravelDurationLimit( * .google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; */ public Builder clearTravelDurationLimit() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); travelDurationLimit_ = null; if (travelDurationLimitBuilder_ != null) { travelDurationLimitBuilder_.dispose(); @@ -11568,7 +11871,7 @@ public Builder clearTravelDurationLimit() { */ public com.google.cloud.optimization.v1.Vehicle.DurationLimit.Builder getTravelDurationLimitBuilder() { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return getTravelDurationLimitFieldBuilder().getBuilder(); } @@ -11641,7 +11944,7 @@ public Builder clearTravelDurationLimit() { * @return Whether the routeDistanceLimit field is set. */ public boolean hasRouteDistanceLimit() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** * @@ -11685,7 +11988,7 @@ public Builder setRouteDistanceLimit(com.google.cloud.optimization.v1.DistanceLi } else { routeDistanceLimitBuilder_.setMessage(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -11707,7 +12010,7 @@ public Builder setRouteDistanceLimit( } else { routeDistanceLimitBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -11724,7 +12027,7 @@ public Builder setRouteDistanceLimit( */ public Builder mergeRouteDistanceLimit(com.google.cloud.optimization.v1.DistanceLimit value) { if (routeDistanceLimitBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) + if (((bitField0_ & 0x00100000) != 0) && routeDistanceLimit_ != null && routeDistanceLimit_ != com.google.cloud.optimization.v1.DistanceLimit.getDefaultInstance()) { @@ -11735,7 +12038,7 @@ public Builder mergeRouteDistanceLimit(com.google.cloud.optimization.v1.Distance } else { routeDistanceLimitBuilder_.mergeFrom(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -11751,7 +12054,7 @@ public Builder mergeRouteDistanceLimit(com.google.cloud.optimization.v1.Distance * .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; */ public Builder clearRouteDistanceLimit() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); routeDistanceLimit_ = null; if (routeDistanceLimitBuilder_ != null) { routeDistanceLimitBuilder_.dispose(); @@ -11772,7 +12075,7 @@ public Builder clearRouteDistanceLimit() { * .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; */ public com.google.cloud.optimization.v1.DistanceLimit.Builder getRouteDistanceLimitBuilder() { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return getRouteDistanceLimitFieldBuilder().getBuilder(); } @@ -11847,7 +12150,7 @@ public com.google.cloud.optimization.v1.DistanceLimit.Builder getRouteDistanceLi if (!extraVisitDurationForVisitType_.isMutable()) { extraVisitDurationForVisitType_ = extraVisitDurationForVisitType_.copy(); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return extraVisitDurationForVisitType_; } @@ -11973,7 +12276,7 @@ public com.google.protobuf.Duration getExtraVisitDurationForVisitTypeOrThrow( } public Builder clearExtraVisitDurationForVisitType() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); internalGetMutableExtraVisitDurationForVisitType().getMutableMap().clear(); return this; } @@ -12006,7 +12309,7 @@ public Builder removeExtraVisitDurationForVisitType(java.lang.String key) { @java.lang.Deprecated public java.util.Map getMutableExtraVisitDurationForVisitType() { - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; return internalGetMutableExtraVisitDurationForVisitType().getMutableMap(); } /** @@ -12036,7 +12339,7 @@ public Builder putExtraVisitDurationForVisitType( throw new NullPointerException("map value"); } internalGetMutableExtraVisitDurationForVisitType().getMutableMap().put(key, value); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; return this; } /** @@ -12060,7 +12363,7 @@ public Builder putExtraVisitDurationForVisitType( public Builder putAllExtraVisitDurationForVisitType( java.util.Map values) { internalGetMutableExtraVisitDurationForVisitType().getMutableMap().putAll(values); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; return this; } @@ -12083,7 +12386,7 @@ public Builder putAllExtraVisitDurationForVisitType( * @return Whether the breakRule field is set. */ public boolean hasBreakRule() { - return ((bitField0_ & 0x00200000) != 0); + return ((bitField0_ & 0x00400000) != 0); } /** * @@ -12125,7 +12428,7 @@ public Builder setBreakRule(com.google.cloud.optimization.v1.BreakRule value) { } else { breakRuleBuilder_.setMessage(value); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -12146,7 +12449,7 @@ public Builder setBreakRule( } else { breakRuleBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -12162,7 +12465,7 @@ public Builder setBreakRule( */ public Builder mergeBreakRule(com.google.cloud.optimization.v1.BreakRule value) { if (breakRuleBuilder_ == null) { - if (((bitField0_ & 0x00200000) != 0) + if (((bitField0_ & 0x00400000) != 0) && breakRule_ != null && breakRule_ != com.google.cloud.optimization.v1.BreakRule.getDefaultInstance()) { getBreakRuleBuilder().mergeFrom(value); @@ -12172,7 +12475,7 @@ public Builder mergeBreakRule(com.google.cloud.optimization.v1.BreakRule value) } else { breakRuleBuilder_.mergeFrom(value); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -12187,7 +12490,7 @@ public Builder mergeBreakRule(com.google.cloud.optimization.v1.BreakRule value) * .google.cloud.optimization.v1.BreakRule break_rule = 25; */ public Builder clearBreakRule() { - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00400000); breakRule_ = null; if (breakRuleBuilder_ != null) { breakRuleBuilder_.dispose(); @@ -12207,7 +12510,7 @@ public Builder clearBreakRule() { * .google.cloud.optimization.v1.BreakRule break_rule = 25; */ public com.google.cloud.optimization.v1.BreakRule.Builder getBreakRuleBuilder() { - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return getBreakRuleFieldBuilder().getBuilder(); } @@ -12325,7 +12628,7 @@ public Builder setLabel(java.lang.String value) { throw new NullPointerException(); } label_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -12344,7 +12647,7 @@ public Builder setLabel(java.lang.String value) { */ public Builder clearLabel() { label_ = getDefaultInstance().getLabel(); - bitField0_ = (bitField0_ & ~0x00400000); + bitField0_ = (bitField0_ & ~0x00800000); onChanged(); return this; } @@ -12368,7 +12671,7 @@ public Builder setLabelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); label_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -12428,7 +12731,7 @@ public boolean getIgnore() { public Builder setIgnore(boolean value) { ignore_ = value; - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -12456,7 +12759,7 @@ public Builder setIgnore(boolean value) { * @return This builder for chaining. */ public Builder clearIgnore() { - bitField0_ = (bitField0_ & ~0x00800000); + bitField0_ = (bitField0_ & ~0x01000000); ignore_ = false; onChanged(); return this; @@ -12465,9 +12768,9 @@ public Builder clearIgnore() { private com.google.protobuf.Internal.IntList breakRuleIndices_ = emptyIntList(); private void ensureBreakRuleIndicesIsMutable() { - if (!((bitField0_ & 0x01000000) != 0)) { + if (!((bitField0_ & 0x02000000) != 0)) { breakRuleIndices_ = mutableCopy(breakRuleIndices_); - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; } } /** @@ -12485,12 +12788,12 @@ private void ensureBreakRuleIndicesIsMutable() { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @return A list containing the breakRuleIndices. */ @java.lang.Deprecated public java.util.List getBreakRuleIndicesList() { - return ((bitField0_ & 0x01000000) != 0) + return ((bitField0_ & 0x02000000) != 0) ? java.util.Collections.unmodifiableList(breakRuleIndices_) : breakRuleIndices_; } @@ -12509,7 +12812,7 @@ public java.util.List getBreakRuleIndicesList() { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @return The count of breakRuleIndices. */ @java.lang.Deprecated @@ -12531,7 +12834,7 @@ public int getBreakRuleIndicesCount() { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @param index The index of the element to return. * @return The breakRuleIndices at the given index. */ @@ -12554,7 +12857,7 @@ public int getBreakRuleIndices(int index) { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @param index The index to set the value at. * @param value The breakRuleIndices to set. * @return This builder for chaining. @@ -12582,7 +12885,7 @@ public Builder setBreakRuleIndices(int index, int value) { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @param value The breakRuleIndices to add. * @return This builder for chaining. */ @@ -12609,7 +12912,7 @@ public Builder addBreakRuleIndices(int value) { * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @param values The breakRuleIndices to add. * @return This builder for chaining. */ @@ -12635,13 +12938,13 @@ public Builder addAllBreakRuleIndices(java.lang.Iterablerepeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearBreakRuleIndices() { breakRuleIndices_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x02000000); onChanged(); return this; } @@ -12650,10 +12953,10 @@ public Builder clearBreakRuleIndices() { java.util.Collections.emptyList(); private void ensureCapacitiesIsMutable() { - if (!((bitField0_ & 0x02000000) != 0)) { + if (!((bitField0_ & 0x04000000) != 0)) { capacities_ = new java.util.ArrayList(capacities_); - bitField0_ |= 0x02000000; + bitField0_ |= 0x04000000; } } @@ -12926,7 +13229,7 @@ public Builder addAllCapacities( public Builder clearCapacities() { if (capacitiesBuilder_ == null) { capacities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x04000000); onChanged(); } else { capacitiesBuilder_.clear(); @@ -13087,7 +13390,7 @@ public com.google.cloud.optimization.v1.CapacityQuantity.Builder addCapacitiesBu com.google.cloud.optimization.v1.CapacityQuantity, com.google.cloud.optimization.v1.CapacityQuantity.Builder, com.google.cloud.optimization.v1.CapacityQuantityOrBuilder>( - capacities_, ((bitField0_ & 0x02000000) != 0), getParentForChildren(), isClean()); + capacities_, ((bitField0_ & 0x04000000) != 0), getParentForChildren(), isClean()); capacities_ = null; } return capacitiesBuilder_; @@ -13097,11 +13400,11 @@ public com.google.cloud.optimization.v1.CapacityQuantity.Builder addCapacitiesBu startLoadIntervals_ = java.util.Collections.emptyList(); private void ensureStartLoadIntervalsIsMutable() { - if (!((bitField0_ & 0x04000000) != 0)) { + if (!((bitField0_ & 0x08000000) != 0)) { startLoadIntervals_ = new java.util.ArrayList( startLoadIntervals_); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; } } @@ -13380,7 +13683,7 @@ public Builder addAllStartLoadIntervals( public Builder clearStartLoadIntervals() { if (startLoadIntervalsBuilder_ == null) { startLoadIntervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); onChanged(); } else { startLoadIntervalsBuilder_.clear(); @@ -13546,7 +13849,7 @@ public Builder removeStartLoadIntervals(int index) { com.google.cloud.optimization.v1.CapacityQuantityInterval.Builder, com.google.cloud.optimization.v1.CapacityQuantityIntervalOrBuilder>( startLoadIntervals_, - ((bitField0_ & 0x04000000) != 0), + ((bitField0_ & 0x08000000) != 0), getParentForChildren(), isClean()); startLoadIntervals_ = null; @@ -13558,11 +13861,11 @@ public Builder removeStartLoadIntervals(int index) { endLoadIntervals_ = java.util.Collections.emptyList(); private void ensureEndLoadIntervalsIsMutable() { - if (!((bitField0_ & 0x08000000) != 0)) { + if (!((bitField0_ & 0x10000000) != 0)) { endLoadIntervals_ = new java.util.ArrayList( endLoadIntervals_); - bitField0_ |= 0x08000000; + bitField0_ |= 0x10000000; } } @@ -13841,7 +14144,7 @@ public Builder addAllEndLoadIntervals( public Builder clearEndLoadIntervals() { if (endLoadIntervalsBuilder_ == null) { endLoadIntervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x10000000); onChanged(); } else { endLoadIntervalsBuilder_.clear(); @@ -14007,7 +14310,7 @@ public Builder removeEndLoadIntervals(int index) { com.google.cloud.optimization.v1.CapacityQuantityInterval.Builder, com.google.cloud.optimization.v1.CapacityQuantityIntervalOrBuilder>( endLoadIntervals_, - ((bitField0_ & 0x08000000) != 0), + ((bitField0_ & 0x10000000) != 0), getParentForChildren(), isClean()); endLoadIntervals_ = null; diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/VehicleOrBuilder.java b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/VehicleOrBuilder.java index 23a5cbee22ec..ffd3b51866d3 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/VehicleOrBuilder.java +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/java/com/google/cloud/optimization/v1/VehicleOrBuilder.java @@ -50,6 +50,50 @@ public interface VehicleOrBuilder */ com.google.cloud.optimization.v1.Vehicle.TravelMode getTravelMode(); + /** + * + * + *
+   * Optional. A set of conditions to satisfy that affect the way routes are
+   * calculated for the given vehicle.
+   * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routeModifiers field is set. + */ + boolean hasRouteModifiers(); + /** + * + * + *
+   * Optional. A set of conditions to satisfy that affect the way routes are
+   * calculated for the given vehicle.
+   * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routeModifiers. + */ + com.google.cloud.optimization.v1.RouteModifiers getRouteModifiers(); + /** + * + * + *
+   * Optional. A set of conditions to satisfy that affect the way routes are
+   * calculated for the given vehicle.
+   * 
+ * + * + * .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.optimization.v1.RouteModifiersOrBuilder getRouteModifiersOrBuilder(); + /** * * @@ -1157,7 +1201,7 @@ com.google.protobuf.Duration getExtraVisitDurationForVisitTypeOrDefault( * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @return A list containing the breakRuleIndices. */ @java.lang.Deprecated @@ -1177,7 +1221,7 @@ com.google.protobuf.Duration getExtraVisitDurationForVisitTypeOrDefault( * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @return The count of breakRuleIndices. */ @java.lang.Deprecated @@ -1197,7 +1241,7 @@ com.google.protobuf.Duration getExtraVisitDurationForVisitTypeOrDefault( * repeated int32 break_rule_indices = 29 [deprecated = true]; * * @deprecated google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See - * google/cloud/optimization/v1/fleet_routing.proto;l=1454 + * google/cloud/optimization/v1/fleet_routing.proto;l=1484 * @param index The index of the element to return. * @return The breakRuleIndices at the given index. */ diff --git a/java-optimization/proto-google-cloud-optimization-v1/src/main/proto/google/cloud/optimization/v1/fleet_routing.proto b/java-optimization/proto-google-cloud-optimization-v1/src/main/proto/google/cloud/optimization/v1/fleet_routing.proto index 3ab8254a50d1..13dfb375d702 100644 --- a/java-optimization/proto-google-cloud-optimization-v1/src/main/proto/google/cloud/optimization/v1/fleet_routing.proto +++ b/java-optimization/proto-google-cloud-optimization-v1/src/main/proto/google/cloud/optimization/v1/fleet_routing.proto @@ -1124,6 +1124,32 @@ message ShipmentTypeRequirement { RequirementMode requirement_mode = 3; } +// Encapsulates a set of optional conditions to satisfy when calculating +// vehicle routes. This is similar to `RouteModifiers` in the Google Maps +// Platform API; see: +// https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers. +message RouteModifiers { + // Specifies whether to avoid toll roads where reasonable. Preference will be + // given to routes not containing toll roads. Applies only to motorized travel + // modes. + bool avoid_tolls = 2; + + // Specifies whether to avoid highways where reasonable. Preference will be + // given to routes not containing highways. Applies only to motorized travel + // modes. + bool avoid_highways = 3; + + // Specifies whether to avoid ferries where reasonable. Preference will be + // given to routes not containing travel by ferries. Applies only to motorized + // travel modes. + bool avoid_ferries = 4; + + // Optional. Specifies whether to avoid navigating indoors where reasonable. + // Preference will be given to routes not containing indoor navigation. + // Applies only to the `WALKING` travel mode. + bool avoid_indoor = 5 [(google.api.field_behavior) = OPTIONAL]; +} + // Models a vehicle in a shipment problem. Solving a shipment problem will // build a route starting from `start_location` and ending at `end_location` // for this vehicle. A route is a sequence of visits (see `ShipmentRoute`). @@ -1264,6 +1290,10 @@ message Vehicle { // speed. See also `travel_duration_multiple`. TravelMode travel_mode = 1; + // Optional. A set of conditions to satisfy that affect the way routes are + // calculated for the given vehicle. + RouteModifiers route_modifiers = 2 [(google.api.field_behavior) = OPTIONAL]; + // Geographic location where the vehicle starts before picking up any // shipments. If not specified, the vehicle starts at its first pickup. // If the shipment model has duration and distance matrices, `start_location` @@ -2696,6 +2726,13 @@ message OptimizeToursValidationError { // * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; // * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; // * PRECEDENCE_ERROR = 46; + // * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + // * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + // * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + // * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + // * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + // * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + // * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; // * BREAK_ERROR = 48; // * BREAK_RULE_EMPTY = 4800; // * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; diff --git a/java-orchestration-airflow/CHANGELOG.md b/java-orchestration-airflow/CHANGELOG.md index 3dcb7534666e..ace5bd6e57c5 100644 --- a/java-orchestration-airflow/CHANGELOG.md +++ b/java-orchestration-airflow/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-orchestration-airflow/README.md b/java-orchestration-airflow/README.md index 17bc600684a1..a2561cb00c02 100644 --- a/java-orchestration-airflow/README.md +++ b/java-orchestration-airflow/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-orchestration-airflow - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-orchestration-airflow:1.28.0' +implementation 'com.google.cloud:google-cloud-orchestration-airflow:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-orchestration-airflow" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-orchestration-airflow" % "1.29.0" ``` diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow-bom/pom.xml b/java-orchestration-airflow/google-cloud-orchestration-airflow-bom/pom.xml index 9d0d7fa8a109..3a99a8d74c59 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow-bom/pom.xml +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-orchestration-airflow-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-orchestration-airflow - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-orchestration-airflow-v1 - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-orchestration-airflow-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-orchestration-airflow-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-orchestration-airflow-v1beta1 - 0.31.0 + 0.32.0
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/pom.xml b/java-orchestration-airflow/google-cloud-orchestration-airflow/pom.xml index 034b64cd9d7c..f412e92016d2 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/pom.xml +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-orchestration-airflow - 1.28.0 + 1.29.0 jar Google Cloud Composer Cloud Composer is a managed Apache Airflow service that helps you create, schedule, monitor and manage workflows. Cloud Composer automation helps you create Airflow environments quickly and use Airflow-native tools, such as the powerful Airflow web interface and command line tools, so you can focus on your workflows and not your infrastructure. com.google.cloud google-cloud-orchestration-airflow-parent - 1.28.0 + 1.29.0 google-cloud-orchestration-airflow diff --git a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/pom.xml b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/pom.xml index 27eb4e5ed287..b3ccefee033c 100644 --- a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/pom.xml +++ b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-orchestration-airflow-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-orchestration-airflow-v1 GRPC library for google-cloud-orchestration-airflow com.google.cloud google-cloud-orchestration-airflow-parent - 1.28.0 + 1.29.0 diff --git a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/pom.xml b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/pom.xml index ad0f38d64a7c..1bad3e69c3c7 100644 --- a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/pom.xml +++ b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-orchestration-airflow-v1beta1 - 0.31.0 + 0.32.0 grpc-google-cloud-orchestration-airflow-v1beta1 GRPC library for google-cloud-orchestration-airflow com.google.cloud google-cloud-orchestration-airflow-parent - 1.28.0 + 1.29.0 diff --git a/java-orchestration-airflow/pom.xml b/java-orchestration-airflow/pom.xml index 4423377bd57e..ccbf5e539622 100644 --- a/java-orchestration-airflow/pom.xml +++ b/java-orchestration-airflow/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-orchestration-airflow-parent pom - 1.28.0 + 1.29.0 Google Cloud Composer Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-orchestration-airflow - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-orchestration-airflow-v1 - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-orchestration-airflow-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-orchestration-airflow-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-orchestration-airflow-v1beta1 - 0.31.0 + 0.32.0 diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml index f471354390d3..6aed2e5641f9 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-orchestration-airflow-v1 - 1.28.0 + 1.29.0 proto-google-cloud-orchestration-airflow-v1 Proto library for google-cloud-orchestration-airflow com.google.cloud google-cloud-orchestration-airflow-parent - 1.28.0 + 1.29.0 diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml index fe28d66a56f5..5ff6bd3668a7 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-orchestration-airflow-v1beta1 - 0.31.0 + 0.32.0 proto-google-cloud-orchestration-airflow-v1beta1 Proto library for google-cloud-orchestration-airflow com.google.cloud google-cloud-orchestration-airflow-parent - 1.28.0 + 1.29.0 diff --git a/java-orgpolicy/CHANGELOG.md b/java-orgpolicy/CHANGELOG.md index ed37895fa720..b4259a170f67 100644 --- a/java-orgpolicy/CHANGELOG.md +++ b/java-orgpolicy/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-orgpolicy/README.md b/java-orgpolicy/README.md index e78677189076..73367dc8c458 100644 --- a/java-orgpolicy/README.md +++ b/java-orgpolicy/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-orgpolicy - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-orgpolicy:2.28.0' +implementation 'com.google.cloud:google-cloud-orgpolicy:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-orgpolicy" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-orgpolicy" % "2.29.0" ``` diff --git a/java-orgpolicy/google-cloud-orgpolicy-bom/pom.xml b/java-orgpolicy/google-cloud-orgpolicy-bom/pom.xml index d5970d0cdfef..5228026d8209 100644 --- a/java-orgpolicy/google-cloud-orgpolicy-bom/pom.xml +++ b/java-orgpolicy/google-cloud-orgpolicy-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-orgpolicy-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -26,22 +26,22 @@ com.google.cloud google-cloud-orgpolicy - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-orgpolicy-v2 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-orgpolicy-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-orgpolicy-v2 - 2.28.0 + 2.29.0 diff --git a/java-orgpolicy/google-cloud-orgpolicy/pom.xml b/java-orgpolicy/google-cloud-orgpolicy/pom.xml index 7f355d867433..42f58915653e 100644 --- a/java-orgpolicy/google-cloud-orgpolicy/pom.xml +++ b/java-orgpolicy/google-cloud-orgpolicy/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-orgpolicy - 2.28.0 + 2.29.0 Google Cloud Org Policy The Org Policy API allows users to configure governance rules on their GCP resources across the Cloud Resource Hierarchy. @@ -11,7 +11,7 @@ com.google.cloud google-cloud-orgpolicy-parent - 2.28.0 + 2.29.0 google-cloud-orgpolicy diff --git a/java-orgpolicy/grpc-google-cloud-orgpolicy-v2/pom.xml b/java-orgpolicy/grpc-google-cloud-orgpolicy-v2/pom.xml index 43359b0538f2..82f36f761604 100644 --- a/java-orgpolicy/grpc-google-cloud-orgpolicy-v2/pom.xml +++ b/java-orgpolicy/grpc-google-cloud-orgpolicy-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-orgpolicy-v2 - 2.28.0 + 2.29.0 grpc-google-cloud-orgpolicy-v2 GRPC library for grpc-google-cloud-orgpolicy-v2 com.google.cloud google-cloud-orgpolicy-parent - 2.28.0 + 2.29.0 diff --git a/java-orgpolicy/pom.xml b/java-orgpolicy/pom.xml index dc03c36ed8cb..dc63b56d77cf 100644 --- a/java-orgpolicy/pom.xml +++ b/java-orgpolicy/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-orgpolicy-parent pom - 2.28.0 + 2.29.0 Google Cloud Org Policy Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,22 +29,22 @@ com.google.api.grpc google-cloud-orgpolicy - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-orgpolicy-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-orgpolicy-v2 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-orgpolicy-v2 - 2.28.0 + 2.29.0 diff --git a/java-orgpolicy/proto-google-cloud-orgpolicy-v1/pom.xml b/java-orgpolicy/proto-google-cloud-orgpolicy-v1/pom.xml index d4e9f7cdcc57..19d10bfb5289 100644 --- a/java-orgpolicy/proto-google-cloud-orgpolicy-v1/pom.xml +++ b/java-orgpolicy/proto-google-cloud-orgpolicy-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-orgpolicy-v1 - 2.28.0 + 2.29.0 proto-google-cloud-orgpolicy-v1 PROTO library for proto-google-cloud-orgpolicy-v1 com.google.cloud google-cloud-orgpolicy-parent - 2.28.0 + 2.29.0 diff --git a/java-orgpolicy/proto-google-cloud-orgpolicy-v2/pom.xml b/java-orgpolicy/proto-google-cloud-orgpolicy-v2/pom.xml index a91a01efd144..ada39462fe29 100644 --- a/java-orgpolicy/proto-google-cloud-orgpolicy-v2/pom.xml +++ b/java-orgpolicy/proto-google-cloud-orgpolicy-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-orgpolicy-v2 - 2.28.0 + 2.29.0 proto-google-cloud-orgpolicy-v2 PROTO library for proto-google-cloud-orgpolicy-v2 com.google.cloud google-cloud-orgpolicy-parent - 2.28.0 + 2.29.0 diff --git a/java-os-config/CHANGELOG.md b/java-os-config/CHANGELOG.md index 56aa026389bc..8517db4c8378 100644 --- a/java-os-config/CHANGELOG.md +++ b/java-os-config/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.30.0 (2023-10-11) ### Dependencies diff --git a/java-os-config/README.md b/java-os-config/README.md index 11046ca72749..5584ef14898b 100644 --- a/java-os-config/README.md +++ b/java-os-config/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-os-config - 2.30.0 + 2.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-os-config:2.30.0' +implementation 'com.google.cloud:google-cloud-os-config:2.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-os-config" % "2.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-os-config" % "2.31.0" ``` diff --git a/java-os-config/google-cloud-os-config-bom/pom.xml b/java-os-config/google-cloud-os-config-bom/pom.xml index 8da2bade890f..7f8dcf6f0874 100644 --- a/java-os-config/google-cloud-os-config-bom/pom.xml +++ b/java-os-config/google-cloud-os-config-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-os-config-bom - 2.30.0 + 2.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,37 +23,37 @@ com.google.cloud google-cloud-os-config - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-os-config-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-os-config-v1beta - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-os-config-v1alpha - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-os-config-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-os-config-v1alpha - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-os-config-v1beta - 2.30.0 + 2.31.0 diff --git a/java-os-config/google-cloud-os-config/pom.xml b/java-os-config/google-cloud-os-config/pom.xml index de2ddd8aa812..689893509daf 100644 --- a/java-os-config/google-cloud-os-config/pom.xml +++ b/java-os-config/google-cloud-os-config/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-os-config - 2.30.0 + 2.31.0 jar Google OS Config API provides OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances. com.google.cloud google-cloud-os-config-parent - 2.30.0 + 2.31.0 google-cloud-os-config diff --git a/java-os-config/grpc-google-cloud-os-config-v1/pom.xml b/java-os-config/grpc-google-cloud-os-config-v1/pom.xml index f5ac375a8a64..a0c4b120b7eb 100644 --- a/java-os-config/grpc-google-cloud-os-config-v1/pom.xml +++ b/java-os-config/grpc-google-cloud-os-config-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-os-config-v1 - 2.30.0 + 2.31.0 grpc-google-cloud-os-config-v1 GRPC library for grpc-google-cloud-os-config-v1 com.google.cloud google-cloud-os-config-parent - 2.30.0 + 2.31.0 diff --git a/java-os-config/grpc-google-cloud-os-config-v1alpha/pom.xml b/java-os-config/grpc-google-cloud-os-config-v1alpha/pom.xml index 954fe2618f29..07065b51fffd 100644 --- a/java-os-config/grpc-google-cloud-os-config-v1alpha/pom.xml +++ b/java-os-config/grpc-google-cloud-os-config-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-os-config-v1alpha - 2.30.0 + 2.31.0 grpc-google-cloud-os-config-v1alpha GRPC library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 2.30.0 + 2.31.0 diff --git a/java-os-config/grpc-google-cloud-os-config-v1beta/pom.xml b/java-os-config/grpc-google-cloud-os-config-v1beta/pom.xml index 5072f6e7b014..1352a31141b7 100644 --- a/java-os-config/grpc-google-cloud-os-config-v1beta/pom.xml +++ b/java-os-config/grpc-google-cloud-os-config-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-os-config-v1beta - 2.30.0 + 2.31.0 grpc-google-cloud-os-config-v1beta GRPC library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 2.30.0 + 2.31.0 diff --git a/java-os-config/pom.xml b/java-os-config/pom.xml index 5f8de73ec370..048aef3d6ae5 100644 --- a/java-os-config/pom.xml +++ b/java-os-config/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-os-config-parent pom - 2.30.0 + 2.31.0 Google OS Config API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.cloud google-cloud-os-config - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-os-config-v1beta - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-os-config-v1alpha - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-os-config-v1alpha - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-os-config-v1beta - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-os-config-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-os-config-v1 - 2.30.0 + 2.31.0 diff --git a/java-os-config/proto-google-cloud-os-config-v1/pom.xml b/java-os-config/proto-google-cloud-os-config-v1/pom.xml index b139760fd468..68e71dcbae1b 100644 --- a/java-os-config/proto-google-cloud-os-config-v1/pom.xml +++ b/java-os-config/proto-google-cloud-os-config-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-os-config-v1 - 2.30.0 + 2.31.0 proto-google-cloud-os-config-v1 PROTO library for proto-google-cloud-os-config-v1 com.google.cloud google-cloud-os-config-parent - 2.30.0 + 2.31.0 diff --git a/java-os-config/proto-google-cloud-os-config-v1alpha/pom.xml b/java-os-config/proto-google-cloud-os-config-v1alpha/pom.xml index 67b64a191d38..7ee85a750130 100644 --- a/java-os-config/proto-google-cloud-os-config-v1alpha/pom.xml +++ b/java-os-config/proto-google-cloud-os-config-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-os-config-v1alpha - 2.30.0 + 2.31.0 proto-google-cloud-os-config-v1alpha Proto library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 2.30.0 + 2.31.0 diff --git a/java-os-config/proto-google-cloud-os-config-v1beta/pom.xml b/java-os-config/proto-google-cloud-os-config-v1beta/pom.xml index 96a04e3aaac6..3b5289d93047 100644 --- a/java-os-config/proto-google-cloud-os-config-v1beta/pom.xml +++ b/java-os-config/proto-google-cloud-os-config-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-os-config-v1beta - 2.30.0 + 2.31.0 proto-google-cloud-os-config-v1beta Proto library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 2.30.0 + 2.31.0 diff --git a/java-os-login/CHANGELOG.md b/java-os-login/CHANGELOG.md index f76c691bf869..909059c571c1 100644 --- a/java-os-login/CHANGELOG.md +++ b/java-os-login/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.27.0 (2023-10-11) ### Dependencies diff --git a/java-os-login/README.md b/java-os-login/README.md index a432db306100..81f2bee1f8b2 100644 --- a/java-os-login/README.md +++ b/java-os-login/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-os-login - 2.27.0 + 2.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-os-login:2.27.0' +implementation 'com.google.cloud:google-cloud-os-login:2.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-os-login" % "2.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-os-login" % "2.28.0" ``` diff --git a/java-os-login/google-cloud-os-login-bom/pom.xml b/java-os-login/google-cloud-os-login-bom/pom.xml index 5299fa870303..8194640e512d 100644 --- a/java-os-login/google-cloud-os-login-bom/pom.xml +++ b/java-os-login/google-cloud-os-login-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-os-login-bom - 2.27.0 + 2.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-os-login - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-os-login-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-os-login-v1 - 2.27.0 + 2.28.0 diff --git a/java-os-login/google-cloud-os-login/pom.xml b/java-os-login/google-cloud-os-login/pom.xml index 6781853661fc..09c40015bf7e 100644 --- a/java-os-login/google-cloud-os-login/pom.xml +++ b/java-os-login/google-cloud-os-login/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-os-login - 2.27.0 + 2.28.0 jar Google Cloud OS Login Java idiomatic client for Google Cloud OS Login com.google.cloud google-cloud-os-login-parent - 2.27.0 + 2.28.0 google-cloud-os-login diff --git a/java-os-login/grpc-google-cloud-os-login-v1/pom.xml b/java-os-login/grpc-google-cloud-os-login-v1/pom.xml index 66940a79f09a..ea949d6dacf2 100644 --- a/java-os-login/grpc-google-cloud-os-login-v1/pom.xml +++ b/java-os-login/grpc-google-cloud-os-login-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-os-login-v1 - 2.27.0 + 2.28.0 grpc-google-cloud-os-login-v1 GRPC library for grpc-google-cloud-os-login-v1 com.google.cloud google-cloud-os-login-parent - 2.27.0 + 2.28.0 diff --git a/java-os-login/pom.xml b/java-os-login/pom.xml index ce2bf3cd81de..e17c3368c9a3 100644 --- a/java-os-login/pom.xml +++ b/java-os-login/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-os-login-parent pom - 2.27.0 + 2.28.0 Google Cloud OS Login Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-os-login-v1 - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-os-login-v1 - 2.27.0 + 2.28.0 com.google.cloud google-cloud-os-login - 2.27.0 + 2.28.0 diff --git a/java-os-login/proto-google-cloud-os-login-v1/pom.xml b/java-os-login/proto-google-cloud-os-login-v1/pom.xml index 2ef5c2d3b842..f74cbd10b4d1 100644 --- a/java-os-login/proto-google-cloud-os-login-v1/pom.xml +++ b/java-os-login/proto-google-cloud-os-login-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-os-login-v1 - 2.27.0 + 2.28.0 proto-google-cloud-os-login-v1 PROTO library for proto-google-cloud-os-login-v1 com.google.cloud google-cloud-os-login-parent - 2.27.0 + 2.28.0 diff --git a/java-phishingprotection/CHANGELOG.md b/java-phishingprotection/CHANGELOG.md index 54a47f2d7a1e..de9458465827 100644 --- a/java-phishingprotection/CHANGELOG.md +++ b/java-phishingprotection/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.60.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.59.0 (2023-10-11) ### Dependencies diff --git a/java-phishingprotection/README.md b/java-phishingprotection/README.md index 959fc3e34366..8f9dea118e12 100644 --- a/java-phishingprotection/README.md +++ b/java-phishingprotection/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-phishingprotection - 0.59.0 + 0.60.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-phishingprotection:0.59.0' +implementation 'com.google.cloud:google-cloud-phishingprotection:0.60.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-phishingprotection" % "0.59.0" +libraryDependencies += "com.google.cloud" % "google-cloud-phishingprotection" % "0.60.0" ``` diff --git a/java-phishingprotection/google-cloud-phishingprotection-bom/pom.xml b/java-phishingprotection/google-cloud-phishingprotection-bom/pom.xml index 5ff0de0a18bc..20f8190fe04f 100644 --- a/java-phishingprotection/google-cloud-phishingprotection-bom/pom.xml +++ b/java-phishingprotection/google-cloud-phishingprotection-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-phishingprotection-bom - 0.59.0 + 0.60.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-phishingprotection - 0.59.0 + 0.60.0 com.google.api.grpc grpc-google-cloud-phishingprotection-v1beta1 - 0.59.0 + 0.60.0 com.google.api.grpc proto-google-cloud-phishingprotection-v1beta1 - 0.59.0 + 0.60.0 diff --git a/java-phishingprotection/google-cloud-phishingprotection/pom.xml b/java-phishingprotection/google-cloud-phishingprotection/pom.xml index 6a10bd73210c..390c1e203d12 100644 --- a/java-phishingprotection/google-cloud-phishingprotection/pom.xml +++ b/java-phishingprotection/google-cloud-phishingprotection/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-phishingprotection - 0.59.0 + 0.60.0 jar Google Cloud Phishing Protection Java idiomatic client for Google Cloud Phishing Protection com.google.cloud google-cloud-phishingprotection-parent - 0.59.0 + 0.60.0 google-cloud-phishingprotection diff --git a/java-phishingprotection/grpc-google-cloud-phishingprotection-v1beta1/pom.xml b/java-phishingprotection/grpc-google-cloud-phishingprotection-v1beta1/pom.xml index 404f934708a7..94de38f0efc3 100644 --- a/java-phishingprotection/grpc-google-cloud-phishingprotection-v1beta1/pom.xml +++ b/java-phishingprotection/grpc-google-cloud-phishingprotection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-phishingprotection-v1beta1 - 0.59.0 + 0.60.0 grpc-google-cloud-phishingprotection-v1beta1 GRPC library for grpc-google-cloud-phishingprotection-v1beta1 com.google.cloud google-cloud-phishingprotection-parent - 0.59.0 + 0.60.0 diff --git a/java-phishingprotection/pom.xml b/java-phishingprotection/pom.xml index 128b1465d81d..ba9a429266a7 100644 --- a/java-phishingprotection/pom.xml +++ b/java-phishingprotection/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-phishingprotection-parent pom - 0.59.0 + 0.60.0 Google Cloud Phishing Protection Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.api.grpc proto-google-cloud-phishingprotection-v1beta1 - 0.59.0 + 0.60.0 com.google.api.grpc grpc-google-cloud-phishingprotection-v1beta1 - 0.59.0 + 0.60.0 com.google.cloud google-cloud-phishingprotection - 0.59.0 + 0.60.0 diff --git a/java-phishingprotection/proto-google-cloud-phishingprotection-v1beta1/pom.xml b/java-phishingprotection/proto-google-cloud-phishingprotection-v1beta1/pom.xml index 27908892c86a..91f1d9bcb29d 100644 --- a/java-phishingprotection/proto-google-cloud-phishingprotection-v1beta1/pom.xml +++ b/java-phishingprotection/proto-google-cloud-phishingprotection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-phishingprotection-v1beta1 - 0.59.0 + 0.60.0 proto-google-cloud-phishingprotection-v1beta1 PROTO library for proto-google-cloud-phishingprotection-v1beta1 com.google.cloud google-cloud-phishingprotection-parent - 0.59.0 + 0.60.0 diff --git a/java-policy-troubleshooter/CHANGELOG.md b/java-policy-troubleshooter/CHANGELOG.md index 9d60ff260b29..796da14e46b9 100644 --- a/java-policy-troubleshooter/CHANGELOG.md +++ b/java-policy-troubleshooter/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.27.0 (2023-10-11) ### Dependencies diff --git a/java-policy-troubleshooter/README.md b/java-policy-troubleshooter/README.md index 5de03748e496..f8e45e6120e9 100644 --- a/java-policy-troubleshooter/README.md +++ b/java-policy-troubleshooter/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-policy-troubleshooter - 1.27.0 + 1.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-policy-troubleshooter:1.27.0' +implementation 'com.google.cloud:google-cloud-policy-troubleshooter:1.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-policy-troubleshooter" % "1.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-policy-troubleshooter" % "1.28.0" ``` diff --git a/java-policy-troubleshooter/google-cloud-policy-troubleshooter-bom/pom.xml b/java-policy-troubleshooter/google-cloud-policy-troubleshooter-bom/pom.xml index 8a27e61df37e..956393cfbfc1 100644 --- a/java-policy-troubleshooter/google-cloud-policy-troubleshooter-bom/pom.xml +++ b/java-policy-troubleshooter/google-cloud-policy-troubleshooter-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-policy-troubleshooter-bom - 1.27.0 + 1.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-policy-troubleshooter - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-policy-troubleshooter-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-policy-troubleshooter-v3 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-policy-troubleshooter-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-policy-troubleshooter-v3 - 1.27.0 + 1.28.0 diff --git a/java-policy-troubleshooter/google-cloud-policy-troubleshooter/pom.xml b/java-policy-troubleshooter/google-cloud-policy-troubleshooter/pom.xml index 3116c2da1032..272eb371876e 100644 --- a/java-policy-troubleshooter/google-cloud-policy-troubleshooter/pom.xml +++ b/java-policy-troubleshooter/google-cloud-policy-troubleshooter/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-policy-troubleshooter - 1.27.0 + 1.28.0 jar Google IAM Policy Troubleshooter API makes it easier to understand why a user has access to a resource or doesn't have permission to call an API. Given an email, resource, and permission, Policy Troubleshooter examines all Identity and Access Management (IAM) policies that apply to the resource. It then reveals whether the member's roles include the permission on that resource and, if so, which policies bind the member to those roles. com.google.cloud google-cloud-policy-troubleshooter-parent - 1.27.0 + 1.28.0 google-cloud-policy-troubleshooter diff --git a/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v1/pom.xml b/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v1/pom.xml index c5f6b75cb3cb..13a4ca2bbd36 100644 --- a/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v1/pom.xml +++ b/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-policy-troubleshooter-v1 - 1.27.0 + 1.28.0 grpc-google-cloud-policy-troubleshooter-v1 GRPC library for google-cloud-policy-troubleshooter com.google.cloud google-cloud-policy-troubleshooter-parent - 1.27.0 + 1.28.0 diff --git a/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v3/pom.xml b/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v3/pom.xml index e85984b361a7..b7e2a74d2e1a 100644 --- a/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v3/pom.xml +++ b/java-policy-troubleshooter/grpc-google-cloud-policy-troubleshooter-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-policy-troubleshooter-v3 - 1.27.0 + 1.28.0 grpc-google-cloud-policy-troubleshooter-v3 GRPC library for google-cloud-policy-troubleshooter com.google.cloud google-cloud-policy-troubleshooter-parent - 1.27.0 + 1.28.0 diff --git a/java-policy-troubleshooter/pom.xml b/java-policy-troubleshooter/pom.xml index 3477917610de..8b443fd2631c 100644 --- a/java-policy-troubleshooter/pom.xml +++ b/java-policy-troubleshooter/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-policy-troubleshooter-parent pom - 1.27.0 + 1.28.0 Google IAM Policy Troubleshooter API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-policy-troubleshooter - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-policy-troubleshooter-v3 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-policy-troubleshooter-v3 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-policy-troubleshooter-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-policy-troubleshooter-v1 - 1.27.0 + 1.28.0 diff --git a/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v1/pom.xml b/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v1/pom.xml index 0e1ba4a5ea80..b4f9ce220606 100644 --- a/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v1/pom.xml +++ b/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-policy-troubleshooter-v1 - 1.27.0 + 1.28.0 proto-google-cloud-policy-troubleshooter-v1 Proto library for google-cloud-policy-troubleshooter com.google.cloud google-cloud-policy-troubleshooter-parent - 1.27.0 + 1.28.0 diff --git a/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v3/pom.xml b/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v3/pom.xml index e88f4eb9cd6a..3a9f38811fee 100644 --- a/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v3/pom.xml +++ b/java-policy-troubleshooter/proto-google-cloud-policy-troubleshooter-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-policy-troubleshooter-v3 - 1.27.0 + 1.28.0 proto-google-cloud-policy-troubleshooter-v3 Proto library for google-cloud-policy-troubleshooter com.google.cloud google-cloud-policy-troubleshooter-parent - 1.27.0 + 1.28.0 diff --git a/java-policysimulator/CHANGELOG.md b/java-policysimulator/CHANGELOG.md index dc4e8aa8bd4c..838c376d14ad 100644 --- a/java-policysimulator/CHANGELOG.md +++ b/java-policysimulator/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.8.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.7.0 (2023-10-11) ### Dependencies diff --git a/java-policysimulator/README.md b/java-policysimulator/README.md index fab790c0f6f6..13104f03e7ab 100644 --- a/java-policysimulator/README.md +++ b/java-policysimulator/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-policysimulator - 0.7.0 + 0.8.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-policysimulator:0.7.0' +implementation 'com.google.cloud:google-cloud-policysimulator:0.8.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-policysimulator" % "0.7.0" +libraryDependencies += "com.google.cloud" % "google-cloud-policysimulator" % "0.8.0" ``` diff --git a/java-policysimulator/google-cloud-policysimulator-bom/pom.xml b/java-policysimulator/google-cloud-policysimulator-bom/pom.xml index f74cf1779347..1ec79f2add39 100644 --- a/java-policysimulator/google-cloud-policysimulator-bom/pom.xml +++ b/java-policysimulator/google-cloud-policysimulator-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-policysimulator-bom - 0.7.0 + 0.8.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-policysimulator - 0.7.0 + 0.8.0 com.google.api.grpc grpc-google-cloud-policysimulator-v1 - 0.7.0 + 0.8.0 com.google.api.grpc proto-google-cloud-policysimulator-v1 - 0.7.0 + 0.8.0 diff --git a/java-policysimulator/google-cloud-policysimulator/pom.xml b/java-policysimulator/google-cloud-policysimulator/pom.xml index c553c7488e94..fd0b65ad816a 100644 --- a/java-policysimulator/google-cloud-policysimulator/pom.xml +++ b/java-policysimulator/google-cloud-policysimulator/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-policysimulator - 0.7.0 + 0.8.0 jar Google Policy Simulator API Policy Simulator API Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. com.google.cloud google-cloud-policysimulator-parent - 0.7.0 + 0.8.0 google-cloud-policysimulator diff --git a/java-policysimulator/grpc-google-cloud-policysimulator-v1/pom.xml b/java-policysimulator/grpc-google-cloud-policysimulator-v1/pom.xml index 9fdf0291a5a9..b2562eed92d0 100644 --- a/java-policysimulator/grpc-google-cloud-policysimulator-v1/pom.xml +++ b/java-policysimulator/grpc-google-cloud-policysimulator-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-policysimulator-v1 - 0.7.0 + 0.8.0 grpc-google-cloud-policysimulator-v1 GRPC library for google-cloud-policysimulator com.google.cloud google-cloud-policysimulator-parent - 0.7.0 + 0.8.0 diff --git a/java-policysimulator/pom.xml b/java-policysimulator/pom.xml index fc0bdac7331e..9247ce1732bb 100644 --- a/java-policysimulator/pom.xml +++ b/java-policysimulator/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-policysimulator-parent pom - 0.7.0 + 0.8.0 Google Policy Simulator API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-policysimulator - 0.7.0 + 0.8.0 com.google.api.grpc grpc-google-cloud-policysimulator-v1 - 0.7.0 + 0.8.0 com.google.api.grpc proto-google-cloud-policysimulator-v1 - 0.7.0 + 0.8.0 diff --git a/java-policysimulator/proto-google-cloud-policysimulator-v1/pom.xml b/java-policysimulator/proto-google-cloud-policysimulator-v1/pom.xml index eba28c410d08..a9c9445f5fe7 100644 --- a/java-policysimulator/proto-google-cloud-policysimulator-v1/pom.xml +++ b/java-policysimulator/proto-google-cloud-policysimulator-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-policysimulator-v1 - 0.7.0 + 0.8.0 proto-google-cloud-policysimulator-v1 Proto library for google-cloud-policysimulator com.google.cloud google-cloud-policysimulator-parent - 0.7.0 + 0.8.0 diff --git a/java-private-catalog/CHANGELOG.md b/java-private-catalog/CHANGELOG.md index 8d4839f4d085..f6bbb5b4f10b 100644 --- a/java-private-catalog/CHANGELOG.md +++ b/java-private-catalog/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.30.0 (2023-10-11) ### Dependencies diff --git a/java-private-catalog/README.md b/java-private-catalog/README.md index f99659be9393..59c5c45aee95 100644 --- a/java-private-catalog/README.md +++ b/java-private-catalog/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-private-catalog - 0.30.0 + 0.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-private-catalog:0.30.0' +implementation 'com.google.cloud:google-cloud-private-catalog:0.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-private-catalog" % "0.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-private-catalog" % "0.31.0" ``` diff --git a/java-private-catalog/google-cloud-private-catalog-bom/pom.xml b/java-private-catalog/google-cloud-private-catalog-bom/pom.xml index d7499fc4ee5a..964830ef6f61 100644 --- a/java-private-catalog/google-cloud-private-catalog-bom/pom.xml +++ b/java-private-catalog/google-cloud-private-catalog-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-private-catalog-bom - 0.30.0 + 0.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-private-catalog - 0.30.0 + 0.31.0 com.google.api.grpc grpc-google-cloud-private-catalog-v1beta1 - 0.30.0 + 0.31.0 com.google.api.grpc proto-google-cloud-private-catalog-v1beta1 - 0.30.0 + 0.31.0 diff --git a/java-private-catalog/google-cloud-private-catalog/pom.xml b/java-private-catalog/google-cloud-private-catalog/pom.xml index b114ac9fa828..3b84a6720688 100644 --- a/java-private-catalog/google-cloud-private-catalog/pom.xml +++ b/java-private-catalog/google-cloud-private-catalog/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-private-catalog - 0.30.0 + 0.31.0 jar Google Private Catalog Private Catalog allows developers and cloud admins to make their solutions discoverable to their internal enterprise users. Cloud admins can manage their solutions and ensure their users are always launching the latest versions. com.google.cloud google-cloud-private-catalog-parent - 0.30.0 + 0.31.0 google-cloud-private-catalog diff --git a/java-private-catalog/grpc-google-cloud-private-catalog-v1beta1/pom.xml b/java-private-catalog/grpc-google-cloud-private-catalog-v1beta1/pom.xml index e38a9992e60e..7750ae025a30 100644 --- a/java-private-catalog/grpc-google-cloud-private-catalog-v1beta1/pom.xml +++ b/java-private-catalog/grpc-google-cloud-private-catalog-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-private-catalog-v1beta1 - 0.30.0 + 0.31.0 grpc-google-cloud-private-catalog-v1beta1 GRPC library for google-cloud-private-catalog com.google.cloud google-cloud-private-catalog-parent - 0.30.0 + 0.31.0 diff --git a/java-private-catalog/pom.xml b/java-private-catalog/pom.xml index 8491a25925aa..8e792cde95cd 100644 --- a/java-private-catalog/pom.xml +++ b/java-private-catalog/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-private-catalog-parent pom - 0.30.0 + 0.31.0 Google Private Catalog Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-private-catalog - 0.30.0 + 0.31.0 com.google.api.grpc grpc-google-cloud-private-catalog-v1beta1 - 0.30.0 + 0.31.0 com.google.api.grpc proto-google-cloud-private-catalog-v1beta1 - 0.30.0 + 0.31.0 diff --git a/java-private-catalog/proto-google-cloud-private-catalog-v1beta1/pom.xml b/java-private-catalog/proto-google-cloud-private-catalog-v1beta1/pom.xml index 6b7372eedade..1656380fd9ac 100644 --- a/java-private-catalog/proto-google-cloud-private-catalog-v1beta1/pom.xml +++ b/java-private-catalog/proto-google-cloud-private-catalog-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-private-catalog-v1beta1 - 0.30.0 + 0.31.0 proto-google-cloud-private-catalog-v1beta1 Proto library for google-cloud-private-catalog com.google.cloud google-cloud-private-catalog-parent - 0.30.0 + 0.31.0 diff --git a/java-profiler/CHANGELOG.md b/java-profiler/CHANGELOG.md index 8d148825d93f..32554d88058d 100644 --- a/java-profiler/CHANGELOG.md +++ b/java-profiler/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-profiler/README.md b/java-profiler/README.md index f3f636f80c41..76ebdf4024f7 100644 --- a/java-profiler/README.md +++ b/java-profiler/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-profiler - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-profiler:2.28.0' +implementation 'com.google.cloud:google-cloud-profiler:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-profiler" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-profiler" % "2.29.0" ``` diff --git a/java-profiler/google-cloud-profiler-bom/pom.xml b/java-profiler/google-cloud-profiler-bom/pom.xml index c25a7f7e6e75..0685b68a7c48 100644 --- a/java-profiler/google-cloud-profiler-bom/pom.xml +++ b/java-profiler/google-cloud-profiler-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-profiler-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-profiler - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-profiler-v2 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-profiler-v2 - 2.28.0 + 2.29.0 diff --git a/java-profiler/google-cloud-profiler/pom.xml b/java-profiler/google-cloud-profiler/pom.xml index f2aa76dc4652..42c1732a9a42 100644 --- a/java-profiler/google-cloud-profiler/pom.xml +++ b/java-profiler/google-cloud-profiler/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-profiler - 2.28.0 + 2.29.0 jar Google Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code. com.google.cloud google-cloud-profiler-parent - 2.28.0 + 2.29.0 google-cloud-profiler diff --git a/java-profiler/grpc-google-cloud-profiler-v2/pom.xml b/java-profiler/grpc-google-cloud-profiler-v2/pom.xml index fb55c3e2bcb5..15f931b051b4 100644 --- a/java-profiler/grpc-google-cloud-profiler-v2/pom.xml +++ b/java-profiler/grpc-google-cloud-profiler-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-profiler-v2 - 2.28.0 + 2.29.0 grpc-google-cloud-profiler-v2 GRPC library for google-cloud-profiler com.google.cloud google-cloud-profiler-parent - 2.28.0 + 2.29.0 diff --git a/java-profiler/pom.xml b/java-profiler/pom.xml index 41b4dbdc0f7d..b7e213c28e5a 100644 --- a/java-profiler/pom.xml +++ b/java-profiler/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-profiler-parent pom - 2.28.0 + 2.29.0 Google Cloud Profiler Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-profiler - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-profiler-v2 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-profiler-v2 - 2.28.0 + 2.29.0 diff --git a/java-profiler/proto-google-cloud-profiler-v2/pom.xml b/java-profiler/proto-google-cloud-profiler-v2/pom.xml index ca222c09c41a..f792e7ffebfb 100644 --- a/java-profiler/proto-google-cloud-profiler-v2/pom.xml +++ b/java-profiler/proto-google-cloud-profiler-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-profiler-v2 - 2.28.0 + 2.29.0 proto-google-cloud-profiler-v2 Proto library for google-cloud-profiler com.google.cloud google-cloud-profiler-parent - 2.28.0 + 2.29.0 diff --git a/java-publicca/CHANGELOG.md b/java-publicca/CHANGELOG.md index 5a813b6289fd..7824088da36f 100644 --- a/java-publicca/CHANGELOG.md +++ b/java-publicca/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.26.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.25.0 (2023-10-11) ### Dependencies diff --git a/java-publicca/README.md b/java-publicca/README.md index 0c524dd08f9a..3b755b19fa97 100644 --- a/java-publicca/README.md +++ b/java-publicca/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-publicca - 0.25.0 + 0.26.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-publicca:0.25.0' +implementation 'com.google.cloud:google-cloud-publicca:0.26.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-publicca" % "0.25.0" +libraryDependencies += "com.google.cloud" % "google-cloud-publicca" % "0.26.0" ``` diff --git a/java-publicca/google-cloud-publicca-bom/pom.xml b/java-publicca/google-cloud-publicca-bom/pom.xml index b209fdfe6b23..33c2e15d2733 100644 --- a/java-publicca/google-cloud-publicca-bom/pom.xml +++ b/java-publicca/google-cloud-publicca-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-publicca-bom - 0.25.0 + 0.26.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-publicca - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-publicca-v1beta1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-publicca-v1beta1 - 0.25.0 + 0.26.0 diff --git a/java-publicca/google-cloud-publicca/pom.xml b/java-publicca/google-cloud-publicca/pom.xml index 22f189aa2ac9..4b9de1124b75 100644 --- a/java-publicca/google-cloud-publicca/pom.xml +++ b/java-publicca/google-cloud-publicca/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-publicca - 0.25.0 + 0.26.0 jar Google Public Certificate Authority Public Certificate Authority Certificate Manager's Public Certificate Authority (CA) functionality allows you to provision and deploy widely trusted X.509 certificates after validating that the certificate requester controls the domains. com.google.cloud google-cloud-publicca-parent - 0.25.0 + 0.26.0 google-cloud-publicca diff --git a/java-publicca/grpc-google-cloud-publicca-v1beta1/pom.xml b/java-publicca/grpc-google-cloud-publicca-v1beta1/pom.xml index c4f1711fee9d..e338fd45e3a4 100644 --- a/java-publicca/grpc-google-cloud-publicca-v1beta1/pom.xml +++ b/java-publicca/grpc-google-cloud-publicca-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-publicca-v1beta1 - 0.25.0 + 0.26.0 grpc-google-cloud-publicca-v1beta1 GRPC library for google-cloud-publicca com.google.cloud google-cloud-publicca-parent - 0.25.0 + 0.26.0 diff --git a/java-publicca/pom.xml b/java-publicca/pom.xml index 9443041551d5..8ac4d6e80ce0 100644 --- a/java-publicca/pom.xml +++ b/java-publicca/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-publicca-parent pom - 0.25.0 + 0.26.0 Google Public Certificate Authority Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-publicca - 0.25.0 + 0.26.0 com.google.api.grpc grpc-google-cloud-publicca-v1beta1 - 0.25.0 + 0.26.0 com.google.api.grpc proto-google-cloud-publicca-v1beta1 - 0.25.0 + 0.26.0 diff --git a/java-publicca/proto-google-cloud-publicca-v1beta1/pom.xml b/java-publicca/proto-google-cloud-publicca-v1beta1/pom.xml index bd9744e7fff1..fe3f453b8aee 100644 --- a/java-publicca/proto-google-cloud-publicca-v1beta1/pom.xml +++ b/java-publicca/proto-google-cloud-publicca-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-publicca-v1beta1 - 0.25.0 + 0.26.0 proto-google-cloud-publicca-v1beta1 Proto library for google-cloud-publicca com.google.cloud google-cloud-publicca-parent - 0.25.0 + 0.26.0 diff --git a/java-rapidmigrationassessment/CHANGELOG.md b/java-rapidmigrationassessment/CHANGELOG.md index 582b71562ac2..8125389054b3 100644 --- a/java-rapidmigrationassessment/CHANGELOG.md +++ b/java-rapidmigrationassessment/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.12.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.11.0 (2023-10-11) ### Dependencies diff --git a/java-rapidmigrationassessment/README.md b/java-rapidmigrationassessment/README.md index 9d84b680b966..f696888135f9 100644 --- a/java-rapidmigrationassessment/README.md +++ b/java-rapidmigrationassessment/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-rapidmigrationassessment - 0.11.0 + 0.12.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-rapidmigrationassessment:0.11.0' +implementation 'com.google.cloud:google-cloud-rapidmigrationassessment:0.12.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-rapidmigrationassessment" % "0.11.0" +libraryDependencies += "com.google.cloud" % "google-cloud-rapidmigrationassessment" % "0.12.0" ``` diff --git a/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment-bom/pom.xml b/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment-bom/pom.xml index 71b57621b9f8..f5d45b3cabab 100644 --- a/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment-bom/pom.xml +++ b/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-rapidmigrationassessment-bom - 0.11.0 + 0.12.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-rapidmigrationassessment - 0.11.0 + 0.12.0 com.google.api.grpc grpc-google-cloud-rapidmigrationassessment-v1 - 0.11.0 + 0.12.0 com.google.api.grpc proto-google-cloud-rapidmigrationassessment-v1 - 0.11.0 + 0.12.0 diff --git a/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment/pom.xml b/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment/pom.xml index 59efcaa6913e..c7f02d11fdec 100644 --- a/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment/pom.xml +++ b/java-rapidmigrationassessment/google-cloud-rapidmigrationassessment/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-rapidmigrationassessment - 0.11.0 + 0.12.0 jar Google Rapid Migration Assessment API Rapid Migration Assessment API Rapid Migration Assessment API com.google.cloud google-cloud-rapidmigrationassessment-parent - 0.11.0 + 0.12.0 google-cloud-rapidmigrationassessment diff --git a/java-rapidmigrationassessment/grpc-google-cloud-rapidmigrationassessment-v1/pom.xml b/java-rapidmigrationassessment/grpc-google-cloud-rapidmigrationassessment-v1/pom.xml index a59b364619a1..847ce104b773 100644 --- a/java-rapidmigrationassessment/grpc-google-cloud-rapidmigrationassessment-v1/pom.xml +++ b/java-rapidmigrationassessment/grpc-google-cloud-rapidmigrationassessment-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-rapidmigrationassessment-v1 - 0.11.0 + 0.12.0 grpc-google-cloud-rapidmigrationassessment-v1 GRPC library for google-cloud-rapidmigrationassessment com.google.cloud google-cloud-rapidmigrationassessment-parent - 0.11.0 + 0.12.0 diff --git a/java-rapidmigrationassessment/pom.xml b/java-rapidmigrationassessment/pom.xml index a427e62ca6d7..de0ef92a2a38 100644 --- a/java-rapidmigrationassessment/pom.xml +++ b/java-rapidmigrationassessment/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-rapidmigrationassessment-parent pom - 0.11.0 + 0.12.0 Google Rapid Migration Assessment API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-rapidmigrationassessment - 0.11.0 + 0.12.0 com.google.api.grpc grpc-google-cloud-rapidmigrationassessment-v1 - 0.11.0 + 0.12.0 com.google.api.grpc proto-google-cloud-rapidmigrationassessment-v1 - 0.11.0 + 0.12.0 diff --git a/java-rapidmigrationassessment/proto-google-cloud-rapidmigrationassessment-v1/pom.xml b/java-rapidmigrationassessment/proto-google-cloud-rapidmigrationassessment-v1/pom.xml index 99c687a58020..4e86231ed24d 100644 --- a/java-rapidmigrationassessment/proto-google-cloud-rapidmigrationassessment-v1/pom.xml +++ b/java-rapidmigrationassessment/proto-google-cloud-rapidmigrationassessment-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-rapidmigrationassessment-v1 - 0.11.0 + 0.12.0 proto-google-cloud-rapidmigrationassessment-v1 Proto library for google-cloud-rapidmigrationassessment com.google.cloud google-cloud-rapidmigrationassessment-parent - 0.11.0 + 0.12.0 diff --git a/java-recaptchaenterprise/CHANGELOG.md b/java-recaptchaenterprise/CHANGELOG.md index 499340445700..5b9d2fc17126 100644 --- a/java-recaptchaenterprise/CHANGELOG.md +++ b/java-recaptchaenterprise/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.26.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.25.0 (2023-10-11) ### Features diff --git a/java-recaptchaenterprise/README.md b/java-recaptchaenterprise/README.md index ccfa63b4d6f5..35c0db9a6e2c 100644 --- a/java-recaptchaenterprise/README.md +++ b/java-recaptchaenterprise/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-recaptchaenterprise - 3.25.0 + 3.26.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-recaptchaenterprise:3.25.0' +implementation 'com.google.cloud:google-cloud-recaptchaenterprise:3.26.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-recaptchaenterprise" % "3.25.0" +libraryDependencies += "com.google.cloud" % "google-cloud-recaptchaenterprise" % "3.26.0" ``` diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise-bom/pom.xml b/java-recaptchaenterprise/google-cloud-recaptchaenterprise-bom/pom.xml index fcb30da54160..a79353ebe415 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise-bom/pom.xml +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-recaptchaenterprise-bom - 3.25.0 + 3.26.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-recaptchaenterprise - 3.25.0 + 3.26.0 com.google.api.grpc grpc-google-cloud-recaptchaenterprise-v1 - 3.25.0 + 3.26.0 com.google.api.grpc grpc-google-cloud-recaptchaenterprise-v1beta1 - 0.67.0 + 0.68.0 com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1 - 3.25.0 + 3.26.0 com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1beta1 - 0.67.0 + 0.68.0 diff --git a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/pom.xml b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/pom.xml index dbdf0d009245..9df10af8fa1b 100644 --- a/java-recaptchaenterprise/google-cloud-recaptchaenterprise/pom.xml +++ b/java-recaptchaenterprise/google-cloud-recaptchaenterprise/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-recaptchaenterprise - 3.25.0 + 3.26.0 jar reCAPTCHA Enterprise Help protect your website from fraudulent activity, spam, and abuse. com.google.cloud google-cloud-recaptchaenterprise-parent - 3.25.0 + 3.26.0 google-cloud-recaptchaenterprise diff --git a/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/pom.xml b/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/pom.xml index 9c13a6e122df..2434035756c9 100644 --- a/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/pom.xml +++ b/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-recaptchaenterprise-v1 - 3.25.0 + 3.26.0 grpc-google-cloud-recaptchaenterprise-v1 GRPC library for grpc-google-cloud-recaptchaenterprise-v1 com.google.cloud google-cloud-recaptchaenterprise-parent - 3.25.0 + 3.26.0 diff --git a/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1beta1/pom.xml b/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1beta1/pom.xml index 32f9fd767cba..562971cc41f3 100644 --- a/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1beta1/pom.xml +++ b/java-recaptchaenterprise/grpc-google-cloud-recaptchaenterprise-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-recaptchaenterprise-v1beta1 - 0.67.0 + 0.68.0 grpc-google-cloud-recaptchaenterprise-v1beta1 GRPC library for grpc-google-cloud-recaptchaenterprise-v1beta1 com.google.cloud google-cloud-recaptchaenterprise-parent - 3.25.0 + 3.26.0 diff --git a/java-recaptchaenterprise/pom.xml b/java-recaptchaenterprise/pom.xml index 102360078e6e..4ad2bf2bc7f3 100644 --- a/java-recaptchaenterprise/pom.xml +++ b/java-recaptchaenterprise/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-recaptchaenterprise-parent pom - 3.25.0 + 3.26.0 reCAPTCHA Enterprise Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1 - 3.25.0 + 3.26.0 com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1beta1 - 0.67.0 + 0.68.0 com.google.api.grpc grpc-google-cloud-recaptchaenterprise-v1 - 3.25.0 + 3.26.0 com.google.api.grpc grpc-google-cloud-recaptchaenterprise-v1beta1 - 0.67.0 + 0.68.0 com.google.cloud google-cloud-recaptchaenterprise - 3.25.0 + 3.26.0 diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/pom.xml b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/pom.xml index 523d394e9fbe..d8582291f4e7 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/pom.xml +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1 - 3.25.0 + 3.26.0 proto-google-cloud-recaptchaenterprise-v1 PROTO library for proto-google-cloud-recaptchaenterprise-v1 com.google.cloud google-cloud-recaptchaenterprise-parent - 3.25.0 + 3.26.0 diff --git a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/pom.xml b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/pom.xml index 7c9bf54ca914..14e792e4cb2a 100644 --- a/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/pom.xml +++ b/java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1beta1 - 0.67.0 + 0.68.0 proto-google-cloud-recaptchaenterprise-v1beta1 PROTO library for proto-google-cloud-recaptchaenterprise-v1beta1 com.google.cloud google-cloud-recaptchaenterprise-parent - 3.25.0 + 3.26.0 diff --git a/java-recommendations-ai/CHANGELOG.md b/java-recommendations-ai/CHANGELOG.md index b2d80c32cf43..aa486dfabb76 100644 --- a/java-recommendations-ai/CHANGELOG.md +++ b/java-recommendations-ai/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.36.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.35.0 (2023-10-11) ### Dependencies diff --git a/java-recommendations-ai/README.md b/java-recommendations-ai/README.md index c7b8b61a2724..731b51b4ebbc 100644 --- a/java-recommendations-ai/README.md +++ b/java-recommendations-ai/README.md @@ -46,20 +46,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-recommendations-ai - 0.35.0 + 0.36.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-recommendations-ai:0.35.0' +implementation 'com.google.cloud:google-cloud-recommendations-ai:0.36.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-recommendations-ai" % "0.35.0" +libraryDependencies += "com.google.cloud" % "google-cloud-recommendations-ai" % "0.36.0" ``` diff --git a/java-recommendations-ai/google-cloud-recommendations-ai-bom/pom.xml b/java-recommendations-ai/google-cloud-recommendations-ai-bom/pom.xml index ec969c74f949..a89cd7e9d31d 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai-bom/pom.xml +++ b/java-recommendations-ai/google-cloud-recommendations-ai-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-recommendations-ai-bom - 0.35.0 + 0.36.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-recommendations-ai - 0.35.0 + 0.36.0 com.google.api.grpc grpc-google-cloud-recommendations-ai-v1beta1 - 0.35.0 + 0.36.0 com.google.api.grpc proto-google-cloud-recommendations-ai-v1beta1 - 0.35.0 + 0.36.0 diff --git a/java-recommendations-ai/google-cloud-recommendations-ai/pom.xml b/java-recommendations-ai/google-cloud-recommendations-ai/pom.xml index 0a4242c0933a..84057595b2fa 100644 --- a/java-recommendations-ai/google-cloud-recommendations-ai/pom.xml +++ b/java-recommendations-ai/google-cloud-recommendations-ai/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-recommendations-ai - 0.35.0 + 0.36.0 jar Google Recommendations AI delivers highly personalized product recommendations at scale. com.google.cloud google-cloud-recommendations-ai-parent - 0.35.0 + 0.36.0 google-cloud-recommendations-ai diff --git a/java-recommendations-ai/grpc-google-cloud-recommendations-ai-v1beta1/pom.xml b/java-recommendations-ai/grpc-google-cloud-recommendations-ai-v1beta1/pom.xml index 80e3058f43fb..07139ea4c31a 100644 --- a/java-recommendations-ai/grpc-google-cloud-recommendations-ai-v1beta1/pom.xml +++ b/java-recommendations-ai/grpc-google-cloud-recommendations-ai-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-recommendations-ai-v1beta1 - 0.35.0 + 0.36.0 grpc-google-cloud-recommendations-ai-v1beta1 GRPC library for grpc-google-cloud-recommendations-ai-v1beta1 com.google.cloud google-cloud-recommendations-ai-parent - 0.35.0 + 0.36.0 diff --git a/java-recommendations-ai/pom.xml b/java-recommendations-ai/pom.xml index 2bd3209e1e80..adad9a2978f6 100644 --- a/java-recommendations-ai/pom.xml +++ b/java-recommendations-ai/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-recommendations-ai-parent pom - 0.35.0 + 0.36.0 Google Recommendations AI Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-recommendations-ai - 0.35.0 + 0.36.0 com.google.api.grpc proto-google-cloud-recommendations-ai-v1beta1 - 0.35.0 + 0.36.0 com.google.api.grpc grpc-google-cloud-recommendations-ai-v1beta1 - 0.35.0 + 0.36.0 diff --git a/java-recommendations-ai/proto-google-cloud-recommendations-ai-v1beta1/pom.xml b/java-recommendations-ai/proto-google-cloud-recommendations-ai-v1beta1/pom.xml index 9c5d83239ef1..6c74e0635fa0 100644 --- a/java-recommendations-ai/proto-google-cloud-recommendations-ai-v1beta1/pom.xml +++ b/java-recommendations-ai/proto-google-cloud-recommendations-ai-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-recommendations-ai-v1beta1 - 0.35.0 + 0.36.0 proto-google-cloud-recommendations-ai-v1beta1 PROTO library for proto-google-cloud-recommendations-ai-v1beta1 com.google.cloud google-cloud-recommendations-ai-parent - 0.35.0 + 0.36.0 diff --git a/java-recommender/CHANGELOG.md b/java-recommender/CHANGELOG.md index 9466cda9f206..12abfdcf9f3d 100644 --- a/java-recommender/CHANGELOG.md +++ b/java-recommender/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.30.0 (2023-10-11) ### Dependencies diff --git a/java-recommender/README.md b/java-recommender/README.md index aeda4646ab71..b8cbb9a9c928 100644 --- a/java-recommender/README.md +++ b/java-recommender/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-recommender - 2.30.0 + 2.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-recommender:2.30.0' +implementation 'com.google.cloud:google-cloud-recommender:2.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-recommender" % "2.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-recommender" % "2.31.0" ``` diff --git a/java-recommender/google-cloud-recommender-bom/pom.xml b/java-recommender/google-cloud-recommender-bom/pom.xml index 212e0b34cc5e..162384ae79e1 100644 --- a/java-recommender/google-cloud-recommender-bom/pom.xml +++ b/java-recommender/google-cloud-recommender-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-recommender-bom - 2.30.0 + 2.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-recommender - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-recommender-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-recommender-v1beta1 - 0.42.0 + 0.43.0 com.google.api.grpc proto-google-cloud-recommender-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-recommender-v1beta1 - 0.42.0 + 0.43.0 diff --git a/java-recommender/google-cloud-recommender/pom.xml b/java-recommender/google-cloud-recommender/pom.xml index 6ef419b5b2e5..12a9e936e8aa 100644 --- a/java-recommender/google-cloud-recommender/pom.xml +++ b/java-recommender/google-cloud-recommender/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-recommender - 2.30.0 + 2.31.0 jar Google Cloud Recommender @@ -12,7 +12,7 @@ com.google.cloud google-cloud-recommender-parent - 2.30.0 + 2.31.0 google-cloud-recommender diff --git a/java-recommender/grpc-google-cloud-recommender-v1/pom.xml b/java-recommender/grpc-google-cloud-recommender-v1/pom.xml index 9c9d1ab73d70..cc97bf2ee6a0 100644 --- a/java-recommender/grpc-google-cloud-recommender-v1/pom.xml +++ b/java-recommender/grpc-google-cloud-recommender-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-recommender-v1 - 2.30.0 + 2.31.0 grpc-google-cloud-recommender-v1 GRPC library for grpc-google-cloud-recommender-v1 com.google.cloud google-cloud-recommender-parent - 2.30.0 + 2.31.0 diff --git a/java-recommender/grpc-google-cloud-recommender-v1beta1/pom.xml b/java-recommender/grpc-google-cloud-recommender-v1beta1/pom.xml index 896975cd0d52..b3b855928c35 100644 --- a/java-recommender/grpc-google-cloud-recommender-v1beta1/pom.xml +++ b/java-recommender/grpc-google-cloud-recommender-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-recommender-v1beta1 - 0.42.0 + 0.43.0 grpc-google-cloud-recommender-v1beta1 GRPC library for grpc-google-cloud-recommender-v1beta1 com.google.cloud google-cloud-recommender-parent - 2.30.0 + 2.31.0 diff --git a/java-recommender/pom.xml b/java-recommender/pom.xml index 6c0e649cea2a..de31977fce76 100644 --- a/java-recommender/pom.xml +++ b/java-recommender/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-recommender-parent pom - 2.30.0 + 2.31.0 Google Cloud recommender Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-recommender-v1 - 2.30.0 + 2.31.0 com.google.cloud google-cloud-recommender - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-recommender-v1beta1 - 0.42.0 + 0.43.0 com.google.api.grpc grpc-google-cloud-recommender-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-recommender-v1beta1 - 0.42.0 + 0.43.0 diff --git a/java-recommender/proto-google-cloud-recommender-v1/pom.xml b/java-recommender/proto-google-cloud-recommender-v1/pom.xml index d87f2e4de5c2..73e71dac7fc6 100644 --- a/java-recommender/proto-google-cloud-recommender-v1/pom.xml +++ b/java-recommender/proto-google-cloud-recommender-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-recommender-v1 - 2.30.0 + 2.31.0 proto-google-cloud-recommender-v1 PROTO library for proto-google-cloud-recommender-v1 com.google.cloud google-cloud-recommender-parent - 2.30.0 + 2.31.0 diff --git a/java-recommender/proto-google-cloud-recommender-v1beta1/pom.xml b/java-recommender/proto-google-cloud-recommender-v1beta1/pom.xml index 8006fcb3bcbd..dd5c52be949f 100644 --- a/java-recommender/proto-google-cloud-recommender-v1beta1/pom.xml +++ b/java-recommender/proto-google-cloud-recommender-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-recommender-v1beta1 - 0.42.0 + 0.43.0 proto-google-cloud-recommender-v1beta1 PROTO library for proto-google-cloud-recommender-v1beta1 com.google.cloud google-cloud-recommender-parent - 2.30.0 + 2.31.0 diff --git a/java-redis-cluster/.OwlBot.yaml b/java-redis-cluster/.OwlBot.yaml new file mode 100644 index 000000000000..5c7b69d775ca --- /dev/null +++ b/java-redis-cluster/.OwlBot.yaml @@ -0,0 +1,36 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-redis-cluster/grpc-google-.*/src" +- "/java-redis-cluster/proto-google-.*/src" +- "/java-redis-cluster/google-.*/src" +- "/java-redis-cluster/samples/snippets/generated" + +deep-preserve-regex: +- "/java-redis-cluster/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/redis/cluster/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-redis-cluster/$1/proto-google-cloud-redis-cluster-$1/src" +- source: "/google/cloud/redis/cluster/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-redis-cluster/$1/grpc-google-cloud-redis-cluster-$1/src" +- source: "/google/cloud/redis/cluster/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-redis-cluster/$1/google-cloud-redis-cluster/src" +- source: "/google/cloud/redis/cluster/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-redis-cluster/$1/samples/snippets/generated" + + +api-name: redis-cluster \ No newline at end of file diff --git a/java-redis-cluster/.repo-metadata.json b/java-redis-cluster/.repo-metadata.json new file mode 100644 index 000000000000..5a181b992bd6 --- /dev/null +++ b/java-redis-cluster/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "redis-cluster", + "name_pretty": "Google Cloud Memorystore for Redis API", + "product_documentation": "https://cloud.google.com/memorystore/docs/cluster", + "api_description": "Creates and manages Redis instances on the Google Cloud Platform.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-redis-cluster/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-redis-cluster", + "repo_short": "java-redis-cluster", + "distribution_name": "com.google.cloud:google-cloud-redis-cluster", + "api_id": "redis-cluster.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-redis-cluster/CHANGELOG.md b/java-redis-cluster/CHANGELOG.md new file mode 100644 index 000000000000..332b99e619a4 --- /dev/null +++ b/java-redis-cluster/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## 0.1.0 (2023-10-25) + +### Features + +* new module for redis-cluster ([#9993](https://github.com/googleapis/google-cloud-java/issues/9993)) ([c280a9c](https://github.com/googleapis/google-cloud-java/commit/c280a9cf2c26e45dfabb60d45318fe40cd67a88a)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) diff --git a/java-redis-cluster/README.md b/java-redis-cluster/README.md new file mode 100644 index 000000000000..ff00b1ca4d4b --- /dev/null +++ b/java-redis-cluster/README.md @@ -0,0 +1,225 @@ +# Google Google Cloud Memorystore for Redis API Client for Java + +Java idiomatic client for [Google Cloud Memorystore for Redis API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.25.0 + pom + import + + + + + + + com.google.cloud + google-cloud-redis-cluster + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.cloud + google-cloud-redis-cluster + 0.1.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-redis-cluster:0.1.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-redis-cluster" % "0.1.0" +``` + + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Google Cloud Memorystore for Redis API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Google Cloud Memorystore for Redis API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Google Cloud Memorystore for Redis API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Google Cloud Memorystore for Redis API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-redis-cluster` library. See the [Quickstart](#quickstart) section +to add `google-cloud-redis-cluster` as a dependency in your code. + +## About Google Cloud Memorystore for Redis API + + +[Google Cloud Memorystore for Redis API][product-docs] Creates and manages Redis instances on the Google Cloud Platform. + +See the [Google Cloud Memorystore for Redis API client library docs][javadocs] to learn how to +use this Google Cloud Memorystore for Redis API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Google Cloud Memorystore for Redis API uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/memorystore/docs/cluster +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-redis-cluster/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-redis-cluster/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-redis-cluster.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-redis-cluster/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/java-redis-cluster/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-redis-cluster/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-redis-cluster/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=redis-cluster.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-redis-cluster/google-cloud-redis-cluster-bom/pom.xml b/java-redis-cluster/google-cloud-redis-cluster-bom/pom.xml new file mode 100644 index 000000000000..403b3e5c0dcc --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster-bom/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + com.google.cloud + google-cloud-redis-cluster-bom + 0.1.0 + pom + + + com.google.cloud + google-cloud-pom-parent + 1.23.0 + ../../google-cloud-pom-parent/pom.xml + + + Google Google Cloud Memorystore for Redis API BOM + + BOM for Google Cloud Memorystore for Redis API + + + + true + + + + + + com.google.cloud + google-cloud-redis-cluster + 0.1.0 + + + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1 + 0.1.0 + + + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1beta1 + 0.1.0 + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1beta1 + 0.1.0 + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1 + 0.1.0 + + + + diff --git a/java-redis-cluster/google-cloud-redis-cluster/pom.xml b/java-redis-cluster/google-cloud-redis-cluster/pom.xml new file mode 100644 index 000000000000..4061e26152fd --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/pom.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + com.google.cloud + google-cloud-redis-cluster + 0.1.0 + jar + Google Google Cloud Memorystore for Redis API + Google Cloud Memorystore for Redis API Creates and manages Redis instances on the Google Cloud Platform. + + com.google.cloud + google-cloud-redis-cluster-parent + 0.1.0 + + + google-cloud-redis-cluster + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1beta1 + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1 + test + + + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1beta1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java new file mode 100644 index 000000000000..f0115cbf62cd --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClient.java @@ -0,0 +1,1410 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.stub.CloudRedisClusterStub; +import com.google.cloud.redis.cluster.v1.stub.CloudRedisClusterStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Configures and manages Cloud Memorystore for Redis clusters + * + *

Google Cloud Memorystore for Redis Cluster + * + *

The `redis.googleapis.com` service implements the Google Cloud Memorystore for Redis API and + * defines the following resource model for managing Redis clusters: + * + *

    + *
  • The service works with a collection of cloud projects, named: `/projects/*` + *
  • Each project has a collection of available locations, named: `/locations/*` + *
  • Each location has a collection of Redis clusters, named: `/clusters/*` + *
  • As such, Redis clusters are resources of the form: + * `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` + *
+ * + *

Note that location_id must be a GCP `region`; for example: + * + *

    + *
  • `projects/redpepper-1290/locations/us-central1/clusters/my-redis` + *
+ * + *

We use API version selector for Flex APIs + * + *

    + *
  • The versioning strategy is release-based versioning + *
  • Our backend CLH only deals with the superset version (called v1main) + *
  • Existing backend for Redis Gen1 and MRR is not touched. + *
  • More details in go/redis-flex-api-versioning + *
+ * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+ *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ *   Cluster response = cloudRedisClusterClient.getCluster(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the CloudRedisClusterClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of CloudRedisClusterSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings cloudRedisClusterSettings =
+ *     CloudRedisClusterSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudRedisClusterClient cloudRedisClusterClient =
+ *     CloudRedisClusterClient.create(cloudRedisClusterSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings cloudRedisClusterSettings =
+ *     CloudRedisClusterSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudRedisClusterClient cloudRedisClusterClient =
+ *     CloudRedisClusterClient.create(cloudRedisClusterSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings cloudRedisClusterSettings =
+ *     CloudRedisClusterSettings.newHttpJsonBuilder().build();
+ * CloudRedisClusterClient cloudRedisClusterClient =
+ *     CloudRedisClusterClient.create(cloudRedisClusterSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class CloudRedisClusterClient implements BackgroundResource { + private final CloudRedisClusterSettings settings; + private final CloudRedisClusterStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of CloudRedisClusterClient with default settings. */ + public static final CloudRedisClusterClient create() throws IOException { + return create(CloudRedisClusterSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CloudRedisClusterClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final CloudRedisClusterClient create(CloudRedisClusterSettings settings) + throws IOException { + return new CloudRedisClusterClient(settings); + } + + /** + * Constructs an instance of CloudRedisClusterClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(CloudRedisClusterSettings). + */ + public static final CloudRedisClusterClient create(CloudRedisClusterStub stub) { + return new CloudRedisClusterClient(stub); + } + + /** + * Constructs an instance of CloudRedisClusterClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected CloudRedisClusterClient(CloudRedisClusterSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CloudRedisClusterStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected CloudRedisClusterClient(CloudRedisClusterStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final CloudRedisClusterSettings getSettings() { + return settings; + } + + public CloudRedisClusterStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(LocationName parent) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(String parent) { + ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Cluster element : cloudRedisClusterClient.listClusters(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(ListClustersRequest request) { + return listClustersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.listClustersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Cluster element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listClustersPagedCallable() { + return stub.listClustersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListClustersResponse response =
+   *         cloudRedisClusterClient.listClustersCallable().call(request);
+   *     for (Cluster element : response.getClustersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listClustersCallable() { + return stub.listClustersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Cluster response = cloudRedisClusterClient.getCluster(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(ClusterName name) { + GetClusterRequest request = + GetClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Cluster response = cloudRedisClusterClient.getCluster(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(String name) { + GetClusterRequest request = GetClusterRequest.newBuilder().setName(name).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   Cluster response = cloudRedisClusterClient.getCluster(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(GetClusterRequest request) { + return getClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future = cloudRedisClusterClient.getClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getClusterCallable() { + return stub.getClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Cluster response = cloudRedisClusterClient.updateClusterAsync(cluster, updateMask).get();
+   * }
+   * }
+ * + * @param cluster Required. Update description. Only fields specified in update_mask are updated. + * @param updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these fields from + * [Cluster][google.cloud.redis.cluster.v1.Cluster]: + *

* `size_gb` * `replica_count` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateClusterAsync( + Cluster cluster, FieldMask updateMask) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder().setCluster(cluster).setUpdateMask(updateMask).build(); + return updateClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Cluster response = cloudRedisClusterClient.updateClusterAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateClusterAsync(UpdateClusterRequest request) { + return updateClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudRedisClusterClient.updateClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateClusterOperationCallable() { + return stub.updateClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.updateClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateClusterCallable() { + return stub.updateClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   cloudRedisClusterClient.deleteClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(ClusterName name) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   cloudRedisClusterClient.deleteClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(String name) { + DeleteClusterRequest request = DeleteClusterRequest.newBuilder().setName(name).build(); + return deleteClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   cloudRedisClusterClient.deleteClusterAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(DeleteClusterRequest request) { + return deleteClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudRedisClusterClient.deleteClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteClusterOperationCallable() { + return stub.deleteClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.deleteClusterCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteClusterCallable() { + return stub.deleteClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   String clusterId = "clusterId561939637";
+   *   Cluster response =
+   *       cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @param cluster Required. The cluster that is to be created. + * @param clusterId Required. The logical name of the Redis cluster in the customer project with + * the following restrictions: + *
    + *
  • Must contain only lowercase letters, numbers, and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the customer project / location + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync( + LocationName parent, Cluster cluster, String clusterId) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCluster(cluster) + .setClusterId(clusterId) + .build(); + return createClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   String clusterId = "clusterId561939637";
+   *   Cluster response =
+   *       cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @param cluster Required. The cluster that is to be created. + * @param clusterId Required. The logical name of the Redis cluster in the customer project with + * the following restrictions: + *
    + *
  • Must contain only lowercase letters, numbers, and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the customer project / location + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync( + String parent, Cluster cluster, String clusterId) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(parent) + .setCluster(cluster) + .setClusterId(clusterId) + .build(); + return createClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Cluster response = cloudRedisClusterClient.createClusterAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync(CreateClusterRequest request) { + return createClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudRedisClusterClient.createClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createClusterOperationCallable() { + return stub.createClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.createClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createClusterCallable() { + return stub.createClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudRedisClusterClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         cloudRedisClusterClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudRedisClusterClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListClustersPagedResponse + extends AbstractPagedListResponse< + ListClustersRequest, + ListClustersResponse, + Cluster, + ListClustersPage, + ListClustersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListClustersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListClustersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListClustersPagedResponse(ListClustersPage page) { + super(page, ListClustersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListClustersPage + extends AbstractPage { + + private ListClustersPage( + PageContext context, + ListClustersResponse response) { + super(context, response); + } + + private static ListClustersPage createEmptyPage() { + return new ListClustersPage(null, null); + } + + @Override + protected ListClustersPage createPage( + PageContext context, + ListClustersResponse response) { + return new ListClustersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListClustersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListClustersRequest, + ListClustersResponse, + Cluster, + ListClustersPage, + ListClustersFixedSizeCollection> { + + private ListClustersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListClustersFixedSizeCollection createEmptyCollection() { + return new ListClustersFixedSizeCollection(null, 0); + } + + @Override + protected ListClustersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListClustersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterSettings.java new file mode 100644 index 000000000000..f59ba3032c24 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterSettings.java @@ -0,0 +1,318 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.stub.CloudRedisClusterStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudRedisClusterClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (redis.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getCluster to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings.Builder cloudRedisClusterSettingsBuilder =
+ *     CloudRedisClusterSettings.newBuilder();
+ * cloudRedisClusterSettingsBuilder
+ *     .getClusterSettings()
+ *     .setRetrySettings(
+ *         cloudRedisClusterSettingsBuilder
+ *             .getClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudRedisClusterSettings cloudRedisClusterSettings = cloudRedisClusterSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CloudRedisClusterSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listClusters. */ + public PagedCallSettings + listClustersSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).listClustersSettings(); + } + + /** Returns the object with the settings used for calls to getCluster. */ + public UnaryCallSettings getClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).getClusterSettings(); + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public UnaryCallSettings updateClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).updateClusterSettings(); + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public OperationCallSettings + updateClusterOperationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).updateClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public UnaryCallSettings deleteClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).deleteClusterSettings(); + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public OperationCallSettings deleteClusterOperationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).deleteClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to createCluster. */ + public UnaryCallSettings createClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).createClusterSettings(); + } + + /** Returns the object with the settings used for calls to createCluster. */ + public OperationCallSettings + createClusterOperationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).createClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final CloudRedisClusterSettings create(CloudRedisClusterStubSettings stub) + throws IOException { + return new CloudRedisClusterSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudRedisClusterStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudRedisClusterStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudRedisClusterStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudRedisClusterStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CloudRedisClusterStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return CloudRedisClusterStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudRedisClusterStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudRedisClusterStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CloudRedisClusterSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudRedisClusterSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CloudRedisClusterStubSettings.newBuilder(clientContext)); + } + + protected Builder(CloudRedisClusterSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudRedisClusterStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CloudRedisClusterStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(CloudRedisClusterStubSettings.newHttpJsonBuilder()); + } + + public CloudRedisClusterStubSettings.Builder getStubSettingsBuilder() { + return ((CloudRedisClusterStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listClusters. */ + public PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings() { + return getStubSettingsBuilder().listClustersSettings(); + } + + /** Returns the builder for the settings used for calls to getCluster. */ + public UnaryCallSettings.Builder getClusterSettings() { + return getStubSettingsBuilder().getClusterSettings(); + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public UnaryCallSettings.Builder updateClusterSettings() { + return getStubSettingsBuilder().updateClusterSettings(); + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public OperationCallSettings.Builder + updateClusterOperationSettings() { + return getStubSettingsBuilder().updateClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public UnaryCallSettings.Builder deleteClusterSettings() { + return getStubSettingsBuilder().deleteClusterSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public OperationCallSettings.Builder + deleteClusterOperationSettings() { + return getStubSettingsBuilder().deleteClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public UnaryCallSettings.Builder createClusterSettings() { + return getStubSettingsBuilder().createClusterSettings(); + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public OperationCallSettings.Builder + createClusterOperationSettings() { + return getStubSettingsBuilder().createClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public CloudRedisClusterSettings build() throws IOException { + return new CloudRedisClusterSettings(this); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/gapic_metadata.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/gapic_metadata.json new file mode 100644 index 000000000000..58d43a0ef8e8 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/gapic_metadata.json @@ -0,0 +1,39 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.redis.cluster.v1", + "libraryPackage": "com.google.cloud.redis.cluster.v1", + "services": { + "CloudRedisCluster": { + "clients": { + "grpc": { + "libraryClient": "CloudRedisClusterClient", + "rpcs": { + "CreateCluster": { + "methods": ["createClusterAsync", "createClusterAsync", "createClusterAsync", "createClusterOperationCallable", "createClusterCallable"] + }, + "DeleteCluster": { + "methods": ["deleteClusterAsync", "deleteClusterAsync", "deleteClusterAsync", "deleteClusterOperationCallable", "deleteClusterCallable"] + }, + "GetCluster": { + "methods": ["getCluster", "getCluster", "getCluster", "getClusterCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListClusters": { + "methods": ["listClusters", "listClusters", "listClusters", "listClustersPagedCallable", "listClustersCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "UpdateCluster": { + "methods": ["updateClusterAsync", "updateClusterAsync", "updateClusterOperationCallable", "updateClusterCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/package-info.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/package-info.java new file mode 100644 index 000000000000..c4ce8ed398e8 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/package-info.java @@ -0,0 +1,71 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Google Cloud Memorystore for Redis API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= CloudRedisClusterClient ======================= + * + *

Service Description: Configures and manages Cloud Memorystore for Redis clusters + * + *

Google Cloud Memorystore for Redis Cluster + * + *

The `redis.googleapis.com` service implements the Google Cloud Memorystore for Redis API and + * defines the following resource model for managing Redis clusters: + * + *

    + *
  • The service works with a collection of cloud projects, named: `/projects/*` + *
  • Each project has a collection of available locations, named: `/locations/*` + *
  • Each location has a collection of Redis clusters, named: `/clusters/*` + *
  • As such, Redis clusters are resources of the form: + * `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` + *
+ * + *

Note that location_id must be a GCP `region`; for example: + * + *

    + *
  • `projects/redpepper-1290/locations/us-central1/clusters/my-redis` + *
+ * + *

We use API version selector for Flex APIs + * + *

    + *
  • The versioning strategy is release-based versioning + *
  • Our backend CLH only deals with the superset version (called v1main) + *
  • Existing backend for Redis Gen1 and MRR is not touched. + *
  • More details in go/redis-flex-api-versioning + *
+ * + *

Sample for CloudRedisClusterClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+ *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ *   Cluster response = cloudRedisClusterClient.getCluster(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.redis.cluster.v1; + +import javax.annotation.Generated; diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStub.java new file mode 100644 index 000000000000..1c4e842cb645 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStub.java @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.stub; + +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1.UpdateClusterRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the CloudRedisCluster service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class CloudRedisClusterStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listClustersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listClustersPagedCallable()"); + } + + public UnaryCallable listClustersCallable() { + throw new UnsupportedOperationException("Not implemented: listClustersCallable()"); + } + + public UnaryCallable getClusterCallable() { + throw new UnsupportedOperationException("Not implemented: getClusterCallable()"); + } + + public OperationCallable updateClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateClusterOperationCallable()"); + } + + public UnaryCallable updateClusterCallable() { + throw new UnsupportedOperationException("Not implemented: updateClusterCallable()"); + } + + public OperationCallable deleteClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteClusterOperationCallable()"); + } + + public UnaryCallable deleteClusterCallable() { + throw new UnsupportedOperationException("Not implemented: deleteClusterCallable()"); + } + + public OperationCallable createClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createClusterOperationCallable()"); + } + + public UnaryCallable createClusterCallable() { + throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java new file mode 100644 index 000000000000..1ba7d6c98ef1 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/CloudRedisClusterStubSettings.java @@ -0,0 +1,736 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.stub; + +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1.UpdateClusterRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudRedisClusterStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (redis.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getCluster to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterStubSettings.Builder cloudRedisClusterSettingsBuilder =
+ *     CloudRedisClusterStubSettings.newBuilder();
+ * cloudRedisClusterSettingsBuilder
+ *     .getClusterSettings()
+ *     .setRetrySettings(
+ *         cloudRedisClusterSettingsBuilder
+ *             .getClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudRedisClusterStubSettings cloudRedisClusterSettings =
+ *     cloudRedisClusterSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CloudRedisClusterStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings; + private final UnaryCallSettings getClusterSettings; + private final UnaryCallSettings updateClusterSettings; + private final OperationCallSettings + updateClusterOperationSettings; + private final UnaryCallSettings deleteClusterSettings; + private final OperationCallSettings + deleteClusterOperationSettings; + private final UnaryCallSettings createClusterSettings; + private final OperationCallSettings + createClusterOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_CLUSTERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListClustersRequest injectToken(ListClustersRequest payload, String token) { + return ListClustersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListClustersRequest injectPageSize(ListClustersRequest payload, int pageSize) { + return ListClustersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListClustersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListClustersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListClustersResponse payload) { + return payload.getClustersList() == null + ? ImmutableList.of() + : payload.getClustersList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + LIST_CLUSTERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListClustersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_CLUSTERS_PAGE_STR_DESC, request, context); + return ListClustersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listClusters. */ + public PagedCallSettings + listClustersSettings() { + return listClustersSettings; + } + + /** Returns the object with the settings used for calls to getCluster. */ + public UnaryCallSettings getClusterSettings() { + return getClusterSettings; + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public UnaryCallSettings updateClusterSettings() { + return updateClusterSettings; + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public OperationCallSettings + updateClusterOperationSettings() { + return updateClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public UnaryCallSettings deleteClusterSettings() { + return deleteClusterSettings; + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public OperationCallSettings deleteClusterOperationSettings() { + return deleteClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to createCluster. */ + public UnaryCallSettings createClusterSettings() { + return createClusterSettings; + } + + /** Returns the object with the settings used for calls to createCluster. */ + public OperationCallSettings + createClusterOperationSettings() { + return createClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public CloudRedisClusterStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCloudRedisClusterStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonCloudRedisClusterStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "redis.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "redis.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CloudRedisClusterStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CloudRedisClusterStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudRedisClusterStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CloudRedisClusterStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listClustersSettings = settingsBuilder.listClustersSettings().build(); + getClusterSettings = settingsBuilder.getClusterSettings().build(); + updateClusterSettings = settingsBuilder.updateClusterSettings().build(); + updateClusterOperationSettings = settingsBuilder.updateClusterOperationSettings().build(); + deleteClusterSettings = settingsBuilder.deleteClusterSettings().build(); + deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); + createClusterSettings = settingsBuilder.createClusterSettings().build(); + createClusterOperationSettings = settingsBuilder.createClusterOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for CloudRedisClusterStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings; + private final UnaryCallSettings.Builder getClusterSettings; + private final UnaryCallSettings.Builder updateClusterSettings; + private final OperationCallSettings.Builder + updateClusterOperationSettings; + private final UnaryCallSettings.Builder deleteClusterSettings; + private final OperationCallSettings.Builder + deleteClusterOperationSettings; + private final UnaryCallSettings.Builder createClusterSettings; + private final OperationCallSettings.Builder + createClusterOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("no_retry_0_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listClustersSettings = PagedCallSettings.newBuilder(LIST_CLUSTERS_PAGE_STR_FACT); + getClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateClusterOperationSettings = OperationCallSettings.newBuilder(); + deleteClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteClusterOperationSettings = OperationCallSettings.newBuilder(); + createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createClusterOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClustersSettings, + getClusterSettings, + updateClusterSettings, + deleteClusterSettings, + createClusterSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(CloudRedisClusterStubSettings settings) { + super(settings); + + listClustersSettings = settings.listClustersSettings.toBuilder(); + getClusterSettings = settings.getClusterSettings.toBuilder(); + updateClusterSettings = settings.updateClusterSettings.toBuilder(); + updateClusterOperationSettings = settings.updateClusterOperationSettings.toBuilder(); + deleteClusterSettings = settings.deleteClusterSettings.toBuilder(); + deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); + createClusterSettings = settings.createClusterSettings.toBuilder(); + createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClustersSettings, + getClusterSettings, + updateClusterSettings, + deleteClusterSettings, + createClusterSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listClustersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) + .setMetadataTransformer(ProtoOperationTransformers.MetadataTransformer.create(Any.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(360000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(7200000L)) + .build())); + + builder + .deleteClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer(ProtoOperationTransformers.MetadataTransformer.create(Any.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(360000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1200000L)) + .build())); + + builder + .createClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) + .setMetadataTransformer(ProtoOperationTransformers.MetadataTransformer.create(Any.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(360000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(7200000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listClusters. */ + public PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings() { + return listClustersSettings; + } + + /** Returns the builder for the settings used for calls to getCluster. */ + public UnaryCallSettings.Builder getClusterSettings() { + return getClusterSettings; + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public UnaryCallSettings.Builder updateClusterSettings() { + return updateClusterSettings; + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateClusterOperationSettings() { + return updateClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public UnaryCallSettings.Builder deleteClusterSettings() { + return deleteClusterSettings; + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteClusterOperationSettings() { + return deleteClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public UnaryCallSettings.Builder createClusterSettings() { + return createClusterSettings; + } + + /** Returns the builder for the settings used for calls to createCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createClusterOperationSettings() { + return createClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public CloudRedisClusterStubSettings build() throws IOException { + return new CloudRedisClusterStubSettings(this); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterCallableFactory.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterCallableFactory.java new file mode 100644 index 000000000000..5e2a6deb808e --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcCloudRedisClusterCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterStub.java new file mode 100644 index 000000000000..d42210cfc4b4 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/GrpcCloudRedisClusterStub.java @@ -0,0 +1,408 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.stub; + +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1.UpdateClusterRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcCloudRedisClusterStub extends CloudRedisClusterStub { + private static final MethodDescriptor + listClustersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/ListClusters") + .setRequestMarshaller(ProtoUtils.marshaller(ListClustersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListClustersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/GetCluster") + .setRequestMarshaller(ProtoUtils.marshaller(GetClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Cluster.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/UpdateCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/DeleteCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/CreateCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable listClustersCallable; + private final UnaryCallable + listClustersPagedCallable; + private final UnaryCallable getClusterCallable; + private final UnaryCallable updateClusterCallable; + private final OperationCallable + updateClusterOperationCallable; + private final UnaryCallable deleteClusterCallable; + private final OperationCallable deleteClusterOperationCallable; + private final UnaryCallable createClusterCallable; + private final OperationCallable + createClusterOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCloudRedisClusterStub create(CloudRedisClusterStubSettings settings) + throws IOException { + return new GrpcCloudRedisClusterStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCloudRedisClusterStub create(ClientContext clientContext) + throws IOException { + return new GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCloudRedisClusterStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcCloudRedisClusterCallableFactory()); + } + + /** + * Constructs an instance of GrpcCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listClustersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listClustersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster.name", String.valueOf(request.getCluster().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listClustersCallable = + callableFactory.createUnaryCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.listClustersPagedCallable = + callableFactory.createPagedCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.getClusterCallable = + callableFactory.createUnaryCallable( + getClusterTransportSettings, settings.getClusterSettings(), clientContext); + this.updateClusterCallable = + callableFactory.createUnaryCallable( + updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); + this.updateClusterOperationCallable = + callableFactory.createOperationCallable( + updateClusterTransportSettings, + settings.updateClusterOperationSettings(), + clientContext, + operationsStub); + this.deleteClusterCallable = + callableFactory.createUnaryCallable( + deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); + this.deleteClusterOperationCallable = + callableFactory.createOperationCallable( + deleteClusterTransportSettings, + settings.deleteClusterOperationSettings(), + clientContext, + operationsStub); + this.createClusterCallable = + callableFactory.createUnaryCallable( + createClusterTransportSettings, settings.createClusterSettings(), clientContext); + this.createClusterOperationCallable = + callableFactory.createOperationCallable( + createClusterTransportSettings, + settings.createClusterOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listClustersCallable() { + return listClustersCallable; + } + + @Override + public UnaryCallable listClustersPagedCallable() { + return listClustersPagedCallable; + } + + @Override + public UnaryCallable getClusterCallable() { + return getClusterCallable; + } + + @Override + public UnaryCallable updateClusterCallable() { + return updateClusterCallable; + } + + @Override + public OperationCallable updateClusterOperationCallable() { + return updateClusterOperationCallable; + } + + @Override + public UnaryCallable deleteClusterCallable() { + return deleteClusterCallable; + } + + @Override + public OperationCallable deleteClusterOperationCallable() { + return deleteClusterOperationCallable; + } + + @Override + public UnaryCallable createClusterCallable() { + return createClusterCallable; + } + + @Override + public OperationCallable createClusterOperationCallable() { + return createClusterOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterCallableFactory.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterCallableFactory.java new file mode 100644 index 000000000000..7473249f19ff --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonCloudRedisClusterCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterStub.java new file mode 100644 index 000000000000..93f95d46fc36 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1/stub/HttpJsonCloudRedisClusterStub.java @@ -0,0 +1,668 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.stub; + +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1.UpdateClusterRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonCloudRedisClusterStub extends CloudRedisClusterStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(Cluster.getDescriptor()) + .add(Any.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listClustersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/ListClusters") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListClustersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/GetCluster") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Cluster.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/UpdateCluster") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{cluster.name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "cluster.name", request.getCluster().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("cluster", request.getCluster(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/DeleteCluster") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.redis.cluster.v1.CloudRedisCluster/CreateCluster") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "clusterId", request.getClusterId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("cluster", request.getCluster(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listClustersCallable; + private final UnaryCallable + listClustersPagedCallable; + private final UnaryCallable getClusterCallable; + private final UnaryCallable updateClusterCallable; + private final OperationCallable + updateClusterOperationCallable; + private final UnaryCallable deleteClusterCallable; + private final OperationCallable deleteClusterOperationCallable; + private final UnaryCallable createClusterCallable; + private final OperationCallable + createClusterOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonCloudRedisClusterStub create(CloudRedisClusterStubSettings settings) + throws IOException { + return new HttpJsonCloudRedisClusterStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonCloudRedisClusterStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonCloudRedisClusterStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonCloudRedisClusterCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listClustersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listClustersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster.name", String.valueOf(request.getCluster().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listClustersCallable = + callableFactory.createUnaryCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.listClustersPagedCallable = + callableFactory.createPagedCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.getClusterCallable = + callableFactory.createUnaryCallable( + getClusterTransportSettings, settings.getClusterSettings(), clientContext); + this.updateClusterCallable = + callableFactory.createUnaryCallable( + updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); + this.updateClusterOperationCallable = + callableFactory.createOperationCallable( + updateClusterTransportSettings, + settings.updateClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteClusterCallable = + callableFactory.createUnaryCallable( + deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); + this.deleteClusterOperationCallable = + callableFactory.createOperationCallable( + deleteClusterTransportSettings, + settings.deleteClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createClusterCallable = + callableFactory.createUnaryCallable( + createClusterTransportSettings, settings.createClusterSettings(), clientContext); + this.createClusterOperationCallable = + callableFactory.createOperationCallable( + createClusterTransportSettings, + settings.createClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listClustersMethodDescriptor); + methodDescriptors.add(getClusterMethodDescriptor); + methodDescriptors.add(updateClusterMethodDescriptor); + methodDescriptors.add(deleteClusterMethodDescriptor); + methodDescriptors.add(createClusterMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listClustersCallable() { + return listClustersCallable; + } + + @Override + public UnaryCallable listClustersPagedCallable() { + return listClustersPagedCallable; + } + + @Override + public UnaryCallable getClusterCallable() { + return getClusterCallable; + } + + @Override + public UnaryCallable updateClusterCallable() { + return updateClusterCallable; + } + + @Override + public OperationCallable updateClusterOperationCallable() { + return updateClusterOperationCallable; + } + + @Override + public UnaryCallable deleteClusterCallable() { + return deleteClusterCallable; + } + + @Override + public OperationCallable deleteClusterOperationCallable() { + return deleteClusterOperationCallable; + } + + @Override + public UnaryCallable createClusterCallable() { + return createClusterCallable; + } + + @Override + public OperationCallable createClusterOperationCallable() { + return createClusterOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java new file mode 100644 index 000000000000..d35582686025 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClient.java @@ -0,0 +1,1411 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.stub.CloudRedisClusterStub; +import com.google.cloud.redis.cluster.v1beta1.stub.CloudRedisClusterStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Configures and manages Cloud Memorystore for Redis clusters + * + *

Google Cloud Memorystore for Redis Cluster + * + *

The `redis.googleapis.com` service implements the Google Cloud Memorystore for Redis API and + * defines the following resource model for managing Redis clusters: + * + *

    + *
  • The service works with a collection of cloud projects, named: `/projects/*` + *
  • Each project has a collection of available locations, named: `/locations/*` + *
  • Each location has a collection of Redis clusters, named: `/clusters/*` + *
  • As such, Redis clusters are resources of the form: + * `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` + *
+ * + *

Note that location_id must be a GCP `region`; for example: + * + *

    + *
  • `projects/redpepper-1290/locations/us-central1/clusters/my-redis` + *
+ * + *

We use API version selector for Flex APIs + * + *

    + *
  • The versioning strategy is release-based versioning + *
  • Our backend CLH only deals with the superset version (called v1main) + *
  • Existing backend for Redis Gen1 and MRR is not touched. + *
  • More details in go/redis-flex-api-versioning + *
+ * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+ *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ *   Cluster response = cloudRedisClusterClient.getCluster(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the CloudRedisClusterClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of CloudRedisClusterSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings cloudRedisClusterSettings =
+ *     CloudRedisClusterSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudRedisClusterClient cloudRedisClusterClient =
+ *     CloudRedisClusterClient.create(cloudRedisClusterSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings cloudRedisClusterSettings =
+ *     CloudRedisClusterSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudRedisClusterClient cloudRedisClusterClient =
+ *     CloudRedisClusterClient.create(cloudRedisClusterSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings cloudRedisClusterSettings =
+ *     CloudRedisClusterSettings.newHttpJsonBuilder().build();
+ * CloudRedisClusterClient cloudRedisClusterClient =
+ *     CloudRedisClusterClient.create(cloudRedisClusterSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class CloudRedisClusterClient implements BackgroundResource { + private final CloudRedisClusterSettings settings; + private final CloudRedisClusterStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of CloudRedisClusterClient with default settings. */ + public static final CloudRedisClusterClient create() throws IOException { + return create(CloudRedisClusterSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CloudRedisClusterClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final CloudRedisClusterClient create(CloudRedisClusterSettings settings) + throws IOException { + return new CloudRedisClusterClient(settings); + } + + /** + * Constructs an instance of CloudRedisClusterClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(CloudRedisClusterSettings). + */ + public static final CloudRedisClusterClient create(CloudRedisClusterStub stub) { + return new CloudRedisClusterClient(stub); + } + + /** + * Constructs an instance of CloudRedisClusterClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected CloudRedisClusterClient(CloudRedisClusterSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CloudRedisClusterStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected CloudRedisClusterClient(CloudRedisClusterStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final CloudRedisClusterSettings getSettings() { + return settings; + } + + public CloudRedisClusterStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(LocationName parent) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(String parent) { + ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Cluster element : cloudRedisClusterClient.listClusters(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(ListClustersRequest request) { + return listClustersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.listClustersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Cluster element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listClustersPagedCallable() { + return stub.listClustersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Redis clusters owned by a project in either the specified location (region) or all + * locations. + * + *

The location should have the following format: + * + *

    + *
  • `projects/{project_id}/locations/{location_id}` + *
+ * + *

If `location_id` is specified as `-` (wildcard), then all regions available to the project + * are queried, and the results are aggregated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListClustersResponse response =
+   *         cloudRedisClusterClient.listClustersCallable().call(request);
+   *     for (Cluster element : response.getClustersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listClustersCallable() { + return stub.listClustersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Cluster response = cloudRedisClusterClient.getCluster(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(ClusterName name) { + GetClusterRequest request = + GetClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Cluster response = cloudRedisClusterClient.getCluster(name);
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(String name) { + GetClusterRequest request = GetClusterRequest.newBuilder().setName(name).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   Cluster response = cloudRedisClusterClient.getCluster(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(GetClusterRequest request) { + return getClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a specific Redis cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future = cloudRedisClusterClient.getClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getClusterCallable() { + return stub.getClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Cluster response = cloudRedisClusterClient.updateClusterAsync(cluster, updateMask).get();
+   * }
+   * }
+ * + * @param cluster Required. Update description. Only fields specified in update_mask are updated. + * @param updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these fields from + * [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]: + *

* `size_gb` * `replica_count` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateClusterAsync( + Cluster cluster, FieldMask updateMask) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder().setCluster(cluster).setUpdateMask(updateMask).build(); + return updateClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Cluster response = cloudRedisClusterClient.updateClusterAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateClusterAsync(UpdateClusterRequest request) { + return updateClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudRedisClusterClient.updateClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateClusterOperationCallable() { + return stub.updateClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + *

Completed longrunning.Operation will contain the new cluster object in the response field. + * The returned operation is automatically deleted after a few hours, so there is no need to call + * DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.updateClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateClusterCallable() { + return stub.updateClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   cloudRedisClusterClient.deleteClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(ClusterName name) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   cloudRedisClusterClient.deleteClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` + * refers to a GCP region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(String name) { + DeleteClusterRequest request = DeleteClusterRequest.newBuilder().setName(name).build(); + return deleteClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   cloudRedisClusterClient.deleteClusterAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(DeleteClusterRequest request) { + return deleteClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudRedisClusterClient.deleteClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteClusterOperationCallable() { + return stub.deleteClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.deleteClusterCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteClusterCallable() { + return stub.deleteClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   String clusterId = "clusterId561939637";
+   *   Cluster response =
+   *       cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @param cluster Required. The cluster that is to be created. + * @param clusterId Required. The logical name of the Redis cluster in the customer project with + * the following restrictions: + *
    + *
  • Must contain only lowercase letters, numbers, and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the customer project / location + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync( + LocationName parent, Cluster cluster, String clusterId) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCluster(cluster) + .setClusterId(clusterId) + .build(); + return createClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   String clusterId = "clusterId561939637";
+   *   Cluster response =
+   *       cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * @param cluster Required. The cluster that is to be created. + * @param clusterId Required. The logical name of the Redis cluster in the customer project with + * the following restrictions: + *
    + *
  • Must contain only lowercase letters, numbers, and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the customer project / location + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync( + String parent, Cluster cluster, String clusterId) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(parent) + .setCluster(cluster) + .setClusterId(clusterId) + .build(); + return createClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Cluster response = cloudRedisClusterClient.createClusterAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync(CreateClusterRequest request) { + return createClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudRedisClusterClient.createClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createClusterOperationCallable() { + return stub.createClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Redis cluster based on the specified properties. The creation is executed + * asynchronously and callers may check the returned operation to track its progress. Once the + * operation is completed the Redis cluster will be fully functional. The completed + * longrunning.Operation will contain the new cluster object in the response field. + * + *

The returned operation is automatically deleted after a few hours, so there is no need to + * call DeleteOperation. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.createClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createClusterCallable() { + return stub.createClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudRedisClusterClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         cloudRedisClusterClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudRedisClusterClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       cloudRedisClusterClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListClustersPagedResponse + extends AbstractPagedListResponse< + ListClustersRequest, + ListClustersResponse, + Cluster, + ListClustersPage, + ListClustersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListClustersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListClustersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListClustersPagedResponse(ListClustersPage page) { + super(page, ListClustersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListClustersPage + extends AbstractPage { + + private ListClustersPage( + PageContext context, + ListClustersResponse response) { + super(context, response); + } + + private static ListClustersPage createEmptyPage() { + return new ListClustersPage(null, null); + } + + @Override + protected ListClustersPage createPage( + PageContext context, + ListClustersResponse response) { + return new ListClustersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListClustersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListClustersRequest, + ListClustersResponse, + Cluster, + ListClustersPage, + ListClustersFixedSizeCollection> { + + private ListClustersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListClustersFixedSizeCollection createEmptyCollection() { + return new ListClustersFixedSizeCollection(null, 0); + } + + @Override + protected ListClustersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListClustersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterSettings.java new file mode 100644 index 000000000000..9348bba2fdff --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterSettings.java @@ -0,0 +1,319 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.stub.CloudRedisClusterStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudRedisClusterClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (redis.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getCluster to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterSettings.Builder cloudRedisClusterSettingsBuilder =
+ *     CloudRedisClusterSettings.newBuilder();
+ * cloudRedisClusterSettingsBuilder
+ *     .getClusterSettings()
+ *     .setRetrySettings(
+ *         cloudRedisClusterSettingsBuilder
+ *             .getClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudRedisClusterSettings cloudRedisClusterSettings = cloudRedisClusterSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class CloudRedisClusterSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listClusters. */ + public PagedCallSettings + listClustersSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).listClustersSettings(); + } + + /** Returns the object with the settings used for calls to getCluster. */ + public UnaryCallSettings getClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).getClusterSettings(); + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public UnaryCallSettings updateClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).updateClusterSettings(); + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public OperationCallSettings + updateClusterOperationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).updateClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public UnaryCallSettings deleteClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).deleteClusterSettings(); + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public OperationCallSettings deleteClusterOperationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).deleteClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to createCluster. */ + public UnaryCallSettings createClusterSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).createClusterSettings(); + } + + /** Returns the object with the settings used for calls to createCluster. */ + public OperationCallSettings + createClusterOperationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).createClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudRedisClusterStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final CloudRedisClusterSettings create(CloudRedisClusterStubSettings stub) + throws IOException { + return new CloudRedisClusterSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudRedisClusterStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudRedisClusterStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudRedisClusterStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudRedisClusterStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CloudRedisClusterStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return CloudRedisClusterStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudRedisClusterStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudRedisClusterStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CloudRedisClusterSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudRedisClusterSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CloudRedisClusterStubSettings.newBuilder(clientContext)); + } + + protected Builder(CloudRedisClusterSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudRedisClusterStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CloudRedisClusterStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(CloudRedisClusterStubSettings.newHttpJsonBuilder()); + } + + public CloudRedisClusterStubSettings.Builder getStubSettingsBuilder() { + return ((CloudRedisClusterStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listClusters. */ + public PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings() { + return getStubSettingsBuilder().listClustersSettings(); + } + + /** Returns the builder for the settings used for calls to getCluster. */ + public UnaryCallSettings.Builder getClusterSettings() { + return getStubSettingsBuilder().getClusterSettings(); + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public UnaryCallSettings.Builder updateClusterSettings() { + return getStubSettingsBuilder().updateClusterSettings(); + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public OperationCallSettings.Builder + updateClusterOperationSettings() { + return getStubSettingsBuilder().updateClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public UnaryCallSettings.Builder deleteClusterSettings() { + return getStubSettingsBuilder().deleteClusterSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public OperationCallSettings.Builder + deleteClusterOperationSettings() { + return getStubSettingsBuilder().deleteClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public UnaryCallSettings.Builder createClusterSettings() { + return getStubSettingsBuilder().createClusterSettings(); + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public OperationCallSettings.Builder + createClusterOperationSettings() { + return getStubSettingsBuilder().createClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public CloudRedisClusterSettings build() throws IOException { + return new CloudRedisClusterSettings(this); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/gapic_metadata.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..445e44142736 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/gapic_metadata.json @@ -0,0 +1,39 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.redis.cluster.v1beta1", + "libraryPackage": "com.google.cloud.redis.cluster.v1beta1", + "services": { + "CloudRedisCluster": { + "clients": { + "grpc": { + "libraryClient": "CloudRedisClusterClient", + "rpcs": { + "CreateCluster": { + "methods": ["createClusterAsync", "createClusterAsync", "createClusterAsync", "createClusterOperationCallable", "createClusterCallable"] + }, + "DeleteCluster": { + "methods": ["deleteClusterAsync", "deleteClusterAsync", "deleteClusterAsync", "deleteClusterOperationCallable", "deleteClusterCallable"] + }, + "GetCluster": { + "methods": ["getCluster", "getCluster", "getCluster", "getClusterCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListClusters": { + "methods": ["listClusters", "listClusters", "listClusters", "listClustersPagedCallable", "listClustersCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "UpdateCluster": { + "methods": ["updateClusterAsync", "updateClusterAsync", "updateClusterOperationCallable", "updateClusterCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/package-info.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/package-info.java new file mode 100644 index 000000000000..e2be32211c24 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/package-info.java @@ -0,0 +1,71 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Google Cloud Memorystore for Redis API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= CloudRedisClusterClient ======================= + * + *

Service Description: Configures and manages Cloud Memorystore for Redis clusters + * + *

Google Cloud Memorystore for Redis Cluster + * + *

The `redis.googleapis.com` service implements the Google Cloud Memorystore for Redis API and + * defines the following resource model for managing Redis clusters: + * + *

    + *
  • The service works with a collection of cloud projects, named: `/projects/*` + *
  • Each project has a collection of available locations, named: `/locations/*` + *
  • Each location has a collection of Redis clusters, named: `/clusters/*` + *
  • As such, Redis clusters are resources of the form: + * `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` + *
+ * + *

Note that location_id must be a GCP `region`; for example: + * + *

    + *
  • `projects/redpepper-1290/locations/us-central1/clusters/my-redis` + *
+ * + *

We use API version selector for Flex APIs + * + *

    + *
  • The versioning strategy is release-based versioning + *
  • Our backend CLH only deals with the superset version (called v1main) + *
  • Existing backend for Redis Gen1 and MRR is not touched. + *
  • More details in go/redis-flex-api-versioning + *
+ * + *

Sample for CloudRedisClusterClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
+ *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ *   Cluster response = cloudRedisClusterClient.getCluster(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.redis.cluster.v1beta1; + +import javax.annotation.Generated; diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStub.java new file mode 100644 index 000000000000..82956b6e4607 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStub.java @@ -0,0 +1,112 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.stub; + +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the CloudRedisCluster service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class CloudRedisClusterStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listClustersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listClustersPagedCallable()"); + } + + public UnaryCallable listClustersCallable() { + throw new UnsupportedOperationException("Not implemented: listClustersCallable()"); + } + + public UnaryCallable getClusterCallable() { + throw new UnsupportedOperationException("Not implemented: getClusterCallable()"); + } + + public OperationCallable updateClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateClusterOperationCallable()"); + } + + public UnaryCallable updateClusterCallable() { + throw new UnsupportedOperationException("Not implemented: updateClusterCallable()"); + } + + public OperationCallable deleteClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteClusterOperationCallable()"); + } + + public UnaryCallable deleteClusterCallable() { + throw new UnsupportedOperationException("Not implemented: deleteClusterCallable()"); + } + + public OperationCallable createClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createClusterOperationCallable()"); + } + + public UnaryCallable createClusterCallable() { + throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java new file mode 100644 index 000000000000..045bc3764483 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/CloudRedisClusterStubSettings.java @@ -0,0 +1,737 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.stub; + +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudRedisClusterStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (redis.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of getCluster to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudRedisClusterStubSettings.Builder cloudRedisClusterSettingsBuilder =
+ *     CloudRedisClusterStubSettings.newBuilder();
+ * cloudRedisClusterSettingsBuilder
+ *     .getClusterSettings()
+ *     .setRetrySettings(
+ *         cloudRedisClusterSettingsBuilder
+ *             .getClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudRedisClusterStubSettings cloudRedisClusterSettings =
+ *     cloudRedisClusterSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class CloudRedisClusterStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings; + private final UnaryCallSettings getClusterSettings; + private final UnaryCallSettings updateClusterSettings; + private final OperationCallSettings + updateClusterOperationSettings; + private final UnaryCallSettings deleteClusterSettings; + private final OperationCallSettings + deleteClusterOperationSettings; + private final UnaryCallSettings createClusterSettings; + private final OperationCallSettings + createClusterOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_CLUSTERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListClustersRequest injectToken(ListClustersRequest payload, String token) { + return ListClustersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListClustersRequest injectPageSize(ListClustersRequest payload, int pageSize) { + return ListClustersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListClustersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListClustersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListClustersResponse payload) { + return payload.getClustersList() == null + ? ImmutableList.of() + : payload.getClustersList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + LIST_CLUSTERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListClustersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_CLUSTERS_PAGE_STR_DESC, request, context); + return ListClustersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listClusters. */ + public PagedCallSettings + listClustersSettings() { + return listClustersSettings; + } + + /** Returns the object with the settings used for calls to getCluster. */ + public UnaryCallSettings getClusterSettings() { + return getClusterSettings; + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public UnaryCallSettings updateClusterSettings() { + return updateClusterSettings; + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public OperationCallSettings + updateClusterOperationSettings() { + return updateClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public UnaryCallSettings deleteClusterSettings() { + return deleteClusterSettings; + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public OperationCallSettings deleteClusterOperationSettings() { + return deleteClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to createCluster. */ + public UnaryCallSettings createClusterSettings() { + return createClusterSettings; + } + + /** Returns the object with the settings used for calls to createCluster. */ + public OperationCallSettings + createClusterOperationSettings() { + return createClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public CloudRedisClusterStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCloudRedisClusterStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonCloudRedisClusterStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "redis.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "redis.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CloudRedisClusterStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CloudRedisClusterStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudRedisClusterStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CloudRedisClusterStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listClustersSettings = settingsBuilder.listClustersSettings().build(); + getClusterSettings = settingsBuilder.getClusterSettings().build(); + updateClusterSettings = settingsBuilder.updateClusterSettings().build(); + updateClusterOperationSettings = settingsBuilder.updateClusterOperationSettings().build(); + deleteClusterSettings = settingsBuilder.deleteClusterSettings().build(); + deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); + createClusterSettings = settingsBuilder.createClusterSettings().build(); + createClusterOperationSettings = settingsBuilder.createClusterOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for CloudRedisClusterStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings; + private final UnaryCallSettings.Builder getClusterSettings; + private final UnaryCallSettings.Builder updateClusterSettings; + private final OperationCallSettings.Builder + updateClusterOperationSettings; + private final UnaryCallSettings.Builder deleteClusterSettings; + private final OperationCallSettings.Builder + deleteClusterOperationSettings; + private final UnaryCallSettings.Builder createClusterSettings; + private final OperationCallSettings.Builder + createClusterOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("no_retry_0_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listClustersSettings = PagedCallSettings.newBuilder(LIST_CLUSTERS_PAGE_STR_FACT); + getClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateClusterOperationSettings = OperationCallSettings.newBuilder(); + deleteClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteClusterOperationSettings = OperationCallSettings.newBuilder(); + createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createClusterOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClustersSettings, + getClusterSettings, + updateClusterSettings, + deleteClusterSettings, + createClusterSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(CloudRedisClusterStubSettings settings) { + super(settings); + + listClustersSettings = settings.listClustersSettings.toBuilder(); + getClusterSettings = settings.getClusterSettings.toBuilder(); + updateClusterSettings = settings.updateClusterSettings.toBuilder(); + updateClusterOperationSettings = settings.updateClusterOperationSettings.toBuilder(); + deleteClusterSettings = settings.deleteClusterSettings.toBuilder(); + deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); + createClusterSettings = settings.createClusterSettings.toBuilder(); + createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClustersSettings, + getClusterSettings, + updateClusterSettings, + deleteClusterSettings, + createClusterSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listClustersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) + .setMetadataTransformer(ProtoOperationTransformers.MetadataTransformer.create(Any.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(360000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(7200000L)) + .build())); + + builder + .deleteClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer(ProtoOperationTransformers.MetadataTransformer.create(Any.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(360000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(1200000L)) + .build())); + + builder + .createClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) + .setMetadataTransformer(ProtoOperationTransformers.MetadataTransformer.create(Any.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(60000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(360000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(7200000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listClusters. */ + public PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings() { + return listClustersSettings; + } + + /** Returns the builder for the settings used for calls to getCluster. */ + public UnaryCallSettings.Builder getClusterSettings() { + return getClusterSettings; + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public UnaryCallSettings.Builder updateClusterSettings() { + return updateClusterSettings; + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateClusterOperationSettings() { + return updateClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public UnaryCallSettings.Builder deleteClusterSettings() { + return deleteClusterSettings; + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteClusterOperationSettings() { + return deleteClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public UnaryCallSettings.Builder createClusterSettings() { + return createClusterSettings; + } + + /** Returns the builder for the settings used for calls to createCluster. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createClusterOperationSettings() { + return createClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public CloudRedisClusterStubSettings build() throws IOException { + return new CloudRedisClusterStubSettings(this); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterCallableFactory.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterCallableFactory.java new file mode 100644 index 000000000000..acf955328f7c --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCloudRedisClusterCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterStub.java new file mode 100644 index 000000000000..8d0bbed31455 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/GrpcCloudRedisClusterStub.java @@ -0,0 +1,414 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.stub; + +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCloudRedisClusterStub extends CloudRedisClusterStub { + private static final MethodDescriptor + listClustersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/ListClusters") + .setRequestMarshaller(ProtoUtils.marshaller(ListClustersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListClustersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetCluster") + .setRequestMarshaller(ProtoUtils.marshaller(GetClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Cluster.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/UpdateCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/DeleteCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/CreateCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable listClustersCallable; + private final UnaryCallable + listClustersPagedCallable; + private final UnaryCallable getClusterCallable; + private final UnaryCallable updateClusterCallable; + private final OperationCallable + updateClusterOperationCallable; + private final UnaryCallable deleteClusterCallable; + private final OperationCallable deleteClusterOperationCallable; + private final UnaryCallable createClusterCallable; + private final OperationCallable + createClusterOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCloudRedisClusterStub create(CloudRedisClusterStubSettings settings) + throws IOException { + return new GrpcCloudRedisClusterStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCloudRedisClusterStub create(ClientContext clientContext) + throws IOException { + return new GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCloudRedisClusterStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcCloudRedisClusterCallableFactory()); + } + + /** + * Constructs an instance of GrpcCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listClustersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listClustersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster.name", String.valueOf(request.getCluster().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listClustersCallable = + callableFactory.createUnaryCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.listClustersPagedCallable = + callableFactory.createPagedCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.getClusterCallable = + callableFactory.createUnaryCallable( + getClusterTransportSettings, settings.getClusterSettings(), clientContext); + this.updateClusterCallable = + callableFactory.createUnaryCallable( + updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); + this.updateClusterOperationCallable = + callableFactory.createOperationCallable( + updateClusterTransportSettings, + settings.updateClusterOperationSettings(), + clientContext, + operationsStub); + this.deleteClusterCallable = + callableFactory.createUnaryCallable( + deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); + this.deleteClusterOperationCallable = + callableFactory.createOperationCallable( + deleteClusterTransportSettings, + settings.deleteClusterOperationSettings(), + clientContext, + operationsStub); + this.createClusterCallable = + callableFactory.createUnaryCallable( + createClusterTransportSettings, settings.createClusterSettings(), clientContext); + this.createClusterOperationCallable = + callableFactory.createOperationCallable( + createClusterTransportSettings, + settings.createClusterOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listClustersCallable() { + return listClustersCallable; + } + + @Override + public UnaryCallable listClustersPagedCallable() { + return listClustersPagedCallable; + } + + @Override + public UnaryCallable getClusterCallable() { + return getClusterCallable; + } + + @Override + public UnaryCallable updateClusterCallable() { + return updateClusterCallable; + } + + @Override + public OperationCallable updateClusterOperationCallable() { + return updateClusterOperationCallable; + } + + @Override + public UnaryCallable deleteClusterCallable() { + return deleteClusterCallable; + } + + @Override + public OperationCallable deleteClusterOperationCallable() { + return deleteClusterOperationCallable; + } + + @Override + public UnaryCallable createClusterCallable() { + return createClusterCallable; + } + + @Override + public OperationCallable createClusterOperationCallable() { + return createClusterOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterCallableFactory.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterCallableFactory.java new file mode 100644 index 000000000000..8037d2fb7b48 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCloudRedisClusterCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterStub.java b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterStub.java new file mode 100644 index 000000000000..317dca6fc592 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/java/com/google/cloud/redis/cluster/v1beta1/stub/HttpJsonCloudRedisClusterStub.java @@ -0,0 +1,672 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.stub; + +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the CloudRedisCluster service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCloudRedisClusterStub extends CloudRedisClusterStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(Cluster.getDescriptor()) + .add(Any.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listClustersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/ListClusters") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListClustersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetCluster") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Cluster.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/UpdateCluster") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{cluster.name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "cluster.name", request.getCluster().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("cluster", request.getCluster(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/DeleteCluster") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster/CreateCluster") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "clusterId", request.getClusterId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("cluster", request.getCluster(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listClustersCallable; + private final UnaryCallable + listClustersPagedCallable; + private final UnaryCallable getClusterCallable; + private final UnaryCallable updateClusterCallable; + private final OperationCallable + updateClusterOperationCallable; + private final UnaryCallable deleteClusterCallable; + private final OperationCallable deleteClusterOperationCallable; + private final UnaryCallable createClusterCallable; + private final OperationCallable + createClusterOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonCloudRedisClusterStub create(CloudRedisClusterStubSettings settings) + throws IOException { + return new HttpJsonCloudRedisClusterStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonCloudRedisClusterStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonCloudRedisClusterStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonCloudRedisClusterCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonCloudRedisClusterStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonCloudRedisClusterStub( + CloudRedisClusterStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1beta1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1beta1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1beta1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1beta1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listClustersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listClustersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster.name", String.valueOf(request.getCluster().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listClustersCallable = + callableFactory.createUnaryCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.listClustersPagedCallable = + callableFactory.createPagedCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.getClusterCallable = + callableFactory.createUnaryCallable( + getClusterTransportSettings, settings.getClusterSettings(), clientContext); + this.updateClusterCallable = + callableFactory.createUnaryCallable( + updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); + this.updateClusterOperationCallable = + callableFactory.createOperationCallable( + updateClusterTransportSettings, + settings.updateClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteClusterCallable = + callableFactory.createUnaryCallable( + deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); + this.deleteClusterOperationCallable = + callableFactory.createOperationCallable( + deleteClusterTransportSettings, + settings.deleteClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createClusterCallable = + callableFactory.createUnaryCallable( + createClusterTransportSettings, settings.createClusterSettings(), clientContext); + this.createClusterOperationCallable = + callableFactory.createOperationCallable( + createClusterTransportSettings, + settings.createClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listClustersMethodDescriptor); + methodDescriptors.add(getClusterMethodDescriptor); + methodDescriptors.add(updateClusterMethodDescriptor); + methodDescriptors.add(deleteClusterMethodDescriptor); + methodDescriptors.add(createClusterMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listClustersCallable() { + return listClustersCallable; + } + + @Override + public UnaryCallable listClustersPagedCallable() { + return listClustersPagedCallable; + } + + @Override + public UnaryCallable getClusterCallable() { + return getClusterCallable; + } + + @Override + public UnaryCallable updateClusterCallable() { + return updateClusterCallable; + } + + @Override + public OperationCallable updateClusterOperationCallable() { + return updateClusterOperationCallable; + } + + @Override + public UnaryCallable deleteClusterCallable() { + return deleteClusterCallable; + } + + @Override + public OperationCallable deleteClusterOperationCallable() { + return deleteClusterOperationCallable; + } + + @Override + public UnaryCallable createClusterCallable() { + return createClusterCallable; + } + + @Override + public OperationCallable createClusterOperationCallable() { + return createClusterOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1/reflect-config.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1/reflect-config.json new file mode 100644 index 000000000000..60742c60e961 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1/reflect-config.json @@ -0,0 +1,1559 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.AuthorizationMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.Cluster", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.Cluster$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.Cluster$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.Cluster$StateInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.Cluster$StateInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.Cluster$StateInfo$UpdateInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.Cluster$StateInfo$UpdateInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.CreateClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.CreateClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.DeleteClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.DeleteClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.DiscoveryEndpoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.DiscoveryEndpoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.GetClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.GetClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ListClustersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ListClustersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ListClustersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.ListClustersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.PscConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.PscConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.PscConnection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.PscConnection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.TransitEncryptionMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.UpdateClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1.UpdateClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1beta1/reflect-config.json b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1beta1/reflect-config.json new file mode 100644 index 000000000000..34f7688443fd --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/main/resources/META-INF/native-image/com.google.cloud.redis.cluster.v1beta1/reflect-config.json @@ -0,0 +1,1559 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.AuthorizationMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.Cluster", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.Cluster$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.Cluster$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.Cluster$StateInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.Cluster$StateInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.Cluster$StateInfo$UpdateInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.Cluster$StateInfo$UpdateInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.GetClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.GetClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ListClustersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ListClustersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ListClustersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.ListClustersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.PscConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.PscConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.PscConnection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.PscConnection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientHttpJsonTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientHttpJsonTest.java new file mode 100644 index 000000000000..28d3f0e38225 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientHttpJsonTest.java @@ -0,0 +1,724 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.stub.HttpJsonCloudRedisClusterStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CloudRedisClusterClientHttpJsonTest { + private static MockHttpService mockService; + private static CloudRedisClusterClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonCloudRedisClusterStub.getMethodDescriptors(), + CloudRedisClusterSettings.getDefaultEndpoint()); + CloudRedisClusterSettings settings = + CloudRedisClusterSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + CloudRedisClusterSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudRedisClusterClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listClustersTest() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listClustersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClustersTest2() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listClustersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Cluster cluster = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Cluster actualResponse = client.updateClusterAsync(cluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Cluster cluster = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateClusterAsync(cluster, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientTest.java new file mode 100644 index 000000000000..3c1133f80f30 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterClientTest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CloudRedisClusterClientTest { + private static MockCloudRedisCluster mockCloudRedisCluster; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CloudRedisClusterClient client; + + @BeforeClass + public static void startStaticServer() { + mockCloudRedisCluster = new MockCloudRedisCluster(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockCloudRedisCluster, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CloudRedisClusterSettings settings = + CloudRedisClusterSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudRedisClusterClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listClustersTest() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClustersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClustersTest2() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClustersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String parent = "parent-995424086"; + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterRequest actualRequest = ((GetClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + String name = "name3373707"; + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterRequest actualRequest = ((GetClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String name = "name3373707"; + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Cluster actualResponse = client.updateClusterAsync(cluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateClusterRequest actualRequest = ((UpdateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateClusterAsync(cluster, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClusterRequest actualRequest = ((DeleteClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClusterRequest actualRequest = ((DeleteClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String name = "name3373707"; + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClusterRequest actualRequest = ((CreateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(clusterId, actualRequest.getClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + String parent = "parent-995424086"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClusterRequest actualRequest = ((CreateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(clusterId, actualRequest.getClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String parent = "parent-995424086"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisCluster.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisCluster.java new file mode 100644 index 000000000000..83ddb9fdf5c7 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisCluster.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCloudRedisCluster implements MockGrpcService { + private final MockCloudRedisClusterImpl serviceImpl; + + public MockCloudRedisCluster() { + serviceImpl = new MockCloudRedisClusterImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisClusterImpl.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisClusterImpl.java new file mode 100644 index 000000000000..3a4671862ddc --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockCloudRedisClusterImpl.java @@ -0,0 +1,165 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterGrpc.CloudRedisClusterImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCloudRedisClusterImpl extends CloudRedisClusterImplBase { + private List requests; + private Queue responses; + + public MockCloudRedisClusterImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listClusters( + ListClustersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListClustersResponse) { + requests.add(request); + responseObserver.onNext(((ListClustersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListClusters, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListClustersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCluster(GetClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Cluster) { + requests.add(request); + responseObserver.onNext(((Cluster) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Cluster.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCluster( + UpdateClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCluster( + DeleteClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCluster( + CreateClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockLocations.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockLocations.java new file mode 100644 index 000000000000..6a92a2de277d --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockLocationsImpl.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..32826107c2b9 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientHttpJsonTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientHttpJsonTest.java new file mode 100644 index 000000000000..ef5c9d10b1da --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientHttpJsonTest.java @@ -0,0 +1,724 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.stub.HttpJsonCloudRedisClusterStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CloudRedisClusterClientHttpJsonTest { + private static MockHttpService mockService; + private static CloudRedisClusterClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonCloudRedisClusterStub.getMethodDescriptors(), + CloudRedisClusterSettings.getDefaultEndpoint()); + CloudRedisClusterSettings settings = + CloudRedisClusterSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + CloudRedisClusterSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudRedisClusterClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listClustersTest() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listClustersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClustersTest2() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listClustersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Cluster cluster = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Cluster actualResponse = client.updateClusterAsync(cluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Cluster cluster = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateClusterAsync(cluster, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientTest.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientTest.java new file mode 100644 index 000000000000..d861c115571d --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterClientTest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListClustersPagedResponse; +import static com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CloudRedisClusterClientTest { + private static MockCloudRedisCluster mockCloudRedisCluster; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CloudRedisClusterClient client; + + @BeforeClass + public static void startStaticServer() { + mockCloudRedisCluster = new MockCloudRedisCluster(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockCloudRedisCluster, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CloudRedisClusterSettings settings = + CloudRedisClusterSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudRedisClusterClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listClustersTest() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClustersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClustersTest2() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClustersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String parent = "parent-995424086"; + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterRequest actualRequest = ((GetClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + mockCloudRedisCluster.addResponse(expectedResponse); + + String name = "name3373707"; + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterRequest actualRequest = ((GetClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String name = "name3373707"; + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Cluster actualResponse = client.updateClusterAsync(cluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateClusterRequest actualRequest = ((UpdateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateClusterAsync(cluster, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClusterRequest actualRequest = ((DeleteClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClusterRequest actualRequest = ((DeleteClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String name = "name3373707"; + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClusterRequest actualRequest = ((CreateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(clusterId, actualRequest.getClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUid("uid115792") + .setReplicaCount(564075208) + .setAuthorizationMode(AuthorizationMode.forNumber(0)) + .setTransitEncryptionMode(TransitEncryptionMode.forNumber(0)) + .setSizeGb(2105542105) + .setShardCount(-495377042) + .addAllPscConfigs(new ArrayList()) + .addAllDiscoveryEndpoints(new ArrayList()) + .addAllPscConnections(new ArrayList()) + .setStateInfo(Cluster.StateInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudRedisCluster.addResponse(resultOperation); + + String parent = "parent-995424086"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudRedisCluster.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClusterRequest actualRequest = ((CreateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(clusterId, actualRequest.getClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudRedisCluster.addException(exception); + + try { + String parent = "parent-995424086"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisCluster.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisCluster.java new file mode 100644 index 000000000000..7c9865647681 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisCluster.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCloudRedisCluster implements MockGrpcService { + private final MockCloudRedisClusterImpl serviceImpl; + + public MockCloudRedisCluster() { + serviceImpl = new MockCloudRedisClusterImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisClusterImpl.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisClusterImpl.java new file mode 100644 index 000000000000..d6b8e7a13ee7 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockCloudRedisClusterImpl.java @@ -0,0 +1,165 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterGrpc.CloudRedisClusterImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCloudRedisClusterImpl extends CloudRedisClusterImplBase { + private List requests; + private Queue responses; + + public MockCloudRedisClusterImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listClusters( + ListClustersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListClustersResponse) { + requests.add(request); + responseObserver.onNext(((ListClustersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListClusters, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListClustersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCluster(GetClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Cluster) { + requests.add(request); + responseObserver.onNext(((Cluster) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Cluster.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCluster( + UpdateClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCluster( + DeleteClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCluster( + CreateClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockLocations.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockLocations.java new file mode 100644 index 000000000000..9bfc4789c38a --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockLocationsImpl.java b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockLocationsImpl.java new file mode 100644 index 000000000000..6055b2dc7f93 --- /dev/null +++ b/java-redis-cluster/google-cloud-redis-cluster/src/test/java/com/google/cloud/redis/cluster/v1beta1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/pom.xml b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/pom.xml new file mode 100644 index 000000000000..8a00a3bac151 --- /dev/null +++ b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1 + 0.1.0 + grpc-google-cloud-redis-cluster-v1 + GRPC library for google-cloud-redis-cluster + + com.google.cloud + google-cloud-redis-cluster-parent + 0.1.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterGrpc.java b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterGrpc.java new file mode 100644 index 000000000000..de56cd8685fb --- /dev/null +++ b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterGrpc.java @@ -0,0 +1,990 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.redis.cluster.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Configures and manages Cloud Memorystore for Redis clusters
+ * Google Cloud Memorystore for Redis Cluster
+ * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+ * for Redis API and defines the following resource model for managing Redis
+ * clusters:
+ * * The service works with a collection of cloud projects, named: `/projects/*`
+ * * Each project has a collection of available locations, named: `/locations/*`
+ * * Each location has a collection of Redis clusters, named: `/clusters/*`
+ * * As such, Redis clusters are resources of the form:
+ *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+ * Note that location_id must be a GCP `region`; for example:
+ * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+ * We use API version selector for Flex APIs
+ * * The versioning strategy is release-based versioning
+ * * Our backend CLH only deals with the superset version (called v1main)
+ * * Existing backend for Redis Gen1 and MRR is not touched.
+ * * More details in go/redis-flex-api-versioning
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class CloudRedisClusterGrpc { + + private CloudRedisClusterGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.redis.cluster.v1.CloudRedisCluster"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.ListClustersRequest, + com.google.cloud.redis.cluster.v1.ListClustersResponse> + getListClustersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListClusters", + requestType = com.google.cloud.redis.cluster.v1.ListClustersRequest.class, + responseType = com.google.cloud.redis.cluster.v1.ListClustersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.ListClustersRequest, + com.google.cloud.redis.cluster.v1.ListClustersResponse> + getListClustersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.ListClustersRequest, + com.google.cloud.redis.cluster.v1.ListClustersResponse> + getListClustersMethod; + if ((getListClustersMethod = CloudRedisClusterGrpc.getListClustersMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getListClustersMethod = CloudRedisClusterGrpc.getListClustersMethod) == null) { + CloudRedisClusterGrpc.getListClustersMethod = + getListClustersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListClusters")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.ListClustersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.ListClustersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("ListClusters")) + .build(); + } + } + } + return getListClustersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.GetClusterRequest, + com.google.cloud.redis.cluster.v1.Cluster> + getGetClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCluster", + requestType = com.google.cloud.redis.cluster.v1.GetClusterRequest.class, + responseType = com.google.cloud.redis.cluster.v1.Cluster.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.GetClusterRequest, + com.google.cloud.redis.cluster.v1.Cluster> + getGetClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.GetClusterRequest, + com.google.cloud.redis.cluster.v1.Cluster> + getGetClusterMethod; + if ((getGetClusterMethod = CloudRedisClusterGrpc.getGetClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getGetClusterMethod = CloudRedisClusterGrpc.getGetClusterMethod) == null) { + CloudRedisClusterGrpc.getGetClusterMethod = + getGetClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.GetClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("GetCluster")) + .build(); + } + } + } + return getGetClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.UpdateClusterRequest, com.google.longrunning.Operation> + getUpdateClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCluster", + requestType = com.google.cloud.redis.cluster.v1.UpdateClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.UpdateClusterRequest, com.google.longrunning.Operation> + getUpdateClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.UpdateClusterRequest, + com.google.longrunning.Operation> + getUpdateClusterMethod; + if ((getUpdateClusterMethod = CloudRedisClusterGrpc.getUpdateClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getUpdateClusterMethod = CloudRedisClusterGrpc.getUpdateClusterMethod) == null) { + CloudRedisClusterGrpc.getUpdateClusterMethod = + getUpdateClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.UpdateClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("UpdateCluster")) + .build(); + } + } + } + return getUpdateClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.DeleteClusterRequest, com.google.longrunning.Operation> + getDeleteClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCluster", + requestType = com.google.cloud.redis.cluster.v1.DeleteClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.DeleteClusterRequest, com.google.longrunning.Operation> + getDeleteClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.DeleteClusterRequest, + com.google.longrunning.Operation> + getDeleteClusterMethod; + if ((getDeleteClusterMethod = CloudRedisClusterGrpc.getDeleteClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getDeleteClusterMethod = CloudRedisClusterGrpc.getDeleteClusterMethod) == null) { + CloudRedisClusterGrpc.getDeleteClusterMethod = + getDeleteClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.DeleteClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("DeleteCluster")) + .build(); + } + } + } + return getDeleteClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.CreateClusterRequest, com.google.longrunning.Operation> + getCreateClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCluster", + requestType = com.google.cloud.redis.cluster.v1.CreateClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.CreateClusterRequest, com.google.longrunning.Operation> + getCreateClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1.CreateClusterRequest, + com.google.longrunning.Operation> + getCreateClusterMethod; + if ((getCreateClusterMethod = CloudRedisClusterGrpc.getCreateClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getCreateClusterMethod = CloudRedisClusterGrpc.getCreateClusterMethod) == null) { + CloudRedisClusterGrpc.getCreateClusterMethod = + getCreateClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1.CreateClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("CreateCluster")) + .build(); + } + } + } + return getCreateClusterMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CloudRedisClusterStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudRedisClusterStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterStub(channel, callOptions); + } + }; + return CloudRedisClusterStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CloudRedisClusterBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudRedisClusterBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterBlockingStub(channel, callOptions); + } + }; + return CloudRedisClusterBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CloudRedisClusterFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudRedisClusterFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterFutureStub(channel, callOptions); + } + }; + return CloudRedisClusterFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + default void listClusters( + com.google.cloud.redis.cluster.v1.ListClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListClustersMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + default void getCluster( + com.google.cloud.redis.cluster.v1.GetClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + default void updateCluster( + com.google.cloud.redis.cluster.v1.UpdateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + default void deleteCluster( + com.google.cloud.redis.cluster.v1.DeleteClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + default void createCluster( + com.google.cloud.redis.cluster.v1.CreateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateClusterMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public abstract static class CloudRedisClusterImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return CloudRedisClusterGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public static final class CloudRedisClusterStub + extends io.grpc.stub.AbstractAsyncStub { + private CloudRedisClusterStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudRedisClusterStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + public void listClusters( + com.google.cloud.redis.cluster.v1.ListClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListClustersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + public void getCluster( + com.google.cloud.redis.cluster.v1.GetClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + public void updateCluster( + com.google.cloud.redis.cluster.v1.UpdateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + public void deleteCluster( + com.google.cloud.redis.cluster.v1.DeleteClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + public void createCluster( + com.google.cloud.redis.cluster.v1.CreateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateClusterMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public static final class CloudRedisClusterBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CloudRedisClusterBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudRedisClusterBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + public com.google.cloud.redis.cluster.v1.ListClustersResponse listClusters( + com.google.cloud.redis.cluster.v1.ListClustersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListClustersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + public com.google.cloud.redis.cluster.v1.Cluster getCluster( + com.google.cloud.redis.cluster.v1.GetClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + public com.google.longrunning.Operation updateCluster( + com.google.cloud.redis.cluster.v1.UpdateClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + public com.google.longrunning.Operation deleteCluster( + com.google.cloud.redis.cluster.v1.DeleteClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + public com.google.longrunning.Operation createCluster( + com.google.cloud.redis.cluster.v1.CreateClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateClusterMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public static final class CloudRedisClusterFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CloudRedisClusterFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudRedisClusterFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.redis.cluster.v1.ListClustersResponse> + listClusters(com.google.cloud.redis.cluster.v1.ListClustersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListClustersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.redis.cluster.v1.Cluster> + getCluster(com.google.cloud.redis.cluster.v1.GetClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCluster(com.google.cloud.redis.cluster.v1.UpdateClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCluster(com.google.cloud.redis.cluster.v1.DeleteClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCluster(com.google.cloud.redis.cluster.v1.CreateClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateClusterMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CLUSTERS = 0; + private static final int METHODID_GET_CLUSTER = 1; + private static final int METHODID_UPDATE_CLUSTER = 2; + private static final int METHODID_DELETE_CLUSTER = 3; + private static final int METHODID_CREATE_CLUSTER = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_CLUSTERS: + serviceImpl.listClusters( + (com.google.cloud.redis.cluster.v1.ListClustersRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_CLUSTER: + serviceImpl.getCluster( + (com.google.cloud.redis.cluster.v1.GetClusterRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_CLUSTER: + serviceImpl.updateCluster( + (com.google.cloud.redis.cluster.v1.UpdateClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CLUSTER: + serviceImpl.deleteCluster( + (com.google.cloud.redis.cluster.v1.DeleteClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_CLUSTER: + serviceImpl.createCluster( + (com.google.cloud.redis.cluster.v1.CreateClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListClustersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1.ListClustersRequest, + com.google.cloud.redis.cluster.v1.ListClustersResponse>( + service, METHODID_LIST_CLUSTERS))) + .addMethod( + getGetClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1.GetClusterRequest, + com.google.cloud.redis.cluster.v1.Cluster>(service, METHODID_GET_CLUSTER))) + .addMethod( + getUpdateClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1.UpdateClusterRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_CLUSTER))) + .addMethod( + getDeleteClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1.DeleteClusterRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_CLUSTER))) + .addMethod( + getCreateClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1.CreateClusterRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_CLUSTER))) + .build(); + } + + private abstract static class CloudRedisClusterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CloudRedisClusterBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CloudRedisCluster"); + } + } + + private static final class CloudRedisClusterFileDescriptorSupplier + extends CloudRedisClusterBaseDescriptorSupplier { + CloudRedisClusterFileDescriptorSupplier() {} + } + + private static final class CloudRedisClusterMethodDescriptorSupplier + extends CloudRedisClusterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + CloudRedisClusterMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (CloudRedisClusterGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CloudRedisClusterFileDescriptorSupplier()) + .addMethod(getListClustersMethod()) + .addMethod(getGetClusterMethod()) + .addMethod(getUpdateClusterMethod()) + .addMethod(getDeleteClusterMethod()) + .addMethod(getCreateClusterMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/pom.xml b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/pom.xml new file mode 100644 index 000000000000..f0a41be67ef9 --- /dev/null +++ b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1beta1 + 0.1.0 + grpc-google-cloud-redis-cluster-v1beta1 + GRPC library for google-cloud-redis-cluster + + com.google.cloud + google-cloud-redis-cluster-parent + 0.1.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1beta1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterGrpc.java b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterGrpc.java new file mode 100644 index 000000000000..269fabee2663 --- /dev/null +++ b/java-redis-cluster/grpc-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterGrpc.java @@ -0,0 +1,999 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.redis.cluster.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Configures and manages Cloud Memorystore for Redis clusters
+ * Google Cloud Memorystore for Redis Cluster
+ * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+ * for Redis API and defines the following resource model for managing Redis
+ * clusters:
+ * * The service works with a collection of cloud projects, named: `/projects/*`
+ * * Each project has a collection of available locations, named: `/locations/*`
+ * * Each location has a collection of Redis clusters, named: `/clusters/*`
+ * * As such, Redis clusters are resources of the form:
+ *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+ * Note that location_id must be a GCP `region`; for example:
+ * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+ * We use API version selector for Flex APIs
+ * * The versioning strategy is release-based versioning
+ * * Our backend CLH only deals with the superset version (called v1main)
+ * * Existing backend for Redis Gen1 and MRR is not touched.
+ * * More details in go/redis-flex-api-versioning
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class CloudRedisClusterGrpc { + + private CloudRedisClusterGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.redis.cluster.v1beta1.CloudRedisCluster"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest, + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse> + getListClustersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListClusters", + requestType = com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.class, + responseType = com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest, + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse> + getListClustersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest, + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse> + getListClustersMethod; + if ((getListClustersMethod = CloudRedisClusterGrpc.getListClustersMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getListClustersMethod = CloudRedisClusterGrpc.getListClustersMethod) == null) { + CloudRedisClusterGrpc.getListClustersMethod = + getListClustersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListClusters")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("ListClusters")) + .build(); + } + } + } + return getListClustersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest, + com.google.cloud.redis.cluster.v1beta1.Cluster> + getGetClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCluster", + requestType = com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.class, + responseType = com.google.cloud.redis.cluster.v1beta1.Cluster.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest, + com.google.cloud.redis.cluster.v1beta1.Cluster> + getGetClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest, + com.google.cloud.redis.cluster.v1beta1.Cluster> + getGetClusterMethod; + if ((getGetClusterMethod = CloudRedisClusterGrpc.getGetClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getGetClusterMethod = CloudRedisClusterGrpc.getGetClusterMethod) == null) { + CloudRedisClusterGrpc.getGetClusterMethod = + getGetClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("GetCluster")) + .build(); + } + } + } + return getGetClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest, + com.google.longrunning.Operation> + getUpdateClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCluster", + requestType = com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest, + com.google.longrunning.Operation> + getUpdateClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest, + com.google.longrunning.Operation> + getUpdateClusterMethod; + if ((getUpdateClusterMethod = CloudRedisClusterGrpc.getUpdateClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getUpdateClusterMethod = CloudRedisClusterGrpc.getUpdateClusterMethod) == null) { + CloudRedisClusterGrpc.getUpdateClusterMethod = + getUpdateClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("UpdateCluster")) + .build(); + } + } + } + return getUpdateClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest, + com.google.longrunning.Operation> + getDeleteClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCluster", + requestType = com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest, + com.google.longrunning.Operation> + getDeleteClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest, + com.google.longrunning.Operation> + getDeleteClusterMethod; + if ((getDeleteClusterMethod = CloudRedisClusterGrpc.getDeleteClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getDeleteClusterMethod = CloudRedisClusterGrpc.getDeleteClusterMethod) == null) { + CloudRedisClusterGrpc.getDeleteClusterMethod = + getDeleteClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("DeleteCluster")) + .build(); + } + } + } + return getDeleteClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest, + com.google.longrunning.Operation> + getCreateClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCluster", + requestType = com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest, + com.google.longrunning.Operation> + getCreateClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest, + com.google.longrunning.Operation> + getCreateClusterMethod; + if ((getCreateClusterMethod = CloudRedisClusterGrpc.getCreateClusterMethod) == null) { + synchronized (CloudRedisClusterGrpc.class) { + if ((getCreateClusterMethod = CloudRedisClusterGrpc.getCreateClusterMethod) == null) { + CloudRedisClusterGrpc.getCreateClusterMethod = + getCreateClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudRedisClusterMethodDescriptorSupplier("CreateCluster")) + .build(); + } + } + } + return getCreateClusterMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CloudRedisClusterStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudRedisClusterStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterStub(channel, callOptions); + } + }; + return CloudRedisClusterStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CloudRedisClusterBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudRedisClusterBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterBlockingStub(channel, callOptions); + } + }; + return CloudRedisClusterBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CloudRedisClusterFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudRedisClusterFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterFutureStub(channel, callOptions); + } + }; + return CloudRedisClusterFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + default void listClusters( + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListClustersMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + default void getCluster( + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + default void updateCluster( + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + default void deleteCluster( + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + default void createCluster( + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateClusterMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public abstract static class CloudRedisClusterImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return CloudRedisClusterGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public static final class CloudRedisClusterStub + extends io.grpc.stub.AbstractAsyncStub { + private CloudRedisClusterStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudRedisClusterStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + public void listClusters( + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListClustersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + public void getCluster( + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + public void updateCluster( + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + public void deleteCluster( + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + public void createCluster( + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateClusterMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public static final class CloudRedisClusterBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CloudRedisClusterBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudRedisClusterBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + public com.google.cloud.redis.cluster.v1beta1.ListClustersResponse listClusters( + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListClustersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + public com.google.cloud.redis.cluster.v1beta1.Cluster getCluster( + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + public com.google.longrunning.Operation updateCluster( + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + public com.google.longrunning.Operation deleteCluster( + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + public com.google.longrunning.Operation createCluster( + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateClusterMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service CloudRedisCluster. + * + *
+   * Configures and manages Cloud Memorystore for Redis clusters
+   * Google Cloud Memorystore for Redis Cluster
+   * The `redis.googleapis.com` service implements the Google Cloud Memorystore
+   * for Redis API and defines the following resource model for managing Redis
+   * clusters:
+   * * The service works with a collection of cloud projects, named: `/projects/*`
+   * * Each project has a collection of available locations, named: `/locations/*`
+   * * Each location has a collection of Redis clusters, named: `/clusters/*`
+   * * As such, Redis clusters are resources of the form:
+   *   `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
+   * Note that location_id must be a GCP `region`; for example:
+   * * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
+   * We use API version selector for Flex APIs
+   * * The versioning strategy is release-based versioning
+   * * Our backend CLH only deals with the superset version (called v1main)
+   * * Existing backend for Redis Gen1 and MRR is not touched.
+   * * More details in go/redis-flex-api-versioning
+   * 
+ */ + public static final class CloudRedisClusterFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CloudRedisClusterFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudRedisClusterFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudRedisClusterFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists all Redis clusters owned by a project in either the specified
+     * location (region) or all locations.
+     * The location should have the following format:
+     * * `projects/{project_id}/locations/{location_id}`
+     * If `location_id` is specified as `-` (wildcard), then all regions
+     * available to the project are queried, and the results are aggregated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse> + listClusters(com.google.cloud.redis.cluster.v1beta1.ListClustersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListClustersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a specific Redis cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.redis.cluster.v1beta1.Cluster> + getCluster(com.google.cloud.redis.cluster.v1beta1.GetClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the metadata and configuration of a specific Redis cluster.
+     * Completed longrunning.Operation will contain the new cluster object
+     * in the response field. The returned operation is automatically deleted
+     * after a few hours, so there is no need to call DeleteOperation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCluster(com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specific Redis cluster. Cluster stops serving and data is
+     * deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCluster(com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a Redis cluster based on the specified properties.
+     * The creation is executed asynchronously and callers may check the returned
+     * operation to track its progress. Once the operation is completed the Redis
+     * cluster will be fully functional. The completed longrunning.Operation will
+     * contain the new cluster object in the response field.
+     * The returned operation is automatically deleted after a few hours, so there
+     * is no need to call DeleteOperation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCluster(com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateClusterMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CLUSTERS = 0; + private static final int METHODID_GET_CLUSTER = 1; + private static final int METHODID_UPDATE_CLUSTER = 2; + private static final int METHODID_DELETE_CLUSTER = 3; + private static final int METHODID_CREATE_CLUSTER = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_CLUSTERS: + serviceImpl.listClusters( + (com.google.cloud.redis.cluster.v1beta1.ListClustersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse>) + responseObserver); + break; + case METHODID_GET_CLUSTER: + serviceImpl.getCluster( + (com.google.cloud.redis.cluster.v1beta1.GetClusterRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_CLUSTER: + serviceImpl.updateCluster( + (com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CLUSTER: + serviceImpl.deleteCluster( + (com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_CLUSTER: + serviceImpl.createCluster( + (com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListClustersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest, + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse>( + service, METHODID_LIST_CLUSTERS))) + .addMethod( + getGetClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest, + com.google.cloud.redis.cluster.v1beta1.Cluster>(service, METHODID_GET_CLUSTER))) + .addMethod( + getUpdateClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_CLUSTER))) + .addMethod( + getDeleteClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_CLUSTER))) + .addMethod( + getCreateClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_CLUSTER))) + .build(); + } + + private abstract static class CloudRedisClusterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CloudRedisClusterBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CloudRedisCluster"); + } + } + + private static final class CloudRedisClusterFileDescriptorSupplier + extends CloudRedisClusterBaseDescriptorSupplier { + CloudRedisClusterFileDescriptorSupplier() {} + } + + private static final class CloudRedisClusterMethodDescriptorSupplier + extends CloudRedisClusterBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + CloudRedisClusterMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (CloudRedisClusterGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CloudRedisClusterFileDescriptorSupplier()) + .addMethod(getListClustersMethod()) + .addMethod(getGetClusterMethod()) + .addMethod(getUpdateClusterMethod()) + .addMethod(getDeleteClusterMethod()) + .addMethod(getCreateClusterMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-redis-cluster/owlbot.py b/java-redis-cluster/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-redis-cluster/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-redis-cluster/pom.xml b/java-redis-cluster/pom.xml new file mode 100644 index 000000000000..0c2baaa26556 --- /dev/null +++ b/java-redis-cluster/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + com.google.cloud + google-cloud-redis-cluster-parent + pom + 0.1.0 + Google Google Cloud Memorystore for Redis API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.23.0 + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-redis-cluster-parent + + + + + + com.google.cloud + google-cloud-redis-cluster + 0.1.0 + + + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1 + 0.1.0 + + + com.google.api.grpc + grpc-google-cloud-redis-cluster-v1beta1 + 0.1.0 + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1beta1 + 0.1.0 + + + com.google.api.grpc + proto-google-cloud-redis-cluster-v1 + 0.1.0 + + + + + + google-cloud-redis-cluster + grpc-google-cloud-redis-cluster-v1 + grpc-google-cloud-redis-cluster-v1beta1 + proto-google-cloud-redis-cluster-v1beta1 + proto-google-cloud-redis-cluster-v1 + google-cloud-redis-cluster-bom + + + diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/clirr-ignored-differences.xml b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..941a5efda320 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/redis/cluster/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/redis/cluster/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/redis/cluster/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/pom.xml b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/pom.xml new file mode 100644 index 000000000000..53bfc7002d03 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-redis-cluster-v1 + 0.1.0 + proto-google-cloud-redis-cluster-v1 + Proto library for google-cloud-redis-cluster + + com.google.cloud + google-cloud-redis-cluster-parent + 0.1.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/AuthorizationMode.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/AuthorizationMode.java new file mode 100644 index 000000000000..139bd98ba029 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/AuthorizationMode.java @@ -0,0 +1,180 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Available authorization mode of a Redis cluster.
+ * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1.AuthorizationMode} + */ +public enum AuthorizationMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not set.
+   * 
+ * + * AUTH_MODE_UNSPECIFIED = 0; + */ + AUTH_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * IAM basic authorization mode
+   * 
+ * + * AUTH_MODE_IAM_AUTH = 1; + */ + AUTH_MODE_IAM_AUTH(1), + /** + * + * + *
+   * Authorization disabled mode
+   * 
+ * + * AUTH_MODE_DISABLED = 2; + */ + AUTH_MODE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not set.
+   * 
+ * + * AUTH_MODE_UNSPECIFIED = 0; + */ + public static final int AUTH_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * IAM basic authorization mode
+   * 
+ * + * AUTH_MODE_IAM_AUTH = 1; + */ + public static final int AUTH_MODE_IAM_AUTH_VALUE = 1; + /** + * + * + *
+   * Authorization disabled mode
+   * 
+ * + * AUTH_MODE_DISABLED = 2; + */ + public static final int AUTH_MODE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthorizationMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AuthorizationMode forNumber(int value) { + switch (value) { + case 0: + return AUTH_MODE_UNSPECIFIED; + case 1: + return AUTH_MODE_IAM_AUTH; + case 2: + return AUTH_MODE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AuthorizationMode findValueByNumber(int number) { + return AuthorizationMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AuthorizationMode[] VALUES = values(); + + public static AuthorizationMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AuthorizationMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.AuthorizationMode) +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterProto.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterProto.java new file mode 100644 index 000000000000..d0260702fac5 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CloudRedisClusterProto.java @@ -0,0 +1,368 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public final class CloudRedisClusterProto { + private CloudRedisClusterProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_Cluster_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_PscConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_PscConnection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n7google/cloud/redis/cluster/v1/cloud_re" + + "dis_cluster.proto\022\035google.cloud.redis.cl" + + "uster.v1\032\034google/api/annotations.proto\032\027" + + "google/api/client.proto\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032#google/longrunning/operations.proto" + + "\032\031google/protobuf/any.proto\032\033google/prot" + + "obuf/empty.proto\032 google/protobuf/field_" + + "mask.proto\032\037google/protobuf/timestamp.pr" + + "oto\"\277\001\n\024CreateClusterRequest\022:\n\006parent\030\001" + + " \001(\tB*\342A\001\002\372A#\n!locations.googleapis.com/" + + "Location\022\030\n\ncluster_id\030\002 \001(\tB\004\342A\001\002\022=\n\007cl" + + "uster\030\003 \001(\0132&.google.cloud.redis.cluster" + + ".v1.ClusterB\004\342A\001\002\022\022\n\nrequest_id\030\004 \001(\t\"x\n" + + "\023ListClustersRequest\022:\n\006parent\030\001 \001(\tB*\342A" + + "\001\002\372A#\n!locations.googleapis.com/Location" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"" + + "~\n\024ListClustersResponse\0228\n\010clusters\030\001 \003(" + + "\0132&.google.cloud.redis.cluster.v1.Cluste" + + "r\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachabl" + + "e\030\003 \003(\t\"\240\001\n\024UpdateClusterRequest\0225\n\013upda" + + "te_mask\030\001 \001(\0132\032.google.protobuf.FieldMas" + + "kB\004\342A\001\002\022=\n\007cluster\030\002 \001(\0132&.google.cloud." + + "redis.cluster.v1.ClusterB\004\342A\001\002\022\022\n\nreques" + + "t_id\030\003 \001(\t\"H\n\021GetClusterRequest\0223\n\004name\030" + + "\001 \001(\tB%\342A\001\002\372A\036\n\034redis.googleapis.com/Clu" + + "ster\"_\n\024DeleteClusterRequest\0223\n\004name\030\001 \001" + + "(\tB%\342A\001\002\372A\036\n\034redis.googleapis.com/Cluste" + + "r\022\022\n\nrequest_id\030\002 \001(\t\"\274\t\n\007Cluster\022\022\n\004nam" + + "e\030\001 \001(\tB\004\342A\001\002\0225\n\013create_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\022A\n\005state\030\004 " + + "\001(\0162,.google.cloud.redis.cluster.v1.Clus" + + "ter.StateB\004\342A\001\003\022\021\n\003uid\030\005 \001(\tB\004\342A\001\003\022 \n\rre" + + "plica_count\030\010 \001(\005B\004\342A\001\001H\000\210\001\001\022R\n\022authoriz" + + "ation_mode\030\013 \001(\01620.google.cloud.redis.cl" + + "uster.v1.AuthorizationModeB\004\342A\001\001\022[\n\027tran" + + "sit_encryption_mode\030\014 \001(\01624.google.cloud" + + ".redis.cluster.v1.TransitEncryptionModeB" + + "\004\342A\001\001\022\032\n\007size_gb\030\r \001(\005B\004\342A\001\003H\001\210\001\001\022\036\n\013sha" + + "rd_count\030\016 \001(\005B\004\342A\001\002H\002\210\001\001\022C\n\013psc_configs" + + "\030\017 \003(\0132(.google.cloud.redis.cluster.v1.P" + + "scConfigB\004\342A\001\002\022S\n\023discovery_endpoints\030\020 " + + "\003(\01320.google.cloud.redis.cluster.v1.Disc" + + "overyEndpointB\004\342A\001\003\022K\n\017psc_connections\030\021" + + " \003(\0132,.google.cloud.redis.cluster.v1.Psc" + + "ConnectionB\004\342A\001\003\022J\n\nstate_info\030\022 \001(\01320.g" + + "oogle.cloud.redis.cluster.v1.Cluster.Sta" + + "teInfoB\004\342A\001\003\032\352\001\n\tStateInfo\022R\n\013update_inf" + + "o\030\001 \001(\0132;.google.cloud.redis.cluster.v1." + + "Cluster.StateInfo.UpdateInfoH\000\032\200\001\n\nUpdat" + + "eInfo\022\037\n\022target_shard_count\030\001 \001(\005H\000\210\001\001\022!" + + "\n\024target_replica_count\030\002 \001(\005H\001\210\001\001B\025\n\023_ta" + + "rget_shard_countB\027\n\025_target_replica_coun" + + "tB\006\n\004info\"T\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPDATING\020" + + "\003\022\014\n\010DELETING\020\004:]\352AZ\n\034redis.googleapis.c" + + "om/Cluster\022:projects/{project}/locations" + + "/{location}/clusters/{cluster}B\020\n\016_repli" + + "ca_countB\n\n\010_size_gbB\016\n\014_shard_count\"\"\n\t" + + "PscConfig\022\025\n\007network\030\002 \001(\tB\004\342A\001\002\"\202\001\n\021Dis" + + "coveryEndpoint\022\025\n\007address\030\001 \001(\tB\004\342A\001\003\022\022\n" + + "\004port\030\002 \001(\005B\004\342A\001\003\022B\n\npsc_config\030\003 \001(\0132(." + + "google.cloud.redis.cluster.v1.PscConfigB" + + "\004\342A\001\003\"\221\001\n\rPscConnection\022\037\n\021psc_connectio" + + "n_id\030\001 \001(\tB\004\342A\001\003\022\025\n\007address\030\002 \001(\tB\004\342A\001\003\022" + + "\035\n\017forwarding_rule\030\003 \001(\tB\004\342A\001\003\022\030\n\nprojec" + + "t_id\030\004 \001(\tB\004\342A\001\003\022\017\n\007network\030\005 \001(\t\"\207\002\n\021Op" + + "erationMetadata\0225\n\013create_time\030\001 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\004\342A\001\003\0222\n\010end_ti" + + "me\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342A" + + "\001\003\022\024\n\006target\030\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004" + + "\342A\001\003\022\034\n\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n\026re" + + "quested_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_" + + "version\030\007 \001(\tB\004\342A\001\003*^\n\021AuthorizationMode" + + "\022\031\n\025AUTH_MODE_UNSPECIFIED\020\000\022\026\n\022AUTH_MODE" + + "_IAM_AUTH\020\001\022\026\n\022AUTH_MODE_DISABLED\020\002*\231\001\n\025" + + "TransitEncryptionMode\022\'\n#TRANSIT_ENCRYPT" + + "ION_MODE_UNSPECIFIED\020\000\022$\n TRANSIT_ENCRYP" + + "TION_MODE_DISABLED\020\001\0221\n-TRANSIT_ENCRYPTI" + + "ON_MODE_SERVER_AUTHENTICATION\020\0022\324\010\n\021Clou" + + "dRedisCluster\022\266\001\n\014ListClusters\0222.google." + + "cloud.redis.cluster.v1.ListClustersReque" + + "st\0323.google.cloud.redis.cluster.v1.ListC" + + "lustersResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1/{p" + + "arent=projects/*/locations/*}/clusters\022\243" + + "\001\n\nGetCluster\0220.google.cloud.redis.clust" + + "er.v1.GetClusterRequest\032&.google.cloud.r" + + "edis.cluster.v1.Cluster\";\332A\004name\202\323\344\223\002.\022," + + "/v1/{name=projects/*/locations/*/cluster" + + "s/*}\022\341\001\n\rUpdateCluster\0223.google.cloud.re" + + "dis.cluster.v1.UpdateClusterRequest\032\035.go" + + "ogle.longrunning.Operation\"|\312A\036\n\007Cluster" + + "\022\023google.protobuf.Any\332A\023cluster,update_m" + + "ask\202\323\344\223\002?24/v1/{cluster.name=projects/*/" + + "locations/*/clusters/*}:\007cluster\022\317\001\n\rDel" + + "eteCluster\0223.google.cloud.redis.cluster." + + "v1.DeleteClusterRequest\032\035.google.longrun" + + "ning.Operation\"j\312A,\n\025google.protobuf.Emp" + + "ty\022\023google.protobuf.Any\332A\004name\202\323\344\223\002.*,/v" + + "1/{name=projects/*/locations/*/clusters/" + + "*}\022\337\001\n\rCreateCluster\0223.google.cloud.redi" + + "s.cluster.v1.CreateClusterRequest\032\035.goog" + + "le.longrunning.Operation\"z\312A\036\n\007Cluster\022\023" + + "google.protobuf.Any\332A\031parent,cluster,clu" + + "ster_id\202\323\344\223\0027\",/v1/{parent=projects/*/lo" + + "cations/*}/clusters:\007cluster\032H\312A\024redis.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformBz\n!com.google.clo" + + "ud.redis.cluster.v1B\026CloudRedisClusterPr" + + "otoP\001Z;cloud.google.com/go/redis/cluster" + + "/apiv1/clusterpb;clusterpbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_descriptor, + new java.lang.String[] { + "Parent", "ClusterId", "Cluster", "RequestId", + }); + internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_descriptor, + new java.lang.String[] { + "Clusters", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Cluster", "RequestId", + }); + internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_redis_cluster_v1_Cluster_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "State", + "Uid", + "ReplicaCount", + "AuthorizationMode", + "TransitEncryptionMode", + "SizeGb", + "ShardCount", + "PscConfigs", + "DiscoveryEndpoints", + "PscConnections", + "StateInfo", + "ReplicaCount", + "SizeGb", + "ShardCount", + }); + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor = + internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor, + new java.lang.String[] { + "UpdateInfo", "Info", + }); + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_descriptor = + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_descriptor, + new java.lang.String[] { + "TargetShardCount", "TargetReplicaCount", "TargetShardCount", "TargetReplicaCount", + }); + internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_redis_cluster_v1_PscConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor, + new java.lang.String[] { + "Network", + }); + internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor, + new java.lang.String[] { + "Address", "Port", "PscConfig", + }); + internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_redis_cluster_v1_PscConnection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor, + new java.lang.String[] { + "PscConnectionId", "Address", "ForwardingRule", "ProjectId", "Network", + }); + internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_redis_cluster_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/Cluster.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/Cluster.java new file mode 100644 index 000000000000..c1da78e30467 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/Cluster.java @@ -0,0 +1,5853 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * A cluster instance.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.Cluster} + */ +public final class Cluster extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.Cluster) + ClusterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Cluster.newBuilder() to construct. + private Cluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Cluster() { + name_ = ""; + state_ = 0; + uid_ = ""; + authorizationMode_ = 0; + transitEncryptionMode_ = 0; + pscConfigs_ = java.util.Collections.emptyList(); + discoveryEndpoints_ = java.util.Collections.emptyList(); + pscConnections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Cluster(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.Cluster.class, + com.google.cloud.redis.cluster.v1.Cluster.Builder.class); + } + + /** + * + * + *
+   * Represents the different states of a Redis cluster.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1.Cluster.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Redis cluster is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * Redis cluster has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * Redis cluster configuration is being updated.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * Redis cluster is being deleted.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Redis cluster is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * Redis cluster has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * Redis cluster configuration is being updated.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + * + * + *
+     * Redis cluster is being deleted.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return UPDATING; + case 4: + return DELETING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.Cluster.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.Cluster.State) + } + + public interface StateInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.Cluster.StateInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * @return Whether the updateInfo field is set. + */ + boolean hasUpdateInfo(); + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * @return The updateInfo. + */ + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo getUpdateInfo(); + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoOrBuilder + getUpdateInfoOrBuilder(); + + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.InfoCase getInfoCase(); + } + /** + * + * + *
+   * Represents additional information about the state of the cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.Cluster.StateInfo} + */ + public static final class StateInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.Cluster.StateInfo) + StateInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use StateInfo.newBuilder() to construct. + private StateInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StateInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StateInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.class, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.Builder.class); + } + + public interface UpdateInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return Whether the targetShardCount field is set. + */ + boolean hasTargetShardCount(); + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return The targetShardCount. + */ + int getTargetShardCount(); + + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return Whether the targetReplicaCount field is set. + */ + boolean hasTargetReplicaCount(); + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return The targetReplicaCount. + */ + int getTargetReplicaCount(); + } + /** + * + * + *
+     * Represents information about an updating cluster.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo} + */ + public static final class UpdateInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) + UpdateInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInfo.newBuilder() to construct. + private UpdateInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.class, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.Builder.class); + } + + private int bitField0_; + public static final int TARGET_SHARD_COUNT_FIELD_NUMBER = 1; + private int targetShardCount_ = 0; + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return Whether the targetShardCount field is set. + */ + @java.lang.Override + public boolean hasTargetShardCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return The targetShardCount. + */ + @java.lang.Override + public int getTargetShardCount() { + return targetShardCount_; + } + + public static final int TARGET_REPLICA_COUNT_FIELD_NUMBER = 2; + private int targetReplicaCount_ = 0; + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return Whether the targetReplicaCount field is set. + */ + @java.lang.Override + public boolean hasTargetReplicaCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return The targetReplicaCount. + */ + @java.lang.Override + public int getTargetReplicaCount() { + return targetReplicaCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(1, targetShardCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, targetReplicaCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, targetShardCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, targetReplicaCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo other = + (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) obj; + + if (hasTargetShardCount() != other.hasTargetShardCount()) return false; + if (hasTargetShardCount()) { + if (getTargetShardCount() != other.getTargetShardCount()) return false; + } + if (hasTargetReplicaCount() != other.hasTargetReplicaCount()) return false; + if (hasTargetReplicaCount()) { + if (getTargetReplicaCount() != other.getTargetReplicaCount()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTargetShardCount()) { + hash = (37 * hash) + TARGET_SHARD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTargetShardCount(); + } + if (hasTargetReplicaCount()) { + hash = (37 * hash) + TARGET_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTargetReplicaCount(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Represents information about an updating cluster.
+       * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.class, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.Builder.class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetShardCount_ = 0; + targetReplicaCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_UpdateInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo build() { + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo buildPartial() { + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo result = + new com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.targetShardCount_ = targetShardCount_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.targetReplicaCount_ = targetReplicaCount_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo other) { + if (other + == com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance()) return this; + if (other.hasTargetShardCount()) { + setTargetShardCount(other.getTargetShardCount()); + } + if (other.hasTargetReplicaCount()) { + setTargetReplicaCount(other.getTargetReplicaCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + targetShardCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + targetReplicaCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int targetShardCount_; + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @return Whether the targetShardCount field is set. + */ + @java.lang.Override + public boolean hasTargetShardCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @return The targetShardCount. + */ + @java.lang.Override + public int getTargetShardCount() { + return targetShardCount_; + } + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @param value The targetShardCount to set. + * @return This builder for chaining. + */ + public Builder setTargetShardCount(int value) { + + targetShardCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearTargetShardCount() { + bitField0_ = (bitField0_ & ~0x00000001); + targetShardCount_ = 0; + onChanged(); + return this; + } + + private int targetReplicaCount_; + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @return Whether the targetReplicaCount field is set. + */ + @java.lang.Override + public boolean hasTargetReplicaCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @return The targetReplicaCount. + */ + @java.lang.Override + public int getTargetReplicaCount() { + return targetReplicaCount_; + } + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @param value The targetReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setTargetReplicaCount(int value) { + + targetReplicaCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000002); + targetReplicaCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) + private static final com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo(); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int infoCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object info_; + + public enum InfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UPDATE_INFO(1), + INFO_NOT_SET(0); + private final int value; + + private InfoCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InfoCase valueOf(int value) { + return forNumber(value); + } + + public static InfoCase forNumber(int value) { + switch (value) { + case 1: + return UPDATE_INFO; + case 0: + return INFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InfoCase getInfoCase() { + return InfoCase.forNumber(infoCase_); + } + + public static final int UPDATE_INFO_FIELD_NUMBER = 1; + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * @return Whether the updateInfo field is set. + */ + @java.lang.Override + public boolean hasUpdateInfo() { + return infoCase_ == 1; + } + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * @return The updateInfo. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo getUpdateInfo() { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.getDefaultInstance(); + } + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoOrBuilder + getUpdateInfoOrBuilder() { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (infoCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.Cluster.StateInfo)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.Cluster.StateInfo other = + (com.google.cloud.redis.cluster.v1.Cluster.StateInfo) obj; + + if (!getInfoCase().equals(other.getInfoCase())) return false; + switch (infoCase_) { + case 1: + if (!getUpdateInfo().equals(other.getUpdateInfo())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (infoCase_) { + case 1: + hash = (37 * hash) + UPDATE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUpdateInfo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents additional information about the state of the cluster.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.Cluster.StateInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.Cluster.StateInfo) + com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.class, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.Cluster.StateInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (updateInfoBuilder_ != null) { + updateInfoBuilder_.clear(); + } + infoCase_ = 0; + info_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_StateInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.Cluster.StateInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo build() { + com.google.cloud.redis.cluster.v1.Cluster.StateInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo buildPartial() { + com.google.cloud.redis.cluster.v1.Cluster.StateInfo result = + new com.google.cloud.redis.cluster.v1.Cluster.StateInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.Cluster.StateInfo result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.redis.cluster.v1.Cluster.StateInfo result) { + result.infoCase_ = infoCase_; + result.info_ = this.info_; + if (infoCase_ == 1 && updateInfoBuilder_ != null) { + result.info_ = updateInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.Cluster.StateInfo) { + return mergeFrom((com.google.cloud.redis.cluster.v1.Cluster.StateInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.Cluster.StateInfo other) { + if (other == com.google.cloud.redis.cluster.v1.Cluster.StateInfo.getDefaultInstance()) + return this; + switch (other.getInfoCase()) { + case UPDATE_INFO: + { + mergeUpdateInfo(other.getUpdateInfo()); + break; + } + case INFO_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateInfoFieldBuilder().getBuilder(), extensionRegistry); + infoCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int infoCase_ = 0; + private java.lang.Object info_; + + public InfoCase getInfoCase() { + return InfoCase.forNumber(infoCase_); + } + + public Builder clearInfo() { + infoCase_ = 0; + info_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.Builder, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoOrBuilder> + updateInfoBuilder_; + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * @return Whether the updateInfo field is set. + */ + @java.lang.Override + public boolean hasUpdateInfo() { + return infoCase_ == 1; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * @return The updateInfo. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo getUpdateInfo() { + if (updateInfoBuilder_ == null) { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } else { + if (infoCase_ == 1) { + return updateInfoBuilder_.getMessage(); + } + return com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + public Builder setUpdateInfo( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo value) { + if (updateInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + info_ = value; + onChanged(); + } else { + updateInfoBuilder_.setMessage(value); + } + infoCase_ = 1; + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + public Builder setUpdateInfo( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.Builder builderForValue) { + if (updateInfoBuilder_ == null) { + info_ = builderForValue.build(); + onChanged(); + } else { + updateInfoBuilder_.setMessage(builderForValue.build()); + } + infoCase_ = 1; + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + public Builder mergeUpdateInfo( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo value) { + if (updateInfoBuilder_ == null) { + if (infoCase_ == 1 + && info_ + != com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance()) { + info_ = + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.newBuilder( + (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_) + .mergeFrom(value) + .buildPartial(); + } else { + info_ = value; + } + onChanged(); + } else { + if (infoCase_ == 1) { + updateInfoBuilder_.mergeFrom(value); + } else { + updateInfoBuilder_.setMessage(value); + } + } + infoCase_ = 1; + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + public Builder clearUpdateInfo() { + if (updateInfoBuilder_ == null) { + if (infoCase_ == 1) { + infoCase_ = 0; + info_ = null; + onChanged(); + } + } else { + if (infoCase_ == 1) { + infoCase_ = 0; + info_ = null; + } + updateInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.Builder + getUpdateInfoBuilder() { + return getUpdateInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoOrBuilder + getUpdateInfoOrBuilder() { + if ((infoCase_ == 1) && (updateInfoBuilder_ != null)) { + return updateInfoBuilder_.getMessageOrBuilder(); + } else { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.Builder, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoOrBuilder> + getUpdateInfoFieldBuilder() { + if (updateInfoBuilder_ == null) { + if (!(infoCase_ == 1)) { + info_ = + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.getDefaultInstance(); + } + updateInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo.Builder, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoOrBuilder>( + (com.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo) info_, + getParentForChildren(), + isClean()); + info_ = null; + } + infoCase_ = 1; + onChanged(); + return updateInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.Cluster.StateInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.Cluster.StateInfo) + private static final com.google.cloud.redis.cluster.v1.Cluster.StateInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.Cluster.StateInfo(); + } + + public static com.google.cloud.redis.cluster.v1.Cluster.StateInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StateInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.State getState() { + com.google.cloud.redis.cluster.v1.Cluster.State result = + com.google.cloud.redis.cluster.v1.Cluster.State.forNumber(state_); + return result == null ? com.google.cloud.redis.cluster.v1.Cluster.State.UNRECOGNIZED : result; + } + + public static final int UID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICA_COUNT_FIELD_NUMBER = 8; + private int replicaCount_ = 0; + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + @java.lang.Override + public boolean hasReplicaCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public int getReplicaCount() { + return replicaCount_; + } + + public static final int AUTHORIZATION_MODE_FIELD_NUMBER = 11; + private int authorizationMode_ = 0; + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authorizationMode. + */ + @java.lang.Override + public int getAuthorizationModeValue() { + return authorizationMode_; + } + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authorizationMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.AuthorizationMode getAuthorizationMode() { + com.google.cloud.redis.cluster.v1.AuthorizationMode result = + com.google.cloud.redis.cluster.v1.AuthorizationMode.forNumber(authorizationMode_); + return result == null + ? com.google.cloud.redis.cluster.v1.AuthorizationMode.UNRECOGNIZED + : result; + } + + public static final int TRANSIT_ENCRYPTION_MODE_FIELD_NUMBER = 12; + private int transitEncryptionMode_ = 0; + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for transitEncryptionMode. + */ + @java.lang.Override + public int getTransitEncryptionModeValue() { + return transitEncryptionMode_; + } + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transitEncryptionMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.TransitEncryptionMode getTransitEncryptionMode() { + com.google.cloud.redis.cluster.v1.TransitEncryptionMode result = + com.google.cloud.redis.cluster.v1.TransitEncryptionMode.forNumber(transitEncryptionMode_); + return result == null + ? com.google.cloud.redis.cluster.v1.TransitEncryptionMode.UNRECOGNIZED + : result; + } + + public static final int SIZE_GB_FIELD_NUMBER = 13; + private int sizeGb_ = 0; + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + + public static final int SHARD_COUNT_FIELD_NUMBER = 14; + private int shardCount_ = 0; + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the shardCount field is set. + */ + @java.lang.Override + public boolean hasShardCount() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The shardCount. + */ + @java.lang.Override + public int getShardCount() { + return shardCount_; + } + + public static final int PSC_CONFIGS_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private java.util.List pscConfigs_; + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getPscConfigsList() { + return pscConfigs_; + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getPscConfigsOrBuilderList() { + return pscConfigs_; + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getPscConfigsCount() { + return pscConfigs_.size(); + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfig getPscConfigs(int index) { + return pscConfigs_.get(index); + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfigOrBuilder getPscConfigsOrBuilder(int index) { + return pscConfigs_.get(index); + } + + public static final int DISCOVERY_ENDPOINTS_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private java.util.List discoveryEndpoints_; + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDiscoveryEndpointsList() { + return discoveryEndpoints_; + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDiscoveryEndpointsOrBuilderList() { + return discoveryEndpoints_; + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDiscoveryEndpointsCount() { + return discoveryEndpoints_.size(); + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint getDiscoveryEndpoints(int index) { + return discoveryEndpoints_.get(index); + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder + getDiscoveryEndpointsOrBuilder(int index) { + return discoveryEndpoints_.get(index); + } + + public static final int PSC_CONNECTIONS_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private java.util.List pscConnections_; + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPscConnectionsList() { + return pscConnections_; + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPscConnectionsOrBuilderList() { + return pscConnections_; + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPscConnectionsCount() { + return pscConnections_.size(); + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConnection getPscConnections(int index) { + return pscConnections_.get(index); + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConnectionOrBuilder getPscConnectionsOrBuilder( + int index) { + return pscConnections_.get(index); + } + + public static final int STATE_INFO_FIELD_NUMBER = 18; + private com.google.cloud.redis.cluster.v1.Cluster.StateInfo stateInfo_; + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateInfo field is set. + */ + @java.lang.Override + public boolean hasStateInfo() { + return stateInfo_ != null; + } + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateInfo. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo getStateInfo() { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder getStateInfoOrBuilder() { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (state_ != com.google.cloud.redis.cluster.v1.Cluster.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(8, replicaCount_); + } + if (authorizationMode_ + != com.google.cloud.redis.cluster.v1.AuthorizationMode.AUTH_MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(11, authorizationMode_); + } + if (transitEncryptionMode_ + != com.google.cloud.redis.cluster.v1.TransitEncryptionMode + .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, transitEncryptionMode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(13, sizeGb_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(14, shardCount_); + } + for (int i = 0; i < pscConfigs_.size(); i++) { + output.writeMessage(15, pscConfigs_.get(i)); + } + for (int i = 0; i < discoveryEndpoints_.size(); i++) { + output.writeMessage(16, discoveryEndpoints_.get(i)); + } + for (int i = 0; i < pscConnections_.size(); i++) { + output.writeMessage(17, pscConnections_.get(i)); + } + if (stateInfo_ != null) { + output.writeMessage(18, getStateInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (state_ != com.google.cloud.redis.cluster.v1.Cluster.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, replicaCount_); + } + if (authorizationMode_ + != com.google.cloud.redis.cluster.v1.AuthorizationMode.AUTH_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, authorizationMode_); + } + if (transitEncryptionMode_ + != com.google.cloud.redis.cluster.v1.TransitEncryptionMode + .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, transitEncryptionMode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(13, sizeGb_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, shardCount_); + } + for (int i = 0; i < pscConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, pscConfigs_.get(i)); + } + for (int i = 0; i < discoveryEndpoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(16, discoveryEndpoints_.get(i)); + } + for (int i = 0; i < pscConnections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, pscConnections_.get(i)); + } + if (stateInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getStateInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.Cluster)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.Cluster other = + (com.google.cloud.redis.cluster.v1.Cluster) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasReplicaCount() != other.hasReplicaCount()) return false; + if (hasReplicaCount()) { + if (getReplicaCount() != other.getReplicaCount()) return false; + } + if (authorizationMode_ != other.authorizationMode_) return false; + if (transitEncryptionMode_ != other.transitEncryptionMode_) return false; + if (hasSizeGb() != other.hasSizeGb()) return false; + if (hasSizeGb()) { + if (getSizeGb() != other.getSizeGb()) return false; + } + if (hasShardCount() != other.hasShardCount()) return false; + if (hasShardCount()) { + if (getShardCount() != other.getShardCount()) return false; + } + if (!getPscConfigsList().equals(other.getPscConfigsList())) return false; + if (!getDiscoveryEndpointsList().equals(other.getDiscoveryEndpointsList())) return false; + if (!getPscConnectionsList().equals(other.getPscConnectionsList())) return false; + if (hasStateInfo() != other.hasStateInfo()) return false; + if (hasStateInfo()) { + if (!getStateInfo().equals(other.getStateInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasReplicaCount()) { + hash = (37 * hash) + REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getReplicaCount(); + } + hash = (37 * hash) + AUTHORIZATION_MODE_FIELD_NUMBER; + hash = (53 * hash) + authorizationMode_; + hash = (37 * hash) + TRANSIT_ENCRYPTION_MODE_FIELD_NUMBER; + hash = (53 * hash) + transitEncryptionMode_; + if (hasSizeGb()) { + hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getSizeGb(); + } + if (hasShardCount()) { + hash = (37 * hash) + SHARD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getShardCount(); + } + if (getPscConfigsCount() > 0) { + hash = (37 * hash) + PSC_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getPscConfigsList().hashCode(); + } + if (getDiscoveryEndpointsCount() > 0) { + hash = (37 * hash) + DISCOVERY_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryEndpointsList().hashCode(); + } + if (getPscConnectionsCount() > 0) { + hash = (37 * hash) + PSC_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPscConnectionsList().hashCode(); + } + if (hasStateInfo()) { + hash = (37 * hash) + STATE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getStateInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.Cluster parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1.Cluster prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A cluster instance.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.Cluster} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.Cluster) + com.google.cloud.redis.cluster.v1.ClusterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.Cluster.class, + com.google.cloud.redis.cluster.v1.Cluster.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.Cluster.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + state_ = 0; + uid_ = ""; + replicaCount_ = 0; + authorizationMode_ = 0; + transitEncryptionMode_ = 0; + sizeGb_ = 0; + shardCount_ = 0; + if (pscConfigsBuilder_ == null) { + pscConfigs_ = java.util.Collections.emptyList(); + } else { + pscConfigs_ = null; + pscConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (discoveryEndpointsBuilder_ == null) { + discoveryEndpoints_ = java.util.Collections.emptyList(); + } else { + discoveryEndpoints_ = null; + discoveryEndpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + if (pscConnectionsBuilder_ == null) { + pscConnections_ = java.util.Collections.emptyList(); + } else { + pscConnections_ = null; + pscConnectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + stateInfo_ = null; + if (stateInfoBuilder_ != null) { + stateInfoBuilder_.dispose(); + stateInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_Cluster_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster build() { + com.google.cloud.redis.cluster.v1.Cluster result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster buildPartial() { + com.google.cloud.redis.cluster.v1.Cluster result = + new com.google.cloud.redis.cluster.v1.Cluster(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.redis.cluster.v1.Cluster result) { + if (pscConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + pscConfigs_ = java.util.Collections.unmodifiableList(pscConfigs_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.pscConfigs_ = pscConfigs_; + } else { + result.pscConfigs_ = pscConfigsBuilder_.build(); + } + if (discoveryEndpointsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + discoveryEndpoints_ = java.util.Collections.unmodifiableList(discoveryEndpoints_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.discoveryEndpoints_ = discoveryEndpoints_; + } else { + result.discoveryEndpoints_ = discoveryEndpointsBuilder_.build(); + } + if (pscConnectionsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + pscConnections_ = java.util.Collections.unmodifiableList(pscConnections_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.pscConnections_ = pscConnections_; + } else { + result.pscConnections_ = pscConnectionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.Cluster result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.uid_ = uid_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.replicaCount_ = replicaCount_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.authorizationMode_ = authorizationMode_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.transitEncryptionMode_ = transitEncryptionMode_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.sizeGb_ = sizeGb_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.shardCount_ = shardCount_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.stateInfo_ = stateInfoBuilder_ == null ? stateInfo_ : stateInfoBuilder_.build(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.Cluster) { + return mergeFrom((com.google.cloud.redis.cluster.v1.Cluster) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.Cluster other) { + if (other == com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReplicaCount()) { + setReplicaCount(other.getReplicaCount()); + } + if (other.authorizationMode_ != 0) { + setAuthorizationModeValue(other.getAuthorizationModeValue()); + } + if (other.transitEncryptionMode_ != 0) { + setTransitEncryptionModeValue(other.getTransitEncryptionModeValue()); + } + if (other.hasSizeGb()) { + setSizeGb(other.getSizeGb()); + } + if (other.hasShardCount()) { + setShardCount(other.getShardCount()); + } + if (pscConfigsBuilder_ == null) { + if (!other.pscConfigs_.isEmpty()) { + if (pscConfigs_.isEmpty()) { + pscConfigs_ = other.pscConfigs_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensurePscConfigsIsMutable(); + pscConfigs_.addAll(other.pscConfigs_); + } + onChanged(); + } + } else { + if (!other.pscConfigs_.isEmpty()) { + if (pscConfigsBuilder_.isEmpty()) { + pscConfigsBuilder_.dispose(); + pscConfigsBuilder_ = null; + pscConfigs_ = other.pscConfigs_; + bitField0_ = (bitField0_ & ~0x00000200); + pscConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPscConfigsFieldBuilder() + : null; + } else { + pscConfigsBuilder_.addAllMessages(other.pscConfigs_); + } + } + } + if (discoveryEndpointsBuilder_ == null) { + if (!other.discoveryEndpoints_.isEmpty()) { + if (discoveryEndpoints_.isEmpty()) { + discoveryEndpoints_ = other.discoveryEndpoints_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.addAll(other.discoveryEndpoints_); + } + onChanged(); + } + } else { + if (!other.discoveryEndpoints_.isEmpty()) { + if (discoveryEndpointsBuilder_.isEmpty()) { + discoveryEndpointsBuilder_.dispose(); + discoveryEndpointsBuilder_ = null; + discoveryEndpoints_ = other.discoveryEndpoints_; + bitField0_ = (bitField0_ & ~0x00000400); + discoveryEndpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDiscoveryEndpointsFieldBuilder() + : null; + } else { + discoveryEndpointsBuilder_.addAllMessages(other.discoveryEndpoints_); + } + } + } + if (pscConnectionsBuilder_ == null) { + if (!other.pscConnections_.isEmpty()) { + if (pscConnections_.isEmpty()) { + pscConnections_ = other.pscConnections_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensurePscConnectionsIsMutable(); + pscConnections_.addAll(other.pscConnections_); + } + onChanged(); + } + } else { + if (!other.pscConnections_.isEmpty()) { + if (pscConnectionsBuilder_.isEmpty()) { + pscConnectionsBuilder_.dispose(); + pscConnectionsBuilder_ = null; + pscConnections_ = other.pscConnections_; + bitField0_ = (bitField0_ & ~0x00000800); + pscConnectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPscConnectionsFieldBuilder() + : null; + } else { + pscConnectionsBuilder_.addAllMessages(other.pscConnections_); + } + } + } + if (other.hasStateInfo()) { + mergeStateInfo(other.getStateInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 64: + { + replicaCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 64 + case 88: + { + authorizationMode_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 88 + case 96: + { + transitEncryptionMode_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 96 + case 104: + { + sizeGb_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 104 + case 112: + { + shardCount_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 112 + case 122: + { + com.google.cloud.redis.cluster.v1.PscConfig m = + input.readMessage( + com.google.cloud.redis.cluster.v1.PscConfig.parser(), extensionRegistry); + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.add(m); + } else { + pscConfigsBuilder_.addMessage(m); + } + break; + } // case 122 + case 130: + { + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint m = + input.readMessage( + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.parser(), + extensionRegistry); + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(m); + } else { + discoveryEndpointsBuilder_.addMessage(m); + } + break; + } // case 130 + case 138: + { + com.google.cloud.redis.cluster.v1.PscConnection m = + input.readMessage( + com.google.cloud.redis.cluster.v1.PscConnection.parser(), + extensionRegistry); + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.add(m); + } else { + pscConnectionsBuilder_.addMessage(m); + } + break; + } // case 138 + case 146: + { + input.readMessage(getStateInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 146 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster.State getState() { + com.google.cloud.redis.cluster.v1.Cluster.State result = + com.google.cloud.redis.cluster.v1.Cluster.State.forNumber(state_); + return result == null ? com.google.cloud.redis.cluster.v1.Cluster.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.redis.cluster.v1.Cluster.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int replicaCount_; + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + @java.lang.Override + public boolean hasReplicaCount() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public int getReplicaCount() { + return replicaCount_; + } + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The replicaCount to set. + * @return This builder for chaining. + */ + public Builder setReplicaCount(int value) { + + replicaCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000010); + replicaCount_ = 0; + onChanged(); + return this; + } + + private int authorizationMode_ = 0; + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authorizationMode. + */ + @java.lang.Override + public int getAuthorizationModeValue() { + return authorizationMode_; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for authorizationMode to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationModeValue(int value) { + authorizationMode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authorizationMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.AuthorizationMode getAuthorizationMode() { + com.google.cloud.redis.cluster.v1.AuthorizationMode result = + com.google.cloud.redis.cluster.v1.AuthorizationMode.forNumber(authorizationMode_); + return result == null + ? com.google.cloud.redis.cluster.v1.AuthorizationMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The authorizationMode to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationMode(com.google.cloud.redis.cluster.v1.AuthorizationMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + authorizationMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAuthorizationMode() { + bitField0_ = (bitField0_ & ~0x00000020); + authorizationMode_ = 0; + onChanged(); + return this; + } + + private int transitEncryptionMode_ = 0; + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for transitEncryptionMode. + */ + @java.lang.Override + public int getTransitEncryptionModeValue() { + return transitEncryptionMode_; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for transitEncryptionMode to set. + * @return This builder for chaining. + */ + public Builder setTransitEncryptionModeValue(int value) { + transitEncryptionMode_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transitEncryptionMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.TransitEncryptionMode getTransitEncryptionMode() { + com.google.cloud.redis.cluster.v1.TransitEncryptionMode result = + com.google.cloud.redis.cluster.v1.TransitEncryptionMode.forNumber(transitEncryptionMode_); + return result == null + ? com.google.cloud.redis.cluster.v1.TransitEncryptionMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The transitEncryptionMode to set. + * @return This builder for chaining. + */ + public Builder setTransitEncryptionMode( + com.google.cloud.redis.cluster.v1.TransitEncryptionMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + transitEncryptionMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTransitEncryptionMode() { + bitField0_ = (bitField0_ & ~0x00000040); + transitEncryptionMode_ = 0; + onChanged(); + return this; + } + + private int sizeGb_; + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(int value) { + + sizeGb_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + bitField0_ = (bitField0_ & ~0x00000080); + sizeGb_ = 0; + onChanged(); + return this; + } + + private int shardCount_; + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the shardCount field is set. + */ + @java.lang.Override + public boolean hasShardCount() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The shardCount. + */ + @java.lang.Override + public int getShardCount() { + return shardCount_; + } + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The shardCount to set. + * @return This builder for chaining. + */ + public Builder setShardCount(int value) { + + shardCount_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearShardCount() { + bitField0_ = (bitField0_ & ~0x00000100); + shardCount_ = 0; + onChanged(); + return this; + } + + private java.util.List pscConfigs_ = + java.util.Collections.emptyList(); + + private void ensurePscConfigsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + pscConfigs_ = + new java.util.ArrayList(pscConfigs_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConfig, + com.google.cloud.redis.cluster.v1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder> + pscConfigsBuilder_; + + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getPscConfigsList() { + if (pscConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pscConfigs_); + } else { + return pscConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getPscConfigsCount() { + if (pscConfigsBuilder_ == null) { + return pscConfigs_.size(); + } else { + return pscConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConfig getPscConfigs(int index) { + if (pscConfigsBuilder_ == null) { + return pscConfigs_.get(index); + } else { + return pscConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPscConfigs(int index, com.google.cloud.redis.cluster.v1.PscConfig value) { + if (pscConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConfigsIsMutable(); + pscConfigs_.set(index, value); + onChanged(); + } else { + pscConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPscConfigs( + int index, com.google.cloud.redis.cluster.v1.PscConfig.Builder builderForValue) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + pscConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs(com.google.cloud.redis.cluster.v1.PscConfig value) { + if (pscConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConfigsIsMutable(); + pscConfigs_.add(value); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs(int index, com.google.cloud.redis.cluster.v1.PscConfig value) { + if (pscConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConfigsIsMutable(); + pscConfigs_.add(index, value); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs( + com.google.cloud.redis.cluster.v1.PscConfig.Builder builderForValue) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.add(builderForValue.build()); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs( + int index, com.google.cloud.redis.cluster.v1.PscConfig.Builder builderForValue) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllPscConfigs( + java.lang.Iterable values) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pscConfigs_); + onChanged(); + } else { + pscConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPscConfigs() { + if (pscConfigsBuilder_ == null) { + pscConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + pscConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removePscConfigs(int index) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.remove(index); + onChanged(); + } else { + pscConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConfig.Builder getPscConfigsBuilder(int index) { + return getPscConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConfigOrBuilder getPscConfigsOrBuilder(int index) { + if (pscConfigsBuilder_ == null) { + return pscConfigs_.get(index); + } else { + return pscConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getPscConfigsOrBuilderList() { + if (pscConfigsBuilder_ != null) { + return pscConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pscConfigs_); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConfig.Builder addPscConfigsBuilder() { + return getPscConfigsFieldBuilder() + .addBuilder(com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConfig.Builder addPscConfigsBuilder(int index) { + return getPscConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getPscConfigsBuilderList() { + return getPscConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConfig, + com.google.cloud.redis.cluster.v1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder> + getPscConfigsFieldBuilder() { + if (pscConfigsBuilder_ == null) { + pscConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConfig, + com.google.cloud.redis.cluster.v1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder>( + pscConfigs_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + pscConfigs_ = null; + } + return pscConfigsBuilder_; + } + + private java.util.List + discoveryEndpoints_ = java.util.Collections.emptyList(); + + private void ensureDiscoveryEndpointsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + discoveryEndpoints_ = + new java.util.ArrayList( + discoveryEndpoints_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint, + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder, + com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder> + discoveryEndpointsBuilder_; + + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDiscoveryEndpointsList() { + if (discoveryEndpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(discoveryEndpoints_); + } else { + return discoveryEndpointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDiscoveryEndpointsCount() { + if (discoveryEndpointsBuilder_ == null) { + return discoveryEndpoints_.size(); + } else { + return discoveryEndpointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint getDiscoveryEndpoints(int index) { + if (discoveryEndpointsBuilder_ == null) { + return discoveryEndpoints_.get(index); + } else { + return discoveryEndpointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryEndpoints( + int index, com.google.cloud.redis.cluster.v1.DiscoveryEndpoint value) { + if (discoveryEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.set(index, value); + onChanged(); + } else { + discoveryEndpointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryEndpoints( + int index, com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder builderForValue) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + discoveryEndpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint value) { + if (discoveryEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(value); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + int index, com.google.cloud.redis.cluster.v1.DiscoveryEndpoint value) { + if (discoveryEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(index, value); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder builderForValue) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(builderForValue.build()); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + int index, com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder builderForValue) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDiscoveryEndpoints( + java.lang.Iterable values) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, discoveryEndpoints_); + onChanged(); + } else { + discoveryEndpointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDiscoveryEndpoints() { + if (discoveryEndpointsBuilder_ == null) { + discoveryEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + discoveryEndpointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDiscoveryEndpoints(int index) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.remove(index); + onChanged(); + } else { + discoveryEndpointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder getDiscoveryEndpointsBuilder( + int index) { + return getDiscoveryEndpointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder + getDiscoveryEndpointsOrBuilder(int index) { + if (discoveryEndpointsBuilder_ == null) { + return discoveryEndpoints_.get(index); + } else { + return discoveryEndpointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDiscoveryEndpointsOrBuilderList() { + if (discoveryEndpointsBuilder_ != null) { + return discoveryEndpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(discoveryEndpoints_); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder + addDiscoveryEndpointsBuilder() { + return getDiscoveryEndpointsFieldBuilder() + .addBuilder(com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder addDiscoveryEndpointsBuilder( + int index) { + return getDiscoveryEndpointsFieldBuilder() + .addBuilder( + index, com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDiscoveryEndpointsBuilderList() { + return getDiscoveryEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint, + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder, + com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder> + getDiscoveryEndpointsFieldBuilder() { + if (discoveryEndpointsBuilder_ == null) { + discoveryEndpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint, + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder, + com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder>( + discoveryEndpoints_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + discoveryEndpoints_ = null; + } + return discoveryEndpointsBuilder_; + } + + private java.util.List pscConnections_ = + java.util.Collections.emptyList(); + + private void ensurePscConnectionsIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + pscConnections_ = + new java.util.ArrayList( + pscConnections_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConnection, + com.google.cloud.redis.cluster.v1.PscConnection.Builder, + com.google.cloud.redis.cluster.v1.PscConnectionOrBuilder> + pscConnectionsBuilder_; + + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPscConnectionsList() { + if (pscConnectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pscConnections_); + } else { + return pscConnectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPscConnectionsCount() { + if (pscConnectionsBuilder_ == null) { + return pscConnections_.size(); + } else { + return pscConnectionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConnection getPscConnections(int index) { + if (pscConnectionsBuilder_ == null) { + return pscConnections_.get(index); + } else { + return pscConnectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConnections( + int index, com.google.cloud.redis.cluster.v1.PscConnection value) { + if (pscConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConnectionsIsMutable(); + pscConnections_.set(index, value); + onChanged(); + } else { + pscConnectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConnections( + int index, com.google.cloud.redis.cluster.v1.PscConnection.Builder builderForValue) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.set(index, builderForValue.build()); + onChanged(); + } else { + pscConnectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections(com.google.cloud.redis.cluster.v1.PscConnection value) { + if (pscConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConnectionsIsMutable(); + pscConnections_.add(value); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections( + int index, com.google.cloud.redis.cluster.v1.PscConnection value) { + if (pscConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConnectionsIsMutable(); + pscConnections_.add(index, value); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections( + com.google.cloud.redis.cluster.v1.PscConnection.Builder builderForValue) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.add(builderForValue.build()); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections( + int index, com.google.cloud.redis.cluster.v1.PscConnection.Builder builderForValue) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.add(index, builderForValue.build()); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPscConnections( + java.lang.Iterable values) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pscConnections_); + onChanged(); + } else { + pscConnectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPscConnections() { + if (pscConnectionsBuilder_ == null) { + pscConnections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + pscConnectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePscConnections(int index) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.remove(index); + onChanged(); + } else { + pscConnectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConnection.Builder getPscConnectionsBuilder( + int index) { + return getPscConnectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConnectionOrBuilder getPscConnectionsOrBuilder( + int index) { + if (pscConnectionsBuilder_ == null) { + return pscConnections_.get(index); + } else { + return pscConnectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPscConnectionsOrBuilderList() { + if (pscConnectionsBuilder_ != null) { + return pscConnectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pscConnections_); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConnection.Builder addPscConnectionsBuilder() { + return getPscConnectionsFieldBuilder() + .addBuilder(com.google.cloud.redis.cluster.v1.PscConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConnection.Builder addPscConnectionsBuilder( + int index) { + return getPscConnectionsFieldBuilder() + .addBuilder(index, com.google.cloud.redis.cluster.v1.PscConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPscConnectionsBuilderList() { + return getPscConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConnection, + com.google.cloud.redis.cluster.v1.PscConnection.Builder, + com.google.cloud.redis.cluster.v1.PscConnectionOrBuilder> + getPscConnectionsFieldBuilder() { + if (pscConnectionsBuilder_ == null) { + pscConnectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConnection, + com.google.cloud.redis.cluster.v1.PscConnection.Builder, + com.google.cloud.redis.cluster.v1.PscConnectionOrBuilder>( + pscConnections_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + pscConnections_ = null; + } + return pscConnectionsBuilder_; + } + + private com.google.cloud.redis.cluster.v1.Cluster.StateInfo stateInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster.StateInfo, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.Builder, + com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder> + stateInfoBuilder_; + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateInfo field is set. + */ + public boolean hasStateInfo() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateInfo. + */ + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo getStateInfo() { + if (stateInfoBuilder_ == null) { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } else { + return stateInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateInfo(com.google.cloud.redis.cluster.v1.Cluster.StateInfo value) { + if (stateInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateInfo_ = value; + } else { + stateInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateInfo( + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.Builder builderForValue) { + if (stateInfoBuilder_ == null) { + stateInfo_ = builderForValue.build(); + } else { + stateInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStateInfo(com.google.cloud.redis.cluster.v1.Cluster.StateInfo value) { + if (stateInfoBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && stateInfo_ != null + && stateInfo_ + != com.google.cloud.redis.cluster.v1.Cluster.StateInfo.getDefaultInstance()) { + getStateInfoBuilder().mergeFrom(value); + } else { + stateInfo_ = value; + } + } else { + stateInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStateInfo() { + bitField0_ = (bitField0_ & ~0x00001000); + stateInfo_ = null; + if (stateInfoBuilder_ != null) { + stateInfoBuilder_.dispose(); + stateInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.Cluster.StateInfo.Builder getStateInfoBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getStateInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder getStateInfoOrBuilder() { + if (stateInfoBuilder_ != null) { + return stateInfoBuilder_.getMessageOrBuilder(); + } else { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster.StateInfo, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.Builder, + com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder> + getStateInfoFieldBuilder() { + if (stateInfoBuilder_ == null) { + stateInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster.StateInfo, + com.google.cloud.redis.cluster.v1.Cluster.StateInfo.Builder, + com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder>( + getStateInfo(), getParentForChildren(), isClean()); + stateInfo_ = null; + } + return stateInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.Cluster) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.Cluster) + private static final com.google.cloud.redis.cluster.v1.Cluster DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.Cluster(); + } + + public static com.google.cloud.redis.cluster.v1.Cluster getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cluster parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterName.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterName.java new file mode 100644 index 000000000000..19799e96db8e --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ClusterName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + + @Deprecated + protected ClusterName() { + project = null; + location = null; + cluster = null; + } + + private ClusterName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ClusterName of(String project, String location, String cluster) { + return newBuilder().setProject(project).setLocation(location).setCluster(cluster).build(); + } + + public static String format(String project, String location, String cluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .build() + .toString(); + } + + public static ClusterName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER.validatedMatch( + formattedString, "ClusterName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("cluster")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ClusterName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER.instantiate( + "project", project, "location", location, "cluster", cluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ClusterName that = ((ClusterName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + return h; + } + + /** Builder for projects/{project}/locations/{location}/clusters/{cluster}. */ + public static class Builder { + private String project; + private String location; + private String cluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + private Builder(ClusterName clusterName) { + this.project = clusterName.project; + this.location = clusterName.location; + this.cluster = clusterName.cluster; + } + + public ClusterName build() { + return new ClusterName(this); + } + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterOrBuilder.java new file mode 100644 index 000000000000..e4eaaf2820bc --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ClusterOrBuilder.java @@ -0,0 +1,533 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface ClusterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.Cluster) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.redis.cluster.v1.Cluster.State getState(); + + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + boolean hasReplicaCount(); + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + int getReplicaCount(); + + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authorizationMode. + */ + int getAuthorizationModeValue(); + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authorizationMode. + */ + com.google.cloud.redis.cluster.v1.AuthorizationMode getAuthorizationMode(); + + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for transitEncryptionMode. + */ + int getTransitEncryptionModeValue(); + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transitEncryptionMode. + */ + com.google.cloud.redis.cluster.v1.TransitEncryptionMode getTransitEncryptionMode(); + + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the sizeGb field is set. + */ + boolean hasSizeGb(); + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeGb. + */ + int getSizeGb(); + + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the shardCount field is set. + */ + boolean hasShardCount(); + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The shardCount. + */ + int getShardCount(); + + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getPscConfigsList(); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1.PscConfig getPscConfigs(int index); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getPscConfigsCount(); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getPscConfigsOrBuilderList(); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder getPscConfigsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getDiscoveryEndpointsList(); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint getDiscoveryEndpoints(int index); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDiscoveryEndpointsCount(); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDiscoveryEndpointsOrBuilderList(); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder getDiscoveryEndpointsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPscConnectionsList(); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1.PscConnection getPscConnections(int index); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPscConnectionsCount(); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getPscConnectionsOrBuilderList(); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1.PscConnectionOrBuilder getPscConnectionsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateInfo field is set. + */ + boolean hasStateInfo(); + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateInfo. + */ + com.google.cloud.redis.cluster.v1.Cluster.StateInfo getStateInfo(); + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1.Cluster.StateInfoOrBuilder getStateInfoOrBuilder(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CreateClusterRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CreateClusterRequest.java new file mode 100644 index 000000000000..d4741581c69c --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CreateClusterRequest.java @@ -0,0 +1,1354 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Request for [CreateCluster][CloudRedis.CreateCluster].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.CreateClusterRequest} + */ +public final class CreateClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.CreateClusterRequest) + CreateClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateClusterRequest.newBuilder() to construct. + private CreateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateClusterRequest() { + parent_ = ""; + clusterId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CreateClusterRequest.class, + com.google.cloud.redis.cluster.v1.CreateClusterRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterId_ = ""; + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + @java.lang.Override + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_FIELD_NUMBER = 3; + private com.google.cloud.redis.cluster.v1.Cluster cluster_; + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + @java.lang.Override + public boolean hasCluster() { + return cluster_ != null; + } + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster getCluster() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClusterOrBuilder() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_); + } + if (cluster_ != null) { + output.writeMessage(3, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_); + } + if (cluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.CreateClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.CreateClusterRequest other = + (com.google.cloud.redis.cluster.v1.CreateClusterRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getClusterId().equals(other.getClusterId())) return false; + if (hasCluster() != other.hasCluster()) return false; + if (hasCluster()) { + if (!getCluster().equals(other.getCluster())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getClusterId().hashCode(); + if (hasCluster()) { + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1.CreateClusterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for [CreateCluster][CloudRedis.CreateCluster].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.CreateClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.CreateClusterRequest) + com.google.cloud.redis.cluster.v1.CreateClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.CreateClusterRequest.class, + com.google.cloud.redis.cluster.v1.CreateClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.CreateClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + clusterId_ = ""; + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CreateClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.CreateClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CreateClusterRequest build() { + com.google.cloud.redis.cluster.v1.CreateClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CreateClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1.CreateClusterRequest result = + new com.google.cloud.redis.cluster.v1.CreateClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.CreateClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clusterId_ = clusterId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cluster_ = clusterBuilder_ == null ? cluster_ : clusterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.CreateClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1.CreateClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.CreateClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1.CreateClusterRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClusterId().isEmpty()) { + clusterId_ = other.clusterId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCluster()) { + mergeCluster(other.getCluster()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + clusterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object clusterId_ = ""; + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClusterId() { + clusterId_ = getDefaultInstance().getClusterId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1.Cluster cluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder> + clusterBuilder_; + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + public boolean hasCluster() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + public com.google.cloud.redis.cluster.v1.Cluster getCluster() { + if (clusterBuilder_ == null) { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } else { + return clusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.redis.cluster.v1.Cluster value) { + if (clusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + } else { + clusterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.redis.cluster.v1.Cluster.Builder builderForValue) { + if (clusterBuilder_ == null) { + cluster_ = builderForValue.build(); + } else { + clusterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCluster(com.google.cloud.redis.cluster.v1.Cluster value) { + if (clusterBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cluster_ != null + && cluster_ != com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance()) { + getClusterBuilder().mergeFrom(value); + } else { + cluster_ = value; + } + } else { + clusterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCluster() { + bitField0_ = (bitField0_ & ~0x00000004); + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.Cluster.Builder getClusterBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClusterOrBuilder() { + if (clusterBuilder_ != null) { + return clusterBuilder_.getMessageOrBuilder(); + } else { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder> + getClusterFieldBuilder() { + if (clusterBuilder_ == null) { + clusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder>( + getCluster(), getParentForChildren(), isClean()); + cluster_ = null; + } + return clusterBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.CreateClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.CreateClusterRequest) + private static final com.google.cloud.redis.cluster.v1.CreateClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.CreateClusterRequest(); + } + + public static com.google.cloud.redis.cluster.v1.CreateClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.CreateClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CreateClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CreateClusterRequestOrBuilder.java new file mode 100644 index 000000000000..d7ac643d925a --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/CreateClusterRequestOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface CreateClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.CreateClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + java.lang.String getClusterId(); + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + com.google.protobuf.ByteString getClusterIdBytes(); + + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + boolean hasCluster(); + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + com.google.cloud.redis.cluster.v1.Cluster getCluster(); + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClusterOrBuilder(); + + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DeleteClusterRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DeleteClusterRequest.java new file mode 100644 index 000000000000..2bcd64715d2f --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DeleteClusterRequest.java @@ -0,0 +1,835 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Request for [DeleteCluster][CloudRedis.DeleteCluster].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.DeleteClusterRequest} + */ +public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.DeleteClusterRequest) + DeleteClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteClusterRequest.newBuilder() to construct. + private DeleteClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteClusterRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.DeleteClusterRequest.class, + com.google.cloud.redis.cluster.v1.DeleteClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.DeleteClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.DeleteClusterRequest other = + (com.google.cloud.redis.cluster.v1.DeleteClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1.DeleteClusterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for [DeleteCluster][CloudRedis.DeleteCluster].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.DeleteClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.DeleteClusterRequest) + com.google.cloud.redis.cluster.v1.DeleteClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.DeleteClusterRequest.class, + com.google.cloud.redis.cluster.v1.DeleteClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.DeleteClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DeleteClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.DeleteClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DeleteClusterRequest build() { + com.google.cloud.redis.cluster.v1.DeleteClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DeleteClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1.DeleteClusterRequest result = + new com.google.cloud.redis.cluster.v1.DeleteClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.DeleteClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.DeleteClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1.DeleteClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.DeleteClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1.DeleteClusterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.DeleteClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.DeleteClusterRequest) + private static final com.google.cloud.redis.cluster.v1.DeleteClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.DeleteClusterRequest(); + } + + public static com.google.cloud.redis.cluster.v1.DeleteClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DeleteClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DeleteClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DeleteClusterRequestOrBuilder.java new file mode 100644 index 000000000000..e56a88d223a0 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DeleteClusterRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface DeleteClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.DeleteClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DiscoveryEndpoint.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DiscoveryEndpoint.java new file mode 100644 index 000000000000..f2823fd3e7f6 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DiscoveryEndpoint.java @@ -0,0 +1,1025 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Endpoints on each network, for Redis clients to connect to the cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.DiscoveryEndpoint} + */ +public final class DiscoveryEndpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.DiscoveryEndpoint) + DiscoveryEndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiscoveryEndpoint.newBuilder() to construct. + private DiscoveryEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiscoveryEndpoint() { + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiscoveryEndpoint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.class, + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_ = 0; + /** + * + * + *
+   * Output only. The port number of the exposed Redis endpoint.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int PSC_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.redis.cluster.v1.PscConfig pscConfig_; + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pscConfig field is set. + */ + @java.lang.Override + public boolean hasPscConfig() { + return pscConfig_ != null; + } + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pscConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfig getPscConfig() { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance() + : pscConfig_; + } + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfigOrBuilder getPscConfigOrBuilder() { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance() + : pscConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (pscConfig_ != null) { + output.writeMessage(3, getPscConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + } + if (pscConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPscConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.DiscoveryEndpoint)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint other = + (com.google.cloud.redis.cluster.v1.DiscoveryEndpoint) obj; + + if (!getAddress().equals(other.getAddress())) return false; + if (getPort() != other.getPort()) return false; + if (hasPscConfig() != other.hasPscConfig()) return false; + if (hasPscConfig()) { + if (!getPscConfig().equals(other.getPscConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + if (hasPscConfig()) { + hash = (37 * hash) + PSC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPscConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1.DiscoveryEndpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Endpoints on each network, for Redis clients to connect to the cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.DiscoveryEndpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.DiscoveryEndpoint) + com.google.cloud.redis.cluster.v1.DiscoveryEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.class, + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + address_ = ""; + port_ = 0; + pscConfig_ = null; + if (pscConfigBuilder_ != null) { + pscConfigBuilder_.dispose(); + pscConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_DiscoveryEndpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint build() { + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint buildPartial() { + com.google.cloud.redis.cluster.v1.DiscoveryEndpoint result = + new com.google.cloud.redis.cluster.v1.DiscoveryEndpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.DiscoveryEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.port_ = port_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pscConfig_ = pscConfigBuilder_ == null ? pscConfig_ : pscConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.DiscoveryEndpoint) { + return mergeFrom((com.google.cloud.redis.cluster.v1.DiscoveryEndpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.DiscoveryEndpoint other) { + if (other == com.google.cloud.redis.cluster.v1.DiscoveryEndpoint.getDefaultInstance()) + return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.hasPscConfig()) { + mergePscConfig(other.getPscConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getPscConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object address_ = ""; + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + address_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + address_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int port_; + /** + * + * + *
+     * Output only. The port number of the exposed Redis endpoint.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * + * + *
+     * Output only. The port number of the exposed Redis endpoint.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The port number of the exposed Redis endpoint.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1.PscConfig pscConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConfig, + com.google.cloud.redis.cluster.v1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder> + pscConfigBuilder_; + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pscConfig field is set. + */ + public boolean hasPscConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pscConfig. + */ + public com.google.cloud.redis.cluster.v1.PscConfig getPscConfig() { + if (pscConfigBuilder_ == null) { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance() + : pscConfig_; + } else { + return pscConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConfig(com.google.cloud.redis.cluster.v1.PscConfig value) { + if (pscConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pscConfig_ = value; + } else { + pscConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConfig( + com.google.cloud.redis.cluster.v1.PscConfig.Builder builderForValue) { + if (pscConfigBuilder_ == null) { + pscConfig_ = builderForValue.build(); + } else { + pscConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePscConfig(com.google.cloud.redis.cluster.v1.PscConfig value) { + if (pscConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && pscConfig_ != null + && pscConfig_ != com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance()) { + getPscConfigBuilder().mergeFrom(value); + } else { + pscConfig_ = value; + } + } else { + pscConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPscConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + pscConfig_ = null; + if (pscConfigBuilder_ != null) { + pscConfigBuilder_.dispose(); + pscConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConfig.Builder getPscConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPscConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1.PscConfigOrBuilder getPscConfigOrBuilder() { + if (pscConfigBuilder_ != null) { + return pscConfigBuilder_.getMessageOrBuilder(); + } else { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance() + : pscConfig_; + } + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConfig, + com.google.cloud.redis.cluster.v1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder> + getPscConfigFieldBuilder() { + if (pscConfigBuilder_ == null) { + pscConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.PscConfig, + com.google.cloud.redis.cluster.v1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder>( + getPscConfig(), getParentForChildren(), isClean()); + pscConfig_ = null; + } + return pscConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.DiscoveryEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.DiscoveryEndpoint) + private static final com.google.cloud.redis.cluster.v1.DiscoveryEndpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.DiscoveryEndpoint(); + } + + public static com.google.cloud.redis.cluster.v1.DiscoveryEndpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveryEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.DiscoveryEndpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DiscoveryEndpointOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DiscoveryEndpointOrBuilder.java new file mode 100644 index 000000000000..a5ca6207aeaf --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/DiscoveryEndpointOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface DiscoveryEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.DiscoveryEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+   * Output only. The port number of the exposed Redis endpoint.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The port. + */ + int getPort(); + + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pscConfig field is set. + */ + boolean hasPscConfig(); + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pscConfig. + */ + com.google.cloud.redis.cluster.v1.PscConfig getPscConfig(); + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder getPscConfigOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetUserLinkRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterRequest.java similarity index 70% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetUserLinkRequest.java rename to java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterRequest.java index 280438bd0387..9a4c7424bed2 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GetUserLinkRequest.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterRequest.java @@ -14,52 +14,52 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto -package com.google.analytics.admin.v1alpha; +package com.google.cloud.redis.cluster.v1; /** * * *
- * Request message for GetUserLink RPC.
+ * Request for [GetCluster][CloudRedis.GetCluster].
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.GetUserLinkRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1.GetClusterRequest} */ -public final class GetUserLinkRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetClusterRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.GetUserLinkRequest) - GetUserLinkRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.GetClusterRequest) + GetClusterRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use GetUserLinkRequest.newBuilder() to construct. - private GetUserLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetClusterRequest.newBuilder() to construct. + private GetClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetUserLinkRequest() { + private GetClusterRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetUserLinkRequest(); + return new GetClusterRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_descriptor; + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.GetUserLinkRequest.class, - com.google.analytics.admin.v1alpha.GetUserLinkRequest.Builder.class); + com.google.cloud.redis.cluster.v1.GetClusterRequest.class, + com.google.cloud.redis.cluster.v1.GetClusterRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -70,7 +70,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -95,7 +97,9 @@ public java.lang.String getName() { * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -156,11 +160,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.GetUserLinkRequest)) { + if (!(obj instanceof com.google.cloud.redis.cluster.v1.GetClusterRequest)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.GetUserLinkRequest other = - (com.google.analytics.admin.v1alpha.GetUserLinkRequest) obj; + com.google.cloud.redis.cluster.v1.GetClusterRequest other = + (com.google.cloud.redis.cluster.v1.GetClusterRequest) obj; if (!getName().equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -181,71 +185,71 @@ public int hashCode() { return hash; } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom(byte[] data) + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.GetClusterRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -262,8 +266,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.analytics.admin.v1alpha.GetUserLinkRequest prototype) { + public static Builder newBuilder(com.google.cloud.redis.cluster.v1.GetClusterRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -281,31 +284,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for GetUserLink RPC.
+   * Request for [GetCluster][CloudRedis.GetCluster].
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.GetUserLinkRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1.GetClusterRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.GetUserLinkRequest) - com.google.analytics.admin.v1alpha.GetUserLinkRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.GetClusterRequest) + com.google.cloud.redis.cluster.v1.GetClusterRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_descriptor; + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.GetUserLinkRequest.class, - com.google.analytics.admin.v1alpha.GetUserLinkRequest.Builder.class); + com.google.cloud.redis.cluster.v1.GetClusterRequest.class, + com.google.cloud.redis.cluster.v1.GetClusterRequest.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.GetUserLinkRequest.newBuilder() + // Construct using com.google.cloud.redis.cluster.v1.GetClusterRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -322,18 +325,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_GetUserLinkRequest_descriptor; + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_GetClusterRequest_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.GetUserLinkRequest getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.GetUserLinkRequest.getDefaultInstance(); + public com.google.cloud.redis.cluster.v1.GetClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.GetClusterRequest.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.GetUserLinkRequest build() { - com.google.analytics.admin.v1alpha.GetUserLinkRequest result = buildPartial(); + public com.google.cloud.redis.cluster.v1.GetClusterRequest build() { + com.google.cloud.redis.cluster.v1.GetClusterRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -341,9 +344,9 @@ public com.google.analytics.admin.v1alpha.GetUserLinkRequest build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.GetUserLinkRequest buildPartial() { - com.google.analytics.admin.v1alpha.GetUserLinkRequest result = - new com.google.analytics.admin.v1alpha.GetUserLinkRequest(this); + public com.google.cloud.redis.cluster.v1.GetClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1.GetClusterRequest result = + new com.google.cloud.redis.cluster.v1.GetClusterRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -351,7 +354,7 @@ public com.google.analytics.admin.v1alpha.GetUserLinkRequest buildPartial() { return result; } - private void buildPartial0(com.google.analytics.admin.v1alpha.GetUserLinkRequest result) { + private void buildPartial0(com.google.cloud.redis.cluster.v1.GetClusterRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; @@ -393,16 +396,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.GetUserLinkRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.GetUserLinkRequest) other); + if (other instanceof com.google.cloud.redis.cluster.v1.GetClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1.GetClusterRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.GetUserLinkRequest other) { - if (other == com.google.analytics.admin.v1alpha.GetUserLinkRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.GetClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1.GetClusterRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -465,7 +468,9 @@ public Builder mergeFrom( * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -489,7 +494,9 @@ public java.lang.String getName() { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -513,7 +520,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -536,7 +545,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -555,7 +566,9 @@ public Builder clearName() { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -587,24 +600,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.GetUserLinkRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.GetClusterRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.GetUserLinkRequest) - private static final com.google.analytics.admin.v1alpha.GetUserLinkRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.GetClusterRequest) + private static final com.google.cloud.redis.cluster.v1.GetClusterRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.GetUserLinkRequest(); + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.GetClusterRequest(); } - public static com.google.analytics.admin.v1alpha.GetUserLinkRequest getDefaultInstance() { + public static com.google.cloud.redis.cluster.v1.GetClusterRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetUserLinkRequest parsePartialFrom( + public GetClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -623,17 +636,17 @@ public GetUserLinkRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.GetUserLinkRequest getDefaultInstanceForType() { + public com.google.cloud.redis.cluster.v1.GetClusterRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterRequestOrBuilder.java new file mode 100644 index 000000000000..0d8227c84142 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/GetClusterRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface GetClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.GetClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersRequest.java similarity index 70% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksRequest.java rename to java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersRequest.java index bb1dfbf39dbd..a07fe6311607 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksRequest.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersRequest.java @@ -14,30 +14,30 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto -package com.google.analytics.admin.v1alpha; +package com.google.cloud.redis.cluster.v1; /** * * *
- * Request message for ListUserLinks RPC.
+ * Request for [ListClusters][CloudRedis.ListClusters].
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.ListUserLinksRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1.ListClustersRequest} */ -public final class ListUserLinksRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ListClustersRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListUserLinksRequest) - ListUserLinksRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.ListClustersRequest) + ListClustersRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ListUserLinksRequest.newBuilder() to construct. - private ListUserLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListClustersRequest.newBuilder() to construct. + private ListClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListUserLinksRequest() { + private ListClustersRequest() { parent_ = ""; pageToken_ = ""; } @@ -45,22 +45,22 @@ private ListUserLinksRequest() { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListUserLinksRequest(); + return new ListClustersRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_descriptor; + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.ListUserLinksRequest.class, - com.google.analytics.admin.v1alpha.ListUserLinksRequest.Builder.class); + com.google.cloud.redis.cluster.v1.ListClustersRequest.class, + com.google.cloud.redis.cluster.v1.ListClustersRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; @@ -71,7 +71,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -96,7 +98,9 @@ public java.lang.String getParent() { * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -124,10 +128,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The maximum number of user links to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 200 user links will be returned.
-   * The maximum value is 500; values above 500 will be coerced to 500.
+   * The maximum number of items to return.
+   *
+   * If not specified, a default value of 1000 will be used by the service.
+   * Regardless of the page_size value, the response may include a partial list
+   * and a caller should only rely on response's
+   * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token]
+   * to determine if there are more clusters left to be queried.
    * 
* * int32 page_size = 2; @@ -147,10 +154,8 @@ public int getPageSize() { * * *
-   * A page token, received from a previous `ListUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; @@ -173,10 +178,8 @@ public java.lang.String getPageToken() { * * *
-   * A page token, received from a previous `ListUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; @@ -247,11 +250,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.ListUserLinksRequest)) { + if (!(obj instanceof com.google.cloud.redis.cluster.v1.ListClustersRequest)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.ListUserLinksRequest other = - (com.google.analytics.admin.v1alpha.ListUserLinksRequest) obj; + com.google.cloud.redis.cluster.v1.ListClustersRequest other = + (com.google.cloud.redis.cluster.v1.ListClustersRequest) obj; if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; @@ -278,71 +281,71 @@ public int hashCode() { return hash; } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom(byte[] data) + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1.ListClustersRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -360,7 +363,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.analytics.admin.v1alpha.ListUserLinksRequest prototype) { + com.google.cloud.redis.cluster.v1.ListClustersRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -378,31 +381,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for ListUserLinks RPC.
+   * Request for [ListClusters][CloudRedis.ListClusters].
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.ListUserLinksRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1.ListClustersRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListUserLinksRequest) - com.google.analytics.admin.v1alpha.ListUserLinksRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.ListClustersRequest) + com.google.cloud.redis.cluster.v1.ListClustersRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_descriptor; + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.ListUserLinksRequest.class, - com.google.analytics.admin.v1alpha.ListUserLinksRequest.Builder.class); + com.google.cloud.redis.cluster.v1.ListClustersRequest.class, + com.google.cloud.redis.cluster.v1.ListClustersRequest.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.ListUserLinksRequest.newBuilder() + // Construct using com.google.cloud.redis.cluster.v1.ListClustersRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -421,18 +424,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_ListUserLinksRequest_descriptor; + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersRequest_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksRequest getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.ListUserLinksRequest.getDefaultInstance(); + public com.google.cloud.redis.cluster.v1.ListClustersRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.ListClustersRequest.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksRequest build() { - com.google.analytics.admin.v1alpha.ListUserLinksRequest result = buildPartial(); + public com.google.cloud.redis.cluster.v1.ListClustersRequest build() { + com.google.cloud.redis.cluster.v1.ListClustersRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -440,9 +443,9 @@ public com.google.analytics.admin.v1alpha.ListUserLinksRequest build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksRequest buildPartial() { - com.google.analytics.admin.v1alpha.ListUserLinksRequest result = - new com.google.analytics.admin.v1alpha.ListUserLinksRequest(this); + public com.google.cloud.redis.cluster.v1.ListClustersRequest buildPartial() { + com.google.cloud.redis.cluster.v1.ListClustersRequest result = + new com.google.cloud.redis.cluster.v1.ListClustersRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -450,7 +453,7 @@ public com.google.analytics.admin.v1alpha.ListUserLinksRequest buildPartial() { return result; } - private void buildPartial0(com.google.analytics.admin.v1alpha.ListUserLinksRequest result) { + private void buildPartial0(com.google.cloud.redis.cluster.v1.ListClustersRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; @@ -498,16 +501,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.ListUserLinksRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.ListUserLinksRequest) other); + if (other instanceof com.google.cloud.redis.cluster.v1.ListClustersRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1.ListClustersRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.ListUserLinksRequest other) { - if (other == com.google.analytics.admin.v1alpha.ListUserLinksRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.ListClustersRequest other) { + if (other == com.google.cloud.redis.cluster.v1.ListClustersRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; @@ -590,7 +593,9 @@ public Builder mergeFrom( * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -614,7 +619,9 @@ public java.lang.String getParent() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -638,7 +645,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -661,7 +670,9 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -680,7 +691,9 @@ public Builder clearParent() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -706,10 +719,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The maximum number of user links to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 200 user links will be returned.
-     * The maximum value is 500; values above 500 will be coerced to 500.
+     * The maximum number of items to return.
+     *
+     * If not specified, a default value of 1000 will be used by the service.
+     * Regardless of the page_size value, the response may include a partial list
+     * and a caller should only rely on response's
+     * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token]
+     * to determine if there are more clusters left to be queried.
      * 
* * int32 page_size = 2; @@ -724,10 +740,13 @@ public int getPageSize() { * * *
-     * The maximum number of user links to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 200 user links will be returned.
-     * The maximum value is 500; values above 500 will be coerced to 500.
+     * The maximum number of items to return.
+     *
+     * If not specified, a default value of 1000 will be used by the service.
+     * Regardless of the page_size value, the response may include a partial list
+     * and a caller should only rely on response's
+     * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token]
+     * to determine if there are more clusters left to be queried.
      * 
* * int32 page_size = 2; @@ -746,10 +765,13 @@ public Builder setPageSize(int value) { * * *
-     * The maximum number of user links to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 200 user links will be returned.
-     * The maximum value is 500; values above 500 will be coerced to 500.
+     * The maximum number of items to return.
+     *
+     * If not specified, a default value of 1000 will be used by the service.
+     * Regardless of the page_size value, the response may include a partial list
+     * and a caller should only rely on response's
+     * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token]
+     * to determine if there are more clusters left to be queried.
      * 
* * int32 page_size = 2; @@ -768,10 +790,8 @@ public Builder clearPageSize() { * * *
-     * A page token, received from a previous `ListUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -793,10 +813,8 @@ public java.lang.String getPageToken() { * * *
-     * A page token, received from a previous `ListUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -818,10 +836,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * A page token, received from a previous `ListUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -842,10 +858,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * A page token, received from a previous `ListUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -862,10 +876,8 @@ public Builder clearPageToken() { * * *
-     * A page token, received from a previous `ListUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -895,24 +907,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListUserLinksRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.ListClustersRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListUserLinksRequest) - private static final com.google.analytics.admin.v1alpha.ListUserLinksRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.ListClustersRequest) + private static final com.google.cloud.redis.cluster.v1.ListClustersRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.ListUserLinksRequest(); + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.ListClustersRequest(); } - public static com.google.analytics.admin.v1alpha.ListUserLinksRequest getDefaultInstance() { + public static com.google.cloud.redis.cluster.v1.ListClustersRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ListUserLinksRequest parsePartialFrom( + public ListClustersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -931,17 +943,17 @@ public ListUserLinksRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.ListUserLinksRequest getDefaultInstanceForType() { + public com.google.cloud.redis.cluster.v1.ListClustersRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersRequestOrBuilder.java similarity index 57% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksRequestOrBuilder.java rename to java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersRequestOrBuilder.java index fdf4b7470efc..7f9e29d532fd 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListUserLinksRequestOrBuilder.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersRequestOrBuilder.java @@ -14,20 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto -package com.google.analytics.admin.v1alpha; +package com.google.cloud.redis.cluster.v1; -public interface ListUserLinksRequestOrBuilder +public interface ListClustersRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListUserLinksRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.ListClustersRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -41,7 +43,9 @@ public interface ListUserLinksRequestOrBuilder * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -56,10 +60,13 @@ public interface ListUserLinksRequestOrBuilder * * *
-   * The maximum number of user links to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 200 user links will be returned.
-   * The maximum value is 500; values above 500 will be coerced to 500.
+   * The maximum number of items to return.
+   *
+   * If not specified, a default value of 1000 will be used by the service.
+   * Regardless of the page_size value, the response may include a partial list
+   * and a caller should only rely on response's
+   * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token]
+   * to determine if there are more clusters left to be queried.
    * 
* * int32 page_size = 2; @@ -72,10 +79,8 @@ public interface ListUserLinksRequestOrBuilder * * *
-   * A page token, received from a previous `ListUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; @@ -87,10 +92,8 @@ public interface ListUserLinksRequestOrBuilder * * *
-   * A page token, received from a previous `ListUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersResponse.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersResponse.java new file mode 100644 index 000000000000..e5fb8734c443 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersResponse.java @@ -0,0 +1,1632 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Response for [ListClusters][CloudRedis.ListClusters].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ListClustersResponse} + */ +public final class ListClustersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.ListClustersResponse) + ListClustersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListClustersResponse.newBuilder() to construct. + private ListClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListClustersResponse() { + clusters_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListClustersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ListClustersResponse.class, + com.google.cloud.redis.cluster.v1.ListClustersResponse.Builder.class); + } + + public static final int CLUSTERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List clusters_; + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + @java.lang.Override + public java.util.List getClustersList() { + return clusters_; + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + @java.lang.Override + public java.util.List + getClustersOrBuilderList() { + return clusters_; + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + @java.lang.Override + public int getClustersCount() { + return clusters_.size(); + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster getClusters(int index) { + return clusters_.get(index); + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClustersOrBuilder(int index) { + return clusters_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < clusters_.size(); i++) { + output.writeMessage(1, clusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < clusters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.ListClustersResponse)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.ListClustersResponse other = + (com.google.cloud.redis.cluster.v1.ListClustersResponse) obj; + + if (!getClustersList().equals(other.getClustersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getClustersCount() > 0) { + hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; + hash = (53 * hash) + getClustersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1.ListClustersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for [ListClusters][CloudRedis.ListClusters].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.ListClustersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.ListClustersResponse) + com.google.cloud.redis.cluster.v1.ListClustersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.ListClustersResponse.class, + com.google.cloud.redis.cluster.v1.ListClustersResponse.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.ListClustersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (clustersBuilder_ == null) { + clusters_ = java.util.Collections.emptyList(); + } else { + clusters_ = null; + clustersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_ListClustersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ListClustersResponse getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.ListClustersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ListClustersResponse build() { + com.google.cloud.redis.cluster.v1.ListClustersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ListClustersResponse buildPartial() { + com.google.cloud.redis.cluster.v1.ListClustersResponse result = + new com.google.cloud.redis.cluster.v1.ListClustersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.redis.cluster.v1.ListClustersResponse result) { + if (clustersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + clusters_ = java.util.Collections.unmodifiableList(clusters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.clusters_ = clusters_; + } else { + result.clusters_ = clustersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.ListClustersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.ListClustersResponse) { + return mergeFrom((com.google.cloud.redis.cluster.v1.ListClustersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.ListClustersResponse other) { + if (other == com.google.cloud.redis.cluster.v1.ListClustersResponse.getDefaultInstance()) + return this; + if (clustersBuilder_ == null) { + if (!other.clusters_.isEmpty()) { + if (clusters_.isEmpty()) { + clusters_ = other.clusters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClustersIsMutable(); + clusters_.addAll(other.clusters_); + } + onChanged(); + } + } else { + if (!other.clusters_.isEmpty()) { + if (clustersBuilder_.isEmpty()) { + clustersBuilder_.dispose(); + clustersBuilder_ = null; + clusters_ = other.clusters_; + bitField0_ = (bitField0_ & ~0x00000001); + clustersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getClustersFieldBuilder() + : null; + } else { + clustersBuilder_.addAllMessages(other.clusters_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.redis.cluster.v1.Cluster m = + input.readMessage( + com.google.cloud.redis.cluster.v1.Cluster.parser(), extensionRegistry); + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(m); + } else { + clustersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List clusters_ = + java.util.Collections.emptyList(); + + private void ensureClustersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + clusters_ = new java.util.ArrayList(clusters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder> + clustersBuilder_; + + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public java.util.List getClustersList() { + if (clustersBuilder_ == null) { + return java.util.Collections.unmodifiableList(clusters_); + } else { + return clustersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public int getClustersCount() { + if (clustersBuilder_ == null) { + return clusters_.size(); + } else { + return clustersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1.Cluster getClusters(int index) { + if (clustersBuilder_ == null) { + return clusters_.get(index); + } else { + return clustersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder setClusters(int index, com.google.cloud.redis.cluster.v1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.set(index, value); + onChanged(); + } else { + clustersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder setClusters( + int index, com.google.cloud.redis.cluster.v1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.set(index, builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder addClusters(com.google.cloud.redis.cluster.v1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.add(value); + onChanged(); + } else { + clustersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder addClusters(int index, com.google.cloud.redis.cluster.v1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.add(index, value); + onChanged(); + } else { + clustersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder addClusters(com.google.cloud.redis.cluster.v1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder addClusters( + int index, com.google.cloud.redis.cluster.v1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(index, builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder addAllClusters( + java.lang.Iterable values) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clusters_); + onChanged(); + } else { + clustersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder clearClusters() { + if (clustersBuilder_ == null) { + clusters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + clustersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public Builder removeClusters(int index) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.remove(index); + onChanged(); + } else { + clustersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1.Cluster.Builder getClustersBuilder(int index) { + return getClustersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClustersOrBuilder(int index) { + if (clustersBuilder_ == null) { + return clusters_.get(index); + } else { + return clustersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public java.util.List + getClustersOrBuilderList() { + if (clustersBuilder_ != null) { + return clustersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(clusters_); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1.Cluster.Builder addClustersBuilder() { + return getClustersFieldBuilder() + .addBuilder(com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1.Cluster.Builder addClustersBuilder(int index) { + return getClustersFieldBuilder() + .addBuilder(index, com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + public java.util.List + getClustersBuilderList() { + return getClustersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder> + getClustersFieldBuilder() { + if (clustersBuilder_ == null) { + clustersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder>( + clusters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + clusters_ = null; + } + return clustersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.ListClustersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.ListClustersResponse) + private static final com.google.cloud.redis.cluster.v1.ListClustersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.ListClustersResponse(); + } + + public static com.google.cloud.redis.cluster.v1.ListClustersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListClustersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ListClustersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersResponseOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersResponseOrBuilder.java new file mode 100644 index 000000000000..0104e6cf9876 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/ListClustersResponseOrBuilder.java @@ -0,0 +1,205 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface ListClustersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.ListClustersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + java.util.List getClustersList(); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + com.google.cloud.redis.cluster.v1.Cluster getClusters(int index); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + int getClustersCount(); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + java.util.List + getClustersOrBuilderList(); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClustersOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/LocationName.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/LocationName.java new file mode 100644 index 000000000000..91ac95b38b95 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/OperationMetadata.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/OperationMetadata.java new file mode 100644 index 000000000000..5a658afa5405 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/OperationMetadata.java @@ -0,0 +1,1828 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Pre-defined metadata fields.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.OperationMetadata.class, + com.google.cloud.redis.cluster.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.OperationMetadata other = + (com.google.cloud.redis.cluster.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Pre-defined metadata fields.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.OperationMetadata) + com.google.cloud.redis.cluster.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.OperationMetadata.class, + com.google.cloud.redis.cluster.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.OperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.OperationMetadata build() { + com.google.cloud.redis.cluster.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.OperationMetadata buildPartial() { + com.google.cloud.redis.cluster.v1.OperationMetadata result = + new com.google.cloud.redis.cluster.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.redis.cluster.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.OperationMetadata other) { + if (other == com.google.cloud.redis.cluster.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.OperationMetadata) + private static final com.google.cloud.redis.cluster.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.OperationMetadata(); + } + + public static com.google.cloud.redis.cluster.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/OperationMetadataOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..393c4d490d5e --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConfig.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConfig.java new file mode 100644 index 000000000000..21cf5008de53 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConfig.java @@ -0,0 +1,621 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** Protobuf type {@code google.cloud.redis.cluster.v1.PscConfig} */ +public final class PscConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.PscConfig) + PscConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscConfig.newBuilder() to construct. + private PscConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PscConfig() { + network_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.PscConfig.class, + com.google.cloud.redis.cluster.v1.PscConfig.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, network_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, network_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.PscConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.PscConfig other = + (com.google.cloud.redis.cluster.v1.PscConfig) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1.PscConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.redis.cluster.v1.PscConfig} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.PscConfig) + com.google.cloud.redis.cluster.v1.PscConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.PscConfig.class, + com.google.cloud.redis.cluster.v1.PscConfig.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.PscConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfig getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfig build() { + com.google.cloud.redis.cluster.v1.PscConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfig buildPartial() { + com.google.cloud.redis.cluster.v1.PscConfig result = + new com.google.cloud.redis.cluster.v1.PscConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.PscConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.PscConfig) { + return mergeFrom((com.google.cloud.redis.cluster.v1.PscConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.PscConfig other) { + if (other == com.google.cloud.redis.cluster.v1.PscConfig.getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.PscConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.PscConfig) + private static final com.google.cloud.redis.cluster.v1.PscConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.PscConfig(); + } + + public static com.google.cloud.redis.cluster.v1.PscConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConfigOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConfigOrBuilder.java new file mode 100644 index 000000000000..02dc2294cac4 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface PscConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.PscConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConnection.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConnection.java new file mode 100644 index 000000000000..958e61fab4b1 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConnection.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Details of consumer resources in a PSC connection.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.PscConnection} + */ +public final class PscConnection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.PscConnection) + PscConnectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscConnection.newBuilder() to construct. + private PscConnection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PscConnection() { + pscConnectionId_ = ""; + address_ = ""; + forwardingRule_ = ""; + projectId_ = ""; + network_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscConnection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.PscConnection.class, + com.google.cloud.redis.cluster.v1.PscConnection.Builder.class); + } + + public static final int PSC_CONNECTION_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pscConnectionId_ = ""; + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscConnectionId. + */ + @java.lang.Override + public java.lang.String getPscConnectionId() { + java.lang.Object ref = pscConnectionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pscConnectionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscConnectionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPscConnectionIdBytes() { + java.lang.Object ref = pscConnectionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscConnectionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORWARDING_RULE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object forwardingRule_ = ""; + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The forwardingRule. + */ + @java.lang.Override + public java.lang.String getForwardingRule() { + java.lang.Object ref = forwardingRule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + forwardingRule_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for forwardingRule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getForwardingRuleBytes() { + java.lang.Object ref = forwardingRule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + forwardingRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscConnectionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pscConnectionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, forwardingRule_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, network_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscConnectionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pscConnectionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, forwardingRule_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, network_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.PscConnection)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.PscConnection other = + (com.google.cloud.redis.cluster.v1.PscConnection) obj; + + if (!getPscConnectionId().equals(other.getPscConnectionId())) return false; + if (!getAddress().equals(other.getAddress())) return false; + if (!getForwardingRule().equals(other.getForwardingRule())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PSC_CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getPscConnectionId().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + FORWARDING_RULE_FIELD_NUMBER; + hash = (53 * hash) + getForwardingRule().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1.PscConnection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of consumer resources in a PSC connection.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.PscConnection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.PscConnection) + com.google.cloud.redis.cluster.v1.PscConnectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.PscConnection.class, + com.google.cloud.redis.cluster.v1.PscConnection.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.PscConnection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pscConnectionId_ = ""; + address_ = ""; + forwardingRule_ = ""; + projectId_ = ""; + network_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_PscConnection_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConnection getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.PscConnection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConnection build() { + com.google.cloud.redis.cluster.v1.PscConnection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConnection buildPartial() { + com.google.cloud.redis.cluster.v1.PscConnection result = + new com.google.cloud.redis.cluster.v1.PscConnection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.PscConnection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pscConnectionId_ = pscConnectionId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.forwardingRule_ = forwardingRule_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.network_ = network_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.PscConnection) { + return mergeFrom((com.google.cloud.redis.cluster.v1.PscConnection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.PscConnection other) { + if (other == com.google.cloud.redis.cluster.v1.PscConnection.getDefaultInstance()) + return this; + if (!other.getPscConnectionId().isEmpty()) { + pscConnectionId_ = other.pscConnectionId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getForwardingRule().isEmpty()) { + forwardingRule_ = other.forwardingRule_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pscConnectionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + forwardingRule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object pscConnectionId_ = ""; + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscConnectionId. + */ + public java.lang.String getPscConnectionId() { + java.lang.Object ref = pscConnectionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pscConnectionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscConnectionId. + */ + public com.google.protobuf.ByteString getPscConnectionIdBytes() { + java.lang.Object ref = pscConnectionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscConnectionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pscConnectionId to set. + * @return This builder for chaining. + */ + public Builder setPscConnectionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pscConnectionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPscConnectionId() { + pscConnectionId_ = getDefaultInstance().getPscConnectionId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pscConnectionId to set. + * @return This builder for chaining. + */ + public Builder setPscConnectionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pscConnectionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + address_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + address_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object forwardingRule_ = ""; + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The forwardingRule. + */ + public java.lang.String getForwardingRule() { + java.lang.Object ref = forwardingRule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + forwardingRule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for forwardingRule. + */ + public com.google.protobuf.ByteString getForwardingRuleBytes() { + java.lang.Object ref = forwardingRule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + forwardingRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The forwardingRule to set. + * @return This builder for chaining. + */ + public Builder setForwardingRule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + forwardingRule_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearForwardingRule() { + forwardingRule_ = getDefaultInstance().getForwardingRule(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for forwardingRule to set. + * @return This builder for chaining. + */ + public Builder setForwardingRuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + forwardingRule_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.PscConnection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.PscConnection) + private static final com.google.cloud.redis.cluster.v1.PscConnection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.PscConnection(); + } + + public static com.google.cloud.redis.cluster.v1.PscConnection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscConnection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.PscConnection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConnectionOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConnectionOrBuilder.java new file mode 100644 index 000000000000..219d8e08e03f --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/PscConnectionOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface PscConnectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.PscConnection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscConnectionId. + */ + java.lang.String getPscConnectionId(); + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscConnectionId. + */ + com.google.protobuf.ByteString getPscConnectionIdBytes(); + + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The forwardingRule. + */ + java.lang.String getForwardingRule(); + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for forwardingRule. + */ + com.google.protobuf.ByteString getForwardingRuleBytes(); + + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/TransitEncryptionMode.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/TransitEncryptionMode.java new file mode 100644 index 000000000000..d2108cc20a7c --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/TransitEncryptionMode.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Available mode of in-transit encryption.
+ * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1.TransitEncryptionMode} + */ +public enum TransitEncryptionMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * In-transit encryption not set.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + */ + TRANSIT_ENCRYPTION_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * In-transit encryption disabled.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + */ + TRANSIT_ENCRYPTION_MODE_DISABLED(1), + /** + * + * + *
+   * Use server managed encryption for in-transit encryption.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; + */ + TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * In-transit encryption not set.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + */ + public static final int TRANSIT_ENCRYPTION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * In-transit encryption disabled.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + */ + public static final int TRANSIT_ENCRYPTION_MODE_DISABLED_VALUE = 1; + /** + * + * + *
+   * Use server managed encryption for in-transit encryption.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; + */ + public static final int TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransitEncryptionMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransitEncryptionMode forNumber(int value) { + switch (value) { + case 0: + return TRANSIT_ENCRYPTION_MODE_UNSPECIFIED; + case 1: + return TRANSIT_ENCRYPTION_MODE_DISABLED; + case 2: + return TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransitEncryptionMode findValueByNumber(int number) { + return TransitEncryptionMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final TransitEncryptionMode[] VALUES = values(); + + public static TransitEncryptionMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransitEncryptionMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1.TransitEncryptionMode) +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/UpdateClusterRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/UpdateClusterRequest.java new file mode 100644 index 000000000000..4ea4aab603d3 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/UpdateClusterRequest.java @@ -0,0 +1,1257 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +/** + * + * + *
+ * Request for [UpdateCluster][CloudRedis.UpdateCluster].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.UpdateClusterRequest} + */ +public final class UpdateClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1.UpdateClusterRequest) + UpdateClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateClusterRequest.newBuilder() to construct. + private UpdateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateClusterRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.UpdateClusterRequest.class, + com.google.cloud.redis.cluster.v1.UpdateClusterRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int CLUSTER_FIELD_NUMBER = 2; + private com.google.cloud.redis.cluster.v1.Cluster cluster_; + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + @java.lang.Override + public boolean hasCluster() { + return cluster_ != null; + } + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.Cluster getCluster() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClusterOrBuilder() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (cluster_ != null) { + output.writeMessage(2, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (cluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1.UpdateClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1.UpdateClusterRequest other = + (com.google.cloud.redis.cluster.v1.UpdateClusterRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasCluster() != other.hasCluster()) return false; + if (hasCluster()) { + if (!getCluster().equals(other.getCluster())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasCluster()) { + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1.UpdateClusterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for [UpdateCluster][CloudRedis.UpdateCluster].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1.UpdateClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1.UpdateClusterRequest) + com.google.cloud.redis.cluster.v1.UpdateClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1.UpdateClusterRequest.class, + com.google.cloud.redis.cluster.v1.UpdateClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1.UpdateClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1_UpdateClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.UpdateClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1.UpdateClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.UpdateClusterRequest build() { + com.google.cloud.redis.cluster.v1.UpdateClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.UpdateClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1.UpdateClusterRequest result = + new com.google.cloud.redis.cluster.v1.UpdateClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1.UpdateClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cluster_ = clusterBuilder_ == null ? cluster_ : clusterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1.UpdateClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1.UpdateClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1.UpdateClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1.UpdateClusterRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasCluster()) { + mergeCluster(other.getCluster()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.redis.cluster.v1.Cluster cluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder> + clusterBuilder_; + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + public boolean hasCluster() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + public com.google.cloud.redis.cluster.v1.Cluster getCluster() { + if (clusterBuilder_ == null) { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } else { + return clusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.redis.cluster.v1.Cluster value) { + if (clusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + } else { + clusterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.redis.cluster.v1.Cluster.Builder builderForValue) { + if (clusterBuilder_ == null) { + cluster_ = builderForValue.build(); + } else { + clusterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCluster(com.google.cloud.redis.cluster.v1.Cluster value) { + if (clusterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && cluster_ != null + && cluster_ != com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance()) { + getClusterBuilder().mergeFrom(value); + } else { + cluster_ = value; + } + } else { + clusterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCluster() { + bitField0_ = (bitField0_ & ~0x00000002); + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.Cluster.Builder getClusterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClusterOrBuilder() { + if (clusterBuilder_ != null) { + return clusterBuilder_.getMessageOrBuilder(); + } else { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1.Cluster.getDefaultInstance() + : cluster_; + } + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder> + getClusterFieldBuilder() { + if (clusterBuilder_ == null) { + clusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1.Cluster, + com.google.cloud.redis.cluster.v1.Cluster.Builder, + com.google.cloud.redis.cluster.v1.ClusterOrBuilder>( + getCluster(), getParentForChildren(), isClean()); + cluster_ = null; + } + return clusterBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1.UpdateClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1.UpdateClusterRequest) + private static final com.google.cloud.redis.cluster.v1.UpdateClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1.UpdateClusterRequest(); + } + + public static com.google.cloud.redis.cluster.v1.UpdateClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1.UpdateClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/UpdateClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/UpdateClusterRequestOrBuilder.java new file mode 100644 index 000000000000..c038ca63e711 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/java/com/google/cloud/redis/cluster/v1/UpdateClusterRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1; + +public interface UpdateClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1.UpdateClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + boolean hasCluster(); + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + com.google.cloud.redis.cluster.v1.Cluster getCluster(); + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1.ClusterOrBuilder getClusterOrBuilder(); + + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/proto/google/cloud/redis/cluster/v1/cloud_redis_cluster.proto b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/proto/google/cloud/redis/cluster/v1/cloud_redis_cluster.proto new file mode 100644 index 000000000000..1c37082cf807 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1/src/main/proto/google/cloud/redis/cluster/v1/cloud_redis_cluster.proto @@ -0,0 +1,453 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.redis.cluster.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/redis/cluster/apiv1/clusterpb;clusterpb"; +option java_multiple_files = true; +option java_outer_classname = "CloudRedisClusterProto"; +option java_package = "com.google.cloud.redis.cluster.v1"; + +// Configures and manages Cloud Memorystore for Redis clusters +// +// Google Cloud Memorystore for Redis Cluster +// +// The `redis.googleapis.com` service implements the Google Cloud Memorystore +// for Redis API and defines the following resource model for managing Redis +// clusters: +// * The service works with a collection of cloud projects, named: `/projects/*` +// * Each project has a collection of available locations, named: `/locations/*` +// * Each location has a collection of Redis clusters, named: `/clusters/*` +// * As such, Redis clusters are resources of the form: +// `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` +// +// Note that location_id must be a GCP `region`; for example: +// * `projects/redpepper-1290/locations/us-central1/clusters/my-redis` +// +// We use API version selector for Flex APIs +// * The versioning strategy is release-based versioning +// * Our backend CLH only deals with the superset version (called v1main) +// * Existing backend for Redis Gen1 and MRR is not touched. +// * More details in go/redis-flex-api-versioning +service CloudRedisCluster { + option (google.api.default_host) = "redis.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Redis clusters owned by a project in either the specified + // location (region) or all locations. + // + // The location should have the following format: + // + // * `projects/{project_id}/locations/{location_id}` + // + // If `location_id` is specified as `-` (wildcard), then all regions + // available to the project are queried, and the results are aggregated. + rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/clusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific Redis cluster. + rpc GetCluster(GetClusterRequest) returns (Cluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/clusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the metadata and configuration of a specific Redis cluster. + // + // Completed longrunning.Operation will contain the new cluster object + // in the response field. The returned operation is automatically deleted + // after a few hours, so there is no need to call DeleteOperation. + rpc UpdateCluster(UpdateClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{cluster.name=projects/*/locations/*/clusters/*}" + body: "cluster" + }; + option (google.api.method_signature) = "cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.protobuf.Any" + }; + } + + // Deletes a specific Redis cluster. Cluster stops serving and data is + // deleted. + rpc DeleteCluster(DeleteClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/clusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Any" + }; + } + + // Creates a Redis cluster based on the specified properties. + // The creation is executed asynchronously and callers may check the returned + // operation to track its progress. Once the operation is completed the Redis + // cluster will be fully functional. The completed longrunning.Operation will + // contain the new cluster object in the response field. + // + // The returned operation is automatically deleted after a few hours, so there + // is no need to call DeleteOperation. + rpc CreateCluster(CreateClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/clusters" + body: "cluster" + }; + option (google.api.method_signature) = "parent,cluster,cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.protobuf.Any" + }; + } +} + +// Available authorization mode of a Redis cluster. +enum AuthorizationMode { + // Not set. + AUTH_MODE_UNSPECIFIED = 0; + + // IAM basic authorization mode + AUTH_MODE_IAM_AUTH = 1; + + // Authorization disabled mode + AUTH_MODE_DISABLED = 2; +} + +// Available mode of in-transit encryption. +enum TransitEncryptionMode { + // In-transit encryption not set. + TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + + // In-transit encryption disabled. + TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + + // Use server managed encryption for in-transit encryption. + TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; +} + +// Request for [CreateCluster][CloudRedis.CreateCluster]. +message CreateClusterRequest { + // Required. The resource name of the cluster location using the form: + // `projects/{project_id}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The logical name of the Redis cluster in the customer project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project / location + string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The cluster that is to be created. + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; + + // Idempotent request UUID. + string request_id = 4; +} + +// Request for [ListClusters][CloudRedis.ListClusters]. +message ListClustersRequest { + // Required. The resource name of the cluster location using the form: + // `projects/{project_id}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 1000 will be used by the service. + // Regardless of the page_size value, the response may include a partial list + // and a caller should only rely on response's + // [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] + // to determine if there are more clusters left to be queried. + int32 page_size = 2; + + // The `next_page_token` value returned from a previous + // [ListClusters][CloudRedis.ListClusters] request, if any. + string page_token = 3; +} + +// Response for [ListClusters][CloudRedis.ListClusters]. +message ListClustersResponse { + // A list of Redis clusters in the project in the specified location, + // or across all locations. + // + // If the `location_id` in the parent field of the request is "-", all regions + // available to the project are queried, and the results aggregated. + // If in such an aggregated query a location is unavailable, a placeholder + // Redis entry is included in the response with the `name` field set to a + // value of the form + // `projects/{project_id}/locations/{location_id}/clusters/`- and the + // `status` field set to ERROR and `status_message` field set to "location not + // available for ListClusters". + repeated Cluster clusters = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for [UpdateCluster][CloudRedis.UpdateCluster]. +message UpdateClusterRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field may only include these + // fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: + // + // * `size_gb` + // * `replica_count` + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in update_mask are updated. + Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Idempotent request UUID. + string request_id = 3; +} + +// Request for [GetCluster][CloudRedis.GetCluster]. +message GetClusterRequest { + // Required. Redis cluster resource name using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "redis.googleapis.com/Cluster" } + ]; +} + +// Request for [DeleteCluster][CloudRedis.DeleteCluster]. +message DeleteClusterRequest { + // Required. Redis cluster resource name using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "redis.googleapis.com/Cluster" } + ]; + + // Idempotent request UUID. + string request_id = 2; +} + +// A cluster instance. +message Cluster { + option (google.api.resource) = { + type: "redis.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" + }; + + // Represents additional information about the state of the cluster. + message StateInfo { + // Represents information about an updating cluster. + message UpdateInfo { + // Target number of shards for redis cluster + optional int32 target_shard_count = 1; + + // Target number of replica nodes per shard. + optional int32 target_replica_count = 2; + } + + oneof info { + // Describes ongoing update on the cluster when cluster state is UPDATING. + UpdateInfo update_info = 1; + } + } + + // Represents the different states of a Redis cluster. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // Redis cluster is being created. + CREATING = 1; + + // Redis cluster has been created and is fully usable. + ACTIVE = 2; + + // Redis cluster configuration is being updated. + UPDATING = 3; + + // Redis cluster is being deleted. + DELETING = 4; + } + + // Required. Unique name of the resource in this scope including project and + // location using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The timestamp associated with the cluster creation request. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of this cluster. + // Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System assigned, unique identifier for the cluster. + string uid = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The number of replica nodes per shard. + optional int32 replica_count = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The authorization mode of the Redis cluster. + // If not provided, auth feature is disabled for the cluster. + AuthorizationMode authorization_mode = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The in-transit encryption for the Redis cluster. + // If not provided, encryption is disabled for the cluster. + TransitEncryptionMode transit_encryption_mode = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Redis memory size in GB for the entire cluster. + optional int32 size_gb = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Number of shards for the Redis cluster. + optional int32 shard_count = 14 [(google.api.field_behavior) = REQUIRED]; + + // Required. Each PscConfig configures the consumer network where IPs will + // be designated to the cluster for client access through Private Service + // Connect Automation. Currently, only one PscConfig is supported. + repeated PscConfig psc_configs = 15 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Endpoints created on each given network, for Redis clients to + // connect to the cluster. Currently only one discovery endpoint is supported. + repeated DiscoveryEndpoint discovery_endpoints = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. PSC connections for discovery of the cluster topology and + // accessing the cluster. + repeated PscConnection psc_connections = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the cluster. + StateInfo state_info = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +message PscConfig { + // Required. The network where the IP address of the discovery endpoint will + // be reserved, in the form of + // projects/{network_project}/global/networks/{network_id}. + string network = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Endpoints on each network, for Redis clients to connect to the cluster. +message DiscoveryEndpoint { + // Output only. Address of the exposed Redis endpoint used by clients to + // connect to the service. The address could be either IP or hostname. + string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The port number of the exposed Redis endpoint. + int32 port = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Customer configuration for where the endpoint is created and + // accessed from. + PscConfig psc_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Details of consumer resources in a PSC connection. +message PscConnection { + // Output only. The PSC connection id of the forwarding rule connected to the + // service attachment. + string psc_connection_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IP allocated on the consumer network for the PSC + // forwarding rule. + string address = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI of the consumer side forwarding rule. + // Example: + // projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + string forwarding_rule = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The consumer project_id where the forwarding rule is created + // from. + string project_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The consumer network where the IP address resides, in the form of + // projects/{project_id}/global/networks/{network_id}. + string network = 5; +} + +// Pre-defined metadata fields. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/clirr-ignored-differences.xml b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..d4a909fcf522 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/redis/cluster/v1beta1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/redis/cluster/v1beta1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/redis/cluster/v1beta1/*OrBuilder + boolean has*(*) + + diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/pom.xml b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/pom.xml new file mode 100644 index 000000000000..96046d1c0e34 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-redis-cluster-v1beta1 + 0.1.0 + proto-google-cloud-redis-cluster-v1beta1 + Proto library for google-cloud-redis-cluster + + com.google.cloud + google-cloud-redis-cluster-parent + 0.1.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/AuthorizationMode.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/AuthorizationMode.java new file mode 100644 index 000000000000..7153d96c38c1 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/AuthorizationMode.java @@ -0,0 +1,180 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Available authorization mode of a Redis cluster.
+ * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1beta1.AuthorizationMode} + */ +public enum AuthorizationMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not set.
+   * 
+ * + * AUTH_MODE_UNSPECIFIED = 0; + */ + AUTH_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * IAM basic authorization mode
+   * 
+ * + * AUTH_MODE_IAM_AUTH = 1; + */ + AUTH_MODE_IAM_AUTH(1), + /** + * + * + *
+   * Authorization disabled mode
+   * 
+ * + * AUTH_MODE_DISABLED = 2; + */ + AUTH_MODE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not set.
+   * 
+ * + * AUTH_MODE_UNSPECIFIED = 0; + */ + public static final int AUTH_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * IAM basic authorization mode
+   * 
+ * + * AUTH_MODE_IAM_AUTH = 1; + */ + public static final int AUTH_MODE_IAM_AUTH_VALUE = 1; + /** + * + * + *
+   * Authorization disabled mode
+   * 
+ * + * AUTH_MODE_DISABLED = 2; + */ + public static final int AUTH_MODE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthorizationMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AuthorizationMode forNumber(int value) { + switch (value) { + case 0: + return AUTH_MODE_UNSPECIFIED; + case 1: + return AUTH_MODE_IAM_AUTH; + case 2: + return AUTH_MODE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AuthorizationMode findValueByNumber(int number) { + return AuthorizationMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AuthorizationMode[] VALUES = values(); + + public static AuthorizationMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AuthorizationMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.AuthorizationMode) +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterProto.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterProto.java new file mode 100644 index 000000000000..77b4128027d7 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CloudRedisClusterProto.java @@ -0,0 +1,374 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public final class CloudRedisClusterProto { + private CloudRedisClusterProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_CreateClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_CreateClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_ListClustersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_ListClustersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_ListClustersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_ListClustersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_UpdateClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_UpdateClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_GetClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_GetClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n + * A cluster instance. + * + * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.Cluster} + */ +public final class Cluster extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.Cluster) + ClusterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Cluster.newBuilder() to construct. + private Cluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Cluster() { + name_ = ""; + state_ = 0; + uid_ = ""; + authorizationMode_ = 0; + transitEncryptionMode_ = 0; + pscConfigs_ = java.util.Collections.emptyList(); + discoveryEndpoints_ = java.util.Collections.emptyList(); + pscConnections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Cluster(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.Cluster.class, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder.class); + } + + /** + * + * + *
+   * Represents the different states of a Redis cluster.
+   * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1beta1.Cluster.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Redis cluster is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * Redis cluster has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * Redis cluster configuration is being updated.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * Redis cluster is being deleted.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Redis cluster is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * Redis cluster has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * Redis cluster configuration is being updated.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + * + * + *
+     * Redis cluster is being deleted.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return UPDATING; + case 4: + return DELETING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.Cluster.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.Cluster.State) + } + + public interface StateInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * + * @return Whether the updateInfo field is set. + */ + boolean hasUpdateInfo(); + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * + * @return The updateInfo. + */ + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo getUpdateInfo(); + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfoOrBuilder + getUpdateInfoOrBuilder(); + + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.InfoCase getInfoCase(); + } + /** + * + * + *
+   * Represents additional information about the state of the cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.Cluster.StateInfo} + */ + public static final class StateInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) + StateInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use StateInfo.newBuilder() to construct. + private StateInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StateInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StateInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.class, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder.class); + } + + public interface UpdateInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return Whether the targetShardCount field is set. + */ + boolean hasTargetShardCount(); + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return The targetShardCount. + */ + int getTargetShardCount(); + + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return Whether the targetReplicaCount field is set. + */ + boolean hasTargetReplicaCount(); + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return The targetReplicaCount. + */ + int getTargetReplicaCount(); + } + /** + * + * + *
+     * Represents information about an updating cluster.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo} + */ + public static final class UpdateInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) + UpdateInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInfo.newBuilder() to construct. + private UpdateInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.class, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.Builder.class); + } + + private int bitField0_; + public static final int TARGET_SHARD_COUNT_FIELD_NUMBER = 1; + private int targetShardCount_ = 0; + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return Whether the targetShardCount field is set. + */ + @java.lang.Override + public boolean hasTargetShardCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Target number of shards for redis cluster
+       * 
+ * + * optional int32 target_shard_count = 1; + * + * @return The targetShardCount. + */ + @java.lang.Override + public int getTargetShardCount() { + return targetShardCount_; + } + + public static final int TARGET_REPLICA_COUNT_FIELD_NUMBER = 2; + private int targetReplicaCount_ = 0; + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return Whether the targetReplicaCount field is set. + */ + @java.lang.Override + public boolean hasTargetReplicaCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Target number of replica nodes per shard.
+       * 
+ * + * optional int32 target_replica_count = 2; + * + * @return The targetReplicaCount. + */ + @java.lang.Override + public int getTargetReplicaCount() { + return targetReplicaCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(1, targetShardCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, targetReplicaCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, targetShardCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, targetReplicaCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo other = + (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) obj; + + if (hasTargetShardCount() != other.hasTargetShardCount()) return false; + if (hasTargetShardCount()) { + if (getTargetShardCount() != other.getTargetShardCount()) return false; + } + if (hasTargetReplicaCount() != other.hasTargetReplicaCount()) return false; + if (hasTargetReplicaCount()) { + if (getTargetReplicaCount() != other.getTargetReplicaCount()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTargetShardCount()) { + hash = (37 * hash) + TARGET_SHARD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTargetShardCount(); + } + if (hasTargetReplicaCount()) { + hash = (37 * hash) + TARGET_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTargetReplicaCount(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Represents information about an updating cluster.
+       * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.class, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetShardCount_ = 0; + targetReplicaCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_UpdateInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo build() { + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo buildPartial() { + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo result = + new com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.targetShardCount_ = targetShardCount_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.targetReplicaCount_ = targetReplicaCount_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) { + return mergeFrom( + (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo other) { + if (other + == com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance()) return this; + if (other.hasTargetShardCount()) { + setTargetShardCount(other.getTargetShardCount()); + } + if (other.hasTargetReplicaCount()) { + setTargetReplicaCount(other.getTargetReplicaCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + targetShardCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + targetReplicaCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int targetShardCount_; + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @return Whether the targetShardCount field is set. + */ + @java.lang.Override + public boolean hasTargetShardCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @return The targetShardCount. + */ + @java.lang.Override + public int getTargetShardCount() { + return targetShardCount_; + } + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @param value The targetShardCount to set. + * @return This builder for chaining. + */ + public Builder setTargetShardCount(int value) { + + targetShardCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Target number of shards for redis cluster
+         * 
+ * + * optional int32 target_shard_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearTargetShardCount() { + bitField0_ = (bitField0_ & ~0x00000001); + targetShardCount_ = 0; + onChanged(); + return this; + } + + private int targetReplicaCount_; + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @return Whether the targetReplicaCount field is set. + */ + @java.lang.Override + public boolean hasTargetReplicaCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @return The targetReplicaCount. + */ + @java.lang.Override + public int getTargetReplicaCount() { + return targetReplicaCount_; + } + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @param value The targetReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setTargetReplicaCount(int value) { + + targetReplicaCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Target number of replica nodes per shard.
+         * 
+ * + * optional int32 target_replica_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000002); + targetReplicaCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) + private static final com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo(); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int infoCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object info_; + + public enum InfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UPDATE_INFO(1), + INFO_NOT_SET(0); + private final int value; + + private InfoCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InfoCase valueOf(int value) { + return forNumber(value); + } + + public static InfoCase forNumber(int value) { + switch (value) { + case 1: + return UPDATE_INFO; + case 0: + return INFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InfoCase getInfoCase() { + return InfoCase.forNumber(infoCase_); + } + + public static final int UPDATE_INFO_FIELD_NUMBER = 1; + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * + * @return Whether the updateInfo field is set. + */ + @java.lang.Override + public boolean hasUpdateInfo() { + return infoCase_ == 1; + } + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * + * @return The updateInfo. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo getUpdateInfo() { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + /** + * + * + *
+     * Describes ongoing update on the cluster when cluster state is UPDATING.
+     * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfoOrBuilder + getUpdateInfoOrBuilder() { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (infoCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo other = + (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) obj; + + if (!getInfoCase().equals(other.getInfoCase())) return false; + switch (infoCase_) { + case 1: + if (!getUpdateInfo().equals(other.getUpdateInfo())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (infoCase_) { + case 1: + hash = (37 * hash) + UPDATE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUpdateInfo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents additional information about the state of the cluster.
+     * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.Cluster.StateInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.class, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (updateInfoBuilder_ != null) { + updateInfoBuilder_.clear(); + } + infoCase_ = 0; + info_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_StateInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo build() { + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo buildPartial() { + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo result = + new com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo result) { + result.infoCase_ = infoCase_; + result.info_ = this.info_; + if (infoCase_ == 1 && updateInfoBuilder_ != null) { + result.info_ = updateInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo other) { + if (other == com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.getDefaultInstance()) + return this; + switch (other.getInfoCase()) { + case UPDATE_INFO: + { + mergeUpdateInfo(other.getUpdateInfo()); + break; + } + case INFO_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateInfoFieldBuilder().getBuilder(), extensionRegistry); + infoCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int infoCase_ = 0; + private java.lang.Object info_; + + public InfoCase getInfoCase() { + return InfoCase.forNumber(infoCase_); + } + + public Builder clearInfo() { + infoCase_ = 0; + info_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.Builder, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfoOrBuilder> + updateInfoBuilder_; + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * + * @return Whether the updateInfo field is set. + */ + @java.lang.Override + public boolean hasUpdateInfo() { + return infoCase_ == 1; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + * + * @return The updateInfo. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo getUpdateInfo() { + if (updateInfoBuilder_ == null) { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } else { + if (infoCase_ == 1) { + return updateInfoBuilder_.getMessage(); + } + return com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + public Builder setUpdateInfo( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo value) { + if (updateInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + info_ = value; + onChanged(); + } else { + updateInfoBuilder_.setMessage(value); + } + infoCase_ = 1; + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + public Builder setUpdateInfo( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.Builder + builderForValue) { + if (updateInfoBuilder_ == null) { + info_ = builderForValue.build(); + onChanged(); + } else { + updateInfoBuilder_.setMessage(builderForValue.build()); + } + infoCase_ = 1; + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + public Builder mergeUpdateInfo( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo value) { + if (updateInfoBuilder_ == null) { + if (infoCase_ == 1 + && info_ + != com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance()) { + info_ = + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.newBuilder( + (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_) + .mergeFrom(value) + .buildPartial(); + } else { + info_ = value; + } + onChanged(); + } else { + if (infoCase_ == 1) { + updateInfoBuilder_.mergeFrom(value); + } else { + updateInfoBuilder_.setMessage(value); + } + } + infoCase_ = 1; + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + public Builder clearUpdateInfo() { + if (updateInfoBuilder_ == null) { + if (infoCase_ == 1) { + infoCase_ = 0; + info_ = null; + onChanged(); + } + } else { + if (infoCase_ == 1) { + infoCase_ = 0; + info_ = null; + } + updateInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.Builder + getUpdateInfoBuilder() { + return getUpdateInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfoOrBuilder + getUpdateInfoOrBuilder() { + if ((infoCase_ == 1) && (updateInfoBuilder_ != null)) { + return updateInfoBuilder_.getMessageOrBuilder(); + } else { + if (infoCase_ == 1) { + return (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_; + } + return com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Describes ongoing update on the cluster when cluster state is UPDATING.
+       * 
+ * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo update_info = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.Builder, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfoOrBuilder> + getUpdateInfoFieldBuilder() { + if (updateInfoBuilder_ == null) { + if (!(infoCase_ == 1)) { + info_ = + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo + .getDefaultInstance(); + } + updateInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo.Builder, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfoOrBuilder>( + (com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.UpdateInfo) info_, + getParentForChildren(), + isClean()); + info_ = null; + } + infoCase_ = 1; + onChanged(); + return updateInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.Cluster.StateInfo) + private static final com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo(); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StateInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.State getState() { + com.google.cloud.redis.cluster.v1beta1.Cluster.State result = + com.google.cloud.redis.cluster.v1beta1.Cluster.State.forNumber(state_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.State.UNRECOGNIZED + : result; + } + + public static final int UID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICA_COUNT_FIELD_NUMBER = 8; + private int replicaCount_ = 0; + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + @java.lang.Override + public boolean hasReplicaCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public int getReplicaCount() { + return replicaCount_; + } + + public static final int AUTHORIZATION_MODE_FIELD_NUMBER = 11; + private int authorizationMode_ = 0; + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authorizationMode. + */ + @java.lang.Override + public int getAuthorizationModeValue() { + return authorizationMode_; + } + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authorizationMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.AuthorizationMode getAuthorizationMode() { + com.google.cloud.redis.cluster.v1beta1.AuthorizationMode result = + com.google.cloud.redis.cluster.v1beta1.AuthorizationMode.forNumber(authorizationMode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.AuthorizationMode.UNRECOGNIZED + : result; + } + + public static final int TRANSIT_ENCRYPTION_MODE_FIELD_NUMBER = 12; + private int transitEncryptionMode_ = 0; + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for transitEncryptionMode. + */ + @java.lang.Override + public int getTransitEncryptionModeValue() { + return transitEncryptionMode_; + } + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transitEncryptionMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode getTransitEncryptionMode() { + com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode result = + com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode.forNumber( + transitEncryptionMode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode.UNRECOGNIZED + : result; + } + + public static final int SIZE_GB_FIELD_NUMBER = 13; + private int sizeGb_ = 0; + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + + public static final int SHARD_COUNT_FIELD_NUMBER = 14; + private int shardCount_ = 0; + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the shardCount field is set. + */ + @java.lang.Override + public boolean hasShardCount() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The shardCount. + */ + @java.lang.Override + public int getShardCount() { + return shardCount_; + } + + public static final int PSC_CONFIGS_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private java.util.List pscConfigs_; + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getPscConfigsList() { + return pscConfigs_; + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getPscConfigsOrBuilderList() { + return pscConfigs_; + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getPscConfigsCount() { + return pscConfigs_.size(); + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfig getPscConfigs(int index) { + return pscConfigs_.get(index); + } + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder getPscConfigsOrBuilder( + int index) { + return pscConfigs_.get(index); + } + + public static final int DISCOVERY_ENDPOINTS_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private java.util.List + discoveryEndpoints_; + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDiscoveryEndpointsList() { + return discoveryEndpoints_; + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDiscoveryEndpointsOrBuilderList() { + return discoveryEndpoints_; + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDiscoveryEndpointsCount() { + return discoveryEndpoints_.size(); + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint getDiscoveryEndpoints(int index) { + return discoveryEndpoints_.get(index); + } + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder + getDiscoveryEndpointsOrBuilder(int index) { + return discoveryEndpoints_.get(index); + } + + public static final int PSC_CONNECTIONS_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private java.util.List pscConnections_; + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPscConnectionsList() { + return pscConnections_; + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPscConnectionsOrBuilderList() { + return pscConnections_; + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPscConnectionsCount() { + return pscConnections_.size(); + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConnection getPscConnections(int index) { + return pscConnections_.get(index); + } + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder getPscConnectionsOrBuilder( + int index) { + return pscConnections_.get(index); + } + + public static final int STATE_INFO_FIELD_NUMBER = 18; + private com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo stateInfo_; + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateInfo field is set. + */ + @java.lang.Override + public boolean hasStateInfo() { + return stateInfo_ != null; + } + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateInfo. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo getStateInfo() { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder getStateInfoOrBuilder() { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (state_ + != com.google.cloud.redis.cluster.v1beta1.Cluster.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(8, replicaCount_); + } + if (authorizationMode_ + != com.google.cloud.redis.cluster.v1beta1.AuthorizationMode.AUTH_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, authorizationMode_); + } + if (transitEncryptionMode_ + != com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode + .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, transitEncryptionMode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(13, sizeGb_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(14, shardCount_); + } + for (int i = 0; i < pscConfigs_.size(); i++) { + output.writeMessage(15, pscConfigs_.get(i)); + } + for (int i = 0; i < discoveryEndpoints_.size(); i++) { + output.writeMessage(16, discoveryEndpoints_.get(i)); + } + for (int i = 0; i < pscConnections_.size(); i++) { + output.writeMessage(17, pscConnections_.get(i)); + } + if (stateInfo_ != null) { + output.writeMessage(18, getStateInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (state_ + != com.google.cloud.redis.cluster.v1beta1.Cluster.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, uid_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, replicaCount_); + } + if (authorizationMode_ + != com.google.cloud.redis.cluster.v1beta1.AuthorizationMode.AUTH_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, authorizationMode_); + } + if (transitEncryptionMode_ + != com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode + .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, transitEncryptionMode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(13, sizeGb_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, shardCount_); + } + for (int i = 0; i < pscConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, pscConfigs_.get(i)); + } + for (int i = 0; i < discoveryEndpoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(16, discoveryEndpoints_.get(i)); + } + for (int i = 0; i < pscConnections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, pscConnections_.get(i)); + } + if (stateInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getStateInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.Cluster)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.Cluster other = + (com.google.cloud.redis.cluster.v1beta1.Cluster) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasReplicaCount() != other.hasReplicaCount()) return false; + if (hasReplicaCount()) { + if (getReplicaCount() != other.getReplicaCount()) return false; + } + if (authorizationMode_ != other.authorizationMode_) return false; + if (transitEncryptionMode_ != other.transitEncryptionMode_) return false; + if (hasSizeGb() != other.hasSizeGb()) return false; + if (hasSizeGb()) { + if (getSizeGb() != other.getSizeGb()) return false; + } + if (hasShardCount() != other.hasShardCount()) return false; + if (hasShardCount()) { + if (getShardCount() != other.getShardCount()) return false; + } + if (!getPscConfigsList().equals(other.getPscConfigsList())) return false; + if (!getDiscoveryEndpointsList().equals(other.getDiscoveryEndpointsList())) return false; + if (!getPscConnectionsList().equals(other.getPscConnectionsList())) return false; + if (hasStateInfo() != other.hasStateInfo()) return false; + if (hasStateInfo()) { + if (!getStateInfo().equals(other.getStateInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasReplicaCount()) { + hash = (37 * hash) + REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getReplicaCount(); + } + hash = (37 * hash) + AUTHORIZATION_MODE_FIELD_NUMBER; + hash = (53 * hash) + authorizationMode_; + hash = (37 * hash) + TRANSIT_ENCRYPTION_MODE_FIELD_NUMBER; + hash = (53 * hash) + transitEncryptionMode_; + if (hasSizeGb()) { + hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getSizeGb(); + } + if (hasShardCount()) { + hash = (37 * hash) + SHARD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getShardCount(); + } + if (getPscConfigsCount() > 0) { + hash = (37 * hash) + PSC_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getPscConfigsList().hashCode(); + } + if (getDiscoveryEndpointsCount() > 0) { + hash = (37 * hash) + DISCOVERY_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryEndpointsList().hashCode(); + } + if (getPscConnectionsCount() > 0) { + hash = (37 * hash) + PSC_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPscConnectionsList().hashCode(); + } + if (hasStateInfo()) { + hash = (37 * hash) + STATE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getStateInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1beta1.Cluster prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A cluster instance.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.Cluster} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.Cluster) + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.Cluster.class, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.Cluster.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + state_ = 0; + uid_ = ""; + replicaCount_ = 0; + authorizationMode_ = 0; + transitEncryptionMode_ = 0; + sizeGb_ = 0; + shardCount_ = 0; + if (pscConfigsBuilder_ == null) { + pscConfigs_ = java.util.Collections.emptyList(); + } else { + pscConfigs_ = null; + pscConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (discoveryEndpointsBuilder_ == null) { + discoveryEndpoints_ = java.util.Collections.emptyList(); + } else { + discoveryEndpoints_ = null; + discoveryEndpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + if (pscConnectionsBuilder_ == null) { + pscConnections_ = java.util.Collections.emptyList(); + } else { + pscConnections_ = null; + pscConnectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + stateInfo_ = null; + if (stateInfoBuilder_ != null) { + stateInfoBuilder_.dispose(); + stateInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_Cluster_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster build() { + com.google.cloud.redis.cluster.v1beta1.Cluster result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster buildPartial() { + com.google.cloud.redis.cluster.v1beta1.Cluster result = + new com.google.cloud.redis.cluster.v1beta1.Cluster(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.redis.cluster.v1beta1.Cluster result) { + if (pscConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + pscConfigs_ = java.util.Collections.unmodifiableList(pscConfigs_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.pscConfigs_ = pscConfigs_; + } else { + result.pscConfigs_ = pscConfigsBuilder_.build(); + } + if (discoveryEndpointsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + discoveryEndpoints_ = java.util.Collections.unmodifiableList(discoveryEndpoints_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.discoveryEndpoints_ = discoveryEndpoints_; + } else { + result.discoveryEndpoints_ = discoveryEndpointsBuilder_.build(); + } + if (pscConnectionsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + pscConnections_ = java.util.Collections.unmodifiableList(pscConnections_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.pscConnections_ = pscConnections_; + } else { + result.pscConnections_ = pscConnectionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.Cluster result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.uid_ = uid_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.replicaCount_ = replicaCount_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.authorizationMode_ = authorizationMode_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.transitEncryptionMode_ = transitEncryptionMode_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.sizeGb_ = sizeGb_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.shardCount_ = shardCount_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.stateInfo_ = stateInfoBuilder_ == null ? stateInfo_ : stateInfoBuilder_.build(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.Cluster) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.Cluster) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.Cluster other) { + if (other == com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReplicaCount()) { + setReplicaCount(other.getReplicaCount()); + } + if (other.authorizationMode_ != 0) { + setAuthorizationModeValue(other.getAuthorizationModeValue()); + } + if (other.transitEncryptionMode_ != 0) { + setTransitEncryptionModeValue(other.getTransitEncryptionModeValue()); + } + if (other.hasSizeGb()) { + setSizeGb(other.getSizeGb()); + } + if (other.hasShardCount()) { + setShardCount(other.getShardCount()); + } + if (pscConfigsBuilder_ == null) { + if (!other.pscConfigs_.isEmpty()) { + if (pscConfigs_.isEmpty()) { + pscConfigs_ = other.pscConfigs_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensurePscConfigsIsMutable(); + pscConfigs_.addAll(other.pscConfigs_); + } + onChanged(); + } + } else { + if (!other.pscConfigs_.isEmpty()) { + if (pscConfigsBuilder_.isEmpty()) { + pscConfigsBuilder_.dispose(); + pscConfigsBuilder_ = null; + pscConfigs_ = other.pscConfigs_; + bitField0_ = (bitField0_ & ~0x00000200); + pscConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPscConfigsFieldBuilder() + : null; + } else { + pscConfigsBuilder_.addAllMessages(other.pscConfigs_); + } + } + } + if (discoveryEndpointsBuilder_ == null) { + if (!other.discoveryEndpoints_.isEmpty()) { + if (discoveryEndpoints_.isEmpty()) { + discoveryEndpoints_ = other.discoveryEndpoints_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.addAll(other.discoveryEndpoints_); + } + onChanged(); + } + } else { + if (!other.discoveryEndpoints_.isEmpty()) { + if (discoveryEndpointsBuilder_.isEmpty()) { + discoveryEndpointsBuilder_.dispose(); + discoveryEndpointsBuilder_ = null; + discoveryEndpoints_ = other.discoveryEndpoints_; + bitField0_ = (bitField0_ & ~0x00000400); + discoveryEndpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDiscoveryEndpointsFieldBuilder() + : null; + } else { + discoveryEndpointsBuilder_.addAllMessages(other.discoveryEndpoints_); + } + } + } + if (pscConnectionsBuilder_ == null) { + if (!other.pscConnections_.isEmpty()) { + if (pscConnections_.isEmpty()) { + pscConnections_ = other.pscConnections_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensurePscConnectionsIsMutable(); + pscConnections_.addAll(other.pscConnections_); + } + onChanged(); + } + } else { + if (!other.pscConnections_.isEmpty()) { + if (pscConnectionsBuilder_.isEmpty()) { + pscConnectionsBuilder_.dispose(); + pscConnectionsBuilder_ = null; + pscConnections_ = other.pscConnections_; + bitField0_ = (bitField0_ & ~0x00000800); + pscConnectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPscConnectionsFieldBuilder() + : null; + } else { + pscConnectionsBuilder_.addAllMessages(other.pscConnections_); + } + } + } + if (other.hasStateInfo()) { + mergeStateInfo(other.getStateInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 64: + { + replicaCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 64 + case 88: + { + authorizationMode_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 88 + case 96: + { + transitEncryptionMode_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 96 + case 104: + { + sizeGb_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 104 + case 112: + { + shardCount_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 112 + case 122: + { + com.google.cloud.redis.cluster.v1beta1.PscConfig m = + input.readMessage( + com.google.cloud.redis.cluster.v1beta1.PscConfig.parser(), + extensionRegistry); + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.add(m); + } else { + pscConfigsBuilder_.addMessage(m); + } + break; + } // case 122 + case 130: + { + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint m = + input.readMessage( + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.parser(), + extensionRegistry); + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(m); + } else { + discoveryEndpointsBuilder_.addMessage(m); + } + break; + } // case 130 + case 138: + { + com.google.cloud.redis.cluster.v1beta1.PscConnection m = + input.readMessage( + com.google.cloud.redis.cluster.v1beta1.PscConnection.parser(), + extensionRegistry); + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.add(m); + } else { + pscConnectionsBuilder_.addMessage(m); + } + break; + } // case 138 + case 146: + { + input.readMessage(getStateInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 146 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique name of the resource in this scope including project and
+     * location using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp associated with the cluster creation request.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster.State getState() { + com.google.cloud.redis.cluster.v1beta1.Cluster.State result = + com.google.cloud.redis.cluster.v1beta1.Cluster.State.forNumber(state_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.redis.cluster.v1beta1.Cluster.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this cluster.
+     * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System assigned, unique identifier for the cluster.
+     * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int replicaCount_; + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + @java.lang.Override + public boolean hasReplicaCount() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + @java.lang.Override + public int getReplicaCount() { + return replicaCount_; + } + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The replicaCount to set. + * @return This builder for chaining. + */ + public Builder setReplicaCount(int value) { + + replicaCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The number of replica nodes per shard.
+     * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000010); + replicaCount_ = 0; + onChanged(); + return this; + } + + private int authorizationMode_ = 0; + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authorizationMode. + */ + @java.lang.Override + public int getAuthorizationModeValue() { + return authorizationMode_; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for authorizationMode to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationModeValue(int value) { + authorizationMode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authorizationMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.AuthorizationMode getAuthorizationMode() { + com.google.cloud.redis.cluster.v1beta1.AuthorizationMode result = + com.google.cloud.redis.cluster.v1beta1.AuthorizationMode.forNumber(authorizationMode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.AuthorizationMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The authorizationMode to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationMode( + com.google.cloud.redis.cluster.v1beta1.AuthorizationMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + authorizationMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The authorization mode of the Redis cluster.
+     * If not provided, auth feature is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAuthorizationMode() { + bitField0_ = (bitField0_ & ~0x00000020); + authorizationMode_ = 0; + onChanged(); + return this; + } + + private int transitEncryptionMode_ = 0; + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for transitEncryptionMode. + */ + @java.lang.Override + public int getTransitEncryptionModeValue() { + return transitEncryptionMode_; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for transitEncryptionMode to set. + * @return This builder for chaining. + */ + public Builder setTransitEncryptionModeValue(int value) { + transitEncryptionMode_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transitEncryptionMode. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode getTransitEncryptionMode() { + com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode result = + com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode.forNumber( + transitEncryptionMode_); + return result == null + ? com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The transitEncryptionMode to set. + * @return This builder for chaining. + */ + public Builder setTransitEncryptionMode( + com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + transitEncryptionMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The in-transit encryption for the Redis cluster.
+     * If not provided, encryption  is disabled for the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTransitEncryptionMode() { + bitField0_ = (bitField0_ & ~0x00000040); + transitEncryptionMode_ = 0; + onChanged(); + return this; + } + + private int sizeGb_; + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeGb. + */ + @java.lang.Override + public int getSizeGb() { + return sizeGb_; + } + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(int value) { + + sizeGb_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Redis memory size in GB for the entire cluster.
+     * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + bitField0_ = (bitField0_ & ~0x00000080); + sizeGb_ = 0; + onChanged(); + return this; + } + + private int shardCount_; + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the shardCount field is set. + */ + @java.lang.Override + public boolean hasShardCount() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The shardCount. + */ + @java.lang.Override + public int getShardCount() { + return shardCount_; + } + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The shardCount to set. + * @return This builder for chaining. + */ + public Builder setShardCount(int value) { + + shardCount_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Number of shards for the Redis cluster.
+     * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearShardCount() { + bitField0_ = (bitField0_ & ~0x00000100); + shardCount_ = 0; + onChanged(); + return this; + } + + private java.util.List pscConfigs_ = + java.util.Collections.emptyList(); + + private void ensurePscConfigsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + pscConfigs_ = + new java.util.ArrayList(pscConfigs_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConfig, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder> + pscConfigsBuilder_; + + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getPscConfigsList() { + if (pscConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pscConfigs_); + } else { + return pscConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getPscConfigsCount() { + if (pscConfigsBuilder_ == null) { + return pscConfigs_.size(); + } else { + return pscConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfig getPscConfigs(int index) { + if (pscConfigsBuilder_ == null) { + return pscConfigs_.get(index); + } else { + return pscConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPscConfigs( + int index, com.google.cloud.redis.cluster.v1beta1.PscConfig value) { + if (pscConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConfigsIsMutable(); + pscConfigs_.set(index, value); + onChanged(); + } else { + pscConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPscConfigs( + int index, com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder builderForValue) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + pscConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs(com.google.cloud.redis.cluster.v1beta1.PscConfig value) { + if (pscConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConfigsIsMutable(); + pscConfigs_.add(value); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs( + int index, com.google.cloud.redis.cluster.v1beta1.PscConfig value) { + if (pscConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConfigsIsMutable(); + pscConfigs_.add(index, value); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs( + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder builderForValue) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.add(builderForValue.build()); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addPscConfigs( + int index, com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder builderForValue) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + pscConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllPscConfigs( + java.lang.Iterable values) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pscConfigs_); + onChanged(); + } else { + pscConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPscConfigs() { + if (pscConfigsBuilder_ == null) { + pscConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + pscConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removePscConfigs(int index) { + if (pscConfigsBuilder_ == null) { + ensurePscConfigsIsMutable(); + pscConfigs_.remove(index); + onChanged(); + } else { + pscConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder getPscConfigsBuilder( + int index) { + return getPscConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder getPscConfigsOrBuilder( + int index) { + if (pscConfigsBuilder_ == null) { + return pscConfigs_.get(index); + } else { + return pscConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getPscConfigsOrBuilderList() { + if (pscConfigsBuilder_ != null) { + return pscConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pscConfigs_); + } + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder addPscConfigsBuilder() { + return getPscConfigsFieldBuilder() + .addBuilder(com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder addPscConfigsBuilder( + int index) { + return getPscConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Each PscConfig configures the consumer network where IPs will
+     * be designated to the cluster for client access through Private Service
+     * Connect Automation. Currently, only one PscConfig is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getPscConfigsBuilderList() { + return getPscConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConfig, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder> + getPscConfigsFieldBuilder() { + if (pscConfigsBuilder_ == null) { + pscConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConfig, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder>( + pscConfigs_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + pscConfigs_ = null; + } + return pscConfigsBuilder_; + } + + private java.util.List + discoveryEndpoints_ = java.util.Collections.emptyList(); + + private void ensureDiscoveryEndpointsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + discoveryEndpoints_ = + new java.util.ArrayList( + discoveryEndpoints_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder> + discoveryEndpointsBuilder_; + + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDiscoveryEndpointsList() { + if (discoveryEndpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(discoveryEndpoints_); + } else { + return discoveryEndpointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDiscoveryEndpointsCount() { + if (discoveryEndpointsBuilder_ == null) { + return discoveryEndpoints_.size(); + } else { + return discoveryEndpointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint getDiscoveryEndpoints( + int index) { + if (discoveryEndpointsBuilder_ == null) { + return discoveryEndpoints_.get(index); + } else { + return discoveryEndpointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryEndpoints( + int index, com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint value) { + if (discoveryEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.set(index, value); + onChanged(); + } else { + discoveryEndpointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryEndpoints( + int index, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder builderForValue) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + discoveryEndpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint value) { + if (discoveryEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(value); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + int index, com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint value) { + if (discoveryEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(index, value); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder builderForValue) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(builderForValue.build()); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDiscoveryEndpoints( + int index, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder builderForValue) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + discoveryEndpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDiscoveryEndpoints( + java.lang.Iterable + values) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, discoveryEndpoints_); + onChanged(); + } else { + discoveryEndpointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDiscoveryEndpoints() { + if (discoveryEndpointsBuilder_ == null) { + discoveryEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + discoveryEndpointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDiscoveryEndpoints(int index) { + if (discoveryEndpointsBuilder_ == null) { + ensureDiscoveryEndpointsIsMutable(); + discoveryEndpoints_.remove(index); + onChanged(); + } else { + discoveryEndpointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder + getDiscoveryEndpointsBuilder(int index) { + return getDiscoveryEndpointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder + getDiscoveryEndpointsOrBuilder(int index) { + if (discoveryEndpointsBuilder_ == null) { + return discoveryEndpoints_.get(index); + } else { + return discoveryEndpointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder> + getDiscoveryEndpointsOrBuilderList() { + if (discoveryEndpointsBuilder_ != null) { + return discoveryEndpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(discoveryEndpoints_); + } + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder + addDiscoveryEndpointsBuilder() { + return getDiscoveryEndpointsFieldBuilder() + .addBuilder( + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder + addDiscoveryEndpointsBuilder(int index) { + return getDiscoveryEndpointsFieldBuilder() + .addBuilder( + index, com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Endpoints created on each given network, for Redis clients to
+     * connect to the cluster. Currently only one discovery endpoint is supported.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDiscoveryEndpointsBuilderList() { + return getDiscoveryEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder> + getDiscoveryEndpointsFieldBuilder() { + if (discoveryEndpointsBuilder_ == null) { + discoveryEndpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder>( + discoveryEndpoints_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + discoveryEndpoints_ = null; + } + return discoveryEndpointsBuilder_; + } + + private java.util.List pscConnections_ = + java.util.Collections.emptyList(); + + private void ensurePscConnectionsIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + pscConnections_ = + new java.util.ArrayList( + pscConnections_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConnection, + com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder> + pscConnectionsBuilder_; + + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPscConnectionsList() { + if (pscConnectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pscConnections_); + } else { + return pscConnectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPscConnectionsCount() { + if (pscConnectionsBuilder_ == null) { + return pscConnections_.size(); + } else { + return pscConnectionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConnection getPscConnections(int index) { + if (pscConnectionsBuilder_ == null) { + return pscConnections_.get(index); + } else { + return pscConnectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConnections( + int index, com.google.cloud.redis.cluster.v1beta1.PscConnection value) { + if (pscConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConnectionsIsMutable(); + pscConnections_.set(index, value); + onChanged(); + } else { + pscConnectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConnections( + int index, com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder builderForValue) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.set(index, builderForValue.build()); + onChanged(); + } else { + pscConnectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections(com.google.cloud.redis.cluster.v1beta1.PscConnection value) { + if (pscConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConnectionsIsMutable(); + pscConnections_.add(value); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections( + int index, com.google.cloud.redis.cluster.v1beta1.PscConnection value) { + if (pscConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePscConnectionsIsMutable(); + pscConnections_.add(index, value); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections( + com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder builderForValue) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.add(builderForValue.build()); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPscConnections( + int index, com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder builderForValue) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.add(index, builderForValue.build()); + onChanged(); + } else { + pscConnectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPscConnections( + java.lang.Iterable values) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pscConnections_); + onChanged(); + } else { + pscConnectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPscConnections() { + if (pscConnectionsBuilder_ == null) { + pscConnections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + pscConnectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePscConnections(int index) { + if (pscConnectionsBuilder_ == null) { + ensurePscConnectionsIsMutable(); + pscConnections_.remove(index); + onChanged(); + } else { + pscConnectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder getPscConnectionsBuilder( + int index) { + return getPscConnectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder getPscConnectionsOrBuilder( + int index) { + if (pscConnectionsBuilder_ == null) { + return pscConnections_.get(index); + } else { + return pscConnectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPscConnectionsOrBuilderList() { + if (pscConnectionsBuilder_ != null) { + return pscConnectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pscConnections_); + } + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder addPscConnectionsBuilder() { + return getPscConnectionsFieldBuilder() + .addBuilder(com.google.cloud.redis.cluster.v1beta1.PscConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder addPscConnectionsBuilder( + int index) { + return getPscConnectionsFieldBuilder() + .addBuilder( + index, com.google.cloud.redis.cluster.v1beta1.PscConnection.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. PSC connections for discovery of the cluster topology and
+     * accessing the cluster.
+     * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPscConnectionsBuilderList() { + return getPscConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConnection, + com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder> + getPscConnectionsFieldBuilder() { + if (pscConnectionsBuilder_ == null) { + pscConnectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConnection, + com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder>( + pscConnections_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + pscConnections_ = null; + } + return pscConnectionsBuilder_; + } + + private com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo stateInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder> + stateInfoBuilder_; + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateInfo field is set. + */ + public boolean hasStateInfo() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateInfo. + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo getStateInfo() { + if (stateInfoBuilder_ == null) { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } else { + return stateInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateInfo(com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo value) { + if (stateInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateInfo_ = value; + } else { + stateInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateInfo( + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder builderForValue) { + if (stateInfoBuilder_ == null) { + stateInfo_ = builderForValue.build(); + } else { + stateInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStateInfo(com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo value) { + if (stateInfoBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && stateInfo_ != null + && stateInfo_ + != com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.getDefaultInstance()) { + getStateInfoBuilder().mergeFrom(value); + } else { + stateInfo_ = value; + } + } else { + stateInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStateInfo() { + bitField0_ = (bitField0_ & ~0x00001000); + stateInfo_ = null; + if (stateInfoBuilder_ != null) { + stateInfoBuilder_.dispose(); + stateInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder getStateInfoBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getStateInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder + getStateInfoOrBuilder() { + if (stateInfoBuilder_ != null) { + return stateInfoBuilder_.getMessageOrBuilder(); + } else { + return stateInfo_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.getDefaultInstance() + : stateInfo_; + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of the cluster.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder> + getStateInfoFieldBuilder() { + if (stateInfoBuilder_ == null) { + stateInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo.Builder, + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder>( + getStateInfo(), getParentForChildren(), isClean()); + stateInfo_ = null; + } + return stateInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.Cluster) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.Cluster) + private static final com.google.cloud.redis.cluster.v1beta1.Cluster DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.Cluster(); + } + + public static com.google.cloud.redis.cluster.v1beta1.Cluster getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cluster parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterName.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterName.java new file mode 100644 index 000000000000..7641489e13df --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ClusterName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + + @Deprecated + protected ClusterName() { + project = null; + location = null; + cluster = null; + } + + private ClusterName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ClusterName of(String project, String location, String cluster) { + return newBuilder().setProject(project).setLocation(location).setCluster(cluster).build(); + } + + public static String format(String project, String location, String cluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .build() + .toString(); + } + + public static ClusterName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER.validatedMatch( + formattedString, "ClusterName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("cluster")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ClusterName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER.instantiate( + "project", project, "location", location, "cluster", cluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ClusterName that = ((ClusterName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + return h; + } + + /** Builder for projects/{project}/locations/{location}/clusters/{cluster}. */ + public static class Builder { + private String project; + private String location; + private String cluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + private Builder(ClusterName clusterName) { + this.project = clusterName.project; + this.location = clusterName.location; + this.cluster = clusterName.cluster; + } + + public ClusterName build() { + return new ClusterName(this); + } + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterOrBuilder.java new file mode 100644 index 000000000000..6001f7f69efc --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ClusterOrBuilder.java @@ -0,0 +1,535 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface ClusterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.Cluster) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Unique name of the resource in this scope including project and
+   * location using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp associated with the cluster creation request.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of this cluster.
+   * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.redis.cluster.v1beta1.Cluster.State getState(); + + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. System assigned, unique identifier for the cluster.
+   * 
+ * + * string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the replicaCount field is set. + */ + boolean hasReplicaCount(); + /** + * + * + *
+   * Optional. The number of replica nodes per shard.
+   * 
+ * + * optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The replicaCount. + */ + int getReplicaCount(); + + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authorizationMode. + */ + int getAuthorizationModeValue(); + /** + * + * + *
+   * Optional. The authorization mode of the Redis cluster.
+   * If not provided, auth feature is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authorizationMode. + */ + com.google.cloud.redis.cluster.v1beta1.AuthorizationMode getAuthorizationMode(); + + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for transitEncryptionMode. + */ + int getTransitEncryptionModeValue(); + /** + * + * + *
+   * Optional. The in-transit encryption for the Redis cluster.
+   * If not provided, encryption  is disabled for the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transitEncryptionMode. + */ + com.google.cloud.redis.cluster.v1beta1.TransitEncryptionMode getTransitEncryptionMode(); + + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the sizeGb field is set. + */ + boolean hasSizeGb(); + /** + * + * + *
+   * Output only. Redis memory size in GB for the entire cluster.
+   * 
+ * + * optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sizeGb. + */ + int getSizeGb(); + + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the shardCount field is set. + */ + boolean hasShardCount(); + /** + * + * + *
+   * Required. Number of shards for the Redis cluster.
+   * 
+ * + * optional int32 shard_count = 14 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The shardCount. + */ + int getShardCount(); + + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getPscConfigsList(); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1beta1.PscConfig getPscConfigs(int index); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getPscConfigsCount(); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getPscConfigsOrBuilderList(); + /** + * + * + *
+   * Required. Each PscConfig configures the consumer network where IPs will
+   * be designated to the cluster for client access through Private Service
+   * Connect Automation. Currently, only one PscConfig is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder getPscConfigsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDiscoveryEndpointsList(); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint getDiscoveryEndpoints(int index); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDiscoveryEndpointsCount(); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDiscoveryEndpointsOrBuilderList(); + /** + * + * + *
+   * Output only. Endpoints created on each given network, for Redis clients to
+   * connect to the cluster. Currently only one discovery endpoint is supported.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder getDiscoveryEndpointsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPscConnectionsList(); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1beta1.PscConnection getPscConnections(int index); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPscConnectionsCount(); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getPscConnectionsOrBuilderList(); + /** + * + * + *
+   * Output only. PSC connections for discovery of the cluster topology and
+   * accessing the cluster.
+   * 
+ * + * + * repeated .google.cloud.redis.cluster.v1beta1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder getPscConnectionsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateInfo field is set. + */ + boolean hasStateInfo(); + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateInfo. + */ + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfo getStateInfo(); + /** + * + * + *
+   * Output only. Additional information about the current state of the cluster.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1beta1.Cluster.StateInfoOrBuilder getStateInfoOrBuilder(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CreateClusterRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CreateClusterRequest.java new file mode 100644 index 000000000000..5a6b21bd99fa --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CreateClusterRequest.java @@ -0,0 +1,1355 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Request for [CreateCluster][CloudRedis.CreateCluster].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.CreateClusterRequest} + */ +public final class CreateClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.CreateClusterRequest) + CreateClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateClusterRequest.newBuilder() to construct. + private CreateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateClusterRequest() { + parent_ = ""; + clusterId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CreateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterId_ = ""; + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + @java.lang.Override + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_FIELD_NUMBER = 3; + private com.google.cloud.redis.cluster.v1beta1.Cluster cluster_; + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + @java.lang.Override + public boolean hasCluster() { + return cluster_ != null; + } + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster getCluster() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClusterOrBuilder() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_); + } + if (cluster_ != null) { + output.writeMessage(3, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_); + } + if (cluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest other = + (com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getClusterId().equals(other.getClusterId())) return false; + if (hasCluster() != other.hasCluster()) return false; + if (hasCluster()) { + if (!getCluster().equals(other.getCluster())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getClusterId().hashCode(); + if (hasCluster()) { + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for [CreateCluster][CloudRedis.CreateCluster].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.CreateClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.CreateClusterRequest) + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CreateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + clusterId_ = ""; + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest build() { + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest result = + new com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clusterId_ = clusterId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cluster_ = clusterBuilder_ == null ? cluster_ : clusterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClusterId().isEmpty()) { + clusterId_ = other.clusterId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCluster()) { + mergeCluster(other.getCluster()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + clusterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object clusterId_ = ""; + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClusterId() { + clusterId_ = getDefaultInstance().getClusterId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the Redis cluster in the customer project
+     * with the following restrictions:
+     *
+     * * Must contain only lowercase letters, numbers, and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the customer project / location
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1beta1.Cluster cluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder> + clusterBuilder_; + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + public boolean hasCluster() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster getCluster() { + if (clusterBuilder_ == null) { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } else { + return clusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.redis.cluster.v1beta1.Cluster value) { + if (clusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + } else { + clusterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster( + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder builderForValue) { + if (clusterBuilder_ == null) { + cluster_ = builderForValue.build(); + } else { + clusterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCluster(com.google.cloud.redis.cluster.v1beta1.Cluster value) { + if (clusterBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cluster_ != null + && cluster_ != com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance()) { + getClusterBuilder().mergeFrom(value); + } else { + cluster_ = value; + } + } else { + clusterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCluster() { + bitField0_ = (bitField0_ & ~0x00000004); + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.Builder getClusterBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClusterOrBuilder() { + if (clusterBuilder_ != null) { + return clusterBuilder_.getMessageOrBuilder(); + } else { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } + } + /** + * + * + *
+     * Required. The cluster that is to be created.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder> + getClusterFieldBuilder() { + if (clusterBuilder_ == null) { + clusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder>( + getCluster(), getParentForChildren(), isClean()); + cluster_ = null; + } + return clusterBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 4; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.CreateClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.CreateClusterRequest) + private static final com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest(); + } + + public static com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CreateClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CreateClusterRequestOrBuilder.java new file mode 100644 index 000000000000..ad31fca6293e --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/CreateClusterRequestOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface CreateClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.CreateClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + java.lang.String getClusterId(); + /** + * + * + *
+   * Required. The logical name of the Redis cluster in the customer project
+   * with the following restrictions:
+   *
+   * * Must contain only lowercase letters, numbers, and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the customer project / location
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + com.google.protobuf.ByteString getClusterIdBytes(); + + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + boolean hasCluster(); + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + com.google.cloud.redis.cluster.v1beta1.Cluster getCluster(); + /** + * + * + *
+   * Required. The cluster that is to be created.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClusterOrBuilder(); + + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 4; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DeleteClusterRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DeleteClusterRequest.java new file mode 100644 index 000000000000..78b31ff355cc --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DeleteClusterRequest.java @@ -0,0 +1,835 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Request for [DeleteCluster][CloudRedis.DeleteCluster].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.DeleteClusterRequest} + */ +public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) + DeleteClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteClusterRequest.newBuilder() to construct. + private DeleteClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteClusterRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest other = + (com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for [DeleteCluster][CloudRedis.DeleteCluster].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.DeleteClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest build() { + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest result = + new com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 2; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) + private static final com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest(); + } + + public static com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DeleteClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DeleteClusterRequestOrBuilder.java new file mode 100644 index 000000000000..6a8544e3d600 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DeleteClusterRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface DeleteClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.DeleteClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 2; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DiscoveryEndpoint.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DiscoveryEndpoint.java new file mode 100644 index 000000000000..ea26e2cd36db --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DiscoveryEndpoint.java @@ -0,0 +1,1027 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Endpoints on each network, for Redis clients to connect to the cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint} + */ +public final class DiscoveryEndpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) + DiscoveryEndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiscoveryEndpoint.newBuilder() to construct. + private DiscoveryEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiscoveryEndpoint() { + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiscoveryEndpoint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.class, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_ = 0; + /** + * + * + *
+   * Output only. The port number of the exposed Redis endpoint.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + public static final int PSC_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.redis.cluster.v1beta1.PscConfig pscConfig_; + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pscConfig field is set. + */ + @java.lang.Override + public boolean hasPscConfig() { + return pscConfig_ != null; + } + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pscConfig. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfig getPscConfig() { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance() + : pscConfig_; + } + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder getPscConfigOrBuilder() { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance() + : pscConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + if (pscConfig_ != null) { + output.writeMessage(3, getPscConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, port_); + } + if (pscConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPscConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint other = + (com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) obj; + + if (!getAddress().equals(other.getAddress())) return false; + if (getPort() != other.getPort()) return false; + if (hasPscConfig() != other.hasPscConfig()) return false; + if (hasPscConfig()) { + if (!getPscConfig().equals(other.getPscConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + if (hasPscConfig()) { + hash = (37 * hash) + PSC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPscConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Endpoints on each network, for Redis clients to connect to the cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.class, + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + address_ = ""; + port_ = 0; + pscConfig_ = null; + if (pscConfigBuilder_ != null) { + pscConfigBuilder_.dispose(); + pscConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_DiscoveryEndpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint build() { + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint buildPartial() { + com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint result = + new com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.port_ = port_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pscConfig_ = pscConfigBuilder_ == null ? pscConfig_ : pscConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint other) { + if (other == com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint.getDefaultInstance()) + return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + if (other.hasPscConfig()) { + mergePscConfig(other.getPscConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getPscConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object address_ = ""; + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + address_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Address of the exposed Redis endpoint used by clients to
+     * connect to the service. The address could be either IP or hostname.
+     * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + address_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int port_; + /** + * + * + *
+     * Output only. The port number of the exposed Redis endpoint.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * + * + *
+     * Output only. The port number of the exposed Redis endpoint.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The port number of the exposed Redis endpoint.
+     * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.redis.cluster.v1beta1.PscConfig pscConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConfig, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder> + pscConfigBuilder_; + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pscConfig field is set. + */ + public boolean hasPscConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pscConfig. + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfig getPscConfig() { + if (pscConfigBuilder_ == null) { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance() + : pscConfig_; + } else { + return pscConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConfig(com.google.cloud.redis.cluster.v1beta1.PscConfig value) { + if (pscConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pscConfig_ = value; + } else { + pscConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPscConfig( + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder builderForValue) { + if (pscConfigBuilder_ == null) { + pscConfig_ = builderForValue.build(); + } else { + pscConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePscConfig(com.google.cloud.redis.cluster.v1beta1.PscConfig value) { + if (pscConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && pscConfig_ != null + && pscConfig_ + != com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance()) { + getPscConfigBuilder().mergeFrom(value); + } else { + pscConfig_ = value; + } + } else { + pscConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPscConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + pscConfig_ = null; + if (pscConfigBuilder_ != null) { + pscConfigBuilder_.dispose(); + pscConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder getPscConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPscConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder getPscConfigOrBuilder() { + if (pscConfigBuilder_ != null) { + return pscConfigBuilder_.getMessageOrBuilder(); + } else { + return pscConfig_ == null + ? com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance() + : pscConfig_; + } + } + /** + * + * + *
+     * Output only. Customer configuration for where the endpoint is created and
+     * accessed from.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConfig, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder> + getPscConfigFieldBuilder() { + if (pscConfigBuilder_ == null) { + pscConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.PscConfig, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder, + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder>( + getPscConfig(), getParentForChildren(), isClean()); + pscConfig_ = null; + } + return pscConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) + private static final com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint(); + } + + public static com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveryEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DiscoveryEndpointOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DiscoveryEndpointOrBuilder.java new file mode 100644 index 000000000000..5e354a5980f6 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/DiscoveryEndpointOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface DiscoveryEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.DiscoveryEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+   * Output only. Address of the exposed Redis endpoint used by clients to
+   * connect to the service. The address could be either IP or hostname.
+   * 
+ * + * string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+   * Output only. The port number of the exposed Redis endpoint.
+   * 
+ * + * int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The port. + */ + int getPort(); + + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pscConfig field is set. + */ + boolean hasPscConfig(); + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pscConfig. + */ + com.google.cloud.redis.cluster.v1beta1.PscConfig getPscConfig(); + /** + * + * + *
+   * Output only. Customer configuration for where the endpoint is created and
+   * accessed from.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder getPscConfigOrBuilder(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteUserLinkRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterRequest.java similarity index 70% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteUserLinkRequest.java rename to java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterRequest.java index 392c483be4a9..1b47ac0a0ff3 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DeleteUserLinkRequest.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterRequest.java @@ -14,52 +14,52 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto -package com.google.analytics.admin.v1alpha; +package com.google.cloud.redis.cluster.v1beta1; /** * * *
- * Request message for DeleteUserLink RPC.
+ * Request for [GetCluster][CloudRedis.GetCluster].
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.DeleteUserLinkRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.GetClusterRequest} */ -public final class DeleteUserLinkRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GetClusterRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.DeleteUserLinkRequest) - DeleteUserLinkRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.GetClusterRequest) + GetClusterRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use DeleteUserLinkRequest.newBuilder() to construct. - private DeleteUserLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetClusterRequest.newBuilder() to construct. + private GetClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteUserLinkRequest() { + private GetClusterRequest() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteUserLinkRequest(); + return new GetClusterRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_descriptor; + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.class, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder.class); + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -70,7 +70,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -95,7 +97,9 @@ public java.lang.String getName() { * * *
-   * Required. Example format: accounts/1234/userLinks/5678
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -156,11 +160,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.DeleteUserLinkRequest)) { + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.GetClusterRequest)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest other = - (com.google.analytics.admin.v1alpha.DeleteUserLinkRequest) obj; + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest other = + (com.google.cloud.redis.cluster.v1beta1.GetClusterRequest) obj; if (!getName().equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -181,71 +185,71 @@ public int hashCode() { return hash; } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom(byte[] data) + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -263,7 +267,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest prototype) { + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -281,31 +285,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for DeleteUserLink RPC.
+   * Request for [GetCluster][CloudRedis.GetCluster].
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.DeleteUserLinkRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.GetClusterRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.DeleteUserLinkRequest) - com.google.analytics.admin.v1alpha.DeleteUserLinkRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.GetClusterRequest) + com.google.cloud.redis.cluster.v1beta1.GetClusterRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_descriptor; + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.class, - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.Builder.class); + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.newBuilder() + // Construct using com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -322,18 +326,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_DeleteUserLinkRequest_descriptor; + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_GetClusterRequest_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.getDefaultInstance(); + public com.google.cloud.redis.cluster.v1beta1.GetClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest build() { - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest result = buildPartial(); + public com.google.cloud.redis.cluster.v1beta1.GetClusterRequest build() { + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -341,9 +345,9 @@ public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest buildPartial() { - com.google.analytics.admin.v1alpha.DeleteUserLinkRequest result = - new com.google.analytics.admin.v1alpha.DeleteUserLinkRequest(this); + public com.google.cloud.redis.cluster.v1beta1.GetClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1beta1.GetClusterRequest result = + new com.google.cloud.redis.cluster.v1beta1.GetClusterRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -351,7 +355,7 @@ public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest buildPartial() { return result; } - private void buildPartial0(com.google.analytics.admin.v1alpha.DeleteUserLinkRequest result) { + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.GetClusterRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; @@ -393,16 +397,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.DeleteUserLinkRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.DeleteUserLinkRequest) other); + if (other instanceof com.google.cloud.redis.cluster.v1beta1.GetClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.GetClusterRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.DeleteUserLinkRequest other) { - if (other == com.google.analytics.admin.v1alpha.DeleteUserLinkRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.GetClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1beta1.GetClusterRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -465,7 +469,9 @@ public Builder mergeFrom( * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -489,7 +495,9 @@ public java.lang.String getName() { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -513,7 +521,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -536,7 +546,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -555,7 +567,9 @@ public Builder clearName() { * * *
-     * Required. Example format: accounts/1234/userLinks/5678
+     * Required. Redis cluster resource name using the form:
+     *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -587,24 +601,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.DeleteUserLinkRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.GetClusterRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.DeleteUserLinkRequest) - private static final com.google.analytics.admin.v1alpha.DeleteUserLinkRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.GetClusterRequest) + private static final com.google.cloud.redis.cluster.v1beta1.GetClusterRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.DeleteUserLinkRequest(); + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.GetClusterRequest(); } - public static com.google.analytics.admin.v1alpha.DeleteUserLinkRequest getDefaultInstance() { + public static com.google.cloud.redis.cluster.v1beta1.GetClusterRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public DeleteUserLinkRequest parsePartialFrom( + public GetClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -623,17 +637,17 @@ public DeleteUserLinkRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.DeleteUserLinkRequest getDefaultInstanceForType() { + public com.google.cloud.redis.cluster.v1beta1.GetClusterRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterRequestOrBuilder.java new file mode 100644 index 000000000000..3db9de07d590 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/GetClusterRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface GetClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.GetClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Redis cluster resource name using the form:
+   *     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersRequest.java similarity index 69% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksRequest.java rename to java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersRequest.java index 126fc516333c..967a1c178a64 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksRequest.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersRequest.java @@ -14,30 +14,30 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto -package com.google.analytics.admin.v1alpha; +package com.google.cloud.redis.cluster.v1beta1; /** * * *
- * Request message for AuditUserLinks RPC.
+ * Request for [ListClusters][CloudRedis.ListClusters].
  * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.AuditUserLinksRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ListClustersRequest} */ -public final class AuditUserLinksRequest extends com.google.protobuf.GeneratedMessageV3 +public final class ListClustersRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.AuditUserLinksRequest) - AuditUserLinksRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.ListClustersRequest) + ListClustersRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use AuditUserLinksRequest.newBuilder() to construct. - private AuditUserLinksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListClustersRequest.newBuilder() to construct. + private ListClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AuditUserLinksRequest() { + private ListClustersRequest() { parent_ = ""; pageToken_ = ""; } @@ -45,22 +45,22 @@ private AuditUserLinksRequest() { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuditUserLinksRequest(); + return new ListClustersRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_descriptor; + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.AuditUserLinksRequest.class, - com.google.analytics.admin.v1alpha.AuditUserLinksRequest.Builder.class); + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.class, + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; @@ -71,7 +71,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -96,7 +98,9 @@ public java.lang.String getParent() { * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -124,10 +128,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The maximum number of user links to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 1000 user links will be returned.
-   * The maximum value is 5000; values above 5000 will be coerced to 5000.
+   * The maximum number of items to return.
+   *
+   * If not specified, a default value of 1000 will be used by the service.
+   * Regardless of the page_size value, the response may include a partial list
+   * and a caller should only rely on response's
+   * [`next_page_token`][google.cloud.redis.cluster.v1beta1.ListClustersResponse.next_page_token]
+   * to determine if there are more clusters left to be queried.
    * 
* * int32 page_size = 2; @@ -147,10 +154,8 @@ public int getPageSize() { * * *
-   * A page token, received from a previous `AuditUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `AuditUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; @@ -173,10 +178,8 @@ public java.lang.String getPageToken() { * * *
-   * A page token, received from a previous `AuditUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `AuditUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; @@ -247,11 +250,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.admin.v1alpha.AuditUserLinksRequest)) { + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.ListClustersRequest)) { return super.equals(obj); } - com.google.analytics.admin.v1alpha.AuditUserLinksRequest other = - (com.google.analytics.admin.v1alpha.AuditUserLinksRequest) obj; + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest other = + (com.google.cloud.redis.cluster.v1beta1.ListClustersRequest) obj; if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; @@ -278,71 +281,71 @@ public int hashCode() { return hash; } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom(byte[] data) + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseDelimitedFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest parseFrom( + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -360,7 +363,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.analytics.admin.v1alpha.AuditUserLinksRequest prototype) { + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -378,31 +381,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for AuditUserLinks RPC.
+   * Request for [ListClusters][CloudRedis.ListClusters].
    * 
* - * Protobuf type {@code google.analytics.admin.v1alpha.AuditUserLinksRequest} + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ListClustersRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.AuditUserLinksRequest) - com.google.analytics.admin.v1alpha.AuditUserLinksRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.ListClustersRequest) + com.google.cloud.redis.cluster.v1beta1.ListClustersRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_descriptor; + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_fieldAccessorTable + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.admin.v1alpha.AuditUserLinksRequest.class, - com.google.analytics.admin.v1alpha.AuditUserLinksRequest.Builder.class); + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.class, + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.Builder.class); } - // Construct using com.google.analytics.admin.v1alpha.AuditUserLinksRequest.newBuilder() + // Construct using com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -421,18 +424,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.analytics.admin.v1alpha.AnalyticsAdminProto - .internal_static_google_analytics_admin_v1alpha_AuditUserLinksRequest_descriptor; + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersRequest_descriptor; } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksRequest getDefaultInstanceForType() { - return com.google.analytics.admin.v1alpha.AuditUserLinksRequest.getDefaultInstance(); + public com.google.cloud.redis.cluster.v1beta1.ListClustersRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksRequest build() { - com.google.analytics.admin.v1alpha.AuditUserLinksRequest result = buildPartial(); + public com.google.cloud.redis.cluster.v1beta1.ListClustersRequest build() { + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -440,9 +443,9 @@ public com.google.analytics.admin.v1alpha.AuditUserLinksRequest build() { } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksRequest buildPartial() { - com.google.analytics.admin.v1alpha.AuditUserLinksRequest result = - new com.google.analytics.admin.v1alpha.AuditUserLinksRequest(this); + public com.google.cloud.redis.cluster.v1beta1.ListClustersRequest buildPartial() { + com.google.cloud.redis.cluster.v1beta1.ListClustersRequest result = + new com.google.cloud.redis.cluster.v1beta1.ListClustersRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -450,7 +453,7 @@ public com.google.analytics.admin.v1alpha.AuditUserLinksRequest buildPartial() { return result; } - private void buildPartial0(com.google.analytics.admin.v1alpha.AuditUserLinksRequest result) { + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.ListClustersRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; @@ -498,16 +501,16 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.admin.v1alpha.AuditUserLinksRequest) { - return mergeFrom((com.google.analytics.admin.v1alpha.AuditUserLinksRequest) other); + if (other instanceof com.google.cloud.redis.cluster.v1beta1.ListClustersRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.ListClustersRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.admin.v1alpha.AuditUserLinksRequest other) { - if (other == com.google.analytics.admin.v1alpha.AuditUserLinksRequest.getDefaultInstance()) + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.ListClustersRequest other) { + if (other == com.google.cloud.redis.cluster.v1beta1.ListClustersRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; @@ -590,7 +593,9 @@ public Builder mergeFrom( * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -614,7 +619,9 @@ public java.lang.String getParent() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -638,7 +645,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -661,7 +670,9 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -680,7 +691,9 @@ public Builder clearParent() { * * *
-     * Required. Example format: accounts/1234
+     * Required. The resource name of the cluster location using the form:
+     *     `projects/{project_id}/locations/{location_id}`
+     * where `location_id` refers to a GCP region.
      * 
* * @@ -706,10 +719,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The maximum number of user links to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 1000 user links will be returned.
-     * The maximum value is 5000; values above 5000 will be coerced to 5000.
+     * The maximum number of items to return.
+     *
+     * If not specified, a default value of 1000 will be used by the service.
+     * Regardless of the page_size value, the response may include a partial list
+     * and a caller should only rely on response's
+     * [`next_page_token`][google.cloud.redis.cluster.v1beta1.ListClustersResponse.next_page_token]
+     * to determine if there are more clusters left to be queried.
      * 
* * int32 page_size = 2; @@ -724,10 +740,13 @@ public int getPageSize() { * * *
-     * The maximum number of user links to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 1000 user links will be returned.
-     * The maximum value is 5000; values above 5000 will be coerced to 5000.
+     * The maximum number of items to return.
+     *
+     * If not specified, a default value of 1000 will be used by the service.
+     * Regardless of the page_size value, the response may include a partial list
+     * and a caller should only rely on response's
+     * [`next_page_token`][google.cloud.redis.cluster.v1beta1.ListClustersResponse.next_page_token]
+     * to determine if there are more clusters left to be queried.
      * 
* * int32 page_size = 2; @@ -746,10 +765,13 @@ public Builder setPageSize(int value) { * * *
-     * The maximum number of user links to return.
-     * The service may return fewer than this value.
-     * If unspecified, at most 1000 user links will be returned.
-     * The maximum value is 5000; values above 5000 will be coerced to 5000.
+     * The maximum number of items to return.
+     *
+     * If not specified, a default value of 1000 will be used by the service.
+     * Regardless of the page_size value, the response may include a partial list
+     * and a caller should only rely on response's
+     * [`next_page_token`][google.cloud.redis.cluster.v1beta1.ListClustersResponse.next_page_token]
+     * to determine if there are more clusters left to be queried.
      * 
* * int32 page_size = 2; @@ -768,10 +790,8 @@ public Builder clearPageSize() { * * *
-     * A page token, received from a previous `AuditUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `AuditUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -793,10 +813,8 @@ public java.lang.String getPageToken() { * * *
-     * A page token, received from a previous `AuditUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `AuditUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -818,10 +836,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * A page token, received from a previous `AuditUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `AuditUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -842,10 +858,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * A page token, received from a previous `AuditUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `AuditUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -862,10 +876,8 @@ public Builder clearPageToken() { * * *
-     * A page token, received from a previous `AuditUserLinks` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `AuditUserLinks` must
-     * match the call that provided the page token.
+     * The `next_page_token` value returned from a previous
+     * [ListClusters][CloudRedis.ListClusters] request, if any.
      * 
* * string page_token = 3; @@ -895,24 +907,24 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.AuditUserLinksRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.ListClustersRequest) } - // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.AuditUserLinksRequest) - private static final com.google.analytics.admin.v1alpha.AuditUserLinksRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.ListClustersRequest) + private static final com.google.cloud.redis.cluster.v1beta1.ListClustersRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.AuditUserLinksRequest(); + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.ListClustersRequest(); } - public static com.google.analytics.admin.v1alpha.AuditUserLinksRequest getDefaultInstance() { + public static com.google.cloud.redis.cluster.v1beta1.ListClustersRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public AuditUserLinksRequest parsePartialFrom( + public ListClustersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -931,17 +943,17 @@ public AuditUserLinksRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.admin.v1alpha.AuditUserLinksRequest getDefaultInstanceForType() { + public com.google.cloud.redis.cluster.v1beta1.ListClustersRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersRequestOrBuilder.java similarity index 57% rename from java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksRequestOrBuilder.java rename to java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersRequestOrBuilder.java index dfd8bda291dd..5b19bcae8862 100644 --- a/java-analytics-admin/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AuditUserLinksRequestOrBuilder.java +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersRequestOrBuilder.java @@ -14,20 +14,22 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/analytics/admin/v1alpha/analytics_admin.proto +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto -package com.google.analytics.admin.v1alpha; +package com.google.cloud.redis.cluster.v1beta1; -public interface AuditUserLinksRequestOrBuilder +public interface ListClustersRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.AuditUserLinksRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.ListClustersRequest) com.google.protobuf.MessageOrBuilder { /** * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -41,7 +43,9 @@ public interface AuditUserLinksRequestOrBuilder * * *
-   * Required. Example format: accounts/1234
+   * Required. The resource name of the cluster location using the form:
+   *     `projects/{project_id}/locations/{location_id}`
+   * where `location_id` refers to a GCP region.
    * 
* * @@ -56,10 +60,13 @@ public interface AuditUserLinksRequestOrBuilder * * *
-   * The maximum number of user links to return.
-   * The service may return fewer than this value.
-   * If unspecified, at most 1000 user links will be returned.
-   * The maximum value is 5000; values above 5000 will be coerced to 5000.
+   * The maximum number of items to return.
+   *
+   * If not specified, a default value of 1000 will be used by the service.
+   * Regardless of the page_size value, the response may include a partial list
+   * and a caller should only rely on response's
+   * [`next_page_token`][google.cloud.redis.cluster.v1beta1.ListClustersResponse.next_page_token]
+   * to determine if there are more clusters left to be queried.
    * 
* * int32 page_size = 2; @@ -72,10 +79,8 @@ public interface AuditUserLinksRequestOrBuilder * * *
-   * A page token, received from a previous `AuditUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `AuditUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; @@ -87,10 +92,8 @@ public interface AuditUserLinksRequestOrBuilder * * *
-   * A page token, received from a previous `AuditUserLinks` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `AuditUserLinks` must
-   * match the call that provided the page token.
+   * The `next_page_token` value returned from a previous
+   * [ListClusters][CloudRedis.ListClusters] request, if any.
    * 
* * string page_token = 3; diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersResponse.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersResponse.java new file mode 100644 index 000000000000..454330359a5a --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersResponse.java @@ -0,0 +1,1634 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Response for [ListClusters][CloudRedis.ListClusters].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ListClustersResponse} + */ +public final class ListClustersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.ListClustersResponse) + ListClustersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListClustersResponse.newBuilder() to construct. + private ListClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListClustersResponse() { + clusters_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListClustersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.class, + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.Builder.class); + } + + public static final int CLUSTERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List clusters_; + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + @java.lang.Override + public java.util.List getClustersList() { + return clusters_; + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + @java.lang.Override + public java.util.List + getClustersOrBuilderList() { + return clusters_; + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + @java.lang.Override + public int getClustersCount() { + return clusters_.size(); + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster getClusters(int index) { + return clusters_.get(index); + } + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClustersOrBuilder(int index) { + return clusters_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < clusters_.size(); i++) { + output.writeMessage(1, clusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < clusters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.ListClustersResponse)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse other = + (com.google.cloud.redis.cluster.v1beta1.ListClustersResponse) obj; + + if (!getClustersList().equals(other.getClustersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getClustersCount() > 0) { + hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; + hash = (53 * hash) + getClustersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for [ListClusters][CloudRedis.ListClusters].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.ListClustersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.ListClustersResponse) + com.google.cloud.redis.cluster.v1beta1.ListClustersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.class, + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (clustersBuilder_ == null) { + clusters_ = java.util.Collections.emptyList(); + } else { + clusters_ = null; + clustersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_ListClustersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ListClustersResponse getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ListClustersResponse build() { + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ListClustersResponse buildPartial() { + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse result = + new com.google.cloud.redis.cluster.v1beta1.ListClustersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.redis.cluster.v1beta1.ListClustersResponse result) { + if (clustersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + clusters_ = java.util.Collections.unmodifiableList(clusters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.clusters_ = clusters_; + } else { + result.clusters_ = clustersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.ListClustersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.ListClustersResponse) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.ListClustersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.ListClustersResponse other) { + if (other == com.google.cloud.redis.cluster.v1beta1.ListClustersResponse.getDefaultInstance()) + return this; + if (clustersBuilder_ == null) { + if (!other.clusters_.isEmpty()) { + if (clusters_.isEmpty()) { + clusters_ = other.clusters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClustersIsMutable(); + clusters_.addAll(other.clusters_); + } + onChanged(); + } + } else { + if (!other.clusters_.isEmpty()) { + if (clustersBuilder_.isEmpty()) { + clustersBuilder_.dispose(); + clustersBuilder_ = null; + clusters_ = other.clusters_; + bitField0_ = (bitField0_ & ~0x00000001); + clustersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getClustersFieldBuilder() + : null; + } else { + clustersBuilder_.addAllMessages(other.clusters_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.redis.cluster.v1beta1.Cluster m = + input.readMessage( + com.google.cloud.redis.cluster.v1beta1.Cluster.parser(), extensionRegistry); + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(m); + } else { + clustersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List clusters_ = + java.util.Collections.emptyList(); + + private void ensureClustersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + clusters_ = + new java.util.ArrayList(clusters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder> + clustersBuilder_; + + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public java.util.List getClustersList() { + if (clustersBuilder_ == null) { + return java.util.Collections.unmodifiableList(clusters_); + } else { + return clustersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public int getClustersCount() { + if (clustersBuilder_ == null) { + return clusters_.size(); + } else { + return clustersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster getClusters(int index) { + if (clustersBuilder_ == null) { + return clusters_.get(index); + } else { + return clustersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder setClusters(int index, com.google.cloud.redis.cluster.v1beta1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.set(index, value); + onChanged(); + } else { + clustersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder setClusters( + int index, com.google.cloud.redis.cluster.v1beta1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.set(index, builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder addClusters(com.google.cloud.redis.cluster.v1beta1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.add(value); + onChanged(); + } else { + clustersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder addClusters(int index, com.google.cloud.redis.cluster.v1beta1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.add(index, value); + onChanged(); + } else { + clustersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder addClusters( + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder addClusters( + int index, com.google.cloud.redis.cluster.v1beta1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(index, builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder addAllClusters( + java.lang.Iterable values) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clusters_); + onChanged(); + } else { + clustersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder clearClusters() { + if (clustersBuilder_ == null) { + clusters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + clustersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public Builder removeClusters(int index) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.remove(index); + onChanged(); + } else { + clustersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.Builder getClustersBuilder(int index) { + return getClustersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClustersOrBuilder(int index) { + if (clustersBuilder_ == null) { + return clusters_.get(index); + } else { + return clustersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public java.util.List + getClustersOrBuilderList() { + if (clustersBuilder_ != null) { + return clustersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(clusters_); + } + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.Builder addClustersBuilder() { + return getClustersFieldBuilder() + .addBuilder(com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.Builder addClustersBuilder(int index) { + return getClustersFieldBuilder() + .addBuilder(index, com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance()); + } + /** + * + * + *
+     * A list of Redis clusters in the project in the specified location,
+     * or across all locations.
+     *
+     * If the `location_id` in the parent field of the request is "-", all regions
+     * available to the project are queried, and the results aggregated.
+     * If in such an aggregated query a location is unavailable, a placeholder
+     * Redis entry is included in the response with the `name` field set to a
+     * value of the form
+     * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+     * `status` field set to ERROR and `status_message` field set to "location not
+     * available for ListClusters".
+     * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + public java.util.List + getClustersBuilderList() { + return getClustersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder> + getClustersFieldBuilder() { + if (clustersBuilder_ == null) { + clustersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder>( + clusters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + clusters_ = null; + } + return clustersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.ListClustersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.ListClustersResponse) + private static final com.google.cloud.redis.cluster.v1beta1.ListClustersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.ListClustersResponse(); + } + + public static com.google.cloud.redis.cluster.v1beta1.ListClustersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListClustersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ListClustersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersResponseOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersResponseOrBuilder.java new file mode 100644 index 000000000000..2fcd4b2df646 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/ListClustersResponseOrBuilder.java @@ -0,0 +1,205 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface ListClustersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.ListClustersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + java.util.List getClustersList(); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + com.google.cloud.redis.cluster.v1beta1.Cluster getClusters(int index); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + int getClustersCount(); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + java.util.List + getClustersOrBuilderList(); + /** + * + * + *
+   * A list of Redis clusters in the project in the specified location,
+   * or across all locations.
+   *
+   * If the `location_id` in the parent field of the request is "-", all regions
+   * available to the project are queried, and the results aggregated.
+   * If in such an aggregated query a location is unavailable, a placeholder
+   * Redis entry is included in the response with the `name` field set to a
+   * value of the form
+   * `projects/{project_id}/locations/{location_id}/clusters/`- and the
+   * `status` field set to ERROR and `status_message` field set to "location not
+   * available for ListClusters".
+   * 
+ * + * repeated .google.cloud.redis.cluster.v1beta1.Cluster clusters = 1; + */ + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClustersOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/LocationName.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/LocationName.java new file mode 100644 index 000000000000..056a09e86dd1 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/OperationMetadata.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/OperationMetadata.java new file mode 100644 index 000000000000..8da7f9bec83d --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/OperationMetadata.java @@ -0,0 +1,1829 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Pre-defined metadata fields.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.OperationMetadata.class, + com.google.cloud.redis.cluster.v1beta1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.OperationMetadata other = + (com.google.cloud.redis.cluster.v1beta1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Pre-defined metadata fields.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.OperationMetadata) + com.google.cloud.redis.cluster.v1beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.OperationMetadata.class, + com.google.cloud.redis.cluster.v1beta1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.OperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.OperationMetadata build() { + com.google.cloud.redis.cluster.v1beta1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.OperationMetadata buildPartial() { + com.google.cloud.redis.cluster.v1beta1.OperationMetadata result = + new com.google.cloud.redis.cluster.v1beta1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.OperationMetadata) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.OperationMetadata other) { + if (other == com.google.cloud.redis.cluster.v1beta1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.OperationMetadata) + private static final com.google.cloud.redis.cluster.v1beta1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.OperationMetadata(); + } + + public static com.google.cloud.redis.cluster.v1beta1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/OperationMetadataOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..04313b94c8d7 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConfig.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConfig.java new file mode 100644 index 000000000000..d159ff21a589 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConfig.java @@ -0,0 +1,622 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** Protobuf type {@code google.cloud.redis.cluster.v1beta1.PscConfig} */ +public final class PscConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.PscConfig) + PscConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscConfig.newBuilder() to construct. + private PscConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PscConfig() { + network_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.PscConfig.class, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, network_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, network_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.PscConfig)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.PscConfig other = + (com.google.cloud.redis.cluster.v1beta1.PscConfig) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1beta1.PscConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.redis.cluster.v1beta1.PscConfig} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.PscConfig) + com.google.cloud.redis.cluster.v1beta1.PscConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.PscConfig.class, + com.google.cloud.redis.cluster.v1beta1.PscConfig.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.PscConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfig getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfig build() { + com.google.cloud.redis.cluster.v1beta1.PscConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfig buildPartial() { + com.google.cloud.redis.cluster.v1beta1.PscConfig result = + new com.google.cloud.redis.cluster.v1beta1.PscConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.PscConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.PscConfig) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.PscConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.PscConfig other) { + if (other == com.google.cloud.redis.cluster.v1beta1.PscConfig.getDefaultInstance()) + return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network where the IP address of the discovery endpoint will
+     * be reserved, in the form of
+     * projects/{network_project}/global/networks/{network_id}.
+     * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.PscConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.PscConfig) + private static final com.google.cloud.redis.cluster.v1beta1.PscConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.PscConfig(); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConfigOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConfigOrBuilder.java new file mode 100644 index 000000000000..31e73ad8670c --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface PscConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.PscConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Required. The network where the IP address of the discovery endpoint will
+   * be reserved, in the form of
+   * projects/{network_project}/global/networks/{network_id}.
+   * 
+ * + * string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConnection.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConnection.java new file mode 100644 index 000000000000..ad0f9a54e355 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConnection.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Details of consumer resources in a PSC connection.
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.PscConnection} + */ +public final class PscConnection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.PscConnection) + PscConnectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PscConnection.newBuilder() to construct. + private PscConnection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PscConnection() { + pscConnectionId_ = ""; + address_ = ""; + forwardingRule_ = ""; + projectId_ = ""; + network_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PscConnection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.PscConnection.class, + com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder.class); + } + + public static final int PSC_CONNECTION_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pscConnectionId_ = ""; + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscConnectionId. + */ + @java.lang.Override + public java.lang.String getPscConnectionId() { + java.lang.Object ref = pscConnectionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pscConnectionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscConnectionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPscConnectionIdBytes() { + java.lang.Object ref = pscConnectionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscConnectionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORWARDING_RULE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object forwardingRule_ = ""; + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The forwardingRule. + */ + @java.lang.Override + public java.lang.String getForwardingRule() { + java.lang.Object ref = forwardingRule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + forwardingRule_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for forwardingRule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getForwardingRuleBytes() { + java.lang.Object ref = forwardingRule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + forwardingRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscConnectionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pscConnectionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, forwardingRule_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, network_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscConnectionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pscConnectionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, forwardingRule_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, network_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.PscConnection)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.PscConnection other = + (com.google.cloud.redis.cluster.v1beta1.PscConnection) obj; + + if (!getPscConnectionId().equals(other.getPscConnectionId())) return false; + if (!getAddress().equals(other.getAddress())) return false; + if (!getForwardingRule().equals(other.getForwardingRule())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PSC_CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getPscConnectionId().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + FORWARDING_RULE_FIELD_NUMBER; + hash = (53 * hash) + getForwardingRule().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.redis.cluster.v1beta1.PscConnection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of consumer resources in a PSC connection.
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.PscConnection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.PscConnection) + com.google.cloud.redis.cluster.v1beta1.PscConnectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.PscConnection.class, + com.google.cloud.redis.cluster.v1beta1.PscConnection.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.PscConnection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pscConnectionId_ = ""; + address_ = ""; + forwardingRule_ = ""; + projectId_ = ""; + network_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_PscConnection_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConnection getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.PscConnection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConnection build() { + com.google.cloud.redis.cluster.v1beta1.PscConnection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConnection buildPartial() { + com.google.cloud.redis.cluster.v1beta1.PscConnection result = + new com.google.cloud.redis.cluster.v1beta1.PscConnection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.PscConnection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pscConnectionId_ = pscConnectionId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.forwardingRule_ = forwardingRule_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.network_ = network_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.PscConnection) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.PscConnection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.PscConnection other) { + if (other == com.google.cloud.redis.cluster.v1beta1.PscConnection.getDefaultInstance()) + return this; + if (!other.getPscConnectionId().isEmpty()) { + pscConnectionId_ = other.pscConnectionId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getForwardingRule().isEmpty()) { + forwardingRule_ = other.forwardingRule_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pscConnectionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + forwardingRule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object pscConnectionId_ = ""; + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscConnectionId. + */ + public java.lang.String getPscConnectionId() { + java.lang.Object ref = pscConnectionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pscConnectionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscConnectionId. + */ + public com.google.protobuf.ByteString getPscConnectionIdBytes() { + java.lang.Object ref = pscConnectionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscConnectionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pscConnectionId to set. + * @return This builder for chaining. + */ + public Builder setPscConnectionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pscConnectionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPscConnectionId() { + pscConnectionId_ = getDefaultInstance().getPscConnectionId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The PSC connection id of the forwarding rule connected to the
+     * service attachment.
+     * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pscConnectionId to set. + * @return This builder for chaining. + */ + public Builder setPscConnectionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pscConnectionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + address_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP allocated on the consumer network for the PSC
+     * forwarding rule.
+     * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + address_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object forwardingRule_ = ""; + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The forwardingRule. + */ + public java.lang.String getForwardingRule() { + java.lang.Object ref = forwardingRule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + forwardingRule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for forwardingRule. + */ + public com.google.protobuf.ByteString getForwardingRuleBytes() { + java.lang.Object ref = forwardingRule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + forwardingRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The forwardingRule to set. + * @return This builder for chaining. + */ + public Builder setForwardingRule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + forwardingRule_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearForwardingRule() { + forwardingRule_ = getDefaultInstance().getForwardingRule(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the consumer side forwarding rule.
+     * Example:
+     * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+     * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for forwardingRule to set. + * @return This builder for chaining. + */ + public Builder setForwardingRuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + forwardingRule_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The consumer project_id where the forwarding rule is created
+     * from.
+     * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The consumer network where the IP address resides, in the form of
+     * projects/{project_id}/global/networks/{network_id}.
+     * 
+ * + * string network = 5; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.PscConnection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.PscConnection) + private static final com.google.cloud.redis.cluster.v1beta1.PscConnection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.PscConnection(); + } + + public static com.google.cloud.redis.cluster.v1beta1.PscConnection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscConnection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.PscConnection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConnectionOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConnectionOrBuilder.java new file mode 100644 index 000000000000..93adf1a8ec7c --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/PscConnectionOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface PscConnectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.PscConnection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscConnectionId. + */ + java.lang.String getPscConnectionId(); + /** + * + * + *
+   * Output only. The PSC connection id of the forwarding rule connected to the
+   * service attachment.
+   * 
+ * + * string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscConnectionId. + */ + com.google.protobuf.ByteString getPscConnectionIdBytes(); + + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+   * Output only. The IP allocated on the consumer network for the PSC
+   * forwarding rule.
+   * 
+ * + * string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The forwardingRule. + */ + java.lang.String getForwardingRule(); + /** + * + * + *
+   * Output only. The URI of the consumer side forwarding rule.
+   * Example:
+   * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
+   * 
+ * + * string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for forwardingRule. + */ + com.google.protobuf.ByteString getForwardingRuleBytes(); + + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Output only. The consumer project_id where the forwarding rule is created
+   * from.
+   * 
+ * + * string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The consumer network where the IP address resides, in the form of
+   * projects/{project_id}/global/networks/{network_id}.
+   * 
+ * + * string network = 5; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/TransitEncryptionMode.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/TransitEncryptionMode.java new file mode 100644 index 000000000000..79405bddc929 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/TransitEncryptionMode.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Available mode of in-transit encryption.
+ * 
+ * + * Protobuf enum {@code google.cloud.redis.cluster.v1beta1.TransitEncryptionMode} + */ +public enum TransitEncryptionMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * In-transit encryption not set.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + */ + TRANSIT_ENCRYPTION_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * In-transit encryption disabled.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + */ + TRANSIT_ENCRYPTION_MODE_DISABLED(1), + /** + * + * + *
+   * Use server managed encryption for in-transit encryption.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; + */ + TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * In-transit encryption not set.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + */ + public static final int TRANSIT_ENCRYPTION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * In-transit encryption disabled.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + */ + public static final int TRANSIT_ENCRYPTION_MODE_DISABLED_VALUE = 1; + /** + * + * + *
+   * Use server managed encryption for in-transit encryption.
+   * 
+ * + * TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; + */ + public static final int TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransitEncryptionMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransitEncryptionMode forNumber(int value) { + switch (value) { + case 0: + return TRANSIT_ENCRYPTION_MODE_UNSPECIFIED; + case 1: + return TRANSIT_ENCRYPTION_MODE_DISABLED; + case 2: + return TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransitEncryptionMode findValueByNumber(int number) { + return TransitEncryptionMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final TransitEncryptionMode[] VALUES = values(); + + public static TransitEncryptionMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransitEncryptionMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.redis.cluster.v1beta1.TransitEncryptionMode) +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/UpdateClusterRequest.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/UpdateClusterRequest.java new file mode 100644 index 000000000000..9021c7c34482 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/UpdateClusterRequest.java @@ -0,0 +1,1258 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +/** + * + * + *
+ * Request for [UpdateCluster][CloudRedis.UpdateCluster].
+ * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.UpdateClusterRequest} + */ +public final class UpdateClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) + UpdateClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateClusterRequest.newBuilder() to construct. + private UpdateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateClusterRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_UpdateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_UpdateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int CLUSTER_FIELD_NUMBER = 2; + private com.google.cloud.redis.cluster.v1beta1.Cluster cluster_; + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + @java.lang.Override + public boolean hasCluster() { + return cluster_ != null; + } + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.Cluster getCluster() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClusterOrBuilder() { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (cluster_ != null) { + output.writeMessage(2, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (cluster_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest other = + (com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasCluster() != other.hasCluster()) return false; + if (hasCluster()) { + if (!getCluster().equals(other.getCluster())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasCluster()) { + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for [UpdateCluster][CloudRedis.UpdateCluster].
+   * 
+ * + * Protobuf type {@code google.cloud.redis.cluster.v1beta1.UpdateClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_UpdateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_UpdateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.class, + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterProto + .internal_static_google_cloud_redis_cluster_v1beta1_UpdateClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest getDefaultInstanceForType() { + return com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest build() { + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest buildPartial() { + com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest result = + new com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cluster_ = clusterBuilder_ == null ? cluster_ : clusterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) { + return mergeFrom((com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest other) { + if (other == com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasCluster()) { + mergeCluster(other.getCluster()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update. At least one path must be supplied in
+     * this field. The elements of the repeated paths field may only include these
+     * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+     *
+     *  *   `size_gb`
+     *  *   `replica_count`
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.redis.cluster.v1beta1.Cluster cluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder> + clusterBuilder_; + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + public boolean hasCluster() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster getCluster() { + if (clusterBuilder_ == null) { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } else { + return clusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.redis.cluster.v1beta1.Cluster value) { + if (clusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + } else { + clusterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster( + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder builderForValue) { + if (clusterBuilder_ == null) { + cluster_ = builderForValue.build(); + } else { + clusterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCluster(com.google.cloud.redis.cluster.v1beta1.Cluster value) { + if (clusterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && cluster_ != null + && cluster_ != com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance()) { + getClusterBuilder().mergeFrom(value); + } else { + cluster_ = value; + } + } else { + clusterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCluster() { + bitField0_ = (bitField0_ & ~0x00000002); + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.Cluster.Builder getClusterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClusterOrBuilder() { + if (clusterBuilder_ != null) { + return clusterBuilder_.getMessageOrBuilder(); + } else { + return cluster_ == null + ? com.google.cloud.redis.cluster.v1beta1.Cluster.getDefaultInstance() + : cluster_; + } + } + /** + * + * + *
+     * Required. Update description.
+     * Only fields specified in update_mask are updated.
+     * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder> + getClusterFieldBuilder() { + if (clusterBuilder_ == null) { + clusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.redis.cluster.v1beta1.Cluster, + com.google.cloud.redis.cluster.v1beta1.Cluster.Builder, + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder>( + getCluster(), getParentForChildren(), isClean()); + cluster_ = null; + } + return clusterBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Idempotent request UUID.
+     * 
+ * + * string request_id = 3; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) + private static final com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest(); + } + + public static com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/UpdateClusterRequestOrBuilder.java b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/UpdateClusterRequestOrBuilder.java new file mode 100644 index 000000000000..42ec31b37ea6 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/java/com/google/cloud/redis/cluster/v1beta1/UpdateClusterRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto + +package com.google.cloud.redis.cluster.v1beta1; + +public interface UpdateClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.redis.cluster.v1beta1.UpdateClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update. At least one path must be supplied in
+   * this field. The elements of the repeated paths field may only include these
+   * fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]:
+   *
+   *  *   `size_gb`
+   *  *   `replica_count`
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + boolean hasCluster(); + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + com.google.cloud.redis.cluster.v1beta1.Cluster getCluster(); + /** + * + * + *
+   * Required. Update description.
+   * Only fields specified in update_mask are updated.
+   * 
+ * + * + * .google.cloud.redis.cluster.v1beta1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.redis.cluster.v1beta1.ClusterOrBuilder getClusterOrBuilder(); + + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Idempotent request UUID.
+   * 
+ * + * string request_id = 3; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/proto/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/proto/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto new file mode 100644 index 000000000000..ee0c01c6cd40 --- /dev/null +++ b/java-redis-cluster/proto-google-cloud-redis-cluster-v1beta1/src/main/proto/google/cloud/redis/cluster/v1beta1/cloud_redis_cluster.proto @@ -0,0 +1,453 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.redis.cluster.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/redis/cluster/apiv1beta1/clusterpb;clusterpb"; +option java_multiple_files = true; +option java_outer_classname = "CloudRedisClusterProto"; +option java_package = "com.google.cloud.redis.cluster.v1beta1"; + +// Configures and manages Cloud Memorystore for Redis clusters +// +// Google Cloud Memorystore for Redis Cluster +// +// The `redis.googleapis.com` service implements the Google Cloud Memorystore +// for Redis API and defines the following resource model for managing Redis +// clusters: +// * The service works with a collection of cloud projects, named: `/projects/*` +// * Each project has a collection of available locations, named: `/locations/*` +// * Each location has a collection of Redis clusters, named: `/clusters/*` +// * As such, Redis clusters are resources of the form: +// `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}` +// +// Note that location_id must be a GCP `region`; for example: +// * `projects/redpepper-1290/locations/us-central1/clusters/my-redis` +// +// We use API version selector for Flex APIs +// * The versioning strategy is release-based versioning +// * Our backend CLH only deals with the superset version (called v1main) +// * Existing backend for Redis Gen1 and MRR is not touched. +// * More details in go/redis-flex-api-versioning +service CloudRedisCluster { + option (google.api.default_host) = "redis.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Redis clusters owned by a project in either the specified + // location (region) or all locations. + // + // The location should have the following format: + // + // * `projects/{project_id}/locations/{location_id}` + // + // If `location_id` is specified as `-` (wildcard), then all regions + // available to the project are queried, and the results are aggregated. + rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/clusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific Redis cluster. + rpc GetCluster(GetClusterRequest) returns (Cluster) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the metadata and configuration of a specific Redis cluster. + // + // Completed longrunning.Operation will contain the new cluster object + // in the response field. The returned operation is automatically deleted + // after a few hours, so there is no need to call DeleteOperation. + rpc UpdateCluster(UpdateClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{cluster.name=projects/*/locations/*/clusters/*}" + body: "cluster" + }; + option (google.api.method_signature) = "cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.protobuf.Any" + }; + } + + // Deletes a specific Redis cluster. Cluster stops serving and data is + // deleted. + rpc DeleteCluster(DeleteClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/clusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Any" + }; + } + + // Creates a Redis cluster based on the specified properties. + // The creation is executed asynchronously and callers may check the returned + // operation to track its progress. Once the operation is completed the Redis + // cluster will be fully functional. The completed longrunning.Operation will + // contain the new cluster object in the response field. + // + // The returned operation is automatically deleted after a few hours, so there + // is no need to call DeleteOperation. + rpc CreateCluster(CreateClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/clusters" + body: "cluster" + }; + option (google.api.method_signature) = "parent,cluster,cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "google.protobuf.Any" + }; + } +} + +// Available authorization mode of a Redis cluster. +enum AuthorizationMode { + // Not set. + AUTH_MODE_UNSPECIFIED = 0; + + // IAM basic authorization mode + AUTH_MODE_IAM_AUTH = 1; + + // Authorization disabled mode + AUTH_MODE_DISABLED = 2; +} + +// Available mode of in-transit encryption. +enum TransitEncryptionMode { + // In-transit encryption not set. + TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + + // In-transit encryption disabled. + TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + + // Use server managed encryption for in-transit encryption. + TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; +} + +// Request for [CreateCluster][CloudRedis.CreateCluster]. +message CreateClusterRequest { + // Required. The resource name of the cluster location using the form: + // `projects/{project_id}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The logical name of the Redis cluster in the customer project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project / location + string cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The cluster that is to be created. + Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; + + // Idempotent request UUID. + string request_id = 4; +} + +// Request for [ListClusters][CloudRedis.ListClusters]. +message ListClustersRequest { + // Required. The resource name of the cluster location using the form: + // `projects/{project_id}/locations/{location_id}` + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 1000 will be used by the service. + // Regardless of the page_size value, the response may include a partial list + // and a caller should only rely on response's + // [`next_page_token`][google.cloud.redis.cluster.v1beta1.ListClustersResponse.next_page_token] + // to determine if there are more clusters left to be queried. + int32 page_size = 2; + + // The `next_page_token` value returned from a previous + // [ListClusters][CloudRedis.ListClusters] request, if any. + string page_token = 3; +} + +// Response for [ListClusters][CloudRedis.ListClusters]. +message ListClustersResponse { + // A list of Redis clusters in the project in the specified location, + // or across all locations. + // + // If the `location_id` in the parent field of the request is "-", all regions + // available to the project are queried, and the results aggregated. + // If in such an aggregated query a location is unavailable, a placeholder + // Redis entry is included in the response with the `name` field set to a + // value of the form + // `projects/{project_id}/locations/{location_id}/clusters/`- and the + // `status` field set to ERROR and `status_message` field set to "location not + // available for ListClusters". + repeated Cluster clusters = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for [UpdateCluster][CloudRedis.UpdateCluster]. +message UpdateClusterRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field may only include these + // fields from [Cluster][google.cloud.redis.cluster.v1beta1.Cluster]: + // + // * `size_gb` + // * `replica_count` + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Update description. + // Only fields specified in update_mask are updated. + Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Idempotent request UUID. + string request_id = 3; +} + +// Request for [GetCluster][CloudRedis.GetCluster]. +message GetClusterRequest { + // Required. Redis cluster resource name using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "redis.googleapis.com/Cluster" } + ]; +} + +// Request for [DeleteCluster][CloudRedis.DeleteCluster]. +message DeleteClusterRequest { + // Required. Redis cluster resource name using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + // where `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "redis.googleapis.com/Cluster" } + ]; + + // Idempotent request UUID. + string request_id = 2; +} + +// A cluster instance. +message Cluster { + option (google.api.resource) = { + type: "redis.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" + }; + + // Represents additional information about the state of the cluster. + message StateInfo { + // Represents information about an updating cluster. + message UpdateInfo { + // Target number of shards for redis cluster + optional int32 target_shard_count = 1; + + // Target number of replica nodes per shard. + optional int32 target_replica_count = 2; + } + + oneof info { + // Describes ongoing update on the cluster when cluster state is UPDATING. + UpdateInfo update_info = 1; + } + } + + // Represents the different states of a Redis cluster. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // Redis cluster is being created. + CREATING = 1; + + // Redis cluster has been created and is fully usable. + ACTIVE = 2; + + // Redis cluster configuration is being updated. + UPDATING = 3; + + // Redis cluster is being deleted. + DELETING = 4; + } + + // Required. Unique name of the resource in this scope including project and + // location using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The timestamp associated with the cluster creation request. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of this cluster. + // Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System assigned, unique identifier for the cluster. + string uid = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The number of replica nodes per shard. + optional int32 replica_count = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The authorization mode of the Redis cluster. + // If not provided, auth feature is disabled for the cluster. + AuthorizationMode authorization_mode = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The in-transit encryption for the Redis cluster. + // If not provided, encryption is disabled for the cluster. + TransitEncryptionMode transit_encryption_mode = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Redis memory size in GB for the entire cluster. + optional int32 size_gb = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Number of shards for the Redis cluster. + optional int32 shard_count = 14 [(google.api.field_behavior) = REQUIRED]; + + // Required. Each PscConfig configures the consumer network where IPs will + // be designated to the cluster for client access through Private Service + // Connect Automation. Currently, only one PscConfig is supported. + repeated PscConfig psc_configs = 15 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Endpoints created on each given network, for Redis clients to + // connect to the cluster. Currently only one discovery endpoint is supported. + repeated DiscoveryEndpoint discovery_endpoints = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. PSC connections for discovery of the cluster topology and + // accessing the cluster. + repeated PscConnection psc_connections = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of the cluster. + StateInfo state_info = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +message PscConfig { + // Required. The network where the IP address of the discovery endpoint will + // be reserved, in the form of + // projects/{network_project}/global/networks/{network_id}. + string network = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Endpoints on each network, for Redis clients to connect to the cluster. +message DiscoveryEndpoint { + // Output only. Address of the exposed Redis endpoint used by clients to + // connect to the service. The address could be either IP or hostname. + string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The port number of the exposed Redis endpoint. + int32 port = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Customer configuration for where the endpoint is created and + // accessed from. + PscConfig psc_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Details of consumer resources in a PSC connection. +message PscConnection { + // Output only. The PSC connection id of the forwarding rule connected to the + // service attachment. + string psc_connection_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IP allocated on the consumer network for the PSC + // forwarding rule. + string address = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI of the consumer side forwarding rule. + // Example: + // projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + string forwarding_rule = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The consumer project_id where the forwarding rule is created + // from. + string project_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The consumer network where the IP address resides, in the form of + // projects/{project_id}/global/networks/{network_id}. + string network = 5; +} + +// Pre-defined metadata fields. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetCredentialsProvider.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..afecdbbbae25 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterSettings; +import com.google.cloud.redis.cluster.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings cloudRedisClusterSettings = + CloudRedisClusterSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudRedisClusterClient cloudRedisClusterClient = + CloudRedisClusterClient.create(cloudRedisClusterSettings); + } +} +// [END redis_v1_generated_CloudRedisCluster_Create_SetCredentialsProvider_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetCredentialsProvider1.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..bedc1551e733 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_Create_SetCredentialsProvider1_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings cloudRedisClusterSettings = + CloudRedisClusterSettings.newHttpJsonBuilder().build(); + CloudRedisClusterClient cloudRedisClusterClient = + CloudRedisClusterClient.create(cloudRedisClusterSettings); + } +} +// [END redis_v1_generated_CloudRedisCluster_Create_SetCredentialsProvider1_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetEndpoint.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..246df764240d --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_Create_SetEndpoint_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterSettings; +import com.google.cloud.redis.cluster.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings cloudRedisClusterSettings = + CloudRedisClusterSettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudRedisClusterClient cloudRedisClusterClient = + CloudRedisClusterClient.create(cloudRedisClusterSettings); + } +} +// [END redis_v1_generated_CloudRedisCluster_Create_SetEndpoint_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/AsyncCreateCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/AsyncCreateCluster.java new file mode 100644 index 000000000000..d8197e1e653b --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/AsyncCreateCluster.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_CreateCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateCluster { + + public static void main(String[] args) throws Exception { + asyncCreateCluster(); + } + + public static void asyncCreateCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setClusterId("clusterId561939637") + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudRedisClusterClient.createClusterCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_CreateCluster_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/AsyncCreateClusterLRO.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/AsyncCreateClusterLRO.java new file mode 100644 index 000000000000..38a5d99fa252 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/AsyncCreateClusterLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_CreateCluster_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1.LocationName; +import com.google.protobuf.Any; + +public class AsyncCreateClusterLRO { + + public static void main(String[] args) throws Exception { + asyncCreateClusterLRO(); + } + + public static void asyncCreateClusterLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setClusterId("clusterId561939637") + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudRedisClusterClient.createClusterOperationCallable().futureCall(request); + // Do something. + Cluster response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_CreateCluster_LRO_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateCluster.java new file mode 100644 index 000000000000..86b4f8de23c7 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateCluster.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_CreateCluster_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1.LocationName; + +public class SyncCreateCluster { + + public static void main(String[] args) throws Exception { + syncCreateCluster(); + } + + public static void syncCreateCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setClusterId("clusterId561939637") + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Cluster response = cloudRedisClusterClient.createClusterAsync(request).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_CreateCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateClusterLocationnameClusterString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateClusterLocationnameClusterString.java new file mode 100644 index 000000000000..422620972b4a --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateClusterLocationnameClusterString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_CreateCluster_LocationnameClusterString_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.LocationName; + +public class SyncCreateClusterLocationnameClusterString { + + public static void main(String[] args) throws Exception { + syncCreateClusterLocationnameClusterString(); + } + + public static void syncCreateClusterLocationnameClusterString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + Cluster response = + cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_CreateCluster_LocationnameClusterString_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateClusterStringClusterString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateClusterStringClusterString.java new file mode 100644 index 000000000000..fce925e18234 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/createcluster/SyncCreateClusterStringClusterString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_CreateCluster_StringClusterString_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.LocationName; + +public class SyncCreateClusterStringClusterString { + + public static void main(String[] args) throws Exception { + syncCreateClusterStringClusterString(); + } + + public static void syncCreateClusterStringClusterString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + Cluster response = + cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_CreateCluster_StringClusterString_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/AsyncDeleteCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/AsyncDeleteCluster.java new file mode 100644 index 000000000000..fab0ec19d1c1 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/AsyncDeleteCluster.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_DeleteCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.ClusterName; +import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteCluster { + + public static void main(String[] args) throws Exception { + asyncDeleteCluster(); + } + + public static void asyncDeleteCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudRedisClusterClient.deleteClusterCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_DeleteCluster_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchdeleteuserlinks/SyncBatchDeleteUserLinks.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/AsyncDeleteClusterLRO.java similarity index 51% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchdeleteuserlinks/SyncBatchDeleteUserLinks.java rename to java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/AsyncDeleteClusterLRO.java index f8f4f7fdb8aa..b3cbcefcdd26 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchdeleteuserlinks/SyncBatchDeleteUserLinks.java +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/AsyncDeleteClusterLRO.java @@ -14,37 +14,39 @@ * limitations under the License. */ -package com.google.analytics.admin.v1alpha.samples; +package com.google.cloud.redis.cluster.v1.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_sync] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; -import com.google.analytics.admin.v1alpha.DeleteUserLinkRequest; +// [START redis_v1_generated_CloudRedisCluster_DeleteCluster_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.ClusterName; +import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.protobuf.Any; import com.google.protobuf.Empty; -import java.util.ArrayList; -public class SyncBatchDeleteUserLinks { +public class AsyncDeleteClusterLRO { public static void main(String[] args) throws Exception { - syncBatchDeleteUserLinks(); + asyncDeleteClusterLRO(); } - public static void syncBatchDeleteUserLinks() throws Exception { + public static void asyncDeleteClusterLRO() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - BatchDeleteUserLinksRequest request = - BatchDeleteUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllRequests(new ArrayList()) + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setRequestId("requestId693933066") .build(); - analyticsAdminServiceClient.batchDeleteUserLinks(request); + OperationFuture future = + cloudRedisClusterClient.deleteClusterOperationCallable().futureCall(request); + // Do something. + future.get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_sync] +// [END redis_v1_generated_CloudRedisCluster_DeleteCluster_LRO_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteCluster.java new file mode 100644 index 000000000000..d20517b823de --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteCluster.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_DeleteCluster_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.ClusterName; +import com.google.cloud.redis.cluster.v1.DeleteClusterRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteCluster { + + public static void main(String[] args) throws Exception { + syncDeleteCluster(); + } + + public static void syncDeleteCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setRequestId("requestId693933066") + .build(); + cloudRedisClusterClient.deleteClusterAsync(request).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_DeleteCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteClusterClustername.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteClusterClustername.java new file mode 100644 index 000000000000..43f78241ea8e --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteClusterClustername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_DeleteCluster_Clustername_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.ClusterName; +import com.google.protobuf.Empty; + +public class SyncDeleteClusterClustername { + + public static void main(String[] args) throws Exception { + syncDeleteClusterClustername(); + } + + public static void syncDeleteClusterClustername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + cloudRedisClusterClient.deleteClusterAsync(name).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_DeleteCluster_Clustername_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteClusterString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteClusterString.java new file mode 100644 index 000000000000..722fe49c3714 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/deletecluster/SyncDeleteClusterString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_DeleteCluster_String_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.ClusterName; +import com.google.protobuf.Empty; + +public class SyncDeleteClusterString { + + public static void main(String[] args) throws Exception { + syncDeleteClusterString(); + } + + public static void syncDeleteClusterString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); + cloudRedisClusterClient.deleteClusterAsync(name).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_DeleteCluster_String_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/AsyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/AsyncGetCluster.java new file mode 100644 index 000000000000..2236a32bdf93 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/AsyncGetCluster.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.ClusterName; +import com.google.cloud.redis.cluster.v1.GetClusterRequest; + +public class AsyncGetCluster { + + public static void main(String[] args) throws Exception { + asyncGetCluster(); + } + + public static void asyncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterRequest request = + GetClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + ApiFuture future = cloudRedisClusterClient.getClusterCallable().futureCall(request); + // Do something. + Cluster response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetCluster_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetCluster.java new file mode 100644 index 000000000000..d4da1a426bfb --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetCluster.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetCluster_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.ClusterName; +import com.google.cloud.redis.cluster.v1.GetClusterRequest; + +public class SyncGetCluster { + + public static void main(String[] args) throws Exception { + syncGetCluster(); + } + + public static void syncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterRequest request = + GetClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + Cluster response = cloudRedisClusterClient.getCluster(request); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetClusterClustername.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetClusterClustername.java new file mode 100644 index 000000000000..b2281fd72544 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetClusterClustername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetCluster_Clustername_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.ClusterName; + +public class SyncGetClusterClustername { + + public static void main(String[] args) throws Exception { + syncGetClusterClustername(); + } + + public static void syncGetClusterClustername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Cluster response = cloudRedisClusterClient.getCluster(name); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetCluster_Clustername_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetClusterString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetClusterString.java new file mode 100644 index 000000000000..a4fbec265ed8 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getcluster/SyncGetClusterString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetCluster_String_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.ClusterName; + +public class SyncGetClusterString { + + public static void main(String[] args) throws Exception { + syncGetClusterString(); + } + + public static void syncGetClusterString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); + Cluster response = cloudRedisClusterClient.getCluster(name); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetCluster_String_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getlocation/AsyncGetLocation.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..b6c50aa2fa69 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + cloudRedisClusterClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetLocation_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getlocation/SyncGetLocation.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..0db8f0793210 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudRedisClusterClient.getLocation(request); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_GetLocation_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/AsyncListClusters.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/AsyncListClusters.java new file mode 100644 index 000000000000..6b821c91effa --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/AsyncListClusters.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListClusters_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1.LocationName; + +public class AsyncListClusters { + + public static void main(String[] args) throws Exception { + asyncListClusters(); + } + + public static void asyncListClusters() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudRedisClusterClient.listClustersPagedCallable().futureCall(request); + // Do something. + for (Cluster element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListClusters_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/AsyncListClustersPaged.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/AsyncListClustersPaged.java new file mode 100644 index 000000000000..54f674a26f5c --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/AsyncListClustersPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListClusters_Paged_async] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListClustersPaged { + + public static void main(String[] args) throws Exception { + asyncListClustersPaged(); + } + + public static void asyncListClustersPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListClustersResponse response = + cloudRedisClusterClient.listClustersCallable().call(request); + for (Cluster element : response.getClustersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListClusters_Paged_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClusters.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClusters.java new file mode 100644 index 000000000000..39b6d7960760 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClusters.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListClusters_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1.LocationName; + +public class SyncListClusters { + + public static void main(String[] args) throws Exception { + syncListClusters(); + } + + public static void syncListClusters() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Cluster element : cloudRedisClusterClient.listClusters(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListClusters_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClustersLocationname.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClustersLocationname.java new file mode 100644 index 000000000000..0252d3d62e58 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClustersLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListClusters_Locationname_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.LocationName; + +public class SyncListClustersLocationname { + + public static void main(String[] args) throws Exception { + syncListClustersLocationname(); + } + + public static void syncListClustersLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListClusters_Locationname_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClustersString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClustersString.java new file mode 100644 index 000000000000..6b79cf9bf561 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listclusters/SyncListClustersString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListClusters_String_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.LocationName; + +public class SyncListClustersString { + + public static void main(String[] args) throws Exception { + syncListClustersString(); + } + + public static void syncListClustersString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListClusters_String_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/AsyncListLocations.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..b9ee38db8432 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudRedisClusterClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListLocations_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/AsyncListLocationsPaged.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..6e5c84f145ec --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + cloudRedisClusterClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListLocations_Paged_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/SyncListLocations.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..572a8381cbe0 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudRedisClusterClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1_generated_CloudRedisCluster_ListLocations_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/AsyncUpdateCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/AsyncUpdateCluster.java new file mode 100644 index 000000000000..96c4f7d53d8b --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/AsyncUpdateCluster.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_UpdateCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.UpdateClusterRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateCluster { + + public static void main(String[] args) throws Exception { + asyncUpdateCluster(); + } + + public static void asyncUpdateCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudRedisClusterClient.updateClusterCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_UpdateCluster_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/AsyncUpdateClusterLRO.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/AsyncUpdateClusterLRO.java new file mode 100644 index 000000000000..e9d80d8410c4 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/AsyncUpdateClusterLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_UpdateCluster_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.UpdateClusterRequest; +import com.google.protobuf.Any; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateClusterLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateClusterLRO(); + } + + public static void asyncUpdateClusterLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudRedisClusterClient.updateClusterOperationCallable().futureCall(request); + // Do something. + Cluster response = future.get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_UpdateCluster_LRO_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/SyncUpdateCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/SyncUpdateCluster.java new file mode 100644 index 000000000000..074f0efd94cd --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/SyncUpdateCluster.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_UpdateCluster_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.cloud.redis.cluster.v1.UpdateClusterRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateCluster { + + public static void main(String[] args) throws Exception { + syncUpdateCluster(); + } + + public static void syncUpdateCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Cluster response = cloudRedisClusterClient.updateClusterAsync(request).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_UpdateCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/SyncUpdateClusterClusterFieldmask.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/SyncUpdateClusterClusterFieldmask.java new file mode 100644 index 000000000000..e57a5cc8bd6e --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudrediscluster/updatecluster/SyncUpdateClusterClusterFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisCluster_UpdateCluster_ClusterFieldmask_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1.Cluster; +import com.google.protobuf.FieldMask; + +public class SyncUpdateClusterClusterFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateClusterClusterFieldmask(); + } + + public static void syncUpdateClusterClusterFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Cluster response = cloudRedisClusterClient.updateClusterAsync(cluster, updateMask).get(); + } + } +} +// [END redis_v1_generated_CloudRedisCluster_UpdateCluster_ClusterFieldmask_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudredisclustersettings/getcluster/SyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudredisclustersettings/getcluster/SyncGetCluster.java new file mode 100644 index 000000000000..e782e67c629c --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/cloudredisclustersettings/getcluster/SyncGetCluster.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.samples; + +// [START redis_v1_generated_CloudRedisClusterSettings_GetCluster_sync] +import com.google.cloud.redis.cluster.v1.CloudRedisClusterSettings; +import java.time.Duration; + +public class SyncGetCluster { + + public static void main(String[] args) throws Exception { + syncGetCluster(); + } + + public static void syncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings.Builder cloudRedisClusterSettingsBuilder = + CloudRedisClusterSettings.newBuilder(); + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .setRetrySettings( + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudRedisClusterSettings cloudRedisClusterSettings = cloudRedisClusterSettingsBuilder.build(); + } +} +// [END redis_v1_generated_CloudRedisClusterSettings_GetCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/stub/cloudredisclusterstubsettings/getcluster/SyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/stub/cloudredisclusterstubsettings/getcluster/SyncGetCluster.java new file mode 100644 index 000000000000..25a1e36a4991 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1/stub/cloudredisclusterstubsettings/getcluster/SyncGetCluster.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1.stub.samples; + +// [START redis_v1_generated_CloudRedisClusterStubSettings_GetCluster_sync] +import com.google.cloud.redis.cluster.v1.stub.CloudRedisClusterStubSettings; +import java.time.Duration; + +public class SyncGetCluster { + + public static void main(String[] args) throws Exception { + syncGetCluster(); + } + + public static void syncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterStubSettings.Builder cloudRedisClusterSettingsBuilder = + CloudRedisClusterStubSettings.newBuilder(); + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .setRetrySettings( + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudRedisClusterStubSettings cloudRedisClusterSettings = + cloudRedisClusterSettingsBuilder.build(); + } +} +// [END redis_v1_generated_CloudRedisClusterStubSettings_GetCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetCredentialsProvider.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..36b95d2e9b39 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterSettings; +import com.google.cloud.redis.cluster.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings cloudRedisClusterSettings = + CloudRedisClusterSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudRedisClusterClient cloudRedisClusterClient = + CloudRedisClusterClient.create(cloudRedisClusterSettings); + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_Create_SetCredentialsProvider_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetCredentialsProvider1.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..47d9e02854aa --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_Create_SetCredentialsProvider1_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings cloudRedisClusterSettings = + CloudRedisClusterSettings.newHttpJsonBuilder().build(); + CloudRedisClusterClient cloudRedisClusterClient = + CloudRedisClusterClient.create(cloudRedisClusterSettings); + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_Create_SetCredentialsProvider1_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetEndpoint.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..2b356352b2e2 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_Create_SetEndpoint_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterSettings; +import com.google.cloud.redis.cluster.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings cloudRedisClusterSettings = + CloudRedisClusterSettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudRedisClusterClient cloudRedisClusterClient = + CloudRedisClusterClient.create(cloudRedisClusterSettings); + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_Create_SetEndpoint_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/AsyncCreateCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/AsyncCreateCluster.java new file mode 100644 index 000000000000..859c28bbefa5 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/AsyncCreateCluster.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_CreateCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateCluster { + + public static void main(String[] args) throws Exception { + asyncCreateCluster(); + } + + public static void asyncCreateCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setClusterId("clusterId561939637") + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudRedisClusterClient.createClusterCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_CreateCluster_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/AsyncCreateClusterLRO.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/AsyncCreateClusterLRO.java new file mode 100644 index 000000000000..32bc25b54667 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/AsyncCreateClusterLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_CreateCluster_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.LocationName; +import com.google.protobuf.Any; + +public class AsyncCreateClusterLRO { + + public static void main(String[] args) throws Exception { + asyncCreateClusterLRO(); + } + + public static void asyncCreateClusterLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setClusterId("clusterId561939637") + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudRedisClusterClient.createClusterOperationCallable().futureCall(request); + // Do something. + Cluster response = future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_CreateCluster_LRO_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchgetuserlinks/SyncBatchGetUserLinks.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateCluster.java similarity index 51% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchgetuserlinks/SyncBatchGetUserLinks.java rename to java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateCluster.java index 789092d39b9c..0cd1467c7bb2 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/batchgetuserlinks/SyncBatchGetUserLinks.java +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateCluster.java @@ -14,36 +14,36 @@ * limitations under the License. */ -package com.google.analytics.admin.v1alpha.samples; +package com.google.cloud.redis.cluster.v1beta1.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_sync] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksRequest; -import com.google.analytics.admin.v1alpha.BatchGetUserLinksResponse; -import java.util.ArrayList; +// [START redis_v1beta1_generated_CloudRedisCluster_CreateCluster_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.CreateClusterRequest; +import com.google.cloud.redis.cluster.v1beta1.LocationName; -public class SyncBatchGetUserLinks { +public class SyncCreateCluster { public static void main(String[] args) throws Exception { - syncBatchGetUserLinks(); + syncCreateCluster(); } - public static void syncBatchGetUserLinks() throws Exception { + public static void syncCreateCluster() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - BatchGetUserLinksRequest request = - BatchGetUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) - .addAllNames(new ArrayList()) + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setClusterId("clusterId561939637") + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") .build(); - BatchGetUserLinksResponse response = analyticsAdminServiceClient.batchGetUserLinks(request); + Cluster response = cloudRedisClusterClient.createClusterAsync(request).get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_sync] +// [END redis_v1beta1_generated_CloudRedisCluster_CreateCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateClusterLocationnameClusterString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateClusterLocationnameClusterString.java new file mode 100644 index 000000000000..a6a15e962f77 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateClusterLocationnameClusterString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_CreateCluster_LocationnameClusterString_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.LocationName; + +public class SyncCreateClusterLocationnameClusterString { + + public static void main(String[] args) throws Exception { + syncCreateClusterLocationnameClusterString(); + } + + public static void syncCreateClusterLocationnameClusterString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + Cluster response = + cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_CreateCluster_LocationnameClusterString_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateClusterStringClusterString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateClusterStringClusterString.java new file mode 100644 index 000000000000..d5dfe5d59102 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/createcluster/SyncCreateClusterStringClusterString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_CreateCluster_StringClusterString_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.LocationName; + +public class SyncCreateClusterStringClusterString { + + public static void main(String[] args) throws Exception { + syncCreateClusterStringClusterString(); + } + + public static void syncCreateClusterStringClusterString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + Cluster response = + cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_CreateCluster_StringClusterString_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/AsyncDeleteCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/AsyncDeleteCluster.java new file mode 100644 index 000000000000..591a63c66f56 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/AsyncDeleteCluster.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; +import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteCluster { + + public static void main(String[] args) throws Exception { + asyncDeleteCluster(); + } + + public static void asyncDeleteCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudRedisClusterClient.deleteClusterCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/AsyncDeleteClusterLRO.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/AsyncDeleteClusterLRO.java new file mode 100644 index 000000000000..7c75ed054b6a --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/AsyncDeleteClusterLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; +import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; + +public class AsyncDeleteClusterLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteClusterLRO(); + } + + public static void asyncDeleteClusterLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudRedisClusterClient.deleteClusterOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_LRO_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteCluster.java new file mode 100644 index 000000000000..451c02e2c73e --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteCluster.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; +import com.google.cloud.redis.cluster.v1beta1.DeleteClusterRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteCluster { + + public static void main(String[] args) throws Exception { + syncDeleteCluster(); + } + + public static void syncDeleteCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setRequestId("requestId693933066") + .build(); + cloudRedisClusterClient.deleteClusterAsync(request).get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteClusterClustername.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteClusterClustername.java new file mode 100644 index 000000000000..98557c3a4593 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteClusterClustername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_Clustername_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; +import com.google.protobuf.Empty; + +public class SyncDeleteClusterClustername { + + public static void main(String[] args) throws Exception { + syncDeleteClusterClustername(); + } + + public static void syncDeleteClusterClustername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + cloudRedisClusterClient.deleteClusterAsync(name).get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_Clustername_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/SyncUpdateUserLinkUserlink.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteClusterString.java similarity index 59% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/SyncUpdateUserLinkUserlink.java rename to java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteClusterString.java index 27f48244cce0..7c14afffa44e 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/updateuserlink/SyncUpdateUserLinkUserlink.java +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/deletecluster/SyncDeleteClusterString.java @@ -14,29 +14,29 @@ * limitations under the License. */ -package com.google.analytics.admin.v1alpha.samples; +package com.google.cloud.redis.cluster.v1beta1.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_Userlink_sync] -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLink; +// [START redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_String_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; +import com.google.protobuf.Empty; -public class SyncUpdateUserLinkUserlink { +public class SyncDeleteClusterString { public static void main(String[] args) throws Exception { - syncUpdateUserLinkUserlink(); + syncDeleteClusterString(); } - public static void syncUpdateUserLinkUserlink() throws Exception { + public static void syncDeleteClusterString() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - UserLink userLink = UserLink.newBuilder().build(); - UserLink response = analyticsAdminServiceClient.updateUserLink(userLink); + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); + cloudRedisClusterClient.deleteClusterAsync(name).get(); } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_Userlink_sync] +// [END redis_v1beta1_generated_CloudRedisCluster_DeleteCluster_String_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/AsyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/AsyncGetCluster.java new file mode 100644 index 000000000000..4fdd5f36abb6 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/AsyncGetCluster.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; +import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; + +public class AsyncGetCluster { + + public static void main(String[] args) throws Exception { + asyncGetCluster(); + } + + public static void asyncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterRequest request = + GetClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + ApiFuture future = cloudRedisClusterClient.getClusterCallable().futureCall(request); + // Do something. + Cluster response = future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetCluster_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetCluster.java new file mode 100644 index 000000000000..0e2aecfd6669 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetCluster.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetCluster_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; +import com.google.cloud.redis.cluster.v1beta1.GetClusterRequest; + +public class SyncGetCluster { + + public static void main(String[] args) throws Exception { + syncGetCluster(); + } + + public static void syncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetClusterRequest request = + GetClusterRequest.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + Cluster response = cloudRedisClusterClient.getCluster(request); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetClusterClustername.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetClusterClustername.java new file mode 100644 index 000000000000..485d2c7ea4b7 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetClusterClustername.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetCluster_Clustername_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; + +public class SyncGetClusterClustername { + + public static void main(String[] args) throws Exception { + syncGetClusterClustername(); + } + + public static void syncGetClusterClustername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Cluster response = cloudRedisClusterClient.getCluster(name); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetCluster_Clustername_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetClusterString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetClusterString.java new file mode 100644 index 000000000000..eba8eb71c1b9 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getcluster/SyncGetClusterString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetCluster_String_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.ClusterName; + +public class SyncGetClusterString { + + public static void main(String[] args) throws Exception { + syncGetClusterString(); + } + + public static void syncGetClusterString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString(); + Cluster response = cloudRedisClusterClient.getCluster(name); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetCluster_String_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getlocation/AsyncGetLocation.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..c0fa0a752636 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + cloudRedisClusterClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetLocation_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getlocation/SyncGetLocation.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..565075e08e14 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudRedisClusterClient.getLocation(request); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_GetLocation_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/AsyncAuditUserLinks.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/AsyncListClusters.java similarity index 55% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/AsyncAuditUserLinks.java rename to java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/AsyncListClusters.java index 0f3dac055e0c..c93603be4c73 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/AsyncAuditUserLinks.java +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/AsyncListClusters.java @@ -14,42 +14,41 @@ * limitations under the License. */ -package com.google.analytics.admin.v1alpha.samples; +package com.google.cloud.redis.cluster.v1beta1.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.AuditUserLink; -import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; +// [START redis_v1beta1_generated_CloudRedisCluster_ListClusters_async] import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1beta1.LocationName; -public class AsyncAuditUserLinks { +public class AsyncListClusters { public static void main(String[] args) throws Exception { - asyncAuditUserLinks(); + asyncListClusters(); } - public static void asyncAuditUserLinks() throws Exception { + public static void asyncListClusters() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); - ApiFuture future = - analyticsAdminServiceClient.auditUserLinksPagedCallable().futureCall(request); + ApiFuture future = + cloudRedisClusterClient.listClustersPagedCallable().futureCall(request); // Do something. - for (AuditUserLink element : future.get().iterateAll()) { + for (Cluster element : future.get().iterateAll()) { // doThingsWith(element); } } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async] +// [END redis_v1beta1_generated_CloudRedisCluster_ListClusters_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/AsyncAuditUserLinksPaged.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/AsyncListClustersPaged.java similarity index 57% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/AsyncAuditUserLinksPaged.java rename to java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/AsyncListClustersPaged.java index f2af084b3ed3..55e52efffcdd 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/AsyncAuditUserLinksPaged.java +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/AsyncListClustersPaged.java @@ -14,40 +14,39 @@ * limitations under the License. */ -package com.google.analytics.admin.v1alpha.samples; +package com.google.cloud.redis.cluster.v1beta1.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_Paged_async] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.AuditUserLink; -import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; -import com.google.analytics.admin.v1alpha.AuditUserLinksResponse; +// [START redis_v1beta1_generated_CloudRedisCluster_ListClusters_Paged_async] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1beta1.ListClustersResponse; +import com.google.cloud.redis.cluster.v1beta1.LocationName; import com.google.common.base.Strings; -public class AsyncAuditUserLinksPaged { +public class AsyncListClustersPaged { public static void main(String[] args) throws Exception { - asyncAuditUserLinksPaged(); + asyncListClustersPaged(); } - public static void asyncAuditUserLinksPaged() throws Exception { + public static void asyncListClustersPaged() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { - AuditUserLinksResponse response = - analyticsAdminServiceClient.auditUserLinksCallable().call(request); - for (AuditUserLink element : response.getUserLinksList()) { + ListClustersResponse response = + cloudRedisClusterClient.listClustersCallable().call(request); + for (Cluster element : response.getClustersList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); @@ -60,4 +59,4 @@ public static void asyncAuditUserLinksPaged() throws Exception { } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_Paged_async] +// [END redis_v1beta1_generated_CloudRedisCluster_ListClusters_Paged_async] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/SyncAuditUserLinks.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClusters.java similarity index 56% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/SyncAuditUserLinks.java rename to java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClusters.java index 4339ea849be2..baaa807c7dc6 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/audituserlinks/SyncAuditUserLinks.java +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClusters.java @@ -14,39 +14,37 @@ * limitations under the License. */ -package com.google.analytics.admin.v1alpha.samples; +package com.google.cloud.redis.cluster.v1beta1.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_sync] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.AuditUserLink; -import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; +// [START redis_v1beta1_generated_CloudRedisCluster_ListClusters_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.ListClustersRequest; +import com.google.cloud.redis.cluster.v1beta1.LocationName; -public class SyncAuditUserLinks { +public class SyncListClusters { public static void main(String[] args) throws Exception { - syncAuditUserLinks(); + syncListClusters(); } - public static void syncAuditUserLinks() throws Exception { + public static void syncListClusters() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder() - .setParent(AccountName.of("[ACCOUNT]").toString()) + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); - for (AuditUserLink element : - analyticsAdminServiceClient.auditUserLinks(request).iterateAll()) { + for (Cluster element : cloudRedisClusterClient.listClusters(request).iterateAll()) { // doThingsWith(element); } } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_sync] +// [END redis_v1beta1_generated_CloudRedisCluster_ListClusters_sync] diff --git a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksAccountname.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClustersLocationname.java similarity index 58% rename from java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksAccountname.java rename to java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClustersLocationname.java index 0413f0453d54..a977b8a6838b 100644 --- a/java-analytics-admin/samples/snippets/generated/com/google/analytics/admin/v1alpha/analyticsadminservice/listuserlinks/SyncListUserLinksAccountname.java +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClustersLocationname.java @@ -14,32 +14,31 @@ * limitations under the License. */ -package com.google.analytics.admin.v1alpha.samples; +package com.google.cloud.redis.cluster.v1beta1.samples; -// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_Accountname_sync] -import com.google.analytics.admin.v1alpha.AccountName; -import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient; -import com.google.analytics.admin.v1alpha.UserLink; +// [START redis_v1beta1_generated_CloudRedisCluster_ListClusters_Locationname_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.LocationName; -public class SyncListUserLinksAccountname { +public class SyncListClustersLocationname { public static void main(String[] args) throws Exception { - syncListUserLinksAccountname(); + syncListClustersLocationname(); } - public static void syncListUserLinksAccountname() throws Exception { + public static void syncListClustersLocationname() throws Exception { // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AnalyticsAdminServiceClient analyticsAdminServiceClient = - AnalyticsAdminServiceClient.create()) { - AccountName parent = AccountName.of("[ACCOUNT]"); - for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) { + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) { // doThingsWith(element); } } } } -// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_Accountname_sync] +// [END redis_v1beta1_generated_CloudRedisCluster_ListClusters_Locationname_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClustersString.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClustersString.java new file mode 100644 index 000000000000..8a698709b06e --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listclusters/SyncListClustersString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_ListClusters_String_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.LocationName; + +public class SyncListClustersString { + + public static void main(String[] args) throws Exception { + syncListClustersString(); + } + + public static void syncListClustersString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_ListClusters_String_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/AsyncListLocations.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..ef688db19329 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudRedisClusterClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_ListLocations_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/AsyncListLocationsPaged.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..2a9576c4c0c8 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + cloudRedisClusterClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_ListLocations_Paged_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/SyncListLocations.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..b090a8fde7b7 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudRedisClusterClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_ListLocations_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/AsyncUpdateCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/AsyncUpdateCluster.java new file mode 100644 index 000000000000..ed12f349077f --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/AsyncUpdateCluster.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateCluster { + + public static void main(String[] args) throws Exception { + asyncUpdateCluster(); + } + + public static void asyncUpdateCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudRedisClusterClient.updateClusterCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/AsyncUpdateClusterLRO.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/AsyncUpdateClusterLRO.java new file mode 100644 index 000000000000..f84b022771cc --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/AsyncUpdateClusterLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest; +import com.google.protobuf.Any; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateClusterLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateClusterLRO(); + } + + public static void asyncUpdateClusterLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudRedisClusterClient.updateClusterOperationCallable().futureCall(request); + // Do something. + Cluster response = future.get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_LRO_async] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/SyncUpdateCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/SyncUpdateCluster.java new file mode 100644 index 000000000000..3d5960f1548e --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/SyncUpdateCluster.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.cloud.redis.cluster.v1beta1.UpdateClusterRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateCluster { + + public static void main(String[] args) throws Exception { + syncUpdateCluster(); + } + + public static void syncUpdateCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCluster(Cluster.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Cluster response = cloudRedisClusterClient.updateClusterAsync(request).get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/SyncUpdateClusterClusterFieldmask.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/SyncUpdateClusterClusterFieldmask.java new file mode 100644 index 000000000000..c85d345d8b36 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudrediscluster/updatecluster/SyncUpdateClusterClusterFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_ClusterFieldmask_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient; +import com.google.cloud.redis.cluster.v1beta1.Cluster; +import com.google.protobuf.FieldMask; + +public class SyncUpdateClusterClusterFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateClusterClusterFieldmask(); + } + + public static void syncUpdateClusterClusterFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) { + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Cluster response = cloudRedisClusterClient.updateClusterAsync(cluster, updateMask).get(); + } + } +} +// [END redis_v1beta1_generated_CloudRedisCluster_UpdateCluster_ClusterFieldmask_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudredisclustersettings/getcluster/SyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudredisclustersettings/getcluster/SyncGetCluster.java new file mode 100644 index 000000000000..cd7d7024f5cd --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/cloudredisclustersettings/getcluster/SyncGetCluster.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.samples; + +// [START redis_v1beta1_generated_CloudRedisClusterSettings_GetCluster_sync] +import com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterSettings; +import java.time.Duration; + +public class SyncGetCluster { + + public static void main(String[] args) throws Exception { + syncGetCluster(); + } + + public static void syncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterSettings.Builder cloudRedisClusterSettingsBuilder = + CloudRedisClusterSettings.newBuilder(); + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .setRetrySettings( + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudRedisClusterSettings cloudRedisClusterSettings = cloudRedisClusterSettingsBuilder.build(); + } +} +// [END redis_v1beta1_generated_CloudRedisClusterSettings_GetCluster_sync] diff --git a/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/stub/cloudredisclusterstubsettings/getcluster/SyncGetCluster.java b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/stub/cloudredisclusterstubsettings/getcluster/SyncGetCluster.java new file mode 100644 index 000000000000..3b9971c3c063 --- /dev/null +++ b/java-redis-cluster/samples/snippets/generated/com/google/cloud/redis/cluster/v1beta1/stub/cloudredisclusterstubsettings/getcluster/SyncGetCluster.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.redis.cluster.v1beta1.stub.samples; + +// [START redis_v1beta1_generated_CloudRedisClusterStubSettings_GetCluster_sync] +import com.google.cloud.redis.cluster.v1beta1.stub.CloudRedisClusterStubSettings; +import java.time.Duration; + +public class SyncGetCluster { + + public static void main(String[] args) throws Exception { + syncGetCluster(); + } + + public static void syncGetCluster() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudRedisClusterStubSettings.Builder cloudRedisClusterSettingsBuilder = + CloudRedisClusterStubSettings.newBuilder(); + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .setRetrySettings( + cloudRedisClusterSettingsBuilder + .getClusterSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + CloudRedisClusterStubSettings cloudRedisClusterSettings = + cloudRedisClusterSettingsBuilder.build(); + } +} +// [END redis_v1beta1_generated_CloudRedisClusterStubSettings_GetCluster_sync] diff --git a/java-redis/CHANGELOG.md b/java-redis/CHANGELOG.md index ed27252989ff..b00e577a2119 100644 --- a/java-redis/CHANGELOG.md +++ b/java-redis/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.32.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.31.0 (2023-10-11) ### Dependencies diff --git a/java-redis/README.md b/java-redis/README.md index 7e3dd46c5c4e..3656bc943194 100644 --- a/java-redis/README.md +++ b/java-redis/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-redis - 2.31.0 + 2.32.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-redis:2.31.0' +implementation 'com.google.cloud:google-cloud-redis:2.32.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "2.31.0" +libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "2.32.0" ``` diff --git a/java-redis/google-cloud-redis-bom/pom.xml b/java-redis/google-cloud-redis-bom/pom.xml index a24f42f21249..b2a96dfcdc74 100644 --- a/java-redis/google-cloud-redis-bom/pom.xml +++ b/java-redis/google-cloud-redis-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-redis-bom - 2.31.0 + 2.32.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-redis - 2.31.0 + 2.32.0 com.google.api.grpc grpc-google-cloud-redis-v1beta1 - 0.119.0 + 0.120.0 com.google.api.grpc grpc-google-cloud-redis-v1 - 2.31.0 + 2.32.0 com.google.api.grpc proto-google-cloud-redis-v1 - 2.31.0 + 2.32.0 com.google.api.grpc proto-google-cloud-redis-v1beta1 - 0.119.0 + 0.120.0 diff --git a/java-redis/google-cloud-redis/pom.xml b/java-redis/google-cloud-redis/pom.xml index adebbfd51f63..2f7895cc52bd 100644 --- a/java-redis/google-cloud-redis/pom.xml +++ b/java-redis/google-cloud-redis/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-redis - 2.31.0 + 2.32.0 jar Google Cloud Redis Java idiomatic client for Google Cloud Redis com.google.cloud google-cloud-redis-parent - 2.31.0 + 2.32.0 google-cloud-redis diff --git a/java-redis/grpc-google-cloud-redis-v1/pom.xml b/java-redis/grpc-google-cloud-redis-v1/pom.xml index 32b991a76238..0811a7acab67 100644 --- a/java-redis/grpc-google-cloud-redis-v1/pom.xml +++ b/java-redis/grpc-google-cloud-redis-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-redis-v1 - 2.31.0 + 2.32.0 grpc-google-cloud-redis-v1 GRPC library for grpc-google-cloud-redis-v1 com.google.cloud google-cloud-redis-parent - 2.31.0 + 2.32.0 diff --git a/java-redis/grpc-google-cloud-redis-v1beta1/pom.xml b/java-redis/grpc-google-cloud-redis-v1beta1/pom.xml index 6b89c6dfd446..55924071b243 100644 --- a/java-redis/grpc-google-cloud-redis-v1beta1/pom.xml +++ b/java-redis/grpc-google-cloud-redis-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-redis-v1beta1 - 0.119.0 + 0.120.0 grpc-google-cloud-redis-v1beta1 GRPC library for grpc-google-cloud-redis-v1beta1 com.google.cloud google-cloud-redis-parent - 2.31.0 + 2.32.0 diff --git a/java-redis/pom.xml b/java-redis/pom.xml index 0c34ee74dce0..13fe2fe3a12d 100644 --- a/java-redis/pom.xml +++ b/java-redis/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-redis-parent pom - 2.31.0 + 2.32.0 Google Cloud Redis Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-redis-v1 - 2.31.0 + 2.32.0 com.google.api.grpc proto-google-cloud-redis-v1beta1 - 0.119.0 + 0.120.0 com.google.api.grpc grpc-google-cloud-redis-v1beta1 - 0.119.0 + 0.120.0 com.google.api.grpc grpc-google-cloud-redis-v1 - 2.31.0 + 2.32.0 com.google.cloud google-cloud-redis - 2.31.0 + 2.32.0 diff --git a/java-redis/proto-google-cloud-redis-v1/pom.xml b/java-redis/proto-google-cloud-redis-v1/pom.xml index 6b5add138458..8012dc664d11 100644 --- a/java-redis/proto-google-cloud-redis-v1/pom.xml +++ b/java-redis/proto-google-cloud-redis-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-redis-v1 - 2.31.0 + 2.32.0 proto-google-cloud-redis-v1 PROTO library for proto-google-cloud-redis-v1 com.google.cloud google-cloud-redis-parent - 2.31.0 + 2.32.0 diff --git a/java-redis/proto-google-cloud-redis-v1beta1/pom.xml b/java-redis/proto-google-cloud-redis-v1beta1/pom.xml index 50d6f53d40c4..be79cb30b430 100644 --- a/java-redis/proto-google-cloud-redis-v1beta1/pom.xml +++ b/java-redis/proto-google-cloud-redis-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-redis-v1beta1 - 0.119.0 + 0.120.0 proto-google-cloud-redis-v1beta1 PROTO library for proto-google-cloud-redis-v1beta1 com.google.cloud google-cloud-redis-parent - 2.31.0 + 2.32.0 diff --git a/java-resource-settings/CHANGELOG.md b/java-resource-settings/CHANGELOG.md index 79679c9b1603..a0041ffd975b 100644 --- a/java-resource-settings/CHANGELOG.md +++ b/java-resource-settings/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-resource-settings/README.md b/java-resource-settings/README.md index 94b71037ab54..8ef04d387c5d 100644 --- a/java-resource-settings/README.md +++ b/java-resource-settings/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-resource-settings - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-resource-settings:1.28.0' +implementation 'com.google.cloud:google-cloud-resource-settings:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-resource-settings" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-resource-settings" % "1.29.0" ``` diff --git a/java-resource-settings/google-cloud-resource-settings-bom/pom.xml b/java-resource-settings/google-cloud-resource-settings-bom/pom.xml index db17aad61188..515e9da45f47 100644 --- a/java-resource-settings/google-cloud-resource-settings-bom/pom.xml +++ b/java-resource-settings/google-cloud-resource-settings-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-resource-settings-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-resource-settings - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-resource-settings-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-resource-settings-v1 - 1.28.0 + 1.29.0 diff --git a/java-resource-settings/google-cloud-resource-settings/pom.xml b/java-resource-settings/google-cloud-resource-settings/pom.xml index 871df8cc7b51..9aaf7332120d 100644 --- a/java-resource-settings/google-cloud-resource-settings/pom.xml +++ b/java-resource-settings/google-cloud-resource-settings/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-resource-settings - 1.28.0 + 1.29.0 jar Google Resource Settings API Resource Settings API allows users to control and modify the behavior of their GCP resources (e.g., VM, firewall, Project, etc.) across the Cloud Resource Hierarchy. com.google.cloud google-cloud-resource-settings-parent - 1.28.0 + 1.29.0 google-cloud-resource-settings diff --git a/java-resource-settings/grpc-google-cloud-resource-settings-v1/pom.xml b/java-resource-settings/grpc-google-cloud-resource-settings-v1/pom.xml index d358efb8d506..2ab47ed4a181 100644 --- a/java-resource-settings/grpc-google-cloud-resource-settings-v1/pom.xml +++ b/java-resource-settings/grpc-google-cloud-resource-settings-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-resource-settings-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-resource-settings-v1 GRPC library for google-cloud-resource-settings com.google.cloud google-cloud-resource-settings-parent - 1.28.0 + 1.29.0 diff --git a/java-resource-settings/pom.xml b/java-resource-settings/pom.xml index 24f007f8a95a..0c911ecd2a1e 100644 --- a/java-resource-settings/pom.xml +++ b/java-resource-settings/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-resource-settings-parent pom - 1.28.0 + 1.29.0 Google Resource Settings API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-resource-settings - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-resource-settings-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-resource-settings-v1 - 1.28.0 + 1.29.0 diff --git a/java-resource-settings/proto-google-cloud-resource-settings-v1/pom.xml b/java-resource-settings/proto-google-cloud-resource-settings-v1/pom.xml index 885e074516cb..f53e9c546618 100644 --- a/java-resource-settings/proto-google-cloud-resource-settings-v1/pom.xml +++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-resource-settings-v1 - 1.28.0 + 1.29.0 proto-google-cloud-resource-settings-v1 Proto library for google-cloud-resource-settings com.google.cloud google-cloud-resource-settings-parent - 1.28.0 + 1.29.0 diff --git a/java-resourcemanager/CHANGELOG.md b/java-resourcemanager/CHANGELOG.md index 3a4f5045a022..d4d016c04cd4 100644 --- a/java-resourcemanager/CHANGELOG.md +++ b/java-resourcemanager/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.30.0 (2023-10-11) ### Dependencies diff --git a/java-resourcemanager/README.md b/java-resourcemanager/README.md index 29f95e411019..6cee4740ac92 100644 --- a/java-resourcemanager/README.md +++ b/java-resourcemanager/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-resourcemanager - 1.30.0 + 1.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-resourcemanager:1.30.0' +implementation 'com.google.cloud:google-cloud-resourcemanager:1.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-resourcemanager" % "1.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-resourcemanager" % "1.31.0" ``` diff --git a/java-resourcemanager/google-cloud-resourcemanager-bom/pom.xml b/java-resourcemanager/google-cloud-resourcemanager-bom/pom.xml index b148b5c63352..d9c55005e4bd 100644 --- a/java-resourcemanager/google-cloud-resourcemanager-bom/pom.xml +++ b/java-resourcemanager/google-cloud-resourcemanager-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-resourcemanager-bom - 1.30.0 + 1.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-resourcemanager - 1.30.0 + 1.31.0 com.google.api.grpc grpc-google-cloud-resourcemanager-v3 - 1.30.0 + 1.31.0 com.google.api.grpc proto-google-cloud-resourcemanager-v3 - 1.30.0 + 1.31.0 diff --git a/java-resourcemanager/google-cloud-resourcemanager/pom.xml b/java-resourcemanager/google-cloud-resourcemanager/pom.xml index d8b6c1c8deaf..dac9a60caf54 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/pom.xml +++ b/java-resourcemanager/google-cloud-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-resourcemanager jar - 1.30.0 + 1.31.0 Google Cloud Resource Manager Java idiomatic client for Google Cloud Resource Manager @@ -13,7 +13,7 @@ com.google.cloud google-cloud-resourcemanager-parent - 1.30.0 + 1.31.0 diff --git a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/pom.xml b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/pom.xml index 8488c4bc72e2..ff5696f0ecc7 100644 --- a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/pom.xml +++ b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-resourcemanager-v3 - 1.30.0 + 1.31.0 grpc-google-cloud-resourcemanager-v3 GRPC library for google-cloud-resourcemanager com.google.cloud google-cloud-resourcemanager-parent - 1.30.0 + 1.31.0 diff --git a/java-resourcemanager/pom.xml b/java-resourcemanager/pom.xml index 683aa88ed991..6de999223da4 100644 --- a/java-resourcemanager/pom.xml +++ b/java-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-resourcemanager-parent pom - 1.30.0 + 1.31.0 Google Resource Manager API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,18 +29,18 @@ com.google.cloud google-cloud-resourcemanager - 1.30.0 + 1.31.0 com.google.api.grpc proto-google-cloud-resourcemanager-v3 - 1.30.0 + 1.31.0 com.google.api.grpc grpc-google-cloud-resourcemanager-v3 - 1.30.0 + 1.31.0 diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/pom.xml b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/pom.xml index 129da615a34e..c3197e9eb511 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/pom.xml +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-resourcemanager-v3 - 1.30.0 + 1.31.0 proto-google-cloud-resourcemanager-v3 Proto library for google-cloud-resourcemanager com.google.cloud google-cloud-resourcemanager-parent - 1.30.0 + 1.31.0 diff --git a/java-retail/CHANGELOG.md b/java-retail/CHANGELOG.md index 82de0e939b6d..a888a703b4b8 100644 --- a/java-retail/CHANGELOG.md +++ b/java-retail/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.30.0 (2023-10-11) ### Dependencies diff --git a/java-retail/README.md b/java-retail/README.md index 7edd2a77fb50..1d31229fd4dc 100644 --- a/java-retail/README.md +++ b/java-retail/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-retail - 2.30.0 + 2.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-retail:2.30.0' +implementation 'com.google.cloud:google-cloud-retail:2.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.31.0" ``` diff --git a/java-retail/google-cloud-retail-bom/pom.xml b/java-retail/google-cloud-retail-bom/pom.xml index 088123bbccfc..d5dabc35e6bb 100644 --- a/java-retail/google-cloud-retail-bom/pom.xml +++ b/java-retail/google-cloud-retail-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-retail-bom - 2.30.0 + 2.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,37 +27,37 @@ com.google.cloud google-cloud-retail - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-retail-v2 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-retail-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-retail-v2beta - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-retail-v2 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-retail-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-retail-v2beta - 2.30.0 + 2.31.0 diff --git a/java-retail/google-cloud-retail/pom.xml b/java-retail/google-cloud-retail/pom.xml index 4fbc986a45eb..e8e7a75c6ebb 100644 --- a/java-retail/google-cloud-retail/pom.xml +++ b/java-retail/google-cloud-retail/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-retail - 2.30.0 + 2.31.0 jar Google Cloud Retail Retail solutions API. com.google.cloud google-cloud-retail-parent - 2.30.0 + 2.31.0 google-cloud-retail diff --git a/java-retail/grpc-google-cloud-retail-v2/pom.xml b/java-retail/grpc-google-cloud-retail-v2/pom.xml index 5928d676c271..49768e975f2c 100644 --- a/java-retail/grpc-google-cloud-retail-v2/pom.xml +++ b/java-retail/grpc-google-cloud-retail-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-retail-v2 - 2.30.0 + 2.31.0 grpc-google-cloud-retail-v2 GRPC library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.30.0 + 2.31.0 diff --git a/java-retail/grpc-google-cloud-retail-v2alpha/pom.xml b/java-retail/grpc-google-cloud-retail-v2alpha/pom.xml index 4e6a2cca2b65..8fc8d0de5496 100644 --- a/java-retail/grpc-google-cloud-retail-v2alpha/pom.xml +++ b/java-retail/grpc-google-cloud-retail-v2alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-retail-v2alpha - 2.30.0 + 2.31.0 grpc-google-cloud-retail-v2alpha GRPC library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.30.0 + 2.31.0 diff --git a/java-retail/grpc-google-cloud-retail-v2beta/pom.xml b/java-retail/grpc-google-cloud-retail-v2beta/pom.xml index 95c37c267353..a54627a78664 100644 --- a/java-retail/grpc-google-cloud-retail-v2beta/pom.xml +++ b/java-retail/grpc-google-cloud-retail-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-retail-v2beta - 2.30.0 + 2.31.0 grpc-google-cloud-retail-v2beta GRPC library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.30.0 + 2.31.0 diff --git a/java-retail/pom.xml b/java-retail/pom.xml index 685b3791a736..18b1bf2e3798 100644 --- a/java-retail/pom.xml +++ b/java-retail/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-retail-parent pom - 2.30.0 + 2.31.0 Google Cloud Retail Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.cloud google-cloud-retail - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-retail-v2beta - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-retail-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-retail-v2beta - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-retail-v2alpha - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-retail-v2 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-retail-v2 - 2.30.0 + 2.31.0 diff --git a/java-retail/proto-google-cloud-retail-v2/pom.xml b/java-retail/proto-google-cloud-retail-v2/pom.xml index 1f12dcfc2e3e..ad7816824d9b 100644 --- a/java-retail/proto-google-cloud-retail-v2/pom.xml +++ b/java-retail/proto-google-cloud-retail-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-retail-v2 - 2.30.0 + 2.31.0 proto-google-cloud-retail-v2 Proto library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.30.0 + 2.31.0 diff --git a/java-retail/proto-google-cloud-retail-v2alpha/pom.xml b/java-retail/proto-google-cloud-retail-v2alpha/pom.xml index 203ac38fb813..6bc8cb1d3122 100644 --- a/java-retail/proto-google-cloud-retail-v2alpha/pom.xml +++ b/java-retail/proto-google-cloud-retail-v2alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-retail-v2alpha - 2.30.0 + 2.31.0 proto-google-cloud-retail-v2alpha Proto library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.30.0 + 2.31.0 diff --git a/java-retail/proto-google-cloud-retail-v2beta/pom.xml b/java-retail/proto-google-cloud-retail-v2beta/pom.xml index 7019469b1d3e..23f7d127ff39 100644 --- a/java-retail/proto-google-cloud-retail-v2beta/pom.xml +++ b/java-retail/proto-google-cloud-retail-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-retail-v2beta - 2.30.0 + 2.31.0 proto-google-cloud-retail-v2beta Proto library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.30.0 + 2.31.0 diff --git a/java-run/CHANGELOG.md b/java-run/CHANGELOG.md index d20a232262ff..55651ac99fb1 100644 --- a/java-run/CHANGELOG.md +++ b/java-run/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.28.0 (2023-10-11) ### Dependencies diff --git a/java-run/README.md b/java-run/README.md index d43e931f0b05..877841802af5 100644 --- a/java-run/README.md +++ b/java-run/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-run - 0.28.0 + 0.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-run:0.28.0' +implementation 'com.google.cloud:google-cloud-run:0.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-run" % "0.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-run" % "0.29.0" ``` diff --git a/java-run/google-cloud-run-bom/pom.xml b/java-run/google-cloud-run-bom/pom.xml index d87f490ed090..3228d3379db6 100644 --- a/java-run/google-cloud-run-bom/pom.xml +++ b/java-run/google-cloud-run-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-run-bom - 0.28.0 + 0.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-run - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-run-v2 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-run-v2 - 0.28.0 + 0.29.0 diff --git a/java-run/google-cloud-run/pom.xml b/java-run/google-cloud-run/pom.xml index 6e0c3aa12eb8..a6359a563722 100644 --- a/java-run/google-cloud-run/pom.xml +++ b/java-run/google-cloud-run/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-run - 0.28.0 + 0.29.0 jar Google Cloud Run Cloud Run is a managed compute platform that enables you to run containers that are invocable via requests or events. com.google.cloud google-cloud-run-parent - 0.28.0 + 0.29.0 google-cloud-run diff --git a/java-run/grpc-google-cloud-run-v2/pom.xml b/java-run/grpc-google-cloud-run-v2/pom.xml index 185da7f07ba6..bf671df41a6e 100644 --- a/java-run/grpc-google-cloud-run-v2/pom.xml +++ b/java-run/grpc-google-cloud-run-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-run-v2 - 0.28.0 + 0.29.0 grpc-google-cloud-run-v2 GRPC library for google-cloud-run com.google.cloud google-cloud-run-parent - 0.28.0 + 0.29.0 diff --git a/java-run/pom.xml b/java-run/pom.xml index 705caff17b07..2b643480d1b4 100644 --- a/java-run/pom.xml +++ b/java-run/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-run-parent pom - 0.28.0 + 0.29.0 Google Cloud Run Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-run - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-run-v2 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-run-v2 - 0.28.0 + 0.29.0 diff --git a/java-run/proto-google-cloud-run-v2/pom.xml b/java-run/proto-google-cloud-run-v2/pom.xml index 662e1ef17b8b..544e7614e799 100644 --- a/java-run/proto-google-cloud-run-v2/pom.xml +++ b/java-run/proto-google-cloud-run-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-run-v2 - 0.28.0 + 0.29.0 proto-google-cloud-run-v2 Proto library for google-cloud-run com.google.cloud google-cloud-run-parent - 0.28.0 + 0.29.0 diff --git a/java-scheduler/CHANGELOG.md b/java-scheduler/CHANGELOG.md index 25be2f48d176..dae5485daabb 100644 --- a/java-scheduler/CHANGELOG.md +++ b/java-scheduler/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-scheduler/README.md b/java-scheduler/README.md index 82c9decf4738..0bb517219ea6 100644 --- a/java-scheduler/README.md +++ b/java-scheduler/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-scheduler - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-scheduler:2.28.0' +implementation 'com.google.cloud:google-cloud-scheduler:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-scheduler" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-scheduler" % "2.29.0" ``` diff --git a/java-scheduler/google-cloud-scheduler-bom/pom.xml b/java-scheduler/google-cloud-scheduler-bom/pom.xml index 4de51bb9f174..75aa04bd432d 100644 --- a/java-scheduler/google-cloud-scheduler-bom/pom.xml +++ b/java-scheduler/google-cloud-scheduler-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-scheduler-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-scheduler - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-scheduler-v1beta1 - 0.113.0 + 0.114.0 com.google.api.grpc grpc-google-cloud-scheduler-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-scheduler-v1beta1 - 0.113.0 + 0.114.0 com.google.api.grpc proto-google-cloud-scheduler-v1 - 2.28.0 + 2.29.0 diff --git a/java-scheduler/google-cloud-scheduler/pom.xml b/java-scheduler/google-cloud-scheduler/pom.xml index b762e18fa678..a1cec4fdbfc0 100644 --- a/java-scheduler/google-cloud-scheduler/pom.xml +++ b/java-scheduler/google-cloud-scheduler/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-scheduler - 2.28.0 + 2.29.0 jar Google Cloud Scheduler Fully managed cron job service com.google.cloud google-cloud-scheduler-parent - 2.28.0 + 2.29.0 google-cloud-scheduler diff --git a/java-scheduler/grpc-google-cloud-scheduler-v1/pom.xml b/java-scheduler/grpc-google-cloud-scheduler-v1/pom.xml index dd68cf009853..262243f58c5d 100644 --- a/java-scheduler/grpc-google-cloud-scheduler-v1/pom.xml +++ b/java-scheduler/grpc-google-cloud-scheduler-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-scheduler-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-scheduler-v1 GRPC library for grpc-google-cloud-scheduler-v1 com.google.cloud google-cloud-scheduler-parent - 2.28.0 + 2.29.0 diff --git a/java-scheduler/grpc-google-cloud-scheduler-v1beta1/pom.xml b/java-scheduler/grpc-google-cloud-scheduler-v1beta1/pom.xml index e902ef16c96d..f61d2b87f40b 100644 --- a/java-scheduler/grpc-google-cloud-scheduler-v1beta1/pom.xml +++ b/java-scheduler/grpc-google-cloud-scheduler-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-scheduler-v1beta1 - 0.113.0 + 0.114.0 grpc-google-cloud-scheduler-v1beta1 GRPC library for grpc-google-cloud-scheduler-v1beta1 com.google.cloud google-cloud-scheduler-parent - 2.28.0 + 2.29.0 diff --git a/java-scheduler/pom.xml b/java-scheduler/pom.xml index f5ff49ab914d..898ddabe5124 100644 --- a/java-scheduler/pom.xml +++ b/java-scheduler/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-scheduler-parent pom - 2.28.0 + 2.29.0 Google Cloud Scheduler Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-scheduler-v1beta1 - 0.113.0 + 0.114.0 com.google.api.grpc proto-google-cloud-scheduler-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-scheduler-v1beta1 - 0.113.0 + 0.114.0 com.google.api.grpc grpc-google-cloud-scheduler-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-scheduler - 2.28.0 + 2.29.0 diff --git a/java-scheduler/proto-google-cloud-scheduler-v1/pom.xml b/java-scheduler/proto-google-cloud-scheduler-v1/pom.xml index 5f458da025ca..b949e1777e65 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1/pom.xml +++ b/java-scheduler/proto-google-cloud-scheduler-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-scheduler-v1 - 2.28.0 + 2.29.0 proto-google-cloud-scheduler-v1 PROTO library for proto-google-cloud-scheduler-v1 com.google.cloud google-cloud-scheduler-parent - 2.28.0 + 2.29.0 diff --git a/java-scheduler/proto-google-cloud-scheduler-v1beta1/pom.xml b/java-scheduler/proto-google-cloud-scheduler-v1beta1/pom.xml index bc216b0803c8..ac20cf624401 100644 --- a/java-scheduler/proto-google-cloud-scheduler-v1beta1/pom.xml +++ b/java-scheduler/proto-google-cloud-scheduler-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-scheduler-v1beta1 - 0.113.0 + 0.114.0 proto-google-cloud-scheduler-v1beta1 PROTO library for proto-google-cloud-scheduler-v1beta1 com.google.cloud google-cloud-scheduler-parent - 2.28.0 + 2.29.0 diff --git a/java-secretmanager/CHANGELOG.md b/java-secretmanager/CHANGELOG.md index 50e3ef54ccc6..076d6b9ac13a 100644 --- a/java-secretmanager/CHANGELOG.md +++ b/java-secretmanager/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-secretmanager/README.md b/java-secretmanager/README.md index e2e900f7892c..266a53258e0a 100644 --- a/java-secretmanager/README.md +++ b/java-secretmanager/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-secretmanager - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-secretmanager:2.28.0' +implementation 'com.google.cloud:google-cloud-secretmanager:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-secretmanager" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-secretmanager" % "2.29.0" ``` diff --git a/java-secretmanager/google-cloud-secretmanager-bom/pom.xml b/java-secretmanager/google-cloud-secretmanager-bom/pom.xml index 8c4de9b2a60a..26dacc925e92 100644 --- a/java-secretmanager/google-cloud-secretmanager-bom/pom.xml +++ b/java-secretmanager/google-cloud-secretmanager-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-secretmanager-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-secretmanager - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-secretmanager-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-secretmanager-v1beta1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-secretmanager-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-secretmanager-v1beta1 - 2.28.0 + 2.29.0 diff --git a/java-secretmanager/google-cloud-secretmanager/pom.xml b/java-secretmanager/google-cloud-secretmanager/pom.xml index 38a640c1bb5f..f2548f268d28 100644 --- a/java-secretmanager/google-cloud-secretmanager/pom.xml +++ b/java-secretmanager/google-cloud-secretmanager/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-secretmanager - 2.28.0 + 2.29.0 jar Google Cloud Secret Manager Java idiomatic client for Google Cloud Secret Manager com.google.cloud google-cloud-secretmanager-parent - 2.28.0 + 2.29.0 google-cloud-secretmanager diff --git a/java-secretmanager/grpc-google-cloud-secretmanager-v1/pom.xml b/java-secretmanager/grpc-google-cloud-secretmanager-v1/pom.xml index ba1b3dd569a0..27bbbceb0052 100644 --- a/java-secretmanager/grpc-google-cloud-secretmanager-v1/pom.xml +++ b/java-secretmanager/grpc-google-cloud-secretmanager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-secretmanager-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-secretmanager-v1 GRPC library for grpc-google-cloud-secretmanager-v1 com.google.cloud google-cloud-secretmanager-parent - 2.28.0 + 2.29.0 diff --git a/java-secretmanager/grpc-google-cloud-secretmanager-v1beta1/pom.xml b/java-secretmanager/grpc-google-cloud-secretmanager-v1beta1/pom.xml index 3e81b99c274f..9a2fd90860ef 100644 --- a/java-secretmanager/grpc-google-cloud-secretmanager-v1beta1/pom.xml +++ b/java-secretmanager/grpc-google-cloud-secretmanager-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-secretmanager-v1beta1 - 2.28.0 + 2.29.0 grpc-google-cloud-secretmanager-v1beta1 GRPC library for grpc-google-cloud-secretmanager-v1beta1 com.google.cloud google-cloud-secretmanager-parent - 2.28.0 + 2.29.0 diff --git a/java-secretmanager/pom.xml b/java-secretmanager/pom.xml index 57a118ab8968..94976d073026 100644 --- a/java-secretmanager/pom.xml +++ b/java-secretmanager/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-secretmanager-parent pom - 2.28.0 + 2.29.0 Google Cloud secretmanager Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-secretmanager-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-secretmanager-v1beta1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-secretmanager-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-secretmanager-v1beta1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-secretmanager - 2.28.0 + 2.29.0 diff --git a/java-secretmanager/proto-google-cloud-secretmanager-v1/pom.xml b/java-secretmanager/proto-google-cloud-secretmanager-v1/pom.xml index 4e950d898804..de72ac49e1d4 100644 --- a/java-secretmanager/proto-google-cloud-secretmanager-v1/pom.xml +++ b/java-secretmanager/proto-google-cloud-secretmanager-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-secretmanager-v1 - 2.28.0 + 2.29.0 proto-google-cloud-secretmanager-v1 PROTO library for proto-google-cloud-secretmanager-v1 com.google.cloud google-cloud-secretmanager-parent - 2.28.0 + 2.29.0 diff --git a/java-secretmanager/proto-google-cloud-secretmanager-v1beta1/pom.xml b/java-secretmanager/proto-google-cloud-secretmanager-v1beta1/pom.xml index a4195a949bee..293c18121b61 100644 --- a/java-secretmanager/proto-google-cloud-secretmanager-v1beta1/pom.xml +++ b/java-secretmanager/proto-google-cloud-secretmanager-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-secretmanager-v1beta1 - 2.28.0 + 2.29.0 proto-google-cloud-secretmanager-v1beta1 PROTO library for proto-google-cloud-secretmanager-v1beta1 com.google.cloud google-cloud-secretmanager-parent - 2.28.0 + 2.29.0 diff --git a/java-security-private-ca/CHANGELOG.md b/java-security-private-ca/CHANGELOG.md index 8714689438e2..ee55653c6860 100644 --- a/java-security-private-ca/CHANGELOG.md +++ b/java-security-private-ca/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.30.0 (2023-10-11) ### Dependencies diff --git a/java-security-private-ca/README.md b/java-security-private-ca/README.md index 2a29a69482df..277b7c714bfe 100644 --- a/java-security-private-ca/README.md +++ b/java-security-private-ca/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-security-private-ca - 2.30.0 + 2.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-security-private-ca:2.30.0' +implementation 'com.google.cloud:google-cloud-security-private-ca:2.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-security-private-ca" % "2.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-security-private-ca" % "2.31.0" ``` diff --git a/java-security-private-ca/google-cloud-security-private-ca-bom/pom.xml b/java-security-private-ca/google-cloud-security-private-ca-bom/pom.xml index 090bd0359ec9..cfd13c49dbeb 100644 --- a/java-security-private-ca/google-cloud-security-private-ca-bom/pom.xml +++ b/java-security-private-ca/google-cloud-security-private-ca-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-security-private-ca-bom - 2.30.0 + 2.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-security-private-ca - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-security-private-ca-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc grpc-google-cloud-security-private-ca-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-security-private-ca-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc proto-google-cloud-security-private-ca-v1 - 2.30.0 + 2.31.0 diff --git a/java-security-private-ca/google-cloud-security-private-ca/pom.xml b/java-security-private-ca/google-cloud-security-private-ca/pom.xml index f61ee1a11789..d63cad107b77 100644 --- a/java-security-private-ca/google-cloud-security-private-ca/pom.xml +++ b/java-security-private-ca/google-cloud-security-private-ca/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-security-private-ca - 2.30.0 + 2.31.0 jar Google Certificate Authority Service simplifies the deployment and management of private CAs without managing infrastructure. com.google.cloud google-cloud-security-private-ca-parent - 2.30.0 + 2.31.0 google-cloud-security-private-ca diff --git a/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/pom.xml b/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/pom.xml index 40f6c7a0e9ac..d9d8b1c13abb 100644 --- a/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/pom.xml +++ b/java-security-private-ca/grpc-google-cloud-security-private-ca-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-security-private-ca-v1 - 2.30.0 + 2.31.0 grpc-google-cloud-security-private-ca-v1 GRPC library for google-cloud-security-private-ca com.google.cloud google-cloud-security-private-ca-parent - 2.30.0 + 2.31.0 diff --git a/java-security-private-ca/grpc-google-cloud-security-private-ca-v1beta1/pom.xml b/java-security-private-ca/grpc-google-cloud-security-private-ca-v1beta1/pom.xml index 879e68cbbce0..ce765600d2d0 100644 --- a/java-security-private-ca/grpc-google-cloud-security-private-ca-v1beta1/pom.xml +++ b/java-security-private-ca/grpc-google-cloud-security-private-ca-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-security-private-ca-v1beta1 - 0.37.0 + 0.38.0 grpc-google-cloud-security-private-ca-v1beta1 GRPC library for google-cloud-security-private-ca com.google.cloud google-cloud-security-private-ca-parent - 2.30.0 + 2.31.0 diff --git a/java-security-private-ca/pom.xml b/java-security-private-ca/pom.xml index 08023dda21fa..b646481f0fa1 100644 --- a/java-security-private-ca/pom.xml +++ b/java-security-private-ca/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-security-private-ca-parent pom - 2.30.0 + 2.31.0 Google Certificate Authority Service Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-security-private-ca - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-security-private-ca-v1 - 2.30.0 + 2.31.0 com.google.api.grpc grpc-google-cloud-security-private-ca-v1 - 2.30.0 + 2.31.0 com.google.api.grpc proto-google-cloud-security-private-ca-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc grpc-google-cloud-security-private-ca-v1beta1 - 0.37.0 + 0.38.0 diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/pom.xml b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/pom.xml index 6fca0555bd01..843f212ac72b 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1/pom.xml +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-security-private-ca-v1 - 2.30.0 + 2.31.0 proto-google-cloud-security-private-ca-v1 Proto library for google-cloud-security-private-ca com.google.cloud google-cloud-security-private-ca-parent - 2.30.0 + 2.31.0 diff --git a/java-security-private-ca/proto-google-cloud-security-private-ca-v1beta1/pom.xml b/java-security-private-ca/proto-google-cloud-security-private-ca-v1beta1/pom.xml index 33b627660512..30a561aac4a6 100644 --- a/java-security-private-ca/proto-google-cloud-security-private-ca-v1beta1/pom.xml +++ b/java-security-private-ca/proto-google-cloud-security-private-ca-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-security-private-ca-v1beta1 - 0.37.0 + 0.38.0 proto-google-cloud-security-private-ca-v1beta1 Proto library for google-cloud-security-private-ca com.google.cloud google-cloud-security-private-ca-parent - 2.30.0 + 2.31.0 diff --git a/java-securitycenter-settings/CHANGELOG.md b/java-securitycenter-settings/CHANGELOG.md index 423d168e162c..001e2e8bc353 100644 --- a/java-securitycenter-settings/CHANGELOG.md +++ b/java-securitycenter-settings/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 0.32.0 (2023-10-25) + +### Features + +* Add SimulateSecurityHealthAnalyticsCustomModule API for testing SHA custom module ([#9980](https://github.com/googleapis/google-cloud-java/issues/9980)) ([84afb01](https://github.com/googleapis/google-cloud-java/commit/84afb01dd57588ca316e852143b433d2e1c7fd81)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.31.0 (2023-10-11) ### Dependencies diff --git a/java-securitycenter-settings/README.md b/java-securitycenter-settings/README.md index 6c53056bb7fa..c43dbf2887c4 100644 --- a/java-securitycenter-settings/README.md +++ b/java-securitycenter-settings/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-securitycenter-settings - 0.31.0 + 0.32.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-securitycenter-settings:0.31.0' +implementation 'com.google.cloud:google-cloud-securitycenter-settings:0.32.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter-settings" % "0.31.0" +libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter-settings" % "0.32.0" ``` diff --git a/java-securitycenter-settings/google-cloud-securitycenter-settings-bom/pom.xml b/java-securitycenter-settings/google-cloud-securitycenter-settings-bom/pom.xml index e6956e344e6e..9b094a600782 100644 --- a/java-securitycenter-settings/google-cloud-securitycenter-settings-bom/pom.xml +++ b/java-securitycenter-settings/google-cloud-securitycenter-settings-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-securitycenter-settings-bom - 0.31.0 + 0.32.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,17 +23,17 @@ com.google.cloud google-cloud-securitycenter-settings - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-securitycenter-settings-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-securitycenter-settings-v1beta1 - 0.31.0 + 0.32.0 diff --git a/java-securitycenter-settings/google-cloud-securitycenter-settings/pom.xml b/java-securitycenter-settings/google-cloud-securitycenter-settings/pom.xml index 92c73877e043..d771bcd7825d 100644 --- a/java-securitycenter-settings/google-cloud-securitycenter-settings/pom.xml +++ b/java-securitycenter-settings/google-cloud-securitycenter-settings/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-securitycenter-settings - 0.31.0 + 0.32.0 jar Google Security Command Center Settings API is the canonical security and data risk database for Google Cloud. Security Command Center enables you to understand your security and data attack surface by providing asset inventory, discovery, search, and management. com.google.cloud google-cloud-securitycenter-settings-parent - 0.31.0 + 0.32.0 google-cloud-securitycenter-settings diff --git a/java-securitycenter-settings/grpc-google-cloud-securitycenter-settings-v1beta1/pom.xml b/java-securitycenter-settings/grpc-google-cloud-securitycenter-settings-v1beta1/pom.xml index 1d6ff26d288f..6e803bf79475 100644 --- a/java-securitycenter-settings/grpc-google-cloud-securitycenter-settings-v1beta1/pom.xml +++ b/java-securitycenter-settings/grpc-google-cloud-securitycenter-settings-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-securitycenter-settings-v1beta1 - 0.31.0 + 0.32.0 grpc-google-cloud-securitycenter-settings-v1beta1 GRPC library for grpc-google-cloud-securitycenter-settings-v1beta1 com.google.cloud google-cloud-securitycenter-settings-parent - 0.31.0 + 0.32.0 diff --git a/java-securitycenter-settings/pom.xml b/java-securitycenter-settings/pom.xml index 654f644d8cc5..d58cb5d30ae6 100644 --- a/java-securitycenter-settings/pom.xml +++ b/java-securitycenter-settings/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-securitycenter-settings-parent pom - 0.31.0 + 0.32.0 Google Security Command Center Settings API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-securitycenter-settings - 0.31.0 + 0.32.0 com.google.api.grpc proto-google-cloud-securitycenter-settings-v1beta1 - 0.31.0 + 0.32.0 com.google.api.grpc grpc-google-cloud-securitycenter-settings-v1beta1 - 0.31.0 + 0.32.0 diff --git a/java-securitycenter-settings/proto-google-cloud-securitycenter-settings-v1beta1/pom.xml b/java-securitycenter-settings/proto-google-cloud-securitycenter-settings-v1beta1/pom.xml index 039c051c3245..3e444ba8534e 100644 --- a/java-securitycenter-settings/proto-google-cloud-securitycenter-settings-v1beta1/pom.xml +++ b/java-securitycenter-settings/proto-google-cloud-securitycenter-settings-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-securitycenter-settings-v1beta1 - 0.31.0 + 0.32.0 proto-google-cloud-securitycenter-settings-v1beta1 PROTO library for proto-google-cloud-securitycenter-settings-v1beta1 com.google.cloud google-cloud-securitycenter-settings-parent - 0.31.0 + 0.32.0 diff --git a/java-securitycenter/CHANGELOG.md b/java-securitycenter/CHANGELOG.md index 6079be66a035..489dc12de348 100644 --- a/java-securitycenter/CHANGELOG.md +++ b/java-securitycenter/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 2.37.0 (2023-10-25) + +### Features + +* Add SimulateSecurityHealthAnalyticsCustomModule API for testing SHA custom module ([#9980](https://github.com/googleapis/google-cloud-java/issues/9980)) ([84afb01](https://github.com/googleapis/google-cloud-java/commit/84afb01dd57588ca316e852143b433d2e1c7fd81)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.36.0 (2023-10-11) ### Dependencies diff --git a/java-securitycenter/README.md b/java-securitycenter/README.md index 1cb9b08182c3..b976070554c5 100644 --- a/java-securitycenter/README.md +++ b/java-securitycenter/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-securitycenter - 2.36.0 + 2.37.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-securitycenter:2.36.0' +implementation 'com.google.cloud:google-cloud-securitycenter:2.37.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.36.0" +libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.37.0" ``` @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securitycenter.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter/2.32.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-securitycenter/2.36.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-securitycenter/google-cloud-securitycenter-bom/pom.xml b/java-securitycenter/google-cloud-securitycenter-bom/pom.xml index 6569f9c8864b..3f361600f201 100644 --- a/java-securitycenter/google-cloud-securitycenter-bom/pom.xml +++ b/java-securitycenter/google-cloud-securitycenter-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-securitycenter-bom - 2.36.0 + 2.37.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,37 +23,37 @@ com.google.cloud google-cloud-securitycenter - 2.36.0 + 2.37.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1 - 2.36.0 + 2.37.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.131.0 + 0.132.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1p1beta1 - 0.131.0 + 0.132.0 com.google.api.grpc proto-google-cloud-securitycenter-v1 - 2.36.0 + 2.37.0 com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.131.0 + 0.132.0 com.google.api.grpc proto-google-cloud-securitycenter-v1p1beta1 - 0.131.0 + 0.132.0 diff --git a/java-securitycenter/google-cloud-securitycenter/pom.xml b/java-securitycenter/google-cloud-securitycenter/pom.xml index 7268b647a3b1..4fbee2f94c99 100644 --- a/java-securitycenter/google-cloud-securitycenter/pom.xml +++ b/java-securitycenter/google-cloud-securitycenter/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-securitycenter - 2.36.0 + 2.37.0 jar Google Cloud Security Command Center Java idiomatic client for Google Cloud Security Command Center com.google.cloud google-cloud-securitycenter-parent - 2.36.0 + 2.37.0 google-cloud-securitycenter diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java index 0b4854df2113..6219a9b9f7e1 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java @@ -5569,6 +5569,122 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq return stub.testIamPermissionsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   String parent = "parent-995424086";
+   *   CustomConfig customConfig = CustomConfig.newBuilder().build();
+   *   SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource =
+   *       SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build();
+   *   SimulateSecurityHealthAnalyticsCustomModuleResponse response =
+   *       securityCenterClient.simulateSecurityHealthAnalyticsCustomModule(
+   *           parent, customConfig, resource);
+   * }
+   * }
+ * + * @param parent Required. The relative resource name of the organization, project, or folder. + * See: https://cloud.google.com/apis/design/resource_names#relative_resource_name An example + * is: "organizations/{organization_id}". + * @param customConfig Required. The user specified custom configuration to test. + * @param resource Required. Resource data to simulate custom module against. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SimulateSecurityHealthAnalyticsCustomModuleResponse + simulateSecurityHealthAnalyticsCustomModule( + String parent, + CustomConfig customConfig, + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource) { + SimulateSecurityHealthAnalyticsCustomModuleRequest request = + SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder() + .setParent(parent) + .setCustomConfig(customConfig) + .setResource(resource) + .build(); + return simulateSecurityHealthAnalyticsCustomModule(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SimulateSecurityHealthAnalyticsCustomModuleRequest request =
+   *       SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setCustomConfig(CustomConfig.newBuilder().build())
+   *           .setResource(
+   *               SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
+   *                   .build())
+   *           .build();
+   *   SimulateSecurityHealthAnalyticsCustomModuleResponse response =
+   *       securityCenterClient.simulateSecurityHealthAnalyticsCustomModule(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SimulateSecurityHealthAnalyticsCustomModuleResponse + simulateSecurityHealthAnalyticsCustomModule( + SimulateSecurityHealthAnalyticsCustomModuleRequest request) { + return simulateSecurityHealthAnalyticsCustomModuleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+   *   SimulateSecurityHealthAnalyticsCustomModuleRequest request =
+   *       SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setCustomConfig(CustomConfig.newBuilder().build())
+   *           .setResource(
+   *               SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
+   *                   .build())
+   *           .build();
+   *   ApiFuture future =
+   *       securityCenterClient
+   *           .simulateSecurityHealthAnalyticsCustomModuleCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   SimulateSecurityHealthAnalyticsCustomModuleResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleCallable() { + return stub.simulateSecurityHealthAnalyticsCustomModuleCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates external system. This is for a given finding. diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java index 83c06025b32d..575b160cd95a 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterSettings.java @@ -350,6 +350,18 @@ public UnaryCallSettings setIamPolicySettings() { return ((SecurityCenterStubSettings) getStubSettings()).testIamPermissionsSettings(); } + /** + * Returns the object with the settings used for calls to + * simulateSecurityHealthAnalyticsCustomModule. + */ + public UnaryCallSettings< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleSettings() { + return ((SecurityCenterStubSettings) getStubSettings()) + .simulateSecurityHealthAnalyticsCustomModuleSettings(); + } + /** Returns the object with the settings used for calls to updateExternalSystem. */ public UnaryCallSettings updateExternalSystemSettings() { @@ -796,6 +808,17 @@ public UnaryCallSettings.Builder setIamPolicySettin return getStubSettingsBuilder().testIamPermissionsSettings(); } + /** + * Returns the builder for the settings used for calls to + * simulateSecurityHealthAnalyticsCustomModule. + */ + public UnaryCallSettings.Builder< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleSettings() { + return getStubSettingsBuilder().simulateSecurityHealthAnalyticsCustomModuleSettings(); + } + /** Returns the builder for the settings used for calls to updateExternalSystem. */ public UnaryCallSettings.Builder updateExternalSystemSettings() { diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json index c229c768c599..6345903b0a3f 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/gapic_metadata.json @@ -112,6 +112,9 @@ "SetMute": { "methods": ["setMute", "setMute", "setMute", "setMuteCallable"] }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "methods": ["simulateSecurityHealthAnalyticsCustomModule", "simulateSecurityHealthAnalyticsCustomModule", "simulateSecurityHealthAnalyticsCustomModuleCallable"] + }, "TestIamPermissions": { "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] }, diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java index fa8aac252280..877cf392cdac 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java @@ -90,6 +90,8 @@ import com.google.cloud.securitycenter.v1.SecurityMarks; import com.google.cloud.securitycenter.v1.SetFindingStateRequest; import com.google.cloud.securitycenter.v1.SetMuteRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; import com.google.cloud.securitycenter.v1.Source; import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; @@ -498,6 +500,25 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.securitycenter.v1.SecurityCenter/SimulateSecurityHealthAnalyticsCustomModule") + .setRequestMarshaller( + ProtoUtils.marshaller( + SimulateSecurityHealthAnalyticsCustomModuleRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + SimulateSecurityHealthAnalyticsCustomModuleResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateExternalSystemMethodDescriptor = MethodDescriptor.newBuilder() @@ -718,6 +739,10 @@ public class GrpcSecurityCenterStub extends SecurityCenterStub { private final UnaryCallable setIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleCallable; private final UnaryCallable updateExternalSystemCallable; private final UnaryCallable updateFindingCallable; @@ -1152,6 +1177,22 @@ protected GrpcSecurityCenterStub( return builder.build(); }) .build(); + GrpcCallSettings< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(simulateSecurityHealthAnalyticsCustomModuleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings updateExternalSystemTransportSettings = GrpcCallSettings.newBuilder() @@ -1475,6 +1516,11 @@ protected GrpcSecurityCenterStub( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.simulateSecurityHealthAnalyticsCustomModuleCallable = + callableFactory.createUnaryCallable( + simulateSecurityHealthAnalyticsCustomModuleTransportSettings, + settings.simulateSecurityHealthAnalyticsCustomModuleSettings(), + clientContext); this.updateExternalSystemCallable = callableFactory.createUnaryCallable( updateExternalSystemTransportSettings, @@ -1799,6 +1845,14 @@ public UnaryCallable setIamPolicyCallable() { return testIamPermissionsCallable; } + @Override + public UnaryCallable< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleCallable() { + return simulateSecurityHealthAnalyticsCustomModuleCallable; + } + @Override public UnaryCallable updateExternalSystemCallable() { return updateExternalSystemCallable; diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java index 1b2f6511df02..1de2b0e95f0f 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/HttpJsonSecurityCenterStub.java @@ -99,6 +99,8 @@ import com.google.cloud.securitycenter.v1.SecurityMarks; import com.google.cloud.securitycenter.v1.SetFindingStateRequest; import com.google.cloud.securitycenter.v1.SetMuteRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; import com.google.cloud.securitycenter.v1.Source; import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; @@ -1446,6 +1448,55 @@ public class HttpJsonSecurityCenterStub extends SecurityCenterStub { .build()) .build(); + private static final ApiMethodDescriptor< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.securitycenter.v1.SecurityCenter/SimulateSecurityHealthAnalyticsCustomModule") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:simulate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:simulate", + "/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:simulate") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + SimulateSecurityHealthAnalyticsCustomModuleResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor updateExternalSystemMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -2056,6 +2107,10 @@ public class HttpJsonSecurityCenterStub extends SecurityCenterStub { private final UnaryCallable setIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleCallable; private final UnaryCallable updateExternalSystemCallable; private final UnaryCallable updateFindingCallable; @@ -2547,6 +2602,23 @@ protected HttpJsonSecurityCenterStub( return builder.build(); }) .build(); + HttpJsonCallSettings< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(simulateSecurityHealthAnalyticsCustomModuleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings updateExternalSystemTransportSettings = HttpJsonCallSettings.newBuilder() @@ -2884,6 +2956,11 @@ protected HttpJsonSecurityCenterStub( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.simulateSecurityHealthAnalyticsCustomModuleCallable = + callableFactory.createUnaryCallable( + simulateSecurityHealthAnalyticsCustomModuleTransportSettings, + settings.simulateSecurityHealthAnalyticsCustomModuleSettings(), + clientContext); this.updateExternalSystemCallable = callableFactory.createUnaryCallable( updateExternalSystemTransportSettings, @@ -2983,6 +3060,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(setMuteMethodDescriptor); methodDescriptors.add(setIamPolicyMethodDescriptor); methodDescriptors.add(testIamPermissionsMethodDescriptor); + methodDescriptors.add(simulateSecurityHealthAnalyticsCustomModuleMethodDescriptor); methodDescriptors.add(updateExternalSystemMethodDescriptor); methodDescriptors.add(updateFindingMethodDescriptor); methodDescriptors.add(updateMuteConfigMethodDescriptor); @@ -3258,6 +3336,14 @@ public UnaryCallable setIamPolicyCallable() { return testIamPermissionsCallable; } + @Override + public UnaryCallable< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleCallable() { + return simulateSecurityHealthAnalyticsCustomModuleCallable; + } + @Override public UnaryCallable updateExternalSystemCallable() { return updateExternalSystemCallable; diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java index b44d0a837441..de909c7c85d2 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStub.java @@ -85,6 +85,8 @@ import com.google.cloud.securitycenter.v1.SecurityMarks; import com.google.cloud.securitycenter.v1.SetFindingStateRequest; import com.google.cloud.securitycenter.v1.SetMuteRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; import com.google.cloud.securitycenter.v1.Source; import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; @@ -352,6 +354,14 @@ public UnaryCallable setIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); } + public UnaryCallable< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleCallable() { + throw new UnsupportedOperationException( + "Not implemented: simulateSecurityHealthAnalyticsCustomModuleCallable()"); + } + public UnaryCallable updateExternalSystemCallable() { throw new UnsupportedOperationException("Not implemented: updateExternalSystemCallable()"); } diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java index fa3e6336280f..acde88a8ae94 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java +++ b/java-securitycenter/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/SecurityCenterStubSettings.java @@ -112,6 +112,8 @@ import com.google.cloud.securitycenter.v1.SecurityMarks; import com.google.cloud.securitycenter.v1.SetFindingStateRequest; import com.google.cloud.securitycenter.v1.SetMuteRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; import com.google.cloud.securitycenter.v1.Source; import com.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest; import com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest; @@ -258,6 +260,10 @@ public class SecurityCenterStubSettings extends StubSettings setIamPolicySettings; private final UnaryCallSettings testIamPermissionsSettings; + private final UnaryCallSettings< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleSettings; private final UnaryCallSettings updateExternalSystemSettings; private final UnaryCallSettings updateFindingSettings; @@ -1249,6 +1255,17 @@ public UnaryCallSettings setIamPolicySettings() { return testIamPermissionsSettings; } + /** + * Returns the object with the settings used for calls to + * simulateSecurityHealthAnalyticsCustomModule. + */ + public UnaryCallSettings< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleSettings() { + return simulateSecurityHealthAnalyticsCustomModuleSettings; + } + /** Returns the object with the settings used for calls to updateExternalSystem. */ public UnaryCallSettings updateExternalSystemSettings() { @@ -1470,6 +1487,8 @@ protected SecurityCenterStubSettings(Builder settingsBuilder) throws IOException setMuteSettings = settingsBuilder.setMuteSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + simulateSecurityHealthAnalyticsCustomModuleSettings = + settingsBuilder.simulateSecurityHealthAnalyticsCustomModuleSettings().build(); updateExternalSystemSettings = settingsBuilder.updateExternalSystemSettings().build(); updateFindingSettings = settingsBuilder.updateFindingSettings().build(); updateMuteConfigSettings = settingsBuilder.updateMuteConfigSettings().build(); @@ -1574,6 +1593,10 @@ public static class Builder extends StubSettings.Builder setIamPolicySettings; private final UnaryCallSettings.Builder testIamPermissionsSettings; + private final UnaryCallSettings.Builder< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleSettings; private final UnaryCallSettings.Builder updateExternalSystemSettings; private final UnaryCallSettings.Builder updateFindingSettings; @@ -1723,6 +1746,8 @@ protected Builder(ClientContext clientContext) { setMuteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + simulateSecurityHealthAnalyticsCustomModuleSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); updateExternalSystemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateFindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateMuteConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -1772,6 +1797,7 @@ protected Builder(ClientContext clientContext) { setMuteSettings, setIamPolicySettings, testIamPermissionsSettings, + simulateSecurityHealthAnalyticsCustomModuleSettings, updateExternalSystemSettings, updateFindingSettings, updateMuteConfigSettings, @@ -1831,6 +1857,8 @@ protected Builder(SecurityCenterStubSettings settings) { setMuteSettings = settings.setMuteSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + simulateSecurityHealthAnalyticsCustomModuleSettings = + settings.simulateSecurityHealthAnalyticsCustomModuleSettings.toBuilder(); updateExternalSystemSettings = settings.updateExternalSystemSettings.toBuilder(); updateFindingSettings = settings.updateFindingSettings.toBuilder(); updateMuteConfigSettings = settings.updateMuteConfigSettings.toBuilder(); @@ -1879,6 +1907,7 @@ protected Builder(SecurityCenterStubSettings settings) { setMuteSettings, setIamPolicySettings, testIamPermissionsSettings, + simulateSecurityHealthAnalyticsCustomModuleSettings, updateExternalSystemSettings, updateFindingSettings, updateMuteConfigSettings, @@ -2080,6 +2109,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder + .simulateSecurityHealthAnalyticsCustomModuleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .updateExternalSystemSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -2463,6 +2497,17 @@ public UnaryCallSettings.Builder setIamPolicySettin return testIamPermissionsSettings; } + /** + * Returns the builder for the settings used for calls to + * simulateSecurityHealthAnalyticsCustomModule. + */ + public UnaryCallSettings.Builder< + SimulateSecurityHealthAnalyticsCustomModuleRequest, + SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModuleSettings() { + return simulateSecurityHealthAnalyticsCustomModuleSettings; + } + /** Returns the builder for the settings used for calls to updateExternalSystem. */ public UnaryCallSettings.Builder updateExternalSystemSettings() { diff --git a/java-securitycenter/google-cloud-securitycenter/src/main/resources/META-INF/native-image/com.google.cloud.securitycenter.v1/reflect-config.json b/java-securitycenter/google-cloud-securitycenter/src/main/resources/META-INF/native-image/com.google.cloud.securitycenter.v1/reflect-config.json index 1d676c030ae2..81fbfbdb5b8c 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/main/resources/META-INF/native-image/com.google.cloud.securitycenter.v1/reflect-config.json +++ b/java-securitycenter/google-cloud-securitycenter/src/main/resources/META-INF/native-image/com.google.cloud.securitycenter.v1/reflect-config.json @@ -2501,6 +2501,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest$SimulatedResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest$SimulatedResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse$SimulatedResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse$SimulatedResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.securitycenter.v1.Source", "queryAllDeclaredConstructors": true, diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java index 4346fca42058..f7dd6165469f 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/MockSecurityCenterImpl.java @@ -745,6 +745,28 @@ public void testIamPermissions( } } + @Override + public void simulateSecurityHealthAnalyticsCustomModule( + SimulateSecurityHealthAnalyticsCustomModuleRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SimulateSecurityHealthAnalyticsCustomModuleResponse) { + requests.add(request); + responseObserver.onNext(((SimulateSecurityHealthAnalyticsCustomModuleResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SimulateSecurityHealthAnalyticsCustomModule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SimulateSecurityHealthAnalyticsCustomModuleResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void updateExternalSystem( UpdateExternalSystemRequest request, StreamObserver responseObserver) { diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java index 5f321e5140e7..4c13ddca3e17 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java @@ -4392,6 +4392,59 @@ public void testIamPermissionsExceptionTest2() throws Exception { } } + @Test + public void simulateSecurityHealthAnalyticsCustomModuleTest() throws Exception { + SimulateSecurityHealthAnalyticsCustomModuleResponse expectedResponse = + SimulateSecurityHealthAnalyticsCustomModuleResponse.newBuilder() + .setResult( + SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.newBuilder() + .build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-7807/securityHealthAnalyticsSettings"; + CustomConfig customConfig = CustomConfig.newBuilder().build(); + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build(); + + SimulateSecurityHealthAnalyticsCustomModuleResponse actualResponse = + client.simulateSecurityHealthAnalyticsCustomModule(parent, customConfig, resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void simulateSecurityHealthAnalyticsCustomModuleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-7807/securityHealthAnalyticsSettings"; + CustomConfig customConfig = CustomConfig.newBuilder().build(); + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build(); + client.simulateSecurityHealthAnalyticsCustomModule(parent, customConfig, resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void updateExternalSystemTest() throws Exception { ExternalSystem expectedResponse = diff --git a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java index 34d4066a4944..968f15cfe3ae 100644 --- a/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java +++ b/java-securitycenter/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java @@ -4031,6 +4031,56 @@ public void testIamPermissionsExceptionTest2() throws Exception { } } + @Test + public void simulateSecurityHealthAnalyticsCustomModuleTest() throws Exception { + SimulateSecurityHealthAnalyticsCustomModuleResponse expectedResponse = + SimulateSecurityHealthAnalyticsCustomModuleResponse.newBuilder() + .setResult( + SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.newBuilder() + .build()) + .build(); + mockSecurityCenter.addResponse(expectedResponse); + + String parent = "parent-995424086"; + CustomConfig customConfig = CustomConfig.newBuilder().build(); + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build(); + + SimulateSecurityHealthAnalyticsCustomModuleResponse actualResponse = + client.simulateSecurityHealthAnalyticsCustomModule(parent, customConfig, resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSecurityCenter.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SimulateSecurityHealthAnalyticsCustomModuleRequest actualRequest = + ((SimulateSecurityHealthAnalyticsCustomModuleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customConfig, actualRequest.getCustomConfig()); + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void simulateSecurityHealthAnalyticsCustomModuleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSecurityCenter.addException(exception); + + try { + String parent = "parent-995424086"; + CustomConfig customConfig = CustomConfig.newBuilder().build(); + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build(); + client.simulateSecurityHealthAnalyticsCustomModule(parent, customConfig, resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void updateExternalSystemTest() throws Exception { ExternalSystem expectedResponse = diff --git a/java-securitycenter/grpc-google-cloud-securitycenter-v1/pom.xml b/java-securitycenter/grpc-google-cloud-securitycenter-v1/pom.xml index 674f831783e2..411801c0ca3e 100644 --- a/java-securitycenter/grpc-google-cloud-securitycenter-v1/pom.xml +++ b/java-securitycenter/grpc-google-cloud-securitycenter-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1 - 2.36.0 + 2.37.0 grpc-google-cloud-securitycenter-v1 GRPC library for grpc-google-cloud-securitycenter-v1 com.google.cloud google-cloud-securitycenter-parent - 2.36.0 + 2.37.0 diff --git a/java-securitycenter/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java b/java-securitycenter/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java index d1e5ba701acc..c1773d02c9a0 100644 --- a/java-securitycenter/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java +++ b/java-securitycenter/grpc-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterGrpc.java @@ -1620,6 +1620,68 @@ private SecurityCenterGrpc() {} return getTestIamPermissionsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse> + getSimulateSecurityHealthAnalyticsCustomModuleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SimulateSecurityHealthAnalyticsCustomModule", + requestType = + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .class, + responseType = + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse> + getSimulateSecurityHealthAnalyticsCustomModuleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse> + getSimulateSecurityHealthAnalyticsCustomModuleMethod; + if ((getSimulateSecurityHealthAnalyticsCustomModuleMethod = + SecurityCenterGrpc.getSimulateSecurityHealthAnalyticsCustomModuleMethod) + == null) { + synchronized (SecurityCenterGrpc.class) { + if ((getSimulateSecurityHealthAnalyticsCustomModuleMethod = + SecurityCenterGrpc.getSimulateSecurityHealthAnalyticsCustomModuleMethod) + == null) { + SecurityCenterGrpc.getSimulateSecurityHealthAnalyticsCustomModuleMethod = + getSimulateSecurityHealthAnalyticsCustomModuleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "SimulateSecurityHealthAnalyticsCustomModule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SecurityCenterMethodDescriptorSupplier( + "SimulateSecurityHealthAnalyticsCustomModule")) + .build(); + } + } + } + return getSimulateSecurityHealthAnalyticsCustomModuleMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest, com.google.cloud.securitycenter.v1.ExternalSystem> @@ -2768,6 +2830,24 @@ default void testIamPermissions( getTestIamPermissionsMethod(), responseObserver); } + /** + * + * + *
+     * Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
+     * 
+ */ + default void simulateSecurityHealthAnalyticsCustomModule( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSimulateSecurityHealthAnalyticsCustomModuleMethod(), responseObserver); + } + /** * * @@ -3566,6 +3646,27 @@ public void testIamPermissions( responseObserver); } + /** + * + * + *
+     * Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
+     * 
+ */ + public void simulateSecurityHealthAnalyticsCustomModule( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getSimulateSecurityHealthAnalyticsCustomModuleMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -4281,6 +4382,24 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
+     * 
+ */ + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + simulateSecurityHealthAnalyticsCustomModule( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getSimulateSecurityHealthAnalyticsCustomModuleMethod(), + getCallOptions(), + request); + } + /** * * @@ -4981,6 +5100,24 @@ protected SecurityCenterFutureStub build( getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Simulates a given SecurityHealthAnalyticsCustomModule and Resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse> + simulateSecurityHealthAnalyticsCustomModule( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getSimulateSecurityHealthAnalyticsCustomModuleMethod(), getCallOptions()), + request); + } + /** * * @@ -5201,18 +5338,19 @@ protected SecurityCenterFutureStub build( private static final int METHODID_SET_MUTE = 29; private static final int METHODID_SET_IAM_POLICY = 30; private static final int METHODID_TEST_IAM_PERMISSIONS = 31; - private static final int METHODID_UPDATE_EXTERNAL_SYSTEM = 32; - private static final int METHODID_UPDATE_FINDING = 33; - private static final int METHODID_UPDATE_MUTE_CONFIG = 34; - private static final int METHODID_UPDATE_NOTIFICATION_CONFIG = 35; - private static final int METHODID_UPDATE_ORGANIZATION_SETTINGS = 36; - private static final int METHODID_UPDATE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE = 37; - private static final int METHODID_UPDATE_SOURCE = 38; - private static final int METHODID_UPDATE_SECURITY_MARKS = 39; - private static final int METHODID_CREATE_BIG_QUERY_EXPORT = 40; - private static final int METHODID_DELETE_BIG_QUERY_EXPORT = 41; - private static final int METHODID_UPDATE_BIG_QUERY_EXPORT = 42; - private static final int METHODID_LIST_BIG_QUERY_EXPORTS = 43; + private static final int METHODID_SIMULATE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE = 32; + private static final int METHODID_UPDATE_EXTERNAL_SYSTEM = 33; + private static final int METHODID_UPDATE_FINDING = 34; + private static final int METHODID_UPDATE_MUTE_CONFIG = 35; + private static final int METHODID_UPDATE_NOTIFICATION_CONFIG = 36; + private static final int METHODID_UPDATE_ORGANIZATION_SETTINGS = 37; + private static final int METHODID_UPDATE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE = 38; + private static final int METHODID_UPDATE_SOURCE = 39; + private static final int METHODID_UPDATE_SECURITY_MARKS = 40; + private static final int METHODID_CREATE_BIG_QUERY_EXPORT = 41; + private static final int METHODID_DELETE_BIG_QUERY_EXPORT = 42; + private static final int METHODID_UPDATE_BIG_QUERY_EXPORT = 43; + private static final int METHODID_LIST_BIG_QUERY_EXPORTS = 44; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -5439,6 +5577,16 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_SIMULATE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE: + serviceImpl.simulateSecurityHealthAnalyticsCustomModule( + (com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse>) + responseObserver); + break; case METHODID_UPDATE_EXTERNAL_SYSTEM: serviceImpl.updateExternalSystem( (com.google.cloud.securitycenter.v1.UpdateExternalSystemRequest) request, @@ -5754,6 +5902,15 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse>( service, METHODID_TEST_IAM_PERMISSIONS))) + .addMethod( + getSimulateSecurityHealthAnalyticsCustomModuleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest, + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse>( + service, METHODID_SIMULATE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE))) .addMethod( getUpdateExternalSystemMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -5919,6 +6076,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getSetMuteMethod()) .addMethod(getSetIamPolicyMethod()) .addMethod(getTestIamPermissionsMethod()) + .addMethod(getSimulateSecurityHealthAnalyticsCustomModuleMethod()) .addMethod(getUpdateExternalSystemMethod()) .addMethod(getUpdateFindingMethod()) .addMethod(getUpdateMuteConfigMethod()) diff --git a/java-securitycenter/grpc-google-cloud-securitycenter-v1beta1/pom.xml b/java-securitycenter/grpc-google-cloud-securitycenter-v1beta1/pom.xml index 70af4502bbb3..467b74a9e086 100644 --- a/java-securitycenter/grpc-google-cloud-securitycenter-v1beta1/pom.xml +++ b/java-securitycenter/grpc-google-cloud-securitycenter-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.131.0 + 0.132.0 grpc-google-cloud-securitycenter-v1beta1 GRPC library for grpc-google-cloud-securitycenter-v1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.36.0 + 2.37.0 diff --git a/java-securitycenter/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml b/java-securitycenter/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml index d44c20a28e31..7066c74c0078 100644 --- a/java-securitycenter/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml +++ b/java-securitycenter/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1p1beta1 - 0.131.0 + 0.132.0 grpc-google-cloud-securitycenter-v1p1beta1 GRPC library for grpc-google-cloud-securitycenter-v1p1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.36.0 + 2.37.0 diff --git a/java-securitycenter/pom.xml b/java-securitycenter/pom.xml index 38aea4cd0f02..9da620c6267e 100644 --- a/java-securitycenter/pom.xml +++ b/java-securitycenter/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-securitycenter-parent pom - 2.36.0 + 2.37.0 Google Cloud Security Command Center Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.api.grpc proto-google-cloud-securitycenter-v1 - 2.36.0 + 2.37.0 com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.131.0 + 0.132.0 com.google.api.grpc proto-google-cloud-securitycenter-v1p1beta1 - 0.131.0 + 0.132.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1 - 2.36.0 + 2.37.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1beta1 - 0.131.0 + 0.132.0 com.google.api.grpc grpc-google-cloud-securitycenter-v1p1beta1 - 0.131.0 + 0.132.0 com.google.cloud google-cloud-securitycenter - 2.36.0 + 2.37.0 diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/pom.xml b/java-securitycenter/proto-google-cloud-securitycenter-v1/pom.xml index 7a0b69653f5d..c1613ef12642 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/pom.xml +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-securitycenter-v1 - 2.36.0 + 2.37.0 proto-google-cloud-securitycenter-v1 PROTO library for proto-google-cloud-securitycenter-v1 com.google.cloud google-cloud-securitycenter-parent - 2.36.0 + 2.37.0 diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java index 73f1bff4aacf..c97fe8b66a24 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequest.java @@ -232,7 +232,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @return The muteAnnotation. */ @java.lang.Override @@ -259,7 +259,7 @@ public java.lang.String getMuteAnnotation() { * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @return The bytes for muteAnnotation. */ @java.lang.Override @@ -1011,7 +1011,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @return The muteAnnotation. */ @java.lang.Deprecated @@ -1037,7 +1037,7 @@ public java.lang.String getMuteAnnotation() { * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @return The bytes for muteAnnotation. */ @java.lang.Deprecated @@ -1063,7 +1063,7 @@ public com.google.protobuf.ByteString getMuteAnnotationBytes() { * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @param value The muteAnnotation to set. * @return This builder for chaining. */ @@ -1088,7 +1088,7 @@ public Builder setMuteAnnotation(java.lang.String value) { * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1109,7 +1109,7 @@ public Builder clearMuteAnnotation() { * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @param value The bytes for muteAnnotation to set. * @return This builder for chaining. */ diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java index 259c4794c3f3..dd86264f0518 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/BulkMuteFindingsRequestOrBuilder.java @@ -130,7 +130,7 @@ public interface BulkMuteFindingsRequestOrBuilder * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @return The muteAnnotation. */ @java.lang.Deprecated @@ -146,7 +146,7 @@ public interface BulkMuteFindingsRequestOrBuilder * string mute_annotation = 3 [deprecated = true]; * * @deprecated google.cloud.securitycenter.v1.BulkMuteFindingsRequest.mute_annotation is - * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=766 + * deprecated. See google/cloud/securitycenter/v1/securitycenter_service.proto;l=787 * @return The bytes for muteAnnotation. */ @java.lang.Deprecated diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java index 9461a9f2ef5d..46f1541be441 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java @@ -207,6 +207,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_securitycenter_v1_RunAssetDiscoveryRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_RunAssetDiscoveryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -289,638 +305,673 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "d/securitycenter/v1/run_asset_discovery_" + "response.proto\032Lgoogle/cloud/securitycen" + "ter/v1/security_health_analytics_custom_" - + "module.proto\0323google/cloud/securitycente" - + "r/v1/security_marks.proto\032+google/cloud/" - + "securitycenter/v1/source.proto\032\036google/i" - + "am/v1/iam_policy.proto\032\032google/iam/v1/po" - + "licy.proto\032#google/longrunning/operation" - + "s.proto\032\036google/protobuf/duration.proto\032" - + "\033google/protobuf/empty.proto\032 google/pro" - + "tobuf/field_mask.proto\032\034google/protobuf/" - + "struct.proto\032\037google/protobuf/timestamp." - + "proto\"b\n\027BulkMuteFindingsRequest\022\032\n\006pare" - + "nt\030\001 \001(\tB\n\342A\001\002\372A\003\n\001*\022\016\n\006filter\030\002 \001(\t\022\033\n\017" - + "mute_annotation\030\003 \001(\tB\002\030\001\"\032\n\030BulkMuteFin" - + "dingsResponse\"\257\001\n\024CreateFindingRequest\022=" - + "\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\n$securitycenter." - + "googleapis.com/Source\022\030\n\nfinding_id\030\002 \001(" - + "\tB\004\342A\001\002\022>\n\007finding\030\003 \001(\0132\'.google.cloud." - + "securitycenter.v1.FindingB\004\342A\001\002\"\301\001\n\027Crea" - + "teMuteConfigRequest\022A\n\006parent\030\001 \001(\tB1\342A\001" - + "\002\372A*\022(securitycenter.googleapis.com/Mute" - + "Config\022E\n\013mute_config\030\002 \001(\0132*.google.clo" - + "ud.securitycenter.v1.MuteConfigB\004\342A\001\002\022\034\n" - + "\016mute_config_id\030\003 \001(\tB\004\342A\001\002\"\334\001\n\037CreateNo" - + "tificationConfigRequest\022I\n\006parent\030\001 \001(\tB" - + "9\342A\001\002\372A2\0220securitycenter.googleapis.com/" - + "NotificationConfig\022\027\n\tconfig_id\030\002 \001(\tB\004\342" - + "A\001\002\022U\n\023notification_config\030\003 \001(\01322.googl" - + "e.cloud.securitycenter.v1.NotificationCo" - + "nfigB\004\342A\001\002\"\212\002\n0CreateSecurityHealthAnaly" - + "ticsCustomModuleRequest\022Z\n\006parent\030\001 \001(\tB" - + "J\342A\001\002\372AC\022Asecuritycenter.googleapis.com/" - + "SecurityHealthAnalyticsCustomModule\022z\n\'s" - + "ecurity_health_analytics_custom_module\030\002" - + " \001(\0132C.google.cloud.securitycenter.v1.Se" - + "curityHealthAnalyticsCustomModuleB\004\342A\001\002\"" - + "\236\001\n\023CreateSourceRequest\022I\n\006parent\030\001 \001(\tB" - + "9\342A\001\002\372A2\n0cloudresourcemanager.googleapi" - + "s.com/Organization\022<\n\006source\030\002 \001(\0132&.goo" - + "gle.cloud.securitycenter.v1.SourceB\004\342A\001\002" - + "\"Z\n\027DeleteMuteConfigRequest\022?\n\004name\030\001 \001(" - + "\tB1\342A\001\002\372A*\n(securitycenter.googleapis.co" - + "m/MuteConfig\"j\n\037DeleteNotificationConfig" - + "Request\022G\n\004name\030\001 \001(\tB9\342A\001\002\372A2\n0security" - + "center.googleapis.com/NotificationConfig" - + "\"\214\001\n0DeleteSecurityHealthAnalyticsCustom" - + "ModuleRequest\022X\n\004name\030\001 \001(\tBJ\342A\001\002\372AC\nAse" - + "curitycenter.googleapis.com/SecurityHeal" - + "thAnalyticsCustomModule\"_\n\030GetBigQueryEx" - + "portRequest\022C\n\004name\030\001 \001(\tB5\342A\001\002\372A.\n,secu" - + "ritycenter.googleapis.com/BigQueryExport" - + "\"W\n\024GetMuteConfigRequest\022?\n\004name\030\001 \001(\tB1" - + "\342A\001\002\372A*\n(securitycenter.googleapis.com/M" - + "uteConfig\"g\n\034GetNotificationConfigReques" - + "t\022G\n\004name\030\001 \001(\tB9\342A\001\002\372A2\n0securitycenter" - + ".googleapis.com/NotificationConfig\"k\n\036Ge" - + "tOrganizationSettingsRequest\022I\n\004name\030\001 \001" - + "(\tB;\342A\001\002\372A4\n2securitycenter.googleapis.c" - + "om/OrganizationSettings\"\233\001\n6GetEffective" - + "SecurityHealthAnalyticsCustomModuleReque" - + "st\022a\n\004name\030\001 \001(\tBS\342A\001\002\372AL\nJsecuritycente" - + "r.googleapis.com/EffectiveSecurityHealth" - + "AnalyticsCustomModule\"\211\001\n-GetSecurityHea" - + "lthAnalyticsCustomModuleRequest\022X\n\004name\030" - + "\001 \001(\tBJ\342A\001\002\372AC\nAsecuritycenter.googleapi" - + "s.com/SecurityHealthAnalyticsCustomModul" - + "e\"O\n\020GetSourceRequest\022;\n\004name\030\001 \001(\tB-\342A\001" - + "\002\372A&\n$securitycenter.googleapis.com/Sour" - + "ce\"\205\002\n\022GroupAssetsRequest\022<\n\006parent\030\001 \001(" - + "\tB,\342A\001\002\372A%\022#securitycenter.googleapis.co" - + "m/Asset\022\016\n\006filter\030\002 \001(\t\022\026\n\010group_by\030\003 \001(" - + "\tB\004\342A\001\002\0223\n\020compare_duration\030\004 \001(\0132\031.goog" - + "le.protobuf.Duration\022-\n\tread_time\030\005 \001(\0132" - + "\032.google.protobuf.Timestamp\022\022\n\npage_toke" - + "n\030\007 \001(\t\022\021\n\tpage_size\030\010 \001(\005\"\270\001\n\023GroupAsse" - + "tsResponse\022E\n\020group_by_results\030\001 \003(\0132+.g" - + "oogle.cloud.securitycenter.v1.GroupResul" - + "t\022-\n\tread_time\030\002 \001(\0132\032.google.protobuf.T" - + "imestamp\022\027\n\017next_page_token\030\003 \001(\t\022\022\n\ntot" - + "al_size\030\004 \001(\005\"\210\002\n\024GroupFindingsRequest\022=" - + "\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\n$securitycenter." - + "googleapis.com/Source\022\016\n\006filter\030\002 \001(\t\022\026\n" - + "\010group_by\030\003 \001(\tB\004\342A\001\002\022-\n\tread_time\030\004 \001(\013" - + "2\032.google.protobuf.Timestamp\0223\n\020compare_" - + "duration\030\005 \001(\0132\031.google.protobuf.Duratio" - + "n\022\022\n\npage_token\030\007 \001(\t\022\021\n\tpage_size\030\010 \001(\005" - + "\"\272\001\n\025GroupFindingsResponse\022E\n\020group_by_r" - + "esults\030\001 \003(\0132+.google.cloud.securitycent" - + "er.v1.GroupResult\022-\n\tread_time\030\002 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\022\027\n\017next_page_to" - + "ken\030\003 \001(\t\022\022\n\ntotal_size\030\004 \001(\005\"\270\001\n\013GroupR" - + "esult\022O\n\nproperties\030\001 \003(\0132;.google.cloud" - + ".securitycenter.v1.GroupResult.Propertie" - + "sEntry\022\r\n\005count\030\002 \001(\003\032I\n\017PropertiesEntry" - + "\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.pr" - + "otobuf.Value:\0028\001\"\276\001\n9ListDescendantSecur" - + "ityHealthAnalyticsCustomModulesRequest\022Z" - + "\n\006parent\030\001 \001(\tBJ\342A\001\002\372AC\022Asecuritycenter." - + "googleapis.com/SecurityHealthAnalyticsCu" - + "stomModule\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to" - + "ken\030\003 \001(\t\"\314\001\n:ListDescendantSecurityHeal" - + "thAnalyticsCustomModulesResponse\022u\n(secu" - + "rity_health_analytics_custom_modules\030\001 \003" - + "(\0132C.google.cloud.securitycenter.v1.Secu" - + "rityHealthAnalyticsCustomModule\022\027\n\017next_" - + "page_token\030\002 \001(\t\"\202\001\n\026ListMuteConfigsRequ" - + "est\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\022(securityce" - + "nter.googleapis.com/MuteConfig\022\021\n\tpage_s" - + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"t\n\027ListMut" - + "eConfigsResponse\022@\n\014mute_configs\030\001 \003(\0132*" - + ".google.cloud.securitycenter.v1.MuteConf" - + "ig\022\027\n\017next_page_token\030\002 \001(\t\"\222\001\n\036ListNoti" - + "ficationConfigsRequest\022I\n\006parent\030\001 \001(\tB9" - + "\342A\001\002\372A2\0220securitycenter.googleapis.com/N" - + "otificationConfig\022\022\n\npage_token\030\002 \001(\t\022\021\n" - + "\tpage_size\030\003 \001(\005\"\214\001\n\037ListNotificationCon" - + "figsResponse\022P\n\024notification_configs\030\001 \003" - + "(\01322.google.cloud.securitycenter.v1.Noti" - + "ficationConfig\022\027\n\017next_page_token\030\002 \001(\t\"" - + "\275\001\n8ListEffectiveSecurityHealthAnalytics" - + "CustomModulesRequest\022Z\n\006parent\030\001 \001(\tBJ\342A" - + "\001\002\372AC\022Asecuritycenter.googleapis.com/Sec" - + "urityHealthAnalyticsCustomModule\022\021\n\tpage" - + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\337\001\n9List" + + "config.proto\032Lgoogle/cloud/securitycente" + + "r/v1/security_health_analytics_custom_mo" + + "dule.proto\0323google/cloud/securitycenter/" + + "v1/security_marks.proto\032+google/cloud/se" + + "curitycenter/v1/source.proto\032\036google/iam" + + "/v1/iam_policy.proto\032\032google/iam/v1/poli" + + "cy.proto\032#google/longrunning/operations." + + "proto\032\036google/protobuf/duration.proto\032\033g" + + "oogle/protobuf/empty.proto\032 google/proto" + + "buf/field_mask.proto\032\034google/protobuf/st" + + "ruct.proto\032\037google/protobuf/timestamp.pr" + + "oto\032\027google/rpc/status.proto\"b\n\027BulkMute" + + "FindingsRequest\022\032\n\006parent\030\001 \001(\tB\n\342A\001\002\372A\003" + + "\n\001*\022\016\n\006filter\030\002 \001(\t\022\033\n\017mute_annotation\030\003" + + " \001(\tB\002\030\001\"\032\n\030BulkMuteFindingsResponse\"\257\001\n" + + "\024CreateFindingRequest\022=\n\006parent\030\001 \001(\tB-\342" + + "A\001\002\372A&\n$securitycenter.googleapis.com/So" + + "urce\022\030\n\nfinding_id\030\002 \001(\tB\004\342A\001\002\022>\n\007findin" + + "g\030\003 \001(\0132\'.google.cloud.securitycenter.v1" + + ".FindingB\004\342A\001\002\"\301\001\n\027CreateMuteConfigReque" + + "st\022A\n\006parent\030\001 \001(\tB1\342A\001\002\372A*\022(securitycen" + + "ter.googleapis.com/MuteConfig\022E\n\013mute_co" + + "nfig\030\002 \001(\0132*.google.cloud.securitycenter" + + ".v1.MuteConfigB\004\342A\001\002\022\034\n\016mute_config_id\030\003" + + " \001(\tB\004\342A\001\002\"\334\001\n\037CreateNotificationConfigR" + + "equest\022I\n\006parent\030\001 \001(\tB9\342A\001\002\372A2\0220securit" + + "ycenter.googleapis.com/NotificationConfi" + + "g\022\027\n\tconfig_id\030\002 \001(\tB\004\342A\001\002\022U\n\023notificati" + + "on_config\030\003 \001(\01322.google.cloud.securityc" + + "enter.v1.NotificationConfigB\004\342A\001\002\"\212\002\n0Cr" + + "eateSecurityHealthAnalyticsCustomModuleR" + + "equest\022Z\n\006parent\030\001 \001(\tBJ\342A\001\002\372AC\022Asecurit" + + "ycenter.googleapis.com/SecurityHealthAna" + + "lyticsCustomModule\022z\n\'security_health_an" + + "alytics_custom_module\030\002 \001(\0132C.google.clo" + + "ud.securitycenter.v1.SecurityHealthAnaly" + + "ticsCustomModuleB\004\342A\001\002\"\236\001\n\023CreateSourceR" + + "equest\022I\n\006parent\030\001 \001(\tB9\342A\001\002\372A2\n0cloudre" + + "sourcemanager.googleapis.com/Organizatio" + + "n\022<\n\006source\030\002 \001(\0132&.google.cloud.securit" + + "ycenter.v1.SourceB\004\342A\001\002\"Z\n\027DeleteMuteCon" + + "figRequest\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(secur" + + "itycenter.googleapis.com/MuteConfig\"j\n\037D" + + "eleteNotificationConfigRequest\022G\n\004name\030\001" + + " \001(\tB9\342A\001\002\372A2\n0securitycenter.googleapis" + + ".com/NotificationConfig\"\214\001\n0DeleteSecuri" + + "tyHealthAnalyticsCustomModuleRequest\022X\n\004" + + "name\030\001 \001(\tBJ\342A\001\002\372AC\nAsecuritycenter.goog" + + "leapis.com/SecurityHealthAnalyticsCustom" + + "Module\"_\n\030GetBigQueryExportRequest\022C\n\004na" + + "me\030\001 \001(\tB5\342A\001\002\372A.\n,securitycenter.google" + + "apis.com/BigQueryExport\"W\n\024GetMuteConfig" + + "Request\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(security" + + "center.googleapis.com/MuteConfig\"g\n\034GetN" + + "otificationConfigRequest\022G\n\004name\030\001 \001(\tB9" + + "\342A\001\002\372A2\n0securitycenter.googleapis.com/N" + + "otificationConfig\"k\n\036GetOrganizationSett" + + "ingsRequest\022I\n\004name\030\001 \001(\tB;\342A\001\002\372A4\n2secu" + + "ritycenter.googleapis.com/OrganizationSe" + + "ttings\"\233\001\n6GetEffectiveSecurityHealthAna" + + "lyticsCustomModuleRequest\022a\n\004name\030\001 \001(\tB" + + "S\342A\001\002\372AL\nJsecuritycenter.googleapis.com/" + "EffectiveSecurityHealthAnalyticsCustomMo" - + "dulesResponse\022\210\001\n2effective_security_hea" - + "lth_analytics_custom_modules\030\001 \003(\0132L.goo" - + "gle.cloud.securitycenter.v1.EffectiveSec" - + "urityHealthAnalyticsCustomModule\022\027\n\017next" - + "_page_token\030\002 \001(\t\"\264\001\n/ListSecurityHealth" - + "AnalyticsCustomModulesRequest\022Z\n\006parent\030" - + "\001 \001(\tBJ\342A\001\002\372AC\022Asecuritycenter.googleapi" - + "s.com/SecurityHealthAnalyticsCustomModul" - + "e\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" - + "\"\302\001\n0ListSecurityHealthAnalyticsCustomMo" - + "dulesResponse\022u\n(security_health_analyti" - + "cs_custom_modules\030\001 \003(\0132C.google.cloud.s" - + "ecuritycenter.v1.SecurityHealthAnalytics" - + "CustomModule\022\027\n\017next_page_token\030\002 \001(\t\"z\n" - + "\022ListSourcesRequest\022=\n\006parent\030\001 \001(\tB-\342A\001" - + "\002\372A&\022$securitycenter.googleapis.com/Sour" - + "ce\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\007 \001(" - + "\005\"g\n\023ListSourcesResponse\0227\n\007sources\030\001 \003(" - + "\0132&.google.cloud.securitycenter.v1.Sourc" - + "e\022\027\n\017next_page_token\030\002 \001(\t\"\256\002\n\021ListAsset" + + "dule\"\211\001\n-GetSecurityHealthAnalyticsCusto" + + "mModuleRequest\022X\n\004name\030\001 \001(\tBJ\342A\001\002\372AC\nAs" + + "ecuritycenter.googleapis.com/SecurityHea" + + "lthAnalyticsCustomModule\"O\n\020GetSourceReq" + + "uest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$securitycen" + + "ter.googleapis.com/Source\"\205\002\n\022GroupAsset" + "sRequest\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372A%\022#secur" + "itycenter.googleapis.com/Asset\022\016\n\006filter" - + "\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t\022-\n\tread_time\030\004 " - + "\001(\0132\032.google.protobuf.Timestamp\0223\n\020compa" - + "re_duration\030\005 \001(\0132\031.google.protobuf.Dura" - + "tion\022.\n\nfield_mask\030\007 \001(\0132\032.google.protob" - + "uf.FieldMask\022\022\n\npage_token\030\010 \001(\t\022\021\n\tpage" - + "_size\030\t \001(\005\"\303\003\n\022ListAssetsResponse\022`\n\023li" - + "st_assets_results\030\001 \003(\0132C.google.cloud.s" - + "ecuritycenter.v1.ListAssetsResponse.List" - + "AssetsResult\022-\n\tread_time\030\002 \001(\0132\032.google" - + ".protobuf.Timestamp\022\027\n\017next_page_token\030\003" - + " \001(\t\022\022\n\ntotal_size\030\004 \001(\005\032\356\001\n\020ListAssetsR" - + "esult\0224\n\005asset\030\001 \001(\0132%.google.cloud.secu" - + "ritycenter.v1.Asset\022e\n\014state_change\030\002 \001(" - + "\0162O.google.cloud.securitycenter.v1.ListA" - + "ssetsResponse.ListAssetsResult.StateChan" - + "ge\"=\n\013StateChange\022\n\n\006UNUSED\020\000\022\t\n\005ADDED\020\001" - + "\022\013\n\007REMOVED\020\002\022\n\n\006ACTIVE\020\003\"\261\002\n\023ListFindin" - + "gsRequest\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\n$secu" - + "ritycenter.googleapis.com/Source\022\016\n\006filt" - + "er\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t\022-\n\tread_time\030" - + "\004 \001(\0132\032.google.protobuf.Timestamp\0223\n\020com" - + "pare_duration\030\005 \001(\0132\031.google.protobuf.Du" - + "ration\022.\n\nfield_mask\030\007 \001(\0132\032.google.prot" - + "obuf.FieldMask\022\022\n\npage_token\030\010 \001(\t\022\021\n\tpa" - + "ge_size\030\t \001(\005\"\255\006\n\024ListFindingsResponse\022f" - + "\n\025list_findings_results\030\001 \003(\0132G.google.c" - + "loud.securitycenter.v1.ListFindingsRespo" - + "nse.ListFindingsResult\022-\n\tread_time\030\002 \001(" - + "\0132\032.google.protobuf.Timestamp\022\027\n\017next_pa" - + "ge_token\030\003 \001(\t\022\022\n\ntotal_size\030\004 \001(\005\032\320\004\n\022L" - + "istFindingsResult\0228\n\007finding\030\001 \001(\0132\'.goo" - + "gle.cloud.securitycenter.v1.Finding\022i\n\014s" - + "tate_change\030\002 \001(\0162S.google.cloud.securit" - + "ycenter.v1.ListFindingsResponse.ListFind" - + "ingsResult.StateChange\022h\n\010resource\030\003 \001(\013" - + "2P.google.cloud.securitycenter.v1.ListFi" - + "ndingsResponse.ListFindingsResult.Resour" - + "ceB\004\342A\001\003\032\333\001\n\010Resource\022\014\n\004name\030\001 \001(\t\022\024\n\014d" - + "isplay_name\030\010 \001(\t\022\014\n\004type\030\006 \001(\t\022\024\n\014proje" - + "ct_name\030\002 \001(\t\022\034\n\024project_display_name\030\003 " - + "\001(\t\022\023\n\013parent_name\030\004 \001(\t\022\033\n\023parent_displ" - + "ay_name\030\005 \001(\t\0227\n\007folders\030\007 \003(\0132&.google." - + "cloud.securitycenter.v1.Folder\"M\n\013StateC" - + "hange\022\n\n\006UNUSED\020\000\022\013\n\007CHANGED\020\001\022\r\n\tUNCHAN" - + "GED\020\002\022\t\n\005ADDED\020\003\022\013\n\007REMOVED\020\004\"\320\001\n\026SetFin" - + "dingStateRequest\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n" - + "%securitycenter.googleapis.com/Finding\022B" - + "\n\005state\030\002 \001(\0162-.google.cloud.securitycen" - + "ter.v1.Finding.StateB\004\342A\001\002\0224\n\nstart_time" - + "\030\003 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\002" - + "\"\220\001\n\016SetMuteRequest\022<\n\004name\030\001 \001(\tB.\342A\001\002\372" - + "A\'\n%securitycenter.googleapis.com/Findin" - + "g\022@\n\004mute\030\002 \001(\0162,.google.cloud.securityc" - + "enter.v1.Finding.MuteB\004\342A\001\002\"e\n\030RunAssetD" - + "iscoveryRequest\022I\n\006parent\030\001 \001(\tB9\342A\001\002\372A2" - + "\n0cloudresourcemanager.googleapis.com/Or" - + "ganization\"\235\001\n\033UpdateExternalSystemReque" - + "st\022M\n\017external_system\030\001 \001(\0132..google.clo" - + "ud.securitycenter.v1.ExternalSystemB\004\342A\001" - + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" - + ".FieldMask\"\207\001\n\024UpdateFindingRequest\022>\n\007f" - + "inding\030\001 \001(\0132\'.google.cloud.securitycent" - + "er.v1.FindingB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMask\"\221\001\n\027UpdateM" - + "uteConfigRequest\022E\n\013mute_config\030\001 \001(\0132*." - + "google.cloud.securitycenter.v1.MuteConfi" - + "gB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.pr" - + "otobuf.FieldMask\"\251\001\n\037UpdateNotificationC" - + "onfigRequest\022U\n\023notification_config\030\001 \001(" - + "\01322.google.cloud.securitycenter.v1.Notif" - + "icationConfigB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMask\"\257\001\n!UpdateO" - + "rganizationSettingsRequest\022Y\n\025organizati" - + "on_settings\030\001 \001(\01324.google.cloud.securit" - + "ycenter.v1.OrganizationSettingsB\004\342A\001\002\022/\n" - + "\013update_mask\030\002 \001(\0132\032.google.protobuf.Fie" - + "ldMask\"\337\001\n0UpdateSecurityHealthAnalytics" - + "CustomModuleRequest\022z\n\'security_health_a" - + "nalytics_custom_module\030\001 \001(\0132C.google.cl" - + "oud.securitycenter.v1.SecurityHealthAnal" - + "yticsCustomModuleB\004\342A\001\002\022/\n\013update_mask\030\002" - + " \001(\0132\032.google.protobuf.FieldMask\"\204\001\n\023Upd" - + "ateSourceRequest\022<\n\006source\030\001 \001(\0132&.googl" - + "e.cloud.securitycenter.v1.SourceB\004\342A\001\002\022/" - + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" - + "eldMask\"\312\001\n\032UpdateSecurityMarksRequest\022K" - + "\n\016security_marks\030\001 \001(\0132-.google.cloud.se" - + "curitycenter.v1.SecurityMarksB\004\342A\001\002\022/\n\013u" - + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" - + "Mask\022.\n\nstart_time\030\003 \001(\0132\032.google.protob" - + "uf.Timestamp\"\327\001\n\033CreateBigQueryExportReq" - + "uest\022E\n\006parent\030\001 \001(\tB5\342A\001\002\372A.\022,securityc" - + "enter.googleapis.com/BigQueryExport\022N\n\020b" - + "ig_query_export\030\002 \001(\0132..google.cloud.sec" - + "uritycenter.v1.BigQueryExportB\004\342A\001\002\022!\n\023b" - + "ig_query_export_id\030\003 \001(\tB\004\342A\001\002\"\236\001\n\033Updat" - + "eBigQueryExportRequest\022N\n\020big_query_expo" - + "rt\030\001 \001(\0132..google.cloud.securitycenter.v" - + "1.BigQueryExportB\004\342A\001\002\022/\n\013update_mask\030\002 " - + "\001(\0132\032.google.protobuf.FieldMask\"\212\001\n\032List" - + "BigQueryExportsRequest\022E\n\006parent\030\001 \001(\tB5" - + "\342A\001\002\372A.\022,securitycenter.googleapis.com/B" - + "igQueryExport\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" - + "_token\030\003 \001(\t\"\201\001\n\033ListBigQueryExportsResp" - + "onse\022I\n\021big_query_exports\030\001 \003(\0132..google" - + ".cloud.securitycenter.v1.BigQueryExport\022" - + "\027\n\017next_page_token\030\002 \001(\t\"b\n\033DeleteBigQue" - + "ryExportRequest\022C\n\004name\030\001 \001(\tB5\342A\001\002\372A.\n," - + "securitycenter.googleapis.com/BigQueryEx" - + "port2\213t\n\016SecurityCenter\022\342\002\n\020BulkMuteFind" - + "ings\0227.google.cloud.securitycenter.v1.Bu" - + "lkMuteFindingsRequest\032\035.google.longrunni" - + "ng.Operation\"\365\001\312AP\n7google.cloud.securit" - + "ycenter.v1.BulkMuteFindingsResponse\022\025goo" - + "gle.protobuf.Empty\332A\006parent\202\323\344\223\002\222\001\"./v1/" - + "{parent=organizations/*}/findings:bulkMu" - + "te:\001*Z-\"(/v1/{parent=folders/*}/findings" - + ":bulkMute:\001*Z.\")/v1/{parent=projects/*}/" - + "findings:bulkMute:\001*\022\325\004\n)CreateSecurityH" - + "ealthAnalyticsCustomModule\022P.google.clou" - + "d.securitycenter.v1.CreateSecurityHealth" - + "AnalyticsCustomModuleRequest\032C.google.cl" - + "oud.securitycenter.v1.SecurityHealthAnal" - + "yticsCustomModule\"\220\003\332A.parent,security_h" - + "ealth_analytics_custom_module\202\323\344\223\002\330\002\"J/v" - + "1/{parent=organizations/*/securityHealth" - + "AnalyticsSettings}/customModules:\'securi" - + "ty_health_analytics_custom_moduleZo\"D/v1" - + "/{parent=folders/*/securityHealthAnalyti" - + "csSettings}/customModules:\'security_heal" - + "th_analytics_custom_moduleZp\"E/v1/{paren" - + "t=projects/*/securityHealthAnalyticsSett" - + "ings}/customModules:\'security_health_ana" - + "lytics_custom_module\022\261\001\n\014CreateSource\0223." - + "google.cloud.securitycenter.v1.CreateSou" - + "rceRequest\032&.google.cloud.securitycenter" - + ".v1.Source\"D\332A\rparent,source\202\323\344\223\002.\"$/v1/" - + "{parent=organizations/*}/sources:\006source" - + "\022\314\001\n\rCreateFinding\0224.google.cloud.securi" - + "tycenter.v1.CreateFindingRequest\032\'.googl" - + "e.cloud.securitycenter.v1.Finding\"\\\332A\031pa" - + "rent,finding_id,finding\202\323\344\223\002:\"//v1/{pare" - + "nt=organizations/*/sources/*}/findings:\007" - + "finding\022\330\002\n\020CreateMuteConfig\0227.google.cl" - + "oud.securitycenter.v1.CreateMuteConfigRe" - + "quest\032*.google.cloud.securitycenter.v1.M" - + "uteConfig\"\336\001\332A\022parent,mute_config\332A!pare" - + "nt,mute_config,mute_config_id\202\323\344\223\002\236\001\"(/v" - + "1/{parent=organizations/*}/muteConfigs:\013" - + "mute_configZ1\"\"/v1/{parent=folders/*}/mu" - + "teConfigs:\013mute_configZ2\"#/v1/{parent=pr" - + "ojects/*}/muteConfigs:\013mute_config\022\253\003\n\030C" - + "reateNotificationConfig\022?.google.cloud.s" - + "ecuritycenter.v1.CreateNotificationConfi" - + "gRequest\0322.google.cloud.securitycenter.v" - + "1.NotificationConfig\"\231\002\332A$parent,config_" - + "id,notification_config\332A\032parent,notifica" - + "tion_config\202\323\344\223\002\316\001\"0/v1/{parent=organiza" - + "tions/*}/notificationConfigs:\023notificati" - + "on_configZA\"*/v1/{parent=folders/*}/noti" - + "ficationConfigs:\023notification_configZB\"+" - + "/v1/{parent=projects/*}/notificationConf" - + "igs:\023notification_config\022\352\001\n\020DeleteMuteC" - + "onfig\0227.google.cloud.securitycenter.v1.D" - + "eleteMuteConfigRequest\032\026.google.protobuf" - + ".Empty\"\204\001\332A\004name\202\323\344\223\002w*(/v1/{name=organi" - + "zations/*/muteConfigs/*}Z$*\"/v1/{name=fo" - + "lders/*/muteConfigs/*}Z%*#/v1/{name=proj" - + "ects/*/muteConfigs/*}\022\223\002\n\030DeleteNotifica" - + "tionConfig\022?.google.cloud.securitycenter" - + ".v1.DeleteNotificationConfigRequest\032\026.go" - + "ogle.protobuf.Empty\"\235\001\332A\004name\202\323\344\223\002\217\001*0/v" - + "1/{name=organizations/*/notificationConf" - + "igs/*}Z,**/v1/{name=folders/*/notificati" - + "onConfigs/*}Z-*+/v1/{name=projects/*/not" - + "ificationConfigs/*}\022\203\003\n)DeleteSecurityHe" - + "althAnalyticsCustomModule\022P.google.cloud" - + ".securitycenter.v1.DeleteSecurityHealthA" - + "nalyticsCustomModuleRequest\032\026.google.pro" - + "tobuf.Empty\"\353\001\332A\004name\202\323\344\223\002\335\001*J/v1/{name=" - + "organizations/*/securityHealthAnalyticsS" - + "ettings/customModules/*}ZF*D/v1/{name=fo" - + "lders/*/securityHealthAnalyticsSettings/" - + "customModules/*}ZG*E/v1/{name=projects/*" - + "/securityHealthAnalyticsSettings/customM" - + "odules/*}\022\221\002\n\021GetBigQueryExport\0228.google" - + ".cloud.securitycenter.v1.GetBigQueryExpo" - + "rtRequest\032..google.cloud.securitycenter." - + "v1.BigQueryExport\"\221\001\332A\004name\202\323\344\223\002\203\001\022,/v1/" - + "{name=organizations/*/bigQueryExports/*}" - + "Z(\022&/v1/{name=folders/*/bigQueryExports/" - + "*}Z)\022\'/v1/{name=projects/*/bigQueryExpor" - + "ts/*}\022\226\001\n\014GetIamPolicy\022\".google.iam.v1.G" - + "etIamPolicyRequest\032\025.google.iam.v1.Polic" - + "y\"K\332A\010resource\202\323\344\223\002:\"5/v1/{resource=orga" - + "nizations/*/sources/*}:getIamPolicy:\001*\022\370" - + "\001\n\rGetMuteConfig\0224.google.cloud.security" - + "center.v1.GetMuteConfigRequest\032*.google." - + "cloud.securitycenter.v1.MuteConfig\"\204\001\332A\004" - + "name\202\323\344\223\002w\022(/v1/{name=organizations/*/mu" - + "teConfigs/*}Z$\022\"/v1/{name=folders/*/mute" - + "Configs/*}Z%\022#/v1/{name=projects/*/muteC" - + "onfigs/*}\022\251\002\n\025GetNotificationConfig\022<.go" - + "ogle.cloud.securitycenter.v1.GetNotifica" - + "tionConfigRequest\0322.google.cloud.securit" - + "ycenter.v1.NotificationConfig\"\235\001\332A\004name\202" - + "\323\344\223\002\217\001\0220/v1/{name=organizations/*/notifi" - + "cationConfigs/*}Z,\022*/v1/{name=folders/*/" - + "notificationConfigs/*}Z-\022+/v1/{name=proj" - + "ects/*/notificationConfigs/*}\022\317\001\n\027GetOrg" - + "anizationSettings\022>.google.cloud.securit" - + "ycenter.v1.GetOrganizationSettingsReques" - + "t\0324.google.cloud.securitycenter.v1.Organ" - + "izationSettings\">\332A\004name\202\323\344\223\0021\022//v1/{nam" - + "e=organizations/*/organizationSettings}\022" - + "\340\003\n/GetEffectiveSecurityHealthAnalyticsC" - + "ustomModule\022V.google.cloud.securitycente" - + "r.v1.GetEffectiveSecurityHealthAnalytics" - + "CustomModuleRequest\032L.google.cloud.secur" - + "itycenter.v1.EffectiveSecurityHealthAnal" - + "yticsCustomModule\"\206\002\332A\004name\202\323\344\223\002\370\001\022S/v1/" - + "{name=organizations/*/securityHealthAnal" - + "yticsSettings/effectiveCustomModules/*}Z" - + "O\022M/v1/{name=folders/*/securityHealthAna" - + "lyticsSettings/effectiveCustomModules/*}" - + "ZP\022N/v1/{name=projects/*/securityHealthA" - + "nalyticsSettings/effectiveCustomModules/" - + "*}\022\252\003\n&GetSecurityHealthAnalyticsCustomM" - + "odule\022M.google.cloud.securitycenter.v1.G" - + "etSecurityHealthAnalyticsCustomModuleReq" - + "uest\032C.google.cloud.securitycenter.v1.Se" - + "curityHealthAnalyticsCustomModule\"\353\001\332A\004n" - + "ame\202\323\344\223\002\335\001\022J/v1/{name=organizations/*/se" - + "curityHealthAnalyticsSettings/customModu", - "les/*}ZF\022D/v1/{name=folders/*/securityHe" - + "althAnalyticsSettings/customModules/*}ZG" - + "\022E/v1/{name=projects/*/securityHealthAna" - + "lyticsSettings/customModules/*}\022\232\001\n\tGetS" - + "ource\0220.google.cloud.securitycenter.v1.G" - + "etSourceRequest\032&.google.cloud.securityc" - + "enter.v1.Source\"3\332A\004name\202\323\344\223\002&\022$/v1/{nam" - + "e=organizations/*/sources/*}\022\206\002\n\013GroupAs" - + "sets\0222.google.cloud.securitycenter.v1.Gr" - + "oupAssetsRequest\0323.google.cloud.security" - + "center.v1.GroupAssetsResponse\"\215\001\210\002\001\202\323\344\223\002" - + "\203\001\")/v1/{parent=organizations/*}/assets:" - + "group:\001*Z(\"#/v1/{parent=folders/*}/asset" - + "s:group:\001*Z)\"$/v1/{parent=projects/*}/as" - + "sets:group:\001*\022\277\002\n\rGroupFindings\0224.google" - + ".cloud.securitycenter.v1.GroupFindingsRe" - + "quest\0325.google.cloud.securitycenter.v1.G" - + "roupFindingsResponse\"\300\001\332A\017parent,group_b" - + "y\202\323\344\223\002\247\001\"5/v1/{parent=organizations/*/so" - + "urces/*}/findings:group:\001*Z4\"//v1/{paren" - + "t=folders/*/sources/*}/findings:group:\001*" - + "Z5\"0/v1/{parent=projects/*/sources/*}/fi" - + "ndings:group:\001*\022\346\001\n\nListAssets\0221.google." - + "cloud.securitycenter.v1.ListAssetsReques" - + "t\0322.google.cloud.securitycenter.v1.ListA" - + "ssetsResponse\"q\210\002\001\202\323\344\223\002h\022#/v1/{parent=or" - + "ganizations/*}/assetsZ\037\022\035/v1/{parent=fol" - + "ders/*}/assetsZ \022\036/v1/{parent=projects/*" - + "}/assets\022\210\004\n2ListDescendantSecurityHealt" - + "hAnalyticsCustomModules\022Y.google.cloud.s" - + "ecuritycenter.v1.ListDescendantSecurityH" - + "ealthAnalyticsCustomModulesRequest\032Z.goo" - + "gle.cloud.securitycenter.v1.ListDescenda" - + "ntSecurityHealthAnalyticsCustomModulesRe" - + "sponse\"\232\002\332A\006parent\202\323\344\223\002\212\002\022Y/v1/{parent=o" - + "rganizations/*/securityHealthAnalyticsSe" - + "ttings}/customModules:listDescendantZU\022S" - + "/v1/{parent=folders/*/securityHealthAnal" - + "yticsSettings}/customModules:listDescend" - + "antZV\022T/v1/{parent=projects/*/securityHe" + + "\030\002 \001(\t\022\026\n\010group_by\030\003 \001(\tB\004\342A\001\002\0223\n\020compar" + + "e_duration\030\004 \001(\0132\031.google.protobuf.Durat" + + "ion\022-\n\tread_time\030\005 \001(\0132\032.google.protobuf" + + ".Timestamp\022\022\n\npage_token\030\007 \001(\t\022\021\n\tpage_s" + + "ize\030\010 \001(\005\"\270\001\n\023GroupAssetsResponse\022E\n\020gro" + + "up_by_results\030\001 \003(\0132+.google.cloud.secur" + + "itycenter.v1.GroupResult\022-\n\tread_time\030\002 " + + "\001(\0132\032.google.protobuf.Timestamp\022\027\n\017next_" + + "page_token\030\003 \001(\t\022\022\n\ntotal_size\030\004 \001(\005\"\210\002\n" + + "\024GroupFindingsRequest\022=\n\006parent\030\001 \001(\tB-\342" + + "A\001\002\372A&\n$securitycenter.googleapis.com/So" + + "urce\022\016\n\006filter\030\002 \001(\t\022\026\n\010group_by\030\003 \001(\tB\004" + + "\342A\001\002\022-\n\tread_time\030\004 \001(\0132\032.google.protobu" + + "f.Timestamp\0223\n\020compare_duration\030\005 \001(\0132\031." + + "google.protobuf.Duration\022\022\n\npage_token\030\007" + + " \001(\t\022\021\n\tpage_size\030\010 \001(\005\"\272\001\n\025GroupFinding" + + "sResponse\022E\n\020group_by_results\030\001 \003(\0132+.go" + + "ogle.cloud.securitycenter.v1.GroupResult" + + "\022-\n\tread_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022\027\n\017next_page_token\030\003 \001(\t\022\022\n\ntota" + + "l_size\030\004 \001(\005\"\270\001\n\013GroupResult\022O\n\nproperti" + + "es\030\001 \003(\0132;.google.cloud.securitycenter.v" + + "1.GroupResult.PropertiesEntry\022\r\n\005count\030\002" + + " \001(\003\032I\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005" + + "value\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\"" + + "\276\001\n9ListDescendantSecurityHealthAnalytic" + + "sCustomModulesRequest\022Z\n\006parent\030\001 \001(\tBJ\342" + + "A\001\002\372AC\022Asecuritycenter.googleapis.com/Se" + + "curityHealthAnalyticsCustomModule\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\314\001\n:Lis" + + "tDescendantSecurityHealthAnalyticsCustom" + + "ModulesResponse\022u\n(security_health_analy" + + "tics_custom_modules\030\001 \003(\0132C.google.cloud" + + ".securitycenter.v1.SecurityHealthAnalyti" + + "csCustomModule\022\027\n\017next_page_token\030\002 \001(\t\"" + + "\202\001\n\026ListMuteConfigsRequest\022A\n\006parent\030\001 \001" + + "(\tB1\342A\001\002\372A*\022(securitycenter.googleapis.c" + + "om/MuteConfig\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" + + "_token\030\003 \001(\t\"t\n\027ListMuteConfigsResponse\022" + + "@\n\014mute_configs\030\001 \003(\0132*.google.cloud.sec" + + "uritycenter.v1.MuteConfig\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"\222\001\n\036ListNotificationConfigsRe" + + "quest\022I\n\006parent\030\001 \001(\tB9\342A\001\002\372A2\0220security" + + "center.googleapis.com/NotificationConfig" + + "\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\"" + + "\214\001\n\037ListNotificationConfigsResponse\022P\n\024n" + + "otification_configs\030\001 \003(\01322.google.cloud" + + ".securitycenter.v1.NotificationConfig\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\275\001\n8ListEffective" + + "SecurityHealthAnalyticsCustomModulesRequ" + + "est\022Z\n\006parent\030\001 \001(\tBJ\342A\001\002\372AC\022Asecurityce" + + "nter.googleapis.com/SecurityHealthAnalyt" + + "icsCustomModule\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\"\337\001\n9ListEffectiveSecurity" + + "HealthAnalyticsCustomModulesResponse\022\210\001\n" + + "2effective_security_health_analytics_cus" + + "tom_modules\030\001 \003(\0132L.google.cloud.securit" + + "ycenter.v1.EffectiveSecurityHealthAnalyt" + + "icsCustomModule\022\027\n\017next_page_token\030\002 \001(\t" + + "\"\264\001\n/ListSecurityHealthAnalyticsCustomMo" + + "dulesRequest\022Z\n\006parent\030\001 \001(\tBJ\342A\001\002\372AC\022As" + + "ecuritycenter.googleapis.com/SecurityHea" + + "lthAnalyticsCustomModule\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\"\302\001\n0ListSecurity" + + "HealthAnalyticsCustomModulesResponse\022u\n(" + + "security_health_analytics_custom_modules" + + "\030\001 \003(\0132C.google.cloud.securitycenter.v1." + + "SecurityHealthAnalyticsCustomModule\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"z\n\022ListSourcesReque" + + "st\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\022$securitycen" + + "ter.googleapis.com/Source\022\022\n\npage_token\030" + + "\002 \001(\t\022\021\n\tpage_size\030\007 \001(\005\"g\n\023ListSourcesR" + + "esponse\0227\n\007sources\030\001 \003(\0132&.google.cloud." + + "securitycenter.v1.Source\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"\256\002\n\021ListAssetsRequest\022<\n\006paren" + + "t\030\001 \001(\tB,\342A\001\002\372A%\022#securitycenter.googlea" + + "pis.com/Asset\022\016\n\006filter\030\002 \001(\t\022\020\n\010order_b" + + "y\030\003 \001(\t\022-\n\tread_time\030\004 \001(\0132\032.google.prot" + + "obuf.Timestamp\0223\n\020compare_duration\030\005 \001(\013" + + "2\031.google.protobuf.Duration\022.\n\nfield_mas" + + "k\030\007 \001(\0132\032.google.protobuf.FieldMask\022\022\n\np" + + "age_token\030\010 \001(\t\022\021\n\tpage_size\030\t \001(\005\"\303\003\n\022L" + + "istAssetsResponse\022`\n\023list_assets_results" + + "\030\001 \003(\0132C.google.cloud.securitycenter.v1." + + "ListAssetsResponse.ListAssetsResult\022-\n\tr" + + "ead_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mp\022\027\n\017next_page_token\030\003 \001(\t\022\022\n\ntotal_siz" + + "e\030\004 \001(\005\032\356\001\n\020ListAssetsResult\0224\n\005asset\030\001 " + + "\001(\0132%.google.cloud.securitycenter.v1.Ass" + + "et\022e\n\014state_change\030\002 \001(\0162O.google.cloud." + + "securitycenter.v1.ListAssetsResponse.Lis" + + "tAssetsResult.StateChange\"=\n\013StateChange" + + "\022\n\n\006UNUSED\020\000\022\t\n\005ADDED\020\001\022\013\n\007REMOVED\020\002\022\n\n\006" + + "ACTIVE\020\003\"\261\002\n\023ListFindingsRequest\022=\n\006pare" + + "nt\030\001 \001(\tB-\342A\001\002\372A&\n$securitycenter.google" + + "apis.com/Source\022\016\n\006filter\030\002 \001(\t\022\020\n\010order" + + "_by\030\003 \001(\t\022-\n\tread_time\030\004 \001(\0132\032.google.pr" + + "otobuf.Timestamp\0223\n\020compare_duration\030\005 \001" + + "(\0132\031.google.protobuf.Duration\022.\n\nfield_m" + + "ask\030\007 \001(\0132\032.google.protobuf.FieldMask\022\022\n" + + "\npage_token\030\010 \001(\t\022\021\n\tpage_size\030\t \001(\005\"\255\006\n" + + "\024ListFindingsResponse\022f\n\025list_findings_r" + + "esults\030\001 \003(\0132G.google.cloud.securitycent" + + "er.v1.ListFindingsResponse.ListFindingsR" + + "esult\022-\n\tread_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\022\027\n\017next_page_token\030\003 \001(\t\022\022\n" + + "\ntotal_size\030\004 \001(\005\032\320\004\n\022ListFindingsResult" + + "\0228\n\007finding\030\001 \001(\0132\'.google.cloud.securit" + + "ycenter.v1.Finding\022i\n\014state_change\030\002 \001(\016" + + "2S.google.cloud.securitycenter.v1.ListFi" + + "ndingsResponse.ListFindingsResult.StateC" + + "hange\022h\n\010resource\030\003 \001(\0132P.google.cloud.s" + + "ecuritycenter.v1.ListFindingsResponse.Li" + + "stFindingsResult.ResourceB\004\342A\001\003\032\333\001\n\010Reso" + + "urce\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\010 \001(\t" + + "\022\014\n\004type\030\006 \001(\t\022\024\n\014project_name\030\002 \001(\t\022\034\n\024" + + "project_display_name\030\003 \001(\t\022\023\n\013parent_nam" + + "e\030\004 \001(\t\022\033\n\023parent_display_name\030\005 \001(\t\0227\n\007" + + "folders\030\007 \003(\0132&.google.cloud.securitycen" + + "ter.v1.Folder\"M\n\013StateChange\022\n\n\006UNUSED\020\000" + + "\022\013\n\007CHANGED\020\001\022\r\n\tUNCHANGED\020\002\022\t\n\005ADDED\020\003\022" + + "\013\n\007REMOVED\020\004\"\320\001\n\026SetFindingStateRequest\022" + + "<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%securitycenter.g" + + "oogleapis.com/Finding\022B\n\005state\030\002 \001(\0162-.g" + + "oogle.cloud.securitycenter.v1.Finding.St" + + "ateB\004\342A\001\002\0224\n\nstart_time\030\003 \001(\0132\032.google.p" + + "rotobuf.TimestampB\004\342A\001\002\"\220\001\n\016SetMuteReque" + + "st\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%securitycente" + + "r.googleapis.com/Finding\022@\n\004mute\030\002 \001(\0162," + + ".google.cloud.securitycenter.v1.Finding." + + "MuteB\004\342A\001\002\"e\n\030RunAssetDiscoveryRequest\022I" + + "\n\006parent\030\001 \001(\tB9\342A\001\002\372A2\n0cloudresourcema" + + "nager.googleapis.com/Organization\"\262\003\n2Si" + + "mulateSecurityHealthAnalyticsCustomModul" + + "eRequest\022\024\n\006parent\030\001 \001(\tB\004\342A\001\002\022I\n\rcustom" + + "_config\030\002 \001(\0132,.google.cloud.securitycen" + + "ter.v1.CustomConfigB\004\342A\001\002\022|\n\010resource\030\003 " + + "\001(\0132d.google.cloud.securitycenter.v1.Sim" + + "ulateSecurityHealthAnalyticsCustomModule" + + "Request.SimulatedResourceB\004\342A\001\002\032\234\001\n\021Simu" + + "latedResource\022\033\n\rresource_type\030\001 \001(\tB\004\342A" + + "\001\002\0224\n\rresource_data\030\002 \001(\0132\027.google.proto" + + "buf.StructB\004\342A\001\001\0224\n\017iam_policy_data\030\003 \001(" + + "\0132\025.google.iam.v1.PolicyB\004\342A\001\001\"\331\002\n3Simul" + + "ateSecurityHealthAnalyticsCustomModuleRe" + + "sponse\022s\n\006result\030\001 \001(\0132c.google.cloud.se" + + "curitycenter.v1.SimulateSecurityHealthAn" + + "alyticsCustomModuleResponse.SimulatedRes" + + "ult\032\254\001\n\017SimulatedResult\022:\n\007finding\030\001 \001(\013" + + "2\'.google.cloud.securitycenter.v1.Findin" + + "gH\000\022.\n\014no_violation\030\002 \001(\0132\026.google.proto" + + "buf.EmptyH\000\022#\n\005error\030\003 \001(\0132\022.google.rpc." + + "StatusH\000B\010\n\006result\"\235\001\n\033UpdateExternalSys" + + "temRequest\022M\n\017external_system\030\001 \001(\0132..go" + + "ogle.cloud.securitycenter.v1.ExternalSys" + + "temB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google." + + "protobuf.FieldMask\"\207\001\n\024UpdateFindingRequ" + + "est\022>\n\007finding\030\001 \001(\0132\'.google.cloud.secu" + + "ritycenter.v1.FindingB\004\342A\001\002\022/\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMask\"\221\001\n" + + "\027UpdateMuteConfigRequest\022E\n\013mute_config\030" + + "\001 \001(\0132*.google.cloud.securitycenter.v1.M" + + "uteConfigB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.g" + + "oogle.protobuf.FieldMask\"\251\001\n\037UpdateNotif" + + "icationConfigRequest\022U\n\023notification_con" + + "fig\030\001 \001(\01322.google.cloud.securitycenter." + + "v1.NotificationConfigB\004\342A\001\002\022/\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMask\"\257\001\n" + + "!UpdateOrganizationSettingsRequest\022Y\n\025or" + + "ganization_settings\030\001 \001(\01324.google.cloud" + + ".securitycenter.v1.OrganizationSettingsB" + + "\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.prot" + + "obuf.FieldMask\"\337\001\n0UpdateSecurityHealthA" + + "nalyticsCustomModuleRequest\022z\n\'security_" + + "health_analytics_custom_module\030\001 \001(\0132C.g" + + "oogle.cloud.securitycenter.v1.SecurityHe" + + "althAnalyticsCustomModuleB\004\342A\001\002\022/\n\013updat" + + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" + + "\"\204\001\n\023UpdateSourceRequest\022<\n\006source\030\001 \001(\013" + + "2&.google.cloud.securitycenter.v1.Source" + + "B\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.pro" + + "tobuf.FieldMask\"\312\001\n\032UpdateSecurityMarksR" + + "equest\022K\n\016security_marks\030\001 \001(\0132-.google." + + "cloud.securitycenter.v1.SecurityMarksB\004\342" + + "A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protob" + + "uf.FieldMask\022.\n\nstart_time\030\003 \001(\0132\032.googl" + + "e.protobuf.Timestamp\"\327\001\n\033CreateBigQueryE" + + "xportRequest\022E\n\006parent\030\001 \001(\tB5\342A\001\002\372A.\022,s" + + "ecuritycenter.googleapis.com/BigQueryExp" + + "ort\022N\n\020big_query_export\030\002 \001(\0132..google.c" + + "loud.securitycenter.v1.BigQueryExportB\004\342" + + "A\001\002\022!\n\023big_query_export_id\030\003 \001(\tB\004\342A\001\002\"\236" + + "\001\n\033UpdateBigQueryExportRequest\022N\n\020big_qu" + + "ery_export\030\001 \001(\0132..google.cloud.security" + + "center.v1.BigQueryExportB\004\342A\001\002\022/\n\013update" + + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"" + + "\212\001\n\032ListBigQueryExportsRequest\022E\n\006parent" + + "\030\001 \001(\tB5\342A\001\002\372A.\022,securitycenter.googleap" + + "is.com/BigQueryExport\022\021\n\tpage_size\030\002 \001(\005" + + "\022\022\n\npage_token\030\003 \001(\t\"\201\001\n\033ListBigQueryExp" + + "ortsResponse\022I\n\021big_query_exports\030\001 \003(\0132" + + "..google.cloud.securitycenter.v1.BigQuer" + + "yExport\022\027\n\017next_page_token\030\002 \001(\t\"b\n\033Dele" + + "teBigQueryExportRequest\022C\n\004name\030\001 \001(\tB5\342" + + "A\001\002\372A.\n,securitycenter.googleapis.com/Bi" + + "gQueryExport2\217x\n\016SecurityCenter\022\342\002\n\020Bulk" + + "MuteFindings\0227.google.cloud.securitycent" + + "er.v1.BulkMuteFindingsRequest\032\035.google.l" + + "ongrunning.Operation\"\365\001\312AP\n7google.cloud" + + ".securitycenter.v1.BulkMuteFindingsRespo" + + "nse\022\025google.protobuf.Empty\332A\006parent\202\323\344\223\002" + + "\222\001\"./v1/{parent=organizations/*}/finding" + + "s:bulkMute:\001*Z-\"(/v1/{parent=folders/*}/" + + "findings:bulkMute:\001*Z.\")/v1/{parent=proj" + + "ects/*}/findings:bulkMute:\001*\022\325\004\n)CreateS" + + "ecurityHealthAnalyticsCustomModule\022P.goo" + + "gle.cloud.securitycenter.v1.CreateSecuri" + + "tyHealthAnalyticsCustomModuleRequest\032C.g" + + "oogle.cloud.securitycenter.v1.SecurityHe" + + "althAnalyticsCustomModule\"\220\003\332A.parent,se" + + "curity_health_analytics_custom_module\202\323\344" + + "\223\002\330\002\"J/v1/{parent=organizations/*/securi" + + "tyHealthAnalyticsSettings}/customModules" + + ":\'security_health_analytics_custom_modul" + + "eZo\"D/v1/{parent=folders/*/securityHealt" + + "hAnalyticsSettings}/customModules:\'secur" + + "ity_health_analytics_custom_moduleZp\"E/v" + + "1/{parent=projects/*/securityHealthAnaly" + + "ticsSettings}/customModules:\'security_he" + + "alth_analytics_custom_module\022\261\001\n\014CreateS" + + "ource\0223.google.cloud.securitycenter.v1.C" + + "reateSourceRequest\032&.google.cloud.securi" + + "tycenter.v1.Source\"D\332A\rparent,source\202\323\344\223" + + "\002.\"$/v1/{parent=organizations/*}/sources" + + ":\006source\022\314\001\n\rCreateFinding\0224.google.clou" + + "d.securitycenter.v1.CreateFindingRequest" + + "\032\'.google.cloud.securitycenter.v1.Findin" + + "g\"\\\332A\031parent,finding_id,finding\202\323\344\223\002:\"//" + + "v1/{parent=organizations/*/sources/*}/fi" + + "ndings:\007finding\022\330\002\n\020CreateMuteConfig\0227.g" + + "oogle.cloud.securitycenter.v1.CreateMute" + + "ConfigRequest\032*.google.cloud.securitycen" + + "ter.v1.MuteConfig\"\336\001\332A\022parent,mute_confi" + + "g\332A!parent,mute_config,mute_config_id\202\323\344" + + "\223\002\236\001\"(/v1/{parent=organizations/*}/muteC" + + "onfigs:\013mute_configZ1\"\"/v1/{parent=folde" + + "rs/*}/muteConfigs:\013mute_configZ2\"#/v1/{p" + + "arent=projects/*}/muteConfigs:\013mute_conf" + + "ig\022\253\003\n\030CreateNotificationConfig\022?.google" + + ".cloud.securitycenter.v1.CreateNotificat" + + "ionConfigRequest\0322.google.cloud.security" + + "center.v1.NotificationConfig\"\231\002\332A$parent" + + ",config_id,notification_config\332A\032parent," + + "notification_config\202\323\344\223\002\316\001\"0/v1/{parent=" + + "organizations/*}/notificationConfigs:\023no" + + "tification_configZA\"*/v1/{parent=folders" + + "/*}/notificationConfigs:\023notification_co" + + "nfigZB\"+/v1/{parent=projects/*}/notifica" + + "tionConfigs:\023notification_config\022\352\001\n\020Del" + + "eteMuteConfig\0227.google.cloud.securitycen" + + "ter.v1.DeleteMuteConfigRequest\032\026.google." + + "protobuf.Empty\"\204\001\332A\004name\202\323\344\223\002w*(/v1/{nam" + + "e=organizations/*/muteConfigs/*}Z$*\"/v1/" + + "{name=folders/*/muteConfigs/*}Z%*#/v1/{n" + + "ame=projects/*/muteConfigs/*}\022\223\002\n\030Delete" + + "NotificationConfig\022?.google.cloud.securi" + + "tycenter.v1.DeleteNotificationConfigRequ" + + "est\032\026.google.protobuf.Empty\"\235\001\332A\004name\202\323\344" + + "\223\002\217\001*0/v1/{name=organizations/*/notifica" + + "tionConfigs/*}Z,**/v1/{name=folders/*/no" + + "tificationConfigs/*}Z-*+/v1/{name=projec" + + "ts/*/notificationConfigs/*}\022\203\003\n)DeleteSe" + + "curityHealthAnalyticsCustomModule\022P.goog" + + "le.cloud.securitycenter.v1.DeleteSecurit" + + "yHealthAnalyticsCustomModuleRequest\032\026.go" + + "ogle.protobuf.Empty\"\353\001\332A\004name\202\323\344\223\002\335\001*J/v" + + "1/{name=organizations/*/securityHealthAn" + + "alyticsSettings/customModules/*}ZF*D/v1/" + + "{name=folders/*/securityHealthAnalyticsS" + + "ettings/customModules/*}ZG*E/v1/{name=pr" + + "ojects/*/securityHealthAnalyticsSettings" + + "/customModules/*}\022\221\002\n\021GetBigQueryExport\022" + + "8.google.cloud.securitycenter.v1.GetBigQ" + + "ueryExportRequest\032..google.cloud.securit" + + "ycenter.v1.BigQueryExport\"\221\001\332A\004name\202\323\344\223\002" + + "\203\001\022,/v1/{name=organizations/*/bigQueryEx" + + "ports/*}Z(\022&/v1/{name=folders/*/bigQuery" + + "Exports/*}Z)\022\'/v1/{name=projects/*/bigQu" + + "eryExports/*}\022\226\001\n\014GetIamPolicy\022\".google." + + "iam.v1.GetIamPolicyRequest\032\025.google.iam." + + "v1.Policy\"K\332A\010resource\202\323\344\223\002:\"5/v1/{resou" + + "rce=organizations/*/sources/*}:getIamPol" + + "icy:\001*\022\370\001\n\rGetMuteConfig\0224.google.cloud." + + "securitycenter.v1.GetMuteConfigRequest\032*" + + ".google.cloud.securitycenter.v1.MuteConf" + + "ig\"\204\001\332A\004name\202\323\344\223\002w\022(/v1/{name=organizati" + + "ons/*/muteConfigs/*}Z$\022\"/v1/{name=folder" + + "s/*/muteConfigs/*}Z%\022#/v1/{name=projects" + + "/*/muteConfigs/*}\022\251\002\n\025GetNotificationCon" + + "fig\022<.google.cloud.securitycenter.v1.Get" + + "NotificationConfigRequest\0322.google.cloud" + + ".securitycenter.v1.NotificationConfig\"\235\001" + + "\332A\004name\202\323\344\223\002\217\001\0220/v1/{name=organizations/" + + "*/notificationConfigs/*}Z,\022*/v1/{name=fo" + + "lders/*/notificationConfigs/*}Z-\022+/v1/{n" + + "ame=projects/*/notificationConfigs/*}\022\317\001" + + "\n\027GetOrganizationSettings\022>.google.cloud" + + ".securitycenter.v1.GetOrganizationSettin", + "gsRequest\0324.google.cloud.securitycenter." + + "v1.OrganizationSettings\">\332A\004name\202\323\344\223\0021\022/" + + "/v1/{name=organizations/*/organizationSe" + + "ttings}\022\340\003\n/GetEffectiveSecurityHealthAn" + + "alyticsCustomModule\022V.google.cloud.secur" + + "itycenter.v1.GetEffectiveSecurityHealthA" + + "nalyticsCustomModuleRequest\032L.google.clo" + + "ud.securitycenter.v1.EffectiveSecurityHe" + + "althAnalyticsCustomModule\"\206\002\332A\004name\202\323\344\223\002" + + "\370\001\022S/v1/{name=organizations/*/securityHe" + + "althAnalyticsSettings/effectiveCustomMod" + + "ules/*}ZO\022M/v1/{name=folders/*/securityH" + + "ealthAnalyticsSettings/effectiveCustomMo" + + "dules/*}ZP\022N/v1/{name=projects/*/securit" + + "yHealthAnalyticsSettings/effectiveCustom" + + "Modules/*}\022\252\003\n&GetSecurityHealthAnalytic" + + "sCustomModule\022M.google.cloud.securitycen" + + "ter.v1.GetSecurityHealthAnalyticsCustomM" + + "oduleRequest\032C.google.cloud.securitycent" + + "er.v1.SecurityHealthAnalyticsCustomModul" + + "e\"\353\001\332A\004name\202\323\344\223\002\335\001\022J/v1/{name=organizati" + + "ons/*/securityHealthAnalyticsSettings/cu" + + "stomModules/*}ZF\022D/v1/{name=folders/*/se" + + "curityHealthAnalyticsSettings/customModu" + + "les/*}ZG\022E/v1/{name=projects/*/securityH" + + "ealthAnalyticsSettings/customModules/*}\022" + + "\232\001\n\tGetSource\0220.google.cloud.securitycen" + + "ter.v1.GetSourceRequest\032&.google.cloud.s" + + "ecuritycenter.v1.Source\"3\332A\004name\202\323\344\223\002&\022$" + + "/v1/{name=organizations/*/sources/*}\022\206\002\n" + + "\013GroupAssets\0222.google.cloud.securitycent" + + "er.v1.GroupAssetsRequest\0323.google.cloud." + + "securitycenter.v1.GroupAssetsResponse\"\215\001" + + "\210\002\001\202\323\344\223\002\203\001\")/v1/{parent=organizations/*}" + + "/assets:group:\001*Z(\"#/v1/{parent=folders/" + + "*}/assets:group:\001*Z)\"$/v1/{parent=projec" + + "ts/*}/assets:group:\001*\022\277\002\n\rGroupFindings\022" + + "4.google.cloud.securitycenter.v1.GroupFi" + + "ndingsRequest\0325.google.cloud.securitycen" + + "ter.v1.GroupFindingsResponse\"\300\001\332A\017parent" + + ",group_by\202\323\344\223\002\247\001\"5/v1/{parent=organizati" + + "ons/*/sources/*}/findings:group:\001*Z4\"//v" + + "1/{parent=folders/*/sources/*}/findings:" + + "group:\001*Z5\"0/v1/{parent=projects/*/sourc" + + "es/*}/findings:group:\001*\022\346\001\n\nListAssets\0221" + + ".google.cloud.securitycenter.v1.ListAsse" + + "tsRequest\0322.google.cloud.securitycenter." + + "v1.ListAssetsResponse\"q\210\002\001\202\323\344\223\002h\022#/v1/{p" + + "arent=organizations/*}/assetsZ\037\022\035/v1/{pa" + + "rent=folders/*}/assetsZ \022\036/v1/{parent=pr" + + "ojects/*}/assets\022\210\004\n2ListDescendantSecur" + + "ityHealthAnalyticsCustomModules\022Y.google" + + ".cloud.securitycenter.v1.ListDescendantS" + + "ecurityHealthAnalyticsCustomModulesReque" + + "st\032Z.google.cloud.securitycenter.v1.List" + + "DescendantSecurityHealthAnalyticsCustomM" + + "odulesResponse\"\232\002\332A\006parent\202\323\344\223\002\212\002\022Y/v1/{" + + "parent=organizations/*/securityHealthAna" + + "lyticsSettings}/customModules:listDescen" + + "dantZU\022S/v1/{parent=folders/*/securityHe" + "althAnalyticsSettings}/customModules:lis" - + "tDescendant\022\217\002\n\014ListFindings\0223.google.cl" - + "oud.securitycenter.v1.ListFindingsReques" - + "t\0324.google.cloud.securitycenter.v1.ListF" - + "indingsResponse\"\223\001\202\323\344\223\002\214\001\022//v1/{parent=o" - + "rganizations/*/sources/*}/findingsZ+\022)/v" - + "1/{parent=folders/*/sources/*}/findingsZ" - + ",\022*/v1/{parent=projects/*/sources/*}/fin" - + "dings\022\213\002\n\017ListMuteConfigs\0226.google.cloud" - + ".securitycenter.v1.ListMuteConfigsReques" - + "t\0327.google.cloud.securitycenter.v1.ListM" - + "uteConfigsResponse\"\206\001\332A\006parent\202\323\344\223\002w\022(/v" - + "1/{parent=organizations/*}/muteConfigsZ$" - + "\022\"/v1/{parent=folders/*}/muteConfigsZ%\022#" - + "/v1/{parent=projects/*}/muteConfigs\022\274\002\n\027" - + "ListNotificationConfigs\022>.google.cloud.s" - + "ecuritycenter.v1.ListNotificationConfigs" - + "Request\032?.google.cloud.securitycenter.v1" - + ".ListNotificationConfigsResponse\"\237\001\332A\006pa" - + "rent\202\323\344\223\002\217\001\0220/v1/{parent=organizations/*" - + "}/notificationConfigsZ,\022*/v1/{parent=fol" - + "ders/*}/notificationConfigsZ-\022+/v1/{pare" - + "nt=projects/*}/notificationConfigs\022\363\003\n1L" - + "istEffectiveSecurityHealthAnalyticsCusto" - + "mModules\022X.google.cloud.securitycenter.v" - + "1.ListEffectiveSecurityHealthAnalyticsCu" - + "stomModulesRequest\032Y.google.cloud.securi" - + "tycenter.v1.ListEffectiveSecurityHealthA" - + "nalyticsCustomModulesResponse\"\210\002\332A\006paren" - + "t\202\323\344\223\002\370\001\022S/v1/{parent=organizations/*/se" - + "curityHealthAnalyticsSettings}/effective" - + "CustomModulesZO\022M/v1/{parent=folders/*/s" - + "ecurityHealthAnalyticsSettings}/effectiv" - + "eCustomModulesZP\022N/v1/{parent=projects/*" - + "/securityHealthAnalyticsSettings}/effect" - + "iveCustomModules\022\275\003\n(ListSecurityHealthA" - + "nalyticsCustomModules\022O.google.cloud.sec" - + "uritycenter.v1.ListSecurityHealthAnalyti" - + "csCustomModulesRequest\032P.google.cloud.se" - + "curitycenter.v1.ListSecurityHealthAnalyt" - + "icsCustomModulesResponse\"\355\001\332A\006parent\202\323\344\223" - + "\002\335\001\022J/v1/{parent=organizations/*/securit" + + "tDescendantZV\022T/v1/{parent=projects/*/se" + + "curityHealthAnalyticsSettings}/customMod" + + "ules:listDescendant\022\217\002\n\014ListFindings\0223.g" + + "oogle.cloud.securitycenter.v1.ListFindin" + + "gsRequest\0324.google.cloud.securitycenter." + + "v1.ListFindingsResponse\"\223\001\202\323\344\223\002\214\001\022//v1/{" + + "parent=organizations/*/sources/*}/findin" + + "gsZ+\022)/v1/{parent=folders/*/sources/*}/f" + + "indingsZ,\022*/v1/{parent=projects/*/source" + + "s/*}/findings\022\213\002\n\017ListMuteConfigs\0226.goog" + + "le.cloud.securitycenter.v1.ListMuteConfi" + + "gsRequest\0327.google.cloud.securitycenter." + + "v1.ListMuteConfigsResponse\"\206\001\332A\006parent\202\323" + + "\344\223\002w\022(/v1/{parent=organizations/*}/muteC" + + "onfigsZ$\022\"/v1/{parent=folders/*}/muteCon" + + "figsZ%\022#/v1/{parent=projects/*}/muteConf" + + "igs\022\274\002\n\027ListNotificationConfigs\022>.google" + + ".cloud.securitycenter.v1.ListNotificatio" + + "nConfigsRequest\032?.google.cloud.securityc" + + "enter.v1.ListNotificationConfigsResponse" + + "\"\237\001\332A\006parent\202\323\344\223\002\217\001\0220/v1/{parent=organiz" + + "ations/*}/notificationConfigsZ,\022*/v1/{pa" + + "rent=folders/*}/notificationConfigsZ-\022+/" + + "v1/{parent=projects/*}/notificationConfi" + + "gs\022\363\003\n1ListEffectiveSecurityHealthAnalyt" + + "icsCustomModules\022X.google.cloud.security" + + "center.v1.ListEffectiveSecurityHealthAna" + + "lyticsCustomModulesRequest\032Y.google.clou" + + "d.securitycenter.v1.ListEffectiveSecurit" + + "yHealthAnalyticsCustomModulesResponse\"\210\002" + + "\332A\006parent\202\323\344\223\002\370\001\022S/v1/{parent=organizati" + + "ons/*/securityHealthAnalyticsSettings}/e" + + "ffectiveCustomModulesZO\022M/v1/{parent=fol" + + "ders/*/securityHealthAnalyticsSettings}/" + + "effectiveCustomModulesZP\022N/v1/{parent=pr" + + "ojects/*/securityHealthAnalyticsSettings" + + "}/effectiveCustomModules\022\275\003\n(ListSecurit" + + "yHealthAnalyticsCustomModules\022O.google.c" + + "loud.securitycenter.v1.ListSecurityHealt" + + "hAnalyticsCustomModulesRequest\032P.google." + + "cloud.securitycenter.v1.ListSecurityHeal" + + "thAnalyticsCustomModulesResponse\"\355\001\332A\006pa" + + "rent\202\323\344\223\002\335\001\022J/v1/{parent=organizations/*" + + "/securityHealthAnalyticsSettings}/custom" + + "ModulesZF\022D/v1/{parent=folders/*/securit" + "yHealthAnalyticsSettings}/customModulesZ" - + "F\022D/v1/{parent=folders/*/securityHealthA" - + "nalyticsSettings}/customModulesZG\022E/v1/{" - + "parent=projects/*/securityHealthAnalytic" - + "sSettings}/customModules\022\362\001\n\013ListSources" - + "\0222.google.cloud.securitycenter.v1.ListSo" - + "urcesRequest\0323.google.cloud.securitycent" - + "er.v1.ListSourcesResponse\"z\332A\006parent\202\323\344\223" - + "\002k\022$/v1/{parent=organizations/*}/sources" - + "Z \022\036/v1/{parent=folders/*}/sourcesZ!\022\037/v" - + "1/{parent=projects/*}/sources\022\212\002\n\021RunAss" - + "etDiscovery\0228.google.cloud.securitycente" - + "r.v1.RunAssetDiscoveryRequest\032\035.google.l" - + "ongrunning.Operation\"\233\001\210\002\001\312AQ\n8google.cl" - + "oud.securitycenter.v1.RunAssetDiscoveryR" - + "esponse\022\025google.protobuf.Empty\332A\006parent\202" - + "\323\344\223\0025\"0/v1/{parent=organizations/*}/asse" - + "ts:runDiscovery:\001*\022\304\002\n\017SetFindingState\0226" - + ".google.cloud.securitycenter.v1.SetFindi" - + "ngStateRequest\032\'.google.cloud.securityce" - + "nter.v1.Finding\"\317\001\332A\025name,state,start_ti" - + "me\202\323\344\223\002\260\001\"8/v1/{name=organizations/*/sou" - + "rces/*/findings/*}:setState:\001*Z7\"2/v1/{n" - + "ame=folders/*/sources/*/findings/*}:setS" - + "tate:\001*Z8\"3/v1/{name=projects/*/sources/" - + "*/findings/*}:setState:\001*\022\245\002\n\007SetMute\022.." - + "google.cloud.securitycenter.v1.SetMuteRe" - + "quest\032\'.google.cloud.securitycenter.v1.F" - + "inding\"\300\001\332A\tname,mute\202\323\344\223\002\255\001\"7/v1/{name=" - + "organizations/*/sources/*/findings/*}:se" - + "tMute:\001*Z6\"1/v1/{name=folders/*/sources/" - + "*/findings/*}:setMute:\001*Z7\"2/v1/{name=pr" - + "ojects/*/sources/*/findings/*}:setMute:\001" - + "*\022\235\001\n\014SetIamPolicy\022\".google.iam.v1.SetIa" - + "mPolicyRequest\032\025.google.iam.v1.Policy\"R\332" - + "A\017resource,policy\202\323\344\223\002:\"5/v1/{resource=o" - + "rganizations/*/sources/*}:setIamPolicy:\001" - + "*\022\310\001\n\022TestIamPermissions\022(.google.iam.v1" - + ".TestIamPermissionsRequest\032).google.iam." - + "v1.TestIamPermissionsResponse\"]\332A\024resour" - + "ce,permissions\202\323\344\223\002@\";/v1/{resource=orga" - + "nizations/*/sources/*}:testIamPermission" - + "s:\001*\022\320\003\n\024UpdateExternalSystem\022;.google.c" - + "loud.securitycenter.v1.UpdateExternalSys" - + "temRequest\032..google.cloud.securitycenter" - + ".v1.ExternalSystem\"\312\002\332A\033external_system," - + "update_mask\202\323\344\223\002\245\0022Q/v1/{external_system" - + ".name=organizations/*/sources/*/findings" - + "/*/externalSystems/*}:\017external_systemZ^" - + "2K/v1/{external_system.name=folders/*/so" - + "urces/*/findings/*/externalSystems/*}:\017e" - + "xternal_systemZ_2L/v1/{external_system.n" - + "ame=projects/*/sources/*/findings/*/exte" - + "rnalSystems/*}:\017external_system\022\301\002\n\rUpda" - + "teFinding\0224.google.cloud.securitycenter." - + "v1.UpdateFindingRequest\032\'.google.cloud.s" - + "ecuritycenter.v1.Finding\"\320\001\332A\007finding\202\323\344" - + "\223\002\277\00127/v1/{finding.name=organizations/*/" - + "sources/*/findings/*}:\007findingZ<21/v1/{f" - + "inding.name=folders/*/sources/*/findings" - + "/*}:\007findingZ=22/v1/{finding.name=projec" - + "ts/*/sources/*/findings/*}:\007finding\022\335\002\n\020" - + "UpdateMuteConfig\0227.google.cloud.security" - + "center.v1.UpdateMuteConfigRequest\032*.goog" - + "le.cloud.securitycenter.v1.MuteConfig\"\343\001" - + "\332A\027mute_config,update_mask\202\323\344\223\002\302\00124/v1/{" - + "mute_config.name=organizations/*/muteCon" - + "figs/*}:\013mute_configZ=2./v1/{mute_config" - + ".name=folders/*/muteConfigs/*}:\013mute_con" - + "figZ>2//v1/{mute_config.name=projects/*/" - + "muteConfigs/*}:\013mute_config\022\333\003\n\030UpdateNo" - + "tificationConfig\022?.google.cloud.security" - + "center.v1.UpdateNotificationConfigReques" - + "t\0322.google.cloud.securitycenter.v1.Notif" - + "icationConfig\"\311\002\332A\023notification_config\332A" - + "\037notification_config,update_mask\202\323\344\223\002\212\0022" - + "D/v1/{notification_config.name=organizat" - + "ions/*/notificationConfigs/*}:\023notificat" - + "ion_configZU2>/v1/{notification_config.n" - + "ame=folders/*/notificationConfigs/*}:\023no" - + "tification_configZV2?/v1/{notification_c" - + "onfig.name=projects/*/notificationConfig" - + "s/*}:\023notification_config\022\223\002\n\032UpdateOrga" - + "nizationSettings\022A.google.cloud.security" - + "center.v1.UpdateOrganizationSettingsRequ" - + "est\0324.google.cloud.securitycenter.v1.Org" - + "anizationSettings\"|\332A\025organization_setti" - + "ngs\202\323\344\223\002^2E/v1/{organization_settings.na" - + "me=organizations/*/organizationSettings}" - + ":\025organization_settings\022\324\005\n)UpdateSecuri" - + "tyHealthAnalyticsCustomModule\022P.google.c" - + "loud.securitycenter.v1.UpdateSecurityHea" - + "lthAnalyticsCustomModuleRequest\032C.google" - + ".cloud.securitycenter.v1.SecurityHealthA" - + "nalyticsCustomModule\"\217\004\332A3security_healt" - + "h_analytics_custom_module,update_mask\202\323\344" - + "\223\002\322\0032r/v1/{security_health_analytics_cus" - + "tom_module.name=organizations/*/security" - + "HealthAnalyticsSettings/customModules/*}" - + ":\'security_health_analytics_custom_modul" - + "eZ\227\0012l/v1/{security_health_analytics_cus" - + "tom_module.name=folders/*/securityHealth" - + "AnalyticsSettings/customModules/*}:\'secu" - + "rity_health_analytics_custom_moduleZ\230\0012m" - + "/v1/{security_health_analytics_custom_mo" - + "dule.name=projects/*/securityHealthAnaly" - + "ticsSettings/customModules/*}:\'security_" - + "health_analytics_custom_module\022\261\001\n\014Updat" - + "eSource\0223.google.cloud.securitycenter.v1" - + ".UpdateSourceRequest\032&.google.cloud.secu" - + "ritycenter.v1.Source\"D\332A\006source\202\323\344\223\00252+/" - + "v1/{source.name=organizations/*/sources/" - + "*}:\006source\022\237\005\n\023UpdateSecurityMarks\022:.goo" - + "gle.cloud.securitycenter.v1.UpdateSecuri" - + "tyMarksRequest\032-.google.cloud.securityce" - + "nter.v1.SecurityMarks\"\234\004\332A\016security_mark" - + "s\202\323\344\223\002\204\0042@/v1/{security_marks.name=organ" - + "izations/*/assets/*/securityMarks}:\016secu" - + "rity_marksZL2:/v1/{security_marks.name=f" - + "olders/*/assets/*/securityMarks}:\016securi" - + "ty_marksZM2;/v1/{security_marks.name=pro" - + "jects/*/assets/*/securityMarks}:\016securit" - + "y_marksZ^2L/v1/{security_marks.name=orga" - + "nizations/*/sources/*/findings/*/securit" - + "yMarks}:\016security_marksZX2F/v1/{security" - + "_marks.name=folders/*/sources/*/findings" - + "/*/securityMarks}:\016security_marksZY2G/v1" - + "/{security_marks.name=projects/*/sources" - + "/*/findings/*/securityMarks}:\016security_m" - + "arks\022\364\002\n\024CreateBigQueryExport\022;.google.c" - + "loud.securitycenter.v1.CreateBigQueryExp" - + "ortRequest\032..google.cloud.securitycenter" - + ".v1.BigQueryExport\"\356\001\332A+parent,big_query" - + "_export,big_query_export_id\202\323\344\223\002\271\001\",/v1/" - + "{parent=organizations/*}/bigQueryExports" - + ":\020big_query_exportZ:\"&/v1/{parent=folder" - + "s/*}/bigQueryExports:\020big_query_exportZ;" - + "\"\'/v1/{parent=projects/*}/bigQueryExport" - + "s:\020big_query_export\022\377\001\n\024DeleteBigQueryEx" - + "port\022;.google.cloud.securitycenter.v1.De" - + "leteBigQueryExportRequest\032\026.google.proto" - + "buf.Empty\"\221\001\332A\004name\202\323\344\223\002\203\001*,/v1/{name=or" - + "ganizations/*/bigQueryExports/*}Z(*&/v1/" - + "{name=folders/*/bigQueryExports/*}Z)*\'/v" - + "1/{name=projects/*/bigQueryExports/*}\022\230\003" - + "\n\024UpdateBigQueryExport\022;.google.cloud.se" - + "curitycenter.v1.UpdateBigQueryExportRequ" - + "est\032..google.cloud.securitycenter.v1.Big" - + "QueryExport\"\222\002\332A\034big_query_export,update" - + "_mask\202\323\344\223\002\354\0012=/v1/{big_query_export.name" - + "=organizations/*/bigQueryExports/*}:\020big" - + "_query_exportZK27/v1/{big_query_export.n" - + "ame=folders/*/bigQueryExports/*}:\020big_qu" - + "ery_exportZL28/v1/{big_query_export.name" - + "=projects/*/bigQueryExports/*}:\020big_quer" - + "y_export\022\244\002\n\023ListBigQueryExports\022:.googl" - + "e.cloud.securitycenter.v1.ListBigQueryEx" - + "portsRequest\032;.google.cloud.securitycent" - + "er.v1.ListBigQueryExportsResponse\"\223\001\332A\006p" - + "arent\202\323\344\223\002\203\001\022,/v1/{parent=organizations/" - + "*}/bigQueryExportsZ(\022&/v1/{parent=folder" - + "s/*}/bigQueryExportsZ)\022\'/v1/{parent=proj" - + "ects/*}/bigQueryExports\032Q\312A\035securitycent" - + "er.googleapis.com\322A.https://www.googleap" - + "is.com/auth/cloud-platformB\330\001\n\"com.googl" - + "e.cloud.securitycenter.v1P\001ZJcloud.googl" - + "e.com/go/securitycenter/apiv1/securityce" - + "nterpb;securitycenterpb\252\002\036Google.Cloud.S" - + "ecurityCenter.V1\312\002\036Google\\Cloud\\Security" - + "Center\\V1\352\002!Google::Cloud::SecurityCente" - + "r::V1b\006proto3" + + "G\022E/v1/{parent=projects/*/securityHealth" + + "AnalyticsSettings}/customModules\022\362\001\n\013Lis" + + "tSources\0222.google.cloud.securitycenter.v" + + "1.ListSourcesRequest\0323.google.cloud.secu" + + "ritycenter.v1.ListSourcesResponse\"z\332A\006pa" + + "rent\202\323\344\223\002k\022$/v1/{parent=organizations/*}" + + "/sourcesZ \022\036/v1/{parent=folders/*}/sourc" + + "esZ!\022\037/v1/{parent=projects/*}/sources\022\212\002" + + "\n\021RunAssetDiscovery\0228.google.cloud.secur" + + "itycenter.v1.RunAssetDiscoveryRequest\032\035." + + "google.longrunning.Operation\"\233\001\210\002\001\312AQ\n8g" + + "oogle.cloud.securitycenter.v1.RunAssetDi" + + "scoveryResponse\022\025google.protobuf.Empty\332A" + + "\006parent\202\323\344\223\0025\"0/v1/{parent=organizations" + + "/*}/assets:runDiscovery:\001*\022\304\002\n\017SetFindin" + + "gState\0226.google.cloud.securitycenter.v1." + + "SetFindingStateRequest\032\'.google.cloud.se" + + "curitycenter.v1.Finding\"\317\001\332A\025name,state," + + "start_time\202\323\344\223\002\260\001\"8/v1/{name=organizatio" + + "ns/*/sources/*/findings/*}:setState:\001*Z7" + + "\"2/v1/{name=folders/*/sources/*/findings" + + "/*}:setState:\001*Z8\"3/v1/{name=projects/*/" + + "sources/*/findings/*}:setState:\001*\022\245\002\n\007Se" + + "tMute\022..google.cloud.securitycenter.v1.S" + + "etMuteRequest\032\'.google.cloud.securitycen" + + "ter.v1.Finding\"\300\001\332A\tname,mute\202\323\344\223\002\255\001\"7/v" + + "1/{name=organizations/*/sources/*/findin" + + "gs/*}:setMute:\001*Z6\"1/v1/{name=folders/*/" + + "sources/*/findings/*}:setMute:\001*Z7\"2/v1/" + + "{name=projects/*/sources/*/findings/*}:s" + + "etMute:\001*\022\235\001\n\014SetIamPolicy\022\".google.iam." + + "v1.SetIamPolicyRequest\032\025.google.iam.v1.P" + + "olicy\"R\332A\017resource,policy\202\323\344\223\002:\"5/v1/{re" + + "source=organizations/*/sources/*}:setIam" + + "Policy:\001*\022\310\001\n\022TestIamPermissions\022(.googl" + + "e.iam.v1.TestIamPermissionsRequest\032).goo" + + "gle.iam.v1.TestIamPermissionsResponse\"]\332" + + "A\024resource,permissions\202\323\344\223\002@\";/v1/{resou" + + "rce=organizations/*/sources/*}:testIamPe" + + "rmissions:\001*\022\201\004\n+SimulateSecurityHealthA" + + "nalyticsCustomModule\022R.google.cloud.secu" + + "ritycenter.v1.SimulateSecurityHealthAnal" + + "yticsCustomModuleRequest\032S.google.cloud." + + "securitycenter.v1.SimulateSecurityHealth" + + "AnalyticsCustomModuleResponse\"\250\002\332A\035paren" + + "t,custom_config,resource\202\323\344\223\002\201\002\"S/v1/{pa" + + "rent=organizations/*/securityHealthAnaly" + + "ticsSettings}/customModules:simulate:\001*Z" + + "R\"M/v1/{parent=folders/*/securityHealthA" + + "nalyticsSettings}/customModules:simulate" + + ":\001*ZS\"N/v1/{parent=projects/*/securityHe" + + "althAnalyticsSettings}/customModules:sim" + + "ulate:\001*\022\320\003\n\024UpdateExternalSystem\022;.goog" + + "le.cloud.securitycenter.v1.UpdateExterna" + + "lSystemRequest\032..google.cloud.securityce" + + "nter.v1.ExternalSystem\"\312\002\332A\033external_sys" + + "tem,update_mask\202\323\344\223\002\245\0022Q/v1/{external_sy" + + "stem.name=organizations/*/sources/*/find" + + "ings/*/externalSystems/*}:\017external_syst" + + "emZ^2K/v1/{external_system.name=folders/" + + "*/sources/*/findings/*/externalSystems/*" + + "}:\017external_systemZ_2L/v1/{external_syst" + + "em.name=projects/*/sources/*/findings/*/" + + "externalSystems/*}:\017external_system\022\301\002\n\r" + + "UpdateFinding\0224.google.cloud.securitycen" + + "ter.v1.UpdateFindingRequest\032\'.google.clo" + + "ud.securitycenter.v1.Finding\"\320\001\332A\007findin" + + "g\202\323\344\223\002\277\00127/v1/{finding.name=organization" + + "s/*/sources/*/findings/*}:\007findingZ<21/v" + + "1/{finding.name=folders/*/sources/*/find" + + "ings/*}:\007findingZ=22/v1/{finding.name=pr" + + "ojects/*/sources/*/findings/*}:\007finding\022" + + "\335\002\n\020UpdateMuteConfig\0227.google.cloud.secu" + + "ritycenter.v1.UpdateMuteConfigRequest\032*." + + "google.cloud.securitycenter.v1.MuteConfi" + + "g\"\343\001\332A\027mute_config,update_mask\202\323\344\223\002\302\00124/" + + "v1/{mute_config.name=organizations/*/mut" + + "eConfigs/*}:\013mute_configZ=2./v1/{mute_co" + + "nfig.name=folders/*/muteConfigs/*}:\013mute" + + "_configZ>2//v1/{mute_config.name=project" + + "s/*/muteConfigs/*}:\013mute_config\022\333\003\n\030Upda" + + "teNotificationConfig\022?.google.cloud.secu" + + "ritycenter.v1.UpdateNotificationConfigRe" + + "quest\0322.google.cloud.securitycenter.v1.N" + + "otificationConfig\"\311\002\332A\023notification_conf" + + "ig\332A\037notification_config,update_mask\202\323\344\223" + + "\002\212\0022D/v1/{notification_config.name=organ" + + "izations/*/notificationConfigs/*}:\023notif" + + "ication_configZU2>/v1/{notification_conf" + + "ig.name=folders/*/notificationConfigs/*}" + + ":\023notification_configZV2?/v1/{notificati" + + "on_config.name=projects/*/notificationCo" + + "nfigs/*}:\023notification_config\022\223\002\n\032Update" + + "OrganizationSettings\022A.google.cloud.secu" + + "ritycenter.v1.UpdateOrganizationSettings" + + "Request\0324.google.cloud.securitycenter.v1" + + ".OrganizationSettings\"|\332A\025organization_s" + + "ettings\202\323\344\223\002^2E/v1/{organization_setting" + + "s.name=organizations/*/organizationSetti" + + "ngs}:\025organization_settings\022\324\005\n)UpdateSe" + + "curityHealthAnalyticsCustomModule\022P.goog" + + "le.cloud.securitycenter.v1.UpdateSecurit" + + "yHealthAnalyticsCustomModuleRequest\032C.go" + + "ogle.cloud.securitycenter.v1.SecurityHea" + + "lthAnalyticsCustomModule\"\217\004\332A3security_h" + + "ealth_analytics_custom_module,update_mas" + + "k\202\323\344\223\002\322\0032r/v1/{security_health_analytics" + + "_custom_module.name=organizations/*/secu" + + "rityHealthAnalyticsSettings/customModule" + + "s/*}:\'security_health_analytics_custom_m" + + "oduleZ\227\0012l/v1/{security_health_analytics" + + "_custom_module.name=folders/*/securityHe" + + "althAnalyticsSettings/customModules/*}:\'" + + "security_health_analytics_custom_moduleZ" + + "\230\0012m/v1/{security_health_analytics_custo" + + "m_module.name=projects/*/securityHealthA" + + "nalyticsSettings/customModules/*}:\'secur" + + "ity_health_analytics_custom_module\022\261\001\n\014U" + + "pdateSource\0223.google.cloud.securitycente" + + "r.v1.UpdateSourceRequest\032&.google.cloud." + + "securitycenter.v1.Source\"D\332A\006source\202\323\344\223\002" + + "52+/v1/{source.name=organizations/*/sour" + + "ces/*}:\006source\022\237\005\n\023UpdateSecurityMarks\022:" + + ".google.cloud.securitycenter.v1.UpdateSe" + + "curityMarksRequest\032-.google.cloud.securi" + + "tycenter.v1.SecurityMarks\"\234\004\332A\016security_" + + "marks\202\323\344\223\002\204\0042@/v1/{security_marks.name=o" + + "rganizations/*/assets/*/securityMarks}:\016" + + "security_marksZL2:/v1/{security_marks.na" + + "me=folders/*/assets/*/securityMarks}:\016se" + + "curity_marksZM2;/v1/{security_marks.name" + + "=projects/*/assets/*/securityMarks}:\016sec" + + "urity_marksZ^2L/v1/{security_marks.name=" + + "organizations/*/sources/*/findings/*/sec" + + "urityMarks}:\016security_marksZX2F/v1/{secu" + + "rity_marks.name=folders/*/sources/*/find" + + "ings/*/securityMarks}:\016security_marksZY2" + + "G/v1/{security_marks.name=projects/*/sou" + + "rces/*/findings/*/securityMarks}:\016securi" + + "ty_marks\022\364\002\n\024CreateBigQueryExport\022;.goog" + + "le.cloud.securitycenter.v1.CreateBigQuer" + + "yExportRequest\032..google.cloud.securityce" + + "nter.v1.BigQueryExport\"\356\001\332A+parent,big_q" + + "uery_export,big_query_export_id\202\323\344\223\002\271\001\"," + + "/v1/{parent=organizations/*}/bigQueryExp" + + "orts:\020big_query_exportZ:\"&/v1/{parent=fo" + + "lders/*}/bigQueryExports:\020big_query_expo" + + "rtZ;\"\'/v1/{parent=projects/*}/bigQueryEx" + + "ports:\020big_query_export\022\377\001\n\024DeleteBigQue" + + "ryExport\022;.google.cloud.securitycenter.v" + + "1.DeleteBigQueryExportRequest\032\026.google.p" + + "rotobuf.Empty\"\221\001\332A\004name\202\323\344\223\002\203\001*,/v1/{nam" + + "e=organizations/*/bigQueryExports/*}Z(*&" + + "/v1/{name=folders/*/bigQueryExports/*}Z)" + + "*\'/v1/{name=projects/*/bigQueryExports/*" + + "}\022\230\003\n\024UpdateBigQueryExport\022;.google.clou" + + "d.securitycenter.v1.UpdateBigQueryExport" + + "Request\032..google.cloud.securitycenter.v1" + + ".BigQueryExport\"\222\002\332A\034big_query_export,up" + + "date_mask\202\323\344\223\002\354\0012=/v1/{big_query_export." + + "name=organizations/*/bigQueryExports/*}:" + + "\020big_query_exportZK27/v1/{big_query_expo" + + "rt.name=folders/*/bigQueryExports/*}:\020bi" + + "g_query_exportZL28/v1/{big_query_export." + + "name=projects/*/bigQueryExports/*}:\020big_" + + "query_export\022\244\002\n\023ListBigQueryExports\022:.g" + + "oogle.cloud.securitycenter.v1.ListBigQue" + + "ryExportsRequest\032;.google.cloud.security" + + "center.v1.ListBigQueryExportsResponse\"\223\001" + + "\332A\006parent\202\323\344\223\002\203\001\022,/v1/{parent=organizati" + + "ons/*}/bigQueryExportsZ(\022&/v1/{parent=fo" + + "lders/*}/bigQueryExportsZ)\022\'/v1/{parent=" + + "projects/*}/bigQueryExports\032Q\312A\035security" + + "center.googleapis.com\322A.https://www.goog" + + "leapis.com/auth/cloud-platformB\330\001\n\"com.g" + + "oogle.cloud.securitycenter.v1P\001ZJcloud.g" + + "oogle.com/go/securitycenter/apiv1/securi" + + "tycenterpb;securitycenterpb\252\002\036Google.Clo" + + "ud.SecurityCenter.V1\312\002\036Google\\Cloud\\Secu" + + "rityCenter\\V1\352\002!Google::Cloud::SecurityC" + + "enter::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -942,6 +993,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.OrganizationSettingsOuterClass.getDescriptor(), com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponseOuterClass .getDescriptor(), + com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomConfigProto + .getDescriptor(), com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleProto .getDescriptor(), com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), @@ -954,6 +1007,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_cloud_securitycenter_v1_BulkMuteFindingsRequest_descriptor = getDescriptor().getMessageTypes().get(0); @@ -1342,8 +1396,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Parent", }); - internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor = + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_descriptor = getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_descriptor, + new java.lang.String[] { + "Parent", "CustomConfig", "Resource", + }); + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_descriptor = + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_descriptor, + new java.lang.String[] { + "ResourceType", "ResourceData", "IamPolicyData", + }); + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_descriptor, + new java.lang.String[] { + "Result", + }); + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_descriptor = + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_descriptor, + new java.lang.String[] { + "Finding", "NoViolation", "Error", "Result", + }); + internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor = + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateExternalSystemRequest_descriptor, @@ -1351,7 +1441,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExternalSystem", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateFindingRequest_descriptor, @@ -1359,7 +1449,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Finding", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateMuteConfigRequest_descriptor, @@ -1367,7 +1457,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MuteConfig", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_securitycenter_v1_UpdateNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateNotificationConfigRequest_descriptor, @@ -1375,7 +1465,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NotificationConfig", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateOrganizationSettingsRequest_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_securitycenter_v1_UpdateOrganizationSettingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateOrganizationSettingsRequest_descriptor, @@ -1383,7 +1473,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OrganizationSettings", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateSecurityHealthAnalyticsCustomModuleRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_securitycenter_v1_UpdateSecurityHealthAnalyticsCustomModuleRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateSecurityHealthAnalyticsCustomModuleRequest_descriptor, @@ -1391,7 +1481,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SecurityHealthAnalyticsCustomModule", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateSourceRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_securitycenter_v1_UpdateSourceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateSourceRequest_descriptor, @@ -1399,7 +1489,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Source", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_UpdateSecurityMarksRequest_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(50); internal_static_google_cloud_securitycenter_v1_UpdateSecurityMarksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateSecurityMarksRequest_descriptor, @@ -1407,7 +1497,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SecurityMarks", "UpdateMask", "StartTime", }); internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(51); internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_CreateBigQueryExportRequest_descriptor, @@ -1415,7 +1505,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "BigQueryExport", "BigQueryExportId", }); internal_static_google_cloud_securitycenter_v1_UpdateBigQueryExportRequest_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(52); internal_static_google_cloud_securitycenter_v1_UpdateBigQueryExportRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_UpdateBigQueryExportRequest_descriptor, @@ -1423,7 +1513,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BigQueryExport", "UpdateMask", }); internal_static_google_cloud_securitycenter_v1_ListBigQueryExportsRequest_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(53); internal_static_google_cloud_securitycenter_v1_ListBigQueryExportsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListBigQueryExportsRequest_descriptor, @@ -1431,7 +1521,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_securitycenter_v1_ListBigQueryExportsResponse_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(54); internal_static_google_cloud_securitycenter_v1_ListBigQueryExportsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_ListBigQueryExportsResponse_descriptor, @@ -1439,7 +1529,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BigQueryExports", "NextPageToken", }); internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(55); internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_DeleteBigQueryExportRequest_descriptor, @@ -1472,6 +1562,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.NotificationConfigProto.getDescriptor(); com.google.cloud.securitycenter.v1.OrganizationSettingsOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponseOuterClass.getDescriptor(); + com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomConfigProto.getDescriptor(); com.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleProto.getDescriptor(); com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.SourceOuterClass.getDescriptor(); @@ -1483,6 +1574,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleRequest.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleRequest.java new file mode 100644 index 000000000000..25a77ee9f654 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleRequest.java @@ -0,0 +1,2691 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Request message to simulate a CustomConfig against a given test resource.
+ * Maximum size of the request is 4 MB by default.
+ * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} + */ +public final class SimulateSecurityHealthAnalyticsCustomModuleRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + SimulateSecurityHealthAnalyticsCustomModuleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder() to construct. + private SimulateSecurityHealthAnalyticsCustomModuleRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SimulateSecurityHealthAnalyticsCustomModuleRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SimulateSecurityHealthAnalyticsCustomModuleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .class, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .Builder.class); + } + + public interface SimulatedResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + /** + * + * + *
+     * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+     * Optional. A representation of the GCP resource. Should match the GCP
+     * resource JSON format.
+     * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceData field is set. + */ + boolean hasResourceData(); + /** + * + * + *
+     * Optional. A representation of the GCP resource. Should match the GCP
+     * resource JSON format.
+     * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceData. + */ + com.google.protobuf.Struct getResourceData(); + /** + * + * + *
+     * Optional. A representation of the GCP resource. Should match the GCP
+     * resource JSON format.
+     * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getResourceDataOrBuilder(); + + /** + * + * + *
+     * Optional. A representation of the IAM policy.
+     * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the iamPolicyData field is set. + */ + boolean hasIamPolicyData(); + /** + * + * + *
+     * Optional. A representation of the IAM policy.
+     * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The iamPolicyData. + */ + com.google.iam.v1.Policy getIamPolicyData(); + /** + * + * + *
+     * Optional. A representation of the IAM policy.
+     * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.iam.v1.PolicyOrBuilder getIamPolicyDataOrBuilder(); + } + /** + * + * + *
+   * Manually constructed resource. If the custom module only evaluates against
+   * the resource data, the iam_policy_data field can be omitted, and vice
+   * versa.
+   * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} + */ + public static final class SimulatedResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) + SimulatedResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimulatedResource.newBuilder() to construct. + private SimulatedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SimulatedResource() { + resourceType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SimulatedResource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.class, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.Builder.class); + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + /** + * + * + *
+     * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_DATA_FIELD_NUMBER = 2; + private com.google.protobuf.Struct resourceData_; + /** + * + * + *
+     * Optional. A representation of the GCP resource. Should match the GCP
+     * resource JSON format.
+     * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceData field is set. + */ + @java.lang.Override + public boolean hasResourceData() { + return resourceData_ != null; + } + /** + * + * + *
+     * Optional. A representation of the GCP resource. Should match the GCP
+     * resource JSON format.
+     * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceData. + */ + @java.lang.Override + public com.google.protobuf.Struct getResourceData() { + return resourceData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : resourceData_; + } + /** + * + * + *
+     * Optional. A representation of the GCP resource. Should match the GCP
+     * resource JSON format.
+     * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getResourceDataOrBuilder() { + return resourceData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : resourceData_; + } + + public static final int IAM_POLICY_DATA_FIELD_NUMBER = 3; + private com.google.iam.v1.Policy iamPolicyData_; + /** + * + * + *
+     * Optional. A representation of the IAM policy.
+     * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the iamPolicyData field is set. + */ + @java.lang.Override + public boolean hasIamPolicyData() { + return iamPolicyData_ != null; + } + /** + * + * + *
+     * Optional. A representation of the IAM policy.
+     * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The iamPolicyData. + */ + @java.lang.Override + public com.google.iam.v1.Policy getIamPolicyData() { + return iamPolicyData_ == null + ? com.google.iam.v1.Policy.getDefaultInstance() + : iamPolicyData_; + } + /** + * + * + *
+     * Optional. A representation of the IAM policy.
+     * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getIamPolicyDataOrBuilder() { + return iamPolicyData_ == null + ? com.google.iam.v1.Policy.getDefaultInstance() + : iamPolicyData_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceType_); + } + if (resourceData_ != null) { + output.writeMessage(2, getResourceData()); + } + if (iamPolicyData_ != null) { + output.writeMessage(3, getIamPolicyData()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceType_); + } + if (resourceData_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResourceData()); + } + if (iamPolicyData_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIamPolicyData()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + other = + (com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource) + obj; + + if (!getResourceType().equals(other.getResourceType())) return false; + if (hasResourceData() != other.hasResourceData()) return false; + if (hasResourceData()) { + if (!getResourceData().equals(other.getResourceData())) return false; + } + if (hasIamPolicyData() != other.hasIamPolicyData()) return false; + if (hasIamPolicyData()) { + if (!getIamPolicyData().equals(other.getIamPolicyData())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + if (hasResourceData()) { + hash = (37 * hash) + RESOURCE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getResourceData().hashCode(); + } + if (hasIamPolicyData()) { + hash = (37 * hash) + IAM_POLICY_DATA_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicyData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Manually constructed resource. If the custom module only evaluates against
+     * the resource data, the iam_policy_data field can be omitted, and vice
+     * versa.
+     * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.class, + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.Builder + .class); + } + + // Construct using + // com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceType_ = ""; + resourceData_ = null; + if (resourceDataBuilder_ != null) { + resourceDataBuilder_.dispose(); + resourceDataBuilder_ = null; + } + iamPolicyData_ = null; + if (iamPolicyDataBuilder_ != null) { + iamPolicyDataBuilder_.dispose(); + iamPolicyDataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_SimulatedResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + build() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + buildPartial() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + result = + new com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceData_ = + resourceDataBuilder_ == null ? resourceData_ : resourceDataBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.iamPolicyData_ = + iamPolicyDataBuilder_ == null ? iamPolicyData_ : iamPolicyDataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource) { + return mergeFrom( + (com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + other) { + if (other + == com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.getDefaultInstance()) return this; + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasResourceData()) { + mergeResourceData(other.getResourceData()); + } + if (other.hasIamPolicyData()) { + mergeIamPolicyData(other.getIamPolicyData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getResourceDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getIamPolicyDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object resourceType_ = ""; + /** + * + * + *
+       * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+       * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+       * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+       * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+       * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The type of the resource, e.g. `compute.googleapis.com/Disk`.
+       * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Struct resourceData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + resourceDataBuilder_; + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceData field is set. + */ + public boolean hasResourceData() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceData. + */ + public com.google.protobuf.Struct getResourceData() { + if (resourceDataBuilder_ == null) { + return resourceData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : resourceData_; + } else { + return resourceDataBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceData(com.google.protobuf.Struct value) { + if (resourceDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceData_ = value; + } else { + resourceDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceData(com.google.protobuf.Struct.Builder builderForValue) { + if (resourceDataBuilder_ == null) { + resourceData_ = builderForValue.build(); + } else { + resourceDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeResourceData(com.google.protobuf.Struct value) { + if (resourceDataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && resourceData_ != null + && resourceData_ != com.google.protobuf.Struct.getDefaultInstance()) { + getResourceDataBuilder().mergeFrom(value); + } else { + resourceData_ = value; + } + } else { + resourceDataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearResourceData() { + bitField0_ = (bitField0_ & ~0x00000002); + resourceData_ = null; + if (resourceDataBuilder_ != null) { + resourceDataBuilder_.dispose(); + resourceDataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getResourceDataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResourceDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getResourceDataOrBuilder() { + if (resourceDataBuilder_ != null) { + return resourceDataBuilder_.getMessageOrBuilder(); + } else { + return resourceData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : resourceData_; + } + } + /** + * + * + *
+       * Optional. A representation of the GCP resource. Should match the GCP
+       * resource JSON format.
+       * 
+ * + * .google.protobuf.Struct resource_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getResourceDataFieldBuilder() { + if (resourceDataBuilder_ == null) { + resourceDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getResourceData(), getParentForChildren(), isClean()); + resourceData_ = null; + } + return resourceDataBuilder_; + } + + private com.google.iam.v1.Policy iamPolicyData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder> + iamPolicyDataBuilder_; + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the iamPolicyData field is set. + */ + public boolean hasIamPolicyData() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The iamPolicyData. + */ + public com.google.iam.v1.Policy getIamPolicyData() { + if (iamPolicyDataBuilder_ == null) { + return iamPolicyData_ == null + ? com.google.iam.v1.Policy.getDefaultInstance() + : iamPolicyData_; + } else { + return iamPolicyDataBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIamPolicyData(com.google.iam.v1.Policy value) { + if (iamPolicyDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicyData_ = value; + } else { + iamPolicyDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIamPolicyData(com.google.iam.v1.Policy.Builder builderForValue) { + if (iamPolicyDataBuilder_ == null) { + iamPolicyData_ = builderForValue.build(); + } else { + iamPolicyDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIamPolicyData(com.google.iam.v1.Policy value) { + if (iamPolicyDataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && iamPolicyData_ != null + && iamPolicyData_ != com.google.iam.v1.Policy.getDefaultInstance()) { + getIamPolicyDataBuilder().mergeFrom(value); + } else { + iamPolicyData_ = value; + } + } else { + iamPolicyDataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIamPolicyData() { + bitField0_ = (bitField0_ & ~0x00000004); + iamPolicyData_ = null; + if (iamPolicyDataBuilder_ != null) { + iamPolicyDataBuilder_.dispose(); + iamPolicyDataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v1.Policy.Builder getIamPolicyDataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getIamPolicyDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v1.PolicyOrBuilder getIamPolicyDataOrBuilder() { + if (iamPolicyDataBuilder_ != null) { + return iamPolicyDataBuilder_.getMessageOrBuilder(); + } else { + return iamPolicyData_ == null + ? com.google.iam.v1.Policy.getDefaultInstance() + : iamPolicyData_; + } + } + /** + * + * + *
+       * Optional. A representation of the IAM policy.
+       * 
+ * + * .google.iam.v1.Policy iam_policy_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder> + getIamPolicyDataFieldBuilder() { + if (iamPolicyDataBuilder_ == null) { + iamPolicyDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder>( + getIamPolicyData(), getParentForChildren(), isClean()); + iamPolicyData_ = null; + } + return iamPolicyDataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) + private static final com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource(); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimulatedResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The relative resource name of the organization, project, or
+   * folder. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * An example is:
+   * "organizations/{organization_id}".
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The relative resource name of the organization, project, or
+   * folder. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * An example is:
+   * "organizations/{organization_id}".
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.securitycenter.v1.CustomConfig customConfig_; + /** + * + * + *
+   * Required. The user specified custom configuration to test.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customConfig field is set. + */ + @java.lang.Override + public boolean hasCustomConfig() { + return customConfig_ != null; + } + /** + * + * + *
+   * Required. The user specified custom configuration to test.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customConfig. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.CustomConfig getCustomConfig() { + return customConfig_ == null + ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance() + : customConfig_; + } + /** + * + * + *
+   * Required. The user specified custom configuration to test.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.CustomConfigOrBuilder getCustomConfigOrBuilder() { + return customConfig_ == null + ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance() + : customConfig_; + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + resource_; + /** + * + * + *
+   * Required. Resource data to simulate custom module against.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + * + * + *
+   * Required. Resource data to simulate custom module against.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + getResource() { + return resource_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.getDefaultInstance() + : resource_; + } + /** + * + * + *
+   * Required. Resource data to simulate custom module against.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResourceOrBuilder + getResourceOrBuilder() { + return resource_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.getDefaultInstance() + : resource_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (customConfig_ != null) { + output.writeMessage(2, getCustomConfig()); + } + if (resource_ != null) { + output.writeMessage(3, getResource()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (customConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomConfig()); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResource()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest other = + (com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCustomConfig() != other.hasCustomConfig()) return false; + if (hasCustomConfig()) { + if (!getCustomConfig().equals(other.getCustomConfig())) return false; + } + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource().equals(other.getResource())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasCustomConfig()) { + hash = (37 * hash) + CUSTOM_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCustomConfig().hashCode(); + } + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message to simulate a CustomConfig against a given test resource.
+   * Maximum size of the request is 4 MB by default.
+   * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .class, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + customConfig_ = null; + if (customConfigBuilder_ != null) { + customConfigBuilder_.dispose(); + customConfigBuilder_ = null; + } + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + build() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + buildPartial() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest result = + new com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.customConfig_ = + customConfigBuilder_ == null ? customConfig_ : customConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resource_ = resourceBuilder_ == null ? resource_ : resourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) { + return mergeFrom( + (com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + other) { + if (other + == com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCustomConfig()) { + mergeCustomConfig(other.getCustomConfig()); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCustomConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The relative resource name of the organization, project, or
+     * folder. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * An example is:
+     * "organizations/{organization_id}".
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The relative resource name of the organization, project, or
+     * folder. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * An example is:
+     * "organizations/{organization_id}".
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The relative resource name of the organization, project, or
+     * folder. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * An example is:
+     * "organizations/{organization_id}".
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The relative resource name of the organization, project, or
+     * folder. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * An example is:
+     * "organizations/{organization_id}".
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The relative resource name of the organization, project, or
+     * folder. See:
+     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+     * An example is:
+     * "organizations/{organization_id}".
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v1.CustomConfig customConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.CustomConfig, + com.google.cloud.securitycenter.v1.CustomConfig.Builder, + com.google.cloud.securitycenter.v1.CustomConfigOrBuilder> + customConfigBuilder_; + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customConfig field is set. + */ + public boolean hasCustomConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customConfig. + */ + public com.google.cloud.securitycenter.v1.CustomConfig getCustomConfig() { + if (customConfigBuilder_ == null) { + return customConfig_ == null + ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance() + : customConfig_; + } else { + return customConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomConfig(com.google.cloud.securitycenter.v1.CustomConfig value) { + if (customConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customConfig_ = value; + } else { + customConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomConfig( + com.google.cloud.securitycenter.v1.CustomConfig.Builder builderForValue) { + if (customConfigBuilder_ == null) { + customConfig_ = builderForValue.build(); + } else { + customConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomConfig(com.google.cloud.securitycenter.v1.CustomConfig value) { + if (customConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && customConfig_ != null + && customConfig_ + != com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance()) { + getCustomConfigBuilder().mergeFrom(value); + } else { + customConfig_ = value; + } + } else { + customConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + customConfig_ = null; + if (customConfigBuilder_ != null) { + customConfigBuilder_.dispose(); + customConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.CustomConfig.Builder getCustomConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCustomConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.CustomConfigOrBuilder getCustomConfigOrBuilder() { + if (customConfigBuilder_ != null) { + return customConfigBuilder_.getMessageOrBuilder(); + } else { + return customConfig_ == null + ? com.google.cloud.securitycenter.v1.CustomConfig.getDefaultInstance() + : customConfig_; + } + } + /** + * + * + *
+     * Required. The user specified custom configuration to test.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.CustomConfig, + com.google.cloud.securitycenter.v1.CustomConfig.Builder, + com.google.cloud.securitycenter.v1.CustomConfigOrBuilder> + getCustomConfigFieldBuilder() { + if (customConfigBuilder_ == null) { + customConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.CustomConfig, + com.google.cloud.securitycenter.v1.CustomConfig.Builder, + com.google.cloud.securitycenter.v1.CustomConfigOrBuilder>( + getCustomConfig(), getParentForChildren(), isClean()); + customConfig_ = null; + } + return customConfigBuilder_; + } + + private com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.Builder, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResourceOrBuilder> + resourceBuilder_; + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + getResource() { + if (resourceBuilder_ == null) { + return resource_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.getDefaultInstance() + : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + } else { + resourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResource( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.Builder + builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeResource( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + value) { + if (resourceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && resource_ != null + && resource_ + != com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + .getDefaultInstance()) { + getResourceBuilder().mergeFrom(value); + } else { + resource_ = value; + } + } else { + resourceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResource() { + bitField0_ = (bitField0_ & ~0x00000004); + resource_ = null; + if (resourceBuilder_ != null) { + resourceBuilder_.dispose(); + resourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.Builder + getResourceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResourceOrBuilder + getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.getDefaultInstance() + : resource_; + } + } + /** + * + * + *
+     * Required. Resource data to simulate custom module against.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource.Builder, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResourceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource, + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.Builder, + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResourceOrBuilder>( + getResource(), getParentForChildren(), isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + private static final com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SimulateSecurityHealthAnalyticsCustomModuleRequest> + PARSER = + new com.google.protobuf.AbstractParser< + SimulateSecurityHealthAnalyticsCustomModuleRequest>() { + @java.lang.Override + public SimulateSecurityHealthAnalyticsCustomModuleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleRequestOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleRequestOrBuilder.java new file mode 100644 index 000000000000..399b498ee384 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface SimulateSecurityHealthAnalyticsCustomModuleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The relative resource name of the organization, project, or
+   * folder. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * An example is:
+   * "organizations/{organization_id}".
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The relative resource name of the organization, project, or
+   * folder. See:
+   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
+   * An example is:
+   * "organizations/{organization_id}".
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The user specified custom configuration to test.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customConfig field is set. + */ + boolean hasCustomConfig(); + /** + * + * + *
+   * Required. The user specified custom configuration to test.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customConfig. + */ + com.google.cloud.securitycenter.v1.CustomConfig getCustomConfig(); + /** + * + * + *
+   * Required. The user specified custom configuration to test.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.CustomConfig custom_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v1.CustomConfigOrBuilder getCustomConfigOrBuilder(); + + /** + * + * + *
+   * Required. Resource data to simulate custom module against.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * + * + *
+   * Required. Resource data to simulate custom module against.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResource + getResource(); + /** + * + * + *
+   * Required. Resource data to simulate custom module against.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + .SimulatedResourceOrBuilder + getResourceOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleResponse.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleResponse.java new file mode 100644 index 000000000000..314755c282ae --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleResponse.java @@ -0,0 +1,2415 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Response message for simulating a SecurityHealthAnalyticsCustomModule against
+ * a given resource.
+ * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} + */ +public final class SimulateSecurityHealthAnalyticsCustomModuleResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + SimulateSecurityHealthAnalyticsCustomModuleResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimulateSecurityHealthAnalyticsCustomModuleResponse.newBuilder() to construct. + private SimulateSecurityHealthAnalyticsCustomModuleResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SimulateSecurityHealthAnalyticsCustomModuleResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SimulateSecurityHealthAnalyticsCustomModuleResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .class, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .Builder.class); + } + + public interface SimulatedResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Finding that would be published for the test case,
+     * if a violation is detected.
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + * + * @return Whether the finding field is set. + */ + boolean hasFinding(); + /** + * + * + *
+     * Finding that would be published for the test case,
+     * if a violation is detected.
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + * + * @return The finding. + */ + com.google.cloud.securitycenter.v1.Finding getFinding(); + /** + * + * + *
+     * Finding that would be published for the test case,
+     * if a violation is detected.
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder(); + + /** + * + * + *
+     * Indicates that the test case does not trigger any violation.
+     * 
+ * + * .google.protobuf.Empty no_violation = 2; + * + * @return Whether the noViolation field is set. + */ + boolean hasNoViolation(); + /** + * + * + *
+     * Indicates that the test case does not trigger any violation.
+     * 
+ * + * .google.protobuf.Empty no_violation = 2; + * + * @return The noViolation. + */ + com.google.protobuf.Empty getNoViolation(); + /** + * + * + *
+     * Indicates that the test case does not trigger any violation.
+     * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + com.google.protobuf.EmptyOrBuilder getNoViolationOrBuilder(); + + /** + * + * + *
+     * Error encountered during the test.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+     * Error encountered during the test.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+     * Error encountered during the test.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.ResultCase + getResultCase(); + } + /** + * + * + *
+   * Possible test result.
+   * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} + */ + public static final class SimulatedResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + SimulatedResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimulatedResult.newBuilder() to construct. + private SimulatedResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SimulatedResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SimulatedResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.class, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.Builder.class); + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FINDING(1), + NO_VIOLATION(2), + ERROR(3), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: + return FINDING; + case 2: + return NO_VIOLATION; + case 3: + return ERROR; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int FINDING_FIELD_NUMBER = 1; + /** + * + * + *
+     * Finding that would be published for the test case,
+     * if a violation is detected.
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + * + * @return Whether the finding field is set. + */ + @java.lang.Override + public boolean hasFinding() { + return resultCase_ == 1; + } + /** + * + * + *
+     * Finding that would be published for the test case,
+     * if a violation is detected.
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + * + * @return The finding. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Finding getFinding() { + if (resultCase_ == 1) { + return (com.google.cloud.securitycenter.v1.Finding) result_; + } + return com.google.cloud.securitycenter.v1.Finding.getDefaultInstance(); + } + /** + * + * + *
+     * Finding that would be published for the test case,
+     * if a violation is detected.
+     * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder() { + if (resultCase_ == 1) { + return (com.google.cloud.securitycenter.v1.Finding) result_; + } + return com.google.cloud.securitycenter.v1.Finding.getDefaultInstance(); + } + + public static final int NO_VIOLATION_FIELD_NUMBER = 2; + /** + * + * + *
+     * Indicates that the test case does not trigger any violation.
+     * 
+ * + * .google.protobuf.Empty no_violation = 2; + * + * @return Whether the noViolation field is set. + */ + @java.lang.Override + public boolean hasNoViolation() { + return resultCase_ == 2; + } + /** + * + * + *
+     * Indicates that the test case does not trigger any violation.
+     * 
+ * + * .google.protobuf.Empty no_violation = 2; + * + * @return The noViolation. + */ + @java.lang.Override + public com.google.protobuf.Empty getNoViolation() { + if (resultCase_ == 2) { + return (com.google.protobuf.Empty) result_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + /** + * + * + *
+     * Indicates that the test case does not trigger any violation.
+     * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + @java.lang.Override + public com.google.protobuf.EmptyOrBuilder getNoViolationOrBuilder() { + if (resultCase_ == 2) { + return (com.google.protobuf.Empty) result_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + /** + * + * + *
+     * Error encountered during the test.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + /** + * + * + *
+     * Error encountered during the test.
+     * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + * + * + *
+     * Error encountered during the test.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (resultCase_ == 1) { + output.writeMessage(1, (com.google.cloud.securitycenter.v1.Finding) result_); + } + if (resultCase_ == 2) { + output.writeMessage(2, (com.google.protobuf.Empty) result_); + } + if (resultCase_ == 3) { + output.writeMessage(3, (com.google.rpc.Status) result_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.securitycenter.v1.Finding) result_); + } + if (resultCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.protobuf.Empty) result_); + } + if (resultCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.rpc.Status) result_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + other = + (com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + obj; + + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 1: + if (!getFinding().equals(other.getFinding())) return false; + break; + case 2: + if (!getNoViolation().equals(other.getNoViolation())) return false; + break; + case 3: + if (!getError().equals(other.getError())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (resultCase_) { + case 1: + hash = (37 * hash) + FINDING_FIELD_NUMBER; + hash = (53 * hash) + getFinding().hashCode(); + break; + case 2: + hash = (37 * hash) + NO_VIOLATION_FIELD_NUMBER; + hash = (53 * hash) + getNoViolation().hashCode(); + break; + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Possible test result.
+     * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.class, + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.Builder + .class); + } + + // Construct using + // com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (findingBuilder_ != null) { + findingBuilder_.clear(); + } + if (noViolationBuilder_ != null) { + noViolationBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_SimulatedResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + build() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + buildPartial() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + result = + new com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 1 && findingBuilder_ != null) { + result.result_ = findingBuilder_.build(); + } + if (resultCase_ == 2 && noViolationBuilder_ != null) { + result.result_ = noViolationBuilder_.build(); + } + if (resultCase_ == 3 && errorBuilder_ != null) { + result.result_ = errorBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult) { + return mergeFrom( + (com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + other) { + if (other + == com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + .getDefaultInstance()) return this; + switch (other.getResultCase()) { + case FINDING: + { + mergeFinding(other.getFinding()); + break; + } + case NO_VIOLATION: + { + mergeNoViolation(other.getNoViolation()); + break; + } + case ERROR: + { + mergeError(other.getError()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFindingFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getNoViolationFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Finding, + com.google.cloud.securitycenter.v1.Finding.Builder, + com.google.cloud.securitycenter.v1.FindingOrBuilder> + findingBuilder_; + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + * + * @return Whether the finding field is set. + */ + @java.lang.Override + public boolean hasFinding() { + return resultCase_ == 1; + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + * + * @return The finding. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Finding getFinding() { + if (findingBuilder_ == null) { + if (resultCase_ == 1) { + return (com.google.cloud.securitycenter.v1.Finding) result_; + } + return com.google.cloud.securitycenter.v1.Finding.getDefaultInstance(); + } else { + if (resultCase_ == 1) { + return findingBuilder_.getMessage(); + } + return com.google.cloud.securitycenter.v1.Finding.getDefaultInstance(); + } + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + public Builder setFinding(com.google.cloud.securitycenter.v1.Finding value) { + if (findingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + findingBuilder_.setMessage(value); + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + public Builder setFinding( + com.google.cloud.securitycenter.v1.Finding.Builder builderForValue) { + if (findingBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + findingBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + public Builder mergeFinding(com.google.cloud.securitycenter.v1.Finding value) { + if (findingBuilder_ == null) { + if (resultCase_ == 1 + && result_ != com.google.cloud.securitycenter.v1.Finding.getDefaultInstance()) { + result_ = + com.google.cloud.securitycenter.v1.Finding.newBuilder( + (com.google.cloud.securitycenter.v1.Finding) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 1) { + findingBuilder_.mergeFrom(value); + } else { + findingBuilder_.setMessage(value); + } + } + resultCase_ = 1; + return this; + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + public Builder clearFinding() { + if (findingBuilder_ == null) { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + } + findingBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + public com.google.cloud.securitycenter.v1.Finding.Builder getFindingBuilder() { + return getFindingFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.FindingOrBuilder getFindingOrBuilder() { + if ((resultCase_ == 1) && (findingBuilder_ != null)) { + return findingBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 1) { + return (com.google.cloud.securitycenter.v1.Finding) result_; + } + return com.google.cloud.securitycenter.v1.Finding.getDefaultInstance(); + } + } + /** + * + * + *
+       * Finding that would be published for the test case,
+       * if a violation is detected.
+       * 
+ * + * .google.cloud.securitycenter.v1.Finding finding = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Finding, + com.google.cloud.securitycenter.v1.Finding.Builder, + com.google.cloud.securitycenter.v1.FindingOrBuilder> + getFindingFieldBuilder() { + if (findingBuilder_ == null) { + if (!(resultCase_ == 1)) { + result_ = com.google.cloud.securitycenter.v1.Finding.getDefaultInstance(); + } + findingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Finding, + com.google.cloud.securitycenter.v1.Finding.Builder, + com.google.cloud.securitycenter.v1.FindingOrBuilder>( + (com.google.cloud.securitycenter.v1.Finding) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 1; + onChanged(); + return findingBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, + com.google.protobuf.Empty.Builder, + com.google.protobuf.EmptyOrBuilder> + noViolationBuilder_; + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + * + * @return Whether the noViolation field is set. + */ + @java.lang.Override + public boolean hasNoViolation() { + return resultCase_ == 2; + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + * + * @return The noViolation. + */ + @java.lang.Override + public com.google.protobuf.Empty getNoViolation() { + if (noViolationBuilder_ == null) { + if (resultCase_ == 2) { + return (com.google.protobuf.Empty) result_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } else { + if (resultCase_ == 2) { + return noViolationBuilder_.getMessage(); + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + public Builder setNoViolation(com.google.protobuf.Empty value) { + if (noViolationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + noViolationBuilder_.setMessage(value); + } + resultCase_ = 2; + return this; + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + public Builder setNoViolation(com.google.protobuf.Empty.Builder builderForValue) { + if (noViolationBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + noViolationBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 2; + return this; + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + public Builder mergeNoViolation(com.google.protobuf.Empty value) { + if (noViolationBuilder_ == null) { + if (resultCase_ == 2 && result_ != com.google.protobuf.Empty.getDefaultInstance()) { + result_ = + com.google.protobuf.Empty.newBuilder((com.google.protobuf.Empty) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 2) { + noViolationBuilder_.mergeFrom(value); + } else { + noViolationBuilder_.setMessage(value); + } + } + resultCase_ = 2; + return this; + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + public Builder clearNoViolation() { + if (noViolationBuilder_ == null) { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + } + noViolationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + public com.google.protobuf.Empty.Builder getNoViolationBuilder() { + return getNoViolationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + @java.lang.Override + public com.google.protobuf.EmptyOrBuilder getNoViolationOrBuilder() { + if ((resultCase_ == 2) && (noViolationBuilder_ != null)) { + return noViolationBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 2) { + return (com.google.protobuf.Empty) result_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + * + * + *
+       * Indicates that the test case does not trigger any violation.
+       * 
+ * + * .google.protobuf.Empty no_violation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, + com.google.protobuf.Empty.Builder, + com.google.protobuf.EmptyOrBuilder> + getNoViolationFieldBuilder() { + if (noViolationBuilder_ == null) { + if (!(resultCase_ == 2)) { + result_ = com.google.protobuf.Empty.getDefaultInstance(); + } + noViolationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, + com.google.protobuf.Empty.Builder, + com.google.protobuf.EmptyOrBuilder>( + (com.google.protobuf.Empty) result_, getParentForChildren(), isClean()); + result_ = null; + } + resultCase_ = 2; + onChanged(); + return noViolationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (resultCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 3; + return this; + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 3; + return this; + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (resultCase_ == 3 && result_ != com.google.rpc.Status.getDefaultInstance()) { + result_ = + com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + resultCase_ = 3; + return this; + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + * + * + *
+       * Error encountered during the test.
+       * 
+ * + * .google.rpc.Status error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 3)) { + result_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) result_, getParentForChildren(), isClean()); + result_ = null; + } + resultCase_ = 3; + onChanged(); + return errorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + private static final com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult(); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimulatedResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RESULT_FIELD_NUMBER = 1; + private com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + result_; + /** + * + * + *
+   * Result for test case in the corresponding request.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * Result for test case in the corresponding request.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + getResult() { + return result_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * Result for test case in the corresponding request.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResultOrBuilder + getResultOrBuilder() { + return result_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.getDefaultInstance() + : result_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (result_ != null) { + output.writeMessage(1, getResult()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getResult()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse other = + (com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + obj; + + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for simulating a SecurityHealthAnalyticsCustomModule against
+   * a given resource.
+   * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .class, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.SecuritycenterService + .internal_static_google_cloud_securitycenter_v1_SimulateSecurityHealthAnalyticsCustomModuleResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + build() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + buildPartial() { + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + result = + new com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.result_ = resultBuilder_ == null ? result_ : resultBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) { + return mergeFrom( + (com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + other) { + if (other + == com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .getDefaultInstance()) return this; + if (other.hasResult()) { + mergeResult(other.getResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.Builder, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResultOrBuilder> + resultBuilder_; + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + * + * @return The result. + */ + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + public Builder setResult( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + } else { + resultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + public Builder setResult( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.Builder + builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + public Builder mergeResult( + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + value) { + if (resultBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && result_ != null + && result_ + != com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + .getDefaultInstance()) { + getResultBuilder().mergeFrom(value); + } else { + result_ = value; + } + } else { + resultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000001); + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.Builder + getResultBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResultOrBuilder + getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * Result for test case in the corresponding request.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult.Builder, + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult, + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.Builder, + com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResultOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + private static final com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse(); + } + + public static com.google.cloud.securitycenter.v1 + .SimulateSecurityHealthAnalyticsCustomModuleResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SimulateSecurityHealthAnalyticsCustomModuleResponse> + PARSER = + new com.google.protobuf.AbstractParser< + SimulateSecurityHealthAnalyticsCustomModuleResponse>() { + @java.lang.Override + public SimulateSecurityHealthAnalyticsCustomModuleResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleResponseOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleResponseOrBuilder.java new file mode 100644 index 000000000000..b81b135119d8 --- /dev/null +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SimulateSecurityHealthAnalyticsCustomModuleResponseOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/securitycenter_service.proto + +package com.google.cloud.securitycenter.v1; + +public interface SimulateSecurityHealthAnalyticsCustomModuleResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Result for test case in the corresponding request.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * Result for test case in the corresponding request.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + * + * @return The result. + */ + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResult + getResult(); + /** + * + * + *
+   * Result for test case in the corresponding request.
+   * 
+ * + * + * .google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult result = 1; + * + */ + com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + .SimulatedResultOrBuilder + getResultOrBuilder(); +} diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto index 6c3fe0ea27e5..78c20386be2b 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -30,6 +30,7 @@ import "google/cloud/securitycenter/v1/mute_config.proto"; import "google/cloud/securitycenter/v1/notification_config.proto"; import "google/cloud/securitycenter/v1/organization_settings.proto"; import "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; +import "google/cloud/securitycenter/v1/security_health_analytics_custom_config.proto"; import "google/cloud/securitycenter/v1/security_health_analytics_custom_module.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/source.proto"; @@ -41,6 +42,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; @@ -515,6 +517,25 @@ service SecurityCenter { option (google.api.method_signature) = "resource,permissions"; } + // Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + rpc SimulateSecurityHealthAnalyticsCustomModule( + SimulateSecurityHealthAnalyticsCustomModuleRequest) + returns (SimulateSecurityHealthAnalyticsCustomModuleResponse) { + option (google.api.http) = { + post: "/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:simulate" + body: "*" + additional_bindings { + post: "/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:simulate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:simulate" + body: "*" + } + }; + option (google.api.method_signature) = "parent,custom_config,resource"; + } + // Updates external system. This is for a given finding. rpc UpdateExternalSystem(UpdateExternalSystemRequest) returns (ExternalSystem) { @@ -2030,6 +2051,62 @@ message RunAssetDiscoveryRequest { ]; } +// Request message to simulate a CustomConfig against a given test resource. +// Maximum size of the request is 4 MB by default. +message SimulateSecurityHealthAnalyticsCustomModuleRequest { + // Manually constructed resource. If the custom module only evaluates against + // the resource data, the iam_policy_data field can be omitted, and vice + // versa. + message SimulatedResource { + // Required. The type of the resource, e.g. `compute.googleapis.com/Disk`. + string resource_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A representation of the GCP resource. Should match the GCP + // resource JSON format. + google.protobuf.Struct resource_data = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A representation of the IAM policy. + google.iam.v1.Policy iam_policy_data = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The relative resource name of the organization, project, or + // folder. See: + // https://cloud.google.com/apis/design/resource_names#relative_resource_name + // An example is: + // "organizations/{organization_id}". + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The user specified custom configuration to test. + CustomConfig custom_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Resource data to simulate custom module against. + SimulatedResource resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for simulating a SecurityHealthAnalyticsCustomModule against +// a given resource. +message SimulateSecurityHealthAnalyticsCustomModuleResponse { + // Possible test result. + message SimulatedResult { + oneof result { + // Finding that would be published for the test case, + // if a violation is detected. + Finding finding = 1; + + // Indicates that the test case does not trigger any violation. + google.protobuf.Empty no_violation = 2; + + // Error encountered during the test. + google.rpc.Status error = 3; + } + } + + // Result for test case in the corresponding request. + SimulatedResult result = 1; +} + // Request message for updating a ExternalSystem resource. message UpdateExternalSystemRequest { // Required. The external system resource to update. diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1beta1/pom.xml b/java-securitycenter/proto-google-cloud-securitycenter-v1beta1/pom.xml index 226b62f2e219..7ec74012beec 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1beta1/pom.xml +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 - 0.131.0 + 0.132.0 proto-google-cloud-securitycenter-v1beta1 PROTO library for proto-google-cloud-securitycenter-v1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.36.0 + 2.37.0 diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/pom.xml b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/pom.xml index 41806ded7164..05993412d426 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/pom.xml +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-securitycenter-v1p1beta1 - 0.131.0 + 0.132.0 proto-google-cloud-securitycenter-v1p1beta1 PROTO library for proto-google-cloud-securitycenter-v1p1beta1 com.google.cloud google-cloud-securitycenter-parent - 2.36.0 + 2.37.0 diff --git a/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/AsyncSimulateSecurityHealthAnalyticsCustomModule.java b/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/AsyncSimulateSecurityHealthAnalyticsCustomModule.java new file mode 100644 index 000000000000..aa4cf61ad9a1 --- /dev/null +++ b/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/AsyncSimulateSecurityHealthAnalyticsCustomModule.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v1.samples; + +// [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.securitycenter.v1.CustomConfig; +import com.google.cloud.securitycenter.v1.SecurityCenterClient; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + +public class AsyncSimulateSecurityHealthAnalyticsCustomModule { + + public static void main(String[] args) throws Exception { + asyncSimulateSecurityHealthAnalyticsCustomModule(); + } + + public static void asyncSimulateSecurityHealthAnalyticsCustomModule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { + SimulateSecurityHealthAnalyticsCustomModuleRequest request = + SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder() + .setParent("parent-995424086") + .setCustomConfig(CustomConfig.newBuilder().build()) + .setResource( + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder() + .build()) + .build(); + ApiFuture future = + securityCenterClient + .simulateSecurityHealthAnalyticsCustomModuleCallable() + .futureCall(request); + // Do something. + SimulateSecurityHealthAnalyticsCustomModuleResponse response = future.get(); + } + } +} +// [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_async] diff --git a/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/SyncSimulateSecurityHealthAnalyticsCustomModule.java b/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/SyncSimulateSecurityHealthAnalyticsCustomModule.java new file mode 100644 index 000000000000..d7a9581fea98 --- /dev/null +++ b/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/SyncSimulateSecurityHealthAnalyticsCustomModule.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v1.samples; + +// [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] +import com.google.cloud.securitycenter.v1.CustomConfig; +import com.google.cloud.securitycenter.v1.SecurityCenterClient; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + +public class SyncSimulateSecurityHealthAnalyticsCustomModule { + + public static void main(String[] args) throws Exception { + syncSimulateSecurityHealthAnalyticsCustomModule(); + } + + public static void syncSimulateSecurityHealthAnalyticsCustomModule() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { + SimulateSecurityHealthAnalyticsCustomModuleRequest request = + SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder() + .setParent("parent-995424086") + .setCustomConfig(CustomConfig.newBuilder().build()) + .setResource( + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder() + .build()) + .build(); + SimulateSecurityHealthAnalyticsCustomModuleResponse response = + securityCenterClient.simulateSecurityHealthAnalyticsCustomModule(request); + } + } +} +// [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/SyncSimulateSecurityHealthAnalyticsCustomModuleStringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource.java b/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/SyncSimulateSecurityHealthAnalyticsCustomModuleStringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource.java new file mode 100644 index 000000000000..2ea74b471c0c --- /dev/null +++ b/java-securitycenter/samples/snippets/generated/com/google/cloud/securitycenter/v1/securitycenter/simulatesecurityhealthanalyticscustommodule/SyncSimulateSecurityHealthAnalyticsCustomModuleStringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.securitycenter.v1.samples; + +// [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_StringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource_sync] +import com.google.cloud.securitycenter.v1.CustomConfig; +import com.google.cloud.securitycenter.v1.SecurityCenterClient; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; +import com.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + +public +class SyncSimulateSecurityHealthAnalyticsCustomModuleStringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource { + + public static void main(String[] args) throws Exception { + syncSimulateSecurityHealthAnalyticsCustomModuleStringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource(); + } + + public static void + syncSimulateSecurityHealthAnalyticsCustomModuleStringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) { + String parent = "parent-995424086"; + CustomConfig customConfig = CustomConfig.newBuilder().build(); + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource = + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build(); + SimulateSecurityHealthAnalyticsCustomModuleResponse response = + securityCenterClient.simulateSecurityHealthAnalyticsCustomModule( + parent, customConfig, resource); + } + } +} +// [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_StringCustomconfigSimulatesecurityhealthanalyticscustommodulerequestsimulatedresource_sync] diff --git a/java-service-control/CHANGELOG.md b/java-service-control/CHANGELOG.md index 6c650301073d..741236edcbe7 100644 --- a/java-service-control/CHANGELOG.md +++ b/java-service-control/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-service-control/README.md b/java-service-control/README.md index 8f6dd724ab5a..1ac83fd9da90 100644 --- a/java-service-control/README.md +++ b/java-service-control/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-service-control - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-service-control:1.28.0' +implementation 'com.google.cloud:google-cloud-service-control:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-service-control" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-service-control" % "1.29.0" ``` diff --git a/java-service-control/google-cloud-service-control-bom/pom.xml b/java-service-control/google-cloud-service-control-bom/pom.xml index ca467d7a5ccf..dee8462b543a 100644 --- a/java-service-control/google-cloud-service-control-bom/pom.xml +++ b/java-service-control/google-cloud-service-control-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-service-control-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-service-control - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-service-control-v1 - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-service-control-v2 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-service-control-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-service-control-v2 - 1.28.0 + 1.29.0 diff --git a/java-service-control/google-cloud-service-control/pom.xml b/java-service-control/google-cloud-service-control/pom.xml index bf5cd9ee8c64..82e26d090963 100644 --- a/java-service-control/google-cloud-service-control/pom.xml +++ b/java-service-control/google-cloud-service-control/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-service-control - 1.28.0 + 1.29.0 jar Google Service Control API Service Control API is a foundational platform for creating, managing, securing, and consuming APIs and services across organizations. It is used by Google APIs, Cloud APIs, Cloud Endpoints, and API Gateway. com.google.cloud google-cloud-service-control-parent - 1.28.0 + 1.29.0 google-cloud-service-control diff --git a/java-service-control/grpc-google-cloud-service-control-v1/pom.xml b/java-service-control/grpc-google-cloud-service-control-v1/pom.xml index 3b95b524f508..1cb6a86baba8 100644 --- a/java-service-control/grpc-google-cloud-service-control-v1/pom.xml +++ b/java-service-control/grpc-google-cloud-service-control-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-service-control-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-service-control-v1 GRPC library for google-cloud-service-control com.google.cloud google-cloud-service-control-parent - 1.28.0 + 1.29.0 diff --git a/java-service-control/grpc-google-cloud-service-control-v2/pom.xml b/java-service-control/grpc-google-cloud-service-control-v2/pom.xml index e84acf318417..d36e5aaafb10 100644 --- a/java-service-control/grpc-google-cloud-service-control-v2/pom.xml +++ b/java-service-control/grpc-google-cloud-service-control-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-service-control-v2 - 1.28.0 + 1.29.0 grpc-google-cloud-service-control-v2 GRPC library for google-cloud-service-control com.google.cloud google-cloud-service-control-parent - 1.28.0 + 1.29.0 diff --git a/java-service-control/pom.xml b/java-service-control/pom.xml index 4169cead8325..c8e1bac92fff 100644 --- a/java-service-control/pom.xml +++ b/java-service-control/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-service-control-parent pom - 1.28.0 + 1.29.0 Google Service Control API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-service-control - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-service-control-v2 - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-service-control-v2 - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-service-control-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-service-control-v1 - 1.28.0 + 1.29.0 diff --git a/java-service-control/proto-google-cloud-service-control-v1/pom.xml b/java-service-control/proto-google-cloud-service-control-v1/pom.xml index dabb4df1761b..1b3232b3a283 100644 --- a/java-service-control/proto-google-cloud-service-control-v1/pom.xml +++ b/java-service-control/proto-google-cloud-service-control-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-service-control-v1 - 1.28.0 + 1.29.0 proto-google-cloud-service-control-v1 Proto library for google-cloud-service-control com.google.cloud google-cloud-service-control-parent - 1.28.0 + 1.29.0 diff --git a/java-service-control/proto-google-cloud-service-control-v2/pom.xml b/java-service-control/proto-google-cloud-service-control-v2/pom.xml index 3a2b5f8cccda..5ed932e892f3 100644 --- a/java-service-control/proto-google-cloud-service-control-v2/pom.xml +++ b/java-service-control/proto-google-cloud-service-control-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-service-control-v2 - 1.28.0 + 1.29.0 proto-google-cloud-service-control-v2 Proto library for google-cloud-service-control com.google.cloud google-cloud-service-control-parent - 1.28.0 + 1.29.0 diff --git a/java-service-management/CHANGELOG.md b/java-service-management/CHANGELOG.md index af3711169b17..d6de7c9d70a7 100644 --- a/java-service-management/CHANGELOG.md +++ b/java-service-management/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.26.0 (2023-10-11) ### Dependencies diff --git a/java-service-management/README.md b/java-service-management/README.md index 050c7205f6d9..4caff45eaa64 100644 --- a/java-service-management/README.md +++ b/java-service-management/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-service-management - 3.26.0 + 3.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-service-management:3.26.0' +implementation 'com.google.cloud:google-cloud-service-management:3.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-service-management" % "3.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-service-management" % "3.27.0" ``` diff --git a/java-service-management/google-cloud-service-management-bom/pom.xml b/java-service-management/google-cloud-service-management-bom/pom.xml index 6a7231e2ef81..f6e807c209e5 100644 --- a/java-service-management/google-cloud-service-management-bom/pom.xml +++ b/java-service-management/google-cloud-service-management-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-service-management-bom - 3.26.0 + 3.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-service-management - 3.26.0 + 3.27.0 com.google.api.grpc grpc-google-cloud-service-management-v1 - 3.26.0 + 3.27.0 com.google.api.grpc proto-google-cloud-service-management-v1 - 3.26.0 + 3.27.0 diff --git a/java-service-management/google-cloud-service-management/pom.xml b/java-service-management/google-cloud-service-management/pom.xml index e54191142346..e1c5005f4524 100644 --- a/java-service-management/google-cloud-service-management/pom.xml +++ b/java-service-management/google-cloud-service-management/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-service-management - 3.26.0 + 3.27.0 jar Google Service Management API is a foundational platform for creating, managing, securing, and consuming APIs and services across organizations. It is used by Google APIs, Cloud APIs, Cloud Endpoints, and API Gateway. Service Infrastructure provides a wide range of features to service consumers and service producers, including authentication, authorization, auditing, rate limiting, analytics, billing, logging, and monitoring. com.google.cloud google-cloud-service-management-parent - 3.26.0 + 3.27.0 google-cloud-service-management diff --git a/java-service-management/grpc-google-cloud-service-management-v1/pom.xml b/java-service-management/grpc-google-cloud-service-management-v1/pom.xml index 6428a4068938..74acd1dda7da 100644 --- a/java-service-management/grpc-google-cloud-service-management-v1/pom.xml +++ b/java-service-management/grpc-google-cloud-service-management-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-service-management-v1 - 3.26.0 + 3.27.0 grpc-google-cloud-service-management-v1 GRPC library for google-cloud-service-management com.google.cloud google-cloud-service-management-parent - 3.26.0 + 3.27.0 diff --git a/java-service-management/pom.xml b/java-service-management/pom.xml index 9ae595166229..ddbb6594f445 100644 --- a/java-service-management/pom.xml +++ b/java-service-management/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-service-management-parent pom - 3.26.0 + 3.27.0 Google Service Management API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-service-management - 3.26.0 + 3.27.0 com.google.api.grpc proto-google-cloud-service-management-v1 - 3.26.0 + 3.27.0 com.google.api.grpc grpc-google-cloud-service-management-v1 - 3.26.0 + 3.27.0 diff --git a/java-service-management/proto-google-cloud-service-management-v1/pom.xml b/java-service-management/proto-google-cloud-service-management-v1/pom.xml index 1e5f1e4864e6..57c0e88cfa81 100644 --- a/java-service-management/proto-google-cloud-service-management-v1/pom.xml +++ b/java-service-management/proto-google-cloud-service-management-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-service-management-v1 - 3.26.0 + 3.27.0 proto-google-cloud-service-management-v1 Proto library for google-cloud-service-management com.google.cloud google-cloud-service-management-parent - 3.26.0 + 3.27.0 diff --git a/java-service-usage/CHANGELOG.md b/java-service-usage/CHANGELOG.md index fc99bcba39f5..996f3aebb31f 100644 --- a/java-service-usage/CHANGELOG.md +++ b/java-service-usage/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-service-usage/README.md b/java-service-usage/README.md index ebea4a2160c2..cc175a0fd639 100644 --- a/java-service-usage/README.md +++ b/java-service-usage/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-service-usage - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-service-usage:2.28.0' +implementation 'com.google.cloud:google-cloud-service-usage:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-service-usage" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-service-usage" % "2.29.0" ``` diff --git a/java-service-usage/google-cloud-service-usage-bom/pom.xml b/java-service-usage/google-cloud-service-usage-bom/pom.xml index 1d2a99754541..ddbab645c164 100644 --- a/java-service-usage/google-cloud-service-usage-bom/pom.xml +++ b/java-service-usage/google-cloud-service-usage-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-service-usage-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-service-usage - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-service-usage-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-service-usage-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-service-usage-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-service-usage-v1beta1 - 0.32.0 + 0.33.0 diff --git a/java-service-usage/google-cloud-service-usage/pom.xml b/java-service-usage/google-cloud-service-usage/pom.xml index 371a67434432..1515008c88b3 100644 --- a/java-service-usage/google-cloud-service-usage/pom.xml +++ b/java-service-usage/google-cloud-service-usage/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-service-usage - 2.28.0 + 2.29.0 jar Google Service Usage Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. com.google.cloud google-cloud-service-usage-parent - 2.28.0 + 2.29.0 google-cloud-service-usage diff --git a/java-service-usage/grpc-google-cloud-service-usage-v1/pom.xml b/java-service-usage/grpc-google-cloud-service-usage-v1/pom.xml index ee82a130f7bd..28df3c51fd41 100644 --- a/java-service-usage/grpc-google-cloud-service-usage-v1/pom.xml +++ b/java-service-usage/grpc-google-cloud-service-usage-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-service-usage-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-service-usage-v1 GRPC library for google-cloud-service-usage com.google.cloud google-cloud-service-usage-parent - 2.28.0 + 2.29.0 diff --git a/java-service-usage/grpc-google-cloud-service-usage-v1beta1/pom.xml b/java-service-usage/grpc-google-cloud-service-usage-v1beta1/pom.xml index 4cae8aab4c58..22c71b39c76e 100644 --- a/java-service-usage/grpc-google-cloud-service-usage-v1beta1/pom.xml +++ b/java-service-usage/grpc-google-cloud-service-usage-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-service-usage-v1beta1 - 0.32.0 + 0.33.0 grpc-google-cloud-service-usage-v1beta1 GRPC library for google-cloud-service-usage com.google.cloud google-cloud-service-usage-parent - 2.28.0 + 2.29.0 diff --git a/java-service-usage/pom.xml b/java-service-usage/pom.xml index 4afe68b9c853..5dbfb1483307 100644 --- a/java-service-usage/pom.xml +++ b/java-service-usage/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-service-usage-parent pom - 2.28.0 + 2.29.0 Google Service Usage Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-service-usage - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-service-usage-v1beta1 - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-service-usage-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-service-usage-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-service-usage-v1beta1 - 0.32.0 + 0.33.0 diff --git a/java-service-usage/proto-google-cloud-service-usage-v1/pom.xml b/java-service-usage/proto-google-cloud-service-usage-v1/pom.xml index 09e18af7172d..45759cf1b66a 100644 --- a/java-service-usage/proto-google-cloud-service-usage-v1/pom.xml +++ b/java-service-usage/proto-google-cloud-service-usage-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-service-usage-v1 - 2.28.0 + 2.29.0 proto-google-cloud-service-usage-v1 Proto library for google-cloud-service-usage com.google.cloud google-cloud-service-usage-parent - 2.28.0 + 2.29.0 diff --git a/java-service-usage/proto-google-cloud-service-usage-v1beta1/pom.xml b/java-service-usage/proto-google-cloud-service-usage-v1beta1/pom.xml index 3939a840aa98..e937be0f2f8a 100644 --- a/java-service-usage/proto-google-cloud-service-usage-v1beta1/pom.xml +++ b/java-service-usage/proto-google-cloud-service-usage-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-service-usage-v1beta1 - 0.32.0 + 0.33.0 proto-google-cloud-service-usage-v1beta1 Proto library for google-cloud-service-usage com.google.cloud google-cloud-service-usage-parent - 2.28.0 + 2.29.0 diff --git a/java-servicedirectory/CHANGELOG.md b/java-servicedirectory/CHANGELOG.md index 6d1fa6f217e9..bcc6cb98a622 100644 --- a/java-servicedirectory/CHANGELOG.md +++ b/java-servicedirectory/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-servicedirectory/README.md b/java-servicedirectory/README.md index 99436f147dc1..4330d36f7780 100644 --- a/java-servicedirectory/README.md +++ b/java-servicedirectory/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-servicedirectory - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-servicedirectory:2.29.0' +implementation 'com.google.cloud:google-cloud-servicedirectory:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-servicedirectory" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-servicedirectory" % "2.30.0" ``` diff --git a/java-servicedirectory/google-cloud-servicedirectory-bom/pom.xml b/java-servicedirectory/google-cloud-servicedirectory-bom/pom.xml index 1927ed57dcb1..01e61f1c990c 100644 --- a/java-servicedirectory/google-cloud-servicedirectory-bom/pom.xml +++ b/java-servicedirectory/google-cloud-servicedirectory-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-servicedirectory-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-servicedirectory - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-servicedirectory-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc grpc-google-cloud-servicedirectory-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-servicedirectory-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc proto-google-cloud-servicedirectory-v1 - 2.29.0 + 2.30.0 diff --git a/java-servicedirectory/google-cloud-servicedirectory/pom.xml b/java-servicedirectory/google-cloud-servicedirectory/pom.xml index c94eb6e2a148..31acccdb28bb 100644 --- a/java-servicedirectory/google-cloud-servicedirectory/pom.xml +++ b/java-servicedirectory/google-cloud-servicedirectory/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-servicedirectory - 2.29.0 + 2.30.0 jar Google Cloud Service Directory Java idiomatic client for Google Cloud Service Directory com.google.cloud google-cloud-servicedirectory-parent - 2.29.0 + 2.30.0 google-cloud-servicedirectory diff --git a/java-servicedirectory/grpc-google-cloud-servicedirectory-v1/pom.xml b/java-servicedirectory/grpc-google-cloud-servicedirectory-v1/pom.xml index 9a35cd32c4f6..b26cd6322aa7 100644 --- a/java-servicedirectory/grpc-google-cloud-servicedirectory-v1/pom.xml +++ b/java-servicedirectory/grpc-google-cloud-servicedirectory-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-servicedirectory-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-servicedirectory-v1 GRPC library for grpc-google-cloud-servicedirectory-v1 com.google.cloud google-cloud-servicedirectory-parent - 2.29.0 + 2.30.0 diff --git a/java-servicedirectory/grpc-google-cloud-servicedirectory-v1beta1/pom.xml b/java-servicedirectory/grpc-google-cloud-servicedirectory-v1beta1/pom.xml index c04d98af01a9..5ac640a9e3f7 100644 --- a/java-servicedirectory/grpc-google-cloud-servicedirectory-v1beta1/pom.xml +++ b/java-servicedirectory/grpc-google-cloud-servicedirectory-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-servicedirectory-v1beta1 - 0.37.0 + 0.38.0 grpc-google-cloud-servicedirectory-v1beta1 GRPC library for grpc-google-cloud-servicedirectory-v1beta1 com.google.cloud google-cloud-servicedirectory-parent - 2.29.0 + 2.30.0 diff --git a/java-servicedirectory/pom.xml b/java-servicedirectory/pom.xml index d8a7af8d0f7b..61566d068c8c 100644 --- a/java-servicedirectory/pom.xml +++ b/java-servicedirectory/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-servicedirectory-parent pom - 2.29.0 + 2.30.0 Google Cloud Service Directory Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-servicedirectory-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc proto-google-cloud-servicedirectory-v1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-servicedirectory-v1beta1 - 0.37.0 + 0.38.0 com.google.api.grpc grpc-google-cloud-servicedirectory-v1 - 2.29.0 + 2.30.0 com.google.cloud google-cloud-servicedirectory - 2.29.0 + 2.30.0 diff --git a/java-servicedirectory/proto-google-cloud-servicedirectory-v1/pom.xml b/java-servicedirectory/proto-google-cloud-servicedirectory-v1/pom.xml index 35584cc6c252..703654192b57 100644 --- a/java-servicedirectory/proto-google-cloud-servicedirectory-v1/pom.xml +++ b/java-servicedirectory/proto-google-cloud-servicedirectory-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-servicedirectory-v1 - 2.29.0 + 2.30.0 proto-google-cloud-servicedirectory-v1 PROTO library for proto-google-cloud-servicedirectory-v1 com.google.cloud google-cloud-servicedirectory-parent - 2.29.0 + 2.30.0 diff --git a/java-servicedirectory/proto-google-cloud-servicedirectory-v1beta1/pom.xml b/java-servicedirectory/proto-google-cloud-servicedirectory-v1beta1/pom.xml index fcf33da5a750..caac180c09d4 100644 --- a/java-servicedirectory/proto-google-cloud-servicedirectory-v1beta1/pom.xml +++ b/java-servicedirectory/proto-google-cloud-servicedirectory-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-servicedirectory-v1beta1 - 0.37.0 + 0.38.0 proto-google-cloud-servicedirectory-v1beta1 PROTO library for proto-google-cloud-servicedirectory-v1beta1 com.google.cloud google-cloud-servicedirectory-parent - 2.29.0 + 2.30.0 diff --git a/java-shell/CHANGELOG.md b/java-shell/CHANGELOG.md index f878686cc8d0..65d5356d674b 100644 --- a/java-shell/CHANGELOG.md +++ b/java-shell/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.27.0 (2023-10-11) ### Dependencies diff --git a/java-shell/README.md b/java-shell/README.md index a815502924ae..edb6c937d309 100644 --- a/java-shell/README.md +++ b/java-shell/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-shell - 2.27.0 + 2.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-shell:2.27.0' +implementation 'com.google.cloud:google-cloud-shell:2.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-shell" % "2.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-shell" % "2.28.0" ``` diff --git a/java-shell/google-cloud-shell-bom/pom.xml b/java-shell/google-cloud-shell-bom/pom.xml index 4c5605be4a50..9e92e26e7221 100644 --- a/java-shell/google-cloud-shell-bom/pom.xml +++ b/java-shell/google-cloud-shell-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-shell-bom - 2.27.0 + 2.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-shell - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-shell-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-shell-v1 - 2.27.0 + 2.28.0 diff --git a/java-shell/google-cloud-shell/pom.xml b/java-shell/google-cloud-shell/pom.xml index 1d0a90403f51..cbf3f14a5723 100644 --- a/java-shell/google-cloud-shell/pom.xml +++ b/java-shell/google-cloud-shell/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-shell - 2.27.0 + 2.28.0 jar Google Cloud Shell Cloud Shell is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser. com.google.cloud google-cloud-shell-parent - 2.27.0 + 2.28.0 google-cloud-shell diff --git a/java-shell/grpc-google-cloud-shell-v1/pom.xml b/java-shell/grpc-google-cloud-shell-v1/pom.xml index 12458dd65d48..e663d348c5c9 100644 --- a/java-shell/grpc-google-cloud-shell-v1/pom.xml +++ b/java-shell/grpc-google-cloud-shell-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-shell-v1 - 2.27.0 + 2.28.0 grpc-google-cloud-shell-v1 GRPC library for google-cloud-shell com.google.cloud google-cloud-shell-parent - 2.27.0 + 2.28.0 diff --git a/java-shell/pom.xml b/java-shell/pom.xml index 11af0323a6e2..d792cd39aeba 100644 --- a/java-shell/pom.xml +++ b/java-shell/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-shell-parent pom - 2.27.0 + 2.28.0 Google Cloud Shell Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-shell - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-shell-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-shell-v1 - 2.27.0 + 2.28.0 diff --git a/java-shell/proto-google-cloud-shell-v1/pom.xml b/java-shell/proto-google-cloud-shell-v1/pom.xml index da182744e500..8497ddbeb98d 100644 --- a/java-shell/proto-google-cloud-shell-v1/pom.xml +++ b/java-shell/proto-google-cloud-shell-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-shell-v1 - 2.27.0 + 2.28.0 proto-google-cloud-shell-v1 Proto library for google-cloud-shell com.google.cloud google-cloud-shell-parent - 2.27.0 + 2.28.0 diff --git a/java-shopping-merchant-inventories/CHANGELOG.md b/java-shopping-merchant-inventories/CHANGELOG.md index 0120a566ea57..126a73317863 100644 --- a/java-shopping-merchant-inventories/CHANGELOG.md +++ b/java-shopping-merchant-inventories/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.5.0 (2023-10-25) + +### Features + +* non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed ([#9981](https://github.com/googleapis/google-cloud-java/issues/9981)) +* `channel` field is added to the `product_view` table ([#9956](https://github.com/googleapis/google-cloud-java/issues/9956)) ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* Channel enum is added ([#9957](https://github.com/googleapis/google-cloud-java/issues/9957)) ([9135abe](https://github.com/googleapis/google-cloud-java/commit/9135abe92be0639bde65a98709cd9d9df6385ae7)) +* non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed ([#9981](https://github.com/googleapis/google-cloud-java/issues/9981)) ([f242404](https://github.com/googleapis/google-cloud-java/commit/f242404af5d3a84b84bfd57937a06f9cbb99674c)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.4.0 (2023-10-11) ### Dependencies diff --git a/java-shopping-merchant-inventories/README.md b/java-shopping-merchant-inventories/README.md index 6de5acbd9533..a42277e18986 100644 --- a/java-shopping-merchant-inventories/README.md +++ b/java-shopping-merchant-inventories/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.shopping google-shopping-merchant-inventories - 0.4.0 + 0.5.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.shopping:google-shopping-merchant-inventories:0.4.0' +implementation 'com.google.shopping:google-shopping-merchant-inventories:0.5.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.shopping" % "google-shopping-merchant-inventories" % "0.4.0" +libraryDependencies += "com.google.shopping" % "google-shopping-merchant-inventories" % "0.5.0" ``` @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shopping-merchant-inventories/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-inventories.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-inventories/0.0.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-inventories/0.4.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-shopping-merchant-inventories/google-shopping-merchant-inventories-bom/pom.xml b/java-shopping-merchant-inventories/google-shopping-merchant-inventories-bom/pom.xml index 38ca0f4fb95d..c5c04a3122a9 100644 --- a/java-shopping-merchant-inventories/google-shopping-merchant-inventories-bom/pom.xml +++ b/java-shopping-merchant-inventories/google-shopping-merchant-inventories-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.shopping google-shopping-merchant-inventories-bom - 0.4.0 + 0.5.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.shopping google-shopping-merchant-inventories - 0.4.0 + 0.5.0 com.google.shopping.api.grpc grpc-google-shopping-merchant-inventories-v1beta - 0.4.0 + 0.5.0 com.google.shopping.api.grpc proto-google-shopping-merchant-inventories-v1beta - 0.4.0 + 0.5.0 diff --git a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/pom.xml b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/pom.xml index 2cf86f1ad0db..2fb7f9839b2e 100644 --- a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/pom.xml +++ b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.shopping google-shopping-merchant-inventories - 0.4.0 + 0.5.0 jar Google Merchant API Merchant API Programmatically manage your Merchant Center accounts. com.google.shopping google-shopping-merchant-inventories-parent - 0.4.0 + 0.5.0 google-shopping-merchant-inventories diff --git a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/resources/META-INF/native-image/com.google.shopping.merchant.inventories.v1beta/reflect-config.json b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/resources/META-INF/native-image/com.google.shopping.merchant.inventories.v1beta/reflect-config.json index f55085ce4e90..cf8c2b686da8 100644 --- a/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/resources/META-INF/native-image/com.google.shopping.merchant.inventories.v1beta/reflect-config.json +++ b/java-shopping-merchant-inventories/google-shopping-merchant-inventories/src/main/resources/META-INF/native-image/com.google.shopping.merchant.inventories.v1beta/reflect-config.json @@ -1205,6 +1205,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.type.Channel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel$ChannelEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.shopping.type.CustomAttribute", "queryAllDeclaredConstructors": true, @@ -1232,6 +1259,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.type.Destination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Destination$DestinationEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.shopping.type.Price", "queryAllDeclaredConstructors": true, @@ -1250,6 +1295,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.type.ReportingContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.ReportingContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.ReportingContext$ReportingContextEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.type.Interval", "queryAllDeclaredConstructors": true, diff --git a/java-shopping-merchant-inventories/grpc-google-shopping-merchant-inventories-v1beta/pom.xml b/java-shopping-merchant-inventories/grpc-google-shopping-merchant-inventories-v1beta/pom.xml index f88de8403e99..4e89bdce8889 100644 --- a/java-shopping-merchant-inventories/grpc-google-shopping-merchant-inventories-v1beta/pom.xml +++ b/java-shopping-merchant-inventories/grpc-google-shopping-merchant-inventories-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.shopping.api.grpc grpc-google-shopping-merchant-inventories-v1beta - 0.4.0 + 0.5.0 grpc-google-shopping-merchant-inventories-v1beta GRPC library for google-shopping-merchant-inventories com.google.shopping google-shopping-merchant-inventories-parent - 0.4.0 + 0.5.0 diff --git a/java-shopping-merchant-inventories/pom.xml b/java-shopping-merchant-inventories/pom.xml index 5105eb68362c..f01622911deb 100644 --- a/java-shopping-merchant-inventories/pom.xml +++ b/java-shopping-merchant-inventories/pom.xml @@ -4,7 +4,7 @@ com.google.shopping google-shopping-merchant-inventories-parent pom - 0.4.0 + 0.5.0 Google Merchant API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.shopping google-shopping-merchant-inventories - 0.4.0 + 0.5.0 com.google.shopping.api.grpc grpc-google-shopping-merchant-inventories-v1beta - 0.4.0 + 0.5.0 com.google.shopping.api.grpc proto-google-shopping-merchant-inventories-v1beta - 0.4.0 + 0.5.0 diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/pom.xml b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/pom.xml index 019d4fdc2e3d..5b51f466cd4b 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/pom.xml +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.shopping.api.grpc proto-google-shopping-merchant-inventories-v1beta - 0.4.0 + 0.5.0 proto-google-shopping-merchant-inventories-v1beta Proto library for google-shopping-merchant-inventories com.google.shopping google-shopping-merchant-inventories-parent - 0.4.0 + 0.5.0 diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryProto.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryProto.java index 1a5429a29c87..19c4627f9049 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryProto.java +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/LocalInventoryProto.java @@ -113,11 +113,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/{name=accounts/*/products/*/localInvent" + "ories/*}\032G\312A\032merchantapi.googleapis.com\322" + "A\'https://www.googleapis.com/auth/conten" - + "tB\240\001\n/com.google.shopping.merchant.inven" - + "tories.v1betaB\023LocalInventoryProtoP\001ZVgo" - + "ogle.golang.org/genproto/googleapis/shop" - + "ping/merchant/inventories/v1beta;invento" - + "riesb\006proto3" + + "tB\241\001\n/com.google.shopping.merchant.inven" + + "tories.v1betaB\023LocalInventoryProtoP\001ZWcl" + + "oud.google.com/go/shopping/merchant/inve" + + "ntories/apiv1beta/inventoriespb;inventor" + + "iespbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryProto.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryProto.java index 50c2cc1a9461..7d3f693efe27 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryProto.java +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/merchant/inventories/v1beta/RegionalInventoryProto.java @@ -110,11 +110,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ame=accounts/*/products/*/regionalInvent" + "ories/*}\032G\312A\032merchantapi.googleapis.com\322" + "A\'https://www.googleapis.com/auth/conten" - + "tB\243\001\n/com.google.shopping.merchant.inven" + + "tB\244\001\n/com.google.shopping.merchant.inven" + "tories.v1betaB\026RegionalInventoryProtoP\001Z" - + "Vgoogle.golang.org/genproto/googleapis/s" - + "hopping/merchant/inventories/v1beta;inve" - + "ntoriesb\006proto3" + + "Wcloud.google.com/go/shopping/merchant/i" + + "nventories/apiv1beta/inventoriespb;inven" + + "toriespbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Channel.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Channel.java new file mode 100644 index 000000000000..5ee421705cc4 --- /dev/null +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Channel.java @@ -0,0 +1,587 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +/** + * + * + *
+ * [Channel](https://support.google.com/merchants/answer/7361332) of a product.
+ *
+ * Channel is used to distinguish between online and local products.
+ * 
+ * + * Protobuf type {@code google.shopping.type.Channel} + */ +public final class Channel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.type.Channel) + ChannelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Channel.newBuilder() to construct. + private Channel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Channel() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Channel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Channel.class, com.google.shopping.type.Channel.Builder.class); + } + + /** + * + * + *
+   * Channel values.
+   * 
+ * + * Protobuf enum {@code google.shopping.type.Channel.ChannelEnum} + */ + public enum ChannelEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * CHANNEL_ENUM_UNSPECIFIED = 0; + */ + CHANNEL_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * Online product.
+     * 
+ * + * ONLINE = 1; + */ + ONLINE(1), + /** + * + * + *
+     * Local product.
+     * 
+ * + * LOCAL = 2; + */ + LOCAL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * CHANNEL_ENUM_UNSPECIFIED = 0; + */ + public static final int CHANNEL_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Online product.
+     * 
+ * + * ONLINE = 1; + */ + public static final int ONLINE_VALUE = 1; + /** + * + * + *
+     * Local product.
+     * 
+ * + * LOCAL = 2; + */ + public static final int LOCAL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ChannelEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ChannelEnum forNumber(int value) { + switch (value) { + case 0: + return CHANNEL_ENUM_UNSPECIFIED; + case 1: + return ONLINE; + case 2: + return LOCAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ChannelEnum findValueByNumber(int number) { + return ChannelEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.type.Channel.getDescriptor().getEnumTypes().get(0); + } + + private static final ChannelEnum[] VALUES = values(); + + public static ChannelEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ChannelEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.type.Channel.ChannelEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.type.Channel)) { + return super.equals(obj); + } + com.google.shopping.type.Channel other = (com.google.shopping.type.Channel) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.type.Channel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Channel parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Channel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Channel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Channel parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Channel parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Channel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.shopping.type.Channel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * [Channel](https://support.google.com/merchants/answer/7361332) of a product.
+   *
+   * Channel is used to distinguish between online and local products.
+   * 
+ * + * Protobuf type {@code google.shopping.type.Channel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.type.Channel) + com.google.shopping.type.ChannelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Channel.class, + com.google.shopping.type.Channel.Builder.class); + } + + // Construct using com.google.shopping.type.Channel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_descriptor; + } + + @java.lang.Override + public com.google.shopping.type.Channel getDefaultInstanceForType() { + return com.google.shopping.type.Channel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.type.Channel build() { + com.google.shopping.type.Channel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.type.Channel buildPartial() { + com.google.shopping.type.Channel result = new com.google.shopping.type.Channel(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.type.Channel) { + return mergeFrom((com.google.shopping.type.Channel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.type.Channel other) { + if (other == com.google.shopping.type.Channel.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.type.Channel) + } + + // @@protoc_insertion_point(class_scope:google.shopping.type.Channel) + private static final com.google.shopping.type.Channel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.type.Channel(); + } + + public static com.google.shopping.type.Channel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Channel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.type.Channel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java new file mode 100644 index 000000000000..06aee0067e60 --- /dev/null +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +public interface ChannelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.type.Channel) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Destination.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Destination.java index 555c9b9c713f..ba5b3940a70a 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Destination.java +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Destination.java @@ -28,196 +28,657 @@ * products from your data feed should be displayed. * * - * Protobuf enum {@code google.shopping.type.Destination} + * Protobuf type {@code google.shopping.type.Destination} */ -public enum Destination implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified.
-   * 
- * - * DESTINATION_UNSPECIFIED = 0; - */ - DESTINATION_UNSPECIFIED(0), - /** - * - * - *
-   * Shopping ads.
-   * 
- * - * SHOPPING_ADS = 1; - */ - SHOPPING_ADS(1), - /** - * - * - *
-   * Local inventory ads.
-   * 
- * - * LOCAL_INVENTORY_ADS = 2; - */ - LOCAL_INVENTORY_ADS(2), - /** - * - * - *
-   * Free listings.
-   * 
- * - * FREE_LISTINGS = 3; - */ - FREE_LISTINGS(3), - /** - * - * - *
-   * Free local product listings.
-   * 
- * - * FREE_LOCAL_LISTINGS = 4; - */ - FREE_LOCAL_LISTINGS(4), - UNRECOGNIZED(-1), - ; +public final class Destination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.type.Destination) + DestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Destination.newBuilder() to construct. + private Destination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Destination() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Destination(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Destination.class, + com.google.shopping.type.Destination.Builder.class); + } /** * * *
-   * Not specified.
-   * 
- * - * DESTINATION_UNSPECIFIED = 0; - */ - public static final int DESTINATION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Shopping ads.
-   * 
- * - * SHOPPING_ADS = 1; - */ - public static final int SHOPPING_ADS_VALUE = 1; - /** - * - * - *
-   * Local inventory ads.
+   * Destination values.
    * 
* - * LOCAL_INVENTORY_ADS = 2; + * Protobuf enum {@code google.shopping.type.Destination.DestinationEnum} */ - public static final int LOCAL_INVENTORY_ADS_VALUE = 2; + public enum DestinationEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * DESTINATION_ENUM_UNSPECIFIED = 0; + */ + DESTINATION_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * [Shopping ads](https://support.google.com/google-ads/answer/2454022).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + SHOPPING_ADS(1), + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 2; + */ + DISPLAY_ADS(2), + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3057972).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 3; + */ + LOCAL_INVENTORY_ADS(3), + /** + * + * + *
+     * [Free listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 4; + */ + FREE_LISTINGS(4), + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 5; + */ + FREE_LOCAL_LISTINGS(5), + /** + * + * + *
+     * [YouTube Shopping](https://support.google.com/merchants/answer/12362804).
+     * 
+ * + * YOUTUBE_SHOPPING = 6; + */ + YOUTUBE_SHOPPING(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * DESTINATION_ENUM_UNSPECIFIED = 0; + */ + public static final int DESTINATION_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * [Shopping ads](https://support.google.com/google-ads/answer/2454022).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + public static final int SHOPPING_ADS_VALUE = 1; + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 2; + */ + public static final int DISPLAY_ADS_VALUE = 2; + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3057972).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 3; + */ + public static final int LOCAL_INVENTORY_ADS_VALUE = 3; + /** + * + * + *
+     * [Free listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 4; + */ + public static final int FREE_LISTINGS_VALUE = 4; + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 5; + */ + public static final int FREE_LOCAL_LISTINGS_VALUE = 5; + /** + * + * + *
+     * [YouTube Shopping](https://support.google.com/merchants/answer/12362804).
+     * 
+ * + * YOUTUBE_SHOPPING = 6; + */ + public static final int YOUTUBE_SHOPPING_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DestinationEnum forNumber(int value) { + switch (value) { + case 0: + return DESTINATION_ENUM_UNSPECIFIED; + case 1: + return SHOPPING_ADS; + case 2: + return DISPLAY_ADS; + case 3: + return LOCAL_INVENTORY_ADS; + case 4: + return FREE_LISTINGS; + case 5: + return FREE_LOCAL_LISTINGS; + case 6: + return YOUTUBE_SHOPPING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DestinationEnum findValueByNumber(int number) { + return DestinationEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.type.Destination.getDescriptor().getEnumTypes().get(0); + } + + private static final DestinationEnum[] VALUES = values(); + + public static DestinationEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DestinationEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.type.Destination.DestinationEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.type.Destination)) { + return super.equals(obj); + } + com.google.shopping.type.Destination other = (com.google.shopping.type.Destination) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.type.Destination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Destination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Destination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Destination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Destination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Destination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Destination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.shopping.type.Destination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-   * Free listings.
-   * 
- * - * FREE_LISTINGS = 3; - */ - public static final int FREE_LISTINGS_VALUE = 3; - /** + * Destinations available for a product. * - * - *
-   * Free local product listings.
+   * Destinations are used in Merchant Center to allow you to control where the
+   * products from your data feed should be displayed.
    * 
* - * FREE_LOCAL_LISTINGS = 4; + * Protobuf type {@code google.shopping.type.Destination} */ - public static final int FREE_LOCAL_LISTINGS_VALUE = 4; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.type.Destination) + com.google.shopping.type.DestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_descriptor; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Destination.class, + com.google.shopping.type.Destination.Builder.class); } - return value; - } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Destination valueOf(int value) { - return forNumber(value); - } + // Construct using com.google.shopping.type.Destination.newBuilder() + private Builder() {} - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Destination forNumber(int value) { - switch (value) { - case 0: - return DESTINATION_UNSPECIFIED; - case 1: - return SHOPPING_ADS; - case 2: - return LOCAL_INVENTORY_ADS; - case 3: - return FREE_LISTINGS; - case 4: - return FREE_LOCAL_LISTINGS; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Destination findValueByNumber(int number) { - return Destination.forNumber(number); - } - }; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + @java.lang.Override + public Builder clear() { + super.clear(); + return this; } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_descriptor; + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.shopping.type.TypesProto.getDescriptor().getEnumTypes().get(0); - } + @java.lang.Override + public com.google.shopping.type.Destination getDefaultInstanceForType() { + return com.google.shopping.type.Destination.getDefaultInstance(); + } - private static final Destination[] VALUES = values(); + @java.lang.Override + public com.google.shopping.type.Destination build() { + com.google.shopping.type.Destination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.type.Destination buildPartial() { + com.google.shopping.type.Destination result = new com.google.shopping.type.Destination(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static Destination valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - return VALUES[desc.getIndex()]; + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.type.Destination) { + return mergeFrom((com.google.shopping.type.Destination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.type.Destination other) { + if (other == com.google.shopping.type.Destination.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.type.Destination) } - private final int value; + // @@protoc_insertion_point(class_scope:google.shopping.type.Destination) + private static final com.google.shopping.type.Destination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.type.Destination(); + } - private Destination(int value) { - this.value = value; + public static com.google.shopping.type.Destination getDefaultInstance() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(enum_scope:google.shopping.type.Destination) + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Destination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.type.Destination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java new file mode 100644 index 000000000000..ccec8f709da9 --- /dev/null +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +public interface DestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.type.Destination) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Price.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Price.java index 64a582473d71..daf2dbcc9282 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Price.java +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/Price.java @@ -71,6 +71,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -88,6 +90,8 @@ public boolean hasAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -549,6 +553,8 @@ public Builder mergeFrom( * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -566,6 +572,8 @@ public boolean hasAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -583,6 +591,8 @@ public long getAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -604,6 +614,8 @@ public Builder setAmountMicros(long value) { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java index d071d52a528a..daad96b93806 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java @@ -30,6 +30,8 @@ public interface PriceOrBuilder * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -44,6 +46,8 @@ public interface PriceOrBuilder * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java new file mode 100644 index 000000000000..891f8b1ea958 --- /dev/null +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java @@ -0,0 +1,836 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +/** + * + * + *
+ * Reporting contexts that your account and product issues apply to.
+ *
+ * Reporting contexts are groups of surfaces and formats for product results on
+ * Google. They can represent the entire destination (for example, [Shopping
+ * ads](https://support.google.com/merchants/answer/6149970)) or a subset of
+ * formats within a destination (for example, [Discovery
+ * ads](https://support.google.com/merchants/answer/13389785)).
+ * 
+ * + * Protobuf type {@code google.shopping.type.ReportingContext} + */ +public final class ReportingContext extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.type.ReportingContext) + ReportingContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportingContext.newBuilder() to construct. + private ReportingContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportingContext() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportingContext(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.ReportingContext.class, + com.google.shopping.type.ReportingContext.Builder.class); + } + + /** + * + * + *
+   * Reporting context values.
+   * 
+ * + * Protobuf enum {@code google.shopping.type.ReportingContext.ReportingContextEnum} + */ + public enum ReportingContextEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0; + */ + REPORTING_CONTEXT_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * [Shopping ads](https://support.google.com/merchants/answer/6149970).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + SHOPPING_ADS(1), + /** + * + * + *
+     * [Discovery and Demand Gen
+     * ads](https://support.google.com/merchants/answer/13389785).
+     * 
+ * + * DISCOVERY_ADS = 2; + */ + DISCOVERY_ADS(2), + /** + * + * + *
+     * [Video ads](https://support.google.com/google-ads/answer/6340491).
+     * 
+ * + * VIDEO_ADS = 3; + */ + VIDEO_ADS(3), + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 4; + */ + DISPLAY_ADS(4), + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3271956).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 5; + */ + LOCAL_INVENTORY_ADS(5), + /** + * + * + *
+     * [Vehicle inventory
+     * ads](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * VEHICLE_INVENTORY_ADS = 6; + */ + VEHICLE_INVENTORY_ADS(6), + /** + * + * + *
+     * [Free product
+     * listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 7; + */ + FREE_LISTINGS(7), + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 8; + */ + FREE_LOCAL_LISTINGS(8), + /** + * + * + *
+     * [Free local vehicle
+     * listings](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * FREE_LOCAL_VEHICLE_LISTINGS = 9; + */ + FREE_LOCAL_VEHICLE_LISTINGS(9), + /** + * + * + *
+     * [YouTube
+     * Shopping](https://support.google.com/merchants/answer/13478370).
+     * 
+ * + * YOUTUBE_SHOPPING = 10; + */ + YOUTUBE_SHOPPING(10), + /** + * + * + *
+     * [Cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * CLOUD_RETAIL = 11; + */ + CLOUD_RETAIL(11), + /** + * + * + *
+     * [Local cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * LOCAL_CLOUD_RETAIL = 12; + */ + LOCAL_CLOUD_RETAIL(12), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0; + */ + public static final int REPORTING_CONTEXT_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * [Shopping ads](https://support.google.com/merchants/answer/6149970).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + public static final int SHOPPING_ADS_VALUE = 1; + /** + * + * + *
+     * [Discovery and Demand Gen
+     * ads](https://support.google.com/merchants/answer/13389785).
+     * 
+ * + * DISCOVERY_ADS = 2; + */ + public static final int DISCOVERY_ADS_VALUE = 2; + /** + * + * + *
+     * [Video ads](https://support.google.com/google-ads/answer/6340491).
+     * 
+ * + * VIDEO_ADS = 3; + */ + public static final int VIDEO_ADS_VALUE = 3; + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 4; + */ + public static final int DISPLAY_ADS_VALUE = 4; + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3271956).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 5; + */ + public static final int LOCAL_INVENTORY_ADS_VALUE = 5; + /** + * + * + *
+     * [Vehicle inventory
+     * ads](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * VEHICLE_INVENTORY_ADS = 6; + */ + public static final int VEHICLE_INVENTORY_ADS_VALUE = 6; + /** + * + * + *
+     * [Free product
+     * listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 7; + */ + public static final int FREE_LISTINGS_VALUE = 7; + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 8; + */ + public static final int FREE_LOCAL_LISTINGS_VALUE = 8; + /** + * + * + *
+     * [Free local vehicle
+     * listings](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * FREE_LOCAL_VEHICLE_LISTINGS = 9; + */ + public static final int FREE_LOCAL_VEHICLE_LISTINGS_VALUE = 9; + /** + * + * + *
+     * [YouTube
+     * Shopping](https://support.google.com/merchants/answer/13478370).
+     * 
+ * + * YOUTUBE_SHOPPING = 10; + */ + public static final int YOUTUBE_SHOPPING_VALUE = 10; + /** + * + * + *
+     * [Cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * CLOUD_RETAIL = 11; + */ + public static final int CLOUD_RETAIL_VALUE = 11; + /** + * + * + *
+     * [Local cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * LOCAL_CLOUD_RETAIL = 12; + */ + public static final int LOCAL_CLOUD_RETAIL_VALUE = 12; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReportingContextEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReportingContextEnum forNumber(int value) { + switch (value) { + case 0: + return REPORTING_CONTEXT_ENUM_UNSPECIFIED; + case 1: + return SHOPPING_ADS; + case 2: + return DISCOVERY_ADS; + case 3: + return VIDEO_ADS; + case 4: + return DISPLAY_ADS; + case 5: + return LOCAL_INVENTORY_ADS; + case 6: + return VEHICLE_INVENTORY_ADS; + case 7: + return FREE_LISTINGS; + case 8: + return FREE_LOCAL_LISTINGS; + case 9: + return FREE_LOCAL_VEHICLE_LISTINGS; + case 10: + return YOUTUBE_SHOPPING; + case 11: + return CLOUD_RETAIL; + case 12: + return LOCAL_CLOUD_RETAIL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReportingContextEnum findValueByNumber(int number) { + return ReportingContextEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.type.ReportingContext.getDescriptor().getEnumTypes().get(0); + } + + private static final ReportingContextEnum[] VALUES = values(); + + public static ReportingContextEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReportingContextEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.type.ReportingContext.ReportingContextEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.type.ReportingContext)) { + return super.equals(obj); + } + com.google.shopping.type.ReportingContext other = + (com.google.shopping.type.ReportingContext) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.type.ReportingContext parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.type.ReportingContext parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.shopping.type.ReportingContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Reporting contexts that your account and product issues apply to.
+   *
+   * Reporting contexts are groups of surfaces and formats for product results on
+   * Google. They can represent the entire destination (for example, [Shopping
+   * ads](https://support.google.com/merchants/answer/6149970)) or a subset of
+   * formats within a destination (for example, [Discovery
+   * ads](https://support.google.com/merchants/answer/13389785)).
+   * 
+ * + * Protobuf type {@code google.shopping.type.ReportingContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.type.ReportingContext) + com.google.shopping.type.ReportingContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.ReportingContext.class, + com.google.shopping.type.ReportingContext.Builder.class); + } + + // Construct using com.google.shopping.type.ReportingContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_descriptor; + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext getDefaultInstanceForType() { + return com.google.shopping.type.ReportingContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext build() { + com.google.shopping.type.ReportingContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext buildPartial() { + com.google.shopping.type.ReportingContext result = + new com.google.shopping.type.ReportingContext(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.type.ReportingContext) { + return mergeFrom((com.google.shopping.type.ReportingContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.type.ReportingContext other) { + if (other == com.google.shopping.type.ReportingContext.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.type.ReportingContext) + } + + // @@protoc_insertion_point(class_scope:google.shopping.type.ReportingContext) + private static final com.google.shopping.type.ReportingContext DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.type.ReportingContext(); + } + + public static com.google.shopping.type.ReportingContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportingContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java new file mode 100644 index 000000000000..e3650d6489ef --- /dev/null +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +public interface ReportingContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.type.ReportingContext) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/TypesProto.java b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/TypesProto.java index c0d5a014193f..39d4af4b9716 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/TypesProto.java +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/java/com/google/shopping/type/TypesProto.java @@ -35,6 +35,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_shopping_type_CustomAttribute_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_shopping_type_CustomAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_type_Destination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_type_Destination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_type_ReportingContext_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_type_ReportingContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_type_Channel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_type_Channel_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -51,14 +63,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\017CustomAttribute\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005" + "value\030\002 \001(\tH\001\210\001\001\022;\n\014group_values\030\003 \003(\0132%" + ".google.shopping.type.CustomAttributeB\007\n" - + "\005_nameB\010\n\006_value*\201\001\n\013Destination\022\033\n\027DEST" - + "INATION_UNSPECIFIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022" - + "\027\n\023LOCAL_INVENTORY_ADS\020\002\022\021\n\rFREE_LISTING" - + "S\020\003\022\027\n\023FREE_LOCAL_LISTINGS\020\004B\200\001\n\030com.goo" - + "gle.shopping.typeB\nTypesProtoP\001Z?google." - + "golang.org/genproto/googleapis/shopping/" - + "type/types;types\252\002\024Google.Shopping.Typeb" - + "\006proto3" + + "\005_nameB\010\n\006_value\"\301\001\n\013Destination\"\261\001\n\017Des" + + "tinationEnum\022 \n\034DESTINATION_ENUM_UNSPECI" + + "FIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\017\n\013DISPLAY_ADS\020" + + "\002\022\027\n\023LOCAL_INVENTORY_ADS\020\003\022\021\n\rFREE_LISTI" + + "NGS\020\004\022\027\n\023FREE_LOCAL_LISTINGS\020\005\022\024\n\020YOUTUB" + + "E_SHOPPING\020\006\"\331\002\n\020ReportingContext\"\304\002\n\024Re" + + "portingContextEnum\022&\n\"REPORTING_CONTEXT_" + + "ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\021\n\r" + + "DISCOVERY_ADS\020\002\022\r\n\tVIDEO_ADS\020\003\022\017\n\013DISPLA" + + "Y_ADS\020\004\022\027\n\023LOCAL_INVENTORY_ADS\020\005\022\031\n\025VEHI" + + "CLE_INVENTORY_ADS\020\006\022\021\n\rFREE_LISTINGS\020\007\022\027" + + "\n\023FREE_LOCAL_LISTINGS\020\010\022\037\n\033FREE_LOCAL_VE" + + "HICLE_LISTINGS\020\t\022\024\n\020YOUTUBE_SHOPPING\020\n\022\020" + + "\n\014CLOUD_RETAIL\020\013\022\026\n\022LOCAL_CLOUD_RETAIL\020\014" + + "\"M\n\007Channel\"B\n\013ChannelEnum\022\034\n\030CHANNEL_EN" + + "UM_UNSPECIFIED\020\000\022\n\n\006ONLINE\020\001\022\t\n\005LOCAL\020\002B" + + "p\n\030com.google.shopping.typeB\nTypesProtoP" + + "\001Z/cloud.google.com/go/shopping/type/typ" + + "epb;typepb\252\002\024Google.Shopping.Typeb\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -79,6 +103,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Value", "GroupValues", "Name", "Value", }); + internal_static_google_shopping_type_Destination_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_shopping_type_Destination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_type_Destination_descriptor, new java.lang.String[] {}); + internal_static_google_shopping_type_ReportingContext_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_shopping_type_ReportingContext_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_type_ReportingContext_descriptor, + new java.lang.String[] {}); + internal_static_google_shopping_type_Channel_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_shopping_type_Channel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_type_Channel_descriptor, new java.lang.String[] {}); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/localinventory.proto b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/localinventory.proto index 2e35cb5a163c..6e128d2bc6ab 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/localinventory.proto +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/localinventory.proto @@ -24,7 +24,7 @@ import "google/protobuf/empty.proto"; import "google/shopping/type/types.proto"; import "google/type/interval.proto"; -option go_package = "google.golang.org/genproto/googleapis/shopping/merchant/inventories/v1beta;inventories"; +option go_package = "cloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespb"; option java_multiple_files = true; option java_outer_classname = "LocalInventoryProto"; option java_package = "com.google.shopping.merchant.inventories.v1beta"; diff --git a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/regionalinventory.proto b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/regionalinventory.proto index 7b3a76e5e103..756bef28ce6a 100644 --- a/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/regionalinventory.proto +++ b/java-shopping-merchant-inventories/proto-google-shopping-merchant-inventories-v1beta/src/main/proto/google/shopping/merchant/inventories/v1beta/regionalinventory.proto @@ -24,7 +24,7 @@ import "google/protobuf/empty.proto"; import "google/shopping/type/types.proto"; import "google/type/interval.proto"; -option go_package = "google.golang.org/genproto/googleapis/shopping/merchant/inventories/v1beta;inventories"; +option go_package = "cloud.google.com/go/shopping/merchant/inventories/apiv1beta/inventoriespb;inventoriespb"; option java_multiple_files = true; option java_outer_classname = "RegionalInventoryProto"; option java_package = "com.google.shopping.merchant.inventories.v1beta"; diff --git a/java-shopping-merchant-reports/CHANGELOG.md b/java-shopping-merchant-reports/CHANGELOG.md index 0120a566ea57..126a73317863 100644 --- a/java-shopping-merchant-reports/CHANGELOG.md +++ b/java-shopping-merchant-reports/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.5.0 (2023-10-25) + +### Features + +* non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed ([#9981](https://github.com/googleapis/google-cloud-java/issues/9981)) +* `channel` field is added to the `product_view` table ([#9956](https://github.com/googleapis/google-cloud-java/issues/9956)) ([2a8403b](https://github.com/googleapis/google-cloud-java/commit/2a8403b4c948f315911384c46c74d33afcb2eb65)) +* Channel enum is added ([#9957](https://github.com/googleapis/google-cloud-java/issues/9957)) ([9135abe](https://github.com/googleapis/google-cloud-java/commit/9135abe92be0639bde65a98709cd9d9df6385ae7)) +* non_product_performance_view table, seller segments in product_performance_view table, and entity ids in best_seller tables are removed ([#9981](https://github.com/googleapis/google-cloud-java/issues/9981)) ([f242404](https://github.com/googleapis/google-cloud-java/commit/f242404af5d3a84b84bfd57937a06f9cbb99674c)) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.4.0 (2023-10-11) ### Dependencies diff --git a/java-shopping-merchant-reports/README.md b/java-shopping-merchant-reports/README.md index f2b1474347e5..ecea11c70ab1 100644 --- a/java-shopping-merchant-reports/README.md +++ b/java-shopping-merchant-reports/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.25.0 pom import @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.shopping google-shopping-merchant-reports - 0.4.0 + 0.5.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.shopping:google-shopping-merchant-reports:0.4.0' +implementation 'com.google.shopping:google-shopping-merchant-reports:0.5.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.shopping" % "google-shopping-merchant-reports" % "0.4.0" +libraryDependencies += "com.google.shopping" % "google-shopping-merchant-reports" % "0.5.0" ``` @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shopping-merchant-reports/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-reports.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-reports/0.0.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-reports/0.4.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-shopping-merchant-reports/google-shopping-merchant-reports-bom/pom.xml b/java-shopping-merchant-reports/google-shopping-merchant-reports-bom/pom.xml index 47620383bc99..5d92c58daa00 100644 --- a/java-shopping-merchant-reports/google-shopping-merchant-reports-bom/pom.xml +++ b/java-shopping-merchant-reports/google-shopping-merchant-reports-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.shopping google-shopping-merchant-reports-bom - 0.4.0 + 0.5.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.shopping google-shopping-merchant-reports - 0.4.0 + 0.5.0 com.google.shopping.api.grpc grpc-google-shopping-merchant-reports-v1beta - 0.4.0 + 0.5.0 com.google.shopping.api.grpc proto-google-shopping-merchant-reports-v1beta - 0.4.0 + 0.5.0
diff --git a/java-shopping-merchant-reports/google-shopping-merchant-reports/pom.xml b/java-shopping-merchant-reports/google-shopping-merchant-reports/pom.xml index a42edcf85db2..132c63f7c397 100644 --- a/java-shopping-merchant-reports/google-shopping-merchant-reports/pom.xml +++ b/java-shopping-merchant-reports/google-shopping-merchant-reports/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.shopping google-shopping-merchant-reports - 0.4.0 + 0.5.0 jar Google Merchant API Merchant API Programmatically manage your Merchant Center accounts. com.google.shopping google-shopping-merchant-reports-parent - 0.4.0 + 0.5.0 google-shopping-merchant-reports diff --git a/java-shopping-merchant-reports/google-shopping-merchant-reports/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reports.v1beta/reflect-config.json b/java-shopping-merchant-reports/google-shopping-merchant-reports/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reports.v1beta/reflect-config.json index ace99628cdc3..7331ffa86be9 100644 --- a/java-shopping-merchant-reports/google-shopping-merchant-reports/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reports.v1beta/reflect-config.json +++ b/java-shopping-merchant-reports/google-shopping-merchant-reports/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reports.v1beta/reflect-config.json @@ -1107,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView", + "name": "com.google.shopping.merchant.reports.v1beta.MarketingMethod", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1116,16 @@ "allPublicClasses": true }, { - "name": "com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView$Builder", + "name": "com.google.shopping.merchant.reports.v1beta.MarketingMethod$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.MarketingMethod$MarketingMethodEnum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.shopping.merchant.reports.v1beta.ProductView$AggregatedDestinationStatus", + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$AggregatedReportingContextStatus", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$IssueSeverityPerDestination", + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$IssueSeverityPerReportingContext", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$IssueSeverityPerDestination$Builder", + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$IssueSeverityPerReportingContext$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1304,6 +1313,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.merchant.reports.v1beta.RelativeDemand$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.RelativeDemand$RelativeDemandEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType", "queryAllDeclaredConstructors": true, @@ -1313,6 +1340,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType$RelativeDemandChangeTypeEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.shopping.merchant.reports.v1beta.ReportGranularity", "queryAllDeclaredConstructors": true, @@ -1322,6 +1367,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ReportGranularity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ReportGranularity$ReportGranularityEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.shopping.merchant.reports.v1beta.ReportRow", "queryAllDeclaredConstructors": true, @@ -1385,6 +1448,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.merchant.reports.v1beta.TrafficSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.TrafficSource$TrafficSourceEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel$ChannelEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.shopping.type.CustomAttribute", "queryAllDeclaredConstructors": true, @@ -1412,6 +1520,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.type.Destination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Destination$DestinationEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.shopping.type.Price", "queryAllDeclaredConstructors": true, @@ -1430,6 +1556,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.shopping.type.ReportingContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.ReportingContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.ReportingContext$ReportingContextEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.type.Date", "queryAllDeclaredConstructors": true, diff --git a/java-shopping-merchant-reports/grpc-google-shopping-merchant-reports-v1beta/pom.xml b/java-shopping-merchant-reports/grpc-google-shopping-merchant-reports-v1beta/pom.xml index 363f8eb49a2b..300a9fd7606a 100644 --- a/java-shopping-merchant-reports/grpc-google-shopping-merchant-reports-v1beta/pom.xml +++ b/java-shopping-merchant-reports/grpc-google-shopping-merchant-reports-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.shopping.api.grpc grpc-google-shopping-merchant-reports-v1beta - 0.4.0 + 0.5.0 grpc-google-shopping-merchant-reports-v1beta GRPC library for google-shopping-merchant-reports com.google.shopping google-shopping-merchant-reports-parent - 0.4.0 + 0.5.0 diff --git a/java-shopping-merchant-reports/pom.xml b/java-shopping-merchant-reports/pom.xml index c7478dd666e0..4696f38adb92 100644 --- a/java-shopping-merchant-reports/pom.xml +++ b/java-shopping-merchant-reports/pom.xml @@ -4,7 +4,7 @@ com.google.shopping google-shopping-merchant-reports-parent pom - 0.4.0 + 0.5.0 Google Merchant API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.shopping google-shopping-merchant-reports - 0.4.0 + 0.5.0 com.google.shopping.api.grpc grpc-google-shopping-merchant-reports-v1beta - 0.4.0 + 0.5.0 com.google.shopping.api.grpc proto-google-shopping-merchant-reports-v1beta - 0.4.0 + 0.5.0 diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/pom.xml b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/pom.xml index 14af4037f936..16dc368006e8 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/pom.xml +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.shopping.api.grpc proto-google-shopping-merchant-reports-v1beta - 0.4.0 + 0.5.0 proto-google-shopping-merchant-reports-v1beta Proto library for google-shopping-merchant-reports com.google.shopping google-shopping-merchant-reports-parent - 0.4.0 + 0.5.0 diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandView.java index a6bd805ec87f..c9f4646dc9f9 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandView.java @@ -46,7 +46,6 @@ private BestSellersBrandView(com.google.protobuf.GeneratedMessageV3.Builder b private BestSellersBrandView() { reportGranularity_ = 0; reportCountryCode_ = ""; - id_ = ""; brand_ = ""; relativeDemand_ = 0; previousRelativeDemand_ = 0; @@ -156,7 +155,7 @@ public com.google.type.DateOrBuilder getReportDateOrBuilder() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return Whether the reportGranularity field is set. @@ -177,7 +176,7 @@ public boolean hasReportGranularity() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The enum numeric value on the wire for reportGranularity. @@ -198,17 +197,20 @@ public int getReportGranularityValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The reportGranularity. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGranularity() { - com.google.shopping.merchant.reports.v1beta.ReportGranularity result = - com.google.shopping.merchant.reports.v1beta.ReportGranularity.forNumber(reportGranularity_); + public com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + getReportGranularity() { + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum result = + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .forNumber(reportGranularity_); return result == null - ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .UNRECOGNIZED : result; } @@ -335,72 +337,6 @@ public long getReportCategoryId() { return reportCategoryId_; } - public static final int ID_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * - * - *
-   * Google-assigned id of the brand.
-   * 
- * - * optional string id = 5; - * - * @return Whether the id field is set. - */ - @java.lang.Override - public boolean hasId() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-   * Google-assigned id of the brand.
-   * 
- * - * optional string id = 5; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * - * - *
-   * Google-assigned id of the brand.
-   * 
- * - * optional string id = 5; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - public static final int BRAND_FIELD_NUMBER = 6; @SuppressWarnings("serial") @@ -418,7 +354,7 @@ public com.google.protobuf.ByteString getIdBytes() { */ @java.lang.Override public boolean hasBrand() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -483,7 +419,7 @@ public com.google.protobuf.ByteString getBrandBytes() { */ @java.lang.Override public boolean hasRank() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -517,7 +453,7 @@ public long getRank() { */ @java.lang.Override public boolean hasPreviousRank() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -545,14 +481,15 @@ public long getPreviousRank() { * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return Whether the relativeDemand field is set. */ @java.lang.Override public boolean hasRelativeDemand() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -562,7 +499,8 @@ public boolean hasRelativeDemand() { * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return The enum numeric value on the wire for relativeDemand. @@ -579,17 +517,20 @@ public int getRelativeDemandValue() { * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return The relativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber(relativeDemand_); + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( + relativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.UNRECOGNIZED : result; } @@ -604,14 +545,14 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDem * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return Whether the previousRelativeDemand field is set. */ @java.lang.Override public boolean hasPreviousRelativeDemand() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -622,7 +563,7 @@ public boolean hasPreviousRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return The enum numeric value on the wire for previousRelativeDemand. @@ -640,18 +581,19 @@ public int getPreviousRelativeDemandValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return The previousRelativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber( + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getPreviousRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( previousRelativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.UNRECOGNIZED : result; } @@ -665,14 +607,14 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRel * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return Whether the relativeDemandChange field is set. */ @java.lang.Override public boolean hasRelativeDemandChange() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -682,7 +624,7 @@ public boolean hasRelativeDemandChange() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return The enum numeric value on the wire for relativeDemandChange. @@ -699,19 +641,23 @@ public int getRelativeDemandChangeValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return The relativeDemandChange. */ @java.lang.Override public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum getRelativeDemandChange() { - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType result = - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.forNumber( - relativeDemandChange_); + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum + result = + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.forNumber(relativeDemandChange_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.UNRECOGNIZED : result; } @@ -742,24 +688,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeInt64(4, reportCategoryId_); } if (((bitField0_ & 0x00000008) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); - } - if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, brand_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { output.writeInt64(7, rank_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { output.writeInt64(8, previousRank_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { output.writeEnum(9, relativeDemand_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { output.writeEnum(10, previousRelativeDemand_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { output.writeEnum(11, relativeDemandChange_); } getUnknownFields().writeTo(output); @@ -784,24 +727,21 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, reportCategoryId_); } if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); - } - if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, brand_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, rank_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, previousRank_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, relativeDemand_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, previousRelativeDemand_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, relativeDemandChange_); } size += getUnknownFields().getSerializedSize(); @@ -836,10 +776,6 @@ public boolean equals(final java.lang.Object obj) { if (hasReportCategoryId()) { if (getReportCategoryId() != other.getReportCategoryId()) return false; } - if (hasId() != other.hasId()) return false; - if (hasId()) { - if (!getId().equals(other.getId())) return false; - } if (hasBrand() != other.hasBrand()) return false; if (hasBrand()) { if (!getBrand().equals(other.getBrand())) return false; @@ -891,10 +827,6 @@ public int hashCode() { hash = (37 * hash) + REPORT_CATEGORY_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReportCategoryId()); } - if (hasId()) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - } if (hasBrand()) { hash = (37 * hash) + BRAND_FIELD_NUMBER; hash = (53 * hash) + getBrand().hashCode(); @@ -1073,7 +1005,6 @@ public Builder clear() { reportGranularity_ = 0; reportCountryCode_ = ""; reportCategoryId_ = 0L; - id_ = ""; brand_ = ""; rank_ = 0L; previousRank_ = 0L; @@ -1135,32 +1066,28 @@ private void buildPartial0( to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.id_ = id_; + result.brand_ = brand_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.brand_ = brand_; + result.rank_ = rank_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.rank_ = rank_; + result.previousRank_ = previousRank_; to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.previousRank_ = previousRank_; + result.relativeDemand_ = relativeDemand_; to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.relativeDemand_ = relativeDemand_; + result.previousRelativeDemand_ = previousRelativeDemand_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.previousRelativeDemand_ = previousRelativeDemand_; - to_bitField0_ |= 0x00000100; - } - if (((from_bitField0_ & 0x00000400) != 0)) { result.relativeDemandChange_ = relativeDemandChange_; - to_bitField0_ |= 0x00000200; + to_bitField0_ |= 0x00000100; } result.bitField0_ |= to_bitField0_; } @@ -1227,14 +1154,9 @@ public Builder mergeFrom( if (other.hasReportCategoryId()) { setReportCategoryId(other.getReportCategoryId()); } - if (other.hasId()) { - id_ = other.id_; - bitField0_ |= 0x00000010; - onChanged(); - } if (other.hasBrand()) { brand_ = other.brand_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); } if (other.hasRank()) { @@ -1302,46 +1224,40 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 - case 42: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 case 50: { brand_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; break; } // case 50 case 56: { rank_ = input.readInt64(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; break; } // case 56 case 64: { previousRank_ = input.readInt64(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; break; } // case 64 case 72: { relativeDemand_ = input.readEnum(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; break; } // case 72 case 80: { previousRelativeDemand_ = input.readEnum(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; break; } // case 80 case 88: { relativeDemandChange_ = input.readEnum(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; break; } // case 88 default: @@ -1612,7 +1528,7 @@ public com.google.type.DateOrBuilder getReportDateOrBuilder() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return Whether the reportGranularity field is set. @@ -1633,7 +1549,7 @@ public boolean hasReportGranularity() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The enum numeric value on the wire for reportGranularity. @@ -1654,7 +1570,7 @@ public int getReportGranularityValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @param value The enum numeric value on the wire for reportGranularity to set. @@ -1678,18 +1594,20 @@ public Builder setReportGranularityValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The reportGranularity. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGranularity() { - com.google.shopping.merchant.reports.v1beta.ReportGranularity result = - com.google.shopping.merchant.reports.v1beta.ReportGranularity.forNumber( - reportGranularity_); + public com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + getReportGranularity() { + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum result = + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .forNumber(reportGranularity_); return result == null - ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .UNRECOGNIZED : result; } /** @@ -1704,14 +1622,14 @@ public com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGr * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @param value The reportGranularity to set. * @return This builder for chaining. */ public Builder setReportGranularity( - com.google.shopping.merchant.reports.v1beta.ReportGranularity value) { + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum value) { if (value == null) { throw new NullPointerException(); } @@ -1732,7 +1650,7 @@ public Builder setReportGranularity( * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return This builder for chaining. @@ -1980,126 +1898,6 @@ public Builder clearReportCategoryId() { return this; } - private java.lang.Object id_ = ""; - /** - * - * - *
-     * Google-assigned id of the brand.
-     * 
- * - * optional string id = 5; - * - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Google-assigned id of the brand.
-     * 
- * - * optional string id = 5; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Google-assigned id of the brand.
-     * 
- * - * optional string id = 5; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Google-assigned id of the brand.
-     * 
- * - * optional string id = 5; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Google-assigned id of the brand.
-     * 
- * - * optional string id = 5; - * - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Google-assigned id of the brand.
-     * 
- * - * optional string id = 5; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - private java.lang.Object brand_ = ""; /** * @@ -2113,7 +1911,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { * @return Whether the brand field is set. */ public boolean hasBrand() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2176,7 +1974,7 @@ public Builder setBrand(java.lang.String value) { throw new NullPointerException(); } brand_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2193,7 +1991,7 @@ public Builder setBrand(java.lang.String value) { */ public Builder clearBrand() { brand_ = getDefaultInstance().getBrand(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -2215,7 +2013,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); brand_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2235,7 +2033,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { */ @java.lang.Override public boolean hasRank() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2269,7 +2067,7 @@ public long getRank() { public Builder setRank(long value) { rank_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2286,7 +2084,7 @@ public Builder setRank(long value) { * @return This builder for chaining. */ public Builder clearRank() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); rank_ = 0L; onChanged(); return this; @@ -2306,7 +2104,7 @@ public Builder clearRank() { */ @java.lang.Override public boolean hasPreviousRank() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2338,7 +2136,7 @@ public long getPreviousRank() { public Builder setPreviousRank(long value) { previousRank_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2354,7 +2152,7 @@ public Builder setPreviousRank(long value) { * @return This builder for chaining. */ public Builder clearPreviousRank() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000040); previousRank_ = 0L; onChanged(); return this; @@ -2369,14 +2167,15 @@ public Builder clearPreviousRank() { * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return Whether the relativeDemand field is set. */ @java.lang.Override public boolean hasRelativeDemand() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -2386,7 +2185,8 @@ public boolean hasRelativeDemand() { * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return The enum numeric value on the wire for relativeDemand. @@ -2403,7 +2203,8 @@ public int getRelativeDemandValue() { * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @param value The enum numeric value on the wire for relativeDemand to set. @@ -2411,7 +2212,7 @@ public int getRelativeDemandValue() { */ public Builder setRelativeDemandValue(int value) { relativeDemand_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2423,17 +2224,21 @@ public Builder setRelativeDemandValue(int value) { * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return The relativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber(relativeDemand_); + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( + relativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + .UNRECOGNIZED : result; } /** @@ -2444,18 +2249,19 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDem * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @param value The relativeDemand to set. * @return This builder for chaining. */ public Builder setRelativeDemand( - com.google.shopping.merchant.reports.v1beta.RelativeDemand value) { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; relativeDemand_ = value.getNumber(); onChanged(); return this; @@ -2468,13 +2274,14 @@ public Builder setRelativeDemand( * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return This builder for chaining. */ public Builder clearRelativeDemand() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000080); relativeDemand_ = 0; onChanged(); return this; @@ -2490,14 +2297,14 @@ public Builder clearRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return Whether the previousRelativeDemand field is set. */ @java.lang.Override public boolean hasPreviousRelativeDemand() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -2508,7 +2315,7 @@ public boolean hasPreviousRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return The enum numeric value on the wire for previousRelativeDemand. @@ -2526,7 +2333,7 @@ public int getPreviousRelativeDemandValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @param value The enum numeric value on the wire for previousRelativeDemand to set. @@ -2534,7 +2341,7 @@ public int getPreviousRelativeDemandValue() { */ public Builder setPreviousRelativeDemandValue(int value) { previousRelativeDemand_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2547,18 +2354,20 @@ public Builder setPreviousRelativeDemandValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return The previousRelativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber( + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getPreviousRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( previousRelativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + .UNRECOGNIZED : result; } /** @@ -2570,18 +2379,18 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRel * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @param value The previousRelativeDemand to set. * @return This builder for chaining. */ public Builder setPreviousRelativeDemand( - com.google.shopping.merchant.reports.v1beta.RelativeDemand value) { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; previousRelativeDemand_ = value.getNumber(); onChanged(); return this; @@ -2595,13 +2404,13 @@ public Builder setPreviousRelativeDemand( * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return This builder for chaining. */ public Builder clearPreviousRelativeDemand() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); previousRelativeDemand_ = 0; onChanged(); return this; @@ -2616,14 +2425,14 @@ public Builder clearPreviousRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return Whether the relativeDemandChange field is set. */ @java.lang.Override public boolean hasRelativeDemandChange() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -2633,7 +2442,7 @@ public boolean hasRelativeDemandChange() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return The enum numeric value on the wire for relativeDemandChange. @@ -2650,7 +2459,7 @@ public int getRelativeDemandChangeValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @param value The enum numeric value on the wire for relativeDemandChange to set. @@ -2658,7 +2467,7 @@ public int getRelativeDemandChangeValue() { */ public Builder setRelativeDemandChangeValue(int value) { relativeDemandChange_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2670,19 +2479,23 @@ public Builder setRelativeDemandChangeValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return The relativeDemandChange. */ @java.lang.Override public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum getRelativeDemandChange() { - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType result = - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.forNumber( - relativeDemandChange_); + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum + result = + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.forNumber(relativeDemandChange_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.UNRECOGNIZED : result; } /** @@ -2693,18 +2506,20 @@ public Builder setRelativeDemandChangeValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @param value The relativeDemandChange to set. * @return This builder for chaining. */ public Builder setRelativeDemandChange( - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType value) { + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum + value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; relativeDemandChange_ = value.getNumber(); onChanged(); return this; @@ -2717,13 +2532,13 @@ public Builder setRelativeDemandChange( * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return This builder for chaining. */ public Builder clearRelativeDemandChange() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000200); relativeDemandChange_ = 0; onChanged(); return this; diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandViewOrBuilder.java index 07dccf839634..5bc1dea5597d 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersBrandViewOrBuilder.java @@ -91,7 +91,7 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return Whether the reportGranularity field is set. @@ -109,7 +109,7 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The enum numeric value on the wire for reportGranularity. @@ -127,12 +127,13 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The reportGranularity. */ - com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGranularity(); + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + getReportGranularity(); /** * @@ -220,43 +221,6 @@ public interface BestSellersBrandViewOrBuilder */ long getReportCategoryId(); - /** - * - * - *
-   * Google-assigned id of the brand.
-   * 
- * - * optional string id = 5; - * - * @return Whether the id field is set. - */ - boolean hasId(); - /** - * - * - *
-   * Google-assigned id of the brand.
-   * 
- * - * optional string id = 5; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-   * Google-assigned id of the brand.
-   * 
- * - * optional string id = 5; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - /** * * @@ -354,7 +318,8 @@ public interface BestSellersBrandViewOrBuilder * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return Whether the relativeDemand field is set. @@ -368,7 +333,8 @@ public interface BestSellersBrandViewOrBuilder * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return The enum numeric value on the wire for relativeDemand. @@ -382,12 +348,13 @@ public interface BestSellersBrandViewOrBuilder * in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 9; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 9; * * * @return The relativeDemand. */ - com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDemand(); + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum getRelativeDemand(); /** * @@ -398,7 +365,7 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return Whether the previousRelativeDemand field is set. @@ -413,7 +380,7 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return The enum numeric value on the wire for previousRelativeDemand. @@ -428,12 +395,13 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 10; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; * * * @return The previousRelativeDemand. */ - com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRelativeDemand(); + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getPreviousRelativeDemand(); /** * @@ -443,7 +411,7 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return Whether the relativeDemandChange field is set. @@ -457,7 +425,7 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return The enum numeric value on the wire for relativeDemandChange. @@ -471,10 +439,11 @@ public interface BestSellersBrandViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 11; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 11; * * * @return The relativeDemandChange. */ - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType getRelativeDemandChange(); + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum + getRelativeDemandChange(); } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterView.java index fc0ee9f46b56..07bf3c278b90 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterView.java @@ -48,7 +48,6 @@ private BestSellersProductClusterView(com.google.protobuf.GeneratedMessageV3.Bui private BestSellersProductClusterView() { reportGranularity_ = 0; reportCountryCode_ = ""; - id_ = ""; title_ = ""; brand_ = ""; categoryL1_ = ""; @@ -355,7 +354,7 @@ public com.google.type.DateOrBuilder getReportDateOrBuilder() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return Whether the reportGranularity field is set. @@ -376,7 +375,7 @@ public boolean hasReportGranularity() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The enum numeric value on the wire for reportGranularity. @@ -397,17 +396,20 @@ public int getReportGranularityValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The reportGranularity. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGranularity() { - com.google.shopping.merchant.reports.v1beta.ReportGranularity result = - com.google.shopping.merchant.reports.v1beta.ReportGranularity.forNumber(reportGranularity_); + public com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + getReportGranularity() { + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum result = + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .forNumber(reportGranularity_); return result == null - ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .UNRECOGNIZED : result; } @@ -534,72 +536,6 @@ public long getReportCategoryId() { return reportCategoryId_; } - public static final int ID_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * - * - *
-   * Google-assigned id of the product cluster.
-   * 
- * - * optional string id = 5; - * - * @return Whether the id field is set. - */ - @java.lang.Override - public boolean hasId() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-   * Google-assigned id of the product cluster.
-   * 
- * - * optional string id = 5; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * - * - *
-   * Google-assigned id of the product cluster.
-   * 
- * - * optional string id = 5; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - public static final int TITLE_FIELD_NUMBER = 6; @SuppressWarnings("serial") @@ -617,7 +553,7 @@ public com.google.protobuf.ByteString getIdBytes() { */ @java.lang.Override public boolean hasTitle() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -683,7 +619,7 @@ public com.google.protobuf.ByteString getTitleBytes() { */ @java.lang.Override public boolean hasBrand() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -751,7 +687,7 @@ public com.google.protobuf.ByteString getBrandBytes() { */ @java.lang.Override public boolean hasCategoryL1() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -823,7 +759,7 @@ public com.google.protobuf.ByteString getCategoryL1Bytes() { */ @java.lang.Override public boolean hasCategoryL2() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -895,7 +831,7 @@ public com.google.protobuf.ByteString getCategoryL2Bytes() { */ @java.lang.Override public boolean hasCategoryL3() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -967,7 +903,7 @@ public com.google.protobuf.ByteString getCategoryL3Bytes() { */ @java.lang.Override public boolean hasCategoryL4() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -1039,7 +975,7 @@ public com.google.protobuf.ByteString getCategoryL4Bytes() { */ @java.lang.Override public boolean hasCategoryL5() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -1177,7 +1113,7 @@ public com.google.protobuf.ByteString getVariantGtinsBytes(int index) { */ @java.lang.Override public boolean hasInventoryStatus() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -1252,7 +1188,7 @@ public int getInventoryStatusValue() { */ @java.lang.Override public boolean hasBrandInventoryStatus() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -1323,7 +1259,7 @@ public int getBrandInventoryStatusValue() { */ @java.lang.Override public boolean hasRank() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** * @@ -1357,7 +1293,7 @@ public long getRank() { */ @java.lang.Override public boolean hasPreviousRank() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -1385,14 +1321,15 @@ public long getPreviousRank() { * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return Whether the relativeDemand field is set. */ @java.lang.Override public boolean hasRelativeDemand() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -1402,7 +1339,8 @@ public boolean hasRelativeDemand() { * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return The enum numeric value on the wire for relativeDemand. @@ -1419,17 +1357,20 @@ public int getRelativeDemandValue() { * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return The relativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber(relativeDemand_); + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( + relativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.UNRECOGNIZED : result; } @@ -1445,14 +1386,14 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDem * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return Whether the previousRelativeDemand field is set. */ @java.lang.Override public boolean hasPreviousRelativeDemand() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -1464,7 +1405,7 @@ public boolean hasPreviousRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return The enum numeric value on the wire for previousRelativeDemand. @@ -1483,18 +1424,19 @@ public int getPreviousRelativeDemandValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return The previousRelativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber( + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getPreviousRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( previousRelativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.UNRECOGNIZED : result; } @@ -1508,14 +1450,14 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRel * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return Whether the relativeDemandChange field is set. */ @java.lang.Override public boolean hasRelativeDemandChange() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -1525,7 +1467,7 @@ public boolean hasRelativeDemandChange() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return The enum numeric value on the wire for relativeDemandChange. @@ -1542,19 +1484,23 @@ public int getRelativeDemandChangeValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return The relativeDemandChange. */ @java.lang.Override public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum getRelativeDemandChange() { - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType result = - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.forNumber( - relativeDemandChange_); + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum + result = + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.forNumber(relativeDemandChange_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.UNRECOGNIZED : result; } @@ -1585,51 +1531,48 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeInt64(4, reportCategoryId_); } if (((bitField0_ & 0x00000008) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); - } - if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, title_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, brand_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, categoryL1_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, categoryL2_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, categoryL3_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, categoryL4_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, categoryL5_); } for (int i = 0; i < variantGtins_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, variantGtins_.getRaw(i)); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { output.writeEnum(14, inventoryStatus_); } - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { output.writeEnum(15, brandInventoryStatus_); } - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { output.writeInt64(16, rank_); } - if (((bitField0_ & 0x00004000) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { output.writeInt64(17, previousRank_); } - if (((bitField0_ & 0x00008000) != 0)) { + if (((bitField0_ & 0x00004000) != 0)) { output.writeEnum(18, relativeDemand_); } - if (((bitField0_ & 0x00010000) != 0)) { + if (((bitField0_ & 0x00008000) != 0)) { output.writeEnum(19, previousRelativeDemand_); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00010000) != 0)) { output.writeEnum(20, relativeDemandChange_); } getUnknownFields().writeTo(output); @@ -1654,27 +1597,24 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, reportCategoryId_); } if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); - } - if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, title_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, brand_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, categoryL1_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, categoryL2_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, categoryL3_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, categoryL4_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, categoryL5_); } { @@ -1685,25 +1625,25 @@ public int getSerializedSize() { size += dataSize; size += 1 * getVariantGtinsList().size(); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, inventoryStatus_); } - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, brandInventoryStatus_); } - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(16, rank_); } - if (((bitField0_ & 0x00004000) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(17, previousRank_); } - if (((bitField0_ & 0x00008000) != 0)) { + if (((bitField0_ & 0x00004000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(18, relativeDemand_); } - if (((bitField0_ & 0x00010000) != 0)) { + if (((bitField0_ & 0x00008000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, previousRelativeDemand_); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00010000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, relativeDemandChange_); } size += getUnknownFields().getSerializedSize(); @@ -1739,10 +1679,6 @@ public boolean equals(final java.lang.Object obj) { if (hasReportCategoryId()) { if (getReportCategoryId() != other.getReportCategoryId()) return false; } - if (hasId() != other.hasId()) return false; - if (hasId()) { - if (!getId().equals(other.getId())) return false; - } if (hasTitle() != other.hasTitle()) return false; if (hasTitle()) { if (!getTitle().equals(other.getTitle())) return false; @@ -1827,10 +1763,6 @@ public int hashCode() { hash = (37 * hash) + REPORT_CATEGORY_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReportCategoryId()); } - if (hasId()) { - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - } if (hasTitle()) { hash = (37 * hash) + TITLE_FIELD_NUMBER; hash = (53 * hash) + getTitle().hashCode(); @@ -2050,7 +1982,6 @@ public Builder clear() { reportGranularity_ = 0; reportCountryCode_ = ""; reportCategoryId_ = 0L; - id_ = ""; title_ = ""; brand_ = ""; categoryL1_ = ""; @@ -2124,68 +2055,64 @@ private void buildPartial0( to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.id_ = id_; + result.title_ = title_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.title_ = title_; + result.brand_ = brand_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.brand_ = brand_; + result.categoryL1_ = categoryL1_; to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.categoryL1_ = categoryL1_; + result.categoryL2_ = categoryL2_; to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.categoryL2_ = categoryL2_; + result.categoryL3_ = categoryL3_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.categoryL3_ = categoryL3_; + result.categoryL4_ = categoryL4_; to_bitField0_ |= 0x00000100; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.categoryL4_ = categoryL4_; + result.categoryL5_ = categoryL5_; to_bitField0_ |= 0x00000200; } if (((from_bitField0_ & 0x00000800) != 0)) { - result.categoryL5_ = categoryL5_; - to_bitField0_ |= 0x00000400; - } - if (((from_bitField0_ & 0x00001000) != 0)) { variantGtins_.makeImmutable(); result.variantGtins_ = variantGtins_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.inventoryStatus_ = inventoryStatus_; + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.brandInventoryStatus_ = brandInventoryStatus_; to_bitField0_ |= 0x00000800; } if (((from_bitField0_ & 0x00004000) != 0)) { - result.brandInventoryStatus_ = brandInventoryStatus_; + result.rank_ = rank_; to_bitField0_ |= 0x00001000; } if (((from_bitField0_ & 0x00008000) != 0)) { - result.rank_ = rank_; + result.previousRank_ = previousRank_; to_bitField0_ |= 0x00002000; } if (((from_bitField0_ & 0x00010000) != 0)) { - result.previousRank_ = previousRank_; + result.relativeDemand_ = relativeDemand_; to_bitField0_ |= 0x00004000; } if (((from_bitField0_ & 0x00020000) != 0)) { - result.relativeDemand_ = relativeDemand_; + result.previousRelativeDemand_ = previousRelativeDemand_; to_bitField0_ |= 0x00008000; } if (((from_bitField0_ & 0x00040000) != 0)) { - result.previousRelativeDemand_ = previousRelativeDemand_; - to_bitField0_ |= 0x00010000; - } - if (((from_bitField0_ & 0x00080000) != 0)) { result.relativeDemandChange_ = relativeDemandChange_; - to_bitField0_ |= 0x00020000; + to_bitField0_ |= 0x00010000; } result.bitField0_ |= to_bitField0_; } @@ -2254,50 +2181,45 @@ public Builder mergeFrom( if (other.hasReportCategoryId()) { setReportCategoryId(other.getReportCategoryId()); } - if (other.hasId()) { - id_ = other.id_; - bitField0_ |= 0x00000010; - onChanged(); - } if (other.hasTitle()) { title_ = other.title_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); } if (other.hasBrand()) { brand_ = other.brand_; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); } if (other.hasCategoryL1()) { categoryL1_ = other.categoryL1_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); } if (other.hasCategoryL2()) { categoryL2_ = other.categoryL2_; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); } if (other.hasCategoryL3()) { categoryL3_ = other.categoryL3_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); } if (other.hasCategoryL4()) { categoryL4_ = other.categoryL4_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; onChanged(); } if (other.hasCategoryL5()) { categoryL5_ = other.categoryL5_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000400; onChanged(); } if (!other.variantGtins_.isEmpty()) { if (variantGtins_.isEmpty()) { variantGtins_ = other.variantGtins_; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000800; } else { ensureVariantGtinsIsMutable(); variantGtins_.addAll(other.variantGtins_); @@ -2375,52 +2297,46 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 - case 42: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 case 50: { title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; break; } // case 50 case 58: { brand_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; break; } // case 58 case 66: { categoryL1_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; break; } // case 66 case 74: { categoryL2_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; break; } // case 74 case 82: { categoryL3_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; break; } // case 82 case 90: { categoryL4_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; break; } // case 90 case 98: { categoryL5_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000400; break; } // case 98 case 106: @@ -2433,43 +2349,43 @@ public Builder mergeFrom( case 112: { inventoryStatus_ = input.readEnum(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00001000; break; } // case 112 case 120: { brandInventoryStatus_ = input.readEnum(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00002000; break; } // case 120 case 128: { rank_ = input.readInt64(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00004000; break; } // case 128 case 136: { previousRank_ = input.readInt64(); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00008000; break; } // case 136 case 144: { relativeDemand_ = input.readEnum(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00010000; break; } // case 144 case 152: { previousRelativeDemand_ = input.readEnum(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00020000; break; } // case 152 case 160: { relativeDemandChange_ = input.readEnum(); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00040000; break; } // case 160 default: @@ -2740,7 +2656,7 @@ public com.google.type.DateOrBuilder getReportDateOrBuilder() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return Whether the reportGranularity field is set. @@ -2761,7 +2677,7 @@ public boolean hasReportGranularity() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The enum numeric value on the wire for reportGranularity. @@ -2782,7 +2698,7 @@ public int getReportGranularityValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @param value The enum numeric value on the wire for reportGranularity to set. @@ -2806,18 +2722,20 @@ public Builder setReportGranularityValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The reportGranularity. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGranularity() { - com.google.shopping.merchant.reports.v1beta.ReportGranularity result = - com.google.shopping.merchant.reports.v1beta.ReportGranularity.forNumber( - reportGranularity_); + public com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + getReportGranularity() { + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum result = + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .forNumber(reportGranularity_); return result == null - ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + .UNRECOGNIZED : result; } /** @@ -2832,14 +2750,14 @@ public com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGr * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @param value The reportGranularity to set. * @return This builder for chaining. */ public Builder setReportGranularity( - com.google.shopping.merchant.reports.v1beta.ReportGranularity value) { + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum value) { if (value == null) { throw new NullPointerException(); } @@ -2860,7 +2778,7 @@ public Builder setReportGranularity( * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return This builder for chaining. @@ -3108,126 +3026,6 @@ public Builder clearReportCategoryId() { return this; } - private java.lang.Object id_ = ""; - /** - * - * - *
-     * Google-assigned id of the product cluster.
-     * 
- * - * optional string id = 5; - * - * @return Whether the id field is set. - */ - public boolean hasId() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Google-assigned id of the product cluster.
-     * 
- * - * optional string id = 5; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Google-assigned id of the product cluster.
-     * 
- * - * optional string id = 5; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Google-assigned id of the product cluster.
-     * 
- * - * optional string id = 5; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Google-assigned id of the product cluster.
-     * 
- * - * optional string id = 5; - * - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Google-assigned id of the product cluster.
-     * 
- * - * optional string id = 5; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - private java.lang.Object title_ = ""; /** * @@ -3241,7 +3039,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { * @return Whether the title field is set. */ public boolean hasTitle() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -3304,7 +3102,7 @@ public Builder setTitle(java.lang.String value) { throw new NullPointerException(); } title_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3321,7 +3119,7 @@ public Builder setTitle(java.lang.String value) { */ public Builder clearTitle() { title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -3343,7 +3141,7 @@ public Builder setTitleBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); title_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3361,7 +3159,7 @@ public Builder setTitleBytes(com.google.protobuf.ByteString value) { * @return Whether the brand field is set. */ public boolean hasBrand() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -3424,7 +3222,7 @@ public Builder setBrand(java.lang.String value) { throw new NullPointerException(); } brand_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3441,7 +3239,7 @@ public Builder setBrand(java.lang.String value) { */ public Builder clearBrand() { brand_ = getDefaultInstance().getBrand(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -3463,7 +3261,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); brand_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3483,7 +3281,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL1 field is set. */ public boolean hasCategoryL1() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -3552,7 +3350,7 @@ public Builder setCategoryL1(java.lang.String value) { throw new NullPointerException(); } categoryL1_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3571,7 +3369,7 @@ public Builder setCategoryL1(java.lang.String value) { */ public Builder clearCategoryL1() { categoryL1_ = getDefaultInstance().getCategoryL1(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -3595,7 +3393,7 @@ public Builder setCategoryL1Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL1_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3615,7 +3413,7 @@ public Builder setCategoryL1Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL2 field is set. */ public boolean hasCategoryL2() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -3684,7 +3482,7 @@ public Builder setCategoryL2(java.lang.String value) { throw new NullPointerException(); } categoryL2_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3703,7 +3501,7 @@ public Builder setCategoryL2(java.lang.String value) { */ public Builder clearCategoryL2() { categoryL2_ = getDefaultInstance().getCategoryL2(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -3727,7 +3525,7 @@ public Builder setCategoryL2Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL2_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3747,7 +3545,7 @@ public Builder setCategoryL2Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL3 field is set. */ public boolean hasCategoryL3() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -3816,7 +3614,7 @@ public Builder setCategoryL3(java.lang.String value) { throw new NullPointerException(); } categoryL3_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3835,7 +3633,7 @@ public Builder setCategoryL3(java.lang.String value) { */ public Builder clearCategoryL3() { categoryL3_ = getDefaultInstance().getCategoryL3(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -3859,7 +3657,7 @@ public Builder setCategoryL3Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL3_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3879,7 +3677,7 @@ public Builder setCategoryL3Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL4 field is set. */ public boolean hasCategoryL4() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -3948,7 +3746,7 @@ public Builder setCategoryL4(java.lang.String value) { throw new NullPointerException(); } categoryL4_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3967,7 +3765,7 @@ public Builder setCategoryL4(java.lang.String value) { */ public Builder clearCategoryL4() { categoryL4_ = getDefaultInstance().getCategoryL4(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -3991,7 +3789,7 @@ public Builder setCategoryL4Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL4_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -4011,7 +3809,7 @@ public Builder setCategoryL4Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL5 field is set. */ public boolean hasCategoryL5() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -4080,7 +3878,7 @@ public Builder setCategoryL5(java.lang.String value) { throw new NullPointerException(); } categoryL5_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4099,7 +3897,7 @@ public Builder setCategoryL5(java.lang.String value) { */ public Builder clearCategoryL5() { categoryL5_ = getDefaultInstance().getCategoryL5(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -4123,7 +3921,7 @@ public Builder setCategoryL5Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL5_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4135,7 +3933,7 @@ private void ensureVariantGtinsIsMutable() { if (!variantGtins_.isModifiable()) { variantGtins_ = new com.google.protobuf.LazyStringArrayList(variantGtins_); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000800; } /** * @@ -4215,7 +4013,7 @@ public Builder setVariantGtins(int index, java.lang.String value) { } ensureVariantGtinsIsMutable(); variantGtins_.set(index, value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4237,7 +4035,7 @@ public Builder addVariantGtins(java.lang.String value) { } ensureVariantGtinsIsMutable(); variantGtins_.add(value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4256,7 +4054,7 @@ public Builder addVariantGtins(java.lang.String value) { public Builder addAllVariantGtins(java.lang.Iterable values) { ensureVariantGtinsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variantGtins_); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4273,7 +4071,7 @@ public Builder addAllVariantGtins(java.lang.Iterable values) { */ public Builder clearVariantGtins() { variantGtins_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000800); ; onChanged(); return this; @@ -4297,7 +4095,7 @@ public Builder addVariantGtinsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureVariantGtinsIsMutable(); variantGtins_.add(value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4322,7 +4120,7 @@ public Builder addVariantGtinsBytes(com.google.protobuf.ByteString value) { */ @java.lang.Override public boolean hasInventoryStatus() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** * @@ -4365,7 +4163,7 @@ public int getInventoryStatusValue() { */ public Builder setInventoryStatusValue(int value) { inventoryStatus_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4422,7 +4220,7 @@ public Builder setInventoryStatus( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00001000; inventoryStatus_ = value.getNumber(); onChanged(); return this; @@ -4445,7 +4243,7 @@ public Builder setInventoryStatus( * @return This builder for chaining. */ public Builder clearInventoryStatus() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00001000); inventoryStatus_ = 0; onChanged(); return this; @@ -4472,7 +4270,7 @@ public Builder clearInventoryStatus() { */ @java.lang.Override public boolean hasBrandInventoryStatus() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -4517,7 +4315,7 @@ public int getBrandInventoryStatusValue() { */ public Builder setBrandInventoryStatusValue(int value) { brandInventoryStatus_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4576,7 +4374,7 @@ public Builder setBrandInventoryStatus( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00002000; brandInventoryStatus_ = value.getNumber(); onChanged(); return this; @@ -4600,7 +4398,7 @@ public Builder setBrandInventoryStatus( * @return This builder for chaining. */ public Builder clearBrandInventoryStatus() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00002000); brandInventoryStatus_ = 0; onChanged(); return this; @@ -4621,7 +4419,7 @@ public Builder clearBrandInventoryStatus() { */ @java.lang.Override public boolean hasRank() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -4655,7 +4453,7 @@ public long getRank() { public Builder setRank(long value) { rank_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4672,7 +4470,7 @@ public Builder setRank(long value) { * @return This builder for chaining. */ public Builder clearRank() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00004000); rank_ = 0L; onChanged(); return this; @@ -4692,7 +4490,7 @@ public Builder clearRank() { */ @java.lang.Override public boolean hasPreviousRank() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -4724,7 +4522,7 @@ public long getPreviousRank() { public Builder setPreviousRank(long value) { previousRank_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4740,7 +4538,7 @@ public Builder setPreviousRank(long value) { * @return This builder for chaining. */ public Builder clearPreviousRank() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00008000); previousRank_ = 0L; onChanged(); return this; @@ -4755,14 +4553,15 @@ public Builder clearPreviousRank() { * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return Whether the relativeDemand field is set. */ @java.lang.Override public boolean hasRelativeDemand() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -4772,7 +4571,8 @@ public boolean hasRelativeDemand() { * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return The enum numeric value on the wire for relativeDemand. @@ -4789,7 +4589,8 @@ public int getRelativeDemandValue() { * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @param value The enum numeric value on the wire for relativeDemand to set. @@ -4797,7 +4598,7 @@ public int getRelativeDemandValue() { */ public Builder setRelativeDemandValue(int value) { relativeDemand_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4809,17 +4610,21 @@ public Builder setRelativeDemandValue(int value) { * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return The relativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber(relativeDemand_); + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( + relativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + .UNRECOGNIZED : result; } /** @@ -4830,18 +4635,19 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDem * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @param value The relativeDemand to set. * @return This builder for chaining. */ public Builder setRelativeDemand( - com.google.shopping.merchant.reports.v1beta.RelativeDemand value) { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00010000; relativeDemand_ = value.getNumber(); onChanged(); return this; @@ -4854,13 +4660,14 @@ public Builder setRelativeDemand( * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return This builder for chaining. */ public Builder clearRelativeDemand() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00010000); relativeDemand_ = 0; onChanged(); return this; @@ -4877,14 +4684,14 @@ public Builder clearRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return Whether the previousRelativeDemand field is set. */ @java.lang.Override public boolean hasPreviousRelativeDemand() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -4896,7 +4703,7 @@ public boolean hasPreviousRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return The enum numeric value on the wire for previousRelativeDemand. @@ -4915,7 +4722,7 @@ public int getPreviousRelativeDemandValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @param value The enum numeric value on the wire for previousRelativeDemand to set. @@ -4923,7 +4730,7 @@ public int getPreviousRelativeDemandValue() { */ public Builder setPreviousRelativeDemandValue(int value) { previousRelativeDemand_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4937,18 +4744,20 @@ public Builder setPreviousRelativeDemandValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return The previousRelativeDemand. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRelativeDemand() { - com.google.shopping.merchant.reports.v1beta.RelativeDemand result = - com.google.shopping.merchant.reports.v1beta.RelativeDemand.forNumber( + public com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getPreviousRelativeDemand() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum result = + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum.forNumber( previousRelativeDemand_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + .UNRECOGNIZED : result; } /** @@ -4961,18 +4770,18 @@ public com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRel * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @param value The previousRelativeDemand to set. * @return This builder for chaining. */ public Builder setPreviousRelativeDemand( - com.google.shopping.merchant.reports.v1beta.RelativeDemand value) { + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00020000; previousRelativeDemand_ = value.getNumber(); onChanged(); return this; @@ -4987,13 +4796,13 @@ public Builder setPreviousRelativeDemand( * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return This builder for chaining. */ public Builder clearPreviousRelativeDemand() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00020000); previousRelativeDemand_ = 0; onChanged(); return this; @@ -5008,14 +4817,14 @@ public Builder clearPreviousRelativeDemand() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return Whether the relativeDemandChange field is set. */ @java.lang.Override public boolean hasRelativeDemandChange() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -5025,7 +4834,7 @@ public boolean hasRelativeDemandChange() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return The enum numeric value on the wire for relativeDemandChange. @@ -5042,7 +4851,7 @@ public int getRelativeDemandChangeValue() { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @param value The enum numeric value on the wire for relativeDemandChange to set. @@ -5050,7 +4859,7 @@ public int getRelativeDemandChangeValue() { */ public Builder setRelativeDemandChangeValue(int value) { relativeDemandChange_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5062,19 +4871,23 @@ public Builder setRelativeDemandChangeValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return The relativeDemandChange. */ @java.lang.Override public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum getRelativeDemandChange() { - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType result = - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.forNumber( - relativeDemandChange_); + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum + result = + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.forNumber(relativeDemandChange_); return result == null - ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum.UNRECOGNIZED : result; } /** @@ -5085,18 +4898,20 @@ public Builder setRelativeDemandChangeValue(int value) { * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @param value The relativeDemandChange to set. * @return This builder for chaining. */ public Builder setRelativeDemandChange( - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType value) { + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .RelativeDemandChangeTypeEnum + value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00040000; relativeDemandChange_ = value.getNumber(); onChanged(); return this; @@ -5109,13 +4924,13 @@ public Builder setRelativeDemandChange( * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return This builder for chaining. */ public Builder clearRelativeDemandChange() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00040000); relativeDemandChange_ = 0; onChanged(); return this; diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterViewOrBuilder.java index 47e364b3ed7e..04c12bce97a9 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/BestSellersProductClusterViewOrBuilder.java @@ -91,7 +91,7 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return Whether the reportGranularity field is set. @@ -109,7 +109,7 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The enum numeric value on the wire for reportGranularity. @@ -127,12 +127,13 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.ReportGranularity report_granularity = 2; + * optional .google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum report_granularity = 2; * * * @return The reportGranularity. */ - com.google.shopping.merchant.reports.v1beta.ReportGranularity getReportGranularity(); + com.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum + getReportGranularity(); /** * @@ -220,43 +221,6 @@ public interface BestSellersProductClusterViewOrBuilder */ long getReportCategoryId(); - /** - * - * - *
-   * Google-assigned id of the product cluster.
-   * 
- * - * optional string id = 5; - * - * @return Whether the id field is set. - */ - boolean hasId(); - /** - * - * - *
-   * Google-assigned id of the product cluster.
-   * 
- * - * optional string id = 5; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-   * Google-assigned id of the product cluster.
-   * 
- * - * optional string id = 5; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - /** * * @@ -772,7 +736,8 @@ public interface BestSellersProductClusterViewOrBuilder * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return Whether the relativeDemand field is set. @@ -786,7 +751,8 @@ public interface BestSellersProductClusterViewOrBuilder * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return The enum numeric value on the wire for relativeDemand. @@ -800,12 +766,13 @@ public interface BestSellersProductClusterViewOrBuilder * popularity rank in the same category and country. * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand relative_demand = 18; + * + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum relative_demand = 18; * * * @return The relativeDemand. */ - com.google.shopping.merchant.reports.v1beta.RelativeDemand getRelativeDemand(); + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum getRelativeDemand(); /** * @@ -817,7 +784,7 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return Whether the previousRelativeDemand field is set. @@ -833,7 +800,7 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return The enum numeric value on the wire for previousRelativeDemand. @@ -849,12 +816,13 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemand previous_relative_demand = 19; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; * * * @return The previousRelativeDemand. */ - com.google.shopping.merchant.reports.v1beta.RelativeDemand getPreviousRelativeDemand(); + com.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum + getPreviousRelativeDemand(); /** * @@ -864,7 +832,7 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return Whether the relativeDemandChange field is set. @@ -878,7 +846,7 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return The enum numeric value on the wire for relativeDemandChange. @@ -892,10 +860,11 @@ public interface BestSellersProductClusterViewOrBuilder * * * - * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType relative_demand_change = 20; + * optional .google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum relative_demand_change = 20; * * * @return The relativeDemandChange. */ - com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType getRelativeDemandChange(); + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum + getRelativeDemandChange(); } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkView.java index 11751e1b73b2..12ccb75a6a24 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkView.java @@ -257,7 +257,8 @@ public long getReportCategoryId() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return Whether the trafficSource field is set. @@ -275,7 +276,8 @@ public boolean hasTrafficSource() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return The enum numeric value on the wire for trafficSource. @@ -293,17 +295,20 @@ public int getTrafficSourceValue() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return The trafficSource. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource() { - com.google.shopping.merchant.reports.v1beta.TrafficSource result = - com.google.shopping.merchant.reports.v1beta.TrafficSource.forNumber(trafficSource_); + public com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum + getTrafficSource() { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum result = + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.forNumber( + trafficSource_); return result == null - ? com.google.shopping.merchant.reports.v1beta.TrafficSource.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.UNRECOGNIZED : result; } @@ -1362,7 +1367,8 @@ public Builder clearReportCategoryId() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return Whether the trafficSource field is set. @@ -1380,7 +1386,8 @@ public boolean hasTrafficSource() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return The enum numeric value on the wire for trafficSource. @@ -1398,7 +1405,8 @@ public int getTrafficSourceValue() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @param value The enum numeric value on the wire for trafficSource to set. @@ -1419,17 +1427,20 @@ public Builder setTrafficSourceValue(int value) { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return The trafficSource. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource() { - com.google.shopping.merchant.reports.v1beta.TrafficSource result = - com.google.shopping.merchant.reports.v1beta.TrafficSource.forNumber(trafficSource_); + public com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum + getTrafficSource() { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum result = + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.forNumber( + trafficSource_); return result == null - ? com.google.shopping.merchant.reports.v1beta.TrafficSource.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.UNRECOGNIZED : result; } /** @@ -1441,14 +1452,15 @@ public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSourc * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @param value The trafficSource to set. * @return This builder for chaining. */ public Builder setTrafficSource( - com.google.shopping.merchant.reports.v1beta.TrafficSource value) { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum value) { if (value == null) { throw new NullPointerException(); } @@ -1466,7 +1478,8 @@ public Builder setTrafficSource( * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return This builder for chaining. diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkViewOrBuilder.java index ca37c7652329..1a6e7d26933f 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityBenchmarkViewOrBuilder.java @@ -157,7 +157,8 @@ public interface CompetitiveVisibilityBenchmarkViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return Whether the trafficSource field is set. @@ -172,7 +173,8 @@ public interface CompetitiveVisibilityBenchmarkViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return The enum numeric value on the wire for trafficSource. @@ -187,12 +189,13 @@ public interface CompetitiveVisibilityBenchmarkViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 4; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 4; * * * @return The trafficSource. */ - com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource(); + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum getTrafficSource(); /** * diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorView.java index 9826ddaa777e..6bdac813b521 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorView.java @@ -368,7 +368,8 @@ public long getReportCategoryId() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return Whether the trafficSource field is set. @@ -386,7 +387,8 @@ public boolean hasTrafficSource() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The enum numeric value on the wire for trafficSource. @@ -404,17 +406,20 @@ public int getTrafficSourceValue() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The trafficSource. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource() { - com.google.shopping.merchant.reports.v1beta.TrafficSource result = - com.google.shopping.merchant.reports.v1beta.TrafficSource.forNumber(trafficSource_); + public com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum + getTrafficSource() { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum result = + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.forNumber( + trafficSource_); return result == null - ? com.google.shopping.merchant.reports.v1beta.TrafficSource.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.UNRECOGNIZED : result; } @@ -1957,7 +1962,8 @@ public Builder clearReportCategoryId() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return Whether the trafficSource field is set. @@ -1975,7 +1981,8 @@ public boolean hasTrafficSource() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The enum numeric value on the wire for trafficSource. @@ -1993,7 +2000,8 @@ public int getTrafficSourceValue() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @param value The enum numeric value on the wire for trafficSource to set. @@ -2014,17 +2022,20 @@ public Builder setTrafficSourceValue(int value) { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The trafficSource. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource() { - com.google.shopping.merchant.reports.v1beta.TrafficSource result = - com.google.shopping.merchant.reports.v1beta.TrafficSource.forNumber(trafficSource_); + public com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum + getTrafficSource() { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum result = + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.forNumber( + trafficSource_); return result == null - ? com.google.shopping.merchant.reports.v1beta.TrafficSource.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.UNRECOGNIZED : result; } /** @@ -2036,14 +2047,15 @@ public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSourc * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @param value The trafficSource to set. * @return This builder for chaining. */ public Builder setTrafficSource( - com.google.shopping.merchant.reports.v1beta.TrafficSource value) { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum value) { if (value == null) { throw new NullPointerException(); } @@ -2061,7 +2073,8 @@ public Builder setTrafficSource( * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return This builder for chaining. diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorViewOrBuilder.java index bca949145f94..ffc8b2b7e929 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityCompetitorViewOrBuilder.java @@ -229,7 +229,8 @@ public interface CompetitiveVisibilityCompetitorViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return Whether the trafficSource field is set. @@ -244,7 +245,8 @@ public interface CompetitiveVisibilityCompetitorViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The enum numeric value on the wire for trafficSource. @@ -259,12 +261,13 @@ public interface CompetitiveVisibilityCompetitorViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The trafficSource. */ - com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource(); + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum getTrafficSource(); /** * diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantView.java index a10d8022ce51..267950937cbc 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantView.java @@ -373,7 +373,8 @@ public long getReportCategoryId() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return Whether the trafficSource field is set. @@ -391,7 +392,8 @@ public boolean hasTrafficSource() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The enum numeric value on the wire for trafficSource. @@ -409,17 +411,20 @@ public int getTrafficSourceValue() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The trafficSource. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource() { - com.google.shopping.merchant.reports.v1beta.TrafficSource result = - com.google.shopping.merchant.reports.v1beta.TrafficSource.forNumber(trafficSource_); + public com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum + getTrafficSource() { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum result = + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.forNumber( + trafficSource_); return result == null - ? com.google.shopping.merchant.reports.v1beta.TrafficSource.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.UNRECOGNIZED : result; } @@ -1896,7 +1901,8 @@ public Builder clearReportCategoryId() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return Whether the trafficSource field is set. @@ -1914,7 +1920,8 @@ public boolean hasTrafficSource() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The enum numeric value on the wire for trafficSource. @@ -1932,7 +1939,8 @@ public int getTrafficSourceValue() { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @param value The enum numeric value on the wire for trafficSource to set. @@ -1953,17 +1961,20 @@ public Builder setTrafficSourceValue(int value) { * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The trafficSource. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource() { - com.google.shopping.merchant.reports.v1beta.TrafficSource result = - com.google.shopping.merchant.reports.v1beta.TrafficSource.forNumber(trafficSource_); + public com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum + getTrafficSource() { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum result = + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.forNumber( + trafficSource_); return result == null - ? com.google.shopping.merchant.reports.v1beta.TrafficSource.UNRECOGNIZED + ? com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum.UNRECOGNIZED : result; } /** @@ -1975,14 +1986,15 @@ public com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSourc * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @param value The trafficSource to set. * @return This builder for chaining. */ public Builder setTrafficSource( - com.google.shopping.merchant.reports.v1beta.TrafficSource value) { + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum value) { if (value == null) { throw new NullPointerException(); } @@ -2000,7 +2012,8 @@ public Builder setTrafficSource( * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return This builder for chaining. diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantViewOrBuilder.java index 23824683898b..a73eca8a7d5c 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/CompetitiveVisibilityTopMerchantViewOrBuilder.java @@ -232,7 +232,8 @@ public interface CompetitiveVisibilityTopMerchantViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return Whether the trafficSource field is set. @@ -247,7 +248,8 @@ public interface CompetitiveVisibilityTopMerchantViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The enum numeric value on the wire for trafficSource. @@ -262,12 +264,13 @@ public interface CompetitiveVisibilityTopMerchantViewOrBuilder * Required in the `SELECT` clause. * * - * optional .google.shopping.merchant.reports.v1beta.TrafficSource traffic_source = 6; + * + * optional .google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum traffic_source = 6; * * * @return The trafficSource. */ - com.google.shopping.merchant.reports.v1beta.TrafficSource getTrafficSource(); + com.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum getTrafficSource(); /** * diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/MarketingMethod.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/MarketingMethod.java new file mode 100644 index 000000000000..2f686f08fdcc --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/MarketingMethod.java @@ -0,0 +1,597 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/merchant/reports/v1beta/reports.proto + +package com.google.shopping.merchant.reports.v1beta; + +/** + * + * + *
+ * Marketing method used to promote your products on Google (organic versus
+ * ads).
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reports.v1beta.MarketingMethod} + */ +public final class MarketingMethod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.MarketingMethod) + MarketingMethodOrBuilder { + private static final long serialVersionUID = 0L; + // Use MarketingMethod.newBuilder() to construct. + private MarketingMethod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MarketingMethod() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MarketingMethod(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.MarketingMethod.class, + com.google.shopping.merchant.reports.v1beta.MarketingMethod.Builder.class); + } + + /** + * + * + *
+   * Marketing method values.
+   * 
+ * + * Protobuf enum {@code + * google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum} + */ + public enum MarketingMethodEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * MARKETING_METHOD_ENUM_UNSPECIFIED = 0; + */ + MARKETING_METHOD_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * Organic marketing.
+     * 
+ * + * ORGANIC = 1; + */ + ORGANIC(1), + /** + * + * + *
+     * Ads-based marketing.
+     * 
+ * + * ADS = 2; + */ + ADS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * MARKETING_METHOD_ENUM_UNSPECIFIED = 0; + */ + public static final int MARKETING_METHOD_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Organic marketing.
+     * 
+ * + * ORGANIC = 1; + */ + public static final int ORGANIC_VALUE = 1; + /** + * + * + *
+     * Ads-based marketing.
+     * 
+ * + * ADS = 2; + */ + public static final int ADS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MarketingMethodEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MarketingMethodEnum forNumber(int value) { + switch (value) { + case 0: + return MARKETING_METHOD_ENUM_UNSPECIFIED; + case 1: + return ORGANIC; + case 2: + return ADS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MarketingMethodEnum findValueByNumber(int number) { + return MarketingMethodEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.MarketingMethod.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MarketingMethodEnum[] VALUES = values(); + + public static MarketingMethodEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MarketingMethodEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reports.v1beta.MarketingMethod)) { + return super.equals(obj); + } + com.google.shopping.merchant.reports.v1beta.MarketingMethod other = + (com.google.shopping.merchant.reports.v1beta.MarketingMethod) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reports.v1beta.MarketingMethod prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Marketing method used to promote your products on Google (organic versus
+   * ads).
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reports.v1beta.MarketingMethod} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.MarketingMethod) + com.google.shopping.merchant.reports.v1beta.MarketingMethodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.MarketingMethod.class, + com.google.shopping.merchant.reports.v1beta.MarketingMethod.Builder.class); + } + + // Construct using com.google.shopping.merchant.reports.v1beta.MarketingMethod.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.MarketingMethod getDefaultInstanceForType() { + return com.google.shopping.merchant.reports.v1beta.MarketingMethod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.MarketingMethod build() { + com.google.shopping.merchant.reports.v1beta.MarketingMethod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.MarketingMethod buildPartial() { + com.google.shopping.merchant.reports.v1beta.MarketingMethod result = + new com.google.shopping.merchant.reports.v1beta.MarketingMethod(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reports.v1beta.MarketingMethod) { + return mergeFrom((com.google.shopping.merchant.reports.v1beta.MarketingMethod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.MarketingMethod other) { + if (other == com.google.shopping.merchant.reports.v1beta.MarketingMethod.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.MarketingMethod) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.MarketingMethod) + private static final com.google.shopping.merchant.reports.v1beta.MarketingMethod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reports.v1beta.MarketingMethod(); + } + + public static com.google.shopping.merchant.reports.v1beta.MarketingMethod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MarketingMethod parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.MarketingMethod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/MarketingMethodOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/MarketingMethodOrBuilder.java new file mode 100644 index 000000000000..a67a9f217f76 --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/MarketingMethodOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/merchant/reports/v1beta/reports.proto + +package com.google.shopping.merchant.reports.v1beta; + +public interface MarketingMethodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.MarketingMethod) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/NonProductPerformanceView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/NonProductPerformanceView.java deleted file mode 100644 index 8b2118073c5c..000000000000 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/NonProductPerformanceView.java +++ /dev/null @@ -1,1429 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/shopping/merchant/reports/v1beta/reports.proto - -package com.google.shopping.merchant.reports.v1beta; - -/** - * - * - *
- * Fields available for query in `non_product_performance_view` table.
- *
- * Performance data on images and website links leading to your non-product
- * website pages. This includes performance metrics (for example, `clicks`)
- * and dimensions according to which performance metrics are segmented (for
- * example, `date`).
- *
- * Segment fields cannot be selected in queries without also selecting at least
- * one metric field.
- *
- * Values are only set for fields requested explicitly in the request's search
- * query.
- * 
- * - * Protobuf type {@code google.shopping.merchant.reports.v1beta.NonProductPerformanceView} - */ -public final class NonProductPerformanceView extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.NonProductPerformanceView) - NonProductPerformanceViewOrBuilder { - private static final long serialVersionUID = 0L; - // Use NonProductPerformanceView.newBuilder() to construct. - private NonProductPerformanceView(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NonProductPerformanceView() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NonProductPerformanceView(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.class, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.Builder.class); - } - - private int bitField0_; - public static final int DATE_FIELD_NUMBER = 1; - private com.google.type.Date date_; - /** - * - * - *
-   * Date in the merchant timezone to which metrics apply. Segment.
-   *
-   * Condition on `date` is required in the `WHERE` clause.
-   * 
- * - * .google.type.Date date = 1; - * - * @return Whether the date field is set. - */ - @java.lang.Override - public boolean hasDate() { - return date_ != null; - } - /** - * - * - *
-   * Date in the merchant timezone to which metrics apply. Segment.
-   *
-   * Condition on `date` is required in the `WHERE` clause.
-   * 
- * - * .google.type.Date date = 1; - * - * @return The date. - */ - @java.lang.Override - public com.google.type.Date getDate() { - return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; - } - /** - * - * - *
-   * Date in the merchant timezone to which metrics apply. Segment.
-   *
-   * Condition on `date` is required in the `WHERE` clause.
-   * 
- * - * .google.type.Date date = 1; - */ - @java.lang.Override - public com.google.type.DateOrBuilder getDateOrBuilder() { - return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; - } - - public static final int WEEK_FIELD_NUMBER = 2; - private com.google.type.Date week_; - /** - * - * - *
-   * First day of the week (Monday) of the metrics date in the merchant
-   * timezone. Segment.
-   * 
- * - * .google.type.Date week = 2; - * - * @return Whether the week field is set. - */ - @java.lang.Override - public boolean hasWeek() { - return week_ != null; - } - /** - * - * - *
-   * First day of the week (Monday) of the metrics date in the merchant
-   * timezone. Segment.
-   * 
- * - * .google.type.Date week = 2; - * - * @return The week. - */ - @java.lang.Override - public com.google.type.Date getWeek() { - return week_ == null ? com.google.type.Date.getDefaultInstance() : week_; - } - /** - * - * - *
-   * First day of the week (Monday) of the metrics date in the merchant
-   * timezone. Segment.
-   * 
- * - * .google.type.Date week = 2; - */ - @java.lang.Override - public com.google.type.DateOrBuilder getWeekOrBuilder() { - return week_ == null ? com.google.type.Date.getDefaultInstance() : week_; - } - - public static final int CLICKS_FIELD_NUMBER = 3; - private long clicks_ = 0L; - /** - * - * - *
-   * Number of clicks on images and website links leading to your non-product
-   * website pages. Metric.
-   * 
- * - * optional int64 clicks = 3; - * - * @return Whether the clicks field is set. - */ - @java.lang.Override - public boolean hasClicks() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Number of clicks on images and website links leading to your non-product
-   * website pages. Metric.
-   * 
- * - * optional int64 clicks = 3; - * - * @return The clicks. - */ - @java.lang.Override - public long getClicks() { - return clicks_; - } - - public static final int IMPRESSIONS_FIELD_NUMBER = 4; - private long impressions_ = 0L; - /** - * - * - *
-   * Number of times images and website links leading to your non-product
-   * website pages were shown. Metric.
-   * 
- * - * optional int64 impressions = 4; - * - * @return Whether the impressions field is set. - */ - @java.lang.Override - public boolean hasImpressions() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Number of times images and website links leading to your non-product
-   * website pages were shown. Metric.
-   * 
- * - * optional int64 impressions = 4; - * - * @return The impressions. - */ - @java.lang.Override - public long getImpressions() { - return impressions_; - } - - public static final int CLICK_THROUGH_RATE_FIELD_NUMBER = 5; - private double clickThroughRate_ = 0D; - /** - * - * - *
-   * Click-through rate - the number of clicks (`clicks`) divided by the number
-   * of impressions (`impressions`) of images and website links leading to your
-   * non-product website pages. Metric.
-   * 
- * - * optional double click_through_rate = 5; - * - * @return Whether the clickThroughRate field is set. - */ - @java.lang.Override - public boolean hasClickThroughRate() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-   * Click-through rate - the number of clicks (`clicks`) divided by the number
-   * of impressions (`impressions`) of images and website links leading to your
-   * non-product website pages. Metric.
-   * 
- * - * optional double click_through_rate = 5; - * - * @return The clickThroughRate. - */ - @java.lang.Override - public double getClickThroughRate() { - return clickThroughRate_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (date_ != null) { - output.writeMessage(1, getDate()); - } - if (week_ != null) { - output.writeMessage(2, getWeek()); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt64(3, clicks_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt64(4, impressions_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeDouble(5, clickThroughRate_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (date_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); - } - if (week_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWeek()); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, clicks_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, impressions_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, clickThroughRate_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView)) { - return super.equals(obj); - } - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView other = - (com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView) obj; - - if (hasDate() != other.hasDate()) return false; - if (hasDate()) { - if (!getDate().equals(other.getDate())) return false; - } - if (hasWeek() != other.hasWeek()) return false; - if (hasWeek()) { - if (!getWeek().equals(other.getWeek())) return false; - } - if (hasClicks() != other.hasClicks()) return false; - if (hasClicks()) { - if (getClicks() != other.getClicks()) return false; - } - if (hasImpressions() != other.hasImpressions()) return false; - if (hasImpressions()) { - if (getImpressions() != other.getImpressions()) return false; - } - if (hasClickThroughRate() != other.hasClickThroughRate()) return false; - if (hasClickThroughRate()) { - if (java.lang.Double.doubleToLongBits(getClickThroughRate()) - != java.lang.Double.doubleToLongBits(other.getClickThroughRate())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDate()) { - hash = (37 * hash) + DATE_FIELD_NUMBER; - hash = (53 * hash) + getDate().hashCode(); - } - if (hasWeek()) { - hash = (37 * hash) + WEEK_FIELD_NUMBER; - hash = (53 * hash) + getWeek().hashCode(); - } - if (hasClicks()) { - hash = (37 * hash) + CLICKS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getClicks()); - } - if (hasImpressions()) { - hash = (37 * hash) + IMPRESSIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getImpressions()); - } - if (hasClickThroughRate()) { - hash = (37 * hash) + CLICK_THROUGH_RATE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getClickThroughRate())); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Fields available for query in `non_product_performance_view` table.
-   *
-   * Performance data on images and website links leading to your non-product
-   * website pages. This includes performance metrics (for example, `clicks`)
-   * and dimensions according to which performance metrics are segmented (for
-   * example, `date`).
-   *
-   * Segment fields cannot be selected in queries without also selecting at least
-   * one metric field.
-   *
-   * Values are only set for fields requested explicitly in the request's search
-   * query.
-   * 
- * - * Protobuf type {@code google.shopping.merchant.reports.v1beta.NonProductPerformanceView} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.NonProductPerformanceView) - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceViewOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.class, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.Builder.class); - } - - // Construct using - // com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - date_ = null; - if (dateBuilder_ != null) { - dateBuilder_.dispose(); - dateBuilder_ = null; - } - week_ = null; - if (weekBuilder_ != null) { - weekBuilder_.dispose(); - weekBuilder_ = null; - } - clicks_ = 0L; - impressions_ = 0L; - clickThroughRate_ = 0D; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_descriptor; - } - - @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - getDefaultInstanceForType() { - return com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView build() { - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView buildPartial() { - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView result = - new com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.week_ = weekBuilder_ == null ? week_ : weekBuilder_.build(); - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.clicks_ = clicks_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.impressions_ = impressions_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.clickThroughRate_ = clickThroughRate_; - to_bitField0_ |= 0x00000004; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView) { - return mergeFrom( - (com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView other) { - if (other - == com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - .getDefaultInstance()) return this; - if (other.hasDate()) { - mergeDate(other.getDate()); - } - if (other.hasWeek()) { - mergeWeek(other.getWeek()); - } - if (other.hasClicks()) { - setClicks(other.getClicks()); - } - if (other.hasImpressions()) { - setImpressions(other.getImpressions()); - } - if (other.hasClickThroughRate()) { - setClickThroughRate(other.getClickThroughRate()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getDateFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getWeekFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - clicks_ = input.readInt64(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: - { - impressions_ = input.readInt64(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 41: - { - clickThroughRate_ = input.readDouble(); - bitField0_ |= 0x00000010; - break; - } // case 41 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.type.Date date_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - dateBuilder_; - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - * - * @return Whether the date field is set. - */ - public boolean hasDate() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - * - * @return The date. - */ - public com.google.type.Date getDate() { - if (dateBuilder_ == null) { - return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; - } else { - return dateBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder setDate(com.google.type.Date value) { - if (dateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - date_ = value; - } else { - dateBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder setDate(com.google.type.Date.Builder builderForValue) { - if (dateBuilder_ == null) { - date_ = builderForValue.build(); - } else { - dateBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder mergeDate(com.google.type.Date value) { - if (dateBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && date_ != null - && date_ != com.google.type.Date.getDefaultInstance()) { - getDateBuilder().mergeFrom(value); - } else { - date_ = value; - } - } else { - dateBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder clearDate() { - bitField0_ = (bitField0_ & ~0x00000001); - date_ = null; - if (dateBuilder_ != null) { - dateBuilder_.dispose(); - dateBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - */ - public com.google.type.Date.Builder getDateBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getDateFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - */ - public com.google.type.DateOrBuilder getDateOrBuilder() { - if (dateBuilder_ != null) { - return dateBuilder_.getMessageOrBuilder(); - } else { - return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; - } - } - /** - * - * - *
-     * Date in the merchant timezone to which metrics apply. Segment.
-     *
-     * Condition on `date` is required in the `WHERE` clause.
-     * 
- * - * .google.type.Date date = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - getDateFieldBuilder() { - if (dateBuilder_ == null) { - dateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( - getDate(), getParentForChildren(), isClean()); - date_ = null; - } - return dateBuilder_; - } - - private com.google.type.Date week_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - weekBuilder_; - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - * - * @return Whether the week field is set. - */ - public boolean hasWeek() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - * - * @return The week. - */ - public com.google.type.Date getWeek() { - if (weekBuilder_ == null) { - return week_ == null ? com.google.type.Date.getDefaultInstance() : week_; - } else { - return weekBuilder_.getMessage(); - } - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - */ - public Builder setWeek(com.google.type.Date value) { - if (weekBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - week_ = value; - } else { - weekBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - */ - public Builder setWeek(com.google.type.Date.Builder builderForValue) { - if (weekBuilder_ == null) { - week_ = builderForValue.build(); - } else { - weekBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - */ - public Builder mergeWeek(com.google.type.Date value) { - if (weekBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && week_ != null - && week_ != com.google.type.Date.getDefaultInstance()) { - getWeekBuilder().mergeFrom(value); - } else { - week_ = value; - } - } else { - weekBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - */ - public Builder clearWeek() { - bitField0_ = (bitField0_ & ~0x00000002); - week_ = null; - if (weekBuilder_ != null) { - weekBuilder_.dispose(); - weekBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - */ - public com.google.type.Date.Builder getWeekBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getWeekFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - */ - public com.google.type.DateOrBuilder getWeekOrBuilder() { - if (weekBuilder_ != null) { - return weekBuilder_.getMessageOrBuilder(); - } else { - return week_ == null ? com.google.type.Date.getDefaultInstance() : week_; - } - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - getWeekFieldBuilder() { - if (weekBuilder_ == null) { - weekBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( - getWeek(), getParentForChildren(), isClean()); - week_ = null; - } - return weekBuilder_; - } - - private long clicks_; - /** - * - * - *
-     * Number of clicks on images and website links leading to your non-product
-     * website pages. Metric.
-     * 
- * - * optional int64 clicks = 3; - * - * @return Whether the clicks field is set. - */ - @java.lang.Override - public boolean hasClicks() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-     * Number of clicks on images and website links leading to your non-product
-     * website pages. Metric.
-     * 
- * - * optional int64 clicks = 3; - * - * @return The clicks. - */ - @java.lang.Override - public long getClicks() { - return clicks_; - } - /** - * - * - *
-     * Number of clicks on images and website links leading to your non-product
-     * website pages. Metric.
-     * 
- * - * optional int64 clicks = 3; - * - * @param value The clicks to set. - * @return This builder for chaining. - */ - public Builder setClicks(long value) { - - clicks_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Number of clicks on images and website links leading to your non-product
-     * website pages. Metric.
-     * 
- * - * optional int64 clicks = 3; - * - * @return This builder for chaining. - */ - public Builder clearClicks() { - bitField0_ = (bitField0_ & ~0x00000004); - clicks_ = 0L; - onChanged(); - return this; - } - - private long impressions_; - /** - * - * - *
-     * Number of times images and website links leading to your non-product
-     * website pages were shown. Metric.
-     * 
- * - * optional int64 impressions = 4; - * - * @return Whether the impressions field is set. - */ - @java.lang.Override - public boolean hasImpressions() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Number of times images and website links leading to your non-product
-     * website pages were shown. Metric.
-     * 
- * - * optional int64 impressions = 4; - * - * @return The impressions. - */ - @java.lang.Override - public long getImpressions() { - return impressions_; - } - /** - * - * - *
-     * Number of times images and website links leading to your non-product
-     * website pages were shown. Metric.
-     * 
- * - * optional int64 impressions = 4; - * - * @param value The impressions to set. - * @return This builder for chaining. - */ - public Builder setImpressions(long value) { - - impressions_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Number of times images and website links leading to your non-product
-     * website pages were shown. Metric.
-     * 
- * - * optional int64 impressions = 4; - * - * @return This builder for chaining. - */ - public Builder clearImpressions() { - bitField0_ = (bitField0_ & ~0x00000008); - impressions_ = 0L; - onChanged(); - return this; - } - - private double clickThroughRate_; - /** - * - * - *
-     * Click-through rate - the number of clicks (`clicks`) divided by the number
-     * of impressions (`impressions`) of images and website links leading to your
-     * non-product website pages. Metric.
-     * 
- * - * optional double click_through_rate = 5; - * - * @return Whether the clickThroughRate field is set. - */ - @java.lang.Override - public boolean hasClickThroughRate() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Click-through rate - the number of clicks (`clicks`) divided by the number
-     * of impressions (`impressions`) of images and website links leading to your
-     * non-product website pages. Metric.
-     * 
- * - * optional double click_through_rate = 5; - * - * @return The clickThroughRate. - */ - @java.lang.Override - public double getClickThroughRate() { - return clickThroughRate_; - } - /** - * - * - *
-     * Click-through rate - the number of clicks (`clicks`) divided by the number
-     * of impressions (`impressions`) of images and website links leading to your
-     * non-product website pages. Metric.
-     * 
- * - * optional double click_through_rate = 5; - * - * @param value The clickThroughRate to set. - * @return This builder for chaining. - */ - public Builder setClickThroughRate(double value) { - - clickThroughRate_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Click-through rate - the number of clicks (`clicks`) divided by the number
-     * of impressions (`impressions`) of images and website links leading to your
-     * non-product website pages. Metric.
-     * 
- * - * optional double click_through_rate = 5; - * - * @return This builder for chaining. - */ - public Builder clearClickThroughRate() { - bitField0_ = (bitField0_ & ~0x00000010); - clickThroughRate_ = 0D; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.NonProductPerformanceView) - } - - // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.NonProductPerformanceView) - private static final com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView(); - } - - public static com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NonProductPerformanceView parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/NonProductPerformanceViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/NonProductPerformanceViewOrBuilder.java deleted file mode 100644 index fc4ef13891d4..000000000000 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/NonProductPerformanceViewOrBuilder.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/shopping/merchant/reports/v1beta/reports.proto - -package com.google.shopping.merchant.reports.v1beta; - -public interface NonProductPerformanceViewOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.NonProductPerformanceView) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Date in the merchant timezone to which metrics apply. Segment.
-   *
-   * Condition on `date` is required in the `WHERE` clause.
-   * 
- * - * .google.type.Date date = 1; - * - * @return Whether the date field is set. - */ - boolean hasDate(); - /** - * - * - *
-   * Date in the merchant timezone to which metrics apply. Segment.
-   *
-   * Condition on `date` is required in the `WHERE` clause.
-   * 
- * - * .google.type.Date date = 1; - * - * @return The date. - */ - com.google.type.Date getDate(); - /** - * - * - *
-   * Date in the merchant timezone to which metrics apply. Segment.
-   *
-   * Condition on `date` is required in the `WHERE` clause.
-   * 
- * - * .google.type.Date date = 1; - */ - com.google.type.DateOrBuilder getDateOrBuilder(); - - /** - * - * - *
-   * First day of the week (Monday) of the metrics date in the merchant
-   * timezone. Segment.
-   * 
- * - * .google.type.Date week = 2; - * - * @return Whether the week field is set. - */ - boolean hasWeek(); - /** - * - * - *
-   * First day of the week (Monday) of the metrics date in the merchant
-   * timezone. Segment.
-   * 
- * - * .google.type.Date week = 2; - * - * @return The week. - */ - com.google.type.Date getWeek(); - /** - * - * - *
-   * First day of the week (Monday) of the metrics date in the merchant
-   * timezone. Segment.
-   * 
- * - * .google.type.Date week = 2; - */ - com.google.type.DateOrBuilder getWeekOrBuilder(); - - /** - * - * - *
-   * Number of clicks on images and website links leading to your non-product
-   * website pages. Metric.
-   * 
- * - * optional int64 clicks = 3; - * - * @return Whether the clicks field is set. - */ - boolean hasClicks(); - /** - * - * - *
-   * Number of clicks on images and website links leading to your non-product
-   * website pages. Metric.
-   * 
- * - * optional int64 clicks = 3; - * - * @return The clicks. - */ - long getClicks(); - - /** - * - * - *
-   * Number of times images and website links leading to your non-product
-   * website pages were shown. Metric.
-   * 
- * - * optional int64 impressions = 4; - * - * @return Whether the impressions field is set. - */ - boolean hasImpressions(); - /** - * - * - *
-   * Number of times images and website links leading to your non-product
-   * website pages were shown. Metric.
-   * 
- * - * optional int64 impressions = 4; - * - * @return The impressions. - */ - long getImpressions(); - - /** - * - * - *
-   * Click-through rate - the number of clicks (`clicks`) divided by the number
-   * of impressions (`impressions`) of images and website links leading to your
-   * non-product website pages. Metric.
-   * 
- * - * optional double click_through_rate = 5; - * - * @return Whether the clickThroughRate field is set. - */ - boolean hasClickThroughRate(); - /** - * - * - *
-   * Click-through rate - the number of clicks (`clicks`) divided by the number
-   * of impressions (`impressions`) of images and website links leading to your
-   * non-product website pages. Metric.
-   * 
- * - * optional double click_through_rate = 5; - * - * @return The clickThroughRate. - */ - double getClickThroughRate(); -} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductView.java index ff32cec92b7a..6b03875f18ea 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductView.java @@ -165,8 +165,9 @@ public com.google.protobuf.ByteString getReportCountryCodeBytes() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -183,8 +184,9 @@ public boolean hasId() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -209,8 +211,9 @@ public java.lang.String getId() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -2214,8 +2217,9 @@ public Builder setReportCountryCodeBytes(com.google.protobuf.ByteString value) { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2231,8 +2235,9 @@ public boolean hasId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2256,8 +2261,9 @@ public java.lang.String getId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2281,8 +2287,9 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2305,8 +2312,9 @@ public Builder setId(java.lang.String value) { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2325,8 +2333,9 @@ public Builder clearId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductViewOrBuilder.java index 10b423161d59..a88460ed7654 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceCompetitivenessProductViewOrBuilder.java @@ -70,8 +70,9 @@ public interface PriceCompetitivenessProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -85,8 +86,9 @@ public interface PriceCompetitivenessProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -100,8 +102,9 @@ public interface PriceCompetitivenessProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductView.java index 4b69f5fd323a..d2ca54a81f7d 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductView.java @@ -90,8 +90,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -108,8 +109,9 @@ public boolean hasId() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -134,8 +136,9 @@ public java.lang.String getId() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -1252,96 +1255,6 @@ public double getPredictedConversionsChangeFraction() { return predictedConversionsChangeFraction_; } - public static final int PREDICTED_GROSS_PROFIT_CHANGE_FRACTION_FIELD_NUMBER = 20; - private double predictedGrossProfitChangeFraction_ = 0D; - /** - * - * - *
-   * Predicted change in gross profit as a fraction after introducing the
-   * suggested price compared to current active price. For example, 0.05 is a 5%
-   * predicted increase in gross profit.
-   * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @return Whether the predictedGrossProfitChangeFraction field is set. - */ - @java.lang.Override - public boolean hasPredictedGrossProfitChangeFraction() { - return ((bitField0_ & 0x00020000) != 0); - } - /** - * - * - *
-   * Predicted change in gross profit as a fraction after introducing the
-   * suggested price compared to current active price. For example, 0.05 is a 5%
-   * predicted increase in gross profit.
-   * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @return The predictedGrossProfitChangeFraction. - */ - @java.lang.Override - public double getPredictedGrossProfitChangeFraction() { - return predictedGrossProfitChangeFraction_; - } - - public static final int PREDICTED_MONTHLY_GROSS_PROFIT_CHANGE_FIELD_NUMBER = 21; - private com.google.shopping.type.Price predictedMonthlyGrossProfitChange_; - /** - * - * - *
-   * Predicted change in gross profit after introducing the suggested price
-   * for a month compared to current active price.
-   * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - * - * @return Whether the predictedMonthlyGrossProfitChange field is set. - */ - @java.lang.Override - public boolean hasPredictedMonthlyGrossProfitChange() { - return predictedMonthlyGrossProfitChange_ != null; - } - /** - * - * - *
-   * Predicted change in gross profit after introducing the suggested price
-   * for a month compared to current active price.
-   * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - * - * @return The predictedMonthlyGrossProfitChange. - */ - @java.lang.Override - public com.google.shopping.type.Price getPredictedMonthlyGrossProfitChange() { - return predictedMonthlyGrossProfitChange_ == null - ? com.google.shopping.type.Price.getDefaultInstance() - : predictedMonthlyGrossProfitChange_; - } - /** - * - * - *
-   * Predicted change in gross profit after introducing the suggested price
-   * for a month compared to current active price.
-   * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - @java.lang.Override - public com.google.shopping.type.PriceOrBuilder getPredictedMonthlyGrossProfitChangeOrBuilder() { - return predictedMonthlyGrossProfitChange_ == null - ? com.google.shopping.type.Price.getDefaultInstance() - : predictedMonthlyGrossProfitChange_; - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1413,12 +1326,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00010000) != 0)) { output.writeDouble(19, predictedConversionsChangeFraction_); } - if (((bitField0_ & 0x00020000) != 0)) { - output.writeDouble(20, predictedGrossProfitChangeFraction_); - } - if (predictedMonthlyGrossProfitChange_ != null) { - output.writeMessage(21, getPredictedMonthlyGrossProfitChange()); - } getUnknownFields().writeTo(output); } @@ -1491,16 +1398,6 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeDoubleSize( 19, predictedConversionsChangeFraction_); } - if (((bitField0_ & 0x00020000) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeDoubleSize( - 20, predictedGrossProfitChangeFraction_); - } - if (predictedMonthlyGrossProfitChange_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 21, getPredictedMonthlyGrossProfitChange()); - } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1602,19 +1499,6 @@ public boolean equals(final java.lang.Object obj) { != java.lang.Double.doubleToLongBits(other.getPredictedConversionsChangeFraction())) return false; } - if (hasPredictedGrossProfitChangeFraction() != other.hasPredictedGrossProfitChangeFraction()) - return false; - if (hasPredictedGrossProfitChangeFraction()) { - if (java.lang.Double.doubleToLongBits(getPredictedGrossProfitChangeFraction()) - != java.lang.Double.doubleToLongBits(other.getPredictedGrossProfitChangeFraction())) - return false; - } - if (hasPredictedMonthlyGrossProfitChange() != other.hasPredictedMonthlyGrossProfitChange()) - return false; - if (hasPredictedMonthlyGrossProfitChange()) { - if (!getPredictedMonthlyGrossProfitChange() - .equals(other.getPredictedMonthlyGrossProfitChange())) return false; - } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1711,17 +1595,6 @@ public int hashCode() { + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getPredictedConversionsChangeFraction())); } - if (hasPredictedGrossProfitChangeFraction()) { - hash = (37 * hash) + PREDICTED_GROSS_PROFIT_CHANGE_FRACTION_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getPredictedGrossProfitChangeFraction())); - } - if (hasPredictedMonthlyGrossProfitChange()) { - hash = (37 * hash) + PREDICTED_MONTHLY_GROSS_PROFIT_CHANGE_FIELD_NUMBER; - hash = (53 * hash) + getPredictedMonthlyGrossProfitChange().hashCode(); - } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1897,12 +1770,6 @@ public Builder clear() { predictedImpressionsChangeFraction_ = 0D; predictedClicksChangeFraction_ = 0D; predictedConversionsChangeFraction_ = 0D; - predictedGrossProfitChangeFraction_ = 0D; - predictedMonthlyGrossProfitChange_ = null; - if (predictedMonthlyGrossProfitChangeBuilder_ != null) { - predictedMonthlyGrossProfitChangeBuilder_.dispose(); - predictedMonthlyGrossProfitChangeBuilder_ = null; - } return this; } @@ -2018,16 +1885,6 @@ private void buildPartial0( result.predictedConversionsChangeFraction_ = predictedConversionsChangeFraction_; to_bitField0_ |= 0x00010000; } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.predictedGrossProfitChangeFraction_ = predictedGrossProfitChangeFraction_; - to_bitField0_ |= 0x00020000; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - result.predictedMonthlyGrossProfitChange_ = - predictedMonthlyGrossProfitChangeBuilder_ == null - ? predictedMonthlyGrossProfitChange_ - : predictedMonthlyGrossProfitChangeBuilder_.build(); - } result.bitField0_ |= to_bitField0_; } @@ -2165,12 +2022,6 @@ public Builder mergeFrom( if (other.hasPredictedConversionsChangeFraction()) { setPredictedConversionsChangeFraction(other.getPredictedConversionsChangeFraction()); } - if (other.hasPredictedGrossProfitChangeFraction()) { - setPredictedGrossProfitChangeFraction(other.getPredictedGrossProfitChangeFraction()); - } - if (other.hasPredictedMonthlyGrossProfitChange()) { - mergePredictedMonthlyGrossProfitChange(other.getPredictedMonthlyGrossProfitChange()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2311,20 +2162,6 @@ public Builder mergeFrom( bitField0_ |= 0x00040000; break; } // case 153 - case 161: - { - predictedGrossProfitChangeFraction_ = input.readDouble(); - bitField0_ |= 0x00080000; - break; - } // case 161 - case 170: - { - input.readMessage( - getPredictedMonthlyGrossProfitChangeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00100000; - break; - } // case 170 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2349,8 +2186,9 @@ public Builder mergeFrom( * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2366,8 +2204,9 @@ public boolean hasId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2391,8 +2230,9 @@ public java.lang.String getId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2416,8 +2256,9 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2440,8 +2281,9 @@ public Builder setId(java.lang.String value) { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -2460,8 +2302,9 @@ public Builder clearId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-     * be used to join data with the `product_view` table.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+     * `product_view` table.
      *
      * Required in the `SELECT` clause.
      * 
@@ -4692,276 +4535,6 @@ public Builder clearPredictedConversionsChangeFraction() { return this; } - private double predictedGrossProfitChangeFraction_; - /** - * - * - *
-     * Predicted change in gross profit as a fraction after introducing the
-     * suggested price compared to current active price. For example, 0.05 is a 5%
-     * predicted increase in gross profit.
-     * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @return Whether the predictedGrossProfitChangeFraction field is set. - */ - @java.lang.Override - public boolean hasPredictedGrossProfitChangeFraction() { - return ((bitField0_ & 0x00080000) != 0); - } - /** - * - * - *
-     * Predicted change in gross profit as a fraction after introducing the
-     * suggested price compared to current active price. For example, 0.05 is a 5%
-     * predicted increase in gross profit.
-     * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @return The predictedGrossProfitChangeFraction. - */ - @java.lang.Override - public double getPredictedGrossProfitChangeFraction() { - return predictedGrossProfitChangeFraction_; - } - /** - * - * - *
-     * Predicted change in gross profit as a fraction after introducing the
-     * suggested price compared to current active price. For example, 0.05 is a 5%
-     * predicted increase in gross profit.
-     * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @param value The predictedGrossProfitChangeFraction to set. - * @return This builder for chaining. - */ - public Builder setPredictedGrossProfitChangeFraction(double value) { - - predictedGrossProfitChangeFraction_ = value; - bitField0_ |= 0x00080000; - onChanged(); - return this; - } - /** - * - * - *
-     * Predicted change in gross profit as a fraction after introducing the
-     * suggested price compared to current active price. For example, 0.05 is a 5%
-     * predicted increase in gross profit.
-     * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @return This builder for chaining. - */ - public Builder clearPredictedGrossProfitChangeFraction() { - bitField0_ = (bitField0_ & ~0x00080000); - predictedGrossProfitChangeFraction_ = 0D; - onChanged(); - return this; - } - - private com.google.shopping.type.Price predictedMonthlyGrossProfitChange_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.shopping.type.Price, - com.google.shopping.type.Price.Builder, - com.google.shopping.type.PriceOrBuilder> - predictedMonthlyGrossProfitChangeBuilder_; - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - * - * @return Whether the predictedMonthlyGrossProfitChange field is set. - */ - public boolean hasPredictedMonthlyGrossProfitChange() { - return ((bitField0_ & 0x00100000) != 0); - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - * - * @return The predictedMonthlyGrossProfitChange. - */ - public com.google.shopping.type.Price getPredictedMonthlyGrossProfitChange() { - if (predictedMonthlyGrossProfitChangeBuilder_ == null) { - return predictedMonthlyGrossProfitChange_ == null - ? com.google.shopping.type.Price.getDefaultInstance() - : predictedMonthlyGrossProfitChange_; - } else { - return predictedMonthlyGrossProfitChangeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - public Builder setPredictedMonthlyGrossProfitChange(com.google.shopping.type.Price value) { - if (predictedMonthlyGrossProfitChangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predictedMonthlyGrossProfitChange_ = value; - } else { - predictedMonthlyGrossProfitChangeBuilder_.setMessage(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - public Builder setPredictedMonthlyGrossProfitChange( - com.google.shopping.type.Price.Builder builderForValue) { - if (predictedMonthlyGrossProfitChangeBuilder_ == null) { - predictedMonthlyGrossProfitChange_ = builderForValue.build(); - } else { - predictedMonthlyGrossProfitChangeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - public Builder mergePredictedMonthlyGrossProfitChange(com.google.shopping.type.Price value) { - if (predictedMonthlyGrossProfitChangeBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0) - && predictedMonthlyGrossProfitChange_ != null - && predictedMonthlyGrossProfitChange_ - != com.google.shopping.type.Price.getDefaultInstance()) { - getPredictedMonthlyGrossProfitChangeBuilder().mergeFrom(value); - } else { - predictedMonthlyGrossProfitChange_ = value; - } - } else { - predictedMonthlyGrossProfitChangeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00100000; - onChanged(); - return this; - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - public Builder clearPredictedMonthlyGrossProfitChange() { - bitField0_ = (bitField0_ & ~0x00100000); - predictedMonthlyGrossProfitChange_ = null; - if (predictedMonthlyGrossProfitChangeBuilder_ != null) { - predictedMonthlyGrossProfitChangeBuilder_.dispose(); - predictedMonthlyGrossProfitChangeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - public com.google.shopping.type.Price.Builder getPredictedMonthlyGrossProfitChangeBuilder() { - bitField0_ |= 0x00100000; - onChanged(); - return getPredictedMonthlyGrossProfitChangeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - public com.google.shopping.type.PriceOrBuilder getPredictedMonthlyGrossProfitChangeOrBuilder() { - if (predictedMonthlyGrossProfitChangeBuilder_ != null) { - return predictedMonthlyGrossProfitChangeBuilder_.getMessageOrBuilder(); - } else { - return predictedMonthlyGrossProfitChange_ == null - ? com.google.shopping.type.Price.getDefaultInstance() - : predictedMonthlyGrossProfitChange_; - } - } - /** - * - * - *
-     * Predicted change in gross profit after introducing the suggested price
-     * for a month compared to current active price.
-     * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.shopping.type.Price, - com.google.shopping.type.Price.Builder, - com.google.shopping.type.PriceOrBuilder> - getPredictedMonthlyGrossProfitChangeFieldBuilder() { - if (predictedMonthlyGrossProfitChangeBuilder_ == null) { - predictedMonthlyGrossProfitChangeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.shopping.type.Price, - com.google.shopping.type.Price.Builder, - com.google.shopping.type.PriceOrBuilder>( - getPredictedMonthlyGrossProfitChange(), getParentForChildren(), isClean()); - predictedMonthlyGrossProfitChange_ = null; - } - return predictedMonthlyGrossProfitChangeBuilder_; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductViewOrBuilder.java index 4c7c255e8893..c41fc6f5f3cc 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/PriceInsightsProductViewOrBuilder.java @@ -27,8 +27,9 @@ public interface PriceInsightsProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -42,8 +43,9 @@ public interface PriceInsightsProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -57,8 +59,9 @@ public interface PriceInsightsProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId. Can
-   * be used to join data with the `product_view` table.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Can be used to join data with the
+   * `product_view` table.
    *
    * Required in the `SELECT` clause.
    * 
@@ -736,71 +739,4 @@ public interface PriceInsightsProductViewOrBuilder * @return The predictedConversionsChangeFraction. */ double getPredictedConversionsChangeFraction(); - - /** - * - * - *
-   * Predicted change in gross profit as a fraction after introducing the
-   * suggested price compared to current active price. For example, 0.05 is a 5%
-   * predicted increase in gross profit.
-   * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @return Whether the predictedGrossProfitChangeFraction field is set. - */ - boolean hasPredictedGrossProfitChangeFraction(); - /** - * - * - *
-   * Predicted change in gross profit as a fraction after introducing the
-   * suggested price compared to current active price. For example, 0.05 is a 5%
-   * predicted increase in gross profit.
-   * 
- * - * optional double predicted_gross_profit_change_fraction = 20; - * - * @return The predictedGrossProfitChangeFraction. - */ - double getPredictedGrossProfitChangeFraction(); - - /** - * - * - *
-   * Predicted change in gross profit after introducing the suggested price
-   * for a month compared to current active price.
-   * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - * - * @return Whether the predictedMonthlyGrossProfitChange field is set. - */ - boolean hasPredictedMonthlyGrossProfitChange(); - /** - * - * - *
-   * Predicted change in gross profit after introducing the suggested price
-   * for a month compared to current active price.
-   * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - * - * @return The predictedMonthlyGrossProfitChange. - */ - com.google.shopping.type.Price getPredictedMonthlyGrossProfitChange(); - /** - * - * - *
-   * Predicted change in gross profit after introducing the suggested price
-   * for a month compared to current active price.
-   * 
- * - * .google.shopping.type.Price predicted_monthly_gross_profit_change = 21; - */ - com.google.shopping.type.PriceOrBuilder getPredictedMonthlyGrossProfitChangeOrBuilder(); } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceView.java index a43ad2cf171b..9ff4e796beb0 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceView.java @@ -49,10 +49,8 @@ private ProductPerformanceView(com.google.protobuf.GeneratedMessageV3.Builder } private ProductPerformanceView() { - destination_ = 0; + marketingMethod_ = 0; customerCountryCode_ = ""; - accountDisplayName_ = ""; - externalAccountId_ = ""; offerId_ = ""; title_ = ""; brand_ = ""; @@ -95,63 +93,65 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } private int bitField0_; - public static final int DESTINATION_FIELD_NUMBER = 1; - private int destination_ = 0; + public static final int MARKETING_METHOD_FIELD_NUMBER = 1; + private int marketingMethod_ = 0; /** * * *
-   * Destination of the product to which metrics apply. Segment.
-   *
-   * Product performance data is not available for the LOCAL_INVENTORY_ADS
-   * destination.
+   * Marketing method to which metrics apply. Segment.
    * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return Whether the destination field is set. + * @return Whether the marketingMethod field is set. */ @java.lang.Override - public boolean hasDestination() { + public boolean hasMarketingMethod() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
-   * Destination of the product to which metrics apply. Segment.
-   *
-   * Product performance data is not available for the LOCAL_INVENTORY_ADS
-   * destination.
+   * Marketing method to which metrics apply. Segment.
    * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return The enum numeric value on the wire for destination. + * @return The enum numeric value on the wire for marketingMethod. */ @java.lang.Override - public int getDestinationValue() { - return destination_; + public int getMarketingMethodValue() { + return marketingMethod_; } /** * * *
-   * Destination of the product to which metrics apply. Segment.
-   *
-   * Product performance data is not available for the LOCAL_INVENTORY_ADS
-   * destination.
+   * Marketing method to which metrics apply. Segment.
    * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return The destination. + * @return The marketingMethod. */ @java.lang.Override - public com.google.shopping.type.Destination getDestination() { - com.google.shopping.type.Destination result = - com.google.shopping.type.Destination.forNumber(destination_); - return result == null ? com.google.shopping.type.Destination.UNRECOGNIZED : result; + public com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum + getMarketingMethod() { + com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum result = + com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum.forNumber( + marketingMethod_); + return result == null + ? com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum + .UNRECOGNIZED + : result; } public static final int DATE_FIELD_NUMBER = 2; @@ -333,199 +333,6 @@ public com.google.protobuf.ByteString getCustomerCountryCodeBytes() { } } - public static final int ACCOUNT_ID_FIELD_NUMBER = 29; - private long accountId_ = 0L; - /** - * - * - *
-   * Merchant Center account id of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional int64 account_id = 29; - * - * @return Whether the accountId field is set. - */ - @java.lang.Override - public boolean hasAccountId() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * - * - *
-   * Merchant Center account id of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional int64 account_id = 29; - * - * @return The accountId. - */ - @java.lang.Override - public long getAccountId() { - return accountId_; - } - - public static final int ACCOUNT_DISPLAY_NAME_FIELD_NUMBER = 30; - - @SuppressWarnings("serial") - private volatile java.lang.Object accountDisplayName_ = ""; - /** - * - * - *
-   * Merchant Center account name of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional string account_display_name = 30; - * - * @return Whether the accountDisplayName field is set. - */ - @java.lang.Override - public boolean hasAccountDisplayName() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-   * Merchant Center account name of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional string account_display_name = 30; - * - * @return The accountDisplayName. - */ - @java.lang.Override - public java.lang.String getAccountDisplayName() { - java.lang.Object ref = accountDisplayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accountDisplayName_ = s; - return s; - } - } - /** - * - * - *
-   * Merchant Center account name of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional string account_display_name = 30; - * - * @return The bytes for accountDisplayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAccountDisplayNameBytes() { - java.lang.Object ref = accountDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accountDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTERNAL_ACCOUNT_ID_FIELD_NUMBER = 31; - - @SuppressWarnings("serial") - private volatile java.lang.Object externalAccountId_ = ""; - /** - * - * - *
-   * [External account
-   * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-   * in an offer feed by a multi-seller account to identify the seller of the
-   * offer. Segment.
-   *
-   * Available only for multi-client accounts. This field is non-empty only for
-   * auto-seller accounts.
-   * 
- * - * optional string external_account_id = 31; - * - * @return Whether the externalAccountId field is set. - */ - @java.lang.Override - public boolean hasExternalAccountId() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-   * [External account
-   * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-   * in an offer feed by a multi-seller account to identify the seller of the
-   * offer. Segment.
-   *
-   * Available only for multi-client accounts. This field is non-empty only for
-   * auto-seller accounts.
-   * 
- * - * optional string external_account_id = 31; - * - * @return The externalAccountId. - */ - @java.lang.Override - public java.lang.String getExternalAccountId() { - java.lang.Object ref = externalAccountId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - externalAccountId_ = s; - return s; - } - } - /** - * - * - *
-   * [External account
-   * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-   * in an offer feed by a multi-seller account to identify the seller of the
-   * offer. Segment.
-   *
-   * Available only for multi-client accounts. This field is non-empty only for
-   * auto-seller accounts.
-   * 
- * - * optional string external_account_id = 31; - * - * @return The bytes for externalAccountId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getExternalAccountIdBytes() { - java.lang.Object ref = externalAccountId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - externalAccountId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - public static final int OFFER_ID_FIELD_NUMBER = 5; @SuppressWarnings("serial") @@ -543,7 +350,7 @@ public com.google.protobuf.ByteString getExternalAccountIdBytes() { */ @java.lang.Override public boolean hasOfferId() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -609,7 +416,7 @@ public com.google.protobuf.ByteString getOfferIdBytes() { */ @java.lang.Override public boolean hasTitle() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -675,7 +482,7 @@ public com.google.protobuf.ByteString getTitleBytes() { */ @java.lang.Override public boolean hasBrand() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -743,7 +550,7 @@ public com.google.protobuf.ByteString getBrandBytes() { */ @java.lang.Override public boolean hasCategoryL1() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -815,7 +622,7 @@ public com.google.protobuf.ByteString getCategoryL1Bytes() { */ @java.lang.Override public boolean hasCategoryL2() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -887,7 +694,7 @@ public com.google.protobuf.ByteString getCategoryL2Bytes() { */ @java.lang.Override public boolean hasCategoryL3() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -959,7 +766,7 @@ public com.google.protobuf.ByteString getCategoryL3Bytes() { */ @java.lang.Override public boolean hasCategoryL4() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -1031,7 +838,7 @@ public com.google.protobuf.ByteString getCategoryL4Bytes() { */ @java.lang.Override public boolean hasCategoryL5() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -1103,7 +910,7 @@ public com.google.protobuf.ByteString getCategoryL5Bytes() { */ @java.lang.Override public boolean hasProductTypeL1() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -1175,7 +982,7 @@ public com.google.protobuf.ByteString getProductTypeL1Bytes() { */ @java.lang.Override public boolean hasProductTypeL2() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -1247,7 +1054,7 @@ public com.google.protobuf.ByteString getProductTypeL2Bytes() { */ @java.lang.Override public boolean hasProductTypeL3() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** * @@ -1319,7 +1126,7 @@ public com.google.protobuf.ByteString getProductTypeL3Bytes() { */ @java.lang.Override public boolean hasProductTypeL4() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -1391,7 +1198,7 @@ public com.google.protobuf.ByteString getProductTypeL4Bytes() { */ @java.lang.Override public boolean hasProductTypeL5() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -1461,7 +1268,7 @@ public com.google.protobuf.ByteString getProductTypeL5Bytes() { */ @java.lang.Override public boolean hasCustomLabel0() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -1527,7 +1334,7 @@ public com.google.protobuf.ByteString getCustomLabel0Bytes() { */ @java.lang.Override public boolean hasCustomLabel1() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -1593,7 +1400,7 @@ public com.google.protobuf.ByteString getCustomLabel1Bytes() { */ @java.lang.Override public boolean hasCustomLabel2() { - return ((bitField0_ & 0x00100000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -1659,7 +1466,7 @@ public com.google.protobuf.ByteString getCustomLabel2Bytes() { */ @java.lang.Override public boolean hasCustomLabel3() { - return ((bitField0_ & 0x00200000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -1725,7 +1532,7 @@ public com.google.protobuf.ByteString getCustomLabel3Bytes() { */ @java.lang.Override public boolean hasCustomLabel4() { - return ((bitField0_ & 0x00400000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -1789,7 +1596,7 @@ public com.google.protobuf.ByteString getCustomLabel4Bytes() { */ @java.lang.Override public boolean hasClicks() { - return ((bitField0_ & 0x00800000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** * @@ -1822,7 +1629,7 @@ public long getClicks() { */ @java.lang.Override public boolean hasImpressions() { - return ((bitField0_ & 0x01000000) != 0); + return ((bitField0_ & 0x00200000) != 0); } /** * @@ -1857,7 +1664,7 @@ public long getImpressions() { */ @java.lang.Override public boolean hasClickThroughRate() { - return ((bitField0_ & 0x02000000) != 0); + return ((bitField0_ & 0x00400000) != 0); } /** * @@ -1897,7 +1704,7 @@ public double getClickThroughRate() { */ @java.lang.Override public boolean hasConversions() { - return ((bitField0_ & 0x04000000) != 0); + return ((bitField0_ & 0x00800000) != 0); } /** * @@ -1997,7 +1804,7 @@ public com.google.shopping.type.PriceOrBuilder getConversionValueOrBuilder() { */ @java.lang.Override public boolean hasConversionRate() { - return ((bitField0_ & 0x08000000) != 0); + return ((bitField0_ & 0x01000000) != 0); } /** * @@ -2033,7 +1840,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(1, destination_); + output.writeEnum(1, marketingMethod_); } if (date_ != null) { output.writeMessage(2, getDate()); @@ -2044,87 +1851,78 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, customerCountryCode_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, offerId_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, title_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, brand_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, categoryL1_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, categoryL2_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, categoryL3_); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, categoryL4_); } - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, categoryL5_); } - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, productTypeL1_); } - if (((bitField0_ & 0x00004000) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, productTypeL2_); } - if (((bitField0_ & 0x00008000) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, productTypeL3_); } - if (((bitField0_ & 0x00010000) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 16, productTypeL4_); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00004000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 17, productTypeL5_); } - if (((bitField0_ & 0x00040000) != 0)) { + if (((bitField0_ & 0x00008000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, customLabel0_); } - if (((bitField0_ & 0x00080000) != 0)) { + if (((bitField0_ & 0x00010000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 19, customLabel1_); } - if (((bitField0_ & 0x00100000) != 0)) { + if (((bitField0_ & 0x00020000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 20, customLabel2_); } - if (((bitField0_ & 0x00200000) != 0)) { + if (((bitField0_ & 0x00040000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, customLabel3_); } - if (((bitField0_ & 0x00400000) != 0)) { + if (((bitField0_ & 0x00080000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 22, customLabel4_); } - if (((bitField0_ & 0x00800000) != 0)) { + if (((bitField0_ & 0x00100000) != 0)) { output.writeInt64(23, clicks_); } - if (((bitField0_ & 0x01000000) != 0)) { + if (((bitField0_ & 0x00200000) != 0)) { output.writeInt64(24, impressions_); } - if (((bitField0_ & 0x02000000) != 0)) { + if (((bitField0_ & 0x00400000) != 0)) { output.writeDouble(25, clickThroughRate_); } - if (((bitField0_ & 0x04000000) != 0)) { + if (((bitField0_ & 0x00800000) != 0)) { output.writeDouble(26, conversions_); } if (conversionValue_ != null) { output.writeMessage(27, getConversionValue()); } - if (((bitField0_ & 0x08000000) != 0)) { + if (((bitField0_ & 0x01000000) != 0)) { output.writeDouble(28, conversionRate_); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeInt64(29, accountId_); - } - if (((bitField0_ & 0x00000008) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 30, accountDisplayName_); - } - if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 31, externalAccountId_); - } getUnknownFields().writeTo(output); } @@ -2135,7 +1933,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, destination_); + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, marketingMethod_); } if (date_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDate()); @@ -2146,87 +1944,78 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, customerCountryCode_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, offerId_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, title_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, brand_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, categoryL1_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, categoryL2_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, categoryL3_); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, categoryL4_); } - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, categoryL5_); } - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, productTypeL1_); } - if (((bitField0_ & 0x00004000) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, productTypeL2_); } - if (((bitField0_ & 0x00008000) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, productTypeL3_); } - if (((bitField0_ & 0x00010000) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, productTypeL4_); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00004000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, productTypeL5_); } - if (((bitField0_ & 0x00040000) != 0)) { + if (((bitField0_ & 0x00008000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, customLabel0_); } - if (((bitField0_ & 0x00080000) != 0)) { + if (((bitField0_ & 0x00010000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, customLabel1_); } - if (((bitField0_ & 0x00100000) != 0)) { + if (((bitField0_ & 0x00020000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, customLabel2_); } - if (((bitField0_ & 0x00200000) != 0)) { + if (((bitField0_ & 0x00040000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, customLabel3_); } - if (((bitField0_ & 0x00400000) != 0)) { + if (((bitField0_ & 0x00080000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, customLabel4_); } - if (((bitField0_ & 0x00800000) != 0)) { + if (((bitField0_ & 0x00100000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(23, clicks_); } - if (((bitField0_ & 0x01000000) != 0)) { + if (((bitField0_ & 0x00200000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(24, impressions_); } - if (((bitField0_ & 0x02000000) != 0)) { + if (((bitField0_ & 0x00400000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(25, clickThroughRate_); } - if (((bitField0_ & 0x04000000) != 0)) { + if (((bitField0_ & 0x00800000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(26, conversions_); } if (conversionValue_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getConversionValue()); } - if (((bitField0_ & 0x08000000) != 0)) { + if (((bitField0_ & 0x01000000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(28, conversionRate_); } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(29, accountId_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30, accountDisplayName_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(31, externalAccountId_); - } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2243,9 +2032,9 @@ public boolean equals(final java.lang.Object obj) { com.google.shopping.merchant.reports.v1beta.ProductPerformanceView other = (com.google.shopping.merchant.reports.v1beta.ProductPerformanceView) obj; - if (hasDestination() != other.hasDestination()) return false; - if (hasDestination()) { - if (destination_ != other.destination_) return false; + if (hasMarketingMethod() != other.hasMarketingMethod()) return false; + if (hasMarketingMethod()) { + if (marketingMethod_ != other.marketingMethod_) return false; } if (hasDate() != other.hasDate()) return false; if (hasDate()) { @@ -2259,18 +2048,6 @@ public boolean equals(final java.lang.Object obj) { if (hasCustomerCountryCode()) { if (!getCustomerCountryCode().equals(other.getCustomerCountryCode())) return false; } - if (hasAccountId() != other.hasAccountId()) return false; - if (hasAccountId()) { - if (getAccountId() != other.getAccountId()) return false; - } - if (hasAccountDisplayName() != other.hasAccountDisplayName()) return false; - if (hasAccountDisplayName()) { - if (!getAccountDisplayName().equals(other.getAccountDisplayName())) return false; - } - if (hasExternalAccountId() != other.hasExternalAccountId()) return false; - if (hasExternalAccountId()) { - if (!getExternalAccountId().equals(other.getExternalAccountId())) return false; - } if (hasOfferId() != other.hasOfferId()) return false; if (hasOfferId()) { if (!getOfferId().equals(other.getOfferId())) return false; @@ -2381,9 +2158,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDestination()) { - hash = (37 * hash) + DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + destination_; + if (hasMarketingMethod()) { + hash = (37 * hash) + MARKETING_METHOD_FIELD_NUMBER; + hash = (53 * hash) + marketingMethod_; } if (hasDate()) { hash = (37 * hash) + DATE_FIELD_NUMBER; @@ -2397,18 +2174,6 @@ public int hashCode() { hash = (37 * hash) + CUSTOMER_COUNTRY_CODE_FIELD_NUMBER; hash = (53 * hash) + getCustomerCountryCode().hashCode(); } - if (hasAccountId()) { - hash = (37 * hash) + ACCOUNT_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAccountId()); - } - if (hasAccountDisplayName()) { - hash = (37 * hash) + ACCOUNT_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getAccountDisplayName().hashCode(); - } - if (hasExternalAccountId()) { - hash = (37 * hash) + EXTERNAL_ACCOUNT_ID_FIELD_NUMBER; - hash = (53 * hash) + getExternalAccountId().hashCode(); - } if (hasOfferId()) { hash = (37 * hash) + OFFER_ID_FIELD_NUMBER; hash = (53 * hash) + getOfferId().hashCode(); @@ -2667,7 +2432,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - destination_ = 0; + marketingMethod_ = 0; date_ = null; if (dateBuilder_ != null) { dateBuilder_.dispose(); @@ -2679,9 +2444,6 @@ public Builder clear() { weekBuilder_ = null; } customerCountryCode_ = ""; - accountId_ = 0L; - accountDisplayName_ = ""; - externalAccountId_ = ""; offerId_ = ""; title_ = ""; brand_ = ""; @@ -2751,7 +2513,7 @@ private void buildPartial0( int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.destination_ = destination_; + result.marketingMethod_ = marketingMethod_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { @@ -2765,112 +2527,100 @@ private void buildPartial0( to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.accountId_ = accountId_; + result.offerId_ = offerId_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.accountDisplayName_ = accountDisplayName_; + result.title_ = title_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.externalAccountId_ = externalAccountId_; + result.brand_ = brand_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.offerId_ = offerId_; + result.categoryL1_ = categoryL1_; to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.title_ = title_; + result.categoryL2_ = categoryL2_; to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.brand_ = brand_; + result.categoryL3_ = categoryL3_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.categoryL1_ = categoryL1_; + result.categoryL4_ = categoryL4_; to_bitField0_ |= 0x00000100; } if (((from_bitField0_ & 0x00000800) != 0)) { - result.categoryL2_ = categoryL2_; + result.categoryL5_ = categoryL5_; to_bitField0_ |= 0x00000200; } if (((from_bitField0_ & 0x00001000) != 0)) { - result.categoryL3_ = categoryL3_; + result.productTypeL1_ = productTypeL1_; to_bitField0_ |= 0x00000400; } if (((from_bitField0_ & 0x00002000) != 0)) { - result.categoryL4_ = categoryL4_; + result.productTypeL2_ = productTypeL2_; to_bitField0_ |= 0x00000800; } if (((from_bitField0_ & 0x00004000) != 0)) { - result.categoryL5_ = categoryL5_; + result.productTypeL3_ = productTypeL3_; to_bitField0_ |= 0x00001000; } if (((from_bitField0_ & 0x00008000) != 0)) { - result.productTypeL1_ = productTypeL1_; + result.productTypeL4_ = productTypeL4_; to_bitField0_ |= 0x00002000; } if (((from_bitField0_ & 0x00010000) != 0)) { - result.productTypeL2_ = productTypeL2_; + result.productTypeL5_ = productTypeL5_; to_bitField0_ |= 0x00004000; } if (((from_bitField0_ & 0x00020000) != 0)) { - result.productTypeL3_ = productTypeL3_; + result.customLabel0_ = customLabel0_; to_bitField0_ |= 0x00008000; } if (((from_bitField0_ & 0x00040000) != 0)) { - result.productTypeL4_ = productTypeL4_; + result.customLabel1_ = customLabel1_; to_bitField0_ |= 0x00010000; } if (((from_bitField0_ & 0x00080000) != 0)) { - result.productTypeL5_ = productTypeL5_; + result.customLabel2_ = customLabel2_; to_bitField0_ |= 0x00020000; } if (((from_bitField0_ & 0x00100000) != 0)) { - result.customLabel0_ = customLabel0_; + result.customLabel3_ = customLabel3_; to_bitField0_ |= 0x00040000; } if (((from_bitField0_ & 0x00200000) != 0)) { - result.customLabel1_ = customLabel1_; + result.customLabel4_ = customLabel4_; to_bitField0_ |= 0x00080000; } if (((from_bitField0_ & 0x00400000) != 0)) { - result.customLabel2_ = customLabel2_; + result.clicks_ = clicks_; to_bitField0_ |= 0x00100000; } if (((from_bitField0_ & 0x00800000) != 0)) { - result.customLabel3_ = customLabel3_; + result.impressions_ = impressions_; to_bitField0_ |= 0x00200000; } if (((from_bitField0_ & 0x01000000) != 0)) { - result.customLabel4_ = customLabel4_; + result.clickThroughRate_ = clickThroughRate_; to_bitField0_ |= 0x00400000; } if (((from_bitField0_ & 0x02000000) != 0)) { - result.clicks_ = clicks_; + result.conversions_ = conversions_; to_bitField0_ |= 0x00800000; } if (((from_bitField0_ & 0x04000000) != 0)) { - result.impressions_ = impressions_; - to_bitField0_ |= 0x01000000; - } - if (((from_bitField0_ & 0x08000000) != 0)) { - result.clickThroughRate_ = clickThroughRate_; - to_bitField0_ |= 0x02000000; - } - if (((from_bitField0_ & 0x10000000) != 0)) { - result.conversions_ = conversions_; - to_bitField0_ |= 0x04000000; - } - if (((from_bitField0_ & 0x20000000) != 0)) { result.conversionValue_ = conversionValueBuilder_ == null ? conversionValue_ : conversionValueBuilder_.build(); } - if (((from_bitField0_ & 0x40000000) != 0)) { + if (((from_bitField0_ & 0x08000000) != 0)) { result.conversionRate_ = conversionRate_; - to_bitField0_ |= 0x08000000; + to_bitField0_ |= 0x01000000; } result.bitField0_ |= to_bitField0_; } @@ -2924,8 +2674,8 @@ public Builder mergeFrom( if (other == com.google.shopping.merchant.reports.v1beta.ProductPerformanceView .getDefaultInstance()) return this; - if (other.hasDestination()) { - setDestination(other.getDestination()); + if (other.hasMarketingMethod()) { + setMarketingMethod(other.getMarketingMethod()); } if (other.hasDate()) { mergeDate(other.getDate()); @@ -2938,107 +2688,94 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; onChanged(); } - if (other.hasAccountId()) { - setAccountId(other.getAccountId()); - } - if (other.hasAccountDisplayName()) { - accountDisplayName_ = other.accountDisplayName_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasExternalAccountId()) { - externalAccountId_ = other.externalAccountId_; - bitField0_ |= 0x00000040; - onChanged(); - } if (other.hasOfferId()) { offerId_ = other.offerId_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000010; onChanged(); } if (other.hasTitle()) { title_ = other.title_; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000020; onChanged(); } if (other.hasBrand()) { brand_ = other.brand_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000040; onChanged(); } if (other.hasCategoryL1()) { categoryL1_ = other.categoryL1_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000080; onChanged(); } if (other.hasCategoryL2()) { categoryL2_ = other.categoryL2_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000100; onChanged(); } if (other.hasCategoryL3()) { categoryL3_ = other.categoryL3_; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000200; onChanged(); } if (other.hasCategoryL4()) { categoryL4_ = other.categoryL4_; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00000400; onChanged(); } if (other.hasCategoryL5()) { categoryL5_ = other.categoryL5_; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000800; onChanged(); } if (other.hasProductTypeL1()) { productTypeL1_ = other.productTypeL1_; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00001000; onChanged(); } if (other.hasProductTypeL2()) { productTypeL2_ = other.productTypeL2_; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00002000; onChanged(); } if (other.hasProductTypeL3()) { productTypeL3_ = other.productTypeL3_; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00004000; onChanged(); } if (other.hasProductTypeL4()) { productTypeL4_ = other.productTypeL4_; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00008000; onChanged(); } if (other.hasProductTypeL5()) { productTypeL5_ = other.productTypeL5_; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00010000; onChanged(); } if (other.hasCustomLabel0()) { customLabel0_ = other.customLabel0_; - bitField0_ |= 0x00100000; + bitField0_ |= 0x00020000; onChanged(); } if (other.hasCustomLabel1()) { customLabel1_ = other.customLabel1_; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00040000; onChanged(); } if (other.hasCustomLabel2()) { customLabel2_ = other.customLabel2_; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00080000; onChanged(); } if (other.hasCustomLabel3()) { customLabel3_ = other.customLabel3_; - bitField0_ |= 0x00800000; + bitField0_ |= 0x00100000; onChanged(); } if (other.hasCustomLabel4()) { customLabel4_ = other.customLabel4_; - bitField0_ |= 0x01000000; + bitField0_ |= 0x00200000; onChanged(); } if (other.hasClicks()) { @@ -3087,7 +2824,7 @@ public Builder mergeFrom( break; case 8: { - destination_ = input.readEnum(); + marketingMethod_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 @@ -3112,165 +2849,147 @@ public Builder mergeFrom( case 42: { offerId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000010; break; } // case 42 case 50: { title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000020; break; } // case 50 case 58: { brand_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000040; break; } // case 58 case 66: { categoryL1_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000080; break; } // case 66 case 74: { categoryL2_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000100; break; } // case 74 case 82: { categoryL3_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000200; break; } // case 82 case 90: { categoryL4_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00000400; break; } // case 90 case 98: { categoryL5_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000800; break; } // case 98 case 106: { productTypeL1_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00001000; break; } // case 106 case 114: { productTypeL2_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00002000; break; } // case 114 case 122: { productTypeL3_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00004000; break; } // case 122 case 130: { productTypeL4_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00008000; break; } // case 130 case 138: { productTypeL5_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00010000; break; } // case 138 case 146: { customLabel0_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00020000; break; } // case 146 case 154: { customLabel1_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00040000; break; } // case 154 case 162: { customLabel2_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00080000; break; } // case 162 case 170: { customLabel3_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00800000; + bitField0_ |= 0x00100000; break; } // case 170 case 178: { customLabel4_ = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; + bitField0_ |= 0x00200000; break; } // case 178 case 184: { clicks_ = input.readInt64(); - bitField0_ |= 0x02000000; + bitField0_ |= 0x00400000; break; } // case 184 case 192: { impressions_ = input.readInt64(); - bitField0_ |= 0x04000000; + bitField0_ |= 0x00800000; break; } // case 192 case 201: { clickThroughRate_ = input.readDouble(); - bitField0_ |= 0x08000000; + bitField0_ |= 0x01000000; break; } // case 201 case 209: { conversions_ = input.readDouble(); - bitField0_ |= 0x10000000; + bitField0_ |= 0x02000000; break; } // case 209 case 218: { input.readMessage(getConversionValueFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x20000000; + bitField0_ |= 0x04000000; break; } // case 218 case 225: { conversionRate_ = input.readDouble(); - bitField0_ |= 0x40000000; + bitField0_ |= 0x08000000; break; } // case 225 - case 232: - { - accountId_ = input.readInt64(); - bitField0_ |= 0x00000010; - break; - } // case 232 - case 242: - { - accountDisplayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 242 - case 250: - { - externalAccountId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 250 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3290,60 +3009,57 @@ public Builder mergeFrom( private int bitField0_; - private int destination_ = 0; + private int marketingMethod_ = 0; /** * * *
-     * Destination of the product to which metrics apply. Segment.
-     *
-     * Product performance data is not available for the LOCAL_INVENTORY_ADS
-     * destination.
+     * Marketing method to which metrics apply. Segment.
      * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return Whether the destination field is set. + * @return Whether the marketingMethod field is set. */ @java.lang.Override - public boolean hasDestination() { + public boolean hasMarketingMethod() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
-     * Destination of the product to which metrics apply. Segment.
-     *
-     * Product performance data is not available for the LOCAL_INVENTORY_ADS
-     * destination.
+     * Marketing method to which metrics apply. Segment.
      * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return The enum numeric value on the wire for destination. + * @return The enum numeric value on the wire for marketingMethod. */ @java.lang.Override - public int getDestinationValue() { - return destination_; + public int getMarketingMethodValue() { + return marketingMethod_; } /** * * *
-     * Destination of the product to which metrics apply. Segment.
-     *
-     * Product performance data is not available for the LOCAL_INVENTORY_ADS
-     * destination.
+     * Marketing method to which metrics apply. Segment.
      * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @param value The enum numeric value on the wire for destination to set. + * @param value The enum numeric value on the wire for marketingMethod to set. * @return This builder for chaining. */ - public Builder setDestinationValue(int value) { - destination_ = value; + public Builder setMarketingMethodValue(int value) { + marketingMethod_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -3352,43 +3068,47 @@ public Builder setDestinationValue(int value) { * * *
-     * Destination of the product to which metrics apply. Segment.
-     *
-     * Product performance data is not available for the LOCAL_INVENTORY_ADS
-     * destination.
+     * Marketing method to which metrics apply. Segment.
      * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return The destination. + * @return The marketingMethod. */ @java.lang.Override - public com.google.shopping.type.Destination getDestination() { - com.google.shopping.type.Destination result = - com.google.shopping.type.Destination.forNumber(destination_); - return result == null ? com.google.shopping.type.Destination.UNRECOGNIZED : result; + public com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum + getMarketingMethod() { + com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum result = + com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum.forNumber( + marketingMethod_); + return result == null + ? com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum + .UNRECOGNIZED + : result; } /** * * *
-     * Destination of the product to which metrics apply. Segment.
-     *
-     * Product performance data is not available for the LOCAL_INVENTORY_ADS
-     * destination.
+     * Marketing method to which metrics apply. Segment.
      * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @param value The destination to set. + * @param value The marketingMethod to set. * @return This builder for chaining. */ - public Builder setDestination(com.google.shopping.type.Destination value) { + public Builder setMarketingMethod( + com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - destination_ = value.getNumber(); + marketingMethod_ = value.getNumber(); onChanged(); return this; } @@ -3396,19 +3116,18 @@ public Builder setDestination(com.google.shopping.type.Destination value) { * * *
-     * Destination of the product to which metrics apply. Segment.
-     *
-     * Product performance data is not available for the LOCAL_INVENTORY_ADS
-     * destination.
+     * Marketing method to which metrics apply. Segment.
      * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * * @return This builder for chaining. */ - public Builder clearDestination() { + public Builder clearMarketingMethod() { bitField0_ = (bitField0_ & ~0x00000001); - destination_ = 0; + marketingMethod_ = 0; onChanged(); return this; } @@ -3759,429 +3478,73 @@ public com.google.type.Date.Builder getWeekBuilder() { public com.google.type.DateOrBuilder getWeekOrBuilder() { if (weekBuilder_ != null) { return weekBuilder_.getMessageOrBuilder(); - } else { - return week_ == null ? com.google.type.Date.getDefaultInstance() : week_; - } - } - /** - * - * - *
-     * First day of the week (Monday) of the metrics date in the merchant
-     * timezone. Segment.
-     * 
- * - * .google.type.Date week = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - getWeekFieldBuilder() { - if (weekBuilder_ == null) { - weekBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( - getWeek(), getParentForChildren(), isClean()); - week_ = null; - } - return weekBuilder_; - } - - private java.lang.Object customerCountryCode_ = ""; - /** - * - * - *
-     * Code of the country where the customer is located at the time of the event.
-     * Represented in the ISO 3166 format. Segment.
-     *
-     * If the customer country cannot be determined, a special 'ZZ' code is
-     * returned.
-     * 
- * - * optional string customer_country_code = 4; - * - * @return Whether the customerCountryCode field is set. - */ - public boolean hasCustomerCountryCode() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * - * - *
-     * Code of the country where the customer is located at the time of the event.
-     * Represented in the ISO 3166 format. Segment.
-     *
-     * If the customer country cannot be determined, a special 'ZZ' code is
-     * returned.
-     * 
- * - * optional string customer_country_code = 4; - * - * @return The customerCountryCode. - */ - public java.lang.String getCustomerCountryCode() { - java.lang.Object ref = customerCountryCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - customerCountryCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Code of the country where the customer is located at the time of the event.
-     * Represented in the ISO 3166 format. Segment.
-     *
-     * If the customer country cannot be determined, a special 'ZZ' code is
-     * returned.
-     * 
- * - * optional string customer_country_code = 4; - * - * @return The bytes for customerCountryCode. - */ - public com.google.protobuf.ByteString getCustomerCountryCodeBytes() { - java.lang.Object ref = customerCountryCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - customerCountryCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Code of the country where the customer is located at the time of the event.
-     * Represented in the ISO 3166 format. Segment.
-     *
-     * If the customer country cannot be determined, a special 'ZZ' code is
-     * returned.
-     * 
- * - * optional string customer_country_code = 4; - * - * @param value The customerCountryCode to set. - * @return This builder for chaining. - */ - public Builder setCustomerCountryCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - customerCountryCode_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Code of the country where the customer is located at the time of the event.
-     * Represented in the ISO 3166 format. Segment.
-     *
-     * If the customer country cannot be determined, a special 'ZZ' code is
-     * returned.
-     * 
- * - * optional string customer_country_code = 4; - * - * @return This builder for chaining. - */ - public Builder clearCustomerCountryCode() { - customerCountryCode_ = getDefaultInstance().getCustomerCountryCode(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Code of the country where the customer is located at the time of the event.
-     * Represented in the ISO 3166 format. Segment.
-     *
-     * If the customer country cannot be determined, a special 'ZZ' code is
-     * returned.
-     * 
- * - * optional string customer_country_code = 4; - * - * @param value The bytes for customerCountryCode to set. - * @return This builder for chaining. - */ - public Builder setCustomerCountryCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - customerCountryCode_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private long accountId_; - /** - * - * - *
-     * Merchant Center account id of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional int64 account_id = 29; - * - * @return Whether the accountId field is set. - */ - @java.lang.Override - public boolean hasAccountId() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - * - * - *
-     * Merchant Center account id of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional int64 account_id = 29; - * - * @return The accountId. - */ - @java.lang.Override - public long getAccountId() { - return accountId_; - } - /** - * - * - *
-     * Merchant Center account id of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional int64 account_id = 29; - * - * @param value The accountId to set. - * @return This builder for chaining. - */ - public Builder setAccountId(long value) { - - accountId_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Merchant Center account id of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional int64 account_id = 29; - * - * @return This builder for chaining. - */ - public Builder clearAccountId() { - bitField0_ = (bitField0_ & ~0x00000010); - accountId_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object accountDisplayName_ = ""; - /** - * - * - *
-     * Merchant Center account name of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional string account_display_name = 30; - * - * @return Whether the accountDisplayName field is set. - */ - public boolean hasAccountDisplayName() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * - * - *
-     * Merchant Center account name of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional string account_display_name = 30; - * - * @return The accountDisplayName. - */ - public java.lang.String getAccountDisplayName() { - java.lang.Object ref = accountDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accountDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Merchant Center account name of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional string account_display_name = 30; - * - * @return The bytes for accountDisplayName. - */ - public com.google.protobuf.ByteString getAccountDisplayNameBytes() { - java.lang.Object ref = accountDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accountDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Merchant Center account name of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional string account_display_name = 30; - * - * @param value The accountDisplayName to set. - * @return This builder for chaining. - */ - public Builder setAccountDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - accountDisplayName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Merchant Center account name of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
-     * 
- * - * optional string account_display_name = 30; - * - * @return This builder for chaining. - */ - public Builder clearAccountDisplayName() { - accountDisplayName_ = getDefaultInstance().getAccountDisplayName(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; + } else { + return week_ == null ? com.google.type.Date.getDefaultInstance() : week_; + } } /** * * *
-     * Merchant Center account name of the seller of the offer. Segment.
-     *
-     * Available only for multi-client accounts.
+     * First day of the week (Monday) of the metrics date in the merchant
+     * timezone. Segment.
      * 
* - * optional string account_display_name = 30; - * - * @param value The bytes for accountDisplayName to set. - * @return This builder for chaining. + * .google.type.Date week = 3; */ - public Builder setAccountDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getWeekFieldBuilder() { + if (weekBuilder_ == null) { + weekBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getWeek(), getParentForChildren(), isClean()); + week_ = null; } - checkByteStringIsUtf8(value); - accountDisplayName_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; + return weekBuilder_; } - private java.lang.Object externalAccountId_ = ""; + private java.lang.Object customerCountryCode_ = ""; /** * * *
-     * [External account
-     * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-     * in an offer feed by a multi-seller account to identify the seller of the
-     * offer. Segment.
+     * Code of the country where the customer is located at the time of the event.
+     * Represented in the ISO 3166 format. Segment.
      *
-     * Available only for multi-client accounts. This field is non-empty only for
-     * auto-seller accounts.
+     * If the customer country cannot be determined, a special 'ZZ' code is
+     * returned.
      * 
* - * optional string external_account_id = 31; + * optional string customer_country_code = 4; * - * @return Whether the externalAccountId field is set. + * @return Whether the customerCountryCode field is set. */ - public boolean hasExternalAccountId() { - return ((bitField0_ & 0x00000040) != 0); + public boolean hasCustomerCountryCode() { + return ((bitField0_ & 0x00000008) != 0); } /** * * *
-     * [External account
-     * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-     * in an offer feed by a multi-seller account to identify the seller of the
-     * offer. Segment.
+     * Code of the country where the customer is located at the time of the event.
+     * Represented in the ISO 3166 format. Segment.
      *
-     * Available only for multi-client accounts. This field is non-empty only for
-     * auto-seller accounts.
+     * If the customer country cannot be determined, a special 'ZZ' code is
+     * returned.
      * 
* - * optional string external_account_id = 31; + * optional string customer_country_code = 4; * - * @return The externalAccountId. + * @return The customerCountryCode. */ - public java.lang.String getExternalAccountId() { - java.lang.Object ref = externalAccountId_; + public java.lang.String getCustomerCountryCode() { + java.lang.Object ref = customerCountryCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - externalAccountId_ = s; + customerCountryCode_ = s; return s; } else { return (java.lang.String) ref; @@ -4191,25 +3554,23 @@ public java.lang.String getExternalAccountId() { * * *
-     * [External account
-     * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-     * in an offer feed by a multi-seller account to identify the seller of the
-     * offer. Segment.
+     * Code of the country where the customer is located at the time of the event.
+     * Represented in the ISO 3166 format. Segment.
      *
-     * Available only for multi-client accounts. This field is non-empty only for
-     * auto-seller accounts.
+     * If the customer country cannot be determined, a special 'ZZ' code is
+     * returned.
      * 
* - * optional string external_account_id = 31; + * optional string customer_country_code = 4; * - * @return The bytes for externalAccountId. + * @return The bytes for customerCountryCode. */ - public com.google.protobuf.ByteString getExternalAccountIdBytes() { - java.lang.Object ref = externalAccountId_; + public com.google.protobuf.ByteString getCustomerCountryCodeBytes() { + java.lang.Object ref = customerCountryCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - externalAccountId_ = b; + customerCountryCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -4219,26 +3580,24 @@ public com.google.protobuf.ByteString getExternalAccountIdBytes() { * * *
-     * [External account
-     * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-     * in an offer feed by a multi-seller account to identify the seller of the
-     * offer. Segment.
+     * Code of the country where the customer is located at the time of the event.
+     * Represented in the ISO 3166 format. Segment.
      *
-     * Available only for multi-client accounts. This field is non-empty only for
-     * auto-seller accounts.
+     * If the customer country cannot be determined, a special 'ZZ' code is
+     * returned.
      * 
* - * optional string external_account_id = 31; + * optional string customer_country_code = 4; * - * @param value The externalAccountId to set. + * @param value The customerCountryCode to set. * @return This builder for chaining. */ - public Builder setExternalAccountId(java.lang.String value) { + public Builder setCustomerCountryCode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - externalAccountId_ = value; - bitField0_ |= 0x00000040; + customerCountryCode_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4246,22 +3605,20 @@ public Builder setExternalAccountId(java.lang.String value) { * * *
-     * [External account
-     * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-     * in an offer feed by a multi-seller account to identify the seller of the
-     * offer. Segment.
+     * Code of the country where the customer is located at the time of the event.
+     * Represented in the ISO 3166 format. Segment.
      *
-     * Available only for multi-client accounts. This field is non-empty only for
-     * auto-seller accounts.
+     * If the customer country cannot be determined, a special 'ZZ' code is
+     * returned.
      * 
* - * optional string external_account_id = 31; + * optional string customer_country_code = 4; * * @return This builder for chaining. */ - public Builder clearExternalAccountId() { - externalAccountId_ = getDefaultInstance().getExternalAccountId(); - bitField0_ = (bitField0_ & ~0x00000040); + public Builder clearCustomerCountryCode() { + customerCountryCode_ = getDefaultInstance().getCustomerCountryCode(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -4269,27 +3626,25 @@ public Builder clearExternalAccountId() { * * *
-     * [External account
-     * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-     * in an offer feed by a multi-seller account to identify the seller of the
-     * offer. Segment.
+     * Code of the country where the customer is located at the time of the event.
+     * Represented in the ISO 3166 format. Segment.
      *
-     * Available only for multi-client accounts. This field is non-empty only for
-     * auto-seller accounts.
+     * If the customer country cannot be determined, a special 'ZZ' code is
+     * returned.
      * 
* - * optional string external_account_id = 31; + * optional string customer_country_code = 4; * - * @param value The bytes for externalAccountId to set. + * @param value The bytes for customerCountryCode to set. * @return This builder for chaining. */ - public Builder setExternalAccountIdBytes(com.google.protobuf.ByteString value) { + public Builder setCustomerCountryCodeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - externalAccountId_ = value; - bitField0_ |= 0x00000040; + customerCountryCode_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4307,7 +3662,7 @@ public Builder setExternalAccountIdBytes(com.google.protobuf.ByteString value) { * @return Whether the offerId field is set. */ public boolean hasOfferId() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -4370,7 +3725,7 @@ public Builder setOfferId(java.lang.String value) { throw new NullPointerException(); } offerId_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -4387,7 +3742,7 @@ public Builder setOfferId(java.lang.String value) { */ public Builder clearOfferId() { offerId_ = getDefaultInstance().getOfferId(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -4409,7 +3764,7 @@ public Builder setOfferIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); offerId_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -4427,7 +3782,7 @@ public Builder setOfferIdBytes(com.google.protobuf.ByteString value) { * @return Whether the title field is set. */ public boolean hasTitle() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -4490,7 +3845,7 @@ public Builder setTitle(java.lang.String value) { throw new NullPointerException(); } title_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -4507,7 +3862,7 @@ public Builder setTitle(java.lang.String value) { */ public Builder clearTitle() { title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -4529,7 +3884,7 @@ public Builder setTitleBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); title_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -4547,7 +3902,7 @@ public Builder setTitleBytes(com.google.protobuf.ByteString value) { * @return Whether the brand field is set. */ public boolean hasBrand() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -4610,7 +3965,7 @@ public Builder setBrand(java.lang.String value) { throw new NullPointerException(); } brand_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4627,7 +3982,7 @@ public Builder setBrand(java.lang.String value) { */ public Builder clearBrand() { brand_ = getDefaultInstance().getBrand(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -4649,7 +4004,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); brand_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4669,7 +4024,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL1 field is set. */ public boolean hasCategoryL1() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -4738,7 +4093,7 @@ public Builder setCategoryL1(java.lang.String value) { throw new NullPointerException(); } categoryL1_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4757,7 +4112,7 @@ public Builder setCategoryL1(java.lang.String value) { */ public Builder clearCategoryL1() { categoryL1_ = getDefaultInstance().getCategoryL1(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -4781,7 +4136,7 @@ public Builder setCategoryL1Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL1_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4801,7 +4156,7 @@ public Builder setCategoryL1Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL2 field is set. */ public boolean hasCategoryL2() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -4870,7 +4225,7 @@ public Builder setCategoryL2(java.lang.String value) { throw new NullPointerException(); } categoryL2_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4889,7 +4244,7 @@ public Builder setCategoryL2(java.lang.String value) { */ public Builder clearCategoryL2() { categoryL2_ = getDefaultInstance().getCategoryL2(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -4913,7 +4268,7 @@ public Builder setCategoryL2Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL2_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4933,7 +4288,7 @@ public Builder setCategoryL2Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL3 field is set. */ public boolean hasCategoryL3() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -5002,7 +4357,7 @@ public Builder setCategoryL3(java.lang.String value) { throw new NullPointerException(); } categoryL3_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5021,7 +4376,7 @@ public Builder setCategoryL3(java.lang.String value) { */ public Builder clearCategoryL3() { categoryL3_ = getDefaultInstance().getCategoryL3(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -5045,7 +4400,7 @@ public Builder setCategoryL3Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL3_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5065,7 +4420,7 @@ public Builder setCategoryL3Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL4 field is set. */ public boolean hasCategoryL4() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -5134,7 +4489,7 @@ public Builder setCategoryL4(java.lang.String value) { throw new NullPointerException(); } categoryL4_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5153,7 +4508,7 @@ public Builder setCategoryL4(java.lang.String value) { */ public Builder clearCategoryL4() { categoryL4_ = getDefaultInstance().getCategoryL4(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -5177,7 +4532,7 @@ public Builder setCategoryL4Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL4_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5197,7 +4552,7 @@ public Builder setCategoryL4Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL5 field is set. */ public boolean hasCategoryL5() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -5266,7 +4621,7 @@ public Builder setCategoryL5(java.lang.String value) { throw new NullPointerException(); } categoryL5_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -5285,7 +4640,7 @@ public Builder setCategoryL5(java.lang.String value) { */ public Builder clearCategoryL5() { categoryL5_ = getDefaultInstance().getCategoryL5(); - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -5309,7 +4664,7 @@ public Builder setCategoryL5Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL5_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -5329,7 +4684,7 @@ public Builder setCategoryL5Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL1 field is set. */ public boolean hasProductTypeL1() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** * @@ -5398,7 +4753,7 @@ public Builder setProductTypeL1(java.lang.String value) { throw new NullPointerException(); } productTypeL1_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -5417,7 +4772,7 @@ public Builder setProductTypeL1(java.lang.String value) { */ public Builder clearProductTypeL1() { productTypeL1_ = getDefaultInstance().getProductTypeL1(); - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -5441,7 +4796,7 @@ public Builder setProductTypeL1Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL1_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -5461,7 +4816,7 @@ public Builder setProductTypeL1Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL2 field is set. */ public boolean hasProductTypeL2() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -5530,7 +4885,7 @@ public Builder setProductTypeL2(java.lang.String value) { throw new NullPointerException(); } productTypeL2_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -5549,7 +4904,7 @@ public Builder setProductTypeL2(java.lang.String value) { */ public Builder clearProductTypeL2() { productTypeL2_ = getDefaultInstance().getProductTypeL2(); - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -5573,7 +4928,7 @@ public Builder setProductTypeL2Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL2_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -5593,7 +4948,7 @@ public Builder setProductTypeL2Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL3 field is set. */ public boolean hasProductTypeL3() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -5662,7 +5017,7 @@ public Builder setProductTypeL3(java.lang.String value) { throw new NullPointerException(); } productTypeL3_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5681,7 +5036,7 @@ public Builder setProductTypeL3(java.lang.String value) { */ public Builder clearProductTypeL3() { productTypeL3_ = getDefaultInstance().getProductTypeL3(); - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00004000); onChanged(); return this; } @@ -5705,7 +5060,7 @@ public Builder setProductTypeL3Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL3_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5725,7 +5080,7 @@ public Builder setProductTypeL3Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL4 field is set. */ public boolean hasProductTypeL4() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -5794,7 +5149,7 @@ public Builder setProductTypeL4(java.lang.String value) { throw new NullPointerException(); } productTypeL4_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5813,7 +5168,7 @@ public Builder setProductTypeL4(java.lang.String value) { */ public Builder clearProductTypeL4() { productTypeL4_ = getDefaultInstance().getProductTypeL4(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00008000); onChanged(); return this; } @@ -5837,7 +5192,7 @@ public Builder setProductTypeL4Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL4_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5857,7 +5212,7 @@ public Builder setProductTypeL4Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL5 field is set. */ public boolean hasProductTypeL5() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -5926,7 +5281,7 @@ public Builder setProductTypeL5(java.lang.String value) { throw new NullPointerException(); } productTypeL5_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5945,7 +5300,7 @@ public Builder setProductTypeL5(java.lang.String value) { */ public Builder clearProductTypeL5() { productTypeL5_ = getDefaultInstance().getProductTypeL5(); - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00010000); onChanged(); return this; } @@ -5969,7 +5324,7 @@ public Builder setProductTypeL5Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL5_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5987,7 +5342,7 @@ public Builder setProductTypeL5Bytes(com.google.protobuf.ByteString value) { * @return Whether the customLabel0 field is set. */ public boolean hasCustomLabel0() { - return ((bitField0_ & 0x00100000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -6050,7 +5405,7 @@ public Builder setCustomLabel0(java.lang.String value) { throw new NullPointerException(); } customLabel0_ = value; - bitField0_ |= 0x00100000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -6067,7 +5422,7 @@ public Builder setCustomLabel0(java.lang.String value) { */ public Builder clearCustomLabel0() { customLabel0_ = getDefaultInstance().getCustomLabel0(); - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00020000); onChanged(); return this; } @@ -6089,7 +5444,7 @@ public Builder setCustomLabel0Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); customLabel0_ = value; - bitField0_ |= 0x00100000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -6107,7 +5462,7 @@ public Builder setCustomLabel0Bytes(com.google.protobuf.ByteString value) { * @return Whether the customLabel1 field is set. */ public boolean hasCustomLabel1() { - return ((bitField0_ & 0x00200000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -6170,7 +5525,7 @@ public Builder setCustomLabel1(java.lang.String value) { throw new NullPointerException(); } customLabel1_ = value; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6187,7 +5542,7 @@ public Builder setCustomLabel1(java.lang.String value) { */ public Builder clearCustomLabel1() { customLabel1_ = getDefaultInstance().getCustomLabel1(); - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } @@ -6209,7 +5564,7 @@ public Builder setCustomLabel1Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); customLabel1_ = value; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6227,7 +5582,7 @@ public Builder setCustomLabel1Bytes(com.google.protobuf.ByteString value) { * @return Whether the customLabel2 field is set. */ public boolean hasCustomLabel2() { - return ((bitField0_ & 0x00400000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -6290,7 +5645,7 @@ public Builder setCustomLabel2(java.lang.String value) { throw new NullPointerException(); } customLabel2_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -6307,7 +5662,7 @@ public Builder setCustomLabel2(java.lang.String value) { */ public Builder clearCustomLabel2() { customLabel2_ = getDefaultInstance().getCustomLabel2(); - bitField0_ = (bitField0_ & ~0x00400000); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } @@ -6329,7 +5684,7 @@ public Builder setCustomLabel2Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); customLabel2_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -6347,7 +5702,7 @@ public Builder setCustomLabel2Bytes(com.google.protobuf.ByteString value) { * @return Whether the customLabel3 field is set. */ public boolean hasCustomLabel3() { - return ((bitField0_ & 0x00800000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** * @@ -6410,7 +5765,7 @@ public Builder setCustomLabel3(java.lang.String value) { throw new NullPointerException(); } customLabel3_ = value; - bitField0_ |= 0x00800000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -6427,7 +5782,7 @@ public Builder setCustomLabel3(java.lang.String value) { */ public Builder clearCustomLabel3() { customLabel3_ = getDefaultInstance().getCustomLabel3(); - bitField0_ = (bitField0_ & ~0x00800000); + bitField0_ = (bitField0_ & ~0x00100000); onChanged(); return this; } @@ -6449,7 +5804,7 @@ public Builder setCustomLabel3Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); customLabel3_ = value; - bitField0_ |= 0x00800000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -6467,7 +5822,7 @@ public Builder setCustomLabel3Bytes(com.google.protobuf.ByteString value) { * @return Whether the customLabel4 field is set. */ public boolean hasCustomLabel4() { - return ((bitField0_ & 0x01000000) != 0); + return ((bitField0_ & 0x00200000) != 0); } /** * @@ -6530,7 +5885,7 @@ public Builder setCustomLabel4(java.lang.String value) { throw new NullPointerException(); } customLabel4_ = value; - bitField0_ |= 0x01000000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -6547,7 +5902,7 @@ public Builder setCustomLabel4(java.lang.String value) { */ public Builder clearCustomLabel4() { customLabel4_ = getDefaultInstance().getCustomLabel4(); - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x00200000); onChanged(); return this; } @@ -6569,7 +5924,7 @@ public Builder setCustomLabel4Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); customLabel4_ = value; - bitField0_ |= 0x01000000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -6588,7 +5943,7 @@ public Builder setCustomLabel4Bytes(com.google.protobuf.ByteString value) { */ @java.lang.Override public boolean hasClicks() { - return ((bitField0_ & 0x02000000) != 0); + return ((bitField0_ & 0x00400000) != 0); } /** * @@ -6620,7 +5975,7 @@ public long getClicks() { public Builder setClicks(long value) { clicks_ = value; - bitField0_ |= 0x02000000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -6636,7 +5991,7 @@ public Builder setClicks(long value) { * @return This builder for chaining. */ public Builder clearClicks() { - bitField0_ = (bitField0_ & ~0x02000000); + bitField0_ = (bitField0_ & ~0x00400000); clicks_ = 0L; onChanged(); return this; @@ -6656,7 +6011,7 @@ public Builder clearClicks() { */ @java.lang.Override public boolean hasImpressions() { - return ((bitField0_ & 0x04000000) != 0); + return ((bitField0_ & 0x00800000) != 0); } /** * @@ -6688,7 +6043,7 @@ public long getImpressions() { public Builder setImpressions(long value) { impressions_ = value; - bitField0_ |= 0x04000000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -6704,7 +6059,7 @@ public Builder setImpressions(long value) { * @return This builder for chaining. */ public Builder clearImpressions() { - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x00800000); impressions_ = 0L; onChanged(); return this; @@ -6726,7 +6081,7 @@ public Builder clearImpressions() { */ @java.lang.Override public boolean hasClickThroughRate() { - return ((bitField0_ & 0x08000000) != 0); + return ((bitField0_ & 0x01000000) != 0); } /** * @@ -6762,7 +6117,7 @@ public double getClickThroughRate() { public Builder setClickThroughRate(double value) { clickThroughRate_ = value; - bitField0_ |= 0x08000000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -6780,7 +6135,7 @@ public Builder setClickThroughRate(double value) { * @return This builder for chaining. */ public Builder clearClickThroughRate() { - bitField0_ = (bitField0_ & ~0x08000000); + bitField0_ = (bitField0_ & ~0x01000000); clickThroughRate_ = 0D; onChanged(); return this; @@ -6805,7 +6160,7 @@ public Builder clearClickThroughRate() { */ @java.lang.Override public boolean hasConversions() { - return ((bitField0_ & 0x10000000) != 0); + return ((bitField0_ & 0x02000000) != 0); } /** * @@ -6847,7 +6202,7 @@ public double getConversions() { public Builder setConversions(double value) { conversions_ = value; - bitField0_ |= 0x10000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -6868,7 +6223,7 @@ public Builder setConversions(double value) { * @return This builder for chaining. */ public Builder clearConversions() { - bitField0_ = (bitField0_ & ~0x10000000); + bitField0_ = (bitField0_ & ~0x02000000); conversions_ = 0D; onChanged(); return this; @@ -6895,7 +6250,7 @@ public Builder clearConversions() { * @return Whether the conversionValue field is set. */ public boolean hasConversionValue() { - return ((bitField0_ & 0x20000000) != 0); + return ((bitField0_ & 0x04000000) != 0); } /** * @@ -6941,7 +6296,7 @@ public Builder setConversionValue(com.google.shopping.type.Price value) { } else { conversionValueBuilder_.setMessage(value); } - bitField0_ |= 0x20000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -6963,7 +6318,7 @@ public Builder setConversionValue(com.google.shopping.type.Price.Builder builder } else { conversionValueBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x20000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -6981,7 +6336,7 @@ public Builder setConversionValue(com.google.shopping.type.Price.Builder builder */ public Builder mergeConversionValue(com.google.shopping.type.Price value) { if (conversionValueBuilder_ == null) { - if (((bitField0_ & 0x20000000) != 0) + if (((bitField0_ & 0x04000000) != 0) && conversionValue_ != null && conversionValue_ != com.google.shopping.type.Price.getDefaultInstance()) { getConversionValueBuilder().mergeFrom(value); @@ -6991,7 +6346,7 @@ public Builder mergeConversionValue(com.google.shopping.type.Price value) { } else { conversionValueBuilder_.mergeFrom(value); } - bitField0_ |= 0x20000000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -7008,7 +6363,7 @@ public Builder mergeConversionValue(com.google.shopping.type.Price value) { * .google.shopping.type.Price conversion_value = 27; */ public Builder clearConversionValue() { - bitField0_ = (bitField0_ & ~0x20000000); + bitField0_ = (bitField0_ & ~0x04000000); conversionValue_ = null; if (conversionValueBuilder_ != null) { conversionValueBuilder_.dispose(); @@ -7030,7 +6385,7 @@ public Builder clearConversionValue() { * .google.shopping.type.Price conversion_value = 27; */ public com.google.shopping.type.Price.Builder getConversionValueBuilder() { - bitField0_ |= 0x20000000; + bitField0_ |= 0x04000000; onChanged(); return getConversionValueFieldBuilder().getBuilder(); } @@ -7101,7 +6456,7 @@ public com.google.shopping.type.PriceOrBuilder getConversionValueOrBuilder() { */ @java.lang.Override public boolean hasConversionRate() { - return ((bitField0_ & 0x40000000) != 0); + return ((bitField0_ & 0x08000000) != 0); } /** * @@ -7139,7 +6494,7 @@ public double getConversionRate() { public Builder setConversionRate(double value) { conversionRate_ = value; - bitField0_ |= 0x40000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -7158,7 +6513,7 @@ public Builder setConversionRate(double value) { * @return This builder for chaining. */ public Builder clearConversionRate() { - bitField0_ = (bitField0_ & ~0x40000000); + bitField0_ = (bitField0_ & ~0x08000000); conversionRate_ = 0D; onChanged(); return this; diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceViewOrBuilder.java index 3126681ea8b0..fa9b3d64a103 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductPerformanceViewOrBuilder.java @@ -27,47 +27,45 @@ public interface ProductPerformanceViewOrBuilder * * *
-   * Destination of the product to which metrics apply. Segment.
-   *
-   * Product performance data is not available for the LOCAL_INVENTORY_ADS
-   * destination.
+   * Marketing method to which metrics apply. Segment.
    * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return Whether the destination field is set. + * @return Whether the marketingMethod field is set. */ - boolean hasDestination(); + boolean hasMarketingMethod(); /** * * *
-   * Destination of the product to which metrics apply. Segment.
-   *
-   * Product performance data is not available for the LOCAL_INVENTORY_ADS
-   * destination.
+   * Marketing method to which metrics apply. Segment.
    * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return The enum numeric value on the wire for destination. + * @return The enum numeric value on the wire for marketingMethod. */ - int getDestinationValue(); + int getMarketingMethodValue(); /** * * *
-   * Destination of the product to which metrics apply. Segment.
-   *
-   * Product performance data is not available for the LOCAL_INVENTORY_ADS
-   * destination.
+   * Marketing method to which metrics apply. Segment.
    * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1; + * * - * @return The destination. + * @return The marketingMethod. */ - com.google.shopping.type.Destination getDestination(); + com.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum + getMarketingMethod(); /** * @@ -197,133 +195,6 @@ public interface ProductPerformanceViewOrBuilder */ com.google.protobuf.ByteString getCustomerCountryCodeBytes(); - /** - * - * - *
-   * Merchant Center account id of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional int64 account_id = 29; - * - * @return Whether the accountId field is set. - */ - boolean hasAccountId(); - /** - * - * - *
-   * Merchant Center account id of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional int64 account_id = 29; - * - * @return The accountId. - */ - long getAccountId(); - - /** - * - * - *
-   * Merchant Center account name of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional string account_display_name = 30; - * - * @return Whether the accountDisplayName field is set. - */ - boolean hasAccountDisplayName(); - /** - * - * - *
-   * Merchant Center account name of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional string account_display_name = 30; - * - * @return The accountDisplayName. - */ - java.lang.String getAccountDisplayName(); - /** - * - * - *
-   * Merchant Center account name of the seller of the offer. Segment.
-   *
-   * Available only for multi-client accounts.
-   * 
- * - * optional string account_display_name = 30; - * - * @return The bytes for accountDisplayName. - */ - com.google.protobuf.ByteString getAccountDisplayNameBytes(); - - /** - * - * - *
-   * [External account
-   * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-   * in an offer feed by a multi-seller account to identify the seller of the
-   * offer. Segment.
-   *
-   * Available only for multi-client accounts. This field is non-empty only for
-   * auto-seller accounts.
-   * 
- * - * optional string external_account_id = 31; - * - * @return Whether the externalAccountId field is set. - */ - boolean hasExternalAccountId(); - /** - * - * - *
-   * [External account
-   * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-   * in an offer feed by a multi-seller account to identify the seller of the
-   * offer. Segment.
-   *
-   * Available only for multi-client accounts. This field is non-empty only for
-   * auto-seller accounts.
-   * 
- * - * optional string external_account_id = 31; - * - * @return The externalAccountId. - */ - java.lang.String getExternalAccountId(); - /** - * - * - *
-   * [External account
-   * id](https://support.google.com/merchants/answer/11537846?hl=en) submitted
-   * in an offer feed by a multi-seller account to identify the seller of the
-   * offer. Segment.
-   *
-   * Available only for multi-client accounts. This field is non-empty only for
-   * auto-seller accounts.
-   * 
- * - * optional string external_account_id = 31; - * - * @return The bytes for externalAccountId. - */ - com.google.protobuf.ByteString getExternalAccountIdBytes(); - /** * * diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductView.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductView.java index e361597b9aa0..1ec056c8585d 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductView.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductView.java @@ -49,6 +49,7 @@ private ProductView(com.google.protobuf.GeneratedMessageV3.Builder builder) { private ProductView() { id_ = ""; + channel_ = 0; languageCode_ = ""; feedLabel_ = ""; offerId_ = ""; @@ -70,7 +71,7 @@ private ProductView() { gtin_ = com.google.protobuf.LazyStringArrayList.emptyList(); itemGroupId_ = ""; thumbnailLink_ = ""; - aggregatedDestinationStatus_ = 0; + aggregatedReportingContextStatus_ = 0; itemIssues_ = java.util.Collections.emptyList(); } @@ -99,9 +100,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Status of the product aggregated for all destinations.
+   * Status of the product aggregated for all reporting contexts.
    *
-   * Here's an example of how the aggregated destination status is computed:
+   * Here's an example of how the aggregated status is computed:
    *
    * Free listings | Shopping Ads | Status
    * --------------|--------------|------------------------------
@@ -113,9 +114,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * 
* * Protobuf enum {@code - * google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus} + * google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus} */ - public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolMessageEnum { + public enum AggregatedReportingContextStatus implements com.google.protobuf.ProtocolMessageEnum { /** * * @@ -123,14 +124,14 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * Not specified. * * - * AGGREGATED_DESTINATION_STATUS_UNSPECIFIED = 0; + * AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0; */ - AGGREGATED_DESTINATION_STATUS_UNSPECIFIED(0), + AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED(0), /** * * *
-     * Product is not eligible or is disapproved for all destinations.
+     * Product is not eligible or is disapproved for all reporting contexts.
      * 
* * NOT_ELIGIBLE_OR_DISAPPROVED = 1; @@ -140,7 +141,7 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * * *
-     * Product's status is pending in all destinations.
+     * Product's status is pending in all reporting contexts.
      * 
* * PENDING = 2; @@ -150,7 +151,7 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * * *
-     * Product is eligible for some (but not all) destinations.
+     * Product is eligible for some (but not all) reporting contexts.
      * 
* * ELIGIBLE_LIMITED = 3; @@ -160,7 +161,7 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * * *
-     * Product is eligible for all destinations.
+     * Product is eligible for all reporting contexts.
      * 
* * ELIGIBLE = 4; @@ -176,14 +177,14 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * Not specified. * * - * AGGREGATED_DESTINATION_STATUS_UNSPECIFIED = 0; + * AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0; */ - public static final int AGGREGATED_DESTINATION_STATUS_UNSPECIFIED_VALUE = 0; + public static final int AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED_VALUE = 0; /** * * *
-     * Product is not eligible or is disapproved for all destinations.
+     * Product is not eligible or is disapproved for all reporting contexts.
      * 
* * NOT_ELIGIBLE_OR_DISAPPROVED = 1; @@ -193,7 +194,7 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * * *
-     * Product's status is pending in all destinations.
+     * Product's status is pending in all reporting contexts.
      * 
* * PENDING = 2; @@ -203,7 +204,7 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * * *
-     * Product is eligible for some (but not all) destinations.
+     * Product is eligible for some (but not all) reporting contexts.
      * 
* * ELIGIBLE_LIMITED = 3; @@ -213,7 +214,7 @@ public enum AggregatedDestinationStatus implements com.google.protobuf.ProtocolM * * *
-     * Product is eligible for all destinations.
+     * Product is eligible for all reporting contexts.
      * 
* * ELIGIBLE = 4; @@ -234,7 +235,7 @@ public final int getNumber() { * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated - public static AggregatedDestinationStatus valueOf(int value) { + public static AggregatedReportingContextStatus valueOf(int value) { return forNumber(value); } @@ -242,10 +243,10 @@ public static AggregatedDestinationStatus valueOf(int value) { * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ - public static AggregatedDestinationStatus forNumber(int value) { + public static AggregatedReportingContextStatus forNumber(int value) { switch (value) { case 0: - return AGGREGATED_DESTINATION_STATUS_UNSPECIFIED; + return AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED; case 1: return NOT_ELIGIBLE_OR_DISAPPROVED; case 2: @@ -259,16 +260,16 @@ public static AggregatedDestinationStatus forNumber(int value) { } } - public static com.google.protobuf.Internal.EnumLiteMap + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AggregatedDestinationStatus findValueByNumber(int number) { - return AggregatedDestinationStatus.forNumber(number); + new com.google.protobuf.Internal.EnumLiteMap() { + public AggregatedReportingContextStatus findValueByNumber(int number) { + return AggregatedReportingContextStatus.forNumber(number); } }; @@ -290,9 +291,9 @@ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor .get(0); } - private static final AggregatedDestinationStatus[] VALUES = values(); + private static final AggregatedReportingContextStatus[] VALUES = values(); - public static AggregatedDestinationStatus valueOf( + public static AggregatedReportingContextStatus valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); @@ -305,11 +306,11 @@ public static AggregatedDestinationStatus valueOf( private final int value; - private AggregatedDestinationStatus(int value) { + private AggregatedReportingContextStatus(int value) { this.value = value; } - // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus) + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus) } public interface ItemIssueOrBuilder @@ -1658,79 +1659,79 @@ public interface ItemIssueSeverityOrBuilder * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ java.util.List< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination> - getSeverityPerDestinationList(); + .IssueSeverityPerReportingContext> + getSeverityPerReportingContextList(); /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination - getSeverityPerDestination(int index); + .IssueSeverityPerReportingContext + getSeverityPerReportingContext(int index); /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - int getSeverityPerDestinationCount(); + int getSeverityPerReportingContextCount(); /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ java.util.List< ? extends com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestinationOrBuilder> - getSeverityPerDestinationOrBuilderList(); + .ItemIssueSeverity.IssueSeverityPerReportingContextOrBuilder> + getSeverityPerReportingContextOrBuilderList(); /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestinationOrBuilder - getSeverityPerDestinationOrBuilder(int index); + .IssueSeverityPerReportingContextOrBuilder + getSeverityPerReportingContextOrBuilder(int index); /** * * *
-       * Aggregated severity of the issue for all destinations it affects.
+       * Aggregated severity of the issue for all reporting contexts it affects.
        *
        * **This field can be used for filtering the results.**
        * 
@@ -1746,7 +1747,7 @@ public interface ItemIssueSeverityOrBuilder * * *
-       * Aggregated severity of the issue for all destinations it affects.
+       * Aggregated severity of the issue for all reporting contexts it affects.
        *
        * **This field can be used for filtering the results.**
        * 
@@ -1762,7 +1763,7 @@ public interface ItemIssueSeverityOrBuilder * * *
-       * Aggregated severity of the issue for all destinations it affects.
+       * Aggregated severity of the issue for all reporting contexts it affects.
        *
        * **This field can be used for filtering the results.**
        * 
@@ -1798,7 +1799,7 @@ private ItemIssueSeverity(com.google.protobuf.GeneratedMessageV3.Builder buil } private ItemIssueSeverity() { - severityPerDestination_ = java.util.Collections.emptyList(); + severityPerReportingContext_ = java.util.Collections.emptyList(); aggregatedSeverity_ = 0; } @@ -1829,7 +1830,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-       * Issue severity aggregated for all destinations.
+       * Issue severity aggregated for all reporting contexts.
        * 
* * Protobuf enum {@code @@ -1850,7 +1851,7 @@ public enum AggregatedIssueSeverity implements com.google.protobuf.ProtocolMessa * * *
-         * Issue disapproves the product in at least one destination.
+         * Issue disapproves the product in at least one reporting context.
          * 
* * DISAPPROVED = 1; @@ -1860,7 +1861,7 @@ public enum AggregatedIssueSeverity implements com.google.protobuf.ProtocolMessa * * *
-         * Issue demotes the product in all destinations it affects.
+         * Issue demotes the product in all reporting contexts it affects.
          * 
* * DEMOTED = 2; @@ -1893,7 +1894,7 @@ public enum AggregatedIssueSeverity implements com.google.protobuf.ProtocolMessa * * *
-         * Issue disapproves the product in at least one destination.
+         * Issue disapproves the product in at least one reporting context.
          * 
* * DISAPPROVED = 1; @@ -1903,7 +1904,7 @@ public enum AggregatedIssueSeverity implements com.google.protobuf.ProtocolMessa * * *
-         * Issue demotes the product in all destinations it affects.
+         * Issue demotes the product in all reporting contexts it affects.
          * 
* * DEMOTED = 2; @@ -2012,54 +2013,60 @@ private AggregatedIssueSeverity(int value) { // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverity) } - public interface IssueSeverityPerDestinationOrBuilder + public interface IssueSeverityPerReportingContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination) + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext) com.google.protobuf.MessageOrBuilder { /** * * *
-         * Destination the issue applies to.
+         * Reporting context the issue applies to.
          * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return Whether the destination field is set. + * @return Whether the reportingContext field is set. */ - boolean hasDestination(); + boolean hasReportingContext(); /** * * *
-         * Destination the issue applies to.
+         * Reporting context the issue applies to.
          * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return The enum numeric value on the wire for destination. + * @return The enum numeric value on the wire for reportingContext. */ - int getDestinationValue(); + int getReportingContextValue(); /** * * *
-         * Destination the issue applies to.
+         * Reporting context the issue applies to.
          * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return The destination. + * @return The reportingContext. */ - com.google.shopping.type.Destination getDestination(); + com.google.shopping.type.ReportingContext.ReportingContextEnum getReportingContext(); /** * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2071,8 +2078,8 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2084,8 +2091,8 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2098,8 +2105,8 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2113,8 +2120,8 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2126,8 +2133,8 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2139,8 +2146,8 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2153,8 +2160,8 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2168,26 +2175,26 @@ public interface IssueSeverityPerDestinationOrBuilder * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * Protobuf type {@code - * google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination} + * google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext} */ - public static final class IssueSeverityPerDestination + public static final class IssueSeverityPerReportingContext extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination) - IssueSeverityPerDestinationOrBuilder { + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext) + IssueSeverityPerReportingContextOrBuilder { private static final long serialVersionUID = 0L; - // Use IssueSeverityPerDestination.newBuilder() to construct. - private IssueSeverityPerDestination( + // Use IssueSeverityPerReportingContext.newBuilder() to construct. + private IssueSeverityPerReportingContext( com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private IssueSeverityPerDestination() { - destination_ = 0; + private IssueSeverityPerReportingContext() { + reportingContext_ = 0; disapprovedCountries_ = com.google.protobuf.LazyStringArrayList.emptyList(); demotedCountries_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @@ -2195,75 +2202,85 @@ private IssueSeverityPerDestination() { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new IssueSeverityPerDestination(); + return new IssueSeverityPerReportingContext(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_descriptor; + .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_fieldAccessorTable + .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.class, + .ItemIssueSeverity.IssueSeverityPerReportingContext.class, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.Builder.class); + .ItemIssueSeverity.IssueSeverityPerReportingContext.Builder.class); } private int bitField0_; - public static final int DESTINATION_FIELD_NUMBER = 1; - private int destination_ = 0; + public static final int REPORTING_CONTEXT_FIELD_NUMBER = 1; + private int reportingContext_ = 0; /** * * *
-         * Destination the issue applies to.
+         * Reporting context the issue applies to.
          * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return Whether the destination field is set. + * @return Whether the reportingContext field is set. */ @java.lang.Override - public boolean hasDestination() { + public boolean hasReportingContext() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
-         * Destination the issue applies to.
+         * Reporting context the issue applies to.
          * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return The enum numeric value on the wire for destination. + * @return The enum numeric value on the wire for reportingContext. */ @java.lang.Override - public int getDestinationValue() { - return destination_; + public int getReportingContextValue() { + return reportingContext_; } /** * * *
-         * Destination the issue applies to.
+         * Reporting context the issue applies to.
          * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return The destination. + * @return The reportingContext. */ @java.lang.Override - public com.google.shopping.type.Destination getDestination() { - com.google.shopping.type.Destination result = - com.google.shopping.type.Destination.forNumber(destination_); - return result == null ? com.google.shopping.type.Destination.UNRECOGNIZED : result; + public com.google.shopping.type.ReportingContext.ReportingContextEnum + getReportingContext() { + com.google.shopping.type.ReportingContext.ReportingContextEnum result = + com.google.shopping.type.ReportingContext.ReportingContextEnum.forNumber( + reportingContext_); + return result == null + ? com.google.shopping.type.ReportingContext.ReportingContextEnum.UNRECOGNIZED + : result; } public static final int DISAPPROVED_COUNTRIES_FIELD_NUMBER = 2; @@ -2275,8 +2292,8 @@ public com.google.shopping.type.Destination getDestination() { * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2290,8 +2307,8 @@ public com.google.protobuf.ProtocolStringList getDisapprovedCountriesList() { * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2305,8 +2322,8 @@ public int getDisapprovedCountriesCount() { * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2321,8 +2338,8 @@ public java.lang.String getDisapprovedCountries(int index) { * * *
-         * List of disapproved countries in the destination, represented in ISO
-         * 3166 format.
+         * List of disapproved countries in the reporting context, represented
+         * in ISO 3166 format.
          * 
* * repeated string disapproved_countries = 2; @@ -2343,8 +2360,8 @@ public com.google.protobuf.ByteString getDisapprovedCountriesBytes(int index) { * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2358,8 +2375,8 @@ public com.google.protobuf.ProtocolStringList getDemotedCountriesList() { * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2373,8 +2390,8 @@ public int getDemotedCountriesCount() { * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2389,8 +2406,8 @@ public java.lang.String getDemotedCountries(int index) { * * *
-         * List of demoted countries in the destination, represented in ISO 3166
-         * format.
+         * List of demoted countries in the reporting context, represented in
+         * ISO 3166 format.
          * 
* * repeated string demoted_countries = 3; @@ -2418,7 +2435,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(1, destination_); + output.writeEnum(1, reportingContext_); } for (int i = 0; i < disapprovedCountries_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString( @@ -2438,7 +2455,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, destination_); + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, reportingContext_); } { int dataSize = 0; @@ -2469,19 +2486,19 @@ public boolean equals(final java.lang.Object obj) { if (!(obj instanceof com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination)) { + .IssueSeverityPerReportingContext)) { return super.equals(obj); } com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext other = (com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination) + .ItemIssueSeverity.IssueSeverityPerReportingContext) obj; - if (hasDestination() != other.hasDestination()) return false; - if (hasDestination()) { - if (destination_ != other.destination_) return false; + if (hasReportingContext() != other.hasReportingContext()) return false; + if (hasReportingContext()) { + if (reportingContext_ != other.reportingContext_) return false; } if (!getDisapprovedCountriesList().equals(other.getDisapprovedCountriesList())) return false; @@ -2497,9 +2514,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDestination()) { - hash = (37 * hash) + DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + destination_; + if (hasReportingContext()) { + hash = (37 * hash) + REPORTING_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + reportingContext_; } if (getDisapprovedCountriesCount() > 0) { hash = (37 * hash) + DISAPPROVED_COUNTRIES_FIELD_NUMBER; @@ -2515,14 +2532,14 @@ public int hashCode() { } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2531,14 +2548,14 @@ public int hashCode() { } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2547,26 +2564,26 @@ public int hashCode() { } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2576,14 +2593,14 @@ public int hashCode() { } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2593,13 +2610,13 @@ public int hashCode() { } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2619,7 +2636,7 @@ public static Builder newBuilder() { public static Builder newBuilder( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -2639,37 +2656,37 @@ protected Builder newBuilderForType( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * Protobuf type {@code - * google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination} + * google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination) + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext) com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestinationOrBuilder { + .IssueSeverityPerReportingContextOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_descriptor; + .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_fieldAccessorTable + .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.class, + .ItemIssueSeverity.IssueSeverityPerReportingContext.class, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.Builder.class); + .ItemIssueSeverity.IssueSeverityPerReportingContext.Builder.class); } // Construct using - // com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination.newBuilder() + // com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -2680,7 +2697,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - destination_ = 0; + reportingContext_ = 0; disapprovedCountries_ = com.google.protobuf.LazyStringArrayList.emptyList(); demotedCountries_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; @@ -2689,23 +2706,23 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.shopping.merchant.reports.v1beta.ReportsProto - .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_descriptor; + .internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_descriptor; } @java.lang.Override public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext getDefaultInstanceForType() { return com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.getDefaultInstance(); + .ItemIssueSeverity.IssueSeverityPerReportingContext.getDefaultInstance(); } @java.lang.Override public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext build() { com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -2715,13 +2732,13 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { @java.lang.Override public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext buildPartial() { com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext result = new com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination(this); + .ItemIssueSeverity.IssueSeverityPerReportingContext(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -2731,12 +2748,12 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { private void buildPartial0( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.destination_ = destination_; + result.reportingContext_ = reportingContext_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { @@ -2790,10 +2807,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination) { + .IssueSeverityPerReportingContext) { return mergeFrom( (com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination) + .ItemIssueSeverity.IssueSeverityPerReportingContext) other); } else { super.mergeFrom(other); @@ -2803,14 +2820,14 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext other) { if (other == com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.getDefaultInstance()) + .ItemIssueSeverity.IssueSeverityPerReportingContext.getDefaultInstance()) return this; - if (other.hasDestination()) { - setDestination(other.getDestination()); + if (other.hasReportingContext()) { + setReportingContext(other.getReportingContext()); } if (!other.disapprovedCountries_.isEmpty()) { if (disapprovedCountries_.isEmpty()) { @@ -2860,7 +2877,7 @@ public Builder mergeFrom( break; case 8: { - destination_ = input.readEnum(); + reportingContext_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 @@ -2897,51 +2914,57 @@ public Builder mergeFrom( private int bitField0_; - private int destination_ = 0; + private int reportingContext_ = 0; /** * * *
-           * Destination the issue applies to.
+           * Reporting context the issue applies to.
            * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return Whether the destination field is set. + * @return Whether the reportingContext field is set. */ @java.lang.Override - public boolean hasDestination() { + public boolean hasReportingContext() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
-           * Destination the issue applies to.
+           * Reporting context the issue applies to.
            * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return The enum numeric value on the wire for destination. + * @return The enum numeric value on the wire for reportingContext. */ @java.lang.Override - public int getDestinationValue() { - return destination_; + public int getReportingContextValue() { + return reportingContext_; } /** * * *
-           * Destination the issue applies to.
+           * Reporting context the issue applies to.
            * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @param value The enum numeric value on the wire for destination to set. + * @param value The enum numeric value on the wire for reportingContext to set. * @return This builder for chaining. */ - public Builder setDestinationValue(int value) { - destination_ = value; + public Builder setReportingContextValue(int value) { + reportingContext_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -2950,37 +2973,46 @@ public Builder setDestinationValue(int value) { * * *
-           * Destination the issue applies to.
+           * Reporting context the issue applies to.
            * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @return The destination. + * @return The reportingContext. */ @java.lang.Override - public com.google.shopping.type.Destination getDestination() { - com.google.shopping.type.Destination result = - com.google.shopping.type.Destination.forNumber(destination_); - return result == null ? com.google.shopping.type.Destination.UNRECOGNIZED : result; + public com.google.shopping.type.ReportingContext.ReportingContextEnum + getReportingContext() { + com.google.shopping.type.ReportingContext.ReportingContextEnum result = + com.google.shopping.type.ReportingContext.ReportingContextEnum.forNumber( + reportingContext_); + return result == null + ? com.google.shopping.type.ReportingContext.ReportingContextEnum.UNRECOGNIZED + : result; } /** * * *
-           * Destination the issue applies to.
+           * Reporting context the issue applies to.
            * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * - * @param value The destination to set. + * @param value The reportingContext to set. * @return This builder for chaining. */ - public Builder setDestination(com.google.shopping.type.Destination value) { + public Builder setReportingContext( + com.google.shopping.type.ReportingContext.ReportingContextEnum value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - destination_ = value.getNumber(); + reportingContext_ = value.getNumber(); onChanged(); return this; } @@ -2988,16 +3020,18 @@ public Builder setDestination(com.google.shopping.type.Destination value) { * * *
-           * Destination the issue applies to.
+           * Reporting context the issue applies to.
            * 
* - * optional .google.shopping.type.Destination destination = 1; + * + * optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1; + * * * @return This builder for chaining. */ - public Builder clearDestination() { + public Builder clearReportingContext() { bitField0_ = (bitField0_ & ~0x00000001); - destination_ = 0; + reportingContext_ = 0; onChanged(); return this; } @@ -3016,8 +3050,8 @@ private void ensureDisapprovedCountriesIsMutable() { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3032,8 +3066,8 @@ public com.google.protobuf.ProtocolStringList getDisapprovedCountriesList() { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3047,8 +3081,8 @@ public int getDisapprovedCountriesCount() { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3063,8 +3097,8 @@ public java.lang.String getDisapprovedCountries(int index) { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3079,8 +3113,8 @@ public com.google.protobuf.ByteString getDisapprovedCountriesBytes(int index) { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3103,8 +3137,8 @@ public Builder setDisapprovedCountries(int index, java.lang.String value) { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3126,8 +3160,8 @@ public Builder addDisapprovedCountries(java.lang.String value) { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3146,8 +3180,8 @@ public Builder addAllDisapprovedCountries(java.lang.Iterable v * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3165,8 +3199,8 @@ public Builder clearDisapprovedCountries() { * * *
-           * List of disapproved countries in the destination, represented in ISO
-           * 3166 format.
+           * List of disapproved countries in the reporting context, represented
+           * in ISO 3166 format.
            * 
* * repeated string disapproved_countries = 2; @@ -3199,8 +3233,8 @@ private void ensureDemotedCountriesIsMutable() { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3215,8 +3249,8 @@ public com.google.protobuf.ProtocolStringList getDemotedCountriesList() { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3230,8 +3264,8 @@ public int getDemotedCountriesCount() { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3246,8 +3280,8 @@ public java.lang.String getDemotedCountries(int index) { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3262,8 +3296,8 @@ public com.google.protobuf.ByteString getDemotedCountriesBytes(int index) { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3286,8 +3320,8 @@ public Builder setDemotedCountries(int index, java.lang.String value) { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3309,8 +3343,8 @@ public Builder addDemotedCountries(java.lang.String value) { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3329,8 +3363,8 @@ public Builder addAllDemotedCountries(java.lang.Iterable value * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3348,8 +3382,8 @@ public Builder clearDemotedCountries() { * * *
-           * List of demoted countries in the destination, represented in ISO 3166
-           * format.
+           * List of demoted countries in the reporting context, represented in
+           * ISO 3166 format.
            * 
* * repeated string demoted_countries = 3; @@ -3381,30 +3415,30 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination) + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext) } - // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination) + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext) private static final com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination(); + .ItemIssueSeverity.IssueSeverityPerReportingContext(); } public static com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public IssueSeverityPerDestination parsePartialFrom( + public IssueSeverityPerReportingContext parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3424,116 +3458,116 @@ public IssueSeverityPerDestination parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; - public static final int SEVERITY_PER_DESTINATION_FIELD_NUMBER = 1; + public static final int SEVERITY_PER_REPORTING_CONTEXT_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination> - severityPerDestination_; + .IssueSeverityPerReportingContext> + severityPerReportingContext_; /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ @java.lang.Override public java.util.List< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination> - getSeverityPerDestinationList() { - return severityPerDestination_; + .IssueSeverityPerReportingContext> + getSeverityPerReportingContextList() { + return severityPerReportingContext_; } /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ @java.lang.Override public java.util.List< ? extends com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestinationOrBuilder> - getSeverityPerDestinationOrBuilderList() { - return severityPerDestination_; + .ItemIssueSeverity.IssueSeverityPerReportingContextOrBuilder> + getSeverityPerReportingContextOrBuilderList() { + return severityPerReportingContext_; } /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ @java.lang.Override - public int getSeverityPerDestinationCount() { - return severityPerDestination_.size(); + public int getSeverityPerReportingContextCount() { + return severityPerReportingContext_.size(); } /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ @java.lang.Override public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination - getSeverityPerDestination(int index) { - return severityPerDestination_.get(index); + .IssueSeverityPerReportingContext + getSeverityPerReportingContext(int index) { + return severityPerReportingContext_.get(index); } /** * * *
-       * Issue severity per destination.
+       * Issue severity per reporting context.
        * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ @java.lang.Override public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestinationOrBuilder - getSeverityPerDestinationOrBuilder(int index) { - return severityPerDestination_.get(index); + .IssueSeverityPerReportingContextOrBuilder + getSeverityPerReportingContextOrBuilder(int index) { + return severityPerReportingContext_.get(index); } public static final int AGGREGATED_SEVERITY_FIELD_NUMBER = 2; @@ -3542,7 +3576,7 @@ public int getSeverityPerDestinationCount() { * * *
-       * Aggregated severity of the issue for all destinations it affects.
+       * Aggregated severity of the issue for all reporting contexts it affects.
        *
        * **This field can be used for filtering the results.**
        * 
@@ -3561,7 +3595,7 @@ public boolean hasAggregatedSeverity() { * * *
-       * Aggregated severity of the issue for all destinations it affects.
+       * Aggregated severity of the issue for all reporting contexts it affects.
        *
        * **This field can be used for filtering the results.**
        * 
@@ -3580,7 +3614,7 @@ public int getAggregatedSeverityValue() { * * *
-       * Aggregated severity of the issue for all destinations it affects.
+       * Aggregated severity of the issue for all reporting contexts it affects.
        *
        * **This field can be used for filtering the results.**
        * 
@@ -3620,8 +3654,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < severityPerDestination_.size(); i++) { - output.writeMessage(1, severityPerDestination_.get(i)); + for (int i = 0; i < severityPerReportingContext_.size(); i++) { + output.writeMessage(1, severityPerReportingContext_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeEnum(2, aggregatedSeverity_); @@ -3635,10 +3669,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < severityPerDestination_.size(); i++) { + for (int i = 0; i < severityPerReportingContext_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, severityPerDestination_.get(i)); + 1, severityPerReportingContext_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, aggregatedSeverity_); @@ -3662,8 +3696,8 @@ public boolean equals(final java.lang.Object obj) { (com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity) obj; - if (!getSeverityPerDestinationList().equals(other.getSeverityPerDestinationList())) - return false; + if (!getSeverityPerReportingContextList() + .equals(other.getSeverityPerReportingContextList())) return false; if (hasAggregatedSeverity() != other.hasAggregatedSeverity()) return false; if (hasAggregatedSeverity()) { if (aggregatedSeverity_ != other.aggregatedSeverity_) return false; @@ -3679,9 +3713,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSeverityPerDestinationCount() > 0) { - hash = (37 * hash) + SEVERITY_PER_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getSeverityPerDestinationList().hashCode(); + if (getSeverityPerReportingContextCount() > 0) { + hash = (37 * hash) + SEVERITY_PER_REPORTING_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getSeverityPerReportingContextList().hashCode(); } if (hasAggregatedSeverity()) { hash = (37 * hash) + AGGREGATED_SEVERITY_FIELD_NUMBER; @@ -3855,11 +3889,11 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - if (severityPerDestinationBuilder_ == null) { - severityPerDestination_ = java.util.Collections.emptyList(); + if (severityPerReportingContextBuilder_ == null) { + severityPerReportingContext_ = java.util.Collections.emptyList(); } else { - severityPerDestination_ = null; - severityPerDestinationBuilder_.clear(); + severityPerReportingContext_ = null; + severityPerReportingContextBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); aggregatedSeverity_ = 0; @@ -3908,15 +3942,15 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { private void buildPartialRepeatedFields( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity result) { - if (severityPerDestinationBuilder_ == null) { + if (severityPerReportingContextBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - severityPerDestination_ = - java.util.Collections.unmodifiableList(severityPerDestination_); + severityPerReportingContext_ = + java.util.Collections.unmodifiableList(severityPerReportingContext_); bitField0_ = (bitField0_ & ~0x00000001); } - result.severityPerDestination_ = severityPerDestination_; + result.severityPerReportingContext_ = severityPerReportingContext_; } else { - result.severityPerDestination_ = severityPerDestinationBuilder_.build(); + result.severityPerReportingContext_ = severityPerReportingContextBuilder_.build(); } } @@ -3988,30 +4022,31 @@ public Builder mergeFrom( if (other == com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity .getDefaultInstance()) return this; - if (severityPerDestinationBuilder_ == null) { - if (!other.severityPerDestination_.isEmpty()) { - if (severityPerDestination_.isEmpty()) { - severityPerDestination_ = other.severityPerDestination_; + if (severityPerReportingContextBuilder_ == null) { + if (!other.severityPerReportingContext_.isEmpty()) { + if (severityPerReportingContext_.isEmpty()) { + severityPerReportingContext_ = other.severityPerReportingContext_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.addAll(other.severityPerDestination_); + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.addAll(other.severityPerReportingContext_); } onChanged(); } } else { - if (!other.severityPerDestination_.isEmpty()) { - if (severityPerDestinationBuilder_.isEmpty()) { - severityPerDestinationBuilder_.dispose(); - severityPerDestinationBuilder_ = null; - severityPerDestination_ = other.severityPerDestination_; + if (!other.severityPerReportingContext_.isEmpty()) { + if (severityPerReportingContextBuilder_.isEmpty()) { + severityPerReportingContextBuilder_.dispose(); + severityPerReportingContextBuilder_ = null; + severityPerReportingContext_ = other.severityPerReportingContext_; bitField0_ = (bitField0_ & ~0x00000001); - severityPerDestinationBuilder_ = + severityPerReportingContextBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSeverityPerDestinationFieldBuilder() + ? getSeverityPerReportingContextFieldBuilder() : null; } else { - severityPerDestinationBuilder_.addAllMessages(other.severityPerDestination_); + severityPerReportingContextBuilder_.addAllMessages( + other.severityPerReportingContext_); } } } @@ -4047,17 +4082,17 @@ public Builder mergeFrom( case 10: { com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination + .ItemIssueSeverity.IssueSeverityPerReportingContext m = input.readMessage( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.parser(), + .ItemIssueSeverity.IssueSeverityPerReportingContext.parser(), extensionRegistry); - if (severityPerDestinationBuilder_ == null) { - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.add(m); + if (severityPerReportingContextBuilder_ == null) { + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.add(m); } else { - severityPerDestinationBuilder_.addMessage(m); + severityPerReportingContextBuilder_.addMessage(m); } break; } // case 10 @@ -4088,112 +4123,113 @@ public Builder mergeFrom( private java.util.List< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination> - severityPerDestination_ = java.util.Collections.emptyList(); + .IssueSeverityPerReportingContext> + severityPerReportingContext_ = java.util.Collections.emptyList(); - private void ensureSeverityPerDestinationIsMutable() { + private void ensureSeverityPerReportingContextIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - severityPerDestination_ = + severityPerReportingContext_ = new java.util.ArrayList< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination>(severityPerDestination_); + .ItemIssueSeverity.IssueSeverityPerReportingContext>( + severityPerReportingContext_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination, + .IssueSeverityPerReportingContext, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder, + .IssueSeverityPerReportingContext.Builder, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestinationOrBuilder> - severityPerDestinationBuilder_; + .IssueSeverityPerReportingContextOrBuilder> + severityPerReportingContextBuilder_; /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public java.util.List< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination> - getSeverityPerDestinationList() { - if (severityPerDestinationBuilder_ == null) { - return java.util.Collections.unmodifiableList(severityPerDestination_); + .IssueSeverityPerReportingContext> + getSeverityPerReportingContextList() { + if (severityPerReportingContextBuilder_ == null) { + return java.util.Collections.unmodifiableList(severityPerReportingContext_); } else { - return severityPerDestinationBuilder_.getMessageList(); + return severityPerReportingContextBuilder_.getMessageList(); } } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public int getSeverityPerDestinationCount() { - if (severityPerDestinationBuilder_ == null) { - return severityPerDestination_.size(); + public int getSeverityPerReportingContextCount() { + if (severityPerReportingContextBuilder_ == null) { + return severityPerReportingContext_.size(); } else { - return severityPerDestinationBuilder_.getCount(); + return severityPerReportingContextBuilder_.getCount(); } } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination - getSeverityPerDestination(int index) { - if (severityPerDestinationBuilder_ == null) { - return severityPerDestination_.get(index); + .IssueSeverityPerReportingContext + getSeverityPerReportingContext(int index) { + if (severityPerReportingContextBuilder_ == null) { + return severityPerReportingContext_.get(index); } else { - return severityPerDestinationBuilder_.getMessage(index); + return severityPerReportingContextBuilder_.getMessage(index); } } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder setSeverityPerDestination( + public Builder setSeverityPerReportingContext( int index, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext value) { - if (severityPerDestinationBuilder_ == null) { + if (severityPerReportingContextBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.set(index, value); + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.set(index, value); onChanged(); } else { - severityPerDestinationBuilder_.setMessage(index, value); + severityPerReportingContextBuilder_.setMessage(index, value); } return this; } @@ -4201,24 +4237,24 @@ public Builder setSeverityPerDestination( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder setSeverityPerDestination( + public Builder setSeverityPerReportingContext( int index, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder + .IssueSeverityPerReportingContext.Builder builderForValue) { - if (severityPerDestinationBuilder_ == null) { - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.set(index, builderForValue.build()); + if (severityPerReportingContextBuilder_ == null) { + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.set(index, builderForValue.build()); onChanged(); } else { - severityPerDestinationBuilder_.setMessage(index, builderForValue.build()); + severityPerReportingContextBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -4226,26 +4262,26 @@ public Builder setSeverityPerDestination( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder addSeverityPerDestination( + public Builder addSeverityPerReportingContext( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext value) { - if (severityPerDestinationBuilder_ == null) { + if (severityPerReportingContextBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.add(value); + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.add(value); onChanged(); } else { - severityPerDestinationBuilder_.addMessage(value); + severityPerReportingContextBuilder_.addMessage(value); } return this; } @@ -4253,27 +4289,27 @@ public Builder addSeverityPerDestination( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder addSeverityPerDestination( + public Builder addSeverityPerReportingContext( int index, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination + .IssueSeverityPerReportingContext value) { - if (severityPerDestinationBuilder_ == null) { + if (severityPerReportingContextBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.add(index, value); + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.add(index, value); onChanged(); } else { - severityPerDestinationBuilder_.addMessage(index, value); + severityPerReportingContextBuilder_.addMessage(index, value); } return this; } @@ -4281,23 +4317,23 @@ public Builder addSeverityPerDestination( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder addSeverityPerDestination( + public Builder addSeverityPerReportingContext( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder + .IssueSeverityPerReportingContext.Builder builderForValue) { - if (severityPerDestinationBuilder_ == null) { - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.add(builderForValue.build()); + if (severityPerReportingContextBuilder_ == null) { + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.add(builderForValue.build()); onChanged(); } else { - severityPerDestinationBuilder_.addMessage(builderForValue.build()); + severityPerReportingContextBuilder_.addMessage(builderForValue.build()); } return this; } @@ -4305,24 +4341,24 @@ public Builder addSeverityPerDestination( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder addSeverityPerDestination( + public Builder addSeverityPerReportingContext( int index, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder + .IssueSeverityPerReportingContext.Builder builderForValue) { - if (severityPerDestinationBuilder_ == null) { - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.add(index, builderForValue.build()); + if (severityPerReportingContextBuilder_ == null) { + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.add(index, builderForValue.build()); onChanged(); } else { - severityPerDestinationBuilder_.addMessage(index, builderForValue.build()); + severityPerReportingContextBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -4330,25 +4366,26 @@ public Builder addSeverityPerDestination( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder addAllSeverityPerDestination( + public Builder addAllSeverityPerReportingContext( java.lang.Iterable< ? extends com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination> + .ItemIssueSeverity.IssueSeverityPerReportingContext> values) { - if (severityPerDestinationBuilder_ == null) { - ensureSeverityPerDestinationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, severityPerDestination_); + if (severityPerReportingContextBuilder_ == null) { + ensureSeverityPerReportingContextIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, severityPerReportingContext_); onChanged(); } else { - severityPerDestinationBuilder_.addAllMessages(values); + severityPerReportingContextBuilder_.addAllMessages(values); } return this; } @@ -4356,20 +4393,20 @@ public Builder addAllSeverityPerDestination( * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder clearSeverityPerDestination() { - if (severityPerDestinationBuilder_ == null) { - severityPerDestination_ = java.util.Collections.emptyList(); + public Builder clearSeverityPerReportingContext() { + if (severityPerReportingContextBuilder_ == null) { + severityPerReportingContext_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - severityPerDestinationBuilder_.clear(); + severityPerReportingContextBuilder_.clear(); } return this; } @@ -4377,20 +4414,20 @@ public Builder clearSeverityPerDestination() { * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ - public Builder removeSeverityPerDestination(int index) { - if (severityPerDestinationBuilder_ == null) { - ensureSeverityPerDestinationIsMutable(); - severityPerDestination_.remove(index); + public Builder removeSeverityPerReportingContext(int index) { + if (severityPerReportingContextBuilder_ == null) { + ensureSeverityPerReportingContextIsMutable(); + severityPerReportingContext_.remove(index); onChanged(); } else { - severityPerDestinationBuilder_.remove(index); + severityPerReportingContextBuilder_.remove(index); } return this; } @@ -4398,141 +4435,141 @@ public Builder removeSeverityPerDestination(int index) { * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder - getSeverityPerDestinationBuilder(int index) { - return getSeverityPerDestinationFieldBuilder().getBuilder(index); + .IssueSeverityPerReportingContext.Builder + getSeverityPerReportingContextBuilder(int index) { + return getSeverityPerReportingContextFieldBuilder().getBuilder(index); } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestinationOrBuilder - getSeverityPerDestinationOrBuilder(int index) { - if (severityPerDestinationBuilder_ == null) { - return severityPerDestination_.get(index); + .IssueSeverityPerReportingContextOrBuilder + getSeverityPerReportingContextOrBuilder(int index) { + if (severityPerReportingContextBuilder_ == null) { + return severityPerReportingContext_.get(index); } else { - return severityPerDestinationBuilder_.getMessageOrBuilder(index); + return severityPerReportingContextBuilder_.getMessageOrBuilder(index); } } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public java.util.List< ? extends com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestinationOrBuilder> - getSeverityPerDestinationOrBuilderList() { - if (severityPerDestinationBuilder_ != null) { - return severityPerDestinationBuilder_.getMessageOrBuilderList(); + .ItemIssueSeverity.IssueSeverityPerReportingContextOrBuilder> + getSeverityPerReportingContextOrBuilderList() { + if (severityPerReportingContextBuilder_ != null) { + return severityPerReportingContextBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(severityPerDestination_); + return java.util.Collections.unmodifiableList(severityPerReportingContext_); } } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder - addSeverityPerDestinationBuilder() { - return getSeverityPerDestinationFieldBuilder() + .IssueSeverityPerReportingContext.Builder + addSeverityPerReportingContextBuilder() { + return getSeverityPerReportingContextFieldBuilder() .addBuilder( com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.getDefaultInstance()); + .ItemIssueSeverity.IssueSeverityPerReportingContext.getDefaultInstance()); } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder - addSeverityPerDestinationBuilder(int index) { - return getSeverityPerDestinationFieldBuilder() + .IssueSeverityPerReportingContext.Builder + addSeverityPerReportingContextBuilder(int index) { + return getSeverityPerReportingContextFieldBuilder() .addBuilder( index, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.getDefaultInstance()); + .ItemIssueSeverity.IssueSeverityPerReportingContext.getDefaultInstance()); } /** * * *
-         * Issue severity per destination.
+         * Issue severity per reporting context.
          * 
* * - * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerDestination severity_per_destination = 1; + * repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext severity_per_reporting_context = 1; * */ public java.util.List< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder> - getSeverityPerDestinationBuilderList() { - return getSeverityPerDestinationFieldBuilder().getBuilderList(); + .IssueSeverityPerReportingContext.Builder> + getSeverityPerReportingContextBuilderList() { + return getSeverityPerReportingContextFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination, + .IssueSeverityPerReportingContext, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestination.Builder, + .IssueSeverityPerReportingContext.Builder, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity - .IssueSeverityPerDestinationOrBuilder> - getSeverityPerDestinationFieldBuilder() { - if (severityPerDestinationBuilder_ == null) { - severityPerDestinationBuilder_ = + .IssueSeverityPerReportingContextOrBuilder> + getSeverityPerReportingContextFieldBuilder() { + if (severityPerReportingContextBuilder_ == null) { + severityPerReportingContextBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination, + .ItemIssueSeverity.IssueSeverityPerReportingContext, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestination.Builder, + .ItemIssueSeverity.IssueSeverityPerReportingContext.Builder, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue - .ItemIssueSeverity.IssueSeverityPerDestinationOrBuilder>( - severityPerDestination_, + .ItemIssueSeverity.IssueSeverityPerReportingContextOrBuilder>( + severityPerReportingContext_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - severityPerDestination_ = null; + severityPerReportingContext_ = null; } - return severityPerDestinationBuilder_; + return severityPerReportingContextBuilder_; } private int aggregatedSeverity_ = 0; @@ -4540,7 +4577,7 @@ public Builder removeSeverityPerDestination(int index) { * * *
-         * Aggregated severity of the issue for all destinations it affects.
+         * Aggregated severity of the issue for all reporting contexts it affects.
          *
          * **This field can be used for filtering the results.**
          * 
@@ -4559,7 +4596,7 @@ public boolean hasAggregatedSeverity() { * * *
-         * Aggregated severity of the issue for all destinations it affects.
+         * Aggregated severity of the issue for all reporting contexts it affects.
          *
          * **This field can be used for filtering the results.**
          * 
@@ -4578,7 +4615,7 @@ public int getAggregatedSeverityValue() { * * *
-         * Aggregated severity of the issue for all destinations it affects.
+         * Aggregated severity of the issue for all reporting contexts it affects.
          *
          * **This field can be used for filtering the results.**
          * 
@@ -4600,7 +4637,7 @@ public Builder setAggregatedSeverityValue(int value) { * * *
-         * Aggregated severity of the issue for all destinations it affects.
+         * Aggregated severity of the issue for all reporting contexts it affects.
          *
          * **This field can be used for filtering the results.**
          * 
@@ -4629,7 +4666,7 @@ public Builder setAggregatedSeverityValue(int value) { * * *
-         * Aggregated severity of the issue for all destinations it affects.
+         * Aggregated severity of the issue for all reporting contexts it affects.
          *
          * **This field can be used for filtering the results.**
          * 
@@ -4657,7 +4694,7 @@ public Builder setAggregatedSeverity( * * *
-         * Aggregated severity of the issue for all destinations it affects.
+         * Aggregated severity of the issue for all reporting contexts it affects.
          *
          * **This field can be used for filtering the results.**
          * 
@@ -5994,9 +6031,9 @@ public com.google.protobuf.Parser getParserForType() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-   * Merchant API methods that operate on products take this as their `name`
-   * parameter.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+   * on products take this as their `name` parameter.
    *
    * Required in the `SELECT` clause.
    * 
@@ -6013,9 +6050,9 @@ public boolean hasId() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-   * Merchant API methods that operate on products take this as their `name`
-   * parameter.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+   * on products take this as their `name` parameter.
    *
    * Required in the `SELECT` clause.
    * 
@@ -6040,9 +6077,9 @@ public java.lang.String getId() { * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-   * Merchant API methods that operate on products take this as their `name`
-   * parameter.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+   * on products take this as their `name` parameter.
    *
    * Required in the `SELECT` clause.
    * 
@@ -6064,6 +6101,56 @@ public com.google.protobuf.ByteString getIdBytes() { } } + public static final int CHANNEL_FIELD_NUMBER = 28; + private int channel_ = 0; + /** + * + * + *
+   * Channel of the product. Can be `ONLINE` or `LOCAL`.
+   * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return Whether the channel field is set. + */ + @java.lang.Override + public boolean hasChannel() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Channel of the product. Can be `ONLINE` or `LOCAL`.
+   * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return The enum numeric value on the wire for channel. + */ + @java.lang.Override + public int getChannelValue() { + return channel_; + } + /** + * + * + *
+   * Channel of the product. Can be `ONLINE` or `LOCAL`.
+   * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return The channel. + */ + @java.lang.Override + public com.google.shopping.type.Channel.ChannelEnum getChannel() { + com.google.shopping.type.Channel.ChannelEnum result = + com.google.shopping.type.Channel.ChannelEnum.forNumber(channel_); + return result == null ? com.google.shopping.type.Channel.ChannelEnum.UNRECOGNIZED : result; + } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; @SuppressWarnings("serial") @@ -6081,7 +6168,7 @@ public com.google.protobuf.ByteString getIdBytes() { */ @java.lang.Override public boolean hasLanguageCode() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -6147,7 +6234,7 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { */ @java.lang.Override public boolean hasFeedLabel() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -6213,7 +6300,7 @@ public com.google.protobuf.ByteString getFeedLabelBytes() { */ @java.lang.Override public boolean hasOfferId() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -6279,7 +6366,7 @@ public com.google.protobuf.ByteString getOfferIdBytes() { */ @java.lang.Override public boolean hasTitle() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -6345,7 +6432,7 @@ public com.google.protobuf.ByteString getTitleBytes() { */ @java.lang.Override public boolean hasBrand() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -6412,7 +6499,7 @@ public com.google.protobuf.ByteString getBrandBytes() { */ @java.lang.Override public boolean hasCategoryL1() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -6481,7 +6568,7 @@ public com.google.protobuf.ByteString getCategoryL1Bytes() { */ @java.lang.Override public boolean hasCategoryL2() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -6550,7 +6637,7 @@ public com.google.protobuf.ByteString getCategoryL2Bytes() { */ @java.lang.Override public boolean hasCategoryL3() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -6619,7 +6706,7 @@ public com.google.protobuf.ByteString getCategoryL3Bytes() { */ @java.lang.Override public boolean hasCategoryL4() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -6688,7 +6775,7 @@ public com.google.protobuf.ByteString getCategoryL4Bytes() { */ @java.lang.Override public boolean hasCategoryL5() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -6757,7 +6844,7 @@ public com.google.protobuf.ByteString getCategoryL5Bytes() { */ @java.lang.Override public boolean hasProductTypeL1() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** * @@ -6826,7 +6913,7 @@ public com.google.protobuf.ByteString getProductTypeL1Bytes() { */ @java.lang.Override public boolean hasProductTypeL2() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -6895,7 +6982,7 @@ public com.google.protobuf.ByteString getProductTypeL2Bytes() { */ @java.lang.Override public boolean hasProductTypeL3() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -6964,7 +7051,7 @@ public com.google.protobuf.ByteString getProductTypeL3Bytes() { */ @java.lang.Override public boolean hasProductTypeL4() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -7033,7 +7120,7 @@ public com.google.protobuf.ByteString getProductTypeL4Bytes() { */ @java.lang.Override public boolean hasProductTypeL5() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -7151,7 +7238,7 @@ public com.google.shopping.type.PriceOrBuilder getPriceOrBuilder() { */ @java.lang.Override public boolean hasCondition() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -7220,7 +7307,7 @@ public com.google.protobuf.ByteString getConditionBytes() { */ @java.lang.Override public boolean hasAvailability() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -7290,7 +7377,7 @@ public com.google.protobuf.ByteString getAvailabilityBytes() { */ @java.lang.Override public boolean hasShippingLabel() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -7424,7 +7511,7 @@ public com.google.protobuf.ByteString getGtinBytes(int index) { */ @java.lang.Override public boolean hasItemGroupId() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** * @@ -7491,7 +7578,7 @@ public com.google.protobuf.ByteString getItemGroupIdBytes() { */ @java.lang.Override public boolean hasThumbnailLink() { - return ((bitField0_ & 0x00100000) != 0); + return ((bitField0_ & 0x00200000) != 0); } /** * @@ -7638,63 +7725,64 @@ public com.google.type.DateOrBuilder getExpirationDateOrBuilder() { return expirationDate_ == null ? com.google.type.Date.getDefaultInstance() : expirationDate_; } - public static final int AGGREGATED_DESTINATION_STATUS_FIELD_NUMBER = 26; - private int aggregatedDestinationStatus_ = 0; + public static final int AGGREGATED_REPORTING_CONTEXT_STATUS_FIELD_NUMBER = 26; + private int aggregatedReportingContextStatus_ = 0; /** * * *
-   * Aggregated destination status.
+   * Aggregated status.
    * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return Whether the aggregatedDestinationStatus field is set. + * @return Whether the aggregatedReportingContextStatus field is set. */ @java.lang.Override - public boolean hasAggregatedDestinationStatus() { - return ((bitField0_ & 0x00200000) != 0); + public boolean hasAggregatedReportingContextStatus() { + return ((bitField0_ & 0x00400000) != 0); } /** * * *
-   * Aggregated destination status.
+   * Aggregated status.
    * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return The enum numeric value on the wire for aggregatedDestinationStatus. + * @return The enum numeric value on the wire for aggregatedReportingContextStatus. */ @java.lang.Override - public int getAggregatedDestinationStatusValue() { - return aggregatedDestinationStatus_; + public int getAggregatedReportingContextStatusValue() { + return aggregatedReportingContextStatus_; } /** * * *
-   * Aggregated destination status.
+   * Aggregated status.
    * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return The aggregatedDestinationStatus. + * @return The aggregatedReportingContextStatus. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus - getAggregatedDestinationStatus() { - com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus result = - com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus - .forNumber(aggregatedDestinationStatus_); + public com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus + getAggregatedReportingContextStatus() { + com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus + result = + com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus + .forNumber(aggregatedReportingContextStatus_); return result == null - ? com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus + ? com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus .UNRECOGNIZED : result; } @@ -7827,70 +7915,70 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, feedLabel_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, offerId_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, title_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, brand_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, categoryL1_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, categoryL2_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, categoryL3_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, categoryL4_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, categoryL5_); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, productTypeL1_); } - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 13, productTypeL2_); } - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00004000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, productTypeL3_); } - if (((bitField0_ & 0x00004000) != 0)) { + if (((bitField0_ & 0x00008000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, productTypeL4_); } - if (((bitField0_ & 0x00008000) != 0)) { + if (((bitField0_ & 0x00010000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 16, productTypeL5_); } if (price_ != null) { output.writeMessage(17, getPrice()); } - if (((bitField0_ & 0x00010000) != 0)) { + if (((bitField0_ & 0x00020000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, condition_); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00040000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 19, availability_); } - if (((bitField0_ & 0x00040000) != 0)) { + if (((bitField0_ & 0x00080000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 20, shippingLabel_); } for (int i = 0; i < gtin_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, gtin_.getRaw(i)); } - if (((bitField0_ & 0x00080000) != 0)) { + if (((bitField0_ & 0x00100000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 22, itemGroupId_); } - if (((bitField0_ & 0x00100000) != 0)) { + if (((bitField0_ & 0x00200000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 23, thumbnailLink_); } if (creationTime_ != null) { @@ -7899,12 +7987,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (expirationDate_ != null) { output.writeMessage(25, getExpirationDate()); } - if (((bitField0_ & 0x00200000) != 0)) { - output.writeEnum(26, aggregatedDestinationStatus_); + if (((bitField0_ & 0x00400000) != 0)) { + output.writeEnum(26, aggregatedReportingContextStatus_); } for (int i = 0; i < itemIssues_.size(); i++) { output.writeMessage(27, itemIssues_.get(i)); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeEnum(28, channel_); + } getUnknownFields().writeTo(output); } @@ -7917,61 +8008,61 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, feedLabel_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, offerId_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, title_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, brand_); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, categoryL1_); } - if (((bitField0_ & 0x00000080) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, categoryL2_); } - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, categoryL3_); } - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, categoryL4_); } - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, categoryL5_); } - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, productTypeL1_); } - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, productTypeL2_); } - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00004000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, productTypeL3_); } - if (((bitField0_ & 0x00004000) != 0)) { + if (((bitField0_ & 0x00008000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, productTypeL4_); } - if (((bitField0_ & 0x00008000) != 0)) { + if (((bitField0_ & 0x00010000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, productTypeL5_); } if (price_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getPrice()); } - if (((bitField0_ & 0x00010000) != 0)) { + if (((bitField0_ & 0x00020000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, condition_); } - if (((bitField0_ & 0x00020000) != 0)) { + if (((bitField0_ & 0x00040000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, availability_); } - if (((bitField0_ & 0x00040000) != 0)) { + if (((bitField0_ & 0x00080000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, shippingLabel_); } { @@ -7982,10 +8073,10 @@ public int getSerializedSize() { size += dataSize; size += 2 * getGtinList().size(); } - if (((bitField0_ & 0x00080000) != 0)) { + if (((bitField0_ & 0x00100000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, itemGroupId_); } - if (((bitField0_ & 0x00100000) != 0)) { + if (((bitField0_ & 0x00200000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, thumbnailLink_); } if (creationTime_ != null) { @@ -7994,13 +8085,17 @@ public int getSerializedSize() { if (expirationDate_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getExpirationDate()); } - if (((bitField0_ & 0x00200000) != 0)) { + if (((bitField0_ & 0x00400000) != 0)) { size += - com.google.protobuf.CodedOutputStream.computeEnumSize(26, aggregatedDestinationStatus_); + com.google.protobuf.CodedOutputStream.computeEnumSize( + 26, aggregatedReportingContextStatus_); } for (int i = 0; i < itemIssues_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, itemIssues_.get(i)); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(28, channel_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8021,6 +8116,10 @@ public boolean equals(final java.lang.Object obj) { if (hasId()) { if (!getId().equals(other.getId())) return false; } + if (hasChannel() != other.hasChannel()) return false; + if (hasChannel()) { + if (channel_ != other.channel_) return false; + } if (hasLanguageCode() != other.hasLanguageCode()) return false; if (hasLanguageCode()) { if (!getLanguageCode().equals(other.getLanguageCode())) return false; @@ -8114,9 +8213,11 @@ public boolean equals(final java.lang.Object obj) { if (hasExpirationDate()) { if (!getExpirationDate().equals(other.getExpirationDate())) return false; } - if (hasAggregatedDestinationStatus() != other.hasAggregatedDestinationStatus()) return false; - if (hasAggregatedDestinationStatus()) { - if (aggregatedDestinationStatus_ != other.aggregatedDestinationStatus_) return false; + if (hasAggregatedReportingContextStatus() != other.hasAggregatedReportingContextStatus()) + return false; + if (hasAggregatedReportingContextStatus()) { + if (aggregatedReportingContextStatus_ != other.aggregatedReportingContextStatus_) + return false; } if (!getItemIssuesList().equals(other.getItemIssuesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -8134,6 +8235,10 @@ public int hashCode() { hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); } + if (hasChannel()) { + hash = (37 * hash) + CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + channel_; + } if (hasLanguageCode()) { hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); @@ -8230,9 +8335,9 @@ public int hashCode() { hash = (37 * hash) + EXPIRATION_DATE_FIELD_NUMBER; hash = (53 * hash) + getExpirationDate().hashCode(); } - if (hasAggregatedDestinationStatus()) { - hash = (37 * hash) + AGGREGATED_DESTINATION_STATUS_FIELD_NUMBER; - hash = (53 * hash) + aggregatedDestinationStatus_; + if (hasAggregatedReportingContextStatus()) { + hash = (37 * hash) + AGGREGATED_REPORTING_CONTEXT_STATUS_FIELD_NUMBER; + hash = (53 * hash) + aggregatedReportingContextStatus_; } if (getItemIssuesCount() > 0) { hash = (37 * hash) + ITEM_ISSUES_FIELD_NUMBER; @@ -8389,6 +8494,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; + channel_ = 0; languageCode_ = ""; feedLabel_ = ""; offerId_ = ""; @@ -8425,14 +8531,14 @@ public Builder clear() { expirationDateBuilder_.dispose(); expirationDateBuilder_ = null; } - aggregatedDestinationStatus_ = 0; + aggregatedReportingContextStatus_ = 0; if (itemIssuesBuilder_ == null) { itemIssues_ = java.util.Collections.emptyList(); } else { itemIssues_ = null; itemIssuesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); return this; } @@ -8471,9 +8577,9 @@ public com.google.shopping.merchant.reports.v1beta.ProductView buildPartial() { private void buildPartialRepeatedFields( com.google.shopping.merchant.reports.v1beta.ProductView result) { if (itemIssuesBuilder_ == null) { - if (((bitField0_ & 0x04000000) != 0)) { + if (((bitField0_ & 0x08000000) != 0)) { itemIssues_ = java.util.Collections.unmodifiableList(itemIssues_); - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); } result.itemIssues_ = itemIssues_; } else { @@ -8489,103 +8595,107 @@ private void buildPartial0(com.google.shopping.merchant.reports.v1beta.ProductVi to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.languageCode_ = languageCode_; + result.channel_ = channel_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.feedLabel_ = feedLabel_; + result.languageCode_ = languageCode_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { - result.offerId_ = offerId_; + result.feedLabel_ = feedLabel_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.title_ = title_; + result.offerId_ = offerId_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000020) != 0)) { - result.brand_ = brand_; + result.title_ = title_; to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.categoryL1_ = categoryL1_; + result.brand_ = brand_; to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.categoryL2_ = categoryL2_; + result.categoryL1_ = categoryL1_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.categoryL3_ = categoryL3_; + result.categoryL2_ = categoryL2_; to_bitField0_ |= 0x00000100; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.categoryL4_ = categoryL4_; + result.categoryL3_ = categoryL3_; to_bitField0_ |= 0x00000200; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.categoryL5_ = categoryL5_; + result.categoryL4_ = categoryL4_; to_bitField0_ |= 0x00000400; } if (((from_bitField0_ & 0x00000800) != 0)) { - result.productTypeL1_ = productTypeL1_; + result.categoryL5_ = categoryL5_; to_bitField0_ |= 0x00000800; } if (((from_bitField0_ & 0x00001000) != 0)) { - result.productTypeL2_ = productTypeL2_; + result.productTypeL1_ = productTypeL1_; to_bitField0_ |= 0x00001000; } if (((from_bitField0_ & 0x00002000) != 0)) { - result.productTypeL3_ = productTypeL3_; + result.productTypeL2_ = productTypeL2_; to_bitField0_ |= 0x00002000; } if (((from_bitField0_ & 0x00004000) != 0)) { - result.productTypeL4_ = productTypeL4_; + result.productTypeL3_ = productTypeL3_; to_bitField0_ |= 0x00004000; } if (((from_bitField0_ & 0x00008000) != 0)) { - result.productTypeL5_ = productTypeL5_; + result.productTypeL4_ = productTypeL4_; to_bitField0_ |= 0x00008000; } if (((from_bitField0_ & 0x00010000) != 0)) { - result.price_ = priceBuilder_ == null ? price_ : priceBuilder_.build(); + result.productTypeL5_ = productTypeL5_; + to_bitField0_ |= 0x00010000; } if (((from_bitField0_ & 0x00020000) != 0)) { - result.condition_ = condition_; - to_bitField0_ |= 0x00010000; + result.price_ = priceBuilder_ == null ? price_ : priceBuilder_.build(); } if (((from_bitField0_ & 0x00040000) != 0)) { - result.availability_ = availability_; + result.condition_ = condition_; to_bitField0_ |= 0x00020000; } if (((from_bitField0_ & 0x00080000) != 0)) { - result.shippingLabel_ = shippingLabel_; + result.availability_ = availability_; to_bitField0_ |= 0x00040000; } if (((from_bitField0_ & 0x00100000) != 0)) { - gtin_.makeImmutable(); - result.gtin_ = gtin_; + result.shippingLabel_ = shippingLabel_; + to_bitField0_ |= 0x00080000; } if (((from_bitField0_ & 0x00200000) != 0)) { - result.itemGroupId_ = itemGroupId_; - to_bitField0_ |= 0x00080000; + gtin_.makeImmutable(); + result.gtin_ = gtin_; } if (((from_bitField0_ & 0x00400000) != 0)) { - result.thumbnailLink_ = thumbnailLink_; + result.itemGroupId_ = itemGroupId_; to_bitField0_ |= 0x00100000; } if (((from_bitField0_ & 0x00800000) != 0)) { + result.thumbnailLink_ = thumbnailLink_; + to_bitField0_ |= 0x00200000; + } + if (((from_bitField0_ & 0x01000000) != 0)) { result.creationTime_ = creationTimeBuilder_ == null ? creationTime_ : creationTimeBuilder_.build(); } - if (((from_bitField0_ & 0x01000000) != 0)) { + if (((from_bitField0_ & 0x02000000) != 0)) { result.expirationDate_ = expirationDateBuilder_ == null ? expirationDate_ : expirationDateBuilder_.build(); } - if (((from_bitField0_ & 0x02000000) != 0)) { - result.aggregatedDestinationStatus_ = aggregatedDestinationStatus_; - to_bitField0_ |= 0x00200000; + if (((from_bitField0_ & 0x04000000) != 0)) { + result.aggregatedReportingContextStatus_ = aggregatedReportingContextStatus_; + to_bitField0_ |= 0x00400000; } result.bitField0_ |= to_bitField0_; } @@ -8641,79 +8751,82 @@ public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.ProductView bitField0_ |= 0x00000001; onChanged(); } + if (other.hasChannel()) { + setChannel(other.getChannel()); + } if (other.hasLanguageCode()) { languageCode_ = other.languageCode_; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); } if (other.hasFeedLabel()) { feedLabel_ = other.feedLabel_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.hasOfferId()) { offerId_ = other.offerId_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } if (other.hasTitle()) { title_ = other.title_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } if (other.hasBrand()) { brand_ = other.brand_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } if (other.hasCategoryL1()) { categoryL1_ = other.categoryL1_; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } if (other.hasCategoryL2()) { categoryL2_ = other.categoryL2_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } if (other.hasCategoryL3()) { categoryL3_ = other.categoryL3_; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } if (other.hasCategoryL4()) { categoryL4_ = other.categoryL4_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (other.hasCategoryL5()) { categoryL5_ = other.categoryL5_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } if (other.hasProductTypeL1()) { productTypeL1_ = other.productTypeL1_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); } if (other.hasProductTypeL2()) { productTypeL2_ = other.productTypeL2_; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); } if (other.hasProductTypeL3()) { productTypeL3_ = other.productTypeL3_; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } if (other.hasProductTypeL4()) { productTypeL4_ = other.productTypeL4_; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } if (other.hasProductTypeL5()) { productTypeL5_ = other.productTypeL5_; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); } if (other.hasPrice()) { @@ -8721,23 +8834,23 @@ public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.ProductView } if (other.hasCondition()) { condition_ = other.condition_; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } if (other.hasAvailability()) { availability_ = other.availability_; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); } if (other.hasShippingLabel()) { shippingLabel_ = other.shippingLabel_; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); } if (!other.gtin_.isEmpty()) { if (gtin_.isEmpty()) { gtin_ = other.gtin_; - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; } else { ensureGtinIsMutable(); gtin_.addAll(other.gtin_); @@ -8746,12 +8859,12 @@ public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.ProductView } if (other.hasItemGroupId()) { itemGroupId_ = other.itemGroupId_; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); } if (other.hasThumbnailLink()) { thumbnailLink_ = other.thumbnailLink_; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); } if (other.hasCreationTime()) { @@ -8760,14 +8873,14 @@ public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.ProductView if (other.hasExpirationDate()) { mergeExpirationDate(other.getExpirationDate()); } - if (other.hasAggregatedDestinationStatus()) { - setAggregatedDestinationStatus(other.getAggregatedDestinationStatus()); + if (other.hasAggregatedReportingContextStatus()) { + setAggregatedReportingContextStatus(other.getAggregatedReportingContextStatus()); } if (itemIssuesBuilder_ == null) { if (!other.itemIssues_.isEmpty()) { if (itemIssues_.isEmpty()) { itemIssues_ = other.itemIssues_; - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); } else { ensureItemIssuesIsMutable(); itemIssues_.addAll(other.itemIssues_); @@ -8780,7 +8893,7 @@ public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.ProductView itemIssuesBuilder_.dispose(); itemIssuesBuilder_ = null; itemIssues_ = other.itemIssues_; - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); itemIssuesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getItemIssuesFieldBuilder() @@ -8825,115 +8938,115 @@ public Builder mergeFrom( case 18: { languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 18 case 26: { feedLabel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 26 case 34: { offerId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 34 case 42: { title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 42 case 50: { brand_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 50 case 58: { categoryL1_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 58 case 66: { categoryL2_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 66 case 74: { categoryL3_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 74 case 82: { categoryL4_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 82 case 90: { categoryL5_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 90 case 98: { productTypeL1_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 98 case 106: { productTypeL2_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 106 case 114: { productTypeL3_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 114 case 122: { productTypeL4_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 122 case 130: { productTypeL5_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 130 case 138: { input.readMessage(getPriceFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 138 case 146: { condition_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 146 case 154: { availability_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; break; } // case 154 case 162: { shippingLabel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 162 case 170: @@ -8946,31 +9059,31 @@ public Builder mergeFrom( case 178: { itemGroupId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; break; } // case 178 case 186: { thumbnailLink_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; break; } // case 186 case 194: { input.readMessage(getCreationTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; break; } // case 194 case 202: { input.readMessage(getExpirationDateFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; break; } // case 202 case 208: { - aggregatedDestinationStatus_ = input.readEnum(); - bitField0_ |= 0x02000000; + aggregatedReportingContextStatus_ = input.readEnum(); + bitField0_ |= 0x04000000; break; } // case 208 case 218: @@ -8987,6 +9100,12 @@ public Builder mergeFrom( } break; } // case 218 + case 224: + { + channel_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 224 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -9011,9 +9130,9 @@ public Builder mergeFrom( * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-     * Merchant API methods that operate on products take this as their `name`
-     * parameter.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+     * on products take this as their `name` parameter.
      *
      * Required in the `SELECT` clause.
      * 
@@ -9029,9 +9148,9 @@ public boolean hasId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-     * Merchant API methods that operate on products take this as their `name`
-     * parameter.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+     * on products take this as their `name` parameter.
      *
      * Required in the `SELECT` clause.
      * 
@@ -9055,9 +9174,9 @@ public java.lang.String getId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-     * Merchant API methods that operate on products take this as their `name`
-     * parameter.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+     * on products take this as their `name` parameter.
      *
      * Required in the `SELECT` clause.
      * 
@@ -9081,9 +9200,9 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-     * Merchant API methods that operate on products take this as their `name`
-     * parameter.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+     * on products take this as their `name` parameter.
      *
      * Required in the `SELECT` clause.
      * 
@@ -9106,9 +9225,9 @@ public Builder setId(java.lang.String value) { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-     * Merchant API methods that operate on products take this as their `name`
-     * parameter.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+     * on products take this as their `name` parameter.
      *
      * Required in the `SELECT` clause.
      * 
@@ -9127,9 +9246,9 @@ public Builder clearId() { * * *
-     * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-     * Merchant API methods that operate on products take this as their `name`
-     * parameter.
+     * REST ID of the product, in the form of
+     * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+     * on products take this as their `name` parameter.
      *
      * Required in the `SELECT` clause.
      * 
@@ -9150,6 +9269,111 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { return this; } + private int channel_ = 0; + /** + * + * + *
+     * Channel of the product. Can be `ONLINE` or `LOCAL`.
+     * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return Whether the channel field is set. + */ + @java.lang.Override + public boolean hasChannel() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Channel of the product. Can be `ONLINE` or `LOCAL`.
+     * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return The enum numeric value on the wire for channel. + */ + @java.lang.Override + public int getChannelValue() { + return channel_; + } + /** + * + * + *
+     * Channel of the product. Can be `ONLINE` or `LOCAL`.
+     * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @param value The enum numeric value on the wire for channel to set. + * @return This builder for chaining. + */ + public Builder setChannelValue(int value) { + channel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Channel of the product. Can be `ONLINE` or `LOCAL`.
+     * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return The channel. + */ + @java.lang.Override + public com.google.shopping.type.Channel.ChannelEnum getChannel() { + com.google.shopping.type.Channel.ChannelEnum result = + com.google.shopping.type.Channel.ChannelEnum.forNumber(channel_); + return result == null ? com.google.shopping.type.Channel.ChannelEnum.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Channel of the product. Can be `ONLINE` or `LOCAL`.
+     * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @param value The channel to set. + * @return This builder for chaining. + */ + public Builder setChannel(com.google.shopping.type.Channel.ChannelEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + channel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Channel of the product. Can be `ONLINE` or `LOCAL`.
+     * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return This builder for chaining. + */ + public Builder clearChannel() { + bitField0_ = (bitField0_ & ~0x00000002); + channel_ = 0; + onChanged(); + return this; + } + private java.lang.Object languageCode_ = ""; /** * @@ -9163,7 +9387,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { * @return Whether the languageCode field is set. */ public boolean hasLanguageCode() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -9226,7 +9450,7 @@ public Builder setLanguageCode(java.lang.String value) { throw new NullPointerException(); } languageCode_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -9243,7 +9467,7 @@ public Builder setLanguageCode(java.lang.String value) { */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -9265,7 +9489,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); languageCode_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -9283,7 +9507,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { * @return Whether the feedLabel field is set. */ public boolean hasFeedLabel() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -9346,7 +9570,7 @@ public Builder setFeedLabel(java.lang.String value) { throw new NullPointerException(); } feedLabel_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -9363,7 +9587,7 @@ public Builder setFeedLabel(java.lang.String value) { */ public Builder clearFeedLabel() { feedLabel_ = getDefaultInstance().getFeedLabel(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -9385,7 +9609,7 @@ public Builder setFeedLabelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); feedLabel_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -9403,7 +9627,7 @@ public Builder setFeedLabelBytes(com.google.protobuf.ByteString value) { * @return Whether the offerId field is set. */ public boolean hasOfferId() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -9466,7 +9690,7 @@ public Builder setOfferId(java.lang.String value) { throw new NullPointerException(); } offerId_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -9483,7 +9707,7 @@ public Builder setOfferId(java.lang.String value) { */ public Builder clearOfferId() { offerId_ = getDefaultInstance().getOfferId(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -9505,7 +9729,7 @@ public Builder setOfferIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); offerId_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -9523,7 +9747,7 @@ public Builder setOfferIdBytes(com.google.protobuf.ByteString value) { * @return Whether the title field is set. */ public boolean hasTitle() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -9586,7 +9810,7 @@ public Builder setTitle(java.lang.String value) { throw new NullPointerException(); } title_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -9603,7 +9827,7 @@ public Builder setTitle(java.lang.String value) { */ public Builder clearTitle() { title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -9625,7 +9849,7 @@ public Builder setTitleBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); title_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -9643,7 +9867,7 @@ public Builder setTitleBytes(com.google.protobuf.ByteString value) { * @return Whether the brand field is set. */ public boolean hasBrand() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -9706,7 +9930,7 @@ public Builder setBrand(java.lang.String value) { throw new NullPointerException(); } brand_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9723,7 +9947,7 @@ public Builder setBrand(java.lang.String value) { */ public Builder clearBrand() { brand_ = getDefaultInstance().getBrand(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -9745,7 +9969,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); brand_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9764,7 +9988,7 @@ public Builder setBrandBytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL1 field is set. */ public boolean hasCategoryL1() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -9830,7 +10054,7 @@ public Builder setCategoryL1(java.lang.String value) { throw new NullPointerException(); } categoryL1_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9848,7 +10072,7 @@ public Builder setCategoryL1(java.lang.String value) { */ public Builder clearCategoryL1() { categoryL1_ = getDefaultInstance().getCategoryL1(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -9871,7 +10095,7 @@ public Builder setCategoryL1Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL1_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -9890,7 +10114,7 @@ public Builder setCategoryL1Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL2 field is set. */ public boolean hasCategoryL2() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -9956,7 +10180,7 @@ public Builder setCategoryL2(java.lang.String value) { throw new NullPointerException(); } categoryL2_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -9974,7 +10198,7 @@ public Builder setCategoryL2(java.lang.String value) { */ public Builder clearCategoryL2() { categoryL2_ = getDefaultInstance().getCategoryL2(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -9997,7 +10221,7 @@ public Builder setCategoryL2Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL2_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -10016,7 +10240,7 @@ public Builder setCategoryL2Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL3 field is set. */ public boolean hasCategoryL3() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -10082,7 +10306,7 @@ public Builder setCategoryL3(java.lang.String value) { throw new NullPointerException(); } categoryL3_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -10100,7 +10324,7 @@ public Builder setCategoryL3(java.lang.String value) { */ public Builder clearCategoryL3() { categoryL3_ = getDefaultInstance().getCategoryL3(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -10123,7 +10347,7 @@ public Builder setCategoryL3Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL3_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -10142,7 +10366,7 @@ public Builder setCategoryL3Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL4 field is set. */ public boolean hasCategoryL4() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -10208,7 +10432,7 @@ public Builder setCategoryL4(java.lang.String value) { throw new NullPointerException(); } categoryL4_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -10226,7 +10450,7 @@ public Builder setCategoryL4(java.lang.String value) { */ public Builder clearCategoryL4() { categoryL4_ = getDefaultInstance().getCategoryL4(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -10249,7 +10473,7 @@ public Builder setCategoryL4Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL4_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -10268,7 +10492,7 @@ public Builder setCategoryL4Bytes(com.google.protobuf.ByteString value) { * @return Whether the categoryL5 field is set. */ public boolean hasCategoryL5() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -10334,7 +10558,7 @@ public Builder setCategoryL5(java.lang.String value) { throw new NullPointerException(); } categoryL5_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -10352,7 +10576,7 @@ public Builder setCategoryL5(java.lang.String value) { */ public Builder clearCategoryL5() { categoryL5_ = getDefaultInstance().getCategoryL5(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -10375,7 +10599,7 @@ public Builder setCategoryL5Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); categoryL5_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -10394,7 +10618,7 @@ public Builder setCategoryL5Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL1 field is set. */ public boolean hasProductTypeL1() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** * @@ -10460,7 +10684,7 @@ public Builder setProductTypeL1(java.lang.String value) { throw new NullPointerException(); } productTypeL1_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -10478,7 +10702,7 @@ public Builder setProductTypeL1(java.lang.String value) { */ public Builder clearProductTypeL1() { productTypeL1_ = getDefaultInstance().getProductTypeL1(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -10501,7 +10725,7 @@ public Builder setProductTypeL1Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL1_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -10520,7 +10744,7 @@ public Builder setProductTypeL1Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL2 field is set. */ public boolean hasProductTypeL2() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * @@ -10586,7 +10810,7 @@ public Builder setProductTypeL2(java.lang.String value) { throw new NullPointerException(); } productTypeL2_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -10604,7 +10828,7 @@ public Builder setProductTypeL2(java.lang.String value) { */ public Builder clearProductTypeL2() { productTypeL2_ = getDefaultInstance().getProductTypeL2(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -10627,7 +10851,7 @@ public Builder setProductTypeL2Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL2_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -10646,7 +10870,7 @@ public Builder setProductTypeL2Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL3 field is set. */ public boolean hasProductTypeL3() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -10712,7 +10936,7 @@ public Builder setProductTypeL3(java.lang.String value) { throw new NullPointerException(); } productTypeL3_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -10730,7 +10954,7 @@ public Builder setProductTypeL3(java.lang.String value) { */ public Builder clearProductTypeL3() { productTypeL3_ = getDefaultInstance().getProductTypeL3(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); onChanged(); return this; } @@ -10753,7 +10977,7 @@ public Builder setProductTypeL3Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL3_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -10772,7 +10996,7 @@ public Builder setProductTypeL3Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL4 field is set. */ public boolean hasProductTypeL4() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -10838,7 +11062,7 @@ public Builder setProductTypeL4(java.lang.String value) { throw new NullPointerException(); } productTypeL4_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -10856,7 +11080,7 @@ public Builder setProductTypeL4(java.lang.String value) { */ public Builder clearProductTypeL4() { productTypeL4_ = getDefaultInstance().getProductTypeL4(); - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); onChanged(); return this; } @@ -10879,7 +11103,7 @@ public Builder setProductTypeL4Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL4_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -10898,7 +11122,7 @@ public Builder setProductTypeL4Bytes(com.google.protobuf.ByteString value) { * @return Whether the productTypeL5 field is set. */ public boolean hasProductTypeL5() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -10964,7 +11188,7 @@ public Builder setProductTypeL5(java.lang.String value) { throw new NullPointerException(); } productTypeL5_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -10982,7 +11206,7 @@ public Builder setProductTypeL5(java.lang.String value) { */ public Builder clearProductTypeL5() { productTypeL5_ = getDefaultInstance().getProductTypeL5(); - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); onChanged(); return this; } @@ -11005,7 +11229,7 @@ public Builder setProductTypeL5Bytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); productTypeL5_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -11029,7 +11253,7 @@ public Builder setProductTypeL5Bytes(com.google.protobuf.ByteString value) { * @return Whether the price field is set. */ public boolean hasPrice() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -11069,7 +11293,7 @@ public Builder setPrice(com.google.shopping.type.Price value) { } else { priceBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -11089,7 +11313,7 @@ public Builder setPrice(com.google.shopping.type.Price.Builder builderForValue) } else { priceBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -11105,7 +11329,7 @@ public Builder setPrice(com.google.shopping.type.Price.Builder builderForValue) */ public Builder mergePrice(com.google.shopping.type.Price value) { if (priceBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && price_ != null && price_ != com.google.shopping.type.Price.getDefaultInstance()) { getPriceBuilder().mergeFrom(value); @@ -11115,7 +11339,7 @@ public Builder mergePrice(com.google.shopping.type.Price value) { } else { priceBuilder_.mergeFrom(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -11130,7 +11354,7 @@ public Builder mergePrice(com.google.shopping.type.Price value) { * .google.shopping.type.Price price = 17; */ public Builder clearPrice() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); price_ = null; if (priceBuilder_ != null) { priceBuilder_.dispose(); @@ -11150,7 +11374,7 @@ public Builder clearPrice() { * .google.shopping.type.Price price = 17; */ public com.google.shopping.type.Price.Builder getPriceBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getPriceFieldBuilder().getBuilder(); } @@ -11212,7 +11436,7 @@ public com.google.shopping.type.PriceOrBuilder getPriceOrBuilder() { * @return Whether the condition field is set. */ public boolean hasCondition() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -11278,7 +11502,7 @@ public Builder setCondition(java.lang.String value) { throw new NullPointerException(); } condition_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -11296,7 +11520,7 @@ public Builder setCondition(java.lang.String value) { */ public Builder clearCondition() { condition_ = getDefaultInstance().getCondition(); - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } @@ -11319,7 +11543,7 @@ public Builder setConditionBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); condition_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -11338,7 +11562,7 @@ public Builder setConditionBytes(com.google.protobuf.ByteString value) { * @return Whether the availability field is set. */ public boolean hasAvailability() { - return ((bitField0_ & 0x00040000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -11404,7 +11628,7 @@ public Builder setAvailability(java.lang.String value) { throw new NullPointerException(); } availability_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -11422,7 +11646,7 @@ public Builder setAvailability(java.lang.String value) { */ public Builder clearAvailability() { availability_ = getDefaultInstance().getAvailability(); - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); onChanged(); return this; } @@ -11445,7 +11669,7 @@ public Builder setAvailabilityBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); availability_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -11465,7 +11689,7 @@ public Builder setAvailabilityBytes(com.google.protobuf.ByteString value) { * @return Whether the shippingLabel field is set. */ public boolean hasShippingLabel() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** * @@ -11534,7 +11758,7 @@ public Builder setShippingLabel(java.lang.String value) { throw new NullPointerException(); } shippingLabel_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -11553,7 +11777,7 @@ public Builder setShippingLabel(java.lang.String value) { */ public Builder clearShippingLabel() { shippingLabel_ = getDefaultInstance().getShippingLabel(); - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); onChanged(); return this; } @@ -11577,7 +11801,7 @@ public Builder setShippingLabelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); shippingLabel_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -11589,7 +11813,7 @@ private void ensureGtinIsMutable() { if (!gtin_.isModifiable()) { gtin_ = new com.google.protobuf.LazyStringArrayList(gtin_); } - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; } /** * @@ -11669,7 +11893,7 @@ public Builder setGtin(int index, java.lang.String value) { } ensureGtinIsMutable(); gtin_.set(index, value); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -11691,7 +11915,7 @@ public Builder addGtin(java.lang.String value) { } ensureGtinIsMutable(); gtin_.add(value); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -11710,7 +11934,7 @@ public Builder addGtin(java.lang.String value) { public Builder addAllGtin(java.lang.Iterable values) { ensureGtinIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gtin_); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -11727,7 +11951,7 @@ public Builder addAllGtin(java.lang.Iterable values) { */ public Builder clearGtin() { gtin_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); ; onChanged(); return this; @@ -11751,7 +11975,7 @@ public Builder addGtinBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureGtinIsMutable(); gtin_.add(value); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -11769,7 +11993,7 @@ public Builder addGtinBytes(com.google.protobuf.ByteString value) { * @return Whether the itemGroupId field is set. */ public boolean hasItemGroupId() { - return ((bitField0_ & 0x00200000) != 0); + return ((bitField0_ & 0x00400000) != 0); } /** * @@ -11832,7 +12056,7 @@ public Builder setItemGroupId(java.lang.String value) { throw new NullPointerException(); } itemGroupId_ = value; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -11849,7 +12073,7 @@ public Builder setItemGroupId(java.lang.String value) { */ public Builder clearItemGroupId() { itemGroupId_ = getDefaultInstance().getItemGroupId(); - bitField0_ = (bitField0_ & ~0x00200000); + bitField0_ = (bitField0_ & ~0x00400000); onChanged(); return this; } @@ -11871,7 +12095,7 @@ public Builder setItemGroupIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); itemGroupId_ = value; - bitField0_ |= 0x00200000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -11890,7 +12114,7 @@ public Builder setItemGroupIdBytes(com.google.protobuf.ByteString value) { * @return Whether the thumbnailLink field is set. */ public boolean hasThumbnailLink() { - return ((bitField0_ & 0x00400000) != 0); + return ((bitField0_ & 0x00800000) != 0); } /** * @@ -11956,7 +12180,7 @@ public Builder setThumbnailLink(java.lang.String value) { throw new NullPointerException(); } thumbnailLink_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -11974,7 +12198,7 @@ public Builder setThumbnailLink(java.lang.String value) { */ public Builder clearThumbnailLink() { thumbnailLink_ = getDefaultInstance().getThumbnailLink(); - bitField0_ = (bitField0_ & ~0x00400000); + bitField0_ = (bitField0_ & ~0x00800000); onChanged(); return this; } @@ -11997,7 +12221,7 @@ public Builder setThumbnailLinkBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); thumbnailLink_ = value; - bitField0_ |= 0x00400000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -12020,7 +12244,7 @@ public Builder setThumbnailLinkBytes(com.google.protobuf.ByteString value) { * @return Whether the creationTime field is set. */ public boolean hasCreationTime() { - return ((bitField0_ & 0x00800000) != 0); + return ((bitField0_ & 0x01000000) != 0); } /** * @@ -12060,7 +12284,7 @@ public Builder setCreationTime(com.google.protobuf.Timestamp value) { } else { creationTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -12079,7 +12303,7 @@ public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForV } else { creationTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -12094,7 +12318,7 @@ public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForV */ public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { if (creationTimeBuilder_ == null) { - if (((bitField0_ & 0x00800000) != 0) + if (((bitField0_ & 0x01000000) != 0) && creationTime_ != null && creationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreationTimeBuilder().mergeFrom(value); @@ -12104,7 +12328,7 @@ public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { } else { creationTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -12118,7 +12342,7 @@ public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp creation_time = 24; */ public Builder clearCreationTime() { - bitField0_ = (bitField0_ & ~0x00800000); + bitField0_ = (bitField0_ & ~0x01000000); creationTime_ = null; if (creationTimeBuilder_ != null) { creationTimeBuilder_.dispose(); @@ -12137,7 +12361,7 @@ public Builder clearCreationTime() { * .google.protobuf.Timestamp creation_time = 24; */ public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { - bitField0_ |= 0x00800000; + bitField0_ |= 0x01000000; onChanged(); return getCreationTimeFieldBuilder().getBuilder(); } @@ -12201,7 +12425,7 @@ public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { * @return Whether the expirationDate field is set. */ public boolean hasExpirationDate() { - return ((bitField0_ & 0x01000000) != 0); + return ((bitField0_ & 0x02000000) != 0); } /** * @@ -12241,7 +12465,7 @@ public Builder setExpirationDate(com.google.type.Date value) { } else { expirationDateBuilder_.setMessage(value); } - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -12260,7 +12484,7 @@ public Builder setExpirationDate(com.google.type.Date.Builder builderForValue) { } else { expirationDateBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -12275,7 +12499,7 @@ public Builder setExpirationDate(com.google.type.Date.Builder builderForValue) { */ public Builder mergeExpirationDate(com.google.type.Date value) { if (expirationDateBuilder_ == null) { - if (((bitField0_ & 0x01000000) != 0) + if (((bitField0_ & 0x02000000) != 0) && expirationDate_ != null && expirationDate_ != com.google.type.Date.getDefaultInstance()) { getExpirationDateBuilder().mergeFrom(value); @@ -12285,7 +12509,7 @@ public Builder mergeExpirationDate(com.google.type.Date value) { } else { expirationDateBuilder_.mergeFrom(value); } - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -12299,7 +12523,7 @@ public Builder mergeExpirationDate(com.google.type.Date value) { * .google.type.Date expiration_date = 25; */ public Builder clearExpirationDate() { - bitField0_ = (bitField0_ & ~0x01000000); + bitField0_ = (bitField0_ & ~0x02000000); expirationDate_ = null; if (expirationDateBuilder_ != null) { expirationDateBuilder_.dispose(); @@ -12318,7 +12542,7 @@ public Builder clearExpirationDate() { * .google.type.Date expiration_date = 25; */ public com.google.type.Date.Builder getExpirationDateBuilder() { - bitField0_ |= 0x01000000; + bitField0_ |= 0x02000000; onChanged(); return getExpirationDateFieldBuilder().getBuilder(); } @@ -12362,58 +12586,58 @@ public com.google.type.DateOrBuilder getExpirationDateOrBuilder() { return expirationDateBuilder_; } - private int aggregatedDestinationStatus_ = 0; + private int aggregatedReportingContextStatus_ = 0; /** * * *
-     * Aggregated destination status.
+     * Aggregated status.
      * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return Whether the aggregatedDestinationStatus field is set. + * @return Whether the aggregatedReportingContextStatus field is set. */ @java.lang.Override - public boolean hasAggregatedDestinationStatus() { - return ((bitField0_ & 0x02000000) != 0); + public boolean hasAggregatedReportingContextStatus() { + return ((bitField0_ & 0x04000000) != 0); } /** * * *
-     * Aggregated destination status.
+     * Aggregated status.
      * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return The enum numeric value on the wire for aggregatedDestinationStatus. + * @return The enum numeric value on the wire for aggregatedReportingContextStatus. */ @java.lang.Override - public int getAggregatedDestinationStatusValue() { - return aggregatedDestinationStatus_; + public int getAggregatedReportingContextStatusValue() { + return aggregatedReportingContextStatus_; } /** * * *
-     * Aggregated destination status.
+     * Aggregated status.
      * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @param value The enum numeric value on the wire for aggregatedDestinationStatus to set. + * @param value The enum numeric value on the wire for aggregatedReportingContextStatus to set. * @return This builder for chaining. */ - public Builder setAggregatedDestinationStatusValue(int value) { - aggregatedDestinationStatus_ = value; - bitField0_ |= 0x02000000; + public Builder setAggregatedReportingContextStatusValue(int value) { + aggregatedReportingContextStatus_ = value; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -12421,23 +12645,24 @@ public Builder setAggregatedDestinationStatusValue(int value) { * * *
-     * Aggregated destination status.
+     * Aggregated status.
      * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return The aggregatedDestinationStatus. + * @return The aggregatedReportingContextStatus. */ @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus - getAggregatedDestinationStatus() { - com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus result = - com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus - .forNumber(aggregatedDestinationStatus_); + public com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus + getAggregatedReportingContextStatus() { + com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus + result = + com.google.shopping.merchant.reports.v1beta.ProductView + .AggregatedReportingContextStatus.forNumber(aggregatedReportingContextStatus_); return result == null - ? com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus + ? com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus .UNRECOGNIZED : result; } @@ -12445,23 +12670,24 @@ public Builder setAggregatedDestinationStatusValue(int value) { * * *
-     * Aggregated destination status.
+     * Aggregated status.
      * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @param value The aggregatedDestinationStatus to set. + * @param value The aggregatedReportingContextStatus to set. * @return This builder for chaining. */ - public Builder setAggregatedDestinationStatus( - com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus value) { + public Builder setAggregatedReportingContextStatus( + com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus + value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x02000000; - aggregatedDestinationStatus_ = value.getNumber(); + bitField0_ |= 0x04000000; + aggregatedReportingContextStatus_ = value.getNumber(); onChanged(); return this; } @@ -12469,18 +12695,18 @@ public Builder setAggregatedDestinationStatus( * * *
-     * Aggregated destination status.
+     * Aggregated status.
      * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * * @return This builder for chaining. */ - public Builder clearAggregatedDestinationStatus() { - bitField0_ = (bitField0_ & ~0x02000000); - aggregatedDestinationStatus_ = 0; + public Builder clearAggregatedReportingContextStatus() { + bitField0_ = (bitField0_ & ~0x04000000); + aggregatedReportingContextStatus_ = 0; onChanged(); return this; } @@ -12489,11 +12715,11 @@ public Builder clearAggregatedDestinationStatus() { itemIssues_ = java.util.Collections.emptyList(); private void ensureItemIssuesIsMutable() { - if (!((bitField0_ & 0x04000000) != 0)) { + if (!((bitField0_ & 0x08000000) != 0)) { itemIssues_ = new java.util.ArrayList< com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue>(itemIssues_); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; } } @@ -12806,7 +13032,7 @@ public Builder addAllItemIssues( public Builder clearItemIssues() { if (itemIssuesBuilder_ == null) { itemIssues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); onChanged(); } else { itemIssuesBuilder_.clear(); @@ -12994,7 +13220,7 @@ public Builder removeItemIssues(int index) { com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.Builder, com.google.shopping.merchant.reports.v1beta.ProductView.ItemIssueOrBuilder>( - itemIssues_, ((bitField0_ & 0x04000000) != 0), getParentForChildren(), isClean()); + itemIssues_, ((bitField0_ & 0x08000000) != 0), getParentForChildren(), isClean()); itemIssues_ = null; } return itemIssuesBuilder_; diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductViewOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductViewOrBuilder.java index d03b58da940f..8b98b1b88d6e 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductViewOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ProductViewOrBuilder.java @@ -27,9 +27,9 @@ public interface ProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-   * Merchant API methods that operate on products take this as their `name`
-   * parameter.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+   * on products take this as their `name` parameter.
    *
    * Required in the `SELECT` clause.
    * 
@@ -43,9 +43,9 @@ public interface ProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-   * Merchant API methods that operate on products take this as their `name`
-   * parameter.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+   * on products take this as their `name` parameter.
    *
    * Required in the `SELECT` clause.
    * 
@@ -59,9 +59,9 @@ public interface ProductViewOrBuilder * * *
-   * REST ID of the product, in the form of languageCode~feedLabel~offerId.
-   * Merchant API methods that operate on products take this as their `name`
-   * parameter.
+   * REST ID of the product, in the form of
+   * `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate
+   * on products take this as their `name` parameter.
    *
    * Required in the `SELECT` clause.
    * 
@@ -72,6 +72,43 @@ public interface ProductViewOrBuilder */ com.google.protobuf.ByteString getIdBytes(); + /** + * + * + *
+   * Channel of the product. Can be `ONLINE` or `LOCAL`.
+   * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return Whether the channel field is set. + */ + boolean hasChannel(); + /** + * + * + *
+   * Channel of the product. Can be `ONLINE` or `LOCAL`.
+   * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return The enum numeric value on the wire for channel. + */ + int getChannelValue(); + /** + * + * + *
+   * Channel of the product. Can be `ONLINE` or `LOCAL`.
+   * 
+ * + * optional .google.shopping.type.Channel.ChannelEnum channel = 28; + * + * @return The channel. + */ + com.google.shopping.type.Channel.ChannelEnum getChannel(); + /** * * @@ -1020,45 +1057,45 @@ public interface ProductViewOrBuilder * * *
-   * Aggregated destination status.
+   * Aggregated status.
    * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return Whether the aggregatedDestinationStatus field is set. + * @return Whether the aggregatedReportingContextStatus field is set. */ - boolean hasAggregatedDestinationStatus(); + boolean hasAggregatedReportingContextStatus(); /** * * *
-   * Aggregated destination status.
+   * Aggregated status.
    * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return The enum numeric value on the wire for aggregatedDestinationStatus. + * @return The enum numeric value on the wire for aggregatedReportingContextStatus. */ - int getAggregatedDestinationStatusValue(); + int getAggregatedReportingContextStatusValue(); /** * * *
-   * Aggregated destination status.
+   * Aggregated status.
    * 
* * - * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus aggregated_destination_status = 26; + * optional .google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus aggregated_reporting_context_status = 26; * * - * @return The aggregatedDestinationStatus. + * @return The aggregatedReportingContextStatus. */ - com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedDestinationStatus - getAggregatedDestinationStatus(); + com.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus + getAggregatedReportingContextStatus(); /** * diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemand.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemand.java index 63675e8ea333..5264165b27c0 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemand.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemand.java @@ -25,230 +25,646 @@ * Relative demand of a product cluster or brand in the Best sellers report. * * - * Protobuf enum {@code google.shopping.merchant.reports.v1beta.RelativeDemand} + * Protobuf type {@code google.shopping.merchant.reports.v1beta.RelativeDemand} */ -public enum RelativeDemand implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified.
-   * 
- * - * RELATIVE_DEMAND_UNSPECIFIED = 0; - */ - RELATIVE_DEMAND_UNSPECIFIED(0), - /** - * - * - *
-   * Demand is 0-5% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * VERY_LOW = 10; - */ - VERY_LOW(10), - /** - * - * - *
-   * Demand is 6-10% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * LOW = 20; - */ - LOW(20), - /** - * - * - *
-   * Demand is 11-20% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * MEDIUM = 30; - */ - MEDIUM(30), - /** - * - * - *
-   * Demand is 21-50% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * HIGH = 40; - */ - HIGH(40), - /** - * - * - *
-   * Demand is 51-100% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * VERY_HIGH = 50; - */ - VERY_HIGH(50), - UNRECOGNIZED(-1), - ; +public final class RelativeDemand extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.RelativeDemand) + RelativeDemandOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelativeDemand.newBuilder() to construct. + private RelativeDemand(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelativeDemand() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelativeDemand(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.RelativeDemand.class, + com.google.shopping.merchant.reports.v1beta.RelativeDemand.Builder.class); + } /** * * *
-   * Not specified.
-   * 
- * - * RELATIVE_DEMAND_UNSPECIFIED = 0; - */ - public static final int RELATIVE_DEMAND_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Demand is 0-5% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * VERY_LOW = 10; - */ - public static final int VERY_LOW_VALUE = 10; - /** - * - * - *
-   * Demand is 6-10% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * LOW = 20; - */ - public static final int LOW_VALUE = 20; - /** - * - * - *
-   * Demand is 11-20% of the demand of the highest ranked product cluster or
-   * brand.
-   * 
- * - * MEDIUM = 30; - */ - public static final int MEDIUM_VALUE = 30; - /** - * - * - *
-   * Demand is 21-50% of the demand of the highest ranked product cluster or
-   * brand.
+   * Relative demand values.
    * 
* - * HIGH = 40; + * Protobuf enum {@code google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum} */ - public static final int HIGH_VALUE = 40; + public enum RelativeDemandEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0; + */ + RELATIVE_DEMAND_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * Demand is 0-5% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * VERY_LOW = 10; + */ + VERY_LOW(10), + /** + * + * + *
+     * Demand is 6-10% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * LOW = 20; + */ + LOW(20), + /** + * + * + *
+     * Demand is 11-20% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * MEDIUM = 30; + */ + MEDIUM(30), + /** + * + * + *
+     * Demand is 21-50% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * HIGH = 40; + */ + HIGH(40), + /** + * + * + *
+     * Demand is 51-100% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * VERY_HIGH = 50; + */ + VERY_HIGH(50), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0; + */ + public static final int RELATIVE_DEMAND_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Demand is 0-5% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * VERY_LOW = 10; + */ + public static final int VERY_LOW_VALUE = 10; + /** + * + * + *
+     * Demand is 6-10% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * LOW = 20; + */ + public static final int LOW_VALUE = 20; + /** + * + * + *
+     * Demand is 11-20% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * MEDIUM = 30; + */ + public static final int MEDIUM_VALUE = 30; + /** + * + * + *
+     * Demand is 21-50% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * HIGH = 40; + */ + public static final int HIGH_VALUE = 40; + /** + * + * + *
+     * Demand is 51-100% of the demand of the highest ranked product cluster or
+     * brand.
+     * 
+ * + * VERY_HIGH = 50; + */ + public static final int VERY_HIGH_VALUE = 50; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RelativeDemandEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RelativeDemandEnum forNumber(int value) { + switch (value) { + case 0: + return RELATIVE_DEMAND_ENUM_UNSPECIFIED; + case 10: + return VERY_LOW; + case 20: + return LOW; + case 30: + return MEDIUM; + case 40: + return HIGH; + case 50: + return VERY_HIGH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RelativeDemandEnum findValueByNumber(int number) { + return RelativeDemandEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.RelativeDemand.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RelativeDemandEnum[] VALUES = values(); + + public static RelativeDemandEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RelativeDemandEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reports.v1beta.RelativeDemand)) { + return super.equals(obj); + } + com.google.shopping.merchant.reports.v1beta.RelativeDemand other = + (com.google.shopping.merchant.reports.v1beta.RelativeDemand) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reports.v1beta.RelativeDemand prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-   * Demand is 51-100% of the demand of the highest ranked product cluster or
-   * brand.
+   * Relative demand of a product cluster or brand in the Best sellers report.
    * 
* - * VERY_HIGH = 50; + * Protobuf type {@code google.shopping.merchant.reports.v1beta.RelativeDemand} */ - public static final int VERY_HIGH_VALUE = 50; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.RelativeDemand) + com.google.shopping.merchant.reports.v1beta.RelativeDemandOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_descriptor; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.RelativeDemand.class, + com.google.shopping.merchant.reports.v1beta.RelativeDemand.Builder.class); } - return value; - } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RelativeDemand valueOf(int value) { - return forNumber(value); - } + // Construct using com.google.shopping.merchant.reports.v1beta.RelativeDemand.newBuilder() + private Builder() {} - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static RelativeDemand forNumber(int value) { - switch (value) { - case 0: - return RELATIVE_DEMAND_UNSPECIFIED; - case 10: - return VERY_LOW; - case 20: - return LOW; - case 30: - return MEDIUM; - case 40: - return HIGH; - case 50: - return VERY_HIGH; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RelativeDemand findValueByNumber(int number) { - return RelativeDemand.forNumber(number); - } - }; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + @java.lang.Override + public Builder clear() { + super.clear(); + return this; } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_descriptor; + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto.getDescriptor() - .getEnumTypes() - .get(1); - } + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemand getDefaultInstanceForType() { + return com.google.shopping.merchant.reports.v1beta.RelativeDemand.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemand build() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemand buildPartial() { + com.google.shopping.merchant.reports.v1beta.RelativeDemand result = + new com.google.shopping.merchant.reports.v1beta.RelativeDemand(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - private static final RelativeDemand[] VALUES = values(); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static RelativeDemand valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reports.v1beta.RelativeDemand) { + return mergeFrom((com.google.shopping.merchant.reports.v1beta.RelativeDemand) other); + } else { + super.mergeFrom(other); + return this; + } } - return VALUES[desc.getIndex()]; + + public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.RelativeDemand other) { + if (other == com.google.shopping.merchant.reports.v1beta.RelativeDemand.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.RelativeDemand) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.RelativeDemand) + private static final com.google.shopping.merchant.reports.v1beta.RelativeDemand DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reports.v1beta.RelativeDemand(); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemand getDefaultInstance() { + return DEFAULT_INSTANCE; } - private final int value; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelativeDemand parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private RelativeDemand(int value) { - this.value = value; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.RelativeDemand) + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemand getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeType.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeType.java index caf8656894ff..cd25239e394e 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeType.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeType.java @@ -26,179 +26,604 @@ * compared to the previous time period. * * - * Protobuf enum {@code google.shopping.merchant.reports.v1beta.RelativeDemandChangeType} + * Protobuf type {@code google.shopping.merchant.reports.v1beta.RelativeDemandChangeType} */ -public enum RelativeDemandChangeType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified.
-   * 
- * - * RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED = 0; - */ - RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED(0), - /** - * - * - *
-   * Relative demand is lower than the previous time period.
-   * 
- * - * SINKER = 1; - */ - SINKER(1), - /** - * - * - *
-   * Relative demand is equal to the previous time period.
-   * 
- * - * FLAT = 2; - */ - FLAT(2), - /** - * - * - *
-   * Relative demand is higher than the previous time period.
-   * 
- * - * RISER = 3; - */ - RISER(3), - UNRECOGNIZED(-1), - ; +public final class RelativeDemandChangeType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) + RelativeDemandChangeTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelativeDemandChangeType.newBuilder() to construct. + private RelativeDemandChangeType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelativeDemandChangeType() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelativeDemandChangeType(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.class, + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.Builder.class); + } /** * * *
-   * Not specified.
-   * 
- * - * RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED = 0; - */ - public static final int RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Relative demand is lower than the previous time period.
-   * 
- * - * SINKER = 1; - */ - public static final int SINKER_VALUE = 1; - /** - * - * - *
-   * Relative demand is equal to the previous time period.
+   * Relative demand change type values.
    * 
* - * FLAT = 2; + * Protobuf enum {@code + * google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum} */ - public static final int FLAT_VALUE = 2; + public enum RelativeDemandChangeTypeEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0; + */ + RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * Relative demand is lower than the previous time period.
+     * 
+ * + * SINKER = 1; + */ + SINKER(1), + /** + * + * + *
+     * Relative demand is equal to the previous time period.
+     * 
+ * + * FLAT = 2; + */ + FLAT(2), + /** + * + * + *
+     * Relative demand is higher than the previous time period.
+     * 
+ * + * RISER = 3; + */ + RISER(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0; + */ + public static final int RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Relative demand is lower than the previous time period.
+     * 
+ * + * SINKER = 1; + */ + public static final int SINKER_VALUE = 1; + /** + * + * + *
+     * Relative demand is equal to the previous time period.
+     * 
+ * + * FLAT = 2; + */ + public static final int FLAT_VALUE = 2; + /** + * + * + *
+     * Relative demand is higher than the previous time period.
+     * 
+ * + * RISER = 3; + */ + public static final int RISER_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RelativeDemandChangeTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RelativeDemandChangeTypeEnum forNumber(int value) { + switch (value) { + case 0: + return RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED; + case 1: + return SINKER; + case 2: + return FLAT; + case 3: + return RISER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RelativeDemandChangeTypeEnum findValueByNumber(int number) { + return RelativeDemandChangeTypeEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RelativeDemandChangeTypeEnum[] VALUES = values(); + + public static RelativeDemandChangeTypeEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RelativeDemandChangeTypeEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType)) { + return super.equals(obj); + } + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType other = + (com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-   * Relative demand is higher than the previous time period.
+   * Relative demand of a product cluster or brand in the Best sellers report
+   * compared to the previous time period.
    * 
* - * RISER = 3; + * Protobuf type {@code google.shopping.merchant.reports.v1beta.RelativeDemandChangeType} */ - public static final int RISER_VALUE = 3; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_descriptor; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.class, + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.Builder.class); } - return value; - } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RelativeDemandChangeType valueOf(int value) { - return forNumber(value); - } + // Construct using + // com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.newBuilder() + private Builder() {} - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static RelativeDemandChangeType forNumber(int value) { - switch (value) { - case 0: - return RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED; - case 1: - return SINKER; - case 2: - return FLAT; - case 3: - return RISER; - default: - return null; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RelativeDemandChangeType findValueByNumber(int number) { - return RelativeDemandChangeType.forNumber(number); - } - }; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_descriptor; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + getDefaultInstanceForType() { + return com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .getDefaultInstance(); } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType build() { + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto.getDescriptor() - .getEnumTypes() - .get(2); - } + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType buildPartial() { + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType result = + new com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - private static final RelativeDemandChangeType[] VALUES = values(); + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static RelativeDemandChangeType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) { + return mergeFrom( + (com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) other); + } else { + super.mergeFrom(other); + return this; + } } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + public Builder mergeFrom( + com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType other) { + if (other + == com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; } - return VALUES[desc.getIndex()]; + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) + private static final com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType(); } - private final int value; + public static com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelativeDemandChangeType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - private RelativeDemandChangeType(int value) { - this.value = value; + public static com.google.protobuf.Parser parser() { + return PARSER; } - // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeTypeOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeTypeOrBuilder.java new file mode 100644 index 000000000000..e16d389c1c17 --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeTypeOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/merchant/reports/v1beta/reports.proto + +package com.google.shopping.merchant.reports.v1beta; + +public interface RelativeDemandChangeTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandOrBuilder.java new file mode 100644 index 000000000000..30b719efaa8a --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/merchant/reports/v1beta/reports.proto + +package com.google.shopping.merchant.reports.v1beta; + +public interface RelativeDemandOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.RelativeDemand) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportGranularity.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportGranularity.java index 8b2f50f0a194..dd801b426b33 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportGranularity.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportGranularity.java @@ -26,156 +26,575 @@ * over a week and a month timeframe. * * - * Protobuf enum {@code google.shopping.merchant.reports.v1beta.ReportGranularity} + * Protobuf type {@code google.shopping.merchant.reports.v1beta.ReportGranularity} */ -public enum ReportGranularity implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified.
-   * 
- * - * REPORT_GRANULARITY_UNSPECIFIED = 0; - */ - REPORT_GRANULARITY_UNSPECIFIED(0), - /** - * - * - *
-   * Report is computed over a week timeframe.
-   * 
- * - * WEEKLY = 1; - */ - WEEKLY(1), - /** - * - * - *
-   * Report is computed over a month timeframe.
-   * 
- * - * MONTHLY = 2; - */ - MONTHLY(2), - UNRECOGNIZED(-1), - ; +public final class ReportGranularity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.ReportGranularity) + ReportGranularityOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportGranularity.newBuilder() to construct. + private ReportGranularity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportGranularity() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportGranularity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.ReportGranularity.class, + com.google.shopping.merchant.reports.v1beta.ReportGranularity.Builder.class); + } /** * * *
-   * Not specified.
-   * 
- * - * REPORT_GRANULARITY_UNSPECIFIED = 0; - */ - public static final int REPORT_GRANULARITY_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Report is computed over a week timeframe.
+   * Report granularity values.
    * 
* - * WEEKLY = 1; + * Protobuf enum {@code + * google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum} */ - public static final int WEEKLY_VALUE = 1; + public enum ReportGranularityEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0; + */ + REPORT_GRANULARITY_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * Report is computed over a week timeframe.
+     * 
+ * + * WEEKLY = 1; + */ + WEEKLY(1), + /** + * + * + *
+     * Report is computed over a month timeframe.
+     * 
+ * + * MONTHLY = 2; + */ + MONTHLY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0; + */ + public static final int REPORT_GRANULARITY_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Report is computed over a week timeframe.
+     * 
+ * + * WEEKLY = 1; + */ + public static final int WEEKLY_VALUE = 1; + /** + * + * + *
+     * Report is computed over a month timeframe.
+     * 
+ * + * MONTHLY = 2; + */ + public static final int MONTHLY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReportGranularityEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReportGranularityEnum forNumber(int value) { + switch (value) { + case 0: + return REPORT_GRANULARITY_ENUM_UNSPECIFIED; + case 1: + return WEEKLY; + case 2: + return MONTHLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReportGranularityEnum findValueByNumber(int number) { + return ReportGranularityEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportGranularity.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ReportGranularityEnum[] VALUES = values(); + + public static ReportGranularityEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReportGranularityEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reports.v1beta.ReportGranularity)) { + return super.equals(obj); + } + com.google.shopping.merchant.reports.v1beta.ReportGranularity other = + (com.google.shopping.merchant.reports.v1beta.ReportGranularity) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reports.v1beta.ReportGranularity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-   * Report is computed over a month timeframe.
+   * Granularity of the Best sellers report. Best sellers reports are computed
+   * over a week and a month timeframe.
    * 
* - * MONTHLY = 2; + * Protobuf type {@code google.shopping.merchant.reports.v1beta.ReportGranularity} */ - public static final int MONTHLY_VALUE = 2; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.ReportGranularity) + com.google.shopping.merchant.reports.v1beta.ReportGranularityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_descriptor; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.ReportGranularity.class, + com.google.shopping.merchant.reports.v1beta.ReportGranularity.Builder.class); } - return value; - } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ReportGranularity valueOf(int value) { - return forNumber(value); - } + // Construct using com.google.shopping.merchant.reports.v1beta.ReportGranularity.newBuilder() + private Builder() {} - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ReportGranularity forNumber(int value) { - switch (value) { - case 0: - return REPORT_GRANULARITY_UNSPECIFIED; - case 1: - return WEEKLY; - case 2: - return MONTHLY; - default: - return null; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ReportGranularity findValueByNumber(int number) { - return ReportGranularity.forNumber(number); - } - }; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_descriptor; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.ReportGranularity + getDefaultInstanceForType() { + return com.google.shopping.merchant.reports.v1beta.ReportGranularity.getDefaultInstance(); } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.ReportGranularity build() { + com.google.shopping.merchant.reports.v1beta.ReportGranularity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto.getDescriptor() - .getEnumTypes() - .get(0); - } + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.ReportGranularity buildPartial() { + com.google.shopping.merchant.reports.v1beta.ReportGranularity result = + new com.google.shopping.merchant.reports.v1beta.ReportGranularity(this); + onBuilt(); + return result; + } - private static final ReportGranularity[] VALUES = values(); + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static ReportGranularity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reports.v1beta.ReportGranularity) { + return mergeFrom((com.google.shopping.merchant.reports.v1beta.ReportGranularity) other); + } else { + super.mergeFrom(other); + return this; + } } - return VALUES[desc.getIndex()]; + + public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.ReportGranularity other) { + if (other + == com.google.shopping.merchant.reports.v1beta.ReportGranularity.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.ReportGranularity) } - private final int value; + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.ReportGranularity) + private static final com.google.shopping.merchant.reports.v1beta.ReportGranularity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reports.v1beta.ReportGranularity(); + } - private ReportGranularity(int value) { - this.value = value; + public static com.google.shopping.merchant.reports.v1beta.ReportGranularity getDefaultInstance() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.ReportGranularity) + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportGranularity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.ReportGranularity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportGranularityOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportGranularityOrBuilder.java new file mode 100644 index 000000000000..dc14937bdc0b --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportGranularityOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/merchant/reports/v1beta/reports.proto + +package com.google.shopping.merchant.reports.v1beta; + +public interface ReportGranularityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.ReportGranularity) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRow.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRow.java index bd7f6ce1527d..f91382964178 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRow.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRow.java @@ -123,65 +123,6 @@ public boolean hasProductPerformanceView() { : productPerformanceView_; } - public static final int NON_PRODUCT_PERFORMANCE_VIEW_FIELD_NUMBER = 7; - private com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - nonProductPerformanceView_; - /** - * - * - *
-   * Fields available for query in `non_product_performance_view` table.
-   * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - * - * @return Whether the nonProductPerformanceView field is set. - */ - @java.lang.Override - public boolean hasNonProductPerformanceView() { - return nonProductPerformanceView_ != null; - } - /** - * - * - *
-   * Fields available for query in `non_product_performance_view` table.
-   * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - * - * @return The nonProductPerformanceView. - */ - @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - getNonProductPerformanceView() { - return nonProductPerformanceView_ == null - ? com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.getDefaultInstance() - : nonProductPerformanceView_; - } - /** - * - * - *
-   * Fields available for query in `non_product_performance_view` table.
-   * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - @java.lang.Override - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceViewOrBuilder - getNonProductPerformanceViewOrBuilder() { - return nonProductPerformanceView_ == null - ? com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.getDefaultInstance() - : nonProductPerformanceView_; - } - public static final int PRODUCT_VIEW_FIELD_NUMBER = 2; private com.google.shopping.merchant.reports.v1beta.ProductView productView_; /** @@ -696,9 +637,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (bestSellersBrandView_ != null) { output.writeMessage(6, getBestSellersBrandView()); } - if (nonProductPerformanceView_ != null) { - output.writeMessage(7, getNonProductPerformanceView()); - } if (competitiveVisibilityCompetitorView_ != null) { output.writeMessage(8, getCompetitiveVisibilityCompetitorView()); } @@ -743,11 +681,6 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBestSellersBrandView()); } - if (nonProductPerformanceView_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, getNonProductPerformanceView()); - } if (competitiveVisibilityCompetitorView_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -783,11 +716,6 @@ public boolean equals(final java.lang.Object obj) { if (hasProductPerformanceView()) { if (!getProductPerformanceView().equals(other.getProductPerformanceView())) return false; } - if (hasNonProductPerformanceView() != other.hasNonProductPerformanceView()) return false; - if (hasNonProductPerformanceView()) { - if (!getNonProductPerformanceView().equals(other.getNonProductPerformanceView())) - return false; - } if (hasProductView() != other.hasProductView()) return false; if (hasProductView()) { if (!getProductView().equals(other.getProductView())) return false; @@ -845,10 +773,6 @@ public int hashCode() { hash = (37 * hash) + PRODUCT_PERFORMANCE_VIEW_FIELD_NUMBER; hash = (53 * hash) + getProductPerformanceView().hashCode(); } - if (hasNonProductPerformanceView()) { - hash = (37 * hash) + NON_PRODUCT_PERFORMANCE_VIEW_FIELD_NUMBER; - hash = (53 * hash) + getNonProductPerformanceView().hashCode(); - } if (hasProductView()) { hash = (37 * hash) + PRODUCT_VIEW_FIELD_NUMBER; hash = (53 * hash) + getProductView().hashCode(); @@ -1030,11 +954,6 @@ public Builder clear() { productPerformanceViewBuilder_.dispose(); productPerformanceViewBuilder_ = null; } - nonProductPerformanceView_ = null; - if (nonProductPerformanceViewBuilder_ != null) { - nonProductPerformanceViewBuilder_.dispose(); - nonProductPerformanceViewBuilder_ = null; - } productView_ = null; if (productViewBuilder_ != null) { productViewBuilder_.dispose(); @@ -1118,52 +1037,46 @@ private void buildPartial0(com.google.shopping.merchant.reports.v1beta.ReportRow : productPerformanceViewBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { - result.nonProductPerformanceView_ = - nonProductPerformanceViewBuilder_ == null - ? nonProductPerformanceView_ - : nonProductPerformanceViewBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { result.productView_ = productViewBuilder_ == null ? productView_ : productViewBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { result.priceCompetitivenessProductView_ = priceCompetitivenessProductViewBuilder_ == null ? priceCompetitivenessProductView_ : priceCompetitivenessProductViewBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.priceInsightsProductView_ = priceInsightsProductViewBuilder_ == null ? priceInsightsProductView_ : priceInsightsProductViewBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.bestSellersProductClusterView_ = bestSellersProductClusterViewBuilder_ == null ? bestSellersProductClusterView_ : bestSellersProductClusterViewBuilder_.build(); } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.bestSellersBrandView_ = bestSellersBrandViewBuilder_ == null ? bestSellersBrandView_ : bestSellersBrandViewBuilder_.build(); } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.competitiveVisibilityCompetitorView_ = competitiveVisibilityCompetitorViewBuilder_ == null ? competitiveVisibilityCompetitorView_ : competitiveVisibilityCompetitorViewBuilder_.build(); } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.competitiveVisibilityTopMerchantView_ = competitiveVisibilityTopMerchantViewBuilder_ == null ? competitiveVisibilityTopMerchantView_ : competitiveVisibilityTopMerchantViewBuilder_.build(); } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.competitiveVisibilityBenchmarkView_ = competitiveVisibilityBenchmarkViewBuilder_ == null ? competitiveVisibilityBenchmarkView_ @@ -1220,9 +1133,6 @@ public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.ReportRow o if (other.hasProductPerformanceView()) { mergeProductPerformanceView(other.getProductPerformanceView()); } - if (other.hasNonProductPerformanceView()) { - mergeNonProductPerformanceView(other.getNonProductPerformanceView()); - } if (other.hasProductView()) { mergeProductView(other.getProductView()); } @@ -1283,7 +1193,7 @@ public Builder mergeFrom( case 18: { input.readMessage(getProductViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; break; } // case 18 case 26: @@ -1291,43 +1201,36 @@ public Builder mergeFrom( input.readMessage( getPriceCompetitivenessProductViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( getPriceInsightsProductViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( getBestSellersProductClusterViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage( getBestSellersBrandViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; break; } // case 50 - case 58: - { - input.readMessage( - getNonProductPerformanceViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 58 case 66: { input.readMessage( getCompetitiveVisibilityCompetitorViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; break; } // case 66 case 74: @@ -1335,7 +1238,7 @@ public Builder mergeFrom( input.readMessage( getCompetitiveVisibilityTopMerchantViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; break; } // case 74 case 82: @@ -1343,7 +1246,7 @@ public Builder mergeFrom( input.readMessage( getCompetitiveVisibilityBenchmarkViewFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; break; } // case 82 default: @@ -1578,219 +1481,6 @@ public Builder clearProductPerformanceView() { return productPerformanceViewBuilder_; } - private com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - nonProductPerformanceView_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.Builder, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceViewOrBuilder> - nonProductPerformanceViewBuilder_; - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - * - * @return Whether the nonProductPerformanceView field is set. - */ - public boolean hasNonProductPerformanceView() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - * - * @return The nonProductPerformanceView. - */ - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - getNonProductPerformanceView() { - if (nonProductPerformanceViewBuilder_ == null) { - return nonProductPerformanceView_ == null - ? com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - .getDefaultInstance() - : nonProductPerformanceView_; - } else { - return nonProductPerformanceViewBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - public Builder setNonProductPerformanceView( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView value) { - if (nonProductPerformanceViewBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nonProductPerformanceView_ = value; - } else { - nonProductPerformanceViewBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - public Builder setNonProductPerformanceView( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.Builder - builderForValue) { - if (nonProductPerformanceViewBuilder_ == null) { - nonProductPerformanceView_ = builderForValue.build(); - } else { - nonProductPerformanceViewBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - public Builder mergeNonProductPerformanceView( - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView value) { - if (nonProductPerformanceViewBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && nonProductPerformanceView_ != null - && nonProductPerformanceView_ - != com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - .getDefaultInstance()) { - getNonProductPerformanceViewBuilder().mergeFrom(value); - } else { - nonProductPerformanceView_ = value; - } - } else { - nonProductPerformanceViewBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - public Builder clearNonProductPerformanceView() { - bitField0_ = (bitField0_ & ~0x00000002); - nonProductPerformanceView_ = null; - if (nonProductPerformanceViewBuilder_ != null) { - nonProductPerformanceViewBuilder_.dispose(); - nonProductPerformanceViewBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.Builder - getNonProductPerformanceViewBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNonProductPerformanceViewFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - public com.google.shopping.merchant.reports.v1beta.NonProductPerformanceViewOrBuilder - getNonProductPerformanceViewOrBuilder() { - if (nonProductPerformanceViewBuilder_ != null) { - return nonProductPerformanceViewBuilder_.getMessageOrBuilder(); - } else { - return nonProductPerformanceView_ == null - ? com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - .getDefaultInstance() - : nonProductPerformanceView_; - } - } - /** - * - * - *
-     * Fields available for query in `non_product_performance_view` table.
-     * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.Builder, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceViewOrBuilder> - getNonProductPerformanceViewFieldBuilder() { - if (nonProductPerformanceViewBuilder_ == null) { - nonProductPerformanceViewBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView.Builder, - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceViewOrBuilder>( - getNonProductPerformanceView(), getParentForChildren(), isClean()); - nonProductPerformanceView_ = null; - } - return nonProductPerformanceViewBuilder_; - } - private com.google.shopping.merchant.reports.v1beta.ProductView productView_; private com.google.protobuf.SingleFieldBuilderV3< com.google.shopping.merchant.reports.v1beta.ProductView, @@ -1809,7 +1499,7 @@ public Builder clearNonProductPerformanceView() { * @return Whether the productView field is set. */ public boolean hasProductView() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -1849,7 +1539,7 @@ public Builder setProductView(com.google.shopping.merchant.reports.v1beta.Produc } else { productViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1869,7 +1559,7 @@ public Builder setProductView( } else { productViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1884,7 +1574,7 @@ public Builder setProductView( */ public Builder mergeProductView(com.google.shopping.merchant.reports.v1beta.ProductView value) { if (productViewBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000002) != 0) && productView_ != null && productView_ != com.google.shopping.merchant.reports.v1beta.ProductView.getDefaultInstance()) { @@ -1895,7 +1585,7 @@ public Builder mergeProductView(com.google.shopping.merchant.reports.v1beta.Prod } else { productViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1909,7 +1599,7 @@ public Builder mergeProductView(com.google.shopping.merchant.reports.v1beta.Prod * .google.shopping.merchant.reports.v1beta.ProductView product_view = 2; */ public Builder clearProductView() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); productView_ = null; if (productViewBuilder_ != null) { productViewBuilder_.dispose(); @@ -1928,7 +1618,7 @@ public Builder clearProductView() { * .google.shopping.merchant.reports.v1beta.ProductView product_view = 2; */ public com.google.shopping.merchant.reports.v1beta.ProductView.Builder getProductViewBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return getProductViewFieldBuilder().getBuilder(); } @@ -1998,7 +1688,7 @@ public com.google.shopping.merchant.reports.v1beta.ProductView.Builder getProduc * @return Whether the priceCompetitivenessProductView field is set. */ public boolean hasPriceCompetitivenessProductView() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -2045,7 +1735,7 @@ public Builder setPriceCompetitivenessProductView( } else { priceCompetitivenessProductViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2068,7 +1758,7 @@ public Builder setPriceCompetitivenessProductView( } else { priceCompetitivenessProductViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2086,7 +1776,7 @@ public Builder setPriceCompetitivenessProductView( public Builder mergePriceCompetitivenessProductView( com.google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView value) { if (priceCompetitivenessProductViewBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000004) != 0) && priceCompetitivenessProductView_ != null && priceCompetitivenessProductView_ != com.google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView @@ -2098,7 +1788,7 @@ public Builder mergePriceCompetitivenessProductView( } else { priceCompetitivenessProductViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2114,7 +1804,7 @@ public Builder mergePriceCompetitivenessProductView( *
*/ public Builder clearPriceCompetitivenessProductView() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); priceCompetitivenessProductView_ = null; if (priceCompetitivenessProductViewBuilder_ != null) { priceCompetitivenessProductViewBuilder_.dispose(); @@ -2136,7 +1826,7 @@ public Builder clearPriceCompetitivenessProductView() { */ public com.google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView.Builder getPriceCompetitivenessProductViewBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return getPriceCompetitivenessProductViewFieldBuilder().getBuilder(); } @@ -2212,7 +1902,7 @@ public Builder clearPriceCompetitivenessProductView() { * @return Whether the priceInsightsProductView field is set. */ public boolean hasPriceInsightsProductView() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2259,7 +1949,7 @@ public Builder setPriceInsightsProductView( } else { priceInsightsProductViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2282,7 +1972,7 @@ public Builder setPriceInsightsProductView( } else { priceInsightsProductViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2300,7 +1990,7 @@ public Builder setPriceInsightsProductView( public Builder mergePriceInsightsProductView( com.google.shopping.merchant.reports.v1beta.PriceInsightsProductView value) { if (priceInsightsProductViewBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000008) != 0) && priceInsightsProductView_ != null && priceInsightsProductView_ != com.google.shopping.merchant.reports.v1beta.PriceInsightsProductView @@ -2312,7 +2002,7 @@ public Builder mergePriceInsightsProductView( } else { priceInsightsProductViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2328,7 +2018,7 @@ public Builder mergePriceInsightsProductView( *
*/ public Builder clearPriceInsightsProductView() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); priceInsightsProductView_ = null; if (priceInsightsProductViewBuilder_ != null) { priceInsightsProductViewBuilder_.dispose(); @@ -2350,7 +2040,7 @@ public Builder clearPriceInsightsProductView() { */ public com.google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Builder getPriceInsightsProductViewBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return getPriceInsightsProductViewFieldBuilder().getBuilder(); } @@ -2425,7 +2115,7 @@ public Builder clearPriceInsightsProductView() { * @return Whether the bestSellersProductClusterView field is set. */ public boolean hasBestSellersProductClusterView() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2472,7 +2162,7 @@ public Builder setBestSellersProductClusterView( } else { bestSellersProductClusterViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2495,7 +2185,7 @@ public Builder setBestSellersProductClusterView( } else { bestSellersProductClusterViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2513,7 +2203,7 @@ public Builder setBestSellersProductClusterView( public Builder mergeBestSellersProductClusterView( com.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView value) { if (bestSellersProductClusterViewBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000010) != 0) && bestSellersProductClusterView_ != null && bestSellersProductClusterView_ != com.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView @@ -2525,7 +2215,7 @@ public Builder mergeBestSellersProductClusterView( } else { bestSellersProductClusterViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2541,7 +2231,7 @@ public Builder mergeBestSellersProductClusterView( *
*/ public Builder clearBestSellersProductClusterView() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); bestSellersProductClusterView_ = null; if (bestSellersProductClusterViewBuilder_ != null) { bestSellersProductClusterViewBuilder_.dispose(); @@ -2563,7 +2253,7 @@ public Builder clearBestSellersProductClusterView() { */ public com.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.Builder getBestSellersProductClusterViewBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return getBestSellersProductClusterViewFieldBuilder().getBuilder(); } @@ -2637,7 +2327,7 @@ public Builder clearBestSellersProductClusterView() { * @return Whether the bestSellersBrandView field is set. */ public boolean hasBestSellersBrandView() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2683,7 +2373,7 @@ public Builder setBestSellersBrandView( } else { bestSellersBrandViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2705,7 +2395,7 @@ public Builder setBestSellersBrandView( } else { bestSellersBrandViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2723,7 +2413,7 @@ public Builder setBestSellersBrandView( public Builder mergeBestSellersBrandView( com.google.shopping.merchant.reports.v1beta.BestSellersBrandView value) { if (bestSellersBrandViewBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000020) != 0) && bestSellersBrandView_ != null && bestSellersBrandView_ != com.google.shopping.merchant.reports.v1beta.BestSellersBrandView @@ -2735,7 +2425,7 @@ public Builder mergeBestSellersBrandView( } else { bestSellersBrandViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2751,7 +2441,7 @@ public Builder mergeBestSellersBrandView( *
*/ public Builder clearBestSellersBrandView() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); bestSellersBrandView_ = null; if (bestSellersBrandViewBuilder_ != null) { bestSellersBrandViewBuilder_.dispose(); @@ -2773,7 +2463,7 @@ public Builder clearBestSellersBrandView() { */ public com.google.shopping.merchant.reports.v1beta.BestSellersBrandView.Builder getBestSellersBrandViewBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); return getBestSellersBrandViewFieldBuilder().getBuilder(); } @@ -2849,7 +2539,7 @@ public Builder clearBestSellersBrandView() { * @return Whether the competitiveVisibilityCompetitorView field is set. */ public boolean hasCompetitiveVisibilityCompetitorView() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2898,7 +2588,7 @@ public Builder setCompetitiveVisibilityCompetitorView( } else { competitiveVisibilityCompetitorViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2922,7 +2612,7 @@ public Builder setCompetitiveVisibilityCompetitorView( } else { competitiveVisibilityCompetitorViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2941,7 +2631,7 @@ public Builder setCompetitiveVisibilityCompetitorView( public Builder mergeCompetitiveVisibilityCompetitorView( com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView value) { if (competitiveVisibilityCompetitorViewBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000040) != 0) && competitiveVisibilityCompetitorView_ != null && competitiveVisibilityCompetitorView_ != com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView @@ -2953,7 +2643,7 @@ public Builder mergeCompetitiveVisibilityCompetitorView( } else { competitiveVisibilityCompetitorViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2970,7 +2660,7 @@ public Builder mergeCompetitiveVisibilityCompetitorView( *
*/ public Builder clearCompetitiveVisibilityCompetitorView() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000040); competitiveVisibilityCompetitorView_ = null; if (competitiveVisibilityCompetitorViewBuilder_ != null) { competitiveVisibilityCompetitorViewBuilder_.dispose(); @@ -2993,7 +2683,7 @@ public Builder clearCompetitiveVisibilityCompetitorView() { */ public com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView.Builder getCompetitiveVisibilityCompetitorViewBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; onChanged(); return getCompetitiveVisibilityCompetitorViewFieldBuilder().getBuilder(); } @@ -3076,7 +2766,7 @@ public Builder clearCompetitiveVisibilityCompetitorView() { * @return Whether the competitiveVisibilityTopMerchantView field is set. */ public boolean hasCompetitiveVisibilityTopMerchantView() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -3125,7 +2815,7 @@ public Builder setCompetitiveVisibilityTopMerchantView( } else { competitiveVisibilityTopMerchantViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3149,7 +2839,7 @@ public Builder setCompetitiveVisibilityTopMerchantView( } else { competitiveVisibilityTopMerchantViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3168,7 +2858,7 @@ public Builder setCompetitiveVisibilityTopMerchantView( public Builder mergeCompetitiveVisibilityTopMerchantView( com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView value) { if (competitiveVisibilityTopMerchantViewBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000080) != 0) && competitiveVisibilityTopMerchantView_ != null && competitiveVisibilityTopMerchantView_ != com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView @@ -3180,7 +2870,7 @@ public Builder mergeCompetitiveVisibilityTopMerchantView( } else { competitiveVisibilityTopMerchantViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3197,7 +2887,7 @@ public Builder mergeCompetitiveVisibilityTopMerchantView( *
*/ public Builder clearCompetitiveVisibilityTopMerchantView() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000080); competitiveVisibilityTopMerchantView_ = null; if (competitiveVisibilityTopMerchantViewBuilder_ != null) { competitiveVisibilityTopMerchantViewBuilder_.dispose(); @@ -3220,7 +2910,7 @@ public Builder clearCompetitiveVisibilityTopMerchantView() { */ public com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView.Builder getCompetitiveVisibilityTopMerchantViewBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; onChanged(); return getCompetitiveVisibilityTopMerchantViewFieldBuilder().getBuilder(); } @@ -3302,7 +2992,7 @@ public Builder clearCompetitiveVisibilityTopMerchantView() { * @return Whether the competitiveVisibilityBenchmarkView field is set. */ public boolean hasCompetitiveVisibilityBenchmarkView() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -3351,7 +3041,7 @@ public Builder setCompetitiveVisibilityBenchmarkView( } else { competitiveVisibilityBenchmarkViewBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3375,7 +3065,7 @@ public Builder setCompetitiveVisibilityBenchmarkView( } else { competitiveVisibilityBenchmarkViewBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3394,7 +3084,7 @@ public Builder setCompetitiveVisibilityBenchmarkView( public Builder mergeCompetitiveVisibilityBenchmarkView( com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView value) { if (competitiveVisibilityBenchmarkViewBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) + if (((bitField0_ & 0x00000100) != 0) && competitiveVisibilityBenchmarkView_ != null && competitiveVisibilityBenchmarkView_ != com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView @@ -3406,7 +3096,7 @@ public Builder mergeCompetitiveVisibilityBenchmarkView( } else { competitiveVisibilityBenchmarkViewBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3423,7 +3113,7 @@ public Builder mergeCompetitiveVisibilityBenchmarkView( *
*/ public Builder clearCompetitiveVisibilityBenchmarkView() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); competitiveVisibilityBenchmarkView_ = null; if (competitiveVisibilityBenchmarkViewBuilder_ != null) { competitiveVisibilityBenchmarkViewBuilder_.dispose(); @@ -3446,7 +3136,7 @@ public Builder clearCompetitiveVisibilityBenchmarkView() { */ public com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView.Builder getCompetitiveVisibilityBenchmarkViewBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; onChanged(); return getCompetitiveVisibilityBenchmarkViewFieldBuilder().getBuilder(); } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRowOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRowOrBuilder.java index 76a824152538..521a0f24a3fd 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRowOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportRowOrBuilder.java @@ -65,49 +65,6 @@ public interface ReportRowOrBuilder com.google.shopping.merchant.reports.v1beta.ProductPerformanceViewOrBuilder getProductPerformanceViewOrBuilder(); - /** - * - * - *
-   * Fields available for query in `non_product_performance_view` table.
-   * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - * - * @return Whether the nonProductPerformanceView field is set. - */ - boolean hasNonProductPerformanceView(); - /** - * - * - *
-   * Fields available for query in `non_product_performance_view` table.
-   * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - * - * @return The nonProductPerformanceView. - */ - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView - getNonProductPerformanceView(); - /** - * - * - *
-   * Fields available for query in `non_product_performance_view` table.
-   * 
- * - * - * .google.shopping.merchant.reports.v1beta.NonProductPerformanceView non_product_performance_view = 7; - * - */ - com.google.shopping.merchant.reports.v1beta.NonProductPerformanceViewOrBuilder - getNonProductPerformanceViewOrBuilder(); - /** * * diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportsProto.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportsProto.java index 0fd7e70ba4f7..8323102a2be0 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportsProto.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportsProto.java @@ -60,9 +60,9 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_descriptor; + internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_fieldAccessorTable; + internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_shopping_merchant_reports_v1beta_PriceCompetitivenessProductView_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -79,10 +79,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_shopping_merchant_reports_v1beta_BestSellersBrandView_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_shopping_merchant_reports_v1beta_BestSellersBrandView_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityCompetitorView_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -95,6 +91,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityBenchmarkView_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityBenchmarkView_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -110,314 +126,313 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".proto\032\027google/api/client.proto\032\037google/" + "api/field_behavior.proto\032\037google/protobu" + "f/timestamp.proto\032 google/shopping/type/" - + "types.proto\032\026google/type/date.proto\"a\n\rS" + + "types.proto\032\026google/type/date.proto\"m\n\rS" + "earchRequest\022\024\n\006parent\030\001 \001(\tB\004\342A\001\002\022\023\n\005qu" - + "ery\030\002 \001(\tB\004\342A\001\002\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npa" - + "ge_token\030\004 \001(\t\"n\n\016SearchResponse\022C\n\007resu" - + "lts\030\001 \003(\01322.google.shopping.merchant.rep" - + "orts.v1beta.ReportRow\022\027\n\017next_page_token" - + "\030\002 \001(\t\"\320\010\n\tReportRow\022a\n\030product_performa" - + "nce_view\030\001 \001(\0132?.google.shopping.merchan" - + "t.reports.v1beta.ProductPerformanceView\022" - + "h\n\034non_product_performance_view\030\007 \001(\0132B." - + "google.shopping.merchant.reports.v1beta." - + "NonProductPerformanceView\022J\n\014product_vie" - + "w\030\002 \001(\01324.google.shopping.merchant.repor" - + "ts.v1beta.ProductView\022t\n\"price_competiti" - + "veness_product_view\030\003 \001(\0132H.google.shopp" - + "ing.merchant.reports.v1beta.PriceCompeti" - + "tivenessProductView\022f\n\033price_insights_pr" - + "oduct_view\030\004 \001(\0132A.google.shopping.merch" - + "ant.reports.v1beta.PriceInsightsProductV" - + "iew\022q\n!best_sellers_product_cluster_view" - + "\030\005 \001(\0132F.google.shopping.merchant.report" - + "s.v1beta.BestSellersProductClusterView\022^" - + "\n\027best_sellers_brand_view\030\006 \001(\0132=.google" - + ".shopping.merchant.reports.v1beta.BestSe" - + "llersBrandView\022|\n&competitive_visibility" - + "_competitor_view\030\010 \001(\0132L.google.shopping" + + "ery\030\002 \001(\tB\004\342A\001\002\022\027\n\tpage_size\030\003 \001(\005B\004\342A\001\001" + + "\022\030\n\npage_token\030\004 \001(\tB\004\342A\001\001\"n\n\016SearchResp" + + "onse\022C\n\007results\030\001 \003(\01322.google.shopping." + + "merchant.reports.v1beta.ReportRow\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"\346\007\n\tReportRow\022a\n\030prod" + + "uct_performance_view\030\001 \001(\0132?.google.shop" + + "ping.merchant.reports.v1beta.ProductPerf" + + "ormanceView\022J\n\014product_view\030\002 \001(\01324.goog" + + "le.shopping.merchant.reports.v1beta.Prod" + + "uctView\022t\n\"price_competitiveness_product" + + "_view\030\003 \001(\0132H.google.shopping.merchant.r" + + "eports.v1beta.PriceCompetitivenessProduc" + + "tView\022f\n\033price_insights_product_view\030\004 \001" + + "(\0132A.google.shopping.merchant.reports.v1" + + "beta.PriceInsightsProductView\022q\n!best_se" + + "llers_product_cluster_view\030\005 \001(\0132F.googl" + + "e.shopping.merchant.reports.v1beta.BestS" + + "ellersProductClusterView\022^\n\027best_sellers" + + "_brand_view\030\006 \001(\0132=.google.shopping.merc" + + "hant.reports.v1beta.BestSellersBrandView" + + "\022|\n&competitive_visibility_competitor_vi" + + "ew\030\010 \001(\0132L.google.shopping.merchant.repo" + + "rts.v1beta.CompetitiveVisibilityCompetit" + + "orView\022\177\n(competitive_visibility_top_mer" + + "chant_view\030\t \001(\0132M.google.shopping.merch" + + "ant.reports.v1beta.CompetitiveVisibility" + + "TopMerchantView\022z\n%competitive_visibilit" + + "y_benchmark_view\030\n \001(\0132K.google.shopping" + ".merchant.reports.v1beta.CompetitiveVisi" - + "bilityCompetitorView\022\177\n(competitive_visi" - + "bility_top_merchant_view\030\t \001(\0132M.google." - + "shopping.merchant.reports.v1beta.Competi" - + "tiveVisibilityTopMerchantView\022z\n%competi" - + "tive_visibility_benchmark_view\030\n \001(\0132K.g" - + "oogle.shopping.merchant.reports.v1beta.C" - + "ompetitiveVisibilityBenchmarkView\"\252\013\n\026Pr" - + "oductPerformanceView\022;\n\013destination\030\001 \001(" - + "\0162!.google.shopping.type.DestinationH\000\210\001" - + "\001\022\037\n\004date\030\002 \001(\0132\021.google.type.Date\022\037\n\004we" - + "ek\030\003 \001(\0132\021.google.type.Date\022\"\n\025customer_" - + "country_code\030\004 \001(\tH\001\210\001\001\022\027\n\naccount_id\030\035 " - + "\001(\003H\002\210\001\001\022!\n\024account_display_name\030\036 \001(\tH\003" - + "\210\001\001\022 \n\023external_account_id\030\037 \001(\tH\004\210\001\001\022\025\n" - + "\010offer_id\030\005 \001(\tH\005\210\001\001\022\022\n\005title\030\006 \001(\tH\006\210\001\001" - + "\022\022\n\005brand\030\007 \001(\tH\007\210\001\001\022\030\n\013category_l1\030\010 \001(" - + "\tH\010\210\001\001\022\030\n\013category_l2\030\t \001(\tH\t\210\001\001\022\030\n\013cate" - + "gory_l3\030\n \001(\tH\n\210\001\001\022\030\n\013category_l4\030\013 \001(\tH" - + "\013\210\001\001\022\030\n\013category_l5\030\014 \001(\tH\014\210\001\001\022\034\n\017produc" - + "t_type_l1\030\r \001(\tH\r\210\001\001\022\034\n\017product_type_l2\030" - + "\016 \001(\tH\016\210\001\001\022\034\n\017product_type_l3\030\017 \001(\tH\017\210\001\001" - + "\022\034\n\017product_type_l4\030\020 \001(\tH\020\210\001\001\022\034\n\017produc" - + "t_type_l5\030\021 \001(\tH\021\210\001\001\022\032\n\rcustom_label0\030\022 " - + "\001(\tH\022\210\001\001\022\032\n\rcustom_label1\030\023 \001(\tH\023\210\001\001\022\032\n\r" - + "custom_label2\030\024 \001(\tH\024\210\001\001\022\032\n\rcustom_label" - + "3\030\025 \001(\tH\025\210\001\001\022\032\n\rcustom_label4\030\026 \001(\tH\026\210\001\001" - + "\022\023\n\006clicks\030\027 \001(\003H\027\210\001\001\022\030\n\013impressions\030\030 \001" - + "(\003H\030\210\001\001\022\037\n\022click_through_rate\030\031 \001(\001H\031\210\001\001" - + "\022\030\n\013conversions\030\032 \001(\001H\032\210\001\001\0225\n\020conversion" - + "_value\030\033 \001(\0132\033.google.shopping.type.Pric" - + "e\022\034\n\017conversion_rate\030\034 \001(\001H\033\210\001\001B\016\n\014_dest" - + "inationB\030\n\026_customer_country_codeB\r\n\013_ac" - + "count_idB\027\n\025_account_display_nameB\026\n\024_ex" - + "ternal_account_idB\013\n\t_offer_idB\010\n\006_title" - + "B\010\n\006_brandB\016\n\014_category_l1B\016\n\014_category_" - + "l2B\016\n\014_category_l3B\016\n\014_category_l4B\016\n\014_c" - + "ategory_l5B\022\n\020_product_type_l1B\022\n\020_produ" - + "ct_type_l2B\022\n\020_product_type_l3B\022\n\020_produ" - + "ct_type_l4B\022\n\020_product_type_l5B\020\n\016_custo" - + "m_label0B\020\n\016_custom_label1B\020\n\016_custom_la" - + "bel2B\020\n\016_custom_label3B\020\n\016_custom_label4" - + "B\t\n\007_clicksB\016\n\014_impressionsB\025\n\023_click_th" - + "rough_rateB\016\n\014_conversionsB\022\n\020_conversio" - + "n_rate\"\266\024\n\013ProductView\022\017\n\002id\030\001 \001(\tH\000\210\001\001\022" - + "\032\n\rlanguage_code\030\002 \001(\tH\001\210\001\001\022\027\n\nfeed_labe" - + "l\030\003 \001(\tH\002\210\001\001\022\025\n\010offer_id\030\004 \001(\tH\003\210\001\001\022\022\n\005t" - + "itle\030\005 \001(\tH\004\210\001\001\022\022\n\005brand\030\006 \001(\tH\005\210\001\001\022\030\n\013c" - + "ategory_l1\030\007 \001(\tH\006\210\001\001\022\030\n\013category_l2\030\010 \001" - + "(\tH\007\210\001\001\022\030\n\013category_l3\030\t \001(\tH\010\210\001\001\022\030\n\013cat" - + "egory_l4\030\n \001(\tH\t\210\001\001\022\030\n\013category_l5\030\013 \001(\t" - + "H\n\210\001\001\022\034\n\017product_type_l1\030\014 \001(\tH\013\210\001\001\022\034\n\017p" - + "roduct_type_l2\030\r \001(\tH\014\210\001\001\022\034\n\017product_typ" - + "e_l3\030\016 \001(\tH\r\210\001\001\022\034\n\017product_type_l4\030\017 \001(\t" - + "H\016\210\001\001\022\034\n\017product_type_l5\030\020 \001(\tH\017\210\001\001\022*\n\005p" - + "rice\030\021 \001(\0132\033.google.shopping.type.Price\022" - + "\026\n\tcondition\030\022 \001(\tH\020\210\001\001\022\031\n\014availability\030" - + "\023 \001(\tH\021\210\001\001\022\033\n\016shipping_label\030\024 \001(\tH\022\210\001\001\022" - + "\014\n\004gtin\030\025 \003(\t\022\032\n\ritem_group_id\030\026 \001(\tH\023\210\001" - + "\001\022\033\n\016thumbnail_link\030\027 \001(\tH\024\210\001\001\0221\n\rcreati" - + "on_time\030\030 \001(\0132\032.google.protobuf.Timestam" - + "p\022*\n\017expiration_date\030\031 \001(\0132\021.google.type" - + ".Date\022|\n\035aggregated_destination_status\030\032" - + " \001(\0162P.google.shopping.merchant.reports." - + "v1beta.ProductView.AggregatedDestination" - + "StatusH\025\210\001\001\022S\n\013item_issues\030\033 \003(\0132>.googl" - + "e.shopping.merchant.reports.v1beta.Produ" - + "ctView.ItemIssue\032\375\010\n\tItemIssue\022Z\n\004type\030\001" - + " \001(\0132L.google.shopping.merchant.reports." - + "v1beta.ProductView.ItemIssue.ItemIssueTy" - + "pe\022b\n\010severity\030\002 \001(\0132P.google.shopping.m" - + "erchant.reports.v1beta.ProductView.ItemI" - + "ssue.ItemIssueSeverity\022k\n\nresolution\030\003 \001" - + "(\0162R.google.shopping.merchant.reports.v1" - + "beta.ProductView.ItemIssue.ItemIssueReso" - + "lutionH\000\210\001\001\032e\n\rItemIssueType\022\021\n\004code\030\001 \001" - + "(\tH\000\210\001\001\022 \n\023canonical_attribute\030\002 \001(\tH\001\210\001" - + "\001B\007\n\005_codeB\026\n\024_canonical_attribute\032\341\004\n\021I" - + "temIssueSeverity\022\216\001\n\030severity_per_destin" - + "ation\030\001 \003(\0132l.google.shopping.merchant.r" - + "eports.v1beta.ProductView.ItemIssue.Item" - + "IssueSeverity.IssueSeverityPerDestinatio" - + "n\022\212\001\n\023aggregated_severity\030\002 \001(\0162h.google" - + ".shopping.merchant.reports.v1beta.Produc" - + "tView.ItemIssue.ItemIssueSeverity.Aggreg" - + "atedIssueSeverityH\000\210\001\001\032\244\001\n\033IssueSeverity" - + "PerDestination\022;\n\013destination\030\001 \001(\0162!.go" - + "ogle.shopping.type.DestinationH\000\210\001\001\022\035\n\025d" - + "isapproved_countries\030\002 \003(\t\022\031\n\021demoted_co" - + "untries\030\003 \003(\tB\016\n\014_destination\"o\n\027Aggrega" - + "tedIssueSeverity\022)\n%AGGREGATED_ISSUE_SEV" - + "ERITY_UNSPECIFIED\020\000\022\017\n\013DISAPPROVED\020\001\022\013\n\007" - + "DEMOTED\020\002\022\013\n\007PENDING\020\003B\026\n\024_aggregated_se" - + "verity\"i\n\023ItemIssueResolution\022%\n!ITEM_IS" - + "SUE_RESOLUTION_UNSPECIFIED\020\000\022\023\n\017MERCHANT" - + "_ACTION\020\001\022\026\n\022PENDING_PROCESSING\020\002B\r\n\013_re" - + "solution\"\236\001\n\033AggregatedDestinationStatus" - + "\022-\n)AGGREGATED_DESTINATION_STATUS_UNSPEC" - + "IFIED\020\000\022\037\n\033NOT_ELIGIBLE_OR_DISAPPROVED\020\001" - + "\022\013\n\007PENDING\020\002\022\024\n\020ELIGIBLE_LIMITED\020\003\022\014\n\010E" - + "LIGIBLE\020\004B\005\n\003_idB\020\n\016_language_codeB\r\n\013_f" - + "eed_labelB\013\n\t_offer_idB\010\n\006_titleB\010\n\006_bra" - + "ndB\016\n\014_category_l1B\016\n\014_category_l2B\016\n\014_c" - + "ategory_l3B\016\n\014_category_l4B\016\n\014_category_" - + "l5B\022\n\020_product_type_l1B\022\n\020_product_type_" - + "l2B\022\n\020_product_type_l3B\022\n\020_product_type_" - + "l4B\022\n\020_product_type_l5B\014\n\n_conditionB\017\n\r" - + "_availabilityB\021\n\017_shipping_labelB\020\n\016_ite" - + "m_group_idB\021\n\017_thumbnail_linkB \n\036_aggreg" - + "ated_destination_status\"\201\006\n\037PriceCompeti" - + "tivenessProductView\022 \n\023report_country_co" - + "de\030\001 \001(\tH\000\210\001\001\022\017\n\002id\030\002 \001(\tH\001\210\001\001\022\025\n\010offer_" - + "id\030\003 \001(\tH\002\210\001\001\022\022\n\005title\030\004 \001(\tH\003\210\001\001\022\022\n\005bra" - + "nd\030\005 \001(\tH\004\210\001\001\022\030\n\013category_l1\030\006 \001(\tH\005\210\001\001\022" - + "\030\n\013category_l2\030\007 \001(\tH\006\210\001\001\022\030\n\013category_l3" - + "\030\010 \001(\tH\007\210\001\001\022\030\n\013category_l4\030\t \001(\tH\010\210\001\001\022\030\n" - + "\013category_l5\030\n \001(\tH\t\210\001\001\022\034\n\017product_type_" - + "l1\030\013 \001(\tH\n\210\001\001\022\034\n\017product_type_l2\030\014 \001(\tH\013" - + "\210\001\001\022\034\n\017product_type_l3\030\r \001(\tH\014\210\001\001\022\034\n\017pro" - + "duct_type_l4\030\016 \001(\tH\r\210\001\001\022\034\n\017product_type_" - + "l5\030\017 \001(\tH\016\210\001\001\022*\n\005price\030\020 \001(\0132\033.google.sh" - + "opping.type.Price\0224\n\017benchmark_price\030\021 \001" - + "(\0132\033.google.shopping.type.PriceB\026\n\024_repo" - + "rt_country_codeB\005\n\003_idB\013\n\t_offer_idB\010\n\006_" - + "titleB\010\n\006_brandB\016\n\014_category_l1B\016\n\014_cate" - + "gory_l2B\016\n\014_category_l3B\016\n\014_category_l4B" - + "\016\n\014_category_l5B\022\n\020_product_type_l1B\022\n\020_" - + "product_type_l2B\022\n\020_product_type_l3B\022\n\020_" - + "product_type_l4B\022\n\020_product_type_l5\"\374\010\n\030" - + "PriceInsightsProductView\022\017\n\002id\030\001 \001(\tH\000\210\001" - + "\001\022\025\n\010offer_id\030\002 \001(\tH\001\210\001\001\022\022\n\005title\030\003 \001(\tH" - + "\002\210\001\001\022\022\n\005brand\030\004 \001(\tH\003\210\001\001\022\030\n\013category_l1\030" - + "\005 \001(\tH\004\210\001\001\022\030\n\013category_l2\030\006 \001(\tH\005\210\001\001\022\030\n\013" - + "category_l3\030\007 \001(\tH\006\210\001\001\022\030\n\013category_l4\030\010 " - + "\001(\tH\007\210\001\001\022\030\n\013category_l5\030\t \001(\tH\010\210\001\001\022\034\n\017pr" - + "oduct_type_l1\030\n \001(\tH\t\210\001\001\022\034\n\017product_type" - + "_l2\030\013 \001(\tH\n\210\001\001\022\034\n\017product_type_l3\030\014 \001(\tH" - + "\013\210\001\001\022\034\n\017product_type_l4\030\r \001(\tH\014\210\001\001\022\034\n\017pr" - + "oduct_type_l5\030\016 \001(\tH\r\210\001\001\022*\n\005price\030\017 \001(\0132" - + "\033.google.shopping.type.Price\0224\n\017suggeste" - + "d_price\030\020 \001(\0132\033.google.shopping.type.Pri" - + "ce\0222\n%predicted_impressions_change_fract" - + "ion\030\021 \001(\001H\016\210\001\001\022-\n predicted_clicks_chang" - + "e_fraction\030\022 \001(\001H\017\210\001\001\0222\n%predicted_conve" - + "rsions_change_fraction\030\023 \001(\001H\020\210\001\001\0223\n&pre" - + "dicted_gross_profit_change_fraction\030\024 \001(" - + "\001H\021\210\001\001\022J\n%predicted_monthly_gross_profit" - + "_change\030\025 \001(\0132\033.google.shopping.type.Pri" - + "ceB\005\n\003_idB\013\n\t_offer_idB\010\n\006_titleB\010\n\006_bra" - + "ndB\016\n\014_category_l1B\016\n\014_category_l2B\016\n\014_c" - + "ategory_l3B\016\n\014_category_l4B\016\n\014_category_" - + "l5B\022\n\020_product_type_l1B\022\n\020_product_type_" - + "l2B\022\n\020_product_type_l3B\022\n\020_product_type_" - + "l4B\022\n\020_product_type_l5B(\n&_predicted_imp" - + "ressions_change_fractionB#\n!_predicted_c" - + "licks_change_fractionB(\n&_predicted_conv" - + "ersions_change_fractionB)\n\'_predicted_gr" - + "oss_profit_change_fraction\"\256\013\n\035BestSelle" - + "rsProductClusterView\022&\n\013report_date\030\001 \001(" - + "\0132\021.google.type.Date\022[\n\022report_granulari" - + "ty\030\002 \001(\0162:.google.shopping.merchant.repo" - + "rts.v1beta.ReportGranularityH\000\210\001\001\022 \n\023rep" - + "ort_country_code\030\003 \001(\tH\001\210\001\001\022\037\n\022report_ca" - + "tegory_id\030\004 \001(\003H\002\210\001\001\022\017\n\002id\030\005 \001(\tH\003\210\001\001\022\022\n" - + "\005title\030\006 \001(\tH\004\210\001\001\022\022\n\005brand\030\007 \001(\tH\005\210\001\001\022\030\n" - + "\013category_l1\030\010 \001(\tH\006\210\001\001\022\030\n\013category_l2\030\t" - + " \001(\tH\007\210\001\001\022\030\n\013category_l3\030\n \001(\tH\010\210\001\001\022\030\n\013c" - + "ategory_l4\030\013 \001(\tH\t\210\001\001\022\030\n\013category_l5\030\014 \001" - + "(\tH\n\210\001\001\022\025\n\rvariant_gtins\030\r \003(\t\022u\n\020invent" - + "ory_status\030\016 \001(\0162V.google.shopping.merch" - + "ant.reports.v1beta.BestSellersProductClu" - + "sterView.InventoryStatusH\013\210\001\001\022{\n\026brand_i" - + "nventory_status\030\017 \001(\0162V.google.shopping." - + "merchant.reports.v1beta.BestSellersProdu" - + "ctClusterView.InventoryStatusH\014\210\001\001\022\021\n\004ra" - + "nk\030\020 \001(\003H\r\210\001\001\022\032\n\rprevious_rank\030\021 \001(\003H\016\210\001" - + "\001\022U\n\017relative_demand\030\022 \001(\01627.google.shop" + + "bilityBenchmarkView\"\301\n\n\026ProductPerforman" + + "ceView\022k\n\020marketing_method\030\001 \001(\0162L.googl" + + "e.shopping.merchant.reports.v1beta.Marke" + + "tingMethod.MarketingMethodEnumH\000\210\001\001\022\037\n\004d" + + "ate\030\002 \001(\0132\021.google.type.Date\022\037\n\004week\030\003 \001" + + "(\0132\021.google.type.Date\022\"\n\025customer_countr" + + "y_code\030\004 \001(\tH\001\210\001\001\022\025\n\010offer_id\030\005 \001(\tH\002\210\001\001" + + "\022\022\n\005title\030\006 \001(\tH\003\210\001\001\022\022\n\005brand\030\007 \001(\tH\004\210\001\001" + + "\022\030\n\013category_l1\030\010 \001(\tH\005\210\001\001\022\030\n\013category_l" + + "2\030\t \001(\tH\006\210\001\001\022\030\n\013category_l3\030\n \001(\tH\007\210\001\001\022\030" + + "\n\013category_l4\030\013 \001(\tH\010\210\001\001\022\030\n\013category_l5\030" + + "\014 \001(\tH\t\210\001\001\022\034\n\017product_type_l1\030\r \001(\tH\n\210\001\001" + + "\022\034\n\017product_type_l2\030\016 \001(\tH\013\210\001\001\022\034\n\017produc" + + "t_type_l3\030\017 \001(\tH\014\210\001\001\022\034\n\017product_type_l4\030" + + "\020 \001(\tH\r\210\001\001\022\034\n\017product_type_l5\030\021 \001(\tH\016\210\001\001" + + "\022\032\n\rcustom_label0\030\022 \001(\tH\017\210\001\001\022\032\n\rcustom_l" + + "abel1\030\023 \001(\tH\020\210\001\001\022\032\n\rcustom_label2\030\024 \001(\tH" + + "\021\210\001\001\022\032\n\rcustom_label3\030\025 \001(\tH\022\210\001\001\022\032\n\rcust" + + "om_label4\030\026 \001(\tH\023\210\001\001\022\023\n\006clicks\030\027 \001(\003H\024\210\001" + + "\001\022\030\n\013impressions\030\030 \001(\003H\025\210\001\001\022\037\n\022click_thr" + + "ough_rate\030\031 \001(\001H\026\210\001\001\022\030\n\013conversions\030\032 \001(" + + "\001H\027\210\001\001\0225\n\020conversion_value\030\033 \001(\0132\033.googl" + + "e.shopping.type.Price\022\034\n\017conversion_rate" + + "\030\034 \001(\001H\030\210\001\001B\023\n\021_marketing_methodB\030\n\026_cus" + + "tomer_country_codeB\013\n\t_offer_idB\010\n\006_titl" + + "eB\010\n\006_brandB\016\n\014_category_l1B\016\n\014_category" + + "_l2B\016\n\014_category_l3B\016\n\014_category_l4B\016\n\014_" + + "category_l5B\022\n\020_product_type_l1B\022\n\020_prod" + + "uct_type_l2B\022\n\020_product_type_l3B\022\n\020_prod" + + "uct_type_l4B\022\n\020_product_type_l5B\020\n\016_cust" + + "om_label0B\020\n\016_custom_label1B\020\n\016_custom_l" + + "abel2B\020\n\016_custom_label3B\020\n\016_custom_label" + + "4B\t\n\007_clicksB\016\n\014_impressionsB\025\n\023_click_t" + + "hrough_rateB\016\n\014_conversionsB\022\n\020_conversi" + + "on_rate\"\326\025\n\013ProductView\022\017\n\002id\030\001 \001(\tH\000\210\001\001" + + "\022?\n\007channel\030\034 \001(\0162).google.shopping.type" + + ".Channel.ChannelEnumH\001\210\001\001\022\032\n\rlanguage_co" + + "de\030\002 \001(\tH\002\210\001\001\022\027\n\nfeed_label\030\003 \001(\tH\003\210\001\001\022\025" + + "\n\010offer_id\030\004 \001(\tH\004\210\001\001\022\022\n\005title\030\005 \001(\tH\005\210\001" + + "\001\022\022\n\005brand\030\006 \001(\tH\006\210\001\001\022\030\n\013category_l1\030\007 \001" + + "(\tH\007\210\001\001\022\030\n\013category_l2\030\010 \001(\tH\010\210\001\001\022\030\n\013cat" + + "egory_l3\030\t \001(\tH\t\210\001\001\022\030\n\013category_l4\030\n \001(\t" + + "H\n\210\001\001\022\030\n\013category_l5\030\013 \001(\tH\013\210\001\001\022\034\n\017produ" + + "ct_type_l1\030\014 \001(\tH\014\210\001\001\022\034\n\017product_type_l2" + + "\030\r \001(\tH\r\210\001\001\022\034\n\017product_type_l3\030\016 \001(\tH\016\210\001" + + "\001\022\034\n\017product_type_l4\030\017 \001(\tH\017\210\001\001\022\034\n\017produ" + + "ct_type_l5\030\020 \001(\tH\020\210\001\001\022*\n\005price\030\021 \001(\0132\033.g" + + "oogle.shopping.type.Price\022\026\n\tcondition\030\022" + + " \001(\tH\021\210\001\001\022\031\n\014availability\030\023 \001(\tH\022\210\001\001\022\033\n\016" + + "shipping_label\030\024 \001(\tH\023\210\001\001\022\014\n\004gtin\030\025 \003(\t\022" + + "\032\n\ritem_group_id\030\026 \001(\tH\024\210\001\001\022\033\n\016thumbnail" + + "_link\030\027 \001(\tH\025\210\001\001\0221\n\rcreation_time\030\030 \001(\0132" + + "\032.google.protobuf.Timestamp\022*\n\017expiratio" + + "n_date\030\031 \001(\0132\021.google.type.Date\022\207\001\n#aggr" + + "egated_reporting_context_status\030\032 \001(\0162U." + + "google.shopping.merchant.reports.v1beta." + + "ProductView.AggregatedReportingContextSt" + + "atusH\026\210\001\001\022S\n\013item_issues\030\033 \003(\0132>.google." + + "shopping.merchant.reports.v1beta.Product" + + "View.ItemIssue\032\263\t\n\tItemIssue\022Z\n\004type\030\001 \001" + + "(\0132L.google.shopping.merchant.reports.v1" + + "beta.ProductView.ItemIssue.ItemIssueType" + + "\022b\n\010severity\030\002 \001(\0132P.google.shopping.mer" + + "chant.reports.v1beta.ProductView.ItemIss" + + "ue.ItemIssueSeverity\022k\n\nresolution\030\003 \001(\016" + + "2R.google.shopping.merchant.reports.v1be" + + "ta.ProductView.ItemIssue.ItemIssueResolu" + + "tionH\000\210\001\001\032e\n\rItemIssueType\022\021\n\004code\030\001 \001(\t" + + "H\000\210\001\001\022 \n\023canonical_attribute\030\002 \001(\tH\001\210\001\001B" + + "\007\n\005_codeB\026\n\024_canonical_attribute\032\227\005\n\021Ite" + + "mIssueSeverity\022\231\001\n\036severity_per_reportin" + + "g_context\030\001 \003(\0132q.google.shopping.mercha" + + "nt.reports.v1beta.ProductView.ItemIssue." + + "ItemIssueSeverity.IssueSeverityPerReport" + + "ingContext\022\212\001\n\023aggregated_severity\030\002 \001(\016" + + "2h.google.shopping.merchant.reports.v1be" + + "ta.ProductView.ItemIssue.ItemIssueSeveri" + + "ty.AggregatedIssueSeverityH\000\210\001\001\032\317\001\n Issu" + + "eSeverityPerReportingContext\022[\n\021reportin" + + "g_context\030\001 \001(\0162;.google.shopping.type.R" + + "eportingContext.ReportingContextEnumH\000\210\001" + + "\001\022\035\n\025disapproved_countries\030\002 \003(\t\022\031\n\021demo" + + "ted_countries\030\003 \003(\tB\024\n\022_reporting_contex" + + "t\"o\n\027AggregatedIssueSeverity\022)\n%AGGREGAT" + + "ED_ISSUE_SEVERITY_UNSPECIFIED\020\000\022\017\n\013DISAP" + + "PROVED\020\001\022\013\n\007DEMOTED\020\002\022\013\n\007PENDING\020\003B\026\n\024_a" + + "ggregated_severity\"i\n\023ItemIssueResolutio" + + "n\022%\n!ITEM_ISSUE_RESOLUTION_UNSPECIFIED\020\000" + + "\022\023\n\017MERCHANT_ACTION\020\001\022\026\n\022PENDING_PROCESS" + + "ING\020\002B\r\n\013_resolution\"\251\001\n AggregatedRepor" + + "tingContextStatus\0223\n/AGGREGATED_REPORTIN" + + "G_CONTEXT_STATUS_UNSPECIFIED\020\000\022\037\n\033NOT_EL" + + "IGIBLE_OR_DISAPPROVED\020\001\022\013\n\007PENDING\020\002\022\024\n\020" + + "ELIGIBLE_LIMITED\020\003\022\014\n\010ELIGIBLE\020\004B\005\n\003_idB" + + "\n\n\010_channelB\020\n\016_language_codeB\r\n\013_feed_l" + + "abelB\013\n\t_offer_idB\010\n\006_titleB\010\n\006_brandB\016\n" + + "\014_category_l1B\016\n\014_category_l2B\016\n\014_catego" + + "ry_l3B\016\n\014_category_l4B\016\n\014_category_l5B\022\n" + + "\020_product_type_l1B\022\n\020_product_type_l2B\022\n" + + "\020_product_type_l3B\022\n\020_product_type_l4B\022\n" + + "\020_product_type_l5B\014\n\n_conditionB\017\n\r_avai" + + "labilityB\021\n\017_shipping_labelB\020\n\016_item_gro" + + "up_idB\021\n\017_thumbnail_linkB&\n$_aggregated_" + + "reporting_context_status\"\201\006\n\037PriceCompet" + + "itivenessProductView\022 \n\023report_country_c" + + "ode\030\001 \001(\tH\000\210\001\001\022\017\n\002id\030\002 \001(\tH\001\210\001\001\022\025\n\010offer" + + "_id\030\003 \001(\tH\002\210\001\001\022\022\n\005title\030\004 \001(\tH\003\210\001\001\022\022\n\005br" + + "and\030\005 \001(\tH\004\210\001\001\022\030\n\013category_l1\030\006 \001(\tH\005\210\001\001" + + "\022\030\n\013category_l2\030\007 \001(\tH\006\210\001\001\022\030\n\013category_l" + + "3\030\010 \001(\tH\007\210\001\001\022\030\n\013category_l4\030\t \001(\tH\010\210\001\001\022\030" + + "\n\013category_l5\030\n \001(\tH\t\210\001\001\022\034\n\017product_type" + + "_l1\030\013 \001(\tH\n\210\001\001\022\034\n\017product_type_l2\030\014 \001(\tH" + + "\013\210\001\001\022\034\n\017product_type_l3\030\r \001(\tH\014\210\001\001\022\034\n\017pr" + + "oduct_type_l4\030\016 \001(\tH\r\210\001\001\022\034\n\017product_type" + + "_l5\030\017 \001(\tH\016\210\001\001\022*\n\005price\030\020 \001(\0132\033.google.s" + + "hopping.type.Price\0224\n\017benchmark_price\030\021 " + + "\001(\0132\033.google.shopping.type.PriceB\026\n\024_rep" + + "ort_country_codeB\005\n\003_idB\013\n\t_offer_idB\010\n\006" + + "_titleB\010\n\006_brandB\016\n\014_category_l1B\016\n\014_cat" + + "egory_l2B\016\n\014_category_l3B\016\n\014_category_l4" + + "B\016\n\014_category_l5B\022\n\020_product_type_l1B\022\n\020" + + "_product_type_l2B\022\n\020_product_type_l3B\022\n\020" + + "_product_type_l4B\022\n\020_product_type_l5\"\320\007\n" + + "\030PriceInsightsProductView\022\017\n\002id\030\001 \001(\tH\000\210" + + "\001\001\022\025\n\010offer_id\030\002 \001(\tH\001\210\001\001\022\022\n\005title\030\003 \001(\t" + + "H\002\210\001\001\022\022\n\005brand\030\004 \001(\tH\003\210\001\001\022\030\n\013category_l1" + + "\030\005 \001(\tH\004\210\001\001\022\030\n\013category_l2\030\006 \001(\tH\005\210\001\001\022\030\n" + + "\013category_l3\030\007 \001(\tH\006\210\001\001\022\030\n\013category_l4\030\010" + + " \001(\tH\007\210\001\001\022\030\n\013category_l5\030\t \001(\tH\010\210\001\001\022\034\n\017p" + + "roduct_type_l1\030\n \001(\tH\t\210\001\001\022\034\n\017product_typ" + + "e_l2\030\013 \001(\tH\n\210\001\001\022\034\n\017product_type_l3\030\014 \001(\t" + + "H\013\210\001\001\022\034\n\017product_type_l4\030\r \001(\tH\014\210\001\001\022\034\n\017p" + + "roduct_type_l5\030\016 \001(\tH\r\210\001\001\022*\n\005price\030\017 \001(\013" + + "2\033.google.shopping.type.Price\0224\n\017suggest" + + "ed_price\030\020 \001(\0132\033.google.shopping.type.Pr" + + "ice\0222\n%predicted_impressions_change_frac" + + "tion\030\021 \001(\001H\016\210\001\001\022-\n predicted_clicks_chan" + + "ge_fraction\030\022 \001(\001H\017\210\001\001\0222\n%predicted_conv" + + "ersions_change_fraction\030\023 \001(\001H\020\210\001\001B\005\n\003_i" + + "dB\013\n\t_offer_idB\010\n\006_titleB\010\n\006_brandB\016\n\014_c" + + "ategory_l1B\016\n\014_category_l2B\016\n\014_category_" + + "l3B\016\n\014_category_l4B\016\n\014_category_l5B\022\n\020_p" + + "roduct_type_l1B\022\n\020_product_type_l2B\022\n\020_p" + + "roduct_type_l3B\022\n\020_product_type_l4B\022\n\020_p" + + "roduct_type_l5B(\n&_predicted_impressions" + + "_change_fractionB#\n!_predicted_clicks_ch" + + "ange_fractionB(\n&_predicted_conversions_" + + "change_fraction\"\360\013\n\035BestSellersProductCl" + + "usterView\022&\n\013report_date\030\001 \001(\0132\021.google." + + "type.Date\022q\n\022report_granularity\030\002 \001(\0162P." + + "google.shopping.merchant.reports.v1beta." + + "ReportGranularity.ReportGranularityEnumH" + + "\000\210\001\001\022 \n\023report_country_code\030\003 \001(\tH\001\210\001\001\022\037" + + "\n\022report_category_id\030\004 \001(\003H\002\210\001\001\022\022\n\005title" + + "\030\006 \001(\tH\003\210\001\001\022\022\n\005brand\030\007 \001(\tH\004\210\001\001\022\030\n\013categ" + + "ory_l1\030\010 \001(\tH\005\210\001\001\022\030\n\013category_l2\030\t \001(\tH\006" + + "\210\001\001\022\030\n\013category_l3\030\n \001(\tH\007\210\001\001\022\030\n\013categor" + + "y_l4\030\013 \001(\tH\010\210\001\001\022\030\n\013category_l5\030\014 \001(\tH\t\210\001" + + "\001\022\025\n\rvariant_gtins\030\r \003(\t\022u\n\020inventory_st" + + "atus\030\016 \001(\0162V.google.shopping.merchant.re" + + "ports.v1beta.BestSellersProductClusterVi" + + "ew.InventoryStatusH\n\210\001\001\022{\n\026brand_invento" + + "ry_status\030\017 \001(\0162V.google.shopping.mercha" + + "nt.reports.v1beta.BestSellersProductClus" + + "terView.InventoryStatusH\013\210\001\001\022\021\n\004rank\030\020 \001" + + "(\003H\014\210\001\001\022\032\n\rprevious_rank\030\021 \001(\003H\r\210\001\001\022h\n\017r" + + "elative_demand\030\022 \001(\0162J.google.shopping.m" + + "erchant.reports.v1beta.RelativeDemand.Re" + + "lativeDemandEnumH\016\210\001\001\022q\n\030previous_relati" + + "ve_demand\030\023 \001(\0162J.google.shopping.mercha" + + "nt.reports.v1beta.RelativeDemand.Relativ" + + "eDemandEnumH\017\210\001\001\022\203\001\n\026relative_demand_cha" + + "nge\030\024 \001(\0162^.google.shopping.merchant.rep" + + "orts.v1beta.RelativeDemandChangeType.Rel" + + "ativeDemandChangeTypeEnumH\020\210\001\001\"i\n\017Invent" + + "oryStatus\022 \n\034INVENTORY_STATUS_UNSPECIFIE" + + "D\020\000\022\014\n\010IN_STOCK\020\001\022\020\n\014OUT_OF_STOCK\020\002\022\024\n\020N" + + "OT_IN_INVENTORY\020\003B\025\n\023_report_granularity" + + "B\026\n\024_report_country_codeB\025\n\023_report_cate" + + "gory_idB\010\n\006_titleB\010\n\006_brandB\016\n\014_category" + + "_l1B\016\n\014_category_l2B\016\n\014_category_l3B\016\n\014_" + + "category_l4B\016\n\014_category_l5B\023\n\021_inventor" + + "y_statusB\031\n\027_brand_inventory_statusB\007\n\005_" + + "rankB\020\n\016_previous_rankB\022\n\020_relative_dema" + + "ndB\033\n\031_previous_relative_demandB\031\n\027_rela" + + "tive_demand_change\"\321\006\n\024BestSellersBrandV" + + "iew\022&\n\013report_date\030\001 \001(\0132\021.google.type.D" + + "ate\022q\n\022report_granularity\030\002 \001(\0162P.google" + + ".shopping.merchant.reports.v1beta.Report" + + "Granularity.ReportGranularityEnumH\000\210\001\001\022 " + + "\n\023report_country_code\030\003 \001(\tH\001\210\001\001\022\037\n\022repo" + + "rt_category_id\030\004 \001(\003H\002\210\001\001\022\022\n\005brand\030\006 \001(\t" + + "H\003\210\001\001\022\021\n\004rank\030\007 \001(\003H\004\210\001\001\022\032\n\rprevious_ran" + + "k\030\010 \001(\003H\005\210\001\001\022h\n\017relative_demand\030\t \001(\0162J." + + "google.shopping.merchant.reports.v1beta." + + "RelativeDemand.RelativeDemandEnumH\006\210\001\001\022q" + + "\n\030previous_relative_demand\030\n \001(\0162J.googl" + + "e.shopping.merchant.reports.v1beta.Relat" + + "iveDemand.RelativeDemandEnumH\007\210\001\001\022\203\001\n\026re" + + "lative_demand_change\030\013 \001(\0162^.google.shop" + "ping.merchant.reports.v1beta.RelativeDem" - + "andH\017\210\001\001\022^\n\030previous_relative_demand\030\023 \001" - + "(\01627.google.shopping.merchant.reports.v1" - + "beta.RelativeDemandH\020\210\001\001\022f\n\026relative_dem" - + "and_change\030\024 \001(\0162A.google.shopping.merch" - + "ant.reports.v1beta.RelativeDemandChangeT" - + "ypeH\021\210\001\001\"i\n\017InventoryStatus\022 \n\034INVENTORY" - + "_STATUS_UNSPECIFIED\020\000\022\014\n\010IN_STOCK\020\001\022\020\n\014O" - + "UT_OF_STOCK\020\002\022\024\n\020NOT_IN_INVENTORY\020\003B\025\n\023_" - + "report_granularityB\026\n\024_report_country_co" - + "deB\025\n\023_report_category_idB\005\n\003_idB\010\n\006_tit" - + "leB\010\n\006_brandB\016\n\014_category_l1B\016\n\014_categor" - + "y_l2B\016\n\014_category_l3B\016\n\014_category_l4B\016\n\014" - + "_category_l5B\023\n\021_inventory_statusB\031\n\027_br" - + "and_inventory_statusB\007\n\005_rankB\020\n\016_previo" - + "us_rankB\022\n\020_relative_demandB\033\n\031_previous" - + "_relative_demandB\031\n\027_relative_demand_cha" - + "nge\"\217\006\n\024BestSellersBrandView\022&\n\013report_d" - + "ate\030\001 \001(\0132\021.google.type.Date\022[\n\022report_g" - + "ranularity\030\002 \001(\0162:.google.shopping.merch" - + "ant.reports.v1beta.ReportGranularityH\000\210\001" - + "\001\022 \n\023report_country_code\030\003 \001(\tH\001\210\001\001\022\037\n\022r" - + "eport_category_id\030\004 \001(\003H\002\210\001\001\022\017\n\002id\030\005 \001(\t" - + "H\003\210\001\001\022\022\n\005brand\030\006 \001(\tH\004\210\001\001\022\021\n\004rank\030\007 \001(\003H" - + "\005\210\001\001\022\032\n\rprevious_rank\030\010 \001(\003H\006\210\001\001\022U\n\017rela" - + "tive_demand\030\t \001(\01627.google.shopping.merc" - + "hant.reports.v1beta.RelativeDemandH\007\210\001\001\022" - + "^\n\030previous_relative_demand\030\n \001(\01627.goog" - + "le.shopping.merchant.reports.v1beta.Rela" - + "tiveDemandH\010\210\001\001\022f\n\026relative_demand_chang" - + "e\030\013 \001(\0162A.google.shopping.merchant.repor" - + "ts.v1beta.RelativeDemandChangeTypeH\t\210\001\001B" - + "\025\n\023_report_granularityB\026\n\024_report_countr" - + "y_codeB\025\n\023_report_category_idB\005\n\003_idB\010\n\006" - + "_brandB\007\n\005_rankB\020\n\016_previous_rankB\022\n\020_re" - + "lative_demandB\033\n\031_previous_relative_dema" - + "ndB\031\n\027_relative_demand_change\"\337\001\n\031NonPro" - + "ductPerformanceView\022\037\n\004date\030\001 \001(\0132\021.goog" - + "le.type.Date\022\037\n\004week\030\002 \001(\0132\021.google.type" - + ".Date\022\023\n\006clicks\030\003 \001(\003H\000\210\001\001\022\030\n\013impression" - + "s\030\004 \001(\003H\001\210\001\001\022\037\n\022click_through_rate\030\005 \001(\001" - + "H\002\210\001\001B\t\n\007_clicksB\016\n\014_impressionsB\025\n\023_cli" - + "ck_through_rate\"\356\004\n#CompetitiveVisibilit" - + "yCompetitorView\022\037\n\004date\030\001 \001(\0132\021.google.t" - + "ype.Date\022\023\n\006domain\030\002 \001(\tH\000\210\001\001\022\033\n\016is_your" - + "_domain\030\003 \001(\010H\001\210\001\001\022 \n\023report_country_cod" - + "e\030\004 \001(\tH\002\210\001\001\022\037\n\022report_category_id\030\005 \001(\003" - + "H\003\210\001\001\022S\n\016traffic_source\030\006 \001(\01626.google.s" - + "hopping.merchant.reports.v1beta.TrafficS" - + "ourceH\004\210\001\001\022\021\n\004rank\030\007 \001(\003H\005\210\001\001\022\036\n\021ads_org" - + "anic_ratio\030\010 \001(\001H\006\210\001\001\022\036\n\021page_overlap_ra" - + "te\030\t \001(\001H\007\210\001\001\022!\n\024higher_position_rate\030\n " - + "\001(\001H\010\210\001\001\022 \n\023relative_visibility\030\013 \001(\001H\t\210" - + "\001\001B\t\n\007_domainB\021\n\017_is_your_domainB\026\n\024_rep" - + "ort_country_codeB\025\n\023_report_category_idB" - + "\021\n\017_traffic_sourceB\007\n\005_rankB\024\n\022_ads_orga" - + "nic_ratioB\024\n\022_page_overlap_rateB\027\n\025_high" - + "er_position_rateB\026\n\024_relative_visibility" - + "\"\265\004\n$CompetitiveVisibilityTopMerchantVie" - + "w\022\037\n\004date\030\001 \001(\0132\021.google.type.Date\022\023\n\006do" - + "main\030\002 \001(\tH\000\210\001\001\022\033\n\016is_your_domain\030\003 \001(\010H" - + "\001\210\001\001\022 \n\023report_country_code\030\004 \001(\tH\002\210\001\001\022\037" - + "\n\022report_category_id\030\005 \001(\003H\003\210\001\001\022S\n\016traff" - + "ic_source\030\006 \001(\01626.google.shopping.mercha" - + "nt.reports.v1beta.TrafficSourceH\004\210\001\001\022\021\n\004" - + "rank\030\007 \001(\003H\005\210\001\001\022\036\n\021ads_organic_ratio\030\010 \001" - + "(\001H\006\210\001\001\022\036\n\021page_overlap_rate\030\t \001(\001H\007\210\001\001\022" - + "!\n\024higher_position_rate\030\n \001(\001H\010\210\001\001B\t\n\007_d" - + "omainB\021\n\017_is_your_domainB\026\n\024_report_coun" - + "try_codeB\025\n\023_report_category_idB\021\n\017_traf" - + "fic_sourceB\007\n\005_rankB\024\n\022_ads_organic_rati" - + "oB\024\n\022_page_overlap_rateB\027\n\025_higher_posit" - + "ion_rate\"\305\003\n\"CompetitiveVisibilityBenchm" - + "arkView\022\037\n\004date\030\001 \001(\0132\021.google.type.Date" - + "\022 \n\023report_country_code\030\002 \001(\tH\000\210\001\001\022\037\n\022re" - + "port_category_id\030\003 \001(\003H\001\210\001\001\022S\n\016traffic_s" - + "ource\030\004 \001(\01626.google.shopping.merchant.r" - + "eports.v1beta.TrafficSourceH\002\210\001\001\022)\n\034your" - + "_domain_visibility_trend\030\005 \001(\001H\003\210\001\001\0220\n#c" - + "ategory_benchmark_visibility_trend\030\006 \001(\001" - + "H\004\210\001\001B\026\n\024_report_country_codeB\025\n\023_report" - + "_category_idB\021\n\017_traffic_sourceB\037\n\035_your" - + "_domain_visibility_trendB&\n$_category_be" - + "nchmark_visibility_trend*P\n\021ReportGranul" - + "arity\022\"\n\036REPORT_GRANULARITY_UNSPECIFIED\020" - + "\000\022\n\n\006WEEKLY\020\001\022\013\n\007MONTHLY\020\002*m\n\016RelativeDe" - + "mand\022\037\n\033RELATIVE_DEMAND_UNSPECIFIED\020\000\022\014\n" - + "\010VERY_LOW\020\n\022\007\n\003LOW\020\024\022\n\n\006MEDIUM\020\036\022\010\n\004HIGH" - + "\020(\022\r\n\tVERY_HIGH\0202*h\n\030RelativeDemandChang" - + "eType\022+\n\'RELATIVE_DEMAND_CHANGE_TYPE_UNS" - + "PECIFIED\020\000\022\n\n\006SINKER\020\001\022\010\n\004FLAT\020\002\022\t\n\005RISE" - + "R\020\003*N\n\rTrafficSource\022\036\n\032TRAFFIC_SOURCE_U" - + "NSPECIFIED\020\000\022\013\n\007ORGANIC\020\001\022\007\n\003ADS\020\002\022\007\n\003AL" - + "L\020\0032\234\002\n\rReportService\022\301\001\n\006Search\0226.googl" - + "e.shopping.merchant.reports.v1beta.Searc" - + "hRequest\0327.google.shopping.merchant.repo" - + "rts.v1beta.SearchResponse\"F\332A\006parent\202\323\344\223" - + "\0027\"2/reports/v1beta/{parent=accounts/*}/" - + "reports:search:\001*\032G\312A\032merchantapi.google" - + "apis.com\322A\'https://www.googleapis.com/au" - + "th/contentB\215\001\n+com.google.shopping.merch" - + "ant.reports.v1betaB\014ReportsProtoP\001ZNgoog" - + "le.golang.org/genproto/googleapis/shoppi" - + "ng/merchant/reports/v1beta;reportsb\006prot" - + "o3" + + "andChangeType.RelativeDemandChangeTypeEn" + + "umH\010\210\001\001B\025\n\023_report_granularityB\026\n\024_repor" + + "t_country_codeB\025\n\023_report_category_idB\010\n" + + "\006_brandB\007\n\005_rankB\020\n\016_previous_rankB\022\n\020_r" + + "elative_demandB\033\n\031_previous_relative_dem" + + "andB\031\n\027_relative_demand_change\"\200\005\n#Compe" + + "titiveVisibilityCompetitorView\022\037\n\004date\030\001" + + " \001(\0132\021.google.type.Date\022\023\n\006domain\030\002 \001(\tH" + + "\000\210\001\001\022\033\n\016is_your_domain\030\003 \001(\010H\001\210\001\001\022 \n\023rep" + + "ort_country_code\030\004 \001(\tH\002\210\001\001\022\037\n\022report_ca" + + "tegory_id\030\005 \001(\003H\003\210\001\001\022e\n\016traffic_source\030\006" + + " \001(\0162H.google.shopping.merchant.reports." + + "v1beta.TrafficSource.TrafficSourceEnumH\004" + + "\210\001\001\022\021\n\004rank\030\007 \001(\003H\005\210\001\001\022\036\n\021ads_organic_ra" + + "tio\030\010 \001(\001H\006\210\001\001\022\036\n\021page_overlap_rate\030\t \001(" + + "\001H\007\210\001\001\022!\n\024higher_position_rate\030\n \001(\001H\010\210\001" + + "\001\022 \n\023relative_visibility\030\013 \001(\001H\t\210\001\001B\t\n\007_" + + "domainB\021\n\017_is_your_domainB\026\n\024_report_cou" + + "ntry_codeB\025\n\023_report_category_idB\021\n\017_tra" + + "ffic_sourceB\007\n\005_rankB\024\n\022_ads_organic_rat" + + "ioB\024\n\022_page_overlap_rateB\027\n\025_higher_posi" + + "tion_rateB\026\n\024_relative_visibility\"\307\004\n$Co" + + "mpetitiveVisibilityTopMerchantView\022\037\n\004da" + + "te\030\001 \001(\0132\021.google.type.Date\022\023\n\006domain\030\002 " + + "\001(\tH\000\210\001\001\022\033\n\016is_your_domain\030\003 \001(\010H\001\210\001\001\022 \n" + + "\023report_country_code\030\004 \001(\tH\002\210\001\001\022\037\n\022repor" + + "t_category_id\030\005 \001(\003H\003\210\001\001\022e\n\016traffic_sour" + + "ce\030\006 \001(\0162H.google.shopping.merchant.repo" + + "rts.v1beta.TrafficSource.TrafficSourceEn" + + "umH\004\210\001\001\022\021\n\004rank\030\007 \001(\003H\005\210\001\001\022\036\n\021ads_organi" + + "c_ratio\030\010 \001(\001H\006\210\001\001\022\036\n\021page_overlap_rate\030" + + "\t \001(\001H\007\210\001\001\022!\n\024higher_position_rate\030\n \001(\001" + + "H\010\210\001\001B\t\n\007_domainB\021\n\017_is_your_domainB\026\n\024_" + + "report_country_codeB\025\n\023_report_category_" + + "idB\021\n\017_traffic_sourceB\007\n\005_rankB\024\n\022_ads_o" + + "rganic_ratioB\024\n\022_page_overlap_rateB\027\n\025_h" + + "igher_position_rate\"\327\003\n\"CompetitiveVisib" + + "ilityBenchmarkView\022\037\n\004date\030\001 \001(\0132\021.googl" + + "e.type.Date\022 \n\023report_country_code\030\002 \001(\t" + + "H\000\210\001\001\022\037\n\022report_category_id\030\003 \001(\003H\001\210\001\001\022e" + + "\n\016traffic_source\030\004 \001(\0162H.google.shopping" + + ".merchant.reports.v1beta.TrafficSource.T" + + "rafficSourceEnumH\002\210\001\001\022)\n\034your_domain_vis" + + "ibility_trend\030\005 \001(\001H\003\210\001\001\0220\n#category_ben" + + "chmark_visibility_trend\030\006 \001(\001H\004\210\001\001B\026\n\024_r" + + "eport_country_codeB\025\n\023_report_category_i" + + "dB\021\n\017_traffic_sourceB\037\n\035_your_domain_vis" + + "ibility_trendB&\n$_category_benchmark_vis" + + "ibility_trend\"e\n\017MarketingMethod\"R\n\023Mark" + + "etingMethodEnum\022%\n!MARKETING_METHOD_ENUM" + + "_UNSPECIFIED\020\000\022\013\n\007ORGANIC\020\001\022\007\n\003ADS\020\002\"n\n\021" + + "ReportGranularity\"Y\n\025ReportGranularityEn" + + "um\022\'\n#REPORT_GRANULARITY_ENUM_UNSPECIFIE" + + "D\020\000\022\n\n\006WEEKLY\020\001\022\013\n\007MONTHLY\020\002\"\210\001\n\016Relativ" + + "eDemand\"v\n\022RelativeDemandEnum\022$\n RELATIV" + + "E_DEMAND_ENUM_UNSPECIFIED\020\000\022\014\n\010VERY_LOW\020" + + "\n\022\007\n\003LOW\020\024\022\n\n\006MEDIUM\020\036\022\010\n\004HIGH\020(\022\r\n\tVERY" + + "_HIGH\0202\"\215\001\n\030RelativeDemandChangeType\"q\n\034" + + "RelativeDemandChangeTypeEnum\0220\n,RELATIVE" + + "_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED\020\000\022\n" + + "\n\006SINKER\020\001\022\010\n\004FLAT\020\002\022\t\n\005RISER\020\003\"h\n\rTraff" + + "icSource\"W\n\021TrafficSourceEnum\022#\n\037TRAFFIC" + + "_SOURCE_ENUM_UNSPECIFIED\020\000\022\013\n\007ORGANIC\020\001\022" + + "\007\n\003ADS\020\002\022\007\n\003ALL\020\0032\234\002\n\rReportService\022\301\001\n\006" + + "Search\0226.google.shopping.merchant.report" + + "s.v1beta.SearchRequest\0327.google.shopping" + + ".merchant.reports.v1beta.SearchResponse\"" + + "F\332A\006parent\202\323\344\223\0027\"2/reports/v1beta/{paren" + + "t=accounts/*}/reports:search:\001*\032G\312A\032merc" + + "hantapi.googleapis.com\322A\'https://www.goo" + + "gleapis.com/auth/contentB\212\001\n+com.google." + + "shopping.merchant.reports.v1betaB\014Report" + + "sProtoP\001ZKcloud.google.com/go/shopping/m" + + "erchant/reports/apiv1beta/reportspb;repo" + + "rtspbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -453,7 +468,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_shopping_merchant_reports_v1beta_ReportRow_descriptor, new java.lang.String[] { "ProductPerformanceView", - "NonProductPerformanceView", "ProductView", "PriceCompetitivenessProductView", "PriceInsightsProductView", @@ -469,13 +483,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_merchant_reports_v1beta_ProductPerformanceView_descriptor, new java.lang.String[] { - "Destination", + "MarketingMethod", "Date", "Week", "CustomerCountryCode", - "AccountId", - "AccountDisplayName", - "ExternalAccountId", "OfferId", "Title", "Brand", @@ -500,11 +511,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Conversions", "ConversionValue", "ConversionRate", - "Destination", + "MarketingMethod", "CustomerCountryCode", - "AccountId", - "AccountDisplayName", - "ExternalAccountId", "OfferId", "Title", "Brand", @@ -536,6 +544,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_shopping_merchant_reports_v1beta_ProductView_descriptor, new java.lang.String[] { "Id", + "Channel", "LanguageCode", "FeedLabel", "OfferId", @@ -560,9 +569,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ThumbnailLink", "CreationTime", "ExpirationDate", - "AggregatedDestinationStatus", + "AggregatedReportingContextStatus", "ItemIssues", "Id", + "Channel", "LanguageCode", "FeedLabel", "OfferId", @@ -583,7 +593,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ShippingLabel", "ItemGroupId", "ThumbnailLink", - "AggregatedDestinationStatus", + "AggregatedReportingContextStatus", }); internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_descriptor = internal_static_google_shopping_merchant_reports_v1beta_ProductView_descriptor @@ -613,17 +623,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_descriptor, new java.lang.String[] { - "SeverityPerDestination", "AggregatedSeverity", "AggregatedSeverity", + "SeverityPerReportingContext", "AggregatedSeverity", "AggregatedSeverity", }); - internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_descriptor = + internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_descriptor = internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_descriptor .getNestedTypes() .get(0); - internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_fieldAccessorTable = + internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerDestination_descriptor, + internal_static_google_shopping_merchant_reports_v1beta_ProductView_ItemIssue_ItemIssueSeverity_IssueSeverityPerReportingContext_descriptor, new java.lang.String[] { - "Destination", "DisapprovedCountries", "DemotedCountries", "Destination", + "ReportingContext", "DisapprovedCountries", "DemotedCountries", "ReportingContext", }); internal_static_google_shopping_merchant_reports_v1beta_PriceCompetitivenessProductView_descriptor = getDescriptor().getMessageTypes().get(5); @@ -689,8 +699,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PredictedImpressionsChangeFraction", "PredictedClicksChangeFraction", "PredictedConversionsChangeFraction", - "PredictedGrossProfitChangeFraction", - "PredictedMonthlyGrossProfitChange", "Id", "OfferId", "Title", @@ -708,7 +716,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PredictedImpressionsChangeFraction", "PredictedClicksChangeFraction", "PredictedConversionsChangeFraction", - "PredictedGrossProfitChangeFraction", }); internal_static_google_shopping_merchant_reports_v1beta_BestSellersProductClusterView_descriptor = getDescriptor().getMessageTypes().get(7); @@ -720,7 +727,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReportGranularity", "ReportCountryCode", "ReportCategoryId", - "Id", "Title", "Brand", "CategoryL1", @@ -739,7 +745,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReportGranularity", "ReportCountryCode", "ReportCategoryId", - "Id", "Title", "Brand", "CategoryL1", @@ -765,7 +770,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReportGranularity", "ReportCountryCode", "ReportCategoryId", - "Id", "Brand", "Rank", "PreviousRank", @@ -775,7 +779,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReportGranularity", "ReportCountryCode", "ReportCategoryId", - "Id", "Brand", "Rank", "PreviousRank", @@ -783,23 +786,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PreviousRelativeDemand", "RelativeDemandChange", }); - internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_shopping_merchant_reports_v1beta_NonProductPerformanceView_descriptor, - new java.lang.String[] { - "Date", - "Week", - "Clicks", - "Impressions", - "ClickThroughRate", - "Clicks", - "Impressions", - "ClickThroughRate", - }); internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityCompetitorView_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(9); internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityCompetitorView_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityCompetitorView_descriptor, @@ -827,7 +815,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RelativeVisibility", }); internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityTopMerchantView_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(10); internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityTopMerchantView_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityTopMerchantView_descriptor, @@ -853,7 +841,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "HigherPositionRate", }); internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityBenchmarkView_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(11); internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityBenchmarkView_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_shopping_merchant_reports_v1beta_CompetitiveVisibilityBenchmarkView_descriptor, @@ -870,6 +858,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "YourDomainVisibilityTrend", "CategoryBenchmarkVisibilityTrend", }); + internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_merchant_reports_v1beta_MarketingMethod_descriptor, + new java.lang.String[] {}); + internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_merchant_reports_v1beta_ReportGranularity_descriptor, + new java.lang.String[] {}); + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemand_descriptor, + new java.lang.String[] {}); + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_merchant_reports_v1beta_RelativeDemandChangeType_descriptor, + new java.lang.String[] {}); + internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequest.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequest.java index 42eea9bd17d3..770dc16dd056 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequest.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequest.java @@ -182,11 +182,11 @@ public com.google.protobuf.ByteString getQueryBytes() { * * *
-   * Number of `ReportRows` to retrieve in a single page. Defaults to the
-   * maximum of 1000. Values above 1000 are coerced to 1000.
+   * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
+   * the maximum of 1000. Values above 1000 are coerced to 1000.
    * 
* - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -203,12 +203,13 @@ public int getPageSize() { * * *
-   * Token of the page to retrieve. If not specified, the first page of results
-   * is returned. In order to request the next page of results, the value
-   * obtained from `next_page_token` in the previous response should be used.
+   * Optional. Token of the page to retrieve. If not specified, the first page
+   * of results is returned. In order to request the next page of results, the
+   * value obtained from `next_page_token` in the previous response should be
+   * used.
    * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -228,12 +229,13 @@ public java.lang.String getPageToken() { * * *
-   * Token of the page to retrieve. If not specified, the first page of results
-   * is returned. In order to request the next page of results, the value
-   * obtained from `next_page_token` in the previous response should be used.
+   * Optional. Token of the page to retrieve. If not specified, the first page
+   * of results is returned. In order to request the next page of results, the
+   * value obtained from `next_page_token` in the previous response should be
+   * used.
    * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -905,11 +907,11 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) { * * *
-     * Number of `ReportRows` to retrieve in a single page. Defaults to the
-     * maximum of 1000. Values above 1000 are coerced to 1000.
+     * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
+     * the maximum of 1000. Values above 1000 are coerced to 1000.
      * 
* - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -921,11 +923,11 @@ public int getPageSize() { * * *
-     * Number of `ReportRows` to retrieve in a single page. Defaults to the
-     * maximum of 1000. Values above 1000 are coerced to 1000.
+     * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
+     * the maximum of 1000. Values above 1000 are coerced to 1000.
      * 
* - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -941,11 +943,11 @@ public Builder setPageSize(int value) { * * *
-     * Number of `ReportRows` to retrieve in a single page. Defaults to the
-     * maximum of 1000. Values above 1000 are coerced to 1000.
+     * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
+     * the maximum of 1000. Values above 1000 are coerced to 1000.
      * 
* - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -961,12 +963,13 @@ public Builder clearPageSize() { * * *
-     * Token of the page to retrieve. If not specified, the first page of results
-     * is returned. In order to request the next page of results, the value
-     * obtained from `next_page_token` in the previous response should be used.
+     * Optional. Token of the page to retrieve. If not specified, the first page
+     * of results is returned. In order to request the next page of results, the
+     * value obtained from `next_page_token` in the previous response should be
+     * used.
      * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -985,12 +988,13 @@ public java.lang.String getPageToken() { * * *
-     * Token of the page to retrieve. If not specified, the first page of results
-     * is returned. In order to request the next page of results, the value
-     * obtained from `next_page_token` in the previous response should be used.
+     * Optional. Token of the page to retrieve. If not specified, the first page
+     * of results is returned. In order to request the next page of results, the
+     * value obtained from `next_page_token` in the previous response should be
+     * used.
      * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -1009,12 +1013,13 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * Token of the page to retrieve. If not specified, the first page of results
-     * is returned. In order to request the next page of results, the value
-     * obtained from `next_page_token` in the previous response should be used.
+     * Optional. Token of the page to retrieve. If not specified, the first page
+     * of results is returned. In order to request the next page of results, the
+     * value obtained from `next_page_token` in the previous response should be
+     * used.
      * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -1032,12 +1037,13 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * Token of the page to retrieve. If not specified, the first page of results
-     * is returned. In order to request the next page of results, the value
-     * obtained from `next_page_token` in the previous response should be used.
+     * Optional. Token of the page to retrieve. If not specified, the first page
+     * of results is returned. In order to request the next page of results, the
+     * value obtained from `next_page_token` in the previous response should be
+     * used.
      * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1051,12 +1057,13 @@ public Builder clearPageToken() { * * *
-     * Token of the page to retrieve. If not specified, the first page of results
-     * is returned. In order to request the next page of results, the value
-     * obtained from `next_page_token` in the previous response should be used.
+     * Optional. Token of the page to retrieve. If not specified, the first page
+     * of results is returned. In order to request the next page of results, the
+     * value obtained from `next_page_token` in the previous response should be
+     * used.
      * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequestOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequestOrBuilder.java index 008057e089ec..3ea862f724a1 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequestOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/SearchRequestOrBuilder.java @@ -87,11 +87,11 @@ public interface SearchRequestOrBuilder * * *
-   * Number of `ReportRows` to retrieve in a single page. Defaults to the
-   * maximum of 1000. Values above 1000 are coerced to 1000.
+   * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
+   * the maximum of 1000. Values above 1000 are coerced to 1000.
    * 
* - * int32 page_size = 3; + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -101,12 +101,13 @@ public interface SearchRequestOrBuilder * * *
-   * Token of the page to retrieve. If not specified, the first page of results
-   * is returned. In order to request the next page of results, the value
-   * obtained from `next_page_token` in the previous response should be used.
+   * Optional. Token of the page to retrieve. If not specified, the first page
+   * of results is returned. In order to request the next page of results, the
+   * value obtained from `next_page_token` in the previous response should be
+   * used.
    * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -115,12 +116,13 @@ public interface SearchRequestOrBuilder * * *
-   * Token of the page to retrieve. If not specified, the first page of results
-   * is returned. In order to request the next page of results, the value
-   * obtained from `next_page_token` in the previous response should be used.
+   * Optional. Token of the page to retrieve. If not specified, the first page
+   * of results is returned. In order to request the next page of results, the
+   * value obtained from `next_page_token` in the previous response should be
+   * used.
    * 
* - * string page_token = 4; + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/TrafficSource.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/TrafficSource.java index bb6707018105..f516aca52d52 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/TrafficSource.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/TrafficSource.java @@ -25,176 +25,592 @@ * Traffic source of impressions in the Competitive visibility report. * * - * Protobuf enum {@code google.shopping.merchant.reports.v1beta.TrafficSource} + * Protobuf type {@code google.shopping.merchant.reports.v1beta.TrafficSource} */ -public enum TrafficSource implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified.
-   * 
- * - * TRAFFIC_SOURCE_UNSPECIFIED = 0; - */ - TRAFFIC_SOURCE_UNSPECIFIED(0), - /** - * - * - *
-   * Organic traffic.
-   * 
- * - * ORGANIC = 1; - */ - ORGANIC(1), - /** - * - * - *
-   * Traffic from ads.
-   * 
- * - * ADS = 2; - */ - ADS(2), - /** - * - * - *
-   * Organic and ads traffic.
-   * 
- * - * ALL = 3; - */ - ALL(3), - UNRECOGNIZED(-1), - ; +public final class TrafficSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reports.v1beta.TrafficSource) + TrafficSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrafficSource.newBuilder() to construct. + private TrafficSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrafficSource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrafficSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.TrafficSource.class, + com.google.shopping.merchant.reports.v1beta.TrafficSource.Builder.class); + } /** * * *
-   * Not specified.
-   * 
- * - * TRAFFIC_SOURCE_UNSPECIFIED = 0; - */ - public static final int TRAFFIC_SOURCE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Organic traffic.
-   * 
- * - * ORGANIC = 1; - */ - public static final int ORGANIC_VALUE = 1; - /** - * - * - *
-   * Traffic from ads.
+   * Traffic source values.
    * 
* - * ADS = 2; + * Protobuf enum {@code google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum} */ - public static final int ADS_VALUE = 2; + public enum TrafficSourceEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0; + */ + TRAFFIC_SOURCE_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * Organic traffic.
+     * 
+ * + * ORGANIC = 1; + */ + ORGANIC(1), + /** + * + * + *
+     * Traffic from ads.
+     * 
+ * + * ADS = 2; + */ + ADS(2), + /** + * + * + *
+     * Organic and ads traffic.
+     * 
+ * + * ALL = 3; + */ + ALL(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0; + */ + public static final int TRAFFIC_SOURCE_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Organic traffic.
+     * 
+ * + * ORGANIC = 1; + */ + public static final int ORGANIC_VALUE = 1; + /** + * + * + *
+     * Traffic from ads.
+     * 
+ * + * ADS = 2; + */ + public static final int ADS_VALUE = 2; + /** + * + * + *
+     * Organic and ads traffic.
+     * 
+ * + * ALL = 3; + */ + public static final int ALL_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TrafficSourceEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TrafficSourceEnum forNumber(int value) { + switch (value) { + case 0: + return TRAFFIC_SOURCE_ENUM_UNSPECIFIED; + case 1: + return ORGANIC; + case 2: + return ADS; + case 3: + return ALL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TrafficSourceEnum findValueByNumber(int number) { + return TrafficSourceEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.TrafficSource.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final TrafficSourceEnum[] VALUES = values(); + + public static TrafficSourceEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TrafficSourceEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reports.v1beta.TrafficSource)) { + return super.equals(obj); + } + com.google.shopping.merchant.reports.v1beta.TrafficSource other = + (com.google.shopping.merchant.reports.v1beta.TrafficSource) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reports.v1beta.TrafficSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reports.v1beta.TrafficSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-   * Organic and ads traffic.
+   * Traffic source of impressions in the Competitive visibility report.
    * 
* - * ALL = 3; + * Protobuf type {@code google.shopping.merchant.reports.v1beta.TrafficSource} */ - public static final int ALL_VALUE = 3; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reports.v1beta.TrafficSource) + com.google.shopping.merchant.reports.v1beta.TrafficSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_descriptor; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reports.v1beta.TrafficSource.class, + com.google.shopping.merchant.reports.v1beta.TrafficSource.Builder.class); } - return value; - } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TrafficSource valueOf(int value) { - return forNumber(value); - } + // Construct using com.google.shopping.merchant.reports.v1beta.TrafficSource.newBuilder() + private Builder() {} - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TrafficSource forNumber(int value) { - switch (value) { - case 0: - return TRAFFIC_SOURCE_UNSPECIFIED; - case 1: - return ORGANIC; - case 2: - return ADS; - case 3: - return ALL; - default: - return null; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TrafficSource findValueByNumber(int number) { - return TrafficSource.forNumber(number); - } - }; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto + .internal_static_google_shopping_merchant_reports_v1beta_TrafficSource_descriptor; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.TrafficSource getDefaultInstanceForType() { + return com.google.shopping.merchant.reports.v1beta.TrafficSource.getDefaultInstance(); } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.TrafficSource build() { + com.google.shopping.merchant.reports.v1beta.TrafficSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.shopping.merchant.reports.v1beta.ReportsProto.getDescriptor() - .getEnumTypes() - .get(3); - } + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.TrafficSource buildPartial() { + com.google.shopping.merchant.reports.v1beta.TrafficSource result = + new com.google.shopping.merchant.reports.v1beta.TrafficSource(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private static final TrafficSource[] VALUES = values(); + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static TrafficSource valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reports.v1beta.TrafficSource) { + return mergeFrom((com.google.shopping.merchant.reports.v1beta.TrafficSource) other); + } else { + super.mergeFrom(other); + return this; + } } - return VALUES[desc.getIndex()]; + + public Builder mergeFrom(com.google.shopping.merchant.reports.v1beta.TrafficSource other) { + if (other == com.google.shopping.merchant.reports.v1beta.TrafficSource.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reports.v1beta.TrafficSource) } - private final int value; + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reports.v1beta.TrafficSource) + private static final com.google.shopping.merchant.reports.v1beta.TrafficSource DEFAULT_INSTANCE; - private TrafficSource(int value) { - this.value = value; + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reports.v1beta.TrafficSource(); } - // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reports.v1beta.TrafficSource) + public static com.google.shopping.merchant.reports.v1beta.TrafficSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrafficSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reports.v1beta.TrafficSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/TrafficSourceOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/TrafficSourceOrBuilder.java new file mode 100644 index 000000000000..0e19384d6a47 --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/TrafficSourceOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/merchant/reports/v1beta/reports.proto + +package com.google.shopping.merchant.reports.v1beta; + +public interface TrafficSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.TrafficSource) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Channel.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Channel.java new file mode 100644 index 000000000000..5ee421705cc4 --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Channel.java @@ -0,0 +1,587 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +/** + * + * + *
+ * [Channel](https://support.google.com/merchants/answer/7361332) of a product.
+ *
+ * Channel is used to distinguish between online and local products.
+ * 
+ * + * Protobuf type {@code google.shopping.type.Channel} + */ +public final class Channel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.type.Channel) + ChannelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Channel.newBuilder() to construct. + private Channel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Channel() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Channel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Channel.class, com.google.shopping.type.Channel.Builder.class); + } + + /** + * + * + *
+   * Channel values.
+   * 
+ * + * Protobuf enum {@code google.shopping.type.Channel.ChannelEnum} + */ + public enum ChannelEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * CHANNEL_ENUM_UNSPECIFIED = 0; + */ + CHANNEL_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * Online product.
+     * 
+ * + * ONLINE = 1; + */ + ONLINE(1), + /** + * + * + *
+     * Local product.
+     * 
+ * + * LOCAL = 2; + */ + LOCAL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * CHANNEL_ENUM_UNSPECIFIED = 0; + */ + public static final int CHANNEL_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Online product.
+     * 
+ * + * ONLINE = 1; + */ + public static final int ONLINE_VALUE = 1; + /** + * + * + *
+     * Local product.
+     * 
+ * + * LOCAL = 2; + */ + public static final int LOCAL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ChannelEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ChannelEnum forNumber(int value) { + switch (value) { + case 0: + return CHANNEL_ENUM_UNSPECIFIED; + case 1: + return ONLINE; + case 2: + return LOCAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ChannelEnum findValueByNumber(int number) { + return ChannelEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.type.Channel.getDescriptor().getEnumTypes().get(0); + } + + private static final ChannelEnum[] VALUES = values(); + + public static ChannelEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ChannelEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.type.Channel.ChannelEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.type.Channel)) { + return super.equals(obj); + } + com.google.shopping.type.Channel other = (com.google.shopping.type.Channel) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.type.Channel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Channel parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Channel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Channel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Channel parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Channel parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Channel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Channel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.shopping.type.Channel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * [Channel](https://support.google.com/merchants/answer/7361332) of a product.
+   *
+   * Channel is used to distinguish between online and local products.
+   * 
+ * + * Protobuf type {@code google.shopping.type.Channel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.type.Channel) + com.google.shopping.type.ChannelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Channel.class, + com.google.shopping.type.Channel.Builder.class); + } + + // Construct using com.google.shopping.type.Channel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Channel_descriptor; + } + + @java.lang.Override + public com.google.shopping.type.Channel getDefaultInstanceForType() { + return com.google.shopping.type.Channel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.type.Channel build() { + com.google.shopping.type.Channel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.type.Channel buildPartial() { + com.google.shopping.type.Channel result = new com.google.shopping.type.Channel(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.type.Channel) { + return mergeFrom((com.google.shopping.type.Channel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.type.Channel other) { + if (other == com.google.shopping.type.Channel.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.type.Channel) + } + + // @@protoc_insertion_point(class_scope:google.shopping.type.Channel) + private static final com.google.shopping.type.Channel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.type.Channel(); + } + + public static com.google.shopping.type.Channel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Channel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.type.Channel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java new file mode 100644 index 000000000000..06aee0067e60 --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ChannelOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +public interface ChannelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.type.Channel) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Destination.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Destination.java index 555c9b9c713f..ba5b3940a70a 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Destination.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Destination.java @@ -28,196 +28,657 @@ * products from your data feed should be displayed. * * - * Protobuf enum {@code google.shopping.type.Destination} + * Protobuf type {@code google.shopping.type.Destination} */ -public enum Destination implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified.
-   * 
- * - * DESTINATION_UNSPECIFIED = 0; - */ - DESTINATION_UNSPECIFIED(0), - /** - * - * - *
-   * Shopping ads.
-   * 
- * - * SHOPPING_ADS = 1; - */ - SHOPPING_ADS(1), - /** - * - * - *
-   * Local inventory ads.
-   * 
- * - * LOCAL_INVENTORY_ADS = 2; - */ - LOCAL_INVENTORY_ADS(2), - /** - * - * - *
-   * Free listings.
-   * 
- * - * FREE_LISTINGS = 3; - */ - FREE_LISTINGS(3), - /** - * - * - *
-   * Free local product listings.
-   * 
- * - * FREE_LOCAL_LISTINGS = 4; - */ - FREE_LOCAL_LISTINGS(4), - UNRECOGNIZED(-1), - ; +public final class Destination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.type.Destination) + DestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Destination.newBuilder() to construct. + private Destination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Destination() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Destination(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Destination.class, + com.google.shopping.type.Destination.Builder.class); + } /** * * *
-   * Not specified.
-   * 
- * - * DESTINATION_UNSPECIFIED = 0; - */ - public static final int DESTINATION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Shopping ads.
-   * 
- * - * SHOPPING_ADS = 1; - */ - public static final int SHOPPING_ADS_VALUE = 1; - /** - * - * - *
-   * Local inventory ads.
+   * Destination values.
    * 
* - * LOCAL_INVENTORY_ADS = 2; + * Protobuf enum {@code google.shopping.type.Destination.DestinationEnum} */ - public static final int LOCAL_INVENTORY_ADS_VALUE = 2; + public enum DestinationEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * DESTINATION_ENUM_UNSPECIFIED = 0; + */ + DESTINATION_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * [Shopping ads](https://support.google.com/google-ads/answer/2454022).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + SHOPPING_ADS(1), + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 2; + */ + DISPLAY_ADS(2), + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3057972).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 3; + */ + LOCAL_INVENTORY_ADS(3), + /** + * + * + *
+     * [Free listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 4; + */ + FREE_LISTINGS(4), + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 5; + */ + FREE_LOCAL_LISTINGS(5), + /** + * + * + *
+     * [YouTube Shopping](https://support.google.com/merchants/answer/12362804).
+     * 
+ * + * YOUTUBE_SHOPPING = 6; + */ + YOUTUBE_SHOPPING(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * DESTINATION_ENUM_UNSPECIFIED = 0; + */ + public static final int DESTINATION_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * [Shopping ads](https://support.google.com/google-ads/answer/2454022).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + public static final int SHOPPING_ADS_VALUE = 1; + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 2; + */ + public static final int DISPLAY_ADS_VALUE = 2; + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3057972).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 3; + */ + public static final int LOCAL_INVENTORY_ADS_VALUE = 3; + /** + * + * + *
+     * [Free listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 4; + */ + public static final int FREE_LISTINGS_VALUE = 4; + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 5; + */ + public static final int FREE_LOCAL_LISTINGS_VALUE = 5; + /** + * + * + *
+     * [YouTube Shopping](https://support.google.com/merchants/answer/12362804).
+     * 
+ * + * YOUTUBE_SHOPPING = 6; + */ + public static final int YOUTUBE_SHOPPING_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DestinationEnum forNumber(int value) { + switch (value) { + case 0: + return DESTINATION_ENUM_UNSPECIFIED; + case 1: + return SHOPPING_ADS; + case 2: + return DISPLAY_ADS; + case 3: + return LOCAL_INVENTORY_ADS; + case 4: + return FREE_LISTINGS; + case 5: + return FREE_LOCAL_LISTINGS; + case 6: + return YOUTUBE_SHOPPING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DestinationEnum findValueByNumber(int number) { + return DestinationEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.type.Destination.getDescriptor().getEnumTypes().get(0); + } + + private static final DestinationEnum[] VALUES = values(); + + public static DestinationEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DestinationEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.type.Destination.DestinationEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.type.Destination)) { + return super.equals(obj); + } + com.google.shopping.type.Destination other = (com.google.shopping.type.Destination) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.type.Destination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Destination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Destination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.Destination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Destination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Destination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.Destination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.Destination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.shopping.type.Destination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
-   * Free listings.
-   * 
- * - * FREE_LISTINGS = 3; - */ - public static final int FREE_LISTINGS_VALUE = 3; - /** + * Destinations available for a product. * - * - *
-   * Free local product listings.
+   * Destinations are used in Merchant Center to allow you to control where the
+   * products from your data feed should be displayed.
    * 
* - * FREE_LOCAL_LISTINGS = 4; + * Protobuf type {@code google.shopping.type.Destination} */ - public static final int FREE_LOCAL_LISTINGS_VALUE = 4; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.type.Destination) + com.google.shopping.type.DestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_descriptor; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.Destination.class, + com.google.shopping.type.Destination.Builder.class); } - return value; - } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Destination valueOf(int value) { - return forNumber(value); - } + // Construct using com.google.shopping.type.Destination.newBuilder() + private Builder() {} - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Destination forNumber(int value) { - switch (value) { - case 0: - return DESTINATION_UNSPECIFIED; - case 1: - return SHOPPING_ADS; - case 2: - return LOCAL_INVENTORY_ADS; - case 3: - return FREE_LISTINGS; - case 4: - return FREE_LOCAL_LISTINGS; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Destination findValueByNumber(int number) { - return Destination.forNumber(number); - } - }; + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + @java.lang.Override + public Builder clear() { + super.clear(); + return this; } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_Destination_descriptor; + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.shopping.type.TypesProto.getDescriptor().getEnumTypes().get(0); - } + @java.lang.Override + public com.google.shopping.type.Destination getDefaultInstanceForType() { + return com.google.shopping.type.Destination.getDefaultInstance(); + } - private static final Destination[] VALUES = values(); + @java.lang.Override + public com.google.shopping.type.Destination build() { + com.google.shopping.type.Destination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.type.Destination buildPartial() { + com.google.shopping.type.Destination result = new com.google.shopping.type.Destination(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static Destination valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - return VALUES[desc.getIndex()]; + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.type.Destination) { + return mergeFrom((com.google.shopping.type.Destination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.type.Destination other) { + if (other == com.google.shopping.type.Destination.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.type.Destination) } - private final int value; + // @@protoc_insertion_point(class_scope:google.shopping.type.Destination) + private static final com.google.shopping.type.Destination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.type.Destination(); + } - private Destination(int value) { - this.value = value; + public static com.google.shopping.type.Destination getDefaultInstance() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(enum_scope:google.shopping.type.Destination) + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Destination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.type.Destination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java new file mode 100644 index 000000000000..ccec8f709da9 --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/DestinationOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +public interface DestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.type.Destination) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Price.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Price.java index 64a582473d71..daf2dbcc9282 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Price.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/Price.java @@ -71,6 +71,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -88,6 +90,8 @@ public boolean hasAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -549,6 +553,8 @@ public Builder mergeFrom( * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -566,6 +572,8 @@ public boolean hasAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -583,6 +591,8 @@ public long getAmountMicros() { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -604,6 +614,8 @@ public Builder setAmountMicros(long value) { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java index d071d52a528a..daad96b93806 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/PriceOrBuilder.java @@ -30,6 +30,8 @@ public interface PriceOrBuilder * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; @@ -44,6 +46,8 @@ public interface PriceOrBuilder * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. * * * optional int64 amount_micros = 1; diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java new file mode 100644 index 000000000000..891f8b1ea958 --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContext.java @@ -0,0 +1,836 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +/** + * + * + *
+ * Reporting contexts that your account and product issues apply to.
+ *
+ * Reporting contexts are groups of surfaces and formats for product results on
+ * Google. They can represent the entire destination (for example, [Shopping
+ * ads](https://support.google.com/merchants/answer/6149970)) or a subset of
+ * formats within a destination (for example, [Discovery
+ * ads](https://support.google.com/merchants/answer/13389785)).
+ * 
+ * + * Protobuf type {@code google.shopping.type.ReportingContext} + */ +public final class ReportingContext extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.shopping.type.ReportingContext) + ReportingContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportingContext.newBuilder() to construct. + private ReportingContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportingContext() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportingContext(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.ReportingContext.class, + com.google.shopping.type.ReportingContext.Builder.class); + } + + /** + * + * + *
+   * Reporting context values.
+   * 
+ * + * Protobuf enum {@code google.shopping.type.ReportingContext.ReportingContextEnum} + */ + public enum ReportingContextEnum implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0; + */ + REPORTING_CONTEXT_ENUM_UNSPECIFIED(0), + /** + * + * + *
+     * [Shopping ads](https://support.google.com/merchants/answer/6149970).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + SHOPPING_ADS(1), + /** + * + * + *
+     * [Discovery and Demand Gen
+     * ads](https://support.google.com/merchants/answer/13389785).
+     * 
+ * + * DISCOVERY_ADS = 2; + */ + DISCOVERY_ADS(2), + /** + * + * + *
+     * [Video ads](https://support.google.com/google-ads/answer/6340491).
+     * 
+ * + * VIDEO_ADS = 3; + */ + VIDEO_ADS(3), + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 4; + */ + DISPLAY_ADS(4), + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3271956).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 5; + */ + LOCAL_INVENTORY_ADS(5), + /** + * + * + *
+     * [Vehicle inventory
+     * ads](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * VEHICLE_INVENTORY_ADS = 6; + */ + VEHICLE_INVENTORY_ADS(6), + /** + * + * + *
+     * [Free product
+     * listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 7; + */ + FREE_LISTINGS(7), + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 8; + */ + FREE_LOCAL_LISTINGS(8), + /** + * + * + *
+     * [Free local vehicle
+     * listings](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * FREE_LOCAL_VEHICLE_LISTINGS = 9; + */ + FREE_LOCAL_VEHICLE_LISTINGS(9), + /** + * + * + *
+     * [YouTube
+     * Shopping](https://support.google.com/merchants/answer/13478370).
+     * 
+ * + * YOUTUBE_SHOPPING = 10; + */ + YOUTUBE_SHOPPING(10), + /** + * + * + *
+     * [Cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * CLOUD_RETAIL = 11; + */ + CLOUD_RETAIL(11), + /** + * + * + *
+     * [Local cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * LOCAL_CLOUD_RETAIL = 12; + */ + LOCAL_CLOUD_RETAIL(12), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * REPORTING_CONTEXT_ENUM_UNSPECIFIED = 0; + */ + public static final int REPORTING_CONTEXT_ENUM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * [Shopping ads](https://support.google.com/merchants/answer/6149970).
+     * 
+ * + * SHOPPING_ADS = 1; + */ + public static final int SHOPPING_ADS_VALUE = 1; + /** + * + * + *
+     * [Discovery and Demand Gen
+     * ads](https://support.google.com/merchants/answer/13389785).
+     * 
+ * + * DISCOVERY_ADS = 2; + */ + public static final int DISCOVERY_ADS_VALUE = 2; + /** + * + * + *
+     * [Video ads](https://support.google.com/google-ads/answer/6340491).
+     * 
+ * + * VIDEO_ADS = 3; + */ + public static final int VIDEO_ADS_VALUE = 3; + /** + * + * + *
+     * [Display ads](https://support.google.com/merchants/answer/6069387).
+     * 
+ * + * DISPLAY_ADS = 4; + */ + public static final int DISPLAY_ADS_VALUE = 4; + /** + * + * + *
+     * [Local inventory
+     * ads](https://support.google.com/merchants/answer/3271956).
+     * 
+ * + * LOCAL_INVENTORY_ADS = 5; + */ + public static final int LOCAL_INVENTORY_ADS_VALUE = 5; + /** + * + * + *
+     * [Vehicle inventory
+     * ads](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * VEHICLE_INVENTORY_ADS = 6; + */ + public static final int VEHICLE_INVENTORY_ADS_VALUE = 6; + /** + * + * + *
+     * [Free product
+     * listings](https://support.google.com/merchants/answer/9199328).
+     * 
+ * + * FREE_LISTINGS = 7; + */ + public static final int FREE_LISTINGS_VALUE = 7; + /** + * + * + *
+     * [Free local product
+     * listings](https://support.google.com/merchants/answer/9825611).
+     * 
+ * + * FREE_LOCAL_LISTINGS = 8; + */ + public static final int FREE_LOCAL_LISTINGS_VALUE = 8; + /** + * + * + *
+     * [Free local vehicle
+     * listings](https://support.google.com/merchants/answer/11544533).
+     * 
+ * + * FREE_LOCAL_VEHICLE_LISTINGS = 9; + */ + public static final int FREE_LOCAL_VEHICLE_LISTINGS_VALUE = 9; + /** + * + * + *
+     * [YouTube
+     * Shopping](https://support.google.com/merchants/answer/13478370).
+     * 
+ * + * YOUTUBE_SHOPPING = 10; + */ + public static final int YOUTUBE_SHOPPING_VALUE = 10; + /** + * + * + *
+     * [Cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * CLOUD_RETAIL = 11; + */ + public static final int CLOUD_RETAIL_VALUE = 11; + /** + * + * + *
+     * [Local cloud retail](https://cloud.google.com/solutions/retail).
+     * 
+ * + * LOCAL_CLOUD_RETAIL = 12; + */ + public static final int LOCAL_CLOUD_RETAIL_VALUE = 12; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ReportingContextEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ReportingContextEnum forNumber(int value) { + switch (value) { + case 0: + return REPORTING_CONTEXT_ENUM_UNSPECIFIED; + case 1: + return SHOPPING_ADS; + case 2: + return DISCOVERY_ADS; + case 3: + return VIDEO_ADS; + case 4: + return DISPLAY_ADS; + case 5: + return LOCAL_INVENTORY_ADS; + case 6: + return VEHICLE_INVENTORY_ADS; + case 7: + return FREE_LISTINGS; + case 8: + return FREE_LOCAL_LISTINGS; + case 9: + return FREE_LOCAL_VEHICLE_LISTINGS; + case 10: + return YOUTUBE_SHOPPING; + case 11: + return CLOUD_RETAIL; + case 12: + return LOCAL_CLOUD_RETAIL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReportingContextEnum findValueByNumber(int number) { + return ReportingContextEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.type.ReportingContext.getDescriptor().getEnumTypes().get(0); + } + + private static final ReportingContextEnum[] VALUES = values(); + + public static ReportingContextEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ReportingContextEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.type.ReportingContext.ReportingContextEnum) + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.type.ReportingContext)) { + return super.equals(obj); + } + com.google.shopping.type.ReportingContext other = + (com.google.shopping.type.ReportingContext) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.type.ReportingContext parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.type.ReportingContext parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.type.ReportingContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.shopping.type.ReportingContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Reporting contexts that your account and product issues apply to.
+   *
+   * Reporting contexts are groups of surfaces and formats for product results on
+   * Google. They can represent the entire destination (for example, [Shopping
+   * ads](https://support.google.com/merchants/answer/6149970)) or a subset of
+   * formats within a destination (for example, [Discovery
+   * ads](https://support.google.com/merchants/answer/13389785)).
+   * 
+ * + * Protobuf type {@code google.shopping.type.ReportingContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.type.ReportingContext) + com.google.shopping.type.ReportingContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.type.ReportingContext.class, + com.google.shopping.type.ReportingContext.Builder.class); + } + + // Construct using com.google.shopping.type.ReportingContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.type.TypesProto + .internal_static_google_shopping_type_ReportingContext_descriptor; + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext getDefaultInstanceForType() { + return com.google.shopping.type.ReportingContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext build() { + com.google.shopping.type.ReportingContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext buildPartial() { + com.google.shopping.type.ReportingContext result = + new com.google.shopping.type.ReportingContext(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.type.ReportingContext) { + return mergeFrom((com.google.shopping.type.ReportingContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.type.ReportingContext other) { + if (other == com.google.shopping.type.ReportingContext.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.shopping.type.ReportingContext) + } + + // @@protoc_insertion_point(class_scope:google.shopping.type.ReportingContext) + private static final com.google.shopping.type.ReportingContext DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.type.ReportingContext(); + } + + public static com.google.shopping.type.ReportingContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportingContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.type.ReportingContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java new file mode 100644 index 000000000000..e3650d6489ef --- /dev/null +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/ReportingContextOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/shopping/type/types.proto + +package com.google.shopping.type; + +public interface ReportingContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.type.ReportingContext) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/TypesProto.java b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/TypesProto.java index c0d5a014193f..39d4af4b9716 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/TypesProto.java +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/type/TypesProto.java @@ -35,6 +35,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_shopping_type_CustomAttribute_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_shopping_type_CustomAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_type_Destination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_type_Destination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_type_ReportingContext_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_type_ReportingContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_type_Channel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_shopping_type_Channel_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -51,14 +63,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\017CustomAttribute\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005" + "value\030\002 \001(\tH\001\210\001\001\022;\n\014group_values\030\003 \003(\0132%" + ".google.shopping.type.CustomAttributeB\007\n" - + "\005_nameB\010\n\006_value*\201\001\n\013Destination\022\033\n\027DEST" - + "INATION_UNSPECIFIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022" - + "\027\n\023LOCAL_INVENTORY_ADS\020\002\022\021\n\rFREE_LISTING" - + "S\020\003\022\027\n\023FREE_LOCAL_LISTINGS\020\004B\200\001\n\030com.goo" - + "gle.shopping.typeB\nTypesProtoP\001Z?google." - + "golang.org/genproto/googleapis/shopping/" - + "type/types;types\252\002\024Google.Shopping.Typeb" - + "\006proto3" + + "\005_nameB\010\n\006_value\"\301\001\n\013Destination\"\261\001\n\017Des" + + "tinationEnum\022 \n\034DESTINATION_ENUM_UNSPECI" + + "FIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\017\n\013DISPLAY_ADS\020" + + "\002\022\027\n\023LOCAL_INVENTORY_ADS\020\003\022\021\n\rFREE_LISTI" + + "NGS\020\004\022\027\n\023FREE_LOCAL_LISTINGS\020\005\022\024\n\020YOUTUB" + + "E_SHOPPING\020\006\"\331\002\n\020ReportingContext\"\304\002\n\024Re" + + "portingContextEnum\022&\n\"REPORTING_CONTEXT_" + + "ENUM_UNSPECIFIED\020\000\022\020\n\014SHOPPING_ADS\020\001\022\021\n\r" + + "DISCOVERY_ADS\020\002\022\r\n\tVIDEO_ADS\020\003\022\017\n\013DISPLA" + + "Y_ADS\020\004\022\027\n\023LOCAL_INVENTORY_ADS\020\005\022\031\n\025VEHI" + + "CLE_INVENTORY_ADS\020\006\022\021\n\rFREE_LISTINGS\020\007\022\027" + + "\n\023FREE_LOCAL_LISTINGS\020\010\022\037\n\033FREE_LOCAL_VE" + + "HICLE_LISTINGS\020\t\022\024\n\020YOUTUBE_SHOPPING\020\n\022\020" + + "\n\014CLOUD_RETAIL\020\013\022\026\n\022LOCAL_CLOUD_RETAIL\020\014" + + "\"M\n\007Channel\"B\n\013ChannelEnum\022\034\n\030CHANNEL_EN" + + "UM_UNSPECIFIED\020\000\022\n\n\006ONLINE\020\001\022\t\n\005LOCAL\020\002B" + + "p\n\030com.google.shopping.typeB\nTypesProtoP" + + "\001Z/cloud.google.com/go/shopping/type/typ" + + "epb;typepb\252\002\024Google.Shopping.Typeb\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -79,6 +103,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Value", "GroupValues", "Name", "Value", }); + internal_static_google_shopping_type_Destination_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_shopping_type_Destination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_type_Destination_descriptor, new java.lang.String[] {}); + internal_static_google_shopping_type_ReportingContext_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_shopping_type_ReportingContext_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_type_ReportingContext_descriptor, + new java.lang.String[] {}); + internal_static_google_shopping_type_Channel_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_shopping_type_Channel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_shopping_type_Channel_descriptor, new java.lang.String[] {}); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/proto/google/shopping/merchant/reports/v1beta/reports.proto b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/proto/google/shopping/merchant/reports/v1beta/reports.proto index d1c657390e4c..039932120492 100644 --- a/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/proto/google/shopping/merchant/reports/v1beta/reports.proto +++ b/java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/proto/google/shopping/merchant/reports/v1beta/reports.proto @@ -23,7 +23,7 @@ import "google/protobuf/timestamp.proto"; import "google/shopping/type/types.proto"; import "google/type/date.proto"; -option go_package = "google.golang.org/genproto/googleapis/shopping/merchant/reports/v1beta;reports"; +option go_package = "cloud.google.com/go/shopping/merchant/reports/apiv1beta/reportspb;reportspb"; option java_multiple_files = true; option java_outer_classname = "ReportsProto"; option java_package = "com.google.shopping.merchant.reports.v1beta"; @@ -46,76 +46,6 @@ service ReportService { } } -// Granularity of the Best sellers report. Best sellers reports are computed -// over a week and a month timeframe. -enum ReportGranularity { - // Not specified. - REPORT_GRANULARITY_UNSPECIFIED = 0; - - // Report is computed over a week timeframe. - WEEKLY = 1; - - // Report is computed over a month timeframe. - MONTHLY = 2; -} - -// Relative demand of a product cluster or brand in the Best sellers report. -enum RelativeDemand { - // Not specified. - RELATIVE_DEMAND_UNSPECIFIED = 0; - - // Demand is 0-5% of the demand of the highest ranked product cluster or - // brand. - VERY_LOW = 10; - - // Demand is 6-10% of the demand of the highest ranked product cluster or - // brand. - LOW = 20; - - // Demand is 11-20% of the demand of the highest ranked product cluster or - // brand. - MEDIUM = 30; - - // Demand is 21-50% of the demand of the highest ranked product cluster or - // brand. - HIGH = 40; - - // Demand is 51-100% of the demand of the highest ranked product cluster or - // brand. - VERY_HIGH = 50; -} - -// Relative demand of a product cluster or brand in the Best sellers report -// compared to the previous time period. -enum RelativeDemandChangeType { - // Not specified. - RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED = 0; - - // Relative demand is lower than the previous time period. - SINKER = 1; - - // Relative demand is equal to the previous time period. - FLAT = 2; - - // Relative demand is higher than the previous time period. - RISER = 3; -} - -// Traffic source of impressions in the Competitive visibility report. -enum TrafficSource { - // Not specified. - TRAFFIC_SOURCE_UNSPECIFIED = 0; - - // Organic traffic. - ORGANIC = 1; - - // Traffic from ads. - ADS = 2; - - // Organic and ads traffic. - ALL = 3; -} - // Request message for the `ReportService.Search` method. message SearchRequest { // Required. Id of the account making the call. Must be a standalone account @@ -129,14 +59,15 @@ message SearchRequest { // fields. string query = 2 [(google.api.field_behavior) = REQUIRED]; - // Number of `ReportRows` to retrieve in a single page. Defaults to the - // maximum of 1000. Values above 1000 are coerced to 1000. - int32 page_size = 3; + // Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + // the maximum of 1000. Values above 1000 are coerced to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - // Token of the page to retrieve. If not specified, the first page of results - // is returned. In order to request the next page of results, the value - // obtained from `next_page_token` in the previous response should be used. - string page_token = 4; + // Optional. Token of the page to retrieve. If not specified, the first page + // of results is returned. In order to request the next page of results, the + // value obtained from `next_page_token` in the previous response should be + // used. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Response message for the `ReportService.Search` method. @@ -158,9 +89,6 @@ message ReportRow { // Fields available for query in `product_performance_view` table. ProductPerformanceView product_performance_view = 1; - // Fields available for query in `non_product_performance_view` table. - NonProductPerformanceView non_product_performance_view = 7; - // Fields available for query in `product_view` table. ProductView product_view = 2; @@ -204,11 +132,8 @@ message ReportRow { // Values are only set for fields requested explicitly in the request's search // query. message ProductPerformanceView { - // Destination of the product to which metrics apply. Segment. - // - // Product performance data is not available for the LOCAL_INVENTORY_ADS - // destination. - optional google.shopping.type.Destination destination = 1; + // Marketing method to which metrics apply. Segment. + optional MarketingMethod.MarketingMethodEnum marketing_method = 1; // Date in the merchant timezone to which metrics apply. Segment. // @@ -226,25 +151,6 @@ message ProductPerformanceView { // returned. optional string customer_country_code = 4; - // Merchant Center account id of the seller of the offer. Segment. - // - // Available only for multi-client accounts. - optional int64 account_id = 29; - - // Merchant Center account name of the seller of the offer. Segment. - // - // Available only for multi-client accounts. - optional string account_display_name = 30; - - // [External account - // id](https://support.google.com/merchants/answer/11537846?hl=en) submitted - // in an offer feed by a multi-seller account to identify the seller of the - // offer. Segment. - // - // Available only for multi-client accounts. This field is non-empty only for - // auto-seller accounts. - optional string external_account_id = 31; - // Merchant-provided id of the product. Segment. optional string offer_id = 5; @@ -362,6 +268,7 @@ message ProductPerformanceView { // // Values are only set for fields requested explicitly in the request's search // query. +// message ProductView { // Item issue associated with the product. message ItemIssue { @@ -377,39 +284,41 @@ message ProductView { // How the issue affects the serving of the product. message ItemIssueSeverity { - // Issue severity per destination. - message IssueSeverityPerDestination { - // Destination the issue applies to. - optional google.shopping.type.Destination destination = 1; - - // List of disapproved countries in the destination, represented in ISO - // 3166 format. + // Issue severity per reporting context. + message IssueSeverityPerReportingContext { + // Reporting context the issue applies to. + optional google.shopping.type.ReportingContext.ReportingContextEnum + reporting_context = 1; + + // List of disapproved countries in the reporting context, represented + // in ISO 3166 format. repeated string disapproved_countries = 2; - // List of demoted countries in the destination, represented in ISO 3166 - // format. + // List of demoted countries in the reporting context, represented in + // ISO 3166 format. repeated string demoted_countries = 3; } - // Issue severity aggregated for all destinations. + // Issue severity aggregated for all reporting contexts. enum AggregatedIssueSeverity { // Not specified. AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED = 0; - // Issue disapproves the product in at least one destination. + // Issue disapproves the product in at least one reporting context. DISAPPROVED = 1; - // Issue demotes the product in all destinations it affects. + // Issue demotes the product in all reporting contexts it affects. DEMOTED = 2; // Issue resolution is `PENDING_PROCESSING`. PENDING = 3; } - // Issue severity per destination. - repeated IssueSeverityPerDestination severity_per_destination = 1; + // Issue severity per reporting context. + repeated IssueSeverityPerReportingContext severity_per_reporting_context = + 1; - // Aggregated severity of the issue for all destinations it affects. + // Aggregated severity of the issue for all reporting contexts it affects. // // **This field can be used for filtering the results.** optional AggregatedIssueSeverity aggregated_severity = 2; @@ -439,9 +348,9 @@ message ProductView { optional ItemIssueResolution resolution = 3; } - // Status of the product aggregated for all destinations. + // Status of the product aggregated for all reporting contexts. // - // Here's an example of how the aggregated destination status is computed: + // Here's an example of how the aggregated status is computed: // // Free listings | Shopping Ads | Status // --------------|--------------|------------------------------ @@ -452,31 +361,33 @@ message ProductView { // Disapproved | Disapproved | NOT_ELIGIBLE_OR_DISAPPROVED // // - // - enum AggregatedDestinationStatus { + enum AggregatedReportingContextStatus { // Not specified. - AGGREGATED_DESTINATION_STATUS_UNSPECIFIED = 0; + AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0; - // Product is not eligible or is disapproved for all destinations. + // Product is not eligible or is disapproved for all reporting contexts. NOT_ELIGIBLE_OR_DISAPPROVED = 1; - // Product's status is pending in all destinations. + // Product's status is pending in all reporting contexts. PENDING = 2; - // Product is eligible for some (but not all) destinations. + // Product is eligible for some (but not all) reporting contexts. ELIGIBLE_LIMITED = 3; - // Product is eligible for all destinations. + // Product is eligible for all reporting contexts. ELIGIBLE = 4; } - // REST ID of the product, in the form of languageCode~feedLabel~offerId. - // Merchant API methods that operate on products take this as their `name` - // parameter. + // REST ID of the product, in the form of + // `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate + // on products take this as their `name` parameter. // // Required in the `SELECT` clause. optional string id = 1; + // Channel of the product. Can be `ONLINE` or `LOCAL`. + optional google.shopping.type.Channel.ChannelEnum channel = 28; + // Language code of the product in BCP 47 format. optional string language_code = 2; @@ -565,8 +476,9 @@ message ProductView { // Expiration date for the product, specified on insertion. google.type.Date expiration_date = 25; - // Aggregated destination status. - optional AggregatedDestinationStatus aggregated_destination_status = 26; + // Aggregated status. + optional AggregatedReportingContextStatus + aggregated_reporting_context_status = 26; // List of item issues for the product. // @@ -591,8 +503,9 @@ message PriceCompetitivenessProductView { // Required in the `SELECT` clause. optional string report_country_code = 1; - // REST ID of the product, in the form of languageCode~feedLabel~offerId. Can - // be used to join data with the `product_view` table. + // REST ID of the product, in the form of + // `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + // `product_view` table. // // Required in the `SELECT` clause. optional string id = 2; @@ -662,8 +575,9 @@ message PriceCompetitivenessProductView { // Values are only set for fields requested explicitly in the request's search // query. message PriceInsightsProductView { - // REST ID of the product, in the form of languageCode~feedLabel~offerId. Can - // be used to join data with the `product_view` table. + // REST ID of the product, in the form of + // `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + // `product_view` table. // // Required in the `SELECT` clause. optional string id = 1; @@ -737,15 +651,6 @@ message PriceInsightsProductView { // suggested price compared to current active price. For example, 0.05 is a 5% // predicted increase in conversions). optional double predicted_conversions_change_fraction = 19; - - // Predicted change in gross profit as a fraction after introducing the - // suggested price compared to current active price. For example, 0.05 is a 5% - // predicted increase in gross profit. - optional double predicted_gross_profit_change_fraction = 20; - - // Predicted change in gross profit after introducing the suggested price - // for a month compared to current active price. - google.shopping.type.Price predicted_monthly_gross_profit_change = 21; } // Fields available for query in `best_sellers_product_cluster_view` table. @@ -789,7 +694,7 @@ message BestSellersProductClusterView { // // Required in the `SELECT` clause. Condition on `report_granularity` is // required in the `WHERE` clause. - optional ReportGranularity report_granularity = 2; + optional ReportGranularity.ReportGranularityEnum report_granularity = 2; // Country where the ranking is calculated. Represented in the ISO 3166 // format. @@ -807,9 +712,6 @@ message BestSellersProductClusterView { // top-level categories are returned. optional int64 report_category_id = 4; - // Google-assigned id of the product cluster. - optional string id = 5; - // Title of the product cluster. optional string title = 6; @@ -868,15 +770,16 @@ message BestSellersProductClusterView { // Estimated demand in relation to the product cluster with the highest // popularity rank in the same category and country. - optional RelativeDemand relative_demand = 18; + optional RelativeDemand.RelativeDemandEnum relative_demand = 18; // Estimated demand in relation to the product cluster with the highest // popularity rank in the same category and country in the previous week or // month. - optional RelativeDemand previous_relative_demand = 19; + optional RelativeDemand.RelativeDemandEnum previous_relative_demand = 19; // Change in the estimated demand. Whether it rose, sank or remained flat. - optional RelativeDemandChangeType relative_demand_change = 20; + optional RelativeDemandChangeType.RelativeDemandChangeTypeEnum + relative_demand_change = 20; } // Fields available for query in `best_sellers_brand_view` table. @@ -902,7 +805,7 @@ message BestSellersBrandView { // // Required in the `SELECT` clause. Condition on `report_granularity` is // required in the `WHERE` clause. - optional ReportGranularity report_granularity = 2; + optional ReportGranularity.ReportGranularityEnum report_granularity = 2; // Country where the ranking is calculated. Represented in the ISO 3166 // format. @@ -920,9 +823,6 @@ message BestSellersBrandView { // top-level categories are returned. optional int64 report_category_id = 4; - // Google-assigned id of the brand. - optional string id = 5; - // Name of the brand. optional string brand = 6; @@ -935,50 +835,15 @@ message BestSellersBrandView { // Estimated demand in relation to the brand with the highest popularity rank // in the same category and country. - optional RelativeDemand relative_demand = 9; + optional RelativeDemand.RelativeDemandEnum relative_demand = 9; // Estimated demand in relation to the brand with the highest popularity rank // in the same category and country in the previous week or month. - optional RelativeDemand previous_relative_demand = 10; + optional RelativeDemand.RelativeDemandEnum previous_relative_demand = 10; // Change in the estimated demand. Whether it rose, sank or remained flat. - optional RelativeDemandChangeType relative_demand_change = 11; -} - -// Fields available for query in `non_product_performance_view` table. -// -// Performance data on images and website links leading to your non-product -// website pages. This includes performance metrics (for example, `clicks`) -// and dimensions according to which performance metrics are segmented (for -// example, `date`). -// -// Segment fields cannot be selected in queries without also selecting at least -// one metric field. -// -// Values are only set for fields requested explicitly in the request's search -// query. -message NonProductPerformanceView { - // Date in the merchant timezone to which metrics apply. Segment. - // - // Condition on `date` is required in the `WHERE` clause. - google.type.Date date = 1; - - // First day of the week (Monday) of the metrics date in the merchant - // timezone. Segment. - google.type.Date week = 2; - - // Number of clicks on images and website links leading to your non-product - // website pages. Metric. - optional int64 clicks = 3; - - // Number of times images and website links leading to your non-product - // website pages were shown. Metric. - optional int64 impressions = 4; - - // Click-through rate - the number of clicks (`clicks`) divided by the number - // of impressions (`impressions`) of images and website links leading to your - // non-product website pages. Metric. - optional double click_through_rate = 5; + optional RelativeDemandChangeType.RelativeDemandChangeTypeEnum + relative_demand_change = 11; } // Fields available for query in `competitive_visibility_competitor_view` table. @@ -1023,7 +888,7 @@ message CompetitiveVisibilityCompetitorView { // Traffic source of impressions. // // Required in the `SELECT` clause. - optional TrafficSource traffic_source = 6; + optional TrafficSource.TrafficSourceEnum traffic_source = 6; // Position of the domain in the similar businesses ranking for the selected // keys (`date`, `report_category_id`, `report_country_code`, @@ -1111,7 +976,7 @@ message CompetitiveVisibilityTopMerchantView { // Traffic source of impressions. // // Required in the `SELECT` clause. - optional TrafficSource traffic_source = 6; + optional TrafficSource.TrafficSourceEnum traffic_source = 6; // Position of the domain in the top merchants ranking for the selected keys // (`date`, `report_category_id`, `report_country_code`, `traffic_source`) @@ -1177,7 +1042,7 @@ message CompetitiveVisibilityBenchmarkView { // Traffic source of impressions. // // Required in the `SELECT` clause. - optional TrafficSource traffic_source = 4; + optional TrafficSource.TrafficSourceEnum traffic_source = 4; // Change in visibility based on impressions for your domain with respect to // the start of the selected time range (or first day with non-zero @@ -1194,3 +1059,101 @@ message CompetitiveVisibilityBenchmarkView { // Cannot be filtered on in the 'WHERE' clause. optional double category_benchmark_visibility_trend = 6; } + +// Marketing method used to promote your products on Google (organic versus +// ads). +message MarketingMethod { + // Marketing method values. + enum MarketingMethodEnum { + // Not specified. + MARKETING_METHOD_ENUM_UNSPECIFIED = 0; + + // Organic marketing. + ORGANIC = 1; + + // Ads-based marketing. + ADS = 2; + } +} + +// Granularity of the Best sellers report. Best sellers reports are computed +// over a week and a month timeframe. +message ReportGranularity { + // Report granularity values. + enum ReportGranularityEnum { + // Not specified. + REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0; + + // Report is computed over a week timeframe. + WEEKLY = 1; + + // Report is computed over a month timeframe. + MONTHLY = 2; + } +} + +// Relative demand of a product cluster or brand in the Best sellers report. +message RelativeDemand { + // Relative demand values. + enum RelativeDemandEnum { + // Not specified. + RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0; + + // Demand is 0-5% of the demand of the highest ranked product cluster or + // brand. + VERY_LOW = 10; + + // Demand is 6-10% of the demand of the highest ranked product cluster or + // brand. + LOW = 20; + + // Demand is 11-20% of the demand of the highest ranked product cluster or + // brand. + MEDIUM = 30; + + // Demand is 21-50% of the demand of the highest ranked product cluster or + // brand. + HIGH = 40; + + // Demand is 51-100% of the demand of the highest ranked product cluster or + // brand. + VERY_HIGH = 50; + } +} + +// Relative demand of a product cluster or brand in the Best sellers report +// compared to the previous time period. +message RelativeDemandChangeType { + // Relative demand change type values. + enum RelativeDemandChangeTypeEnum { + // Not specified. + RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0; + + // Relative demand is lower than the previous time period. + SINKER = 1; + + // Relative demand is equal to the previous time period. + FLAT = 2; + + // Relative demand is higher than the previous time period. + RISER = 3; + } +} + +// Traffic source of impressions in the Competitive visibility report. +message TrafficSource { + // Traffic source values. + enum TrafficSourceEnum { + // Not specified. + TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0; + + // Organic traffic. + ORGANIC = 1; + + // Traffic from ads. + ADS = 2; + + // Organic and ads traffic. + ALL = 3; + } +} diff --git a/java-speech/CHANGELOG.md b/java-speech/CHANGELOG.md index b83b648e99f0..d09835f48599 100644 --- a/java-speech/CHANGELOG.md +++ b/java-speech/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.24.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 4.23.0 (2023-10-11) ### Dependencies diff --git a/java-speech/README.md b/java-speech/README.md index 4f66df36d20d..b7a77d41d0c4 100644 --- a/java-speech/README.md +++ b/java-speech/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-speech - 4.23.0 + 4.24.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-speech:4.23.0' +implementation 'com.google.cloud:google-cloud-speech:4.24.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "4.23.0" +libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "4.24.0" ``` diff --git a/java-speech/google-cloud-speech-bom/pom.xml b/java-speech/google-cloud-speech-bom/pom.xml index 56cb49573570..1f0c919506d3 100644 --- a/java-speech/google-cloud-speech-bom/pom.xml +++ b/java-speech/google-cloud-speech-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-speech-bom - 4.23.0 + 4.24.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,47 +23,47 @@ com.google.cloud google-cloud-speech - 4.23.0 + 4.24.0 com.google.api.grpc grpc-google-cloud-speech-v1 - 4.23.0 + 4.24.0 com.google.api.grpc grpc-google-cloud-speech-v1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc grpc-google-cloud-speech-v1p1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc grpc-google-cloud-speech-v2 - 4.23.0 + 4.24.0 com.google.api.grpc proto-google-cloud-speech-v1 - 4.23.0 + 4.24.0 com.google.api.grpc proto-google-cloud-speech-v1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc proto-google-cloud-speech-v1p1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc proto-google-cloud-speech-v2 - 4.23.0 + 4.24.0
diff --git a/java-speech/google-cloud-speech/pom.xml b/java-speech/google-cloud-speech/pom.xml index 085d7ea1fd49..5ba4773b02bf 100644 --- a/java-speech/google-cloud-speech/pom.xml +++ b/java-speech/google-cloud-speech/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-speech - 4.23.0 + 4.24.0 jar Google Cloud Speech @@ -12,7 +12,7 @@ com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 google-cloud-speech diff --git a/java-speech/grpc-google-cloud-speech-v1/pom.xml b/java-speech/grpc-google-cloud-speech-v1/pom.xml index ed7607290f49..ebc938a35ba7 100644 --- a/java-speech/grpc-google-cloud-speech-v1/pom.xml +++ b/java-speech/grpc-google-cloud-speech-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-speech-v1 - 4.23.0 + 4.24.0 grpc-google-cloud-speech-v1 GRPC library for grpc-google-cloud-speech-v1 com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-speech/grpc-google-cloud-speech-v1beta1/pom.xml b/java-speech/grpc-google-cloud-speech-v1beta1/pom.xml index f2be3debe93a..8ca2961c233b 100644 --- a/java-speech/grpc-google-cloud-speech-v1beta1/pom.xml +++ b/java-speech/grpc-google-cloud-speech-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-speech-v1beta1 - 2.23.0 + 2.24.0 grpc-google-cloud-speech-v1beta1 GRPC library for grpc-google-cloud-speech-v1beta1 com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-speech/grpc-google-cloud-speech-v1p1beta1/pom.xml b/java-speech/grpc-google-cloud-speech-v1p1beta1/pom.xml index a1010ff4d5c8..e2f3310df46d 100644 --- a/java-speech/grpc-google-cloud-speech-v1p1beta1/pom.xml +++ b/java-speech/grpc-google-cloud-speech-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-speech-v1p1beta1 - 2.23.0 + 2.24.0 grpc-google-cloud-speech-v1p1beta1 GRPC library for grpc-google-cloud-speech-v1p1beta1 com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-speech/grpc-google-cloud-speech-v2/pom.xml b/java-speech/grpc-google-cloud-speech-v2/pom.xml index 2ab8eef66181..f2c632337ad1 100644 --- a/java-speech/grpc-google-cloud-speech-v2/pom.xml +++ b/java-speech/grpc-google-cloud-speech-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-speech-v2 - 4.23.0 + 4.24.0 grpc-google-cloud-speech-v2 GRPC library for google-cloud-speech com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-speech/pom.xml b/java-speech/pom.xml index 4b5ad4a100b4..8bc48ced1aa2 100644 --- a/java-speech/pom.xml +++ b/java-speech/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-speech-parent pom - 4.23.0 + 4.24.0 Google Cloud speech Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,47 +29,47 @@ com.google.api.grpc proto-google-cloud-speech-v1 - 4.23.0 + 4.24.0 com.google.api.grpc proto-google-cloud-speech-v2 - 4.23.0 + 4.24.0 com.google.api.grpc grpc-google-cloud-speech-v2 - 4.23.0 + 4.24.0 com.google.cloud google-cloud-speech - 4.23.0 + 4.24.0 com.google.api.grpc proto-google-cloud-speech-v1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc proto-google-cloud-speech-v1p1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc grpc-google-cloud-speech-v1 - 4.23.0 + 4.24.0 com.google.api.grpc grpc-google-cloud-speech-v1beta1 - 2.23.0 + 2.24.0 com.google.api.grpc grpc-google-cloud-speech-v1p1beta1 - 2.23.0 + 2.24.0 diff --git a/java-speech/proto-google-cloud-speech-v1/pom.xml b/java-speech/proto-google-cloud-speech-v1/pom.xml index 381301794e7e..c58427febae5 100644 --- a/java-speech/proto-google-cloud-speech-v1/pom.xml +++ b/java-speech/proto-google-cloud-speech-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-speech-v1 - 4.23.0 + 4.24.0 proto-google-cloud-speech-v1 PROTO library for proto-google-cloud-speech-v1 com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-speech/proto-google-cloud-speech-v1beta1/pom.xml b/java-speech/proto-google-cloud-speech-v1beta1/pom.xml index 6bd03d61adb3..e6af123b393a 100644 --- a/java-speech/proto-google-cloud-speech-v1beta1/pom.xml +++ b/java-speech/proto-google-cloud-speech-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-speech-v1beta1 - 2.23.0 + 2.24.0 proto-google-cloud-speech-v1beta1 PROTO library for proto-google-cloud-speech-v1beta1 com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-speech/proto-google-cloud-speech-v1p1beta1/pom.xml b/java-speech/proto-google-cloud-speech-v1p1beta1/pom.xml index b8fa30293f13..b0be7890c702 100644 --- a/java-speech/proto-google-cloud-speech-v1p1beta1/pom.xml +++ b/java-speech/proto-google-cloud-speech-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-speech-v1p1beta1 - 2.23.0 + 2.24.0 proto-google-cloud-speech-v1p1beta1 PROTO library for proto-google-cloud-speech-v1p1beta1 com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-speech/proto-google-cloud-speech-v2/pom.xml b/java-speech/proto-google-cloud-speech-v2/pom.xml index 771b63660b15..2bea9e2cb170 100644 --- a/java-speech/proto-google-cloud-speech-v2/pom.xml +++ b/java-speech/proto-google-cloud-speech-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-speech-v2 - 4.23.0 + 4.24.0 proto-google-cloud-speech-v2 Proto library for google-cloud-speech com.google.cloud google-cloud-speech-parent - 4.23.0 + 4.24.0 diff --git a/java-storage-transfer/CHANGELOG.md b/java-storage-transfer/CHANGELOG.md index 7f7e32ab1aeb..c26f55a141b2 100644 --- a/java-storage-transfer/CHANGELOG.md +++ b/java-storage-transfer/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-storage-transfer/README.md b/java-storage-transfer/README.md index cd91ff89173d..b81104997707 100644 --- a/java-storage-transfer/README.md +++ b/java-storage-transfer/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-storage-transfer - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-storage-transfer:1.28.0' +implementation 'com.google.cloud:google-cloud-storage-transfer:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage-transfer" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-storage-transfer" % "1.29.0" ``` diff --git a/java-storage-transfer/google-cloud-storage-transfer-bom/pom.xml b/java-storage-transfer/google-cloud-storage-transfer-bom/pom.xml index 28bcd32e940a..2f56159a0380 100644 --- a/java-storage-transfer/google-cloud-storage-transfer-bom/pom.xml +++ b/java-storage-transfer/google-cloud-storage-transfer-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-storage-transfer-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-storage-transfer - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-storage-transfer-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-storage-transfer-v1 - 1.28.0 + 1.29.0 diff --git a/java-storage-transfer/google-cloud-storage-transfer/pom.xml b/java-storage-transfer/google-cloud-storage-transfer/pom.xml index 994b2b684cf2..afc466e936a2 100644 --- a/java-storage-transfer/google-cloud-storage-transfer/pom.xml +++ b/java-storage-transfer/google-cloud-storage-transfer/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-storage-transfer - 1.28.0 + 1.29.0 jar Google Storage Transfer Service Storage Transfer Service Secure, low-cost services for transferring data from cloud or on-premises sources. com.google.cloud google-cloud-storage-transfer-parent - 1.28.0 + 1.29.0 google-cloud-storage-transfer diff --git a/java-storage-transfer/grpc-google-cloud-storage-transfer-v1/pom.xml b/java-storage-transfer/grpc-google-cloud-storage-transfer-v1/pom.xml index c0944539af05..044d0094f37e 100644 --- a/java-storage-transfer/grpc-google-cloud-storage-transfer-v1/pom.xml +++ b/java-storage-transfer/grpc-google-cloud-storage-transfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-transfer-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-storage-transfer-v1 GRPC library for google-cloud-storage-transfer com.google.cloud google-cloud-storage-transfer-parent - 1.28.0 + 1.29.0 diff --git a/java-storage-transfer/pom.xml b/java-storage-transfer/pom.xml index 319d76215e48..3697871a35f8 100644 --- a/java-storage-transfer/pom.xml +++ b/java-storage-transfer/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storage-transfer-parent pom - 1.28.0 + 1.29.0 Google Storage Transfer Service Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-storage-transfer - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-storage-transfer-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-storage-transfer-v1 - 1.28.0 + 1.29.0 diff --git a/java-storage-transfer/proto-google-cloud-storage-transfer-v1/pom.xml b/java-storage-transfer/proto-google-cloud-storage-transfer-v1/pom.xml index d553c5dd9b26..95c6eebbd5ae 100644 --- a/java-storage-transfer/proto-google-cloud-storage-transfer-v1/pom.xml +++ b/java-storage-transfer/proto-google-cloud-storage-transfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-transfer-v1 - 1.28.0 + 1.29.0 proto-google-cloud-storage-transfer-v1 Proto library for google-cloud-storage-transfer com.google.cloud google-cloud-storage-transfer-parent - 1.28.0 + 1.29.0 diff --git a/java-storageinsights/CHANGELOG.md b/java-storageinsights/CHANGELOG.md index e5b283f79222..0eb940a16893 100644 --- a/java-storageinsights/CHANGELOG.md +++ b/java-storageinsights/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.14.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.13.0 (2023-10-11) ### Dependencies diff --git a/java-storageinsights/README.md b/java-storageinsights/README.md index 3ad7121e5ba7..0f4f86d0b52b 100644 --- a/java-storageinsights/README.md +++ b/java-storageinsights/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-storageinsights - 0.13.0 + 0.14.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-storageinsights:0.13.0' +implementation 'com.google.cloud:google-cloud-storageinsights:0.14.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storageinsights" % "0.13.0" +libraryDependencies += "com.google.cloud" % "google-cloud-storageinsights" % "0.14.0" ``` diff --git a/java-storageinsights/google-cloud-storageinsights-bom/pom.xml b/java-storageinsights/google-cloud-storageinsights-bom/pom.xml index 8a7ae866569f..6fe00b2b296e 100644 --- a/java-storageinsights/google-cloud-storageinsights-bom/pom.xml +++ b/java-storageinsights/google-cloud-storageinsights-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-storageinsights-bom - 0.13.0 + 0.14.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-storageinsights - 0.13.0 + 0.14.0 com.google.api.grpc grpc-google-cloud-storageinsights-v1 - 0.13.0 + 0.14.0 com.google.api.grpc proto-google-cloud-storageinsights-v1 - 0.13.0 + 0.14.0 diff --git a/java-storageinsights/google-cloud-storageinsights/pom.xml b/java-storageinsights/google-cloud-storageinsights/pom.xml index 15b558c2d431..608fd69862e0 100644 --- a/java-storageinsights/google-cloud-storageinsights/pom.xml +++ b/java-storageinsights/google-cloud-storageinsights/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-storageinsights - 0.13.0 + 0.14.0 jar Google Storage Insights API Storage Insights API Provides insights capability on Google Cloud Storage com.google.cloud google-cloud-storageinsights-parent - 0.13.0 + 0.14.0 google-cloud-storageinsights diff --git a/java-storageinsights/grpc-google-cloud-storageinsights-v1/pom.xml b/java-storageinsights/grpc-google-cloud-storageinsights-v1/pom.xml index 2f981c5309d9..e1e94280bf96 100644 --- a/java-storageinsights/grpc-google-cloud-storageinsights-v1/pom.xml +++ b/java-storageinsights/grpc-google-cloud-storageinsights-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storageinsights-v1 - 0.13.0 + 0.14.0 grpc-google-cloud-storageinsights-v1 GRPC library for google-cloud-storageinsights com.google.cloud google-cloud-storageinsights-parent - 0.13.0 + 0.14.0 diff --git a/java-storageinsights/pom.xml b/java-storageinsights/pom.xml index d66ff82d3e91..d73eee4e5271 100644 --- a/java-storageinsights/pom.xml +++ b/java-storageinsights/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storageinsights-parent pom - 0.13.0 + 0.14.0 Google Storage Insights API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-storageinsights - 0.13.0 + 0.14.0 com.google.api.grpc grpc-google-cloud-storageinsights-v1 - 0.13.0 + 0.14.0 com.google.api.grpc proto-google-cloud-storageinsights-v1 - 0.13.0 + 0.14.0 diff --git a/java-storageinsights/proto-google-cloud-storageinsights-v1/pom.xml b/java-storageinsights/proto-google-cloud-storageinsights-v1/pom.xml index 8f4927e377d2..ea4b256bf9cf 100644 --- a/java-storageinsights/proto-google-cloud-storageinsights-v1/pom.xml +++ b/java-storageinsights/proto-google-cloud-storageinsights-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storageinsights-v1 - 0.13.0 + 0.14.0 proto-google-cloud-storageinsights-v1 Proto library for google-cloud-storageinsights com.google.cloud google-cloud-storageinsights-parent - 0.13.0 + 0.14.0 diff --git a/java-talent/CHANGELOG.md b/java-talent/CHANGELOG.md index 72a989f43692..7c88b230d24b 100644 --- a/java-talent/CHANGELOG.md +++ b/java-talent/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-talent/README.md b/java-talent/README.md index 9e641d6ea6a5..8681f69d6c95 100644 --- a/java-talent/README.md +++ b/java-talent/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.24.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-talent - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-talent:2.29.0' +implementation 'com.google.cloud:google-cloud-talent:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-talent" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-talent" % "2.30.0" ``` diff --git a/java-talent/google-cloud-talent-bom/pom.xml b/java-talent/google-cloud-talent-bom/pom.xml index aa738f727f32..6d38c58478bd 100644 --- a/java-talent/google-cloud-talent-bom/pom.xml +++ b/java-talent/google-cloud-talent-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-talent-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-talent - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-talent-v4 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-talent-v4beta1 - 0.72.0 + 0.73.0 com.google.api.grpc proto-google-cloud-talent-v4 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-talent-v4beta1 - 0.72.0 + 0.73.0 diff --git a/java-talent/google-cloud-talent/pom.xml b/java-talent/google-cloud-talent/pom.xml index 00dea94abf44..ed49cd54e96d 100644 --- a/java-talent/google-cloud-talent/pom.xml +++ b/java-talent/google-cloud-talent/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-talent - 2.29.0 + 2.30.0 jar Google Cloud Talent Solution Java idiomatic client for Google Cloud Talent Solution com.google.cloud google-cloud-talent-parent - 2.29.0 + 2.30.0 google-cloud-talent diff --git a/java-talent/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java b/java-talent/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/it/ITSystemTest.java similarity index 85% rename from java-talent/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java rename to java-talent/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/it/ITSystemTest.java index f4d83d0208a7..76a79752f4ab 100644 --- a/java-talent/google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java +++ b/java-talent/google-cloud-talent/src/test/java/com/google/cloud/talent/v4/it/ITSystemTest.java @@ -1,11 +1,11 @@ /* - * Copyright 2019 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,42 +13,42 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.talent.v4beta1.it; +package com.google.cloud.talent.v4.it; import static org.junit.Assert.assertEquals; import com.google.cloud.ServiceOptions; -import com.google.cloud.talent.v4beta1.ClientEvent; -import com.google.cloud.talent.v4beta1.Company; -import com.google.cloud.talent.v4beta1.CompanyName; -import com.google.cloud.talent.v4beta1.CompanyServiceClient; -import com.google.cloud.talent.v4beta1.CompleteQueryRequest; -import com.google.cloud.talent.v4beta1.CompleteQueryResponse; -import com.google.cloud.talent.v4beta1.CompletionClient; -import com.google.cloud.talent.v4beta1.CreateClientEventRequest; -import com.google.cloud.talent.v4beta1.CreateCompanyRequest; -import com.google.cloud.talent.v4beta1.CreateJobRequest; -import com.google.cloud.talent.v4beta1.CreateTenantRequest; -import com.google.cloud.talent.v4beta1.DeleteCompanyRequest; -import com.google.cloud.talent.v4beta1.DeleteJobRequest; -import com.google.cloud.talent.v4beta1.DeleteTenantRequest; -import com.google.cloud.talent.v4beta1.EventServiceClient; -import com.google.cloud.talent.v4beta1.GetCompanyRequest; -import com.google.cloud.talent.v4beta1.GetJobRequest; -import com.google.cloud.talent.v4beta1.GetTenantRequest; -import com.google.cloud.talent.v4beta1.Job; -import com.google.cloud.talent.v4beta1.JobEvent; -import com.google.cloud.talent.v4beta1.JobName; -import com.google.cloud.talent.v4beta1.JobServiceClient; -import com.google.cloud.talent.v4beta1.ListCompaniesRequest; -import com.google.cloud.talent.v4beta1.ListJobsRequest; -import com.google.cloud.talent.v4beta1.ListTenantsRequest; -import com.google.cloud.talent.v4beta1.ProjectName; -import com.google.cloud.talent.v4beta1.Tenant; -import com.google.cloud.talent.v4beta1.TenantName; -import com.google.cloud.talent.v4beta1.TenantServiceClient; -import com.google.cloud.talent.v4beta1.UpdateCompanyRequest; -import com.google.cloud.talent.v4beta1.UpdateJobRequest; +import com.google.cloud.talent.v4.ClientEvent; +import com.google.cloud.talent.v4.Company; +import com.google.cloud.talent.v4.CompanyName; +import com.google.cloud.talent.v4.CompanyServiceClient; +import com.google.cloud.talent.v4.CompleteQueryRequest; +import com.google.cloud.talent.v4.CompleteQueryResponse; +import com.google.cloud.talent.v4.CompletionClient; +import com.google.cloud.talent.v4.CreateClientEventRequest; +import com.google.cloud.talent.v4.CreateCompanyRequest; +import com.google.cloud.talent.v4.CreateJobRequest; +import com.google.cloud.talent.v4.CreateTenantRequest; +import com.google.cloud.talent.v4.DeleteCompanyRequest; +import com.google.cloud.talent.v4.DeleteJobRequest; +import com.google.cloud.talent.v4.DeleteTenantRequest; +import com.google.cloud.talent.v4.EventServiceClient; +import com.google.cloud.talent.v4.GetCompanyRequest; +import com.google.cloud.talent.v4.GetJobRequest; +import com.google.cloud.talent.v4.GetTenantRequest; +import com.google.cloud.talent.v4.Job; +import com.google.cloud.talent.v4.JobEvent; +import com.google.cloud.talent.v4.JobName; +import com.google.cloud.talent.v4.JobServiceClient; +import com.google.cloud.talent.v4.ListCompaniesRequest; +import com.google.cloud.talent.v4.ListJobsRequest; +import com.google.cloud.talent.v4.ListTenantsRequest; +import com.google.cloud.talent.v4.ProjectName; +import com.google.cloud.talent.v4.Tenant; +import com.google.cloud.talent.v4.TenantName; +import com.google.cloud.talent.v4.TenantServiceClient; +import com.google.cloud.talent.v4.UpdateCompanyRequest; +import com.google.cloud.talent.v4.UpdateJobRequest; import com.google.protobuf.Timestamp; import java.io.IOException; import java.util.Arrays; @@ -120,7 +120,7 @@ public static void beforeTest() throws IOException { .build(); company = companyServiceClient.createCompany(companyRequest); companyId = getId(company.getName()); - companyName = CompanyName.ofProjectTenantCompanyName(PROJECT_ID, tenantId, companyId); + companyName = CompanyName.of(PROJECT_ID, tenantId, companyId); /* create job */ jobServiceClient = JobServiceClient.create(); @@ -140,7 +140,7 @@ public static void beforeTest() throws IOException { CreateJobRequest.newBuilder().setParent(tenantName.toString()).setJob(createJob).build(); job = jobServiceClient.createJob(jobRequest); jobId = getId(job.getName()); - jobName = JobName.ofProjectTenantJobName(PROJECT_ID, tenantId, jobId); + jobName = JobName.of(PROJECT_ID, tenantId, jobId); /*create event */ eventServiceClient = EventServiceClient.create(); @@ -313,7 +313,7 @@ public void createEventTest() { public void completeQueryTest() { CompleteQueryRequest request = CompleteQueryRequest.newBuilder() - .setParent(tenantName.toString()) + .setTenant(tenantName.toString()) .setQuery("Soft") .setPageSize(5) .addAllLanguageCodes(Arrays.asList(LANGUAGE_CODE)) diff --git a/java-talent/grpc-google-cloud-talent-v4/pom.xml b/java-talent/grpc-google-cloud-talent-v4/pom.xml index c1f019d7ea8c..5cec4fc4c240 100644 --- a/java-talent/grpc-google-cloud-talent-v4/pom.xml +++ b/java-talent/grpc-google-cloud-talent-v4/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-talent-v4 - 2.29.0 + 2.30.0 grpc-google-cloud-talent-v4 GRPC library for grpc-google-cloud-talent-v4 com.google.cloud google-cloud-talent-parent - 2.29.0 + 2.30.0 diff --git a/java-talent/grpc-google-cloud-talent-v4beta1/pom.xml b/java-talent/grpc-google-cloud-talent-v4beta1/pom.xml index 53b18ddaf958..cab69c6566ed 100644 --- a/java-talent/grpc-google-cloud-talent-v4beta1/pom.xml +++ b/java-talent/grpc-google-cloud-talent-v4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-talent-v4beta1 - 0.72.0 + 0.73.0 grpc-google-cloud-talent-v4beta1 GRPC library for grpc-google-cloud-talent-v4beta1 com.google.cloud google-cloud-talent-parent - 2.29.0 + 2.30.0 diff --git a/java-talent/pom.xml b/java-talent/pom.xml index ae1f661fccaa..ed90a3242b31 100644 --- a/java-talent/pom.xml +++ b/java-talent/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-talent-parent pom - 2.29.0 + 2.30.0 Google Cloud Talent Solution Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-talent-v4beta1 - 0.72.0 + 0.73.0 com.google.api.grpc proto-google-cloud-talent-v4 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-talent-v4beta1 - 0.72.0 + 0.73.0 com.google.api.grpc grpc-google-cloud-talent-v4 - 2.29.0 + 2.30.0 com.google.cloud google-cloud-talent - 2.29.0 + 2.30.0 com.google.cloud diff --git a/java-talent/proto-google-cloud-talent-v4/pom.xml b/java-talent/proto-google-cloud-talent-v4/pom.xml index ea3852727194..f166f6f2154f 100644 --- a/java-talent/proto-google-cloud-talent-v4/pom.xml +++ b/java-talent/proto-google-cloud-talent-v4/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-talent-v4 - 2.29.0 + 2.30.0 proto-google-cloud-talent-v4 PROTO library for proto-google-cloud-talent-v4 com.google.cloud google-cloud-talent-parent - 2.29.0 + 2.30.0 diff --git a/java-talent/proto-google-cloud-talent-v4beta1/pom.xml b/java-talent/proto-google-cloud-talent-v4beta1/pom.xml index 07371f87313a..5f8764f2b140 100644 --- a/java-talent/proto-google-cloud-talent-v4beta1/pom.xml +++ b/java-talent/proto-google-cloud-talent-v4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-talent-v4beta1 - 0.72.0 + 0.73.0 proto-google-cloud-talent-v4beta1 PROTO library for proto-google-cloud-talent-v4beta1 com.google.cloud google-cloud-talent-parent - 2.29.0 + 2.30.0 diff --git a/java-tasks/CHANGELOG.md b/java-tasks/CHANGELOG.md index 90c886726fcc..9eaf71e2fb20 100644 --- a/java-tasks/CHANGELOG.md +++ b/java-tasks/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-tasks/README.md b/java-tasks/README.md index dc7d2ff9f054..8d3b740d3463 100644 --- a/java-tasks/README.md +++ b/java-tasks/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-tasks - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-tasks:2.28.0' +implementation 'com.google.cloud:google-cloud-tasks:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-tasks" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-tasks" % "2.29.0" ``` diff --git a/java-tasks/google-cloud-tasks-bom/pom.xml b/java-tasks/google-cloud-tasks-bom/pom.xml index afffeb1eac94..c8bdd6ea0fb9 100644 --- a/java-tasks/google-cloud-tasks-bom/pom.xml +++ b/java-tasks/google-cloud-tasks-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-tasks-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,37 +23,37 @@ com.google.cloud google-cloud-tasks - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta3 - 0.118.0 + 0.119.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta2 - 0.118.0 + 0.119.0 com.google.api.grpc grpc-google-cloud-tasks-v2 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-tasks-v2beta3 - 0.118.0 + 0.119.0 com.google.api.grpc proto-google-cloud-tasks-v2beta2 - 0.118.0 + 0.119.0 com.google.api.grpc proto-google-cloud-tasks-v2 - 2.28.0 + 2.29.0 diff --git a/java-tasks/google-cloud-tasks/pom.xml b/java-tasks/google-cloud-tasks/pom.xml index cc9651fead3b..825e18e6023e 100644 --- a/java-tasks/google-cloud-tasks/pom.xml +++ b/java-tasks/google-cloud-tasks/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-tasks - 2.28.0 + 2.29.0 jar Google Cloud Tasks Java idiomatic client for Google Cloud Tasks com.google.cloud google-cloud-tasks-parent - 2.28.0 + 2.29.0 google-cloud-tasks diff --git a/java-tasks/grpc-google-cloud-tasks-v2/pom.xml b/java-tasks/grpc-google-cloud-tasks-v2/pom.xml index 4c3a4947a353..a59b24c7612e 100644 --- a/java-tasks/grpc-google-cloud-tasks-v2/pom.xml +++ b/java-tasks/grpc-google-cloud-tasks-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-tasks-v2 - 2.28.0 + 2.29.0 grpc-google-cloud-tasks-v2 GRPC library for grpc-google-cloud-tasks-v2 com.google.cloud google-cloud-tasks-parent - 2.28.0 + 2.29.0 diff --git a/java-tasks/grpc-google-cloud-tasks-v2beta2/pom.xml b/java-tasks/grpc-google-cloud-tasks-v2beta2/pom.xml index 84e887fd60db..e6262fdda391 100644 --- a/java-tasks/grpc-google-cloud-tasks-v2beta2/pom.xml +++ b/java-tasks/grpc-google-cloud-tasks-v2beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta2 - 0.118.0 + 0.119.0 grpc-google-cloud-tasks-v2beta2 GRPC library for grpc-google-cloud-tasks-v2beta2 com.google.cloud google-cloud-tasks-parent - 2.28.0 + 2.29.0 diff --git a/java-tasks/grpc-google-cloud-tasks-v2beta3/pom.xml b/java-tasks/grpc-google-cloud-tasks-v2beta3/pom.xml index fb4187288632..54c123e47a74 100644 --- a/java-tasks/grpc-google-cloud-tasks-v2beta3/pom.xml +++ b/java-tasks/grpc-google-cloud-tasks-v2beta3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta3 - 0.118.0 + 0.119.0 grpc-google-cloud-tasks-v2beta3 GRPC library for grpc-google-cloud-tasks-v2beta3 com.google.cloud google-cloud-tasks-parent - 2.28.0 + 2.29.0 diff --git a/java-tasks/pom.xml b/java-tasks/pom.xml index 8ab23b556738..16896d6a1bb3 100644 --- a/java-tasks/pom.xml +++ b/java-tasks/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-tasks-parent pom - 2.28.0 + 2.29.0 Google Cloud Tasks Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.api.grpc proto-google-cloud-tasks-v2beta3 - 0.118.0 + 0.119.0 com.google.api.grpc proto-google-cloud-tasks-v2beta2 - 0.118.0 + 0.119.0 com.google.api.grpc proto-google-cloud-tasks-v2 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta3 - 0.118.0 + 0.119.0 com.google.api.grpc grpc-google-cloud-tasks-v2beta2 - 0.118.0 + 0.119.0 com.google.api.grpc grpc-google-cloud-tasks-v2 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-tasks - 2.28.0 + 2.29.0 diff --git a/java-tasks/proto-google-cloud-tasks-v2/pom.xml b/java-tasks/proto-google-cloud-tasks-v2/pom.xml index 7eb8280550a0..4df54470fd8e 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/pom.xml +++ b/java-tasks/proto-google-cloud-tasks-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-tasks-v2 - 2.28.0 + 2.29.0 proto-google-cloud-tasks-v2 PROTO library for proto-google-cloud-tasks-v2 com.google.cloud google-cloud-tasks-parent - 2.28.0 + 2.29.0 diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/pom.xml b/java-tasks/proto-google-cloud-tasks-v2beta2/pom.xml index 534ecddb721a..696a03d51550 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/pom.xml +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-tasks-v2beta2 - 0.118.0 + 0.119.0 proto-google-cloud-tasks-v2beta2 PROTO library for proto-google-cloud-tasks-v2beta2 com.google.cloud google-cloud-tasks-parent - 2.28.0 + 2.29.0 diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/pom.xml b/java-tasks/proto-google-cloud-tasks-v2beta3/pom.xml index e4883ae90391..81c1ced5b070 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/pom.xml +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-tasks-v2beta3 - 0.118.0 + 0.119.0 proto-google-cloud-tasks-v2beta3 PROTO library for proto-google-cloud-tasks-v2beta3 com.google.cloud google-cloud-tasks-parent - 2.28.0 + 2.29.0 diff --git a/java-texttospeech/CHANGELOG.md b/java-texttospeech/CHANGELOG.md index 7703b3664a9a..9ceb6387ec1f 100644 --- a/java-texttospeech/CHANGELOG.md +++ b/java-texttospeech/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-texttospeech/README.md b/java-texttospeech/README.md index b60535ea182b..cd8f2c30071a 100644 --- a/java-texttospeech/README.md +++ b/java-texttospeech/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-texttospeech - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-texttospeech:2.29.0' +implementation 'com.google.cloud:google-cloud-texttospeech:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-texttospeech" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-texttospeech" % "2.30.0" ``` diff --git a/java-texttospeech/google-cloud-texttospeech-bom/pom.xml b/java-texttospeech/google-cloud-texttospeech-bom/pom.xml index 90d6e847b355..ad169e09a031 100644 --- a/java-texttospeech/google-cloud-texttospeech-bom/pom.xml +++ b/java-texttospeech/google-cloud-texttospeech-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-texttospeech-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-texttospeech - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1beta1 - 0.118.0 + 0.119.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-texttospeech-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-texttospeech-v1beta1 - 0.118.0 + 0.119.0 diff --git a/java-texttospeech/google-cloud-texttospeech/pom.xml b/java-texttospeech/google-cloud-texttospeech/pom.xml index 9dc9aa547a45..3f1e69c3be43 100644 --- a/java-texttospeech/google-cloud-texttospeech/pom.xml +++ b/java-texttospeech/google-cloud-texttospeech/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-texttospeech - 2.29.0 + 2.30.0 jar Google Cloud Text-to-Speech Java idiomatic client for Google Cloud Text-to-Speech com.google.cloud google-cloud-texttospeech-parent - 2.29.0 + 2.30.0 google-cloud-texttospeech diff --git a/java-texttospeech/grpc-google-cloud-texttospeech-v1/pom.xml b/java-texttospeech/grpc-google-cloud-texttospeech-v1/pom.xml index 22a146c86391..b73f0a9ddfae 100644 --- a/java-texttospeech/grpc-google-cloud-texttospeech-v1/pom.xml +++ b/java-texttospeech/grpc-google-cloud-texttospeech-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-texttospeech-v1 GRPC library for grpc-google-cloud-texttospeech-v1 com.google.cloud google-cloud-texttospeech-parent - 2.29.0 + 2.30.0 diff --git a/java-texttospeech/grpc-google-cloud-texttospeech-v1beta1/pom.xml b/java-texttospeech/grpc-google-cloud-texttospeech-v1beta1/pom.xml index ee16969234aa..9cd203cacd40 100644 --- a/java-texttospeech/grpc-google-cloud-texttospeech-v1beta1/pom.xml +++ b/java-texttospeech/grpc-google-cloud-texttospeech-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1beta1 - 0.118.0 + 0.119.0 grpc-google-cloud-texttospeech-v1beta1 GRPC library for grpc-google-cloud-texttospeech-v1beta1 com.google.cloud google-cloud-texttospeech-parent - 2.29.0 + 2.30.0 diff --git a/java-texttospeech/pom.xml b/java-texttospeech/pom.xml index 203501ff7822..573cfcab52e3 100644 --- a/java-texttospeech/pom.xml +++ b/java-texttospeech/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-texttospeech-parent pom - 2.29.0 + 2.30.0 Google Cloud Text-to-Speech Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-texttospeech-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-texttospeech-v1beta1 - 0.118.0 + 0.119.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1beta1 - 0.118.0 + 0.119.0 com.google.api.grpc grpc-google-cloud-texttospeech-v1 - 2.29.0 + 2.30.0 com.google.cloud google-cloud-texttospeech - 2.29.0 + 2.30.0 diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1/pom.xml b/java-texttospeech/proto-google-cloud-texttospeech-v1/pom.xml index f1ccddf2c10e..8fa9aa21b9e1 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1/pom.xml +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-texttospeech-v1 - 2.29.0 + 2.30.0 proto-google-cloud-texttospeech-v1 PROTO library for proto-google-cloud-texttospeech-v1 com.google.cloud google-cloud-texttospeech-parent - 2.29.0 + 2.30.0 diff --git a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/pom.xml b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/pom.xml index 3c80fdf01765..b2e12527375c 100644 --- a/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/pom.xml +++ b/java-texttospeech/proto-google-cloud-texttospeech-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-texttospeech-v1beta1 - 0.118.0 + 0.119.0 proto-google-cloud-texttospeech-v1beta1 PROTO library for proto-google-cloud-texttospeech-v1beta1 com.google.cloud google-cloud-texttospeech-parent - 2.29.0 + 2.30.0 diff --git a/java-tpu/CHANGELOG.md b/java-tpu/CHANGELOG.md index c7ba443f0864..3b3ef8e2f04b 100644 --- a/java-tpu/CHANGELOG.md +++ b/java-tpu/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-tpu/README.md b/java-tpu/README.md index 371710d73526..da7a99a3f33a 100644 --- a/java-tpu/README.md +++ b/java-tpu/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-tpu - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-tpu:2.29.0' +implementation 'com.google.cloud:google-cloud-tpu:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-tpu" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-tpu" % "2.30.0" ``` diff --git a/java-tpu/google-cloud-tpu-bom/pom.xml b/java-tpu/google-cloud-tpu-bom/pom.xml index ca5a71c37003..ef1ea13a5578 100644 --- a/java-tpu/google-cloud-tpu-bom/pom.xml +++ b/java-tpu/google-cloud-tpu-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-tpu-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,37 +27,37 @@ com.google.cloud google-cloud-tpu - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-tpu-v1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-tpu-v2alpha1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-tpu-v2 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-tpu-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-tpu-v2alpha1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-tpu-v2 - 2.29.0 + 2.30.0 diff --git a/java-tpu/google-cloud-tpu/pom.xml b/java-tpu/google-cloud-tpu/pom.xml index cdb9ee306186..029d7fbffabe 100644 --- a/java-tpu/google-cloud-tpu/pom.xml +++ b/java-tpu/google-cloud-tpu/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-tpu - 2.29.0 + 2.30.0 jar Google Cloud TPU Cloud TPU are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. com.google.cloud google-cloud-tpu-parent - 2.29.0 + 2.30.0 google-cloud-tpu diff --git a/java-tpu/grpc-google-cloud-tpu-v1/pom.xml b/java-tpu/grpc-google-cloud-tpu-v1/pom.xml index fed0b105e304..d160da861dad 100644 --- a/java-tpu/grpc-google-cloud-tpu-v1/pom.xml +++ b/java-tpu/grpc-google-cloud-tpu-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-tpu-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-tpu-v1 GRPC library for google-cloud-tpu com.google.cloud google-cloud-tpu-parent - 2.29.0 + 2.30.0 diff --git a/java-tpu/grpc-google-cloud-tpu-v2/pom.xml b/java-tpu/grpc-google-cloud-tpu-v2/pom.xml index f401ca03df2e..6c7a713cd571 100644 --- a/java-tpu/grpc-google-cloud-tpu-v2/pom.xml +++ b/java-tpu/grpc-google-cloud-tpu-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-tpu-v2 - 2.29.0 + 2.30.0 grpc-google-cloud-tpu-v2 GRPC library for google-cloud-tpu com.google.cloud google-cloud-tpu-parent - 2.29.0 + 2.30.0 diff --git a/java-tpu/grpc-google-cloud-tpu-v2alpha1/pom.xml b/java-tpu/grpc-google-cloud-tpu-v2alpha1/pom.xml index 1893be48ecc2..037bd47a9626 100644 --- a/java-tpu/grpc-google-cloud-tpu-v2alpha1/pom.xml +++ b/java-tpu/grpc-google-cloud-tpu-v2alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-tpu-v2alpha1 - 2.29.0 + 2.30.0 grpc-google-cloud-tpu-v2alpha1 GRPC library for google-cloud-tpu com.google.cloud google-cloud-tpu-parent - 2.29.0 + 2.30.0 diff --git a/java-tpu/pom.xml b/java-tpu/pom.xml index 850d6536703f..256307a51a36 100644 --- a/java-tpu/pom.xml +++ b/java-tpu/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-tpu-parent pom - 2.29.0 + 2.30.0 Google Cloud TPU Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.cloud google-cloud-tpu - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-tpu-v2 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-tpu-v2 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-tpu-v2alpha1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-tpu-v2alpha1 - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-tpu-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-tpu-v1 - 2.29.0 + 2.30.0 diff --git a/java-tpu/proto-google-cloud-tpu-v1/pom.xml b/java-tpu/proto-google-cloud-tpu-v1/pom.xml index 90f19728f5d3..cc47f5a5a8da 100644 --- a/java-tpu/proto-google-cloud-tpu-v1/pom.xml +++ b/java-tpu/proto-google-cloud-tpu-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-tpu-v1 - 2.29.0 + 2.30.0 proto-google-cloud-tpu-v1 Proto library for google-cloud-tpu com.google.cloud google-cloud-tpu-parent - 2.29.0 + 2.30.0 diff --git a/java-tpu/proto-google-cloud-tpu-v2/pom.xml b/java-tpu/proto-google-cloud-tpu-v2/pom.xml index c2bd5918ab55..9989a94cce08 100644 --- a/java-tpu/proto-google-cloud-tpu-v2/pom.xml +++ b/java-tpu/proto-google-cloud-tpu-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-tpu-v2 - 2.29.0 + 2.30.0 proto-google-cloud-tpu-v2 Proto library for google-cloud-tpu com.google.cloud google-cloud-tpu-parent - 2.29.0 + 2.30.0 diff --git a/java-tpu/proto-google-cloud-tpu-v2alpha1/pom.xml b/java-tpu/proto-google-cloud-tpu-v2alpha1/pom.xml index 77b134299a26..9c05036f5e85 100644 --- a/java-tpu/proto-google-cloud-tpu-v2alpha1/pom.xml +++ b/java-tpu/proto-google-cloud-tpu-v2alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-tpu-v2alpha1 - 2.29.0 + 2.30.0 proto-google-cloud-tpu-v2alpha1 Proto library for google-cloud-tpu com.google.cloud google-cloud-tpu-parent - 2.29.0 + 2.30.0 diff --git a/java-trace/CHANGELOG.md b/java-trace/CHANGELOG.md index 6f53c0acc71b..e1d642254335 100644 --- a/java-trace/CHANGELOG.md +++ b/java-trace/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-trace/README.md b/java-trace/README.md index 50c7b8eced49..75269b4b0709 100644 --- a/java-trace/README.md +++ b/java-trace/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-trace - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-trace:2.28.0' +implementation 'com.google.cloud:google-cloud-trace:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-trace" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-trace" % "2.29.0" ``` diff --git a/java-trace/google-cloud-trace-bom/pom.xml b/java-trace/google-cloud-trace-bom/pom.xml index 373e08cecd5c..45f85a1a3cec 100644 --- a/java-trace/google-cloud-trace-bom/pom.xml +++ b/java-trace/google-cloud-trace-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-trace-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-trace - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-trace-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-trace-v2 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-trace-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-trace-v2 - 2.28.0 + 2.29.0 diff --git a/java-trace/google-cloud-trace/pom.xml b/java-trace/google-cloud-trace/pom.xml index 26f639744321..63a15426e48a 100644 --- a/java-trace/google-cloud-trace/pom.xml +++ b/java-trace/google-cloud-trace/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-trace - 2.28.0 + 2.29.0 jar Google Cloud Trace @@ -12,7 +12,7 @@ com.google.cloud google-cloud-trace-parent - 2.28.0 + 2.29.0 google-cloud-trace diff --git a/java-trace/grpc-google-cloud-trace-v1/pom.xml b/java-trace/grpc-google-cloud-trace-v1/pom.xml index 800c775a21bb..a70fad3df6d9 100644 --- a/java-trace/grpc-google-cloud-trace-v1/pom.xml +++ b/java-trace/grpc-google-cloud-trace-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-trace-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-trace-v1 GRPC library for grpc-google-cloud-trace-v1 com.google.cloud google-cloud-trace-parent - 2.28.0 + 2.29.0 diff --git a/java-trace/grpc-google-cloud-trace-v2/pom.xml b/java-trace/grpc-google-cloud-trace-v2/pom.xml index eab64b4d4dce..572afc0a158d 100644 --- a/java-trace/grpc-google-cloud-trace-v2/pom.xml +++ b/java-trace/grpc-google-cloud-trace-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-trace-v2 - 2.28.0 + 2.29.0 grpc-google-cloud-trace-v2 GRPC library for grpc-google-cloud-trace-v2 com.google.cloud google-cloud-trace-parent - 2.28.0 + 2.29.0 diff --git a/java-trace/pom.xml b/java-trace/pom.xml index 21293af89acc..181183849011 100644 --- a/java-trace/pom.xml +++ b/java-trace/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-trace-parent pom - 2.28.0 + 2.29.0 Google Cloud Trace Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-trace-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-trace - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-trace-v2 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-trace-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-trace-v2 - 2.28.0 + 2.29.0 diff --git a/java-trace/proto-google-cloud-trace-v1/pom.xml b/java-trace/proto-google-cloud-trace-v1/pom.xml index 58a91db25747..a26b16162fe0 100644 --- a/java-trace/proto-google-cloud-trace-v1/pom.xml +++ b/java-trace/proto-google-cloud-trace-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-trace-v1 - 2.28.0 + 2.29.0 proto-google-cloud-trace-v1 PROTO library for proto-google-cloud-trace-v1 com.google.cloud google-cloud-trace-parent - 2.28.0 + 2.29.0 diff --git a/java-trace/proto-google-cloud-trace-v2/pom.xml b/java-trace/proto-google-cloud-trace-v2/pom.xml index 930ac9042b14..8f192194c853 100644 --- a/java-trace/proto-google-cloud-trace-v2/pom.xml +++ b/java-trace/proto-google-cloud-trace-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-trace-v2 - 2.28.0 + 2.29.0 proto-google-cloud-trace-v2 PROTO library for proto-google-cloud-trace-v2 com.google.cloud google-cloud-trace-parent - 2.28.0 + 2.29.0 diff --git a/java-translate/CHANGELOG.md b/java-translate/CHANGELOG.md index 3f458024a1f9..fc5bdbf8f41a 100644 --- a/java-translate/CHANGELOG.md +++ b/java-translate/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-translate/README.md b/java-translate/README.md index 0e498490cd7a..6bf0a66842e0 100644 --- a/java-translate/README.md +++ b/java-translate/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-translate - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-translate:2.28.0' +implementation 'com.google.cloud:google-cloud-translate:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.29.0" ``` diff --git a/java-translate/google-cloud-translate-bom/pom.xml b/java-translate/google-cloud-translate-bom/pom.xml index fbc71e333134..e795c7155319 100644 --- a/java-translate/google-cloud-translate-bom/pom.xml +++ b/java-translate/google-cloud-translate-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-translate-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-translate - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-translate-v3beta1 - 0.110.0 + 0.111.0 com.google.api.grpc grpc-google-cloud-translate-v3 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-translate-v3beta1 - 0.110.0 + 0.111.0 com.google.api.grpc proto-google-cloud-translate-v3 - 2.28.0 + 2.29.0 diff --git a/java-translate/google-cloud-translate/pom.xml b/java-translate/google-cloud-translate/pom.xml index 39f70769ddd4..b9166c999db6 100644 --- a/java-translate/google-cloud-translate/pom.xml +++ b/java-translate/google-cloud-translate/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-translate - 2.28.0 + 2.29.0 jar Google Cloud Translate Java idiomatic client for Google Cloud Translate com.google.cloud google-cloud-translate-parent - 2.28.0 + 2.29.0 google-cloud-translate diff --git a/java-translate/grpc-google-cloud-translate-v3/pom.xml b/java-translate/grpc-google-cloud-translate-v3/pom.xml index aa39ddbf289c..c5bf275810c3 100644 --- a/java-translate/grpc-google-cloud-translate-v3/pom.xml +++ b/java-translate/grpc-google-cloud-translate-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-translate-v3 - 2.28.0 + 2.29.0 grpc-google-cloud-translate-v3 GRPC library for grpc-google-cloud-translate-v3 com.google.cloud google-cloud-translate-parent - 2.28.0 + 2.29.0 diff --git a/java-translate/grpc-google-cloud-translate-v3beta1/pom.xml b/java-translate/grpc-google-cloud-translate-v3beta1/pom.xml index 0e417a5eeb01..81748e92ee79 100644 --- a/java-translate/grpc-google-cloud-translate-v3beta1/pom.xml +++ b/java-translate/grpc-google-cloud-translate-v3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-translate-v3beta1 - 0.110.0 + 0.111.0 grpc-google-cloud-translate-v3beta1 GRPC library for grpc-google-cloud-translate-v3beta1 com.google.cloud google-cloud-translate-parent - 2.28.0 + 2.29.0 diff --git a/java-translate/pom.xml b/java-translate/pom.xml index 958172957e80..df68a936ec89 100644 --- a/java-translate/pom.xml +++ b/java-translate/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-translate-parent pom - 2.28.0 + 2.29.0 Google Cloud Translate Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-translate-v3beta1 - 0.110.0 + 0.111.0 com.google.api.grpc proto-google-cloud-translate-v3 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-translate-v3beta1 - 0.110.0 + 0.111.0 com.google.api.grpc grpc-google-cloud-translate-v3 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-translate - 2.28.0 + 2.29.0 diff --git a/java-translate/proto-google-cloud-translate-v3/pom.xml b/java-translate/proto-google-cloud-translate-v3/pom.xml index 3567738c2510..e2e63ade5e52 100644 --- a/java-translate/proto-google-cloud-translate-v3/pom.xml +++ b/java-translate/proto-google-cloud-translate-v3/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-translate-v3 - 2.28.0 + 2.29.0 proto-google-cloud-translate-v3 PROTO library for proto-google-cloud-translate-v3 com.google.cloud google-cloud-translate-parent - 2.28.0 + 2.29.0 diff --git a/java-translate/proto-google-cloud-translate-v3beta1/pom.xml b/java-translate/proto-google-cloud-translate-v3beta1/pom.xml index e33a18ed669f..7a6e808d85ab 100644 --- a/java-translate/proto-google-cloud-translate-v3beta1/pom.xml +++ b/java-translate/proto-google-cloud-translate-v3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-translate-v3beta1 - 0.110.0 + 0.111.0 proto-google-cloud-translate-v3beta1 PROTO library for proto-google-cloud-translate-v3beta1 com.google.cloud google-cloud-translate-parent - 2.28.0 + 2.29.0 diff --git a/java-video-intelligence/CHANGELOG.md b/java-video-intelligence/CHANGELOG.md index dcc1348af720..07a74156d380 100644 --- a/java-video-intelligence/CHANGELOG.md +++ b/java-video-intelligence/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.27.0 (2023-10-11) ### Dependencies diff --git a/java-video-intelligence/README.md b/java-video-intelligence/README.md index 66de8fbd98b1..fa7c8ad3bbd4 100644 --- a/java-video-intelligence/README.md +++ b/java-video-intelligence/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-video-intelligence - 2.27.0 + 2.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-video-intelligence:2.27.0' +implementation 'com.google.cloud:google-cloud-video-intelligence:2.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-video-intelligence" % "2.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-video-intelligence" % "2.28.0" ``` diff --git a/java-video-intelligence/google-cloud-video-intelligence-bom/pom.xml b/java-video-intelligence/google-cloud-video-intelligence-bom/pom.xml index 6bff367badce..3f7b8362fa93 100644 --- a/java-video-intelligence/google-cloud-video-intelligence-bom/pom.xml +++ b/java-video-intelligence/google-cloud-video-intelligence-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-video-intelligence-bom - 2.27.0 + 2.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,57 +23,57 @@ com.google.cloud google-cloud-video-intelligence - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p1beta1 - 0.117.0 + 0.118.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1beta2 - 0.117.0 + 0.118.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1 - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p2beta1 - 0.117.0 + 0.118.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p3beta1 - 0.117.0 + 0.118.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p3beta1 - 0.117.0 + 0.118.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1beta2 - 0.117.0 + 0.118.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p1beta1 - 0.117.0 + 0.118.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p2beta1 - 0.117.0 + 0.118.0 diff --git a/java-video-intelligence/google-cloud-video-intelligence/pom.xml b/java-video-intelligence/google-cloud-video-intelligence/pom.xml index e888d65117db..9b2b228ae7a1 100644 --- a/java-video-intelligence/google-cloud-video-intelligence/pom.xml +++ b/java-video-intelligence/google-cloud-video-intelligence/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-video-intelligence - 2.27.0 + 2.28.0 jar Google Cloud Video Intelligence Java idiomatic client for Google Cloud Video Intelligence com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 google-cloud-video-intelligence diff --git a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1/pom.xml b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1/pom.xml index 5e2afe4a5c51..0af9e6e36012 100644 --- a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1/pom.xml +++ b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1 - 2.27.0 + 2.28.0 grpc-google-cloud-video-intelligence-v1 GRPC library for grpc-google-cloud-video-intelligence-v1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1beta2/pom.xml b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1beta2/pom.xml index 3d6f0aea5381..e12512126d83 100644 --- a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1beta2/pom.xml +++ b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1beta2 - 0.117.0 + 0.118.0 grpc-google-cloud-video-intelligence-v1beta2 GRPC library for grpc-google-cloud-video-intelligence-v1beta2 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml index 34165a439c59..f72d0b066a94 100644 --- a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml +++ b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p1beta1 - 0.117.0 + 0.118.0 grpc-google-cloud-video-intelligence-v1p1beta1 GRPC library for grpc-google-cloud-video-intelligence-v1p1beta1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml index 9f4d9431a2b9..c05c733f8a87 100644 --- a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml +++ b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p2beta1 - 0.117.0 + 0.118.0 grpc-google-cloud-video-intelligence-v1p2beta1 GRPC library for grpc-google-cloud-video-intelligence-v1p2beta1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml index 056eedeff115..ea08e4553f85 100644 --- a/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml +++ b/java-video-intelligence/grpc-google-cloud-video-intelligence-v1p3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p3beta1 - 0.117.0 + 0.118.0 grpc-google-cloud-video-intelligence-v1p3beta1 GRPC library for grpc-google-cloud-video-intelligence-v1p3beta1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/pom.xml b/java-video-intelligence/pom.xml index d2c2113f7850..b03a7608242e 100644 --- a/java-video-intelligence/pom.xml +++ b/java-video-intelligence/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-video-intelligence-parent pom - 2.27.0 + 2.28.0 Google Cloud Video Intelligence Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,57 +29,57 @@ com.google.api.grpc proto-google-cloud-video-intelligence-v1p3beta1 - 0.117.0 + 0.118.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1beta2 - 0.117.0 + 0.118.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p1beta1 - 0.117.0 + 0.118.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p2beta1 - 0.117.0 + 0.118.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p1beta1 - 0.117.0 + 0.118.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1beta2 - 0.117.0 + 0.118.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1 - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p2beta1 - 0.117.0 + 0.118.0 com.google.api.grpc grpc-google-cloud-video-intelligence-v1p3beta1 - 0.117.0 + 0.118.0 com.google.cloud google-cloud-video-intelligence - 2.27.0 + 2.28.0 com.google.cloud diff --git a/java-video-intelligence/proto-google-cloud-video-intelligence-v1/pom.xml b/java-video-intelligence/proto-google-cloud-video-intelligence-v1/pom.xml index 2062ad12e96e..2084eb1d5bda 100644 --- a/java-video-intelligence/proto-google-cloud-video-intelligence-v1/pom.xml +++ b/java-video-intelligence/proto-google-cloud-video-intelligence-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1 - 2.27.0 + 2.28.0 proto-google-cloud-video-intelligence-v1 PROTO library for proto-google-cloud-video-intelligence-v1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/proto-google-cloud-video-intelligence-v1beta2/pom.xml b/java-video-intelligence/proto-google-cloud-video-intelligence-v1beta2/pom.xml index 76fbf2e81148..7209c52d2c3a 100644 --- a/java-video-intelligence/proto-google-cloud-video-intelligence-v1beta2/pom.xml +++ b/java-video-intelligence/proto-google-cloud-video-intelligence-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1beta2 - 0.117.0 + 0.118.0 proto-google-cloud-video-intelligence-v1beta2 PROTO library for proto-google-cloud-video-intelligence-v1beta2 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml b/java-video-intelligence/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml index a0da7d90cd9d..84fc67c29dc1 100644 --- a/java-video-intelligence/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml +++ b/java-video-intelligence/proto-google-cloud-video-intelligence-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p1beta1 - 0.117.0 + 0.118.0 proto-google-cloud-video-intelligence-v1p1beta1 PROTO library for proto-google-cloud-video-intelligence-v1p1beta1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml b/java-video-intelligence/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml index bd9ea3a2c476..dbb5f40272de 100644 --- a/java-video-intelligence/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml +++ b/java-video-intelligence/proto-google-cloud-video-intelligence-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p2beta1 - 0.117.0 + 0.118.0 proto-google-cloud-video-intelligence-v1p2beta1 PROTO library for proto-google-cloud-video-intelligence-v1p2beta1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-intelligence/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml b/java-video-intelligence/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml index 8eedf1933766..4e05d394a7f8 100644 --- a/java-video-intelligence/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml +++ b/java-video-intelligence/proto-google-cloud-video-intelligence-v1p3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-intelligence-v1p3beta1 - 0.117.0 + 0.118.0 proto-google-cloud-video-intelligence-v1p3beta1 PROTO library for proto-google-cloud-video-intelligence-v1p3beta1 com.google.cloud google-cloud-video-intelligence-parent - 2.27.0 + 2.28.0 diff --git a/java-video-live-stream/CHANGELOG.md b/java-video-live-stream/CHANGELOG.md index d783be93f69a..450dfde268a9 100644 --- a/java-video-live-stream/CHANGELOG.md +++ b/java-video-live-stream/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.31.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.30.0 (2023-10-11) ### Dependencies diff --git a/java-video-live-stream/README.md b/java-video-live-stream/README.md index 386a26807e13..846f2ac97ef5 100644 --- a/java-video-live-stream/README.md +++ b/java-video-live-stream/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-live-stream - 0.30.0 + 0.31.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-live-stream:0.30.0' +implementation 'com.google.cloud:google-cloud-live-stream:0.31.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-live-stream" % "0.30.0" +libraryDependencies += "com.google.cloud" % "google-cloud-live-stream" % "0.31.0" ``` diff --git a/java-video-live-stream/google-cloud-live-stream-bom/pom.xml b/java-video-live-stream/google-cloud-live-stream-bom/pom.xml index 7b4f453e2b53..a36b4263d348 100644 --- a/java-video-live-stream/google-cloud-live-stream-bom/pom.xml +++ b/java-video-live-stream/google-cloud-live-stream-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-live-stream-bom - 0.30.0 + 0.31.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-live-stream - 0.30.0 + 0.31.0 com.google.api.grpc grpc-google-cloud-live-stream-v1 - 0.30.0 + 0.31.0 com.google.api.grpc proto-google-cloud-live-stream-v1 - 0.30.0 + 0.31.0 diff --git a/java-video-live-stream/google-cloud-live-stream/pom.xml b/java-video-live-stream/google-cloud-live-stream/pom.xml index fefdbb06d5fc..5d5ef51faab9 100644 --- a/java-video-live-stream/google-cloud-live-stream/pom.xml +++ b/java-video-live-stream/google-cloud-live-stream/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-live-stream - 0.30.0 + 0.31.0 jar Google Cloud Live Stream Cloud Live Stream transcodes mezzanine live signals into direct-to-consumer streaming formats, including Dynamic Adaptive Streaming over HTTP (DASH/MPEG-DASH), and HTTP Live Streaming (HLS), for multiple device platforms. com.google.cloud google-cloud-live-stream-parent - 0.30.0 + 0.31.0 google-cloud-live-stream diff --git a/java-video-live-stream/grpc-google-cloud-live-stream-v1/pom.xml b/java-video-live-stream/grpc-google-cloud-live-stream-v1/pom.xml index 5acf115011c4..f7b005eaeb19 100644 --- a/java-video-live-stream/grpc-google-cloud-live-stream-v1/pom.xml +++ b/java-video-live-stream/grpc-google-cloud-live-stream-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-live-stream-v1 - 0.30.0 + 0.31.0 grpc-google-cloud-live-stream-v1 GRPC library for google-cloud-live-stream com.google.cloud google-cloud-live-stream-parent - 0.30.0 + 0.31.0 diff --git a/java-video-live-stream/pom.xml b/java-video-live-stream/pom.xml index b28052011113..3d1b795f0ec6 100644 --- a/java-video-live-stream/pom.xml +++ b/java-video-live-stream/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-live-stream-parent pom - 0.30.0 + 0.31.0 Google Cloud Live Stream Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-live-stream - 0.30.0 + 0.31.0 com.google.api.grpc grpc-google-cloud-live-stream-v1 - 0.30.0 + 0.31.0 com.google.api.grpc proto-google-cloud-live-stream-v1 - 0.30.0 + 0.31.0 diff --git a/java-video-live-stream/proto-google-cloud-live-stream-v1/pom.xml b/java-video-live-stream/proto-google-cloud-live-stream-v1/pom.xml index e866fdb85835..2edf89984915 100644 --- a/java-video-live-stream/proto-google-cloud-live-stream-v1/pom.xml +++ b/java-video-live-stream/proto-google-cloud-live-stream-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-live-stream-v1 - 0.30.0 + 0.31.0 proto-google-cloud-live-stream-v1 Proto library for google-cloud-live-stream com.google.cloud google-cloud-live-stream-parent - 0.30.0 + 0.31.0 diff --git a/java-video-stitcher/CHANGELOG.md b/java-video-stitcher/CHANGELOG.md index 1bee9d41960e..3b2316b17234 100644 --- a/java-video-stitcher/CHANGELOG.md +++ b/java-video-stitcher/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.28.0 (2023-10-11) ### Dependencies diff --git a/java-video-stitcher/README.md b/java-video-stitcher/README.md index bb93a0d89fe8..9b813f5b9b6d 100644 --- a/java-video-stitcher/README.md +++ b/java-video-stitcher/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-video-stitcher - 0.28.0 + 0.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-video-stitcher:0.28.0' +implementation 'com.google.cloud:google-cloud-video-stitcher:0.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-video-stitcher" % "0.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-video-stitcher" % "0.29.0" ``` diff --git a/java-video-stitcher/google-cloud-video-stitcher-bom/pom.xml b/java-video-stitcher/google-cloud-video-stitcher-bom/pom.xml index eb814d1a2c8f..97c66a91a685 100644 --- a/java-video-stitcher/google-cloud-video-stitcher-bom/pom.xml +++ b/java-video-stitcher/google-cloud-video-stitcher-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-video-stitcher-bom - 0.28.0 + 0.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-video-stitcher - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-video-stitcher-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-video-stitcher-v1 - 0.28.0 + 0.29.0 diff --git a/java-video-stitcher/google-cloud-video-stitcher/pom.xml b/java-video-stitcher/google-cloud-video-stitcher/pom.xml index 12c67031dd21..6884b6c2d6ba 100644 --- a/java-video-stitcher/google-cloud-video-stitcher/pom.xml +++ b/java-video-stitcher/google-cloud-video-stitcher/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-video-stitcher - 0.28.0 + 0.29.0 jar Google Video Stitcher API Video Stitcher API allows you to manipulate video content to dynamically insert ads prior to delivery to client devices. com.google.cloud google-cloud-video-stitcher-parent - 0.28.0 + 0.29.0 google-cloud-video-stitcher diff --git a/java-video-stitcher/grpc-google-cloud-video-stitcher-v1/pom.xml b/java-video-stitcher/grpc-google-cloud-video-stitcher-v1/pom.xml index 71a74027f736..928e1e71953b 100644 --- a/java-video-stitcher/grpc-google-cloud-video-stitcher-v1/pom.xml +++ b/java-video-stitcher/grpc-google-cloud-video-stitcher-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-stitcher-v1 - 0.28.0 + 0.29.0 grpc-google-cloud-video-stitcher-v1 GRPC library for google-cloud-video-stitcher com.google.cloud google-cloud-video-stitcher-parent - 0.28.0 + 0.29.0 diff --git a/java-video-stitcher/pom.xml b/java-video-stitcher/pom.xml index c3f7acdccc17..0df87ab03579 100644 --- a/java-video-stitcher/pom.xml +++ b/java-video-stitcher/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-video-stitcher-parent pom - 0.28.0 + 0.29.0 Google Video Stitcher API Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-video-stitcher - 0.28.0 + 0.29.0 com.google.api.grpc grpc-google-cloud-video-stitcher-v1 - 0.28.0 + 0.29.0 com.google.api.grpc proto-google-cloud-video-stitcher-v1 - 0.28.0 + 0.29.0 diff --git a/java-video-stitcher/proto-google-cloud-video-stitcher-v1/pom.xml b/java-video-stitcher/proto-google-cloud-video-stitcher-v1/pom.xml index 675b3a7dcd9f..2198146e0c84 100644 --- a/java-video-stitcher/proto-google-cloud-video-stitcher-v1/pom.xml +++ b/java-video-stitcher/proto-google-cloud-video-stitcher-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-stitcher-v1 - 0.28.0 + 0.29.0 proto-google-cloud-video-stitcher-v1 Proto library for google-cloud-video-stitcher com.google.cloud google-cloud-video-stitcher-parent - 0.28.0 + 0.29.0 diff --git a/java-video-transcoder/CHANGELOG.md b/java-video-transcoder/CHANGELOG.md index 3650ecfe80b3..4a8df2f627fb 100644 --- a/java-video-transcoder/CHANGELOG.md +++ b/java-video-transcoder/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.27.0 (2023-10-11) ### Dependencies diff --git a/java-video-transcoder/README.md b/java-video-transcoder/README.md index 2e03139defe8..3eb76e57e64c 100644 --- a/java-video-transcoder/README.md +++ b/java-video-transcoder/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-video-transcoder - 1.27.0 + 1.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-video-transcoder:1.27.0' +implementation 'com.google.cloud:google-cloud-video-transcoder:1.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-video-transcoder" % "1.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-video-transcoder" % "1.28.0" ``` diff --git a/java-video-transcoder/google-cloud-video-transcoder-bom/pom.xml b/java-video-transcoder/google-cloud-video-transcoder-bom/pom.xml index bd9f9a98b63a..c8fb66794e5d 100644 --- a/java-video-transcoder/google-cloud-video-transcoder-bom/pom.xml +++ b/java-video-transcoder/google-cloud-video-transcoder-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-video-transcoder-bom - 1.27.0 + 1.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-video-transcoder - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.27.0 + 1.28.0 diff --git a/java-video-transcoder/google-cloud-video-transcoder/pom.xml b/java-video-transcoder/google-cloud-video-transcoder/pom.xml index 1e95071d0dfa..2b1dbe3c301e 100644 --- a/java-video-transcoder/google-cloud-video-transcoder/pom.xml +++ b/java-video-transcoder/google-cloud-video-transcoder/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-video-transcoder - 1.27.0 + 1.28.0 jar Google Video Transcoder allows you to transcode videos into a variety of formats. The Transcoder API benefits broadcasters, production companies, businesses, and individuals looking to transform their video content for use across a variety of user devices. com.google.cloud google-cloud-video-transcoder-parent - 1.27.0 + 1.28.0 google-cloud-video-transcoder diff --git a/java-video-transcoder/grpc-google-cloud-video-transcoder-v1/pom.xml b/java-video-transcoder/grpc-google-cloud-video-transcoder-v1/pom.xml index a526301f27d2..28cc68283312 100644 --- a/java-video-transcoder/grpc-google-cloud-video-transcoder-v1/pom.xml +++ b/java-video-transcoder/grpc-google-cloud-video-transcoder-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.27.0 + 1.28.0 grpc-google-cloud-video-transcoder-v1 GRPC library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 1.27.0 + 1.28.0 diff --git a/java-video-transcoder/pom.xml b/java-video-transcoder/pom.xml index cb4edc72d99a..641b985065b5 100644 --- a/java-video-transcoder/pom.xml +++ b/java-video-transcoder/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-video-transcoder-parent pom - 1.27.0 + 1.28.0 Google Video Transcoder Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-video-transcoder - 1.27.0 + 1.28.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.27.0 + 1.28.0 com.google.api.grpc grpc-google-cloud-video-transcoder-v1 - 1.27.0 + 1.28.0 diff --git a/java-video-transcoder/proto-google-cloud-video-transcoder-v1/pom.xml b/java-video-transcoder/proto-google-cloud-video-transcoder-v1/pom.xml index d72a6fe32361..c860ee659628 100644 --- a/java-video-transcoder/proto-google-cloud-video-transcoder-v1/pom.xml +++ b/java-video-transcoder/proto-google-cloud-video-transcoder-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-video-transcoder-v1 - 1.27.0 + 1.28.0 proto-google-cloud-video-transcoder-v1 Proto library for google-cloud-video-transcoder com.google.cloud google-cloud-video-transcoder-parent - 1.27.0 + 1.28.0 diff --git a/java-vision/CHANGELOG.md b/java-vision/CHANGELOG.md index cb6eae7da608..4b3d0f340f34 100644 --- a/java-vision/CHANGELOG.md +++ b/java-vision/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.27.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 3.26.0 (2023-10-11) ### Dependencies diff --git a/java-vision/README.md b/java-vision/README.md index 0396cce79929..7c27c32c6027 100644 --- a/java-vision/README.md +++ b/java-vision/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.24.0 pom import @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-vision - 3.26.0 + 3.27.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-vision:3.26.0' +implementation 'com.google.cloud:google-cloud-vision:3.27.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "3.26.0" +libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "3.27.0" ``` diff --git a/java-vision/google-cloud-vision-bom/pom.xml b/java-vision/google-cloud-vision-bom/pom.xml index d6bc103fae09..cb6c086bc486 100644 --- a/java-vision/google-cloud-vision-bom/pom.xml +++ b/java-vision/google-cloud-vision-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-vision-bom - 3.26.0 + 3.27.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,57 +23,57 @@ com.google.cloud google-cloud-vision - 3.26.0 + 3.27.0 com.google.api.grpc grpc-google-cloud-vision-v1p3beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-vision-v1p1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-vision-v1p4beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-vision-v1p2beta1 - 3.26.0 + 3.27.0 com.google.api.grpc grpc-google-cloud-vision-v1 - 3.26.0 + 3.27.0 com.google.api.grpc proto-google-cloud-vision-v1p4beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-vision-v1 - 3.26.0 + 3.27.0 com.google.api.grpc proto-google-cloud-vision-v1p1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-vision-v1p3beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-vision-v1p2beta1 - 3.26.0 + 3.27.0 diff --git a/java-vision/google-cloud-vision/pom.xml b/java-vision/google-cloud-vision/pom.xml index 5aa0e260bd74..141a2854aca8 100644 --- a/java-vision/google-cloud-vision/pom.xml +++ b/java-vision/google-cloud-vision/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-vision - 3.26.0 + 3.27.0 jar Google Cloud Vision Java idiomatic client for Google Cloud Vision com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 google-cloud-vision diff --git a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java index 08d2c48b44ab..141ed836f460 100644 --- a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java +++ b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java @@ -292,7 +292,7 @@ public void detectFacesTest() throws IOException { AnnotateImageResponse res = requestAnnotatedImage("face_no_surprise.jpg", Type.FACE_DETECTION, false); for (FaceAnnotation annotation : assertNotEmpty(res, res.getFaceAnnotationsList())) { - assertEquals(Likelihood.LIKELY, annotation.getAngerLikelihood()); + assertThat(annotation.getAngerLikelihood()).isAnyOf(Likelihood.LIKELY, Likelihood.POSSIBLE); assertEquals(Likelihood.VERY_UNLIKELY, annotation.getJoyLikelihood()); assertEquals(Likelihood.LIKELY, annotation.getSurpriseLikelihood()); } @@ -303,7 +303,7 @@ public void detectFacesGcsTest() throws IOException { AnnotateImageResponse res = requestAnnotatedImage("face/face_no_surprise.jpg", Type.FACE_DETECTION, true); for (FaceAnnotation annotation : assertNotEmpty(res, res.getFaceAnnotationsList())) { - assertEquals(Likelihood.LIKELY, annotation.getAngerLikelihood()); + assertThat(annotation.getAngerLikelihood()).isAnyOf(Likelihood.LIKELY, Likelihood.POSSIBLE); assertEquals(Likelihood.VERY_UNLIKELY, annotation.getJoyLikelihood()); assertEquals(Likelihood.LIKELY, annotation.getSurpriseLikelihood()); } diff --git a/java-vision/grpc-google-cloud-vision-v1/pom.xml b/java-vision/grpc-google-cloud-vision-v1/pom.xml index 8f0cdd1e62e9..9d26e4da5001 100644 --- a/java-vision/grpc-google-cloud-vision-v1/pom.xml +++ b/java-vision/grpc-google-cloud-vision-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vision-v1 - 3.26.0 + 3.27.0 grpc-google-cloud-vision-v1 GRPC library for grpc-google-cloud-vision-v1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/grpc-google-cloud-vision-v1p1beta1/pom.xml b/java-vision/grpc-google-cloud-vision-v1p1beta1/pom.xml index 117dbe0b3c9f..782e825d4aa0 100644 --- a/java-vision/grpc-google-cloud-vision-v1p1beta1/pom.xml +++ b/java-vision/grpc-google-cloud-vision-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vision-v1p1beta1 - 0.115.0 + 0.116.0 grpc-google-cloud-vision-v1p1beta1 GRPC library for grpc-google-cloud-vision-v1p1beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/grpc-google-cloud-vision-v1p2beta1/pom.xml b/java-vision/grpc-google-cloud-vision-v1p2beta1/pom.xml index 8b430941b72f..7f55d6df0e1b 100644 --- a/java-vision/grpc-google-cloud-vision-v1p2beta1/pom.xml +++ b/java-vision/grpc-google-cloud-vision-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vision-v1p2beta1 - 3.26.0 + 3.27.0 grpc-google-cloud-vision-v1p2beta1 GRPC library for grpc-google-cloud-vision-v1p2beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/grpc-google-cloud-vision-v1p3beta1/pom.xml b/java-vision/grpc-google-cloud-vision-v1p3beta1/pom.xml index 961f8b3f697b..ef1f6e3635c2 100644 --- a/java-vision/grpc-google-cloud-vision-v1p3beta1/pom.xml +++ b/java-vision/grpc-google-cloud-vision-v1p3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vision-v1p3beta1 - 0.115.0 + 0.116.0 grpc-google-cloud-vision-v1p3beta1 GRPC library for grpc-google-cloud-vision-v1p3beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/grpc-google-cloud-vision-v1p4beta1/pom.xml b/java-vision/grpc-google-cloud-vision-v1p4beta1/pom.xml index a12846d39e0d..a059d4b4253d 100644 --- a/java-vision/grpc-google-cloud-vision-v1p4beta1/pom.xml +++ b/java-vision/grpc-google-cloud-vision-v1p4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vision-v1p4beta1 - 0.115.0 + 0.116.0 grpc-google-cloud-vision-v1p4beta1 GRPC library for grpc-google-cloud-vision-v1p4beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/pom.xml b/java-vision/pom.xml index 5acaefaf6dfd..0c00837030c7 100644 --- a/java-vision/pom.xml +++ b/java-vision/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-vision-parent pom - 3.26.0 + 3.27.0 Google Cloud Vision Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,57 +29,57 @@ com.google.api.grpc proto-google-cloud-vision-v1p4beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-vision-v1 - 3.26.0 + 3.27.0 com.google.api.grpc proto-google-cloud-vision-v1p1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-vision-v1p3beta1 - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-vision-v1p2beta1 - 3.26.0 + 3.27.0 com.google.api.grpc grpc-google-cloud-vision-v1p3beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-vision-v1p1beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-vision-v1p4beta1 - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-vision-v1p2beta1 - 3.26.0 + 3.27.0 com.google.api.grpc grpc-google-cloud-vision-v1 - 3.26.0 + 3.27.0 com.google.cloud google-cloud-vision - 3.26.0 + 3.27.0 diff --git a/java-vision/proto-google-cloud-vision-v1/pom.xml b/java-vision/proto-google-cloud-vision-v1/pom.xml index 151cbe2e3144..b05d5bdfc835 100644 --- a/java-vision/proto-google-cloud-vision-v1/pom.xml +++ b/java-vision/proto-google-cloud-vision-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vision-v1 - 3.26.0 + 3.27.0 proto-google-cloud-vision-v1 PROTO library for proto-google-cloud-vision-v1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/pom.xml b/java-vision/proto-google-cloud-vision-v1p1beta1/pom.xml index e39d2c70baa4..d6e20eb2ad12 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/pom.xml +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vision-v1p1beta1 - 0.115.0 + 0.116.0 proto-google-cloud-vision-v1p1beta1 PROTO library for proto-google-cloud-vision-v1p1beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/pom.xml b/java-vision/proto-google-cloud-vision-v1p2beta1/pom.xml index 0c784ffadcb9..954a8f1ff788 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/pom.xml +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vision-v1p2beta1 - 3.26.0 + 3.27.0 proto-google-cloud-vision-v1p2beta1 PROTO library for proto-google-cloud-vision-v1p2beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/pom.xml b/java-vision/proto-google-cloud-vision-v1p3beta1/pom.xml index 4f90c44f0f71..c90fbe24dbc3 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/pom.xml +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vision-v1p3beta1 - 0.115.0 + 0.116.0 proto-google-cloud-vision-v1p3beta1 PROTO library for proto-google-cloud-vision-v1p3beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/pom.xml b/java-vision/proto-google-cloud-vision-v1p4beta1/pom.xml index d06c1d8a174e..b4a60594a083 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/pom.xml +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vision-v1p4beta1 - 0.115.0 + 0.116.0 proto-google-cloud-vision-v1p4beta1 PROTO library for proto-google-cloud-vision-v1p4beta1 com.google.cloud google-cloud-vision-parent - 3.26.0 + 3.27.0 diff --git a/java-vmmigration/CHANGELOG.md b/java-vmmigration/CHANGELOG.md index 13b808b61624..fa13f567ad46 100644 --- a/java-vmmigration/CHANGELOG.md +++ b/java-vmmigration/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 1.28.0 (2023-10-11) ### Dependencies diff --git a/java-vmmigration/README.md b/java-vmmigration/README.md index 19bf7bd9fd30..14468171b677 100644 --- a/java-vmmigration/README.md +++ b/java-vmmigration/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-vmmigration - 1.28.0 + 1.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-vmmigration:1.28.0' +implementation 'com.google.cloud:google-cloud-vmmigration:1.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-vmmigration" % "1.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-vmmigration" % "1.29.0" ``` diff --git a/java-vmmigration/google-cloud-vmmigration-bom/pom.xml b/java-vmmigration/google-cloud-vmmigration-bom/pom.xml index 398e31af1605..391d51e344dc 100644 --- a/java-vmmigration/google-cloud-vmmigration-bom/pom.xml +++ b/java-vmmigration/google-cloud-vmmigration-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-vmmigration-bom - 1.28.0 + 1.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-vmmigration - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-vmmigration-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-vmmigration-v1 - 1.28.0 + 1.29.0 diff --git a/java-vmmigration/google-cloud-vmmigration/pom.xml b/java-vmmigration/google-cloud-vmmigration/pom.xml index b56e9322588b..7f9ca9333786 100644 --- a/java-vmmigration/google-cloud-vmmigration/pom.xml +++ b/java-vmmigration/google-cloud-vmmigration/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-vmmigration - 1.28.0 + 1.29.0 jar Google VM Migration VM Migration helps customers migrating VMs to GCP at no additional cost, as well as an extensive ecosystem of partners to help with discovery and assessment, planning, migration, special use cases, and more. com.google.cloud google-cloud-vmmigration-parent - 1.28.0 + 1.29.0 google-cloud-vmmigration diff --git a/java-vmmigration/grpc-google-cloud-vmmigration-v1/pom.xml b/java-vmmigration/grpc-google-cloud-vmmigration-v1/pom.xml index acbd87fc3184..fba805ac939a 100644 --- a/java-vmmigration/grpc-google-cloud-vmmigration-v1/pom.xml +++ b/java-vmmigration/grpc-google-cloud-vmmigration-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vmmigration-v1 - 1.28.0 + 1.29.0 grpc-google-cloud-vmmigration-v1 GRPC library for google-cloud-vmmigration com.google.cloud google-cloud-vmmigration-parent - 1.28.0 + 1.29.0 diff --git a/java-vmmigration/pom.xml b/java-vmmigration/pom.xml index 7e9bc5ea243a..de5708db5082 100644 --- a/java-vmmigration/pom.xml +++ b/java-vmmigration/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-vmmigration-parent pom - 1.28.0 + 1.29.0 Google VM Migration Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-vmmigration - 1.28.0 + 1.29.0 com.google.api.grpc grpc-google-cloud-vmmigration-v1 - 1.28.0 + 1.29.0 com.google.api.grpc proto-google-cloud-vmmigration-v1 - 1.28.0 + 1.29.0 diff --git a/java-vmmigration/proto-google-cloud-vmmigration-v1/pom.xml b/java-vmmigration/proto-google-cloud-vmmigration-v1/pom.xml index 9901bb2f3253..7ace99a8be72 100644 --- a/java-vmmigration/proto-google-cloud-vmmigration-v1/pom.xml +++ b/java-vmmigration/proto-google-cloud-vmmigration-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vmmigration-v1 - 1.28.0 + 1.29.0 proto-google-cloud-vmmigration-v1 Proto library for google-cloud-vmmigration com.google.cloud google-cloud-vmmigration-parent - 1.28.0 + 1.29.0 diff --git a/java-vmwareengine/CHANGELOG.md b/java-vmwareengine/CHANGELOG.md index 06a528ffcf7d..987e4fd0495e 100644 --- a/java-vmwareengine/CHANGELOG.md +++ b/java-vmwareengine/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.23.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.22.0 (2023-10-11) ### Dependencies diff --git a/java-vmwareengine/README.md b/java-vmwareengine/README.md index 233ecabf0573..d208a9309932 100644 --- a/java-vmwareengine/README.md +++ b/java-vmwareengine/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-vmwareengine - 0.22.0 + 0.23.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-vmwareengine:0.22.0' +implementation 'com.google.cloud:google-cloud-vmwareengine:0.23.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-vmwareengine" % "0.22.0" +libraryDependencies += "com.google.cloud" % "google-cloud-vmwareengine" % "0.23.0" ``` diff --git a/java-vmwareengine/google-cloud-vmwareengine-bom/pom.xml b/java-vmwareengine/google-cloud-vmwareengine-bom/pom.xml index 7b0d17951b24..80d424081874 100644 --- a/java-vmwareengine/google-cloud-vmwareengine-bom/pom.xml +++ b/java-vmwareengine/google-cloud-vmwareengine-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-vmwareengine-bom - 0.22.0 + 0.23.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-vmwareengine - 0.22.0 + 0.23.0 com.google.api.grpc grpc-google-cloud-vmwareengine-v1 - 0.22.0 + 0.23.0 com.google.api.grpc proto-google-cloud-vmwareengine-v1 - 0.22.0 + 0.23.0 diff --git a/java-vmwareengine/google-cloud-vmwareengine/pom.xml b/java-vmwareengine/google-cloud-vmwareengine/pom.xml index 7a49134a1c83..4e5817025d0b 100644 --- a/java-vmwareengine/google-cloud-vmwareengine/pom.xml +++ b/java-vmwareengine/google-cloud-vmwareengine/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-vmwareengine - 0.22.0 + 0.23.0 jar Google Google Cloud VMware Engine Google Cloud VMware Engine Easily lift and shift your VMware-based applications to Google Cloud without changes to your apps, tools, or processes. com.google.cloud google-cloud-vmwareengine-parent - 0.22.0 + 0.23.0 google-cloud-vmwareengine diff --git a/java-vmwareengine/grpc-google-cloud-vmwareengine-v1/pom.xml b/java-vmwareengine/grpc-google-cloud-vmwareengine-v1/pom.xml index 24d21a73c6ca..1bce4950308b 100644 --- a/java-vmwareengine/grpc-google-cloud-vmwareengine-v1/pom.xml +++ b/java-vmwareengine/grpc-google-cloud-vmwareengine-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vmwareengine-v1 - 0.22.0 + 0.23.0 grpc-google-cloud-vmwareengine-v1 GRPC library for google-cloud-vmwareengine com.google.cloud google-cloud-vmwareengine-parent - 0.22.0 + 0.23.0 diff --git a/java-vmwareengine/pom.xml b/java-vmwareengine/pom.xml index cb832c1551c6..75c37ec6507f 100644 --- a/java-vmwareengine/pom.xml +++ b/java-vmwareengine/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-vmwareengine-parent pom - 0.22.0 + 0.23.0 Google Google Cloud VMware Engine Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-vmwareengine - 0.22.0 + 0.23.0 com.google.api.grpc grpc-google-cloud-vmwareengine-v1 - 0.22.0 + 0.23.0 com.google.api.grpc proto-google-cloud-vmwareengine-v1 - 0.22.0 + 0.23.0 diff --git a/java-vmwareengine/proto-google-cloud-vmwareengine-v1/pom.xml b/java-vmwareengine/proto-google-cloud-vmwareengine-v1/pom.xml index d2611daa237a..450158b43a52 100644 --- a/java-vmwareengine/proto-google-cloud-vmwareengine-v1/pom.xml +++ b/java-vmwareengine/proto-google-cloud-vmwareengine-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vmwareengine-v1 - 0.22.0 + 0.23.0 proto-google-cloud-vmwareengine-v1 Proto library for google-cloud-vmwareengine com.google.cloud google-cloud-vmwareengine-parent - 0.22.0 + 0.23.0 diff --git a/java-vpcaccess/CHANGELOG.md b/java-vpcaccess/CHANGELOG.md index bc8be956f414..4dd6b4539052 100644 --- a/java-vpcaccess/CHANGELOG.md +++ b/java-vpcaccess/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.30.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.29.0 (2023-10-11) ### Dependencies diff --git a/java-vpcaccess/README.md b/java-vpcaccess/README.md index 73a1266233ce..7ddebee0aee8 100644 --- a/java-vpcaccess/README.md +++ b/java-vpcaccess/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-vpcaccess - 2.29.0 + 2.30.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-vpcaccess:2.29.0' +implementation 'com.google.cloud:google-cloud-vpcaccess:2.30.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-vpcaccess" % "2.29.0" +libraryDependencies += "com.google.cloud" % "google-cloud-vpcaccess" % "2.30.0" ``` diff --git a/java-vpcaccess/google-cloud-vpcaccess-bom/pom.xml b/java-vpcaccess/google-cloud-vpcaccess-bom/pom.xml index 7ff3d91475c7..32e1981df050 100644 --- a/java-vpcaccess/google-cloud-vpcaccess-bom/pom.xml +++ b/java-vpcaccess/google-cloud-vpcaccess-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-vpcaccess-bom - 2.29.0 + 2.30.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,17 +27,17 @@ com.google.cloud google-cloud-vpcaccess - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-vpcaccess-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-vpcaccess-v1 - 2.29.0 + 2.30.0 diff --git a/java-vpcaccess/google-cloud-vpcaccess/pom.xml b/java-vpcaccess/google-cloud-vpcaccess/pom.xml index a87fbe38cccc..7183a3bfc3a9 100644 --- a/java-vpcaccess/google-cloud-vpcaccess/pom.xml +++ b/java-vpcaccess/google-cloud-vpcaccess/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-vpcaccess - 2.29.0 + 2.30.0 jar Google Serverless VPC Access Serverless VPC Access enables you to connect from a serverless environment on Google Cloud directly to your VPC network. This connection makes it possible for your serverless environment to access resources in your VPC network via internal IP addresses. com.google.cloud google-cloud-vpcaccess-parent - 2.29.0 + 2.30.0 google-cloud-vpcaccess diff --git a/java-vpcaccess/grpc-google-cloud-vpcaccess-v1/pom.xml b/java-vpcaccess/grpc-google-cloud-vpcaccess-v1/pom.xml index e5219168bae0..5b8c41183bef 100644 --- a/java-vpcaccess/grpc-google-cloud-vpcaccess-v1/pom.xml +++ b/java-vpcaccess/grpc-google-cloud-vpcaccess-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-vpcaccess-v1 - 2.29.0 + 2.30.0 grpc-google-cloud-vpcaccess-v1 GRPC library for google-cloud-vpcaccess com.google.cloud google-cloud-vpcaccess-parent - 2.29.0 + 2.30.0 diff --git a/java-vpcaccess/pom.xml b/java-vpcaccess/pom.xml index f15137dee114..07afdee61488 100644 --- a/java-vpcaccess/pom.xml +++ b/java-vpcaccess/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-vpcaccess-parent pom - 2.29.0 + 2.30.0 Google Serverless VPC Access Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,17 +29,17 @@ com.google.cloud google-cloud-vpcaccess - 2.29.0 + 2.30.0 com.google.api.grpc grpc-google-cloud-vpcaccess-v1 - 2.29.0 + 2.30.0 com.google.api.grpc proto-google-cloud-vpcaccess-v1 - 2.29.0 + 2.30.0 diff --git a/java-vpcaccess/proto-google-cloud-vpcaccess-v1/pom.xml b/java-vpcaccess/proto-google-cloud-vpcaccess-v1/pom.xml index c16870a9a88f..a0e46ceb3354 100644 --- a/java-vpcaccess/proto-google-cloud-vpcaccess-v1/pom.xml +++ b/java-vpcaccess/proto-google-cloud-vpcaccess-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-vpcaccess-v1 - 2.29.0 + 2.30.0 proto-google-cloud-vpcaccess-v1 Proto library for google-cloud-vpcaccess com.google.cloud google-cloud-vpcaccess-parent - 2.29.0 + 2.30.0 diff --git a/java-webrisk/CHANGELOG.md b/java-webrisk/CHANGELOG.md index f0a580dcb58b..e9a02523d0d4 100644 --- a/java-webrisk/CHANGELOG.md +++ b/java-webrisk/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.28.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.27.0 (2023-10-11) ### Dependencies diff --git a/java-webrisk/README.md b/java-webrisk/README.md index 575b6a08d0b6..db751efeb578 100644 --- a/java-webrisk/README.md +++ b/java-webrisk/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-webrisk - 2.27.0 + 2.28.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-webrisk:2.27.0' +implementation 'com.google.cloud:google-cloud-webrisk:2.28.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-webrisk" % "2.27.0" +libraryDependencies += "com.google.cloud" % "google-cloud-webrisk" % "2.28.0" ``` diff --git a/java-webrisk/google-cloud-webrisk-bom/pom.xml b/java-webrisk/google-cloud-webrisk-bom/pom.xml index 60f415dd6d61..7a426a95aed6 100644 --- a/java-webrisk/google-cloud-webrisk-bom/pom.xml +++ b/java-webrisk/google-cloud-webrisk-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-webrisk-bom - 2.27.0 + 2.28.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,27 +23,27 @@ com.google.cloud google-cloud-webrisk - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-webrisk-v1 - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-webrisk-v1beta1 - 0.64.0 + 0.65.0 com.google.api.grpc proto-google-cloud-webrisk-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-webrisk-v1beta1 - 0.64.0 + 0.65.0 diff --git a/java-webrisk/google-cloud-webrisk/pom.xml b/java-webrisk/google-cloud-webrisk/pom.xml index 70b03ce57cb7..c3f28fb0e7ff 100644 --- a/java-webrisk/google-cloud-webrisk/pom.xml +++ b/java-webrisk/google-cloud-webrisk/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-webrisk - 2.27.0 + 2.28.0 jar Google Cloud Web Risk Java idiomatic client for Google Cloud Web Risk com.google.cloud google-cloud-webrisk-parent - 2.27.0 + 2.28.0 google-cloud-webrisk diff --git a/java-webrisk/grpc-google-cloud-webrisk-v1/pom.xml b/java-webrisk/grpc-google-cloud-webrisk-v1/pom.xml index 4a8d32f63a53..aafaeed3b293 100644 --- a/java-webrisk/grpc-google-cloud-webrisk-v1/pom.xml +++ b/java-webrisk/grpc-google-cloud-webrisk-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-webrisk-v1 - 2.27.0 + 2.28.0 grpc-google-cloud-webrisk-v1 GRPC library for grpc-google-cloud-webrisk-v1 com.google.cloud google-cloud-webrisk-parent - 2.27.0 + 2.28.0 diff --git a/java-webrisk/grpc-google-cloud-webrisk-v1beta1/pom.xml b/java-webrisk/grpc-google-cloud-webrisk-v1beta1/pom.xml index 81c8a17ecf80..a0da94bfcf5a 100644 --- a/java-webrisk/grpc-google-cloud-webrisk-v1beta1/pom.xml +++ b/java-webrisk/grpc-google-cloud-webrisk-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-webrisk-v1beta1 - 0.64.0 + 0.65.0 grpc-google-cloud-webrisk-v1beta1 GRPC library for grpc-google-cloud-webrisk-v1beta1 com.google.cloud google-cloud-webrisk-parent - 2.27.0 + 2.28.0 diff --git a/java-webrisk/pom.xml b/java-webrisk/pom.xml index fd1103b1c96e..f5f3abc7c619 100644 --- a/java-webrisk/pom.xml +++ b/java-webrisk/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-webrisk-parent pom - 2.27.0 + 2.28.0 Google Cloud Web Risk Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.api.grpc proto-google-cloud-webrisk-v1 - 2.27.0 + 2.28.0 com.google.api.grpc proto-google-cloud-webrisk-v1beta1 - 0.64.0 + 0.65.0 com.google.api.grpc grpc-google-cloud-webrisk-v1 - 2.27.0 + 2.28.0 com.google.api.grpc grpc-google-cloud-webrisk-v1beta1 - 0.64.0 + 0.65.0 com.google.cloud google-cloud-webrisk - 2.27.0 + 2.28.0 diff --git a/java-webrisk/proto-google-cloud-webrisk-v1/pom.xml b/java-webrisk/proto-google-cloud-webrisk-v1/pom.xml index b51f79a03037..d29cbd9912f7 100644 --- a/java-webrisk/proto-google-cloud-webrisk-v1/pom.xml +++ b/java-webrisk/proto-google-cloud-webrisk-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-webrisk-v1 - 2.27.0 + 2.28.0 proto-google-cloud-webrisk-v1 PROTO library for proto-google-cloud-webrisk-v1 com.google.cloud google-cloud-webrisk-parent - 2.27.0 + 2.28.0 diff --git a/java-webrisk/proto-google-cloud-webrisk-v1beta1/pom.xml b/java-webrisk/proto-google-cloud-webrisk-v1beta1/pom.xml index 8daa0bf9119e..39cce29ce22b 100644 --- a/java-webrisk/proto-google-cloud-webrisk-v1beta1/pom.xml +++ b/java-webrisk/proto-google-cloud-webrisk-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-webrisk-v1beta1 - 0.64.0 + 0.65.0 proto-google-cloud-webrisk-v1beta1 PROTO library for proto-google-cloud-webrisk-v1beta1 com.google.cloud google-cloud-webrisk-parent - 2.27.0 + 2.28.0 diff --git a/java-websecurityscanner/CHANGELOG.md b/java-websecurityscanner/CHANGELOG.md index b76adeaa98aa..abf30f030c5f 100644 --- a/java-websecurityscanner/CHANGELOG.md +++ b/java-websecurityscanner/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-websecurityscanner/README.md b/java-websecurityscanner/README.md index fbb36f75ddfb..17a3748b7427 100644 --- a/java-websecurityscanner/README.md +++ b/java-websecurityscanner/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-websecurityscanner - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-websecurityscanner:2.28.0' +implementation 'com.google.cloud:google-cloud-websecurityscanner:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-websecurityscanner" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-websecurityscanner" % "2.29.0" ``` diff --git a/java-websecurityscanner/google-cloud-websecurityscanner-bom/pom.xml b/java-websecurityscanner/google-cloud-websecurityscanner-bom/pom.xml index 7362deec5b14..e3a9f6d639d0 100644 --- a/java-websecurityscanner/google-cloud-websecurityscanner-bom/pom.xml +++ b/java-websecurityscanner/google-cloud-websecurityscanner-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-websecurityscanner-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -23,37 +23,37 @@ com.google.cloud google-cloud-websecurityscanner - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1alpha - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1beta - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1alpha - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1beta - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1 - 2.28.0 + 2.29.0 diff --git a/java-websecurityscanner/google-cloud-websecurityscanner/pom.xml b/java-websecurityscanner/google-cloud-websecurityscanner/pom.xml index 790a0b09deaa..6e6aa3dc79c4 100644 --- a/java-websecurityscanner/google-cloud-websecurityscanner/pom.xml +++ b/java-websecurityscanner/google-cloud-websecurityscanner/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-websecurityscanner - 2.28.0 + 2.29.0 jar Google Cloud Web Security Scanner Java idiomatic client for Google Cloud Web Security Scanner com.google.cloud google-cloud-websecurityscanner-parent - 2.28.0 + 2.29.0 google-cloud-websecurityscanner diff --git a/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1/pom.xml b/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1/pom.xml index 1dd35ba4d70b..9ae8715c54d5 100644 --- a/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1/pom.xml +++ b/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-websecurityscanner-v1 GRPC library for grpc-google-cloud-websecurityscanner-v1 com.google.cloud google-cloud-websecurityscanner-parent - 2.28.0 + 2.29.0 diff --git a/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml b/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml index 2d90f0c9379a..ddbc4e079a87 100644 --- a/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml +++ b/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1alpha - 0.115.0 + 0.116.0 grpc-google-cloud-websecurityscanner-v1alpha GRPC library for grpc-google-cloud-websecurityscanner-v1alpha com.google.cloud google-cloud-websecurityscanner-parent - 2.28.0 + 2.29.0 diff --git a/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1beta/pom.xml b/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1beta/pom.xml index 7fb3a7f7688c..0cc301375e7c 100644 --- a/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1beta/pom.xml +++ b/java-websecurityscanner/grpc-google-cloud-websecurityscanner-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1beta - 0.115.0 + 0.116.0 grpc-google-cloud-websecurityscanner-v1beta GRPC library for grpc-google-cloud-websecurityscanner-v1beta com.google.cloud google-cloud-websecurityscanner-parent - 2.28.0 + 2.29.0 diff --git a/java-websecurityscanner/pom.xml b/java-websecurityscanner/pom.xml index ca7e5ec010c9..66cc130f5663 100644 --- a/java-websecurityscanner/pom.xml +++ b/java-websecurityscanner/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-websecurityscanner-parent pom - 2.28.0 + 2.29.0 Google Cloud Web Security Scanner Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,37 +29,37 @@ com.google.api.grpc proto-google-cloud-websecurityscanner-v1alpha - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1beta - 0.115.0 + 0.116.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1alpha - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1beta - 0.115.0 + 0.116.0 com.google.api.grpc grpc-google-cloud-websecurityscanner-v1 - 2.28.0 + 2.29.0 com.google.cloud google-cloud-websecurityscanner - 2.28.0 + 2.29.0 diff --git a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/pom.xml b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/pom.xml index b0834f7a9492..0e1b36df9b10 100644 --- a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/pom.xml +++ b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1 - 2.28.0 + 2.29.0 proto-google-cloud-websecurityscanner-v1 PROTO library for proto-google-cloud-websecurityscanner-v1 com.google.cloud google-cloud-websecurityscanner-parent - 2.28.0 + 2.29.0 diff --git a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1alpha/pom.xml b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1alpha/pom.xml index 97ee46a358db..651b509a0380 100644 --- a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1alpha/pom.xml +++ b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1alpha - 0.115.0 + 0.116.0 proto-google-cloud-websecurityscanner-v1alpha PROTO library for proto-google-cloud-websecurityscanner-v1alpha com.google.cloud google-cloud-websecurityscanner-parent - 2.28.0 + 2.29.0 diff --git a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1beta/pom.xml b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1beta/pom.xml index ebe68b67782f..302021c2ffb8 100644 --- a/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1beta/pom.xml +++ b/java-websecurityscanner/proto-google-cloud-websecurityscanner-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-websecurityscanner-v1beta - 0.115.0 + 0.116.0 proto-google-cloud-websecurityscanner-v1beta PROTO library for proto-google-cloud-websecurityscanner-v1beta com.google.cloud google-cloud-websecurityscanner-parent - 2.28.0 + 2.29.0 diff --git a/java-workflow-executions/CHANGELOG.md b/java-workflow-executions/CHANGELOG.md index 0db29a723b9f..d602b1116043 100644 --- a/java-workflow-executions/CHANGELOG.md +++ b/java-workflow-executions/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-workflow-executions/README.md b/java-workflow-executions/README.md index 39088fa04e59..82079623c7e7 100644 --- a/java-workflow-executions/README.md +++ b/java-workflow-executions/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-workflow-executions - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-workflow-executions:2.28.0' +implementation 'com.google.cloud:google-cloud-workflow-executions:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-workflow-executions" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-workflow-executions" % "2.29.0" ``` diff --git a/java-workflow-executions/google-cloud-workflow-executions-bom/pom.xml b/java-workflow-executions/google-cloud-workflow-executions-bom/pom.xml index 4f97189a0ee8..318c8cf1d4ea 100644 --- a/java-workflow-executions/google-cloud-workflow-executions-bom/pom.xml +++ b/java-workflow-executions/google-cloud-workflow-executions-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-workflow-executions-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-workflow-executions - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-workflow-executions-v1beta - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-workflow-executions-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-workflow-executions-v1beta - 0.32.0 + 0.33.0 com.google.api.grpc proto-google-cloud-workflow-executions-v1 - 2.28.0 + 2.29.0 diff --git a/java-workflow-executions/google-cloud-workflow-executions/pom.xml b/java-workflow-executions/google-cloud-workflow-executions/pom.xml index 4344aa289679..104083bb4445 100644 --- a/java-workflow-executions/google-cloud-workflow-executions/pom.xml +++ b/java-workflow-executions/google-cloud-workflow-executions/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-workflow-executions - 2.28.0 + 2.29.0 jar Google Cloud Workflow Executions allows you to ochestrate and automate Google Cloud and HTTP-based API services with serverless workflows. com.google.cloud google-cloud-workflow-executions-parent - 2.28.0 + 2.29.0 google-cloud-workflow-executions diff --git a/java-workflow-executions/grpc-google-cloud-workflow-executions-v1/pom.xml b/java-workflow-executions/grpc-google-cloud-workflow-executions-v1/pom.xml index bd5a1ad69c4d..0ae8e5fd76f0 100644 --- a/java-workflow-executions/grpc-google-cloud-workflow-executions-v1/pom.xml +++ b/java-workflow-executions/grpc-google-cloud-workflow-executions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-workflow-executions-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-workflow-executions-v1 GRPC library for google-cloud-workflow-executions com.google.cloud google-cloud-workflow-executions-parent - 2.28.0 + 2.29.0 diff --git a/java-workflow-executions/grpc-google-cloud-workflow-executions-v1beta/pom.xml b/java-workflow-executions/grpc-google-cloud-workflow-executions-v1beta/pom.xml index 1a577bfee107..0cfd0f4fd8df 100644 --- a/java-workflow-executions/grpc-google-cloud-workflow-executions-v1beta/pom.xml +++ b/java-workflow-executions/grpc-google-cloud-workflow-executions-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-workflow-executions-v1beta - 0.32.0 + 0.33.0 grpc-google-cloud-workflow-executions-v1beta GRPC library for google-cloud-workflow-executions com.google.cloud google-cloud-workflow-executions-parent - 2.28.0 + 2.29.0 diff --git a/java-workflow-executions/pom.xml b/java-workflow-executions/pom.xml index 4ad3105169ba..6a7bd316c7cc 100644 --- a/java-workflow-executions/pom.xml +++ b/java-workflow-executions/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-workflow-executions-parent pom - 2.28.0 + 2.29.0 Google Cloud Workflow Executions Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-workflow-executions - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-workflow-executions-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-workflow-executions-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-workflow-executions-v1beta - 0.32.0 + 0.33.0 com.google.api.grpc grpc-google-cloud-workflow-executions-v1beta - 0.32.0 + 0.33.0 diff --git a/java-workflow-executions/proto-google-cloud-workflow-executions-v1/pom.xml b/java-workflow-executions/proto-google-cloud-workflow-executions-v1/pom.xml index 2067f4cbd135..2784e8601888 100644 --- a/java-workflow-executions/proto-google-cloud-workflow-executions-v1/pom.xml +++ b/java-workflow-executions/proto-google-cloud-workflow-executions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-workflow-executions-v1 - 2.28.0 + 2.29.0 proto-google-cloud-workflow-executions-v1 Proto library for google-cloud-workflow-executions com.google.cloud google-cloud-workflow-executions-parent - 2.28.0 + 2.29.0 diff --git a/java-workflow-executions/proto-google-cloud-workflow-executions-v1beta/pom.xml b/java-workflow-executions/proto-google-cloud-workflow-executions-v1beta/pom.xml index 8b28e67c87c3..0c788174fa6b 100644 --- a/java-workflow-executions/proto-google-cloud-workflow-executions-v1beta/pom.xml +++ b/java-workflow-executions/proto-google-cloud-workflow-executions-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-workflow-executions-v1beta - 0.32.0 + 0.33.0 proto-google-cloud-workflow-executions-v1beta Proto library for google-cloud-workflow-executions com.google.cloud google-cloud-workflow-executions-parent - 2.28.0 + 2.29.0 diff --git a/java-workflows/CHANGELOG.md b/java-workflows/CHANGELOG.md index efbf89fe23e0..3ecbd4e374be 100644 --- a/java-workflows/CHANGELOG.md +++ b/java-workflows/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.29.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 2.28.0 (2023-10-11) ### Dependencies diff --git a/java-workflows/README.md b/java-workflows/README.md index 1c3c05938b5a..0a326821b858 100644 --- a/java-workflows/README.md +++ b/java-workflows/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-workflows - 2.28.0 + 2.29.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-workflows:2.28.0' +implementation 'com.google.cloud:google-cloud-workflows:2.29.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-workflows" % "2.28.0" +libraryDependencies += "com.google.cloud" % "google-cloud-workflows" % "2.29.0" ``` diff --git a/java-workflows/google-cloud-workflows-bom/pom.xml b/java-workflows/google-cloud-workflows-bom/pom.xml index 4d830bad7e93..102c94224e76 100644 --- a/java-workflows/google-cloud-workflows-bom/pom.xml +++ b/java-workflows/google-cloud-workflows-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-workflows-bom - 2.28.0 + 2.29.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-workflows - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-workflows-v1beta - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-workflows-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-workflows-v1beta - 0.34.0 + 0.35.0 com.google.api.grpc proto-google-cloud-workflows-v1 - 2.28.0 + 2.29.0 diff --git a/java-workflows/google-cloud-workflows/pom.xml b/java-workflows/google-cloud-workflows/pom.xml index 1b314445d71e..cc027d498bc6 100644 --- a/java-workflows/google-cloud-workflows/pom.xml +++ b/java-workflows/google-cloud-workflows/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-workflows - 2.28.0 + 2.29.0 jar Google Cloud Workflows allows you to ochestrate and automate Google Cloud and HTTP-based API services with serverless workflows. com.google.cloud google-cloud-workflows-parent - 2.28.0 + 2.29.0 google-cloud-workflows diff --git a/java-workflows/grpc-google-cloud-workflows-v1/pom.xml b/java-workflows/grpc-google-cloud-workflows-v1/pom.xml index 5343c3faa11e..5f4e8382e94f 100644 --- a/java-workflows/grpc-google-cloud-workflows-v1/pom.xml +++ b/java-workflows/grpc-google-cloud-workflows-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-workflows-v1 - 2.28.0 + 2.29.0 grpc-google-cloud-workflows-v1 GRPC library for google-cloud-workflows com.google.cloud google-cloud-workflows-parent - 2.28.0 + 2.29.0 diff --git a/java-workflows/grpc-google-cloud-workflows-v1beta/pom.xml b/java-workflows/grpc-google-cloud-workflows-v1beta/pom.xml index 092d5b3896b9..2b9f9f910d9f 100644 --- a/java-workflows/grpc-google-cloud-workflows-v1beta/pom.xml +++ b/java-workflows/grpc-google-cloud-workflows-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-workflows-v1beta - 0.34.0 + 0.35.0 grpc-google-cloud-workflows-v1beta GRPC library for google-cloud-workflows com.google.cloud google-cloud-workflows-parent - 2.28.0 + 2.29.0 diff --git a/java-workflows/pom.xml b/java-workflows/pom.xml index 8d229f151dd6..857ef2e62bb8 100644 --- a/java-workflows/pom.xml +++ b/java-workflows/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-workflows-parent pom - 2.28.0 + 2.29.0 Google Cloud Workflows Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-workflows - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-workflows-v1 - 2.28.0 + 2.29.0 com.google.api.grpc grpc-google-cloud-workflows-v1 - 2.28.0 + 2.29.0 com.google.api.grpc proto-google-cloud-workflows-v1beta - 0.34.0 + 0.35.0 com.google.api.grpc grpc-google-cloud-workflows-v1beta - 0.34.0 + 0.35.0 diff --git a/java-workflows/proto-google-cloud-workflows-v1/pom.xml b/java-workflows/proto-google-cloud-workflows-v1/pom.xml index 64154200e1b3..fff663f1b065 100644 --- a/java-workflows/proto-google-cloud-workflows-v1/pom.xml +++ b/java-workflows/proto-google-cloud-workflows-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-workflows-v1 - 2.28.0 + 2.29.0 proto-google-cloud-workflows-v1 Proto library for google-cloud-workflows com.google.cloud google-cloud-workflows-parent - 2.28.0 + 2.29.0 diff --git a/java-workflows/proto-google-cloud-workflows-v1beta/pom.xml b/java-workflows/proto-google-cloud-workflows-v1beta/pom.xml index 57f6bc96cb61..ebc5d3b9a330 100644 --- a/java-workflows/proto-google-cloud-workflows-v1beta/pom.xml +++ b/java-workflows/proto-google-cloud-workflows-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-workflows-v1beta - 0.34.0 + 0.35.0 proto-google-cloud-workflows-v1beta Proto library for google-cloud-workflows com.google.cloud google-cloud-workflows-parent - 2.28.0 + 2.29.0 diff --git a/java-workstations/CHANGELOG.md b/java-workstations/CHANGELOG.md index 8c26c114fb3e..1b536275481b 100644 --- a/java-workstations/CHANGELOG.md +++ b/java-workstations/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.17.0 (2023-10-25) + +### Dependencies + +* **deps:** update dependency com.google.cloud:google-cloud-shared-config to v1.6.0 ([#9969](https://github.com/googleapis/google-cloud-java/issues/9969)) ([9e2be39](https://github.com/googleapis/google-cloud-java/commit/9e2be39c5b2d7764421325f65a6d0d06351fcda5)) +* **deps:** update dependency com.google.cloud:google-cloud-shared-dependencies to v3.18.0 ([#9984](https://github.com/googleapis/google-cloud-java/issues/9984)) ([9814dc0](https://github.com/googleapis/google-cloud-java/commit/9814dc092ad7edb7b1b21f87fa48d76a2423d731)) + + ## 0.16.0 (2023-10-11) ### Dependencies diff --git a/java-workstations/README.md b/java-workstations/README.md index b36681a8d6c1..678f4d6c8c1e 100644 --- a/java-workstations/README.md +++ b/java-workstations/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-workstations - 0.16.0 + 0.17.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-workstations:0.16.0' +implementation 'com.google.cloud:google-cloud-workstations:0.17.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-workstations" % "0.16.0" +libraryDependencies += "com.google.cloud" % "google-cloud-workstations" % "0.17.0" ``` diff --git a/java-workstations/google-cloud-workstations-bom/pom.xml b/java-workstations/google-cloud-workstations-bom/pom.xml index 3b08bdd13457..fa6f00f95235 100644 --- a/java-workstations/google-cloud-workstations-bom/pom.xml +++ b/java-workstations/google-cloud-workstations-bom/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.cloud google-cloud-workstations-bom - 0.16.0 + 0.17.0 pom com.google.cloud google-cloud-pom-parent - 1.22.0 + 1.23.0 ../../google-cloud-pom-parent/pom.xml @@ -27,27 +27,27 @@ com.google.cloud google-cloud-workstations - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-workstations-v1beta - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-workstations-v1 - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-workstations-v1beta - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-workstations-v1 - 0.16.0 + 0.17.0 diff --git a/java-workstations/google-cloud-workstations/pom.xml b/java-workstations/google-cloud-workstations/pom.xml index 1db6034013af..221b21dd7e7b 100644 --- a/java-workstations/google-cloud-workstations/pom.xml +++ b/java-workstations/google-cloud-workstations/pom.xml @@ -3,14 +3,14 @@ 4.0.0 com.google.cloud google-cloud-workstations - 0.16.0 + 0.17.0 jar Google Cloud Workstations Cloud Workstations Fully managed development environments built to meet the needs of security-sensitive enterprises. It enhances the security of development environments while accelerating developer onboarding and productivity. com.google.cloud google-cloud-workstations-parent - 0.16.0 + 0.17.0 google-cloud-workstations diff --git a/java-workstations/grpc-google-cloud-workstations-v1/pom.xml b/java-workstations/grpc-google-cloud-workstations-v1/pom.xml index 8c2142fd6219..06734ccc3cb6 100644 --- a/java-workstations/grpc-google-cloud-workstations-v1/pom.xml +++ b/java-workstations/grpc-google-cloud-workstations-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-workstations-v1 - 0.16.0 + 0.17.0 grpc-google-cloud-workstations-v1 GRPC library for google-cloud-workstations com.google.cloud google-cloud-workstations-parent - 0.16.0 + 0.17.0 diff --git a/java-workstations/grpc-google-cloud-workstations-v1beta/pom.xml b/java-workstations/grpc-google-cloud-workstations-v1beta/pom.xml index d98d72120917..b16a73a84ebf 100644 --- a/java-workstations/grpc-google-cloud-workstations-v1beta/pom.xml +++ b/java-workstations/grpc-google-cloud-workstations-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-workstations-v1beta - 0.16.0 + 0.17.0 grpc-google-cloud-workstations-v1beta GRPC library for google-cloud-workstations com.google.cloud google-cloud-workstations-parent - 0.16.0 + 0.17.0 diff --git a/java-workstations/pom.xml b/java-workstations/pom.xml index 7193e0042f72..596457ec46c8 100644 --- a/java-workstations/pom.xml +++ b/java-workstations/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-workstations-parent pom - 0.16.0 + 0.17.0 Google Cloud Workstations Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.22.0 + 1.23.0 ../google-cloud-jar-parent/pom.xml @@ -29,27 +29,27 @@ com.google.cloud google-cloud-workstations - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-workstations-v1 - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-workstations-v1 - 0.16.0 + 0.17.0 com.google.api.grpc grpc-google-cloud-workstations-v1beta - 0.16.0 + 0.17.0 com.google.api.grpc proto-google-cloud-workstations-v1beta - 0.16.0 + 0.17.0 diff --git a/java-workstations/proto-google-cloud-workstations-v1/pom.xml b/java-workstations/proto-google-cloud-workstations-v1/pom.xml index 80d21e786c47..5104c360d456 100644 --- a/java-workstations/proto-google-cloud-workstations-v1/pom.xml +++ b/java-workstations/proto-google-cloud-workstations-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-workstations-v1 - 0.16.0 + 0.17.0 proto-google-cloud-workstations-v1 Proto library for google-cloud-workstations com.google.cloud google-cloud-workstations-parent - 0.16.0 + 0.17.0 diff --git a/java-workstations/proto-google-cloud-workstations-v1beta/pom.xml b/java-workstations/proto-google-cloud-workstations-v1beta/pom.xml index 07e949e27f93..1e9539887f8d 100644 --- a/java-workstations/proto-google-cloud-workstations-v1beta/pom.xml +++ b/java-workstations/proto-google-cloud-workstations-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-workstations-v1beta - 0.16.0 + 0.17.0 proto-google-cloud-workstations-v1beta Proto library for google-cloud-workstations com.google.cloud google-cloud-workstations-parent - 0.16.0 + 0.17.0 diff --git a/owl-bot-postprocessor/requirements.txt b/owl-bot-postprocessor/requirements.txt index e7b8d217a403..342c77e00c19 100644 --- a/owl-bot-postprocessor/requirements.txt +++ b/owl-bot-postprocessor/requirements.txt @@ -254,9 +254,9 @@ typing==3.7.4.3 \ --hash=sha256:1187fb9c82fd670d10aa07bbb6cfcfe4bdda42d6fab8d5134f04e8c4d0b71cc9 \ --hash=sha256:283d868f5071ab9ad873e5e52268d611e851c870a2ba354193026f2dfb29d8b5 # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 +urllib3==1.26.18 \ + --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ + --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 # via requests watchdog==2.1.9 \ --hash=sha256:083171652584e1b8829581f965b9b7723ca5f9a2cd7e20271edf264cfd7c1412 \ diff --git a/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.in b/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.in index deb60c258dec..ab1cee7324c0 100644 --- a/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.in +++ b/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.in @@ -25,7 +25,7 @@ google-cloud-storage==2.0.0 google-resumable-media==2.3.3 google-cloud-core==2.3.1 typing-extensions==4.1.1 -urllib3==1.26.12 +urllib3==1.26.18 zipp==3.6.0 rsa==4.9 six==1.16.0 diff --git a/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.txt b/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.txt index fe0549a0695c..5e4a5f0e159c 100644 --- a/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.txt +++ b/owl-bot-postprocessor/synthtool/gcp/templates/java_library/.kokoro/requirements.txt @@ -439,9 +439,9 @@ typing-extensions==4.1.1 \ --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 +urllib3==1.26.18 \ + --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ + --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 # via # -r requirements.in # requests diff --git a/pom.xml b/pom.xml index 02fe69fcfe2b..c38fadafbee2 100644 --- a/pom.xml +++ b/pom.xml @@ -136,6 +136,7 @@ java-recaptchaenterprise java-recommendations-ai java-recommender + java-redis-cluster java-redis java-resourcemanager java-resource-settings diff --git a/versions.txt b/versions.txt index 0eb7d5886aa4..c88f43d03c5a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,686 +1,693 @@ # Format: # module:released-version:current-version -google-cloud-java:1.22.0:1.22.0 -google-cloud-accessapproval:2.29.0:2.29.0 -grpc-google-cloud-accessapproval-v1:2.29.0:2.29.0 -proto-google-cloud-accessapproval-v1:2.29.0:2.29.0 -google-identity-accesscontextmanager:1.29.0:1.29.0 -grpc-google-identity-accesscontextmanager-v1:1.29.0:1.29.0 -proto-google-identity-accesscontextmanager-v1:1.29.0:1.29.0 -proto-google-identity-accesscontextmanager-type:1.29.0:1.29.0 -google-cloud-aiplatform:3.29.0:3.29.0 -grpc-google-cloud-aiplatform-v1:3.29.0:3.29.0 -grpc-google-cloud-aiplatform-v1beta1:0.45.0:0.45.0 -proto-google-cloud-aiplatform-v1:3.29.0:3.29.0 -proto-google-cloud-aiplatform-v1beta1:0.45.0:0.45.0 -google-analytics-admin:0.38.0:0.38.0 -grpc-google-analytics-admin-v1alpha:0.38.0:0.38.0 -proto-google-analytics-admin-v1alpha:0.38.0:0.38.0 -proto-google-analytics-admin-v1beta:0.38.0:0.38.0 -grpc-google-analytics-admin-v1beta:0.38.0:0.38.0 -google-analytics-data:0.39.0:0.39.0 -grpc-google-analytics-data-v1beta:0.39.0:0.39.0 -proto-google-analytics-data-v1beta:0.39.0:0.39.0 -proto-google-analytics-data-v1alpha:0.39.0:0.39.0 -grpc-google-analytics-data-v1alpha:0.39.0:0.39.0 -google-cloud-analyticshub:0.25.0:0.25.0 -proto-google-cloud-analyticshub-v1:0.25.0:0.25.0 -grpc-google-cloud-analyticshub-v1:0.25.0:0.25.0 -google-cloud-api-gateway:2.28.0:2.28.0 -grpc-google-cloud-api-gateway-v1:2.28.0:2.28.0 -proto-google-cloud-api-gateway-v1:2.28.0:2.28.0 -google-cloud-apigee-connect:2.28.0:2.28.0 -grpc-google-cloud-apigee-connect-v1:2.28.0:2.28.0 -proto-google-cloud-apigee-connect-v1:2.28.0:2.28.0 -google-cloud-apigee-registry:0.28.0:0.28.0 -proto-google-cloud-apigee-registry-v1:0.28.0:0.28.0 -grpc-google-cloud-apigee-registry-v1:0.28.0:0.28.0 -google-cloud-apikeys:0.26.0:0.26.0 -proto-google-cloud-apikeys-v2:0.26.0:0.26.0 -grpc-google-cloud-apikeys-v2:0.26.0:0.26.0 -google-cloud-appengine-admin:2.28.0:2.28.0 -grpc-google-cloud-appengine-admin-v1:2.28.0:2.28.0 -proto-google-cloud-appengine-admin-v1:2.28.0:2.28.0 -google-area120-tables:0.32.0:0.32.0 -grpc-google-area120-tables-v1alpha1:0.32.0:0.32.0 -proto-google-area120-tables-v1alpha1:0.32.0:0.32.0 -google-cloud-artifact-registry:1.27.0:1.27.0 -grpc-google-cloud-artifact-registry-v1beta2:0.33.0:0.33.0 -grpc-google-cloud-artifact-registry-v1:1.27.0:1.27.0 -proto-google-cloud-artifact-registry-v1beta2:0.33.0:0.33.0 -proto-google-cloud-artifact-registry-v1:1.27.0:1.27.0 -google-cloud-asset:3.32.0:3.32.0 -grpc-google-cloud-asset-v1:3.32.0:3.32.0 -grpc-google-cloud-asset-v1p1beta1:0.132.0:0.132.0 -grpc-google-cloud-asset-v1p2beta1:0.132.0:0.132.0 -grpc-google-cloud-asset-v1p5beta1:0.132.0:0.132.0 -grpc-google-cloud-asset-v1p7beta1:3.32.0:3.32.0 -proto-google-cloud-asset-v1:3.32.0:3.32.0 -proto-google-cloud-asset-v1p1beta1:0.132.0:0.132.0 -proto-google-cloud-asset-v1p2beta1:0.132.0:0.132.0 -proto-google-cloud-asset-v1p5beta1:0.132.0:0.132.0 -proto-google-cloud-asset-v1p7beta1:3.32.0:3.32.0 -google-cloud-assured-workloads:2.28.0:2.28.0 -grpc-google-cloud-assured-workloads-v1beta1:0.40.0:0.40.0 -grpc-google-cloud-assured-workloads-v1:2.28.0:2.28.0 -proto-google-cloud-assured-workloads-v1beta1:0.40.0:0.40.0 -proto-google-cloud-assured-workloads-v1:2.28.0:2.28.0 -google-cloud-automl:2.28.0:2.28.0 -grpc-google-cloud-automl-v1beta1:0.115.0:0.115.0 -grpc-google-cloud-automl-v1:2.28.0:2.28.0 -proto-google-cloud-automl-v1beta1:0.115.0:0.115.0 -proto-google-cloud-automl-v1:2.28.0:2.28.0 -google-cloud-bare-metal-solution:0.28.0:0.28.0 -proto-google-cloud-bare-metal-solution-v2:0.28.0:0.28.0 -grpc-google-cloud-bare-metal-solution-v2:0.28.0:0.28.0 -google-cloud-batch:0.28.0:0.28.0 -proto-google-cloud-batch-v1:0.28.0:0.28.0 -grpc-google-cloud-batch-v1:0.28.0:0.28.0 -proto-google-cloud-batch-v1alpha:0.28.0:0.28.0 -grpc-google-cloud-batch-v1alpha:0.28.0:0.28.0 -google-cloud-beyondcorp-appconnections:0.26.0:0.26.0 -proto-google-cloud-beyondcorp-appconnections-v1:0.26.0:0.26.0 -grpc-google-cloud-beyondcorp-appconnections-v1:0.26.0:0.26.0 -google-cloud-beyondcorp-appconnectors:0.26.0:0.26.0 -proto-google-cloud-beyondcorp-appconnectors-v1:0.26.0:0.26.0 -grpc-google-cloud-beyondcorp-appconnectors-v1:0.26.0:0.26.0 -google-cloud-beyondcorp-appgateways:0.26.0:0.26.0 -proto-google-cloud-beyondcorp-appgateways-v1:0.26.0:0.26.0 -grpc-google-cloud-beyondcorp-appgateways-v1:0.26.0:0.26.0 -google-cloud-beyondcorp-clientconnectorservices:0.26.0:0.26.0 -proto-google-cloud-beyondcorp-clientconnectorservices-v1:0.26.0:0.26.0 -grpc-google-cloud-beyondcorp-clientconnectorservices-v1:0.26.0:0.26.0 -google-cloud-beyondcorp-clientgateways:0.26.0:0.26.0 -proto-google-cloud-beyondcorp-clientgateways-v1:0.26.0:0.26.0 -grpc-google-cloud-beyondcorp-clientgateways-v1:0.26.0:0.26.0 -google-cloud-bigqueryconnection:2.30.0:2.30.0 -grpc-google-cloud-bigqueryconnection-v1:2.30.0:2.30.0 -grpc-google-cloud-bigqueryconnection-v1beta1:0.38.0:0.38.0 -proto-google-cloud-bigqueryconnection-v1:2.30.0:2.30.0 -proto-google-cloud-bigqueryconnection-v1beta1:0.38.0:0.38.0 -google-cloud-bigquery-data-exchange:2.23.0:2.23.0 -proto-google-cloud-bigquery-data-exchange-v1beta1:2.23.0:2.23.0 -grpc-google-cloud-bigquery-data-exchange-v1beta1:2.23.0:2.23.0 -google-cloud-bigquerydatapolicy:0.25.0:0.25.0 -proto-google-cloud-bigquerydatapolicy-v1beta1:0.25.0:0.25.0 -grpc-google-cloud-bigquerydatapolicy-v1beta1:0.25.0:0.25.0 -google-cloud-bigquerydatatransfer:2.28.0:2.28.0 -grpc-google-cloud-bigquerydatatransfer-v1:2.28.0:2.28.0 -proto-google-cloud-bigquerydatatransfer-v1:2.28.0:2.28.0 -google-cloud-bigquerymigration:0.31.0:0.31.0 -grpc-google-cloud-bigquerymigration-v2alpha:0.31.0:0.31.0 -proto-google-cloud-bigquerymigration-v2alpha:0.31.0:0.31.0 -proto-google-cloud-bigquerymigration-v2:0.31.0:0.31.0 -grpc-google-cloud-bigquerymigration-v2:0.31.0:0.31.0 -google-cloud-bigqueryreservation:2.29.0:2.29.0 -grpc-google-cloud-bigqueryreservation-v1:2.29.0:2.29.0 -proto-google-cloud-bigqueryreservation-v1:2.29.0:2.29.0 -google-cloud-billingbudgets:2.28.0:2.28.0 -grpc-google-cloud-billingbudgets-v1beta1:0.37.0:0.37.0 -grpc-google-cloud-billingbudgets-v1:2.28.0:2.28.0 -proto-google-cloud-billingbudgets-v1beta1:0.37.0:0.37.0 -proto-google-cloud-billingbudgets-v1:2.28.0:2.28.0 -google-cloud-billing:2.28.0:2.28.0 -grpc-google-cloud-billing-v1:2.28.0:2.28.0 -proto-google-cloud-billing-v1:2.28.0:2.28.0 -google-cloud-binary-authorization:1.27.0:1.27.0 -grpc-google-cloud-binary-authorization-v1beta1:0.32.0:0.32.0 -grpc-google-cloud-binary-authorization-v1:1.27.0:1.27.0 -proto-google-cloud-binary-authorization-v1beta1:0.32.0:0.32.0 -proto-google-cloud-binary-authorization-v1:1.27.0:1.27.0 -google-cloud-certificate-manager:0.31.0:0.31.0 -proto-google-cloud-certificate-manager-v1:0.31.0:0.31.0 -grpc-google-cloud-certificate-manager-v1:0.31.0:0.31.0 -google-cloud-channel:3.32.0:3.32.0 -grpc-google-cloud-channel-v1:3.32.0:3.32.0 -proto-google-cloud-channel-v1:3.32.0:3.32.0 -google-cloud-build:3.30.0:3.30.0 -grpc-google-cloud-build-v1:3.30.0:3.30.0 -proto-google-cloud-build-v1:3.30.0:3.30.0 -google-cloud-cloudcommerceconsumerprocurement:0.26.0:0.26.0 -proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1:0.26.0:0.26.0 -grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1:0.26.0:0.26.0 -google-cloud-compute:1.38.0:1.38.0 -proto-google-cloud-compute-v1:1.38.0:1.38.0 -google-cloud-contact-center-insights:2.28.0:2.28.0 -grpc-google-cloud-contact-center-insights-v1:2.28.0:2.28.0 -proto-google-cloud-contact-center-insights-v1:2.28.0:2.28.0 -proto-google-cloud-containeranalysis-v1:2.29.0:2.29.0 -proto-google-cloud-containeranalysis-v1beta1:0.119.0:0.119.0 -grpc-google-cloud-containeranalysis-v1beta1:0.119.0:0.119.0 -grpc-google-cloud-containeranalysis-v1:2.29.0:2.29.0 -google-cloud-containeranalysis:2.29.0:2.29.0 -google-cloud-container:2.31.0:2.31.0 -grpc-google-cloud-container-v1:2.31.0:2.31.0 -grpc-google-cloud-container-v1beta1:2.31.0:2.31.0 -proto-google-cloud-container-v1:2.31.0:2.31.0 -proto-google-cloud-container-v1beta1:2.31.0:2.31.0 -google-cloud-contentwarehouse:0.24.0:0.24.0 -proto-google-cloud-contentwarehouse-v1:0.24.0:0.24.0 -grpc-google-cloud-contentwarehouse-v1:0.24.0:0.24.0 -google-cloud-datacatalog:1.34.0:1.34.0 -grpc-google-cloud-datacatalog-v1:1.34.0:1.34.0 -grpc-google-cloud-datacatalog-v1beta1:0.71.0:0.71.0 -proto-google-cloud-datacatalog-v1:1.34.0:1.34.0 -proto-google-cloud-datacatalog-v1beta1:0.71.0:0.71.0 -google-cloud-dataflow:0.32.0:0.32.0 -grpc-google-cloud-dataflow-v1beta3:0.32.0:0.32.0 -proto-google-cloud-dataflow-v1beta3:0.32.0:0.32.0 -google-cloud-dataform:0.27.0:0.27.0 -proto-google-cloud-dataform-v1alpha2:0.27.0:0.27.0 -grpc-google-cloud-dataform-v1alpha2:0.27.0:0.27.0 -proto-google-cloud-dataform-v1beta1:0.27.0:0.27.0 -grpc-google-cloud-dataform-v1beta1:0.27.0:0.27.0 -google-cloud-data-fusion:1.28.0:1.28.0 -grpc-google-cloud-data-fusion-v1beta1:0.32.0:0.32.0 -grpc-google-cloud-data-fusion-v1:1.28.0:1.28.0 -proto-google-cloud-data-fusion-v1beta1:0.32.0:0.32.0 -proto-google-cloud-data-fusion-v1:1.28.0:1.28.0 -google-cloud-datalabeling:0.148.0:0.148.0 -grpc-google-cloud-datalabeling-v1beta1:0.113.0:0.113.0 -proto-google-cloud-datalabeling-v1beta1:0.113.0:0.113.0 -google-cloud-dataplex:1.26.0:1.26.0 -proto-google-cloud-dataplex-v1:1.26.0:1.26.0 -grpc-google-cloud-dataplex-v1:1.26.0:1.26.0 -google-cloud-dataproc-metastore:2.29.0:2.29.0 -grpc-google-cloud-dataproc-metastore-v1beta:0.33.0:0.33.0 -grpc-google-cloud-dataproc-metastore-v1alpha:0.33.0:0.33.0 -grpc-google-cloud-dataproc-metastore-v1:2.29.0:2.29.0 -proto-google-cloud-dataproc-metastore-v1beta:0.33.0:0.33.0 -proto-google-cloud-dataproc-metastore-v1alpha:0.33.0:0.33.0 -proto-google-cloud-dataproc-metastore-v1:2.29.0:2.29.0 -google-cloud-dataproc:4.25.0:4.25.0 -grpc-google-cloud-dataproc-v1:4.25.0:4.25.0 -proto-google-cloud-dataproc-v1:4.25.0:4.25.0 -google-cloud-datastream:1.27.0:1.27.0 -grpc-google-cloud-datastream-v1alpha1:0.32.0:0.32.0 -proto-google-cloud-datastream-v1alpha1:0.32.0:0.32.0 -proto-google-cloud-datastream-v1:1.27.0:1.27.0 -grpc-google-cloud-datastream-v1:1.27.0:1.27.0 -google-cloud-debugger-client:1.28.0:1.28.0 -grpc-google-cloud-debugger-client-v2:1.28.0:1.28.0 -proto-google-cloud-debugger-client-v2:1.28.0:1.28.0 -proto-google-devtools-source-protos:1.28.0:1.28.0 -google-cloud-deploy:1.26.0:1.26.0 -grpc-google-cloud-deploy-v1:1.26.0:1.26.0 -proto-google-cloud-deploy-v1:1.26.0:1.26.0 -google-cloud-dialogflow-cx:0.39.0:0.39.0 -grpc-google-cloud-dialogflow-cx-v3beta1:0.39.0:0.39.0 -grpc-google-cloud-dialogflow-cx-v3:0.39.0:0.39.0 -proto-google-cloud-dialogflow-cx-v3beta1:0.39.0:0.39.0 -proto-google-cloud-dialogflow-cx-v3:0.39.0:0.39.0 -google-cloud-dialogflow:4.34.0:4.34.0 -grpc-google-cloud-dialogflow-v2beta1:0.132.0:0.132.0 -grpc-google-cloud-dialogflow-v2:4.34.0:4.34.0 -proto-google-cloud-dialogflow-v2:4.34.0:4.34.0 -proto-google-cloud-dialogflow-v2beta1:0.132.0:0.132.0 -google-cloud-discoveryengine:0.24.0:0.24.0 -proto-google-cloud-discoveryengine-v1beta:0.24.0:0.24.0 -grpc-google-cloud-discoveryengine-v1beta:0.24.0:0.24.0 -google-cloud-distributedcloudedge:0.25.0:0.25.0 -proto-google-cloud-distributedcloudedge-v1:0.25.0:0.25.0 -grpc-google-cloud-distributedcloudedge-v1:0.25.0:0.25.0 -google-cloud-dlp:3.32.0:3.32.0 -grpc-google-cloud-dlp-v2:3.32.0:3.32.0 -proto-google-cloud-dlp-v2:3.32.0:3.32.0 -google-cloud-dms:2.27.0:2.27.0 -grpc-google-cloud-dms-v1:2.27.0:2.27.0 -proto-google-cloud-dms-v1:2.27.0:2.27.0 -google-cloud-document-ai:2.32.0:2.32.0 -grpc-google-cloud-document-ai-v1beta1:0.44.0:0.44.0 -grpc-google-cloud-document-ai-v1beta2:0.44.0:0.44.0 -grpc-google-cloud-document-ai-v1beta3:0.44.0:0.44.0 -grpc-google-cloud-document-ai-v1:2.32.0:2.32.0 -proto-google-cloud-document-ai-v1beta1:0.44.0:0.44.0 -proto-google-cloud-document-ai-v1beta2:0.44.0:0.44.0 -proto-google-cloud-document-ai-v1beta3:0.44.0:0.44.0 -proto-google-cloud-document-ai-v1:2.32.0:2.32.0 -google-cloud-domains:1.25.0:1.25.0 -grpc-google-cloud-domains-v1beta1:0.33.0:0.33.0 -grpc-google-cloud-domains-v1alpha2:0.33.0:0.33.0 -grpc-google-cloud-domains-v1:1.25.0:1.25.0 -proto-google-cloud-domains-v1beta1:0.33.0:0.33.0 -proto-google-cloud-domains-v1alpha2:0.33.0:0.33.0 -proto-google-cloud-domains-v1:1.25.0:1.25.0 -google-cloud-enterpriseknowledgegraph:0.24.0:0.24.0 -proto-google-cloud-enterpriseknowledgegraph-v1:0.24.0:0.24.0 -grpc-google-cloud-enterpriseknowledgegraph-v1:0.24.0:0.24.0 -google-cloud-errorreporting:0.149.0-beta:0.149.0-beta -grpc-google-cloud-error-reporting-v1beta1:0.115.0:0.115.0 -proto-google-cloud-error-reporting-v1beta1:0.115.0:0.115.0 -google-cloud-essential-contacts:2.28.0:2.28.0 -grpc-google-cloud-essential-contacts-v1:2.28.0:2.28.0 -proto-google-cloud-essential-contacts-v1:2.28.0:2.28.0 -google-cloud-eventarc:1.28.0:1.28.0 -grpc-google-cloud-eventarc-v1:1.28.0:1.28.0 -proto-google-cloud-eventarc-v1:1.28.0:1.28.0 -google-cloud-eventarc-publishing:0.28.0:0.28.0 -proto-google-cloud-eventarc-publishing-v1:0.28.0:0.28.0 -grpc-google-cloud-eventarc-publishing-v1:0.28.0:0.28.0 -google-cloud-filestore:1.29.0:1.29.0 -grpc-google-cloud-filestore-v1beta1:0.31.0:0.31.0 -grpc-google-cloud-filestore-v1:1.29.0:1.29.0 -proto-google-cloud-filestore-v1:1.29.0:1.29.0 -proto-google-cloud-filestore-v1beta1:0.31.0:0.31.0 -google-cloud-functions:2.30.0:2.30.0 -grpc-google-cloud-functions-v1:2.30.0:2.30.0 -proto-google-cloud-functions-v1:2.30.0:2.30.0 -proto-google-cloud-functions-v2beta:2.30.0:2.30.0 -proto-google-cloud-functions-v2alpha:2.30.0:2.30.0 -grpc-google-cloud-functions-v2beta:2.30.0:2.30.0 -grpc-google-cloud-functions-v2alpha:2.30.0:2.30.0 -proto-google-cloud-functions-v2:2.30.0:2.30.0 -grpc-google-cloud-functions-v2:2.30.0:2.30.0 -google-cloud-game-servers:2.28.0:2.28.0 -grpc-google-cloud-game-servers-v1:2.28.0:2.28.0 -grpc-google-cloud-game-servers-v1beta:0.53.0:0.53.0 -proto-google-cloud-game-servers-v1:2.28.0:2.28.0 -proto-google-cloud-game-servers-v1beta:0.53.0:0.53.0 -google-cloud-gke-backup:0.27.0:0.27.0 -proto-google-cloud-gke-backup-v1:0.27.0:0.27.0 -grpc-google-cloud-gke-backup-v1:0.27.0:0.27.0 -google-cloud-gke-connect-gateway:0.29.0:0.29.0 -grpc-google-cloud-gke-connect-gateway-v1beta1:0.29.0:0.29.0 -proto-google-cloud-gke-connect-gateway-v1beta1:0.29.0:0.29.0 -google-cloud-gkehub:1.28.0:1.28.0 -grpc-google-cloud-gkehub-v1beta1:0.34.0:0.34.0 -grpc-google-cloud-gkehub-v1:1.28.0:1.28.0 -grpc-google-cloud-gkehub-v1alpha:0.34.0:0.34.0 -grpc-google-cloud-gkehub-v1beta:0.34.0:0.34.0 -grpc-google-cloud-gkehub-v1alpha2:0.34.0:0.34.0 -proto-google-cloud-gkehub-v1beta1:0.34.0:0.34.0 -proto-google-cloud-gkehub-v1:1.28.0:1.28.0 -proto-google-cloud-gkehub-v1alpha:0.34.0:0.34.0 -proto-google-cloud-gkehub-v1alpha2:0.34.0:0.34.0 -proto-google-cloud-gkehub-v1beta:0.34.0:0.34.0 -google-cloud-gke-multi-cloud:0.27.0:0.27.0 -proto-google-cloud-gke-multi-cloud-v1:0.27.0:0.27.0 -grpc-google-cloud-gke-multi-cloud-v1:0.27.0:0.27.0 -grafeas:2.29.0:2.29.0 -google-cloud-gsuite-addons:2.28.0:2.28.0 -grpc-google-cloud-gsuite-addons-v1:2.28.0:2.28.0 -proto-google-cloud-gsuite-addons-v1:2.28.0:2.28.0 -proto-google-apps-script-type-protos:2.28.0:2.28.0 -google-iam-admin:3.23.0:3.23.0 -grpc-google-iam-admin-v1:3.23.0:3.23.0 -proto-google-iam-admin-v1:3.23.0:3.23.0 -google-cloud-iamcredentials:2.28.0:2.28.0 -grpc-google-cloud-iamcredentials-v1:2.28.0:2.28.0 -proto-google-cloud-iamcredentials-v1:2.28.0:2.28.0 -google-cloud-ids:1.27.0:1.27.0 -grpc-google-cloud-ids-v1:1.27.0:1.27.0 -proto-google-cloud-ids-v1:1.27.0:1.27.0 -google-cloud-iot:2.28.0:2.28.0 -grpc-google-cloud-iot-v1:2.28.0:2.28.0 -proto-google-cloud-iot-v1:2.28.0:2.28.0 -google-cloud-kms:2.31.0:2.31.0 -grpc-google-cloud-kms-v1:0.122.0:0.122.0 -proto-google-cloud-kms-v1:0.122.0:0.122.0 -google-cloud-language:2.29.0:2.29.0 -grpc-google-cloud-language-v1:2.29.0:2.29.0 -grpc-google-cloud-language-v1beta2:0.116.0:0.116.0 -proto-google-cloud-language-v1:2.29.0:2.29.0 -proto-google-cloud-language-v1beta2:0.116.0:0.116.0 -google-cloud-life-sciences:0.30.0:0.30.0 -grpc-google-cloud-life-sciences-v2beta:0.30.0:0.30.0 -proto-google-cloud-life-sciences-v2beta:0.30.0:0.30.0 -google-cloud-managed-identities:1.26.0:1.26.0 -grpc-google-cloud-managed-identities-v1:1.26.0:1.26.0 -proto-google-cloud-managed-identities-v1:1.26.0:1.26.0 -google-cloud-mediatranslation:0.34.0:0.34.0 -grpc-google-cloud-mediatranslation-v1beta1:0.34.0:0.34.0 -proto-google-cloud-mediatranslation-v1beta1:0.34.0:0.34.0 -google-cloud-memcache:2.28.0:2.28.0 -grpc-google-cloud-memcache-v1beta2:0.35.0:0.35.0 -grpc-google-cloud-memcache-v1:2.28.0:2.28.0 -proto-google-cloud-memcache-v1beta2:0.35.0:0.35.0 -proto-google-cloud-memcache-v1:2.28.0:2.28.0 -google-cloud-monitoring-dashboard:2.30.0:2.30.0 -grpc-google-cloud-monitoring-dashboard-v1:2.30.0:2.30.0 -proto-google-cloud-monitoring-dashboard-v1:2.30.0:2.30.0 -google-cloud-monitoring:3.29.0:3.29.0 -grpc-google-cloud-monitoring-v3:3.29.0:3.29.0 -proto-google-cloud-monitoring-v3:3.29.0:3.29.0 -google-cloud-networkconnectivity:1.27.0:1.27.0 -grpc-google-cloud-networkconnectivity-v1alpha1:0.33.0:0.33.0 -grpc-google-cloud-networkconnectivity-v1:1.27.0:1.27.0 -proto-google-cloud-networkconnectivity-v1alpha1:0.33.0:0.33.0 -proto-google-cloud-networkconnectivity-v1:1.27.0:1.27.0 -google-cloud-network-management:1.29.0:1.29.0 -grpc-google-cloud-network-management-v1beta1:0.31.0:0.31.0 -grpc-google-cloud-network-management-v1:1.29.0:1.29.0 -proto-google-cloud-network-management-v1beta1:0.31.0:0.31.0 -proto-google-cloud-network-management-v1:1.29.0:1.29.0 -google-cloud-network-security:0.31.0:0.31.0 -grpc-google-cloud-network-security-v1beta1:0.31.0:0.31.0 -proto-google-cloud-network-security-v1beta1:0.31.0:0.31.0 -proto-google-cloud-network-security-v1:0.31.0:0.31.0 -grpc-google-cloud-network-security-v1:0.31.0:0.31.0 -google-cloud-notebooks:1.26.0:1.26.0 -grpc-google-cloud-notebooks-v1beta1:0.33.0:0.33.0 -grpc-google-cloud-notebooks-v1:1.26.0:1.26.0 -proto-google-cloud-notebooks-v1beta1:0.33.0:0.33.0 -proto-google-cloud-notebooks-v1:1.26.0:1.26.0 -google-cloud-notification:0.146.0-beta:0.146.0-beta -google-cloud-optimization:1.26.0:1.26.0 -proto-google-cloud-optimization-v1:1.26.0:1.26.0 -grpc-google-cloud-optimization-v1:1.26.0:1.26.0 -google-cloud-orchestration-airflow:1.28.0:1.28.0 -grpc-google-cloud-orchestration-airflow-v1:1.28.0:1.28.0 -grpc-google-cloud-orchestration-airflow-v1beta1:0.31.0:0.31.0 -proto-google-cloud-orchestration-airflow-v1:1.28.0:1.28.0 -proto-google-cloud-orchestration-airflow-v1beta1:0.31.0:0.31.0 -google-cloud-orgpolicy:2.28.0:2.28.0 -grpc-google-cloud-orgpolicy-v2:2.28.0:2.28.0 -proto-google-cloud-orgpolicy-v1:2.28.0:2.28.0 -proto-google-cloud-orgpolicy-v2:2.28.0:2.28.0 -google-cloud-os-config:2.30.0:2.30.0 -grpc-google-cloud-os-config-v1:2.30.0:2.30.0 -grpc-google-cloud-os-config-v1beta:2.30.0:2.30.0 -grpc-google-cloud-os-config-v1alpha:2.30.0:2.30.0 -proto-google-cloud-os-config-v1:2.30.0:2.30.0 -proto-google-cloud-os-config-v1alpha:2.30.0:2.30.0 -proto-google-cloud-os-config-v1beta:2.30.0:2.30.0 -google-cloud-os-login:2.27.0:2.27.0 -grpc-google-cloud-os-login-v1:2.27.0:2.27.0 -proto-google-cloud-os-login-v1:2.27.0:2.27.0 -google-cloud-phishingprotection:0.59.0:0.59.0 -grpc-google-cloud-phishingprotection-v1beta1:0.59.0:0.59.0 -proto-google-cloud-phishingprotection-v1beta1:0.59.0:0.59.0 -google-cloud-policy-troubleshooter:1.27.0:1.27.0 -grpc-google-cloud-policy-troubleshooter-v1:1.27.0:1.27.0 -proto-google-cloud-policy-troubleshooter-v1:1.27.0:1.27.0 -google-cloud-private-catalog:0.30.0:0.30.0 -grpc-google-cloud-private-catalog-v1beta1:0.30.0:0.30.0 -proto-google-cloud-private-catalog-v1beta1:0.30.0:0.30.0 -google-cloud-profiler:2.28.0:2.28.0 -grpc-google-cloud-profiler-v2:2.28.0:2.28.0 -proto-google-cloud-profiler-v2:2.28.0:2.28.0 -google-cloud-publicca:0.25.0:0.25.0 -proto-google-cloud-publicca-v1beta1:0.25.0:0.25.0 -grpc-google-cloud-publicca-v1beta1:0.25.0:0.25.0 -google-cloud-recaptchaenterprise:3.25.0:3.25.0 -grpc-google-cloud-recaptchaenterprise-v1:3.25.0:3.25.0 -grpc-google-cloud-recaptchaenterprise-v1beta1:0.67.0:0.67.0 -proto-google-cloud-recaptchaenterprise-v1:3.25.0:3.25.0 -proto-google-cloud-recaptchaenterprise-v1beta1:0.67.0:0.67.0 -google-cloud-recommendations-ai:0.35.0:0.35.0 -grpc-google-cloud-recommendations-ai-v1beta1:0.35.0:0.35.0 -proto-google-cloud-recommendations-ai-v1beta1:0.35.0:0.35.0 -google-cloud-recommender:2.30.0:2.30.0 -grpc-google-cloud-recommender-v1:2.30.0:2.30.0 -grpc-google-cloud-recommender-v1beta1:0.42.0:0.42.0 -proto-google-cloud-recommender-v1:2.30.0:2.30.0 -proto-google-cloud-recommender-v1beta1:0.42.0:0.42.0 -google-cloud-redis:2.31.0:2.31.0 -grpc-google-cloud-redis-v1beta1:0.119.0:0.119.0 -grpc-google-cloud-redis-v1:2.31.0:2.31.0 -proto-google-cloud-redis-v1:2.31.0:2.31.0 -proto-google-cloud-redis-v1beta1:0.119.0:0.119.0 -google-cloud-resourcemanager:1.30.0:1.30.0 -grpc-google-cloud-resourcemanager-v3:1.30.0:1.30.0 -proto-google-cloud-resourcemanager-v3:1.30.0:1.30.0 -google-cloud-resource-settings:1.28.0:1.28.0 -grpc-google-cloud-resource-settings-v1:1.28.0:1.28.0 -proto-google-cloud-resource-settings-v1:1.28.0:1.28.0 -google-cloud-retail:2.30.0:2.30.0 -grpc-google-cloud-retail-v2:2.30.0:2.30.0 -proto-google-cloud-retail-v2:2.30.0:2.30.0 -proto-google-cloud-retail-v2alpha:2.30.0:2.30.0 -proto-google-cloud-retail-v2beta:2.30.0:2.30.0 -grpc-google-cloud-retail-v2alpha:2.30.0:2.30.0 -grpc-google-cloud-retail-v2beta:2.30.0:2.30.0 -google-cloud-run:0.28.0:0.28.0 -proto-google-cloud-run-v2:0.28.0:0.28.0 -grpc-google-cloud-run-v2:0.28.0:0.28.0 -google-cloud-scheduler:2.28.0:2.28.0 -grpc-google-cloud-scheduler-v1beta1:0.113.0:0.113.0 -grpc-google-cloud-scheduler-v1:2.28.0:2.28.0 -proto-google-cloud-scheduler-v1beta1:0.113.0:0.113.0 -proto-google-cloud-scheduler-v1:2.28.0:2.28.0 -google-cloud-secretmanager:2.28.0:2.28.0 -grpc-google-cloud-secretmanager-v1:2.28.0:2.28.0 -grpc-google-cloud-secretmanager-v1beta1:2.28.0:2.28.0 -proto-google-cloud-secretmanager-v1:2.28.0:2.28.0 -proto-google-cloud-secretmanager-v1beta1:2.28.0:2.28.0 -google-cloud-securitycenter:2.36.0:2.36.0 -grpc-google-cloud-securitycenter-v1:2.36.0:2.36.0 -grpc-google-cloud-securitycenter-v1beta1:0.131.0:0.131.0 -grpc-google-cloud-securitycenter-v1p1beta1:0.131.0:0.131.0 -proto-google-cloud-securitycenter-v1:2.36.0:2.36.0 -proto-google-cloud-securitycenter-v1beta1:0.131.0:0.131.0 -proto-google-cloud-securitycenter-v1p1beta1:0.131.0:0.131.0 -google-cloud-securitycenter-settings:0.31.0:0.31.0 -grpc-google-cloud-securitycenter-settings-v1beta1:0.31.0:0.31.0 -proto-google-cloud-securitycenter-settings-v1beta1:0.31.0:0.31.0 -google-cloud-security-private-ca:2.30.0:2.30.0 -grpc-google-cloud-security-private-ca-v1beta1:0.37.0:0.37.0 -grpc-google-cloud-security-private-ca-v1:2.30.0:2.30.0 -proto-google-cloud-security-private-ca-v1beta1:0.37.0:0.37.0 -proto-google-cloud-security-private-ca-v1:2.30.0:2.30.0 -google-cloud-service-control:1.28.0:1.28.0 -grpc-google-cloud-service-control-v1:1.28.0:1.28.0 -proto-google-cloud-service-control-v1:1.28.0:1.28.0 -proto-google-cloud-service-control-v2:1.28.0:1.28.0 -grpc-google-cloud-service-control-v2:1.28.0:1.28.0 -google-cloud-servicedirectory:2.29.0:2.29.0 -grpc-google-cloud-servicedirectory-v1beta1:0.37.0:0.37.0 -grpc-google-cloud-servicedirectory-v1:2.29.0:2.29.0 -proto-google-cloud-servicedirectory-v1beta1:0.37.0:0.37.0 -proto-google-cloud-servicedirectory-v1:2.29.0:2.29.0 -google-cloud-service-management:3.26.0:3.26.0 -grpc-google-cloud-service-management-v1:3.26.0:3.26.0 -proto-google-cloud-service-management-v1:3.26.0:3.26.0 -google-cloud-service-usage:2.28.0:2.28.0 -grpc-google-cloud-service-usage-v1beta1:0.32.0:0.32.0 -grpc-google-cloud-service-usage-v1:2.28.0:2.28.0 -proto-google-cloud-service-usage-v1:2.28.0:2.28.0 -proto-google-cloud-service-usage-v1beta1:0.32.0:0.32.0 -google-cloud-shell:2.27.0:2.27.0 -grpc-google-cloud-shell-v1:2.27.0:2.27.0 -proto-google-cloud-shell-v1:2.27.0:2.27.0 -google-cloud-speech:4.23.0:4.23.0 -grpc-google-cloud-speech-v1:4.23.0:4.23.0 -grpc-google-cloud-speech-v1beta1:2.23.0:2.23.0 -grpc-google-cloud-speech-v1p1beta1:2.23.0:2.23.0 -proto-google-cloud-speech-v1:4.23.0:4.23.0 -proto-google-cloud-speech-v1beta1:2.23.0:2.23.0 -proto-google-cloud-speech-v1p1beta1:2.23.0:2.23.0 -proto-google-cloud-speech-v2:4.23.0:4.23.0 -grpc-google-cloud-speech-v2:4.23.0:4.23.0 -google-cloud-storage-transfer:1.28.0:1.28.0 -grpc-google-cloud-storage-transfer-v1:1.28.0:1.28.0 -proto-google-cloud-storage-transfer-v1:1.28.0:1.28.0 -google-cloud-talent:2.29.0:2.29.0 -grpc-google-cloud-talent-v4:2.29.0:2.29.0 -grpc-google-cloud-talent-v4beta1:0.72.0:0.72.0 -proto-google-cloud-talent-v4:2.29.0:2.29.0 -proto-google-cloud-talent-v4beta1:0.72.0:0.72.0 -google-cloud-tasks:2.28.0:2.28.0 -grpc-google-cloud-tasks-v2beta3:0.118.0:0.118.0 -grpc-google-cloud-tasks-v2beta2:0.118.0:0.118.0 -grpc-google-cloud-tasks-v2:2.28.0:2.28.0 -proto-google-cloud-tasks-v2beta3:0.118.0:0.118.0 -proto-google-cloud-tasks-v2beta2:0.118.0:0.118.0 -proto-google-cloud-tasks-v2:2.28.0:2.28.0 -google-cloud-texttospeech:2.29.0:2.29.0 -grpc-google-cloud-texttospeech-v1beta1:0.118.0:0.118.0 -grpc-google-cloud-texttospeech-v1:2.29.0:2.29.0 -proto-google-cloud-texttospeech-v1:2.29.0:2.29.0 -proto-google-cloud-texttospeech-v1beta1:0.118.0:0.118.0 -google-cloud-tpu:2.29.0:2.29.0 -grpc-google-cloud-tpu-v1:2.29.0:2.29.0 -grpc-google-cloud-tpu-v2alpha1:2.29.0:2.29.0 -proto-google-cloud-tpu-v1:2.29.0:2.29.0 -proto-google-cloud-tpu-v2alpha1:2.29.0:2.29.0 -google-cloud-trace:2.28.0:2.28.0 -grpc-google-cloud-trace-v1:2.28.0:2.28.0 -grpc-google-cloud-trace-v2:2.28.0:2.28.0 -proto-google-cloud-trace-v1:2.28.0:2.28.0 -proto-google-cloud-trace-v2:2.28.0:2.28.0 -google-cloud-translate:2.28.0:2.28.0 -grpc-google-cloud-translate-v3beta1:0.110.0:0.110.0 -grpc-google-cloud-translate-v3:2.28.0:2.28.0 -proto-google-cloud-translate-v3beta1:0.110.0:0.110.0 -proto-google-cloud-translate-v3:2.28.0:2.28.0 -google-cloud-video-intelligence:2.27.0:2.27.0 -grpc-google-cloud-video-intelligence-v1p1beta1:0.117.0:0.117.0 -grpc-google-cloud-video-intelligence-v1beta2:0.117.0:0.117.0 -grpc-google-cloud-video-intelligence-v1:2.27.0:2.27.0 -grpc-google-cloud-video-intelligence-v1p2beta1:0.117.0:0.117.0 -grpc-google-cloud-video-intelligence-v1p3beta1:0.117.0:0.117.0 -proto-google-cloud-video-intelligence-v1p3beta1:0.117.0:0.117.0 -proto-google-cloud-video-intelligence-v1beta2:0.117.0:0.117.0 -proto-google-cloud-video-intelligence-v1p1beta1:0.117.0:0.117.0 -proto-google-cloud-video-intelligence-v1:2.27.0:2.27.0 -proto-google-cloud-video-intelligence-v1p2beta1:0.117.0:0.117.0 -google-cloud-live-stream:0.30.0:0.30.0 -proto-google-cloud-live-stream-v1:0.30.0:0.30.0 -grpc-google-cloud-live-stream-v1:0.30.0:0.30.0 -google-cloud-video-stitcher:0.28.0:0.28.0 -proto-google-cloud-video-stitcher-v1:0.28.0:0.28.0 -grpc-google-cloud-video-stitcher-v1:0.28.0:0.28.0 -google-cloud-video-transcoder:1.27.0:1.27.0 -grpc-google-cloud-video-transcoder-v1:1.27.0:1.27.0 -proto-google-cloud-video-transcoder-v1:1.27.0:1.27.0 -google-cloud-vision:3.26.0:3.26.0 -grpc-google-cloud-vision-v1p3beta1:0.115.0:0.115.0 -grpc-google-cloud-vision-v1p1beta1:0.115.0:0.115.0 -grpc-google-cloud-vision-v1p4beta1:0.115.0:0.115.0 -grpc-google-cloud-vision-v1p2beta1:3.26.0:3.26.0 -grpc-google-cloud-vision-v1:3.26.0:3.26.0 -proto-google-cloud-vision-v1p4beta1:0.115.0:0.115.0 -proto-google-cloud-vision-v1:3.26.0:3.26.0 -proto-google-cloud-vision-v1p1beta1:0.115.0:0.115.0 -proto-google-cloud-vision-v1p3beta1:0.115.0:0.115.0 -proto-google-cloud-vision-v1p2beta1:3.26.0:3.26.0 -google-cloud-vmmigration:1.28.0:1.28.0 -grpc-google-cloud-vmmigration-v1:1.28.0:1.28.0 -proto-google-cloud-vmmigration-v1:1.28.0:1.28.0 -google-cloud-vpcaccess:2.29.0:2.29.0 -grpc-google-cloud-vpcaccess-v1:2.29.0:2.29.0 -proto-google-cloud-vpcaccess-v1:2.29.0:2.29.0 -google-cloud-webrisk:2.27.0:2.27.0 -grpc-google-cloud-webrisk-v1:2.27.0:2.27.0 -grpc-google-cloud-webrisk-v1beta1:0.64.0:0.64.0 -proto-google-cloud-webrisk-v1:2.27.0:2.27.0 -proto-google-cloud-webrisk-v1beta1:0.64.0:0.64.0 -google-cloud-websecurityscanner:2.28.0:2.28.0 -grpc-google-cloud-websecurityscanner-v1alpha:0.115.0:0.115.0 -grpc-google-cloud-websecurityscanner-v1beta:0.115.0:0.115.0 -grpc-google-cloud-websecurityscanner-v1:2.28.0:2.28.0 -proto-google-cloud-websecurityscanner-v1alpha:0.115.0:0.115.0 -proto-google-cloud-websecurityscanner-v1beta:0.115.0:0.115.0 -proto-google-cloud-websecurityscanner-v1:2.28.0:2.28.0 -google-cloud-workflow-executions:2.28.0:2.28.0 -grpc-google-cloud-workflow-executions-v1beta:0.32.0:0.32.0 -grpc-google-cloud-workflow-executions-v1:2.28.0:2.28.0 -proto-google-cloud-workflow-executions-v1beta:0.32.0:0.32.0 -proto-google-cloud-workflow-executions-v1:2.28.0:2.28.0 -google-cloud-workflows:2.28.0:2.28.0 -grpc-google-cloud-workflows-v1beta:0.34.0:0.34.0 -grpc-google-cloud-workflows-v1:2.28.0:2.28.0 -proto-google-cloud-workflows-v1beta:0.34.0:0.34.0 -proto-google-cloud-workflows-v1:2.28.0:2.28.0 -google-cloud-dns:2.26.0:2.26.0 -google-maps-routing:1.13.0:1.13.0 -proto-google-maps-routing-v2:1.13.0:1.13.0 -grpc-google-maps-routing-v2:1.13.0:1.13.0 -google-cloud-vmwareengine:0.22.0:0.22.0 -proto-google-cloud-vmwareengine-v1:0.22.0:0.22.0 -grpc-google-cloud-vmwareengine-v1:0.22.0:0.22.0 -google-maps-addressvalidation:0.22.0:0.22.0 -proto-google-maps-addressvalidation-v1:0.22.0:0.22.0 -grpc-google-maps-addressvalidation-v1:0.22.0:0.22.0 -proto-google-cloud-bigquerydatapolicy-v1:0.25.0:0.25.0 -grpc-google-cloud-bigquerydatapolicy-v1:0.25.0:0.25.0 -google-cloud-monitoring-metricsscope:0.22.0:0.22.0 -proto-google-cloud-monitoring-metricsscope-v1:0.22.0:0.22.0 -grpc-google-cloud-monitoring-metricsscope-v1:0.22.0:0.22.0 -proto-google-cloud-tpu-v2:2.29.0:2.29.0 -grpc-google-cloud-tpu-v2:2.29.0:2.29.0 -google-cloud-datalineage:0.20.0:0.20.0 -proto-google-cloud-datalineage-v1:0.20.0:0.20.0 -grpc-google-cloud-datalineage-v1:0.20.0:0.20.0 -google-iam-policy:1.26.0:1.26.0 -proto-google-cloud-build-v2:3.30.0:3.30.0 -grpc-google-cloud-build-v2:3.30.0:3.30.0 -google-cloud-advisorynotifications:0.17.0:0.17.0 -proto-google-cloud-advisorynotifications-v1:0.17.0:0.17.0 -grpc-google-cloud-advisorynotifications-v1:0.17.0:0.17.0 -google-maps-mapsplatformdatasets:0.17.0:0.17.0 -proto-google-maps-mapsplatformdatasets-v1alpha:0.17.0:0.17.0 -grpc-google-maps-mapsplatformdatasets-v1alpha:0.17.0:0.17.0 -google-cloud-kmsinventory:0.17.0:0.17.0 -proto-google-cloud-kmsinventory-v1:0.17.0:0.17.0 -grpc-google-cloud-kmsinventory-v1:0.17.0:0.17.0 -google-cloud-alloydb:0.17.0:0.17.0 -proto-google-cloud-alloydb-v1:0.17.0:0.17.0 -proto-google-cloud-alloydb-v1beta:0.17.0:0.17.0 -proto-google-cloud-alloydb-v1alpha:0.17.0:0.17.0 -grpc-google-cloud-alloydb-v1beta:0.17.0:0.17.0 -grpc-google-cloud-alloydb-v1:0.17.0:0.17.0 -grpc-google-cloud-alloydb-v1alpha:0.17.0:0.17.0 -google-cloud-biglake:0.16.0:0.16.0 -proto-google-cloud-biglake-v1alpha1:0.16.0:0.16.0 -grpc-google-cloud-biglake-v1alpha1:0.16.0:0.16.0 -google-cloud-workstations:0.16.0:0.16.0 -proto-google-cloud-workstations-v1beta:0.16.0:0.16.0 -grpc-google-cloud-workstations-v1beta:0.16.0:0.16.0 -google-cloud-confidentialcomputing:0.14.0:0.14.0 -proto-google-cloud-confidentialcomputing-v1:0.14.0:0.14.0 -proto-google-cloud-confidentialcomputing-v1alpha1:0.14.0:0.14.0 -grpc-google-cloud-confidentialcomputing-v1:0.14.0:0.14.0 -grpc-google-cloud-confidentialcomputing-v1alpha1:0.14.0:0.14.0 -proto-google-cloud-workstations-v1:0.16.0:0.16.0 -grpc-google-cloud-workstations-v1:0.16.0:0.16.0 -proto-google-cloud-biglake-v1:0.16.0:0.16.0 -grpc-google-cloud-biglake-v1:0.16.0:0.16.0 -google-cloud-storageinsights:0.13.0:0.13.0 -proto-google-cloud-storageinsights-v1:0.13.0:0.13.0 -grpc-google-cloud-storageinsights-v1:0.13.0:0.13.0 -google-cloud-cloudsupport:0.12.0:0.12.0 -proto-google-cloud-cloudsupport-v2:0.12.0:0.12.0 -grpc-google-cloud-cloudsupport-v2:0.12.0:0.12.0 -google-cloud-rapidmigrationassessment:0.11.0:0.11.0 -proto-google-cloud-rapidmigrationassessment-v1:0.11.0:0.11.0 -grpc-google-cloud-rapidmigrationassessment-v1:0.11.0:0.11.0 -proto-google-maps-mapsplatformdatasets-v1:0.17.0:0.17.0 -grpc-google-maps-mapsplatformdatasets-v1:0.17.0:0.17.0 -proto-google-cloud-discoveryengine-v1:0.24.0:0.24.0 -grpc-google-cloud-discoveryengine-v1:0.24.0:0.24.0 -google-cloud-migrationcenter:0.10.0:0.10.0 -proto-google-cloud-migrationcenter-v1:0.10.0:0.10.0 -grpc-google-cloud-migrationcenter-v1:0.10.0:0.10.0 -google-cloud-policysimulator:0.7.0:0.7.0 -proto-google-cloud-policysimulator-v1:0.7.0:0.7.0 -grpc-google-cloud-policysimulator-v1:0.7.0:0.7.0 -google-cloud-netapp:0.7.0:0.7.0 -proto-google-cloud-netapp-v1beta1:0.7.0:0.7.0 -grpc-google-cloud-netapp-v1beta1:0.7.0:0.7.0 -proto-google-cloud-netapp-v1:0.7.0:0.7.0 -grpc-google-cloud-netapp-v1:0.7.0:0.7.0 -proto-google-cloud-cloudcommerceconsumerprocurement-v1:0.26.0:0.26.0 -grpc-google-cloud-cloudcommerceconsumerprocurement-v1:0.26.0:0.26.0 -google-cloud-java-alloydb-connectors:0.6.0:0.6.0 -proto-google-cloud-java-alloydb-connectors-v1alpha:0.6.0:0.6.0 -google-cloud-alloydb-connectors:0.6.0:0.6.0 -proto-google-cloud-alloydb-connectors-v1alpha:0.6.0:0.6.0 -proto-google-cloud-language-v2:2.29.0:2.29.0 -grpc-google-cloud-language-v2:2.29.0:2.29.0 -google-cloud-infra-manager:0.5.0:0.5.0 -proto-google-cloud-infra-manager-v1:0.5.0:0.5.0 -grpc-google-cloud-infra-manager-v1:0.5.0:0.5.0 -proto-google-cloud-notebooks-v2:1.26.0:1.26.0 -grpc-google-cloud-notebooks-v2:1.26.0:1.26.0 -proto-google-cloud-alloydb-connectors-v1beta:0.6.0:0.6.0 -google-shopping-merchant-inventories:0.4.0:0.4.0 -proto-google-shopping-merchant-inventories-v1beta:0.4.0:0.4.0 -grpc-google-shopping-merchant-inventories-v1beta:0.4.0:0.4.0 -proto-google-cloud-policy-troubleshooter-v3:1.27.0:1.27.0 -grpc-google-cloud-policy-troubleshooter-v3:1.27.0:1.27.0 -google-shopping-merchant-reports:0.4.0:0.4.0 -proto-google-shopping-merchant-reports-v1beta:0.4.0:0.4.0 -grpc-google-shopping-merchant-reports-v1beta:0.4.0:0.4.0 -proto-google-cloud-alloydb-connectors-v1:0.6.0:0.6.0 \ No newline at end of file +google-cloud-java:1.23.0:1.23.0 +google-cloud-accessapproval:2.30.0:2.30.0 +grpc-google-cloud-accessapproval-v1:2.30.0:2.30.0 +proto-google-cloud-accessapproval-v1:2.30.0:2.30.0 +google-identity-accesscontextmanager:1.30.0:1.30.0 +grpc-google-identity-accesscontextmanager-v1:1.30.0:1.30.0 +proto-google-identity-accesscontextmanager-v1:1.30.0:1.30.0 +proto-google-identity-accesscontextmanager-type:1.30.0:1.30.0 +google-cloud-aiplatform:3.30.0:3.30.0 +grpc-google-cloud-aiplatform-v1:3.30.0:3.30.0 +grpc-google-cloud-aiplatform-v1beta1:0.46.0:0.46.0 +proto-google-cloud-aiplatform-v1:3.30.0:3.30.0 +proto-google-cloud-aiplatform-v1beta1:0.46.0:0.46.0 +google-analytics-admin:0.39.0:0.39.0 +grpc-google-analytics-admin-v1alpha:0.39.0:0.39.0 +proto-google-analytics-admin-v1alpha:0.39.0:0.39.0 +proto-google-analytics-admin-v1beta:0.39.0:0.39.0 +grpc-google-analytics-admin-v1beta:0.39.0:0.39.0 +google-analytics-data:0.40.0:0.40.0 +grpc-google-analytics-data-v1beta:0.40.0:0.40.0 +proto-google-analytics-data-v1beta:0.40.0:0.40.0 +proto-google-analytics-data-v1alpha:0.40.0:0.40.0 +grpc-google-analytics-data-v1alpha:0.40.0:0.40.0 +google-cloud-analyticshub:0.26.0:0.26.0 +proto-google-cloud-analyticshub-v1:0.26.0:0.26.0 +grpc-google-cloud-analyticshub-v1:0.26.0:0.26.0 +google-cloud-api-gateway:2.29.0:2.29.0 +grpc-google-cloud-api-gateway-v1:2.29.0:2.29.0 +proto-google-cloud-api-gateway-v1:2.29.0:2.29.0 +google-cloud-apigee-connect:2.29.0:2.29.0 +grpc-google-cloud-apigee-connect-v1:2.29.0:2.29.0 +proto-google-cloud-apigee-connect-v1:2.29.0:2.29.0 +google-cloud-apigee-registry:0.29.0:0.29.0 +proto-google-cloud-apigee-registry-v1:0.29.0:0.29.0 +grpc-google-cloud-apigee-registry-v1:0.29.0:0.29.0 +google-cloud-apikeys:0.27.0:0.27.0 +proto-google-cloud-apikeys-v2:0.27.0:0.27.0 +grpc-google-cloud-apikeys-v2:0.27.0:0.27.0 +google-cloud-appengine-admin:2.29.0:2.29.0 +grpc-google-cloud-appengine-admin-v1:2.29.0:2.29.0 +proto-google-cloud-appengine-admin-v1:2.29.0:2.29.0 +google-area120-tables:0.33.0:0.33.0 +grpc-google-area120-tables-v1alpha1:0.33.0:0.33.0 +proto-google-area120-tables-v1alpha1:0.33.0:0.33.0 +google-cloud-artifact-registry:1.28.0:1.28.0 +grpc-google-cloud-artifact-registry-v1beta2:0.34.0:0.34.0 +grpc-google-cloud-artifact-registry-v1:1.28.0:1.28.0 +proto-google-cloud-artifact-registry-v1beta2:0.34.0:0.34.0 +proto-google-cloud-artifact-registry-v1:1.28.0:1.28.0 +google-cloud-asset:3.33.0:3.33.0 +grpc-google-cloud-asset-v1:3.33.0:3.33.0 +grpc-google-cloud-asset-v1p1beta1:0.133.0:0.133.0 +grpc-google-cloud-asset-v1p2beta1:0.133.0:0.133.0 +grpc-google-cloud-asset-v1p5beta1:0.133.0:0.133.0 +grpc-google-cloud-asset-v1p7beta1:3.33.0:3.33.0 +proto-google-cloud-asset-v1:3.33.0:3.33.0 +proto-google-cloud-asset-v1p1beta1:0.133.0:0.133.0 +proto-google-cloud-asset-v1p2beta1:0.133.0:0.133.0 +proto-google-cloud-asset-v1p5beta1:0.133.0:0.133.0 +proto-google-cloud-asset-v1p7beta1:3.33.0:3.33.0 +google-cloud-assured-workloads:2.29.0:2.29.0 +grpc-google-cloud-assured-workloads-v1beta1:0.41.0:0.41.0 +grpc-google-cloud-assured-workloads-v1:2.29.0:2.29.0 +proto-google-cloud-assured-workloads-v1beta1:0.41.0:0.41.0 +proto-google-cloud-assured-workloads-v1:2.29.0:2.29.0 +google-cloud-automl:2.29.0:2.29.0 +grpc-google-cloud-automl-v1beta1:0.116.0:0.116.0 +grpc-google-cloud-automl-v1:2.29.0:2.29.0 +proto-google-cloud-automl-v1beta1:0.116.0:0.116.0 +proto-google-cloud-automl-v1:2.29.0:2.29.0 +google-cloud-bare-metal-solution:0.29.0:0.29.0 +proto-google-cloud-bare-metal-solution-v2:0.29.0:0.29.0 +grpc-google-cloud-bare-metal-solution-v2:0.29.0:0.29.0 +google-cloud-batch:0.29.0:0.29.0 +proto-google-cloud-batch-v1:0.29.0:0.29.0 +grpc-google-cloud-batch-v1:0.29.0:0.29.0 +proto-google-cloud-batch-v1alpha:0.29.0:0.29.0 +grpc-google-cloud-batch-v1alpha:0.29.0:0.29.0 +google-cloud-beyondcorp-appconnections:0.27.0:0.27.0 +proto-google-cloud-beyondcorp-appconnections-v1:0.27.0:0.27.0 +grpc-google-cloud-beyondcorp-appconnections-v1:0.27.0:0.27.0 +google-cloud-beyondcorp-appconnectors:0.27.0:0.27.0 +proto-google-cloud-beyondcorp-appconnectors-v1:0.27.0:0.27.0 +grpc-google-cloud-beyondcorp-appconnectors-v1:0.27.0:0.27.0 +google-cloud-beyondcorp-appgateways:0.27.0:0.27.0 +proto-google-cloud-beyondcorp-appgateways-v1:0.27.0:0.27.0 +grpc-google-cloud-beyondcorp-appgateways-v1:0.27.0:0.27.0 +google-cloud-beyondcorp-clientconnectorservices:0.27.0:0.27.0 +proto-google-cloud-beyondcorp-clientconnectorservices-v1:0.27.0:0.27.0 +grpc-google-cloud-beyondcorp-clientconnectorservices-v1:0.27.0:0.27.0 +google-cloud-beyondcorp-clientgateways:0.27.0:0.27.0 +proto-google-cloud-beyondcorp-clientgateways-v1:0.27.0:0.27.0 +grpc-google-cloud-beyondcorp-clientgateways-v1:0.27.0:0.27.0 +google-cloud-bigqueryconnection:2.31.0:2.31.0 +grpc-google-cloud-bigqueryconnection-v1:2.31.0:2.31.0 +grpc-google-cloud-bigqueryconnection-v1beta1:0.39.0:0.39.0 +proto-google-cloud-bigqueryconnection-v1:2.31.0:2.31.0 +proto-google-cloud-bigqueryconnection-v1beta1:0.39.0:0.39.0 +google-cloud-bigquery-data-exchange:2.24.0:2.24.0 +proto-google-cloud-bigquery-data-exchange-v1beta1:2.24.0:2.24.0 +grpc-google-cloud-bigquery-data-exchange-v1beta1:2.24.0:2.24.0 +google-cloud-bigquerydatapolicy:0.26.0:0.26.0 +proto-google-cloud-bigquerydatapolicy-v1beta1:0.26.0:0.26.0 +grpc-google-cloud-bigquerydatapolicy-v1beta1:0.26.0:0.26.0 +google-cloud-bigquerydatatransfer:2.29.0:2.29.0 +grpc-google-cloud-bigquerydatatransfer-v1:2.29.0:2.29.0 +proto-google-cloud-bigquerydatatransfer-v1:2.29.0:2.29.0 +google-cloud-bigquerymigration:0.32.0:0.32.0 +grpc-google-cloud-bigquerymigration-v2alpha:0.32.0:0.32.0 +proto-google-cloud-bigquerymigration-v2alpha:0.32.0:0.32.0 +proto-google-cloud-bigquerymigration-v2:0.32.0:0.32.0 +grpc-google-cloud-bigquerymigration-v2:0.32.0:0.32.0 +google-cloud-bigqueryreservation:2.30.0:2.30.0 +grpc-google-cloud-bigqueryreservation-v1:2.30.0:2.30.0 +proto-google-cloud-bigqueryreservation-v1:2.30.0:2.30.0 +google-cloud-billingbudgets:2.29.0:2.29.0 +grpc-google-cloud-billingbudgets-v1beta1:0.38.0:0.38.0 +grpc-google-cloud-billingbudgets-v1:2.29.0:2.29.0 +proto-google-cloud-billingbudgets-v1beta1:0.38.0:0.38.0 +proto-google-cloud-billingbudgets-v1:2.29.0:2.29.0 +google-cloud-billing:2.29.0:2.29.0 +grpc-google-cloud-billing-v1:2.29.0:2.29.0 +proto-google-cloud-billing-v1:2.29.0:2.29.0 +google-cloud-binary-authorization:1.28.0:1.28.0 +grpc-google-cloud-binary-authorization-v1beta1:0.33.0:0.33.0 +grpc-google-cloud-binary-authorization-v1:1.28.0:1.28.0 +proto-google-cloud-binary-authorization-v1beta1:0.33.0:0.33.0 +proto-google-cloud-binary-authorization-v1:1.28.0:1.28.0 +google-cloud-certificate-manager:0.32.0:0.32.0 +proto-google-cloud-certificate-manager-v1:0.32.0:0.32.0 +grpc-google-cloud-certificate-manager-v1:0.32.0:0.32.0 +google-cloud-channel:3.33.0:3.33.0 +grpc-google-cloud-channel-v1:3.33.0:3.33.0 +proto-google-cloud-channel-v1:3.33.0:3.33.0 +google-cloud-build:3.31.0:3.31.0 +grpc-google-cloud-build-v1:3.31.0:3.31.0 +proto-google-cloud-build-v1:3.31.0:3.31.0 +google-cloud-cloudcommerceconsumerprocurement:0.27.0:0.27.0 +proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1:0.27.0:0.27.0 +grpc-google-cloud-cloudcommerceconsumerprocurement-v1alpha1:0.27.0:0.27.0 +google-cloud-compute:1.39.0:1.39.0 +proto-google-cloud-compute-v1:1.39.0:1.39.0 +google-cloud-contact-center-insights:2.29.0:2.29.0 +grpc-google-cloud-contact-center-insights-v1:2.29.0:2.29.0 +proto-google-cloud-contact-center-insights-v1:2.29.0:2.29.0 +proto-google-cloud-containeranalysis-v1:2.30.0:2.30.0 +proto-google-cloud-containeranalysis-v1beta1:0.120.0:0.120.0 +grpc-google-cloud-containeranalysis-v1beta1:0.120.0:0.120.0 +grpc-google-cloud-containeranalysis-v1:2.30.0:2.30.0 +google-cloud-containeranalysis:2.30.0:2.30.0 +google-cloud-container:2.32.0:2.32.0 +grpc-google-cloud-container-v1:2.32.0:2.32.0 +grpc-google-cloud-container-v1beta1:2.32.0:2.32.0 +proto-google-cloud-container-v1:2.32.0:2.32.0 +proto-google-cloud-container-v1beta1:2.32.0:2.32.0 +google-cloud-contentwarehouse:0.25.0:0.25.0 +proto-google-cloud-contentwarehouse-v1:0.25.0:0.25.0 +grpc-google-cloud-contentwarehouse-v1:0.25.0:0.25.0 +google-cloud-datacatalog:1.35.0:1.35.0 +grpc-google-cloud-datacatalog-v1:1.35.0:1.35.0 +grpc-google-cloud-datacatalog-v1beta1:0.72.0:0.72.0 +proto-google-cloud-datacatalog-v1:1.35.0:1.35.0 +proto-google-cloud-datacatalog-v1beta1:0.72.0:0.72.0 +google-cloud-dataflow:0.33.0:0.33.0 +grpc-google-cloud-dataflow-v1beta3:0.33.0:0.33.0 +proto-google-cloud-dataflow-v1beta3:0.33.0:0.33.0 +google-cloud-dataform:0.28.0:0.28.0 +proto-google-cloud-dataform-v1alpha2:0.28.0:0.28.0 +grpc-google-cloud-dataform-v1alpha2:0.28.0:0.28.0 +proto-google-cloud-dataform-v1beta1:0.28.0:0.28.0 +grpc-google-cloud-dataform-v1beta1:0.28.0:0.28.0 +google-cloud-data-fusion:1.29.0:1.29.0 +grpc-google-cloud-data-fusion-v1beta1:0.33.0:0.33.0 +grpc-google-cloud-data-fusion-v1:1.29.0:1.29.0 +proto-google-cloud-data-fusion-v1beta1:0.33.0:0.33.0 +proto-google-cloud-data-fusion-v1:1.29.0:1.29.0 +google-cloud-datalabeling:0.149.0:0.149.0 +grpc-google-cloud-datalabeling-v1beta1:0.114.0:0.114.0 +proto-google-cloud-datalabeling-v1beta1:0.114.0:0.114.0 +google-cloud-dataplex:1.27.0:1.27.0 +proto-google-cloud-dataplex-v1:1.27.0:1.27.0 +grpc-google-cloud-dataplex-v1:1.27.0:1.27.0 +google-cloud-dataproc-metastore:2.30.0:2.30.0 +grpc-google-cloud-dataproc-metastore-v1beta:0.34.0:0.34.0 +grpc-google-cloud-dataproc-metastore-v1alpha:0.34.0:0.34.0 +grpc-google-cloud-dataproc-metastore-v1:2.30.0:2.30.0 +proto-google-cloud-dataproc-metastore-v1beta:0.34.0:0.34.0 +proto-google-cloud-dataproc-metastore-v1alpha:0.34.0:0.34.0 +proto-google-cloud-dataproc-metastore-v1:2.30.0:2.30.0 +google-cloud-dataproc:4.26.0:4.26.0 +grpc-google-cloud-dataproc-v1:4.26.0:4.26.0 +proto-google-cloud-dataproc-v1:4.26.0:4.26.0 +google-cloud-datastream:1.28.0:1.28.0 +grpc-google-cloud-datastream-v1alpha1:0.33.0:0.33.0 +proto-google-cloud-datastream-v1alpha1:0.33.0:0.33.0 +proto-google-cloud-datastream-v1:1.28.0:1.28.0 +grpc-google-cloud-datastream-v1:1.28.0:1.28.0 +google-cloud-debugger-client:1.29.0:1.29.0 +grpc-google-cloud-debugger-client-v2:1.29.0:1.29.0 +proto-google-cloud-debugger-client-v2:1.29.0:1.29.0 +proto-google-devtools-source-protos:1.29.0:1.29.0 +google-cloud-deploy:1.27.0:1.27.0 +grpc-google-cloud-deploy-v1:1.27.0:1.27.0 +proto-google-cloud-deploy-v1:1.27.0:1.27.0 +google-cloud-dialogflow-cx:0.40.0:0.40.0 +grpc-google-cloud-dialogflow-cx-v3beta1:0.40.0:0.40.0 +grpc-google-cloud-dialogflow-cx-v3:0.40.0:0.40.0 +proto-google-cloud-dialogflow-cx-v3beta1:0.40.0:0.40.0 +proto-google-cloud-dialogflow-cx-v3:0.40.0:0.40.0 +google-cloud-dialogflow:4.35.0:4.35.0 +grpc-google-cloud-dialogflow-v2beta1:0.133.0:0.133.0 +grpc-google-cloud-dialogflow-v2:4.35.0:4.35.0 +proto-google-cloud-dialogflow-v2:4.35.0:4.35.0 +proto-google-cloud-dialogflow-v2beta1:0.133.0:0.133.0 +google-cloud-discoveryengine:0.25.0:0.25.0 +proto-google-cloud-discoveryengine-v1beta:0.25.0:0.25.0 +grpc-google-cloud-discoveryengine-v1beta:0.25.0:0.25.0 +google-cloud-distributedcloudedge:0.26.0:0.26.0 +proto-google-cloud-distributedcloudedge-v1:0.26.0:0.26.0 +grpc-google-cloud-distributedcloudedge-v1:0.26.0:0.26.0 +google-cloud-dlp:3.33.0:3.33.0 +grpc-google-cloud-dlp-v2:3.33.0:3.33.0 +proto-google-cloud-dlp-v2:3.33.0:3.33.0 +google-cloud-dms:2.28.0:2.28.0 +grpc-google-cloud-dms-v1:2.28.0:2.28.0 +proto-google-cloud-dms-v1:2.28.0:2.28.0 +google-cloud-document-ai:2.33.0:2.33.0 +grpc-google-cloud-document-ai-v1beta1:0.45.0:0.45.0 +grpc-google-cloud-document-ai-v1beta2:0.45.0:0.45.0 +grpc-google-cloud-document-ai-v1beta3:0.45.0:0.45.0 +grpc-google-cloud-document-ai-v1:2.33.0:2.33.0 +proto-google-cloud-document-ai-v1beta1:0.45.0:0.45.0 +proto-google-cloud-document-ai-v1beta2:0.45.0:0.45.0 +proto-google-cloud-document-ai-v1beta3:0.45.0:0.45.0 +proto-google-cloud-document-ai-v1:2.33.0:2.33.0 +google-cloud-domains:1.26.0:1.26.0 +grpc-google-cloud-domains-v1beta1:0.34.0:0.34.0 +grpc-google-cloud-domains-v1alpha2:0.34.0:0.34.0 +grpc-google-cloud-domains-v1:1.26.0:1.26.0 +proto-google-cloud-domains-v1beta1:0.34.0:0.34.0 +proto-google-cloud-domains-v1alpha2:0.34.0:0.34.0 +proto-google-cloud-domains-v1:1.26.0:1.26.0 +google-cloud-enterpriseknowledgegraph:0.25.0:0.25.0 +proto-google-cloud-enterpriseknowledgegraph-v1:0.25.0:0.25.0 +grpc-google-cloud-enterpriseknowledgegraph-v1:0.25.0:0.25.0 +google-cloud-errorreporting:0.150.0-beta:0.150.0-beta +grpc-google-cloud-error-reporting-v1beta1:0.116.0:0.116.0 +proto-google-cloud-error-reporting-v1beta1:0.116.0:0.116.0 +google-cloud-essential-contacts:2.29.0:2.29.0 +grpc-google-cloud-essential-contacts-v1:2.29.0:2.29.0 +proto-google-cloud-essential-contacts-v1:2.29.0:2.29.0 +google-cloud-eventarc:1.29.0:1.29.0 +grpc-google-cloud-eventarc-v1:1.29.0:1.29.0 +proto-google-cloud-eventarc-v1:1.29.0:1.29.0 +google-cloud-eventarc-publishing:0.29.0:0.29.0 +proto-google-cloud-eventarc-publishing-v1:0.29.0:0.29.0 +grpc-google-cloud-eventarc-publishing-v1:0.29.0:0.29.0 +google-cloud-filestore:1.30.0:1.30.0 +grpc-google-cloud-filestore-v1beta1:0.32.0:0.32.0 +grpc-google-cloud-filestore-v1:1.30.0:1.30.0 +proto-google-cloud-filestore-v1:1.30.0:1.30.0 +proto-google-cloud-filestore-v1beta1:0.32.0:0.32.0 +google-cloud-functions:2.31.0:2.31.0 +grpc-google-cloud-functions-v1:2.31.0:2.31.0 +proto-google-cloud-functions-v1:2.31.0:2.31.0 +proto-google-cloud-functions-v2beta:2.31.0:2.31.0 +proto-google-cloud-functions-v2alpha:2.31.0:2.31.0 +grpc-google-cloud-functions-v2beta:2.31.0:2.31.0 +grpc-google-cloud-functions-v2alpha:2.31.0:2.31.0 +proto-google-cloud-functions-v2:2.31.0:2.31.0 +grpc-google-cloud-functions-v2:2.31.0:2.31.0 +google-cloud-game-servers:2.29.0:2.29.0 +grpc-google-cloud-game-servers-v1:2.29.0:2.29.0 +grpc-google-cloud-game-servers-v1beta:0.54.0:0.54.0 +proto-google-cloud-game-servers-v1:2.29.0:2.29.0 +proto-google-cloud-game-servers-v1beta:0.54.0:0.54.0 +google-cloud-gke-backup:0.28.0:0.28.0 +proto-google-cloud-gke-backup-v1:0.28.0:0.28.0 +grpc-google-cloud-gke-backup-v1:0.28.0:0.28.0 +google-cloud-gke-connect-gateway:0.30.0:0.30.0 +grpc-google-cloud-gke-connect-gateway-v1beta1:0.30.0:0.30.0 +proto-google-cloud-gke-connect-gateway-v1beta1:0.30.0:0.30.0 +google-cloud-gkehub:1.29.0:1.29.0 +grpc-google-cloud-gkehub-v1beta1:0.35.0:0.35.0 +grpc-google-cloud-gkehub-v1:1.29.0:1.29.0 +grpc-google-cloud-gkehub-v1alpha:0.35.0:0.35.0 +grpc-google-cloud-gkehub-v1beta:0.35.0:0.35.0 +grpc-google-cloud-gkehub-v1alpha2:0.35.0:0.35.0 +proto-google-cloud-gkehub-v1beta1:0.35.0:0.35.0 +proto-google-cloud-gkehub-v1:1.29.0:1.29.0 +proto-google-cloud-gkehub-v1alpha:0.35.0:0.35.0 +proto-google-cloud-gkehub-v1alpha2:0.35.0:0.35.0 +proto-google-cloud-gkehub-v1beta:0.35.0:0.35.0 +google-cloud-gke-multi-cloud:0.28.0:0.28.0 +proto-google-cloud-gke-multi-cloud-v1:0.28.0:0.28.0 +grpc-google-cloud-gke-multi-cloud-v1:0.28.0:0.28.0 +grafeas:2.30.0:2.30.0 +google-cloud-gsuite-addons:2.29.0:2.29.0 +grpc-google-cloud-gsuite-addons-v1:2.29.0:2.29.0 +proto-google-cloud-gsuite-addons-v1:2.29.0:2.29.0 +proto-google-apps-script-type-protos:2.29.0:2.29.0 +google-iam-admin:3.24.0:3.24.0 +grpc-google-iam-admin-v1:3.24.0:3.24.0 +proto-google-iam-admin-v1:3.24.0:3.24.0 +google-cloud-iamcredentials:2.29.0:2.29.0 +grpc-google-cloud-iamcredentials-v1:2.29.0:2.29.0 +proto-google-cloud-iamcredentials-v1:2.29.0:2.29.0 +google-cloud-ids:1.28.0:1.28.0 +grpc-google-cloud-ids-v1:1.28.0:1.28.0 +proto-google-cloud-ids-v1:1.28.0:1.28.0 +google-cloud-iot:2.29.0:2.29.0 +grpc-google-cloud-iot-v1:2.29.0:2.29.0 +proto-google-cloud-iot-v1:2.29.0:2.29.0 +google-cloud-kms:2.32.0:2.32.0 +grpc-google-cloud-kms-v1:0.123.0:0.123.0 +proto-google-cloud-kms-v1:0.123.0:0.123.0 +google-cloud-language:2.30.0:2.30.0 +grpc-google-cloud-language-v1:2.30.0:2.30.0 +grpc-google-cloud-language-v1beta2:0.117.0:0.117.0 +proto-google-cloud-language-v1:2.30.0:2.30.0 +proto-google-cloud-language-v1beta2:0.117.0:0.117.0 +google-cloud-life-sciences:0.31.0:0.31.0 +grpc-google-cloud-life-sciences-v2beta:0.31.0:0.31.0 +proto-google-cloud-life-sciences-v2beta:0.31.0:0.31.0 +google-cloud-managed-identities:1.27.0:1.27.0 +grpc-google-cloud-managed-identities-v1:1.27.0:1.27.0 +proto-google-cloud-managed-identities-v1:1.27.0:1.27.0 +google-cloud-mediatranslation:0.35.0:0.35.0 +grpc-google-cloud-mediatranslation-v1beta1:0.35.0:0.35.0 +proto-google-cloud-mediatranslation-v1beta1:0.35.0:0.35.0 +google-cloud-memcache:2.29.0:2.29.0 +grpc-google-cloud-memcache-v1beta2:0.36.0:0.36.0 +grpc-google-cloud-memcache-v1:2.29.0:2.29.0 +proto-google-cloud-memcache-v1beta2:0.36.0:0.36.0 +proto-google-cloud-memcache-v1:2.29.0:2.29.0 +google-cloud-monitoring-dashboard:2.31.0:2.31.0 +grpc-google-cloud-monitoring-dashboard-v1:2.31.0:2.31.0 +proto-google-cloud-monitoring-dashboard-v1:2.31.0:2.31.0 +google-cloud-monitoring:3.30.0:3.30.0 +grpc-google-cloud-monitoring-v3:3.30.0:3.30.0 +proto-google-cloud-monitoring-v3:3.30.0:3.30.0 +google-cloud-networkconnectivity:1.28.0:1.28.0 +grpc-google-cloud-networkconnectivity-v1alpha1:0.34.0:0.34.0 +grpc-google-cloud-networkconnectivity-v1:1.28.0:1.28.0 +proto-google-cloud-networkconnectivity-v1alpha1:0.34.0:0.34.0 +proto-google-cloud-networkconnectivity-v1:1.28.0:1.28.0 +google-cloud-network-management:1.30.0:1.30.0 +grpc-google-cloud-network-management-v1beta1:0.32.0:0.32.0 +grpc-google-cloud-network-management-v1:1.30.0:1.30.0 +proto-google-cloud-network-management-v1beta1:0.32.0:0.32.0 +proto-google-cloud-network-management-v1:1.30.0:1.30.0 +google-cloud-network-security:0.32.0:0.32.0 +grpc-google-cloud-network-security-v1beta1:0.32.0:0.32.0 +proto-google-cloud-network-security-v1beta1:0.32.0:0.32.0 +proto-google-cloud-network-security-v1:0.32.0:0.32.0 +grpc-google-cloud-network-security-v1:0.32.0:0.32.0 +google-cloud-notebooks:1.27.0:1.27.0 +grpc-google-cloud-notebooks-v1beta1:0.34.0:0.34.0 +grpc-google-cloud-notebooks-v1:1.27.0:1.27.0 +proto-google-cloud-notebooks-v1beta1:0.34.0:0.34.0 +proto-google-cloud-notebooks-v1:1.27.0:1.27.0 +google-cloud-notification:0.147.0-beta:0.147.0-beta +google-cloud-optimization:1.27.0:1.27.0 +proto-google-cloud-optimization-v1:1.27.0:1.27.0 +grpc-google-cloud-optimization-v1:1.27.0:1.27.0 +google-cloud-orchestration-airflow:1.29.0:1.29.0 +grpc-google-cloud-orchestration-airflow-v1:1.29.0:1.29.0 +grpc-google-cloud-orchestration-airflow-v1beta1:0.32.0:0.32.0 +proto-google-cloud-orchestration-airflow-v1:1.29.0:1.29.0 +proto-google-cloud-orchestration-airflow-v1beta1:0.32.0:0.32.0 +google-cloud-orgpolicy:2.29.0:2.29.0 +grpc-google-cloud-orgpolicy-v2:2.29.0:2.29.0 +proto-google-cloud-orgpolicy-v1:2.29.0:2.29.0 +proto-google-cloud-orgpolicy-v2:2.29.0:2.29.0 +google-cloud-os-config:2.31.0:2.31.0 +grpc-google-cloud-os-config-v1:2.31.0:2.31.0 +grpc-google-cloud-os-config-v1beta:2.31.0:2.31.0 +grpc-google-cloud-os-config-v1alpha:2.31.0:2.31.0 +proto-google-cloud-os-config-v1:2.31.0:2.31.0 +proto-google-cloud-os-config-v1alpha:2.31.0:2.31.0 +proto-google-cloud-os-config-v1beta:2.31.0:2.31.0 +google-cloud-os-login:2.28.0:2.28.0 +grpc-google-cloud-os-login-v1:2.28.0:2.28.0 +proto-google-cloud-os-login-v1:2.28.0:2.28.0 +google-cloud-phishingprotection:0.60.0:0.60.0 +grpc-google-cloud-phishingprotection-v1beta1:0.60.0:0.60.0 +proto-google-cloud-phishingprotection-v1beta1:0.60.0:0.60.0 +google-cloud-policy-troubleshooter:1.28.0:1.28.0 +grpc-google-cloud-policy-troubleshooter-v1:1.28.0:1.28.0 +proto-google-cloud-policy-troubleshooter-v1:1.28.0:1.28.0 +google-cloud-private-catalog:0.31.0:0.31.0 +grpc-google-cloud-private-catalog-v1beta1:0.31.0:0.31.0 +proto-google-cloud-private-catalog-v1beta1:0.31.0:0.31.0 +google-cloud-profiler:2.29.0:2.29.0 +grpc-google-cloud-profiler-v2:2.29.0:2.29.0 +proto-google-cloud-profiler-v2:2.29.0:2.29.0 +google-cloud-publicca:0.26.0:0.26.0 +proto-google-cloud-publicca-v1beta1:0.26.0:0.26.0 +grpc-google-cloud-publicca-v1beta1:0.26.0:0.26.0 +google-cloud-recaptchaenterprise:3.26.0:3.26.0 +grpc-google-cloud-recaptchaenterprise-v1:3.26.0:3.26.0 +grpc-google-cloud-recaptchaenterprise-v1beta1:0.68.0:0.68.0 +proto-google-cloud-recaptchaenterprise-v1:3.26.0:3.26.0 +proto-google-cloud-recaptchaenterprise-v1beta1:0.68.0:0.68.0 +google-cloud-recommendations-ai:0.36.0:0.36.0 +grpc-google-cloud-recommendations-ai-v1beta1:0.36.0:0.36.0 +proto-google-cloud-recommendations-ai-v1beta1:0.36.0:0.36.0 +google-cloud-recommender:2.31.0:2.31.0 +grpc-google-cloud-recommender-v1:2.31.0:2.31.0 +grpc-google-cloud-recommender-v1beta1:0.43.0:0.43.0 +proto-google-cloud-recommender-v1:2.31.0:2.31.0 +proto-google-cloud-recommender-v1beta1:0.43.0:0.43.0 +google-cloud-redis:2.32.0:2.32.0 +grpc-google-cloud-redis-v1beta1:0.120.0:0.120.0 +grpc-google-cloud-redis-v1:2.32.0:2.32.0 +proto-google-cloud-redis-v1:2.32.0:2.32.0 +proto-google-cloud-redis-v1beta1:0.120.0:0.120.0 +google-cloud-resourcemanager:1.31.0:1.31.0 +grpc-google-cloud-resourcemanager-v3:1.31.0:1.31.0 +proto-google-cloud-resourcemanager-v3:1.31.0:1.31.0 +google-cloud-resource-settings:1.29.0:1.29.0 +grpc-google-cloud-resource-settings-v1:1.29.0:1.29.0 +proto-google-cloud-resource-settings-v1:1.29.0:1.29.0 +google-cloud-retail:2.31.0:2.31.0 +grpc-google-cloud-retail-v2:2.31.0:2.31.0 +proto-google-cloud-retail-v2:2.31.0:2.31.0 +proto-google-cloud-retail-v2alpha:2.31.0:2.31.0 +proto-google-cloud-retail-v2beta:2.31.0:2.31.0 +grpc-google-cloud-retail-v2alpha:2.31.0:2.31.0 +grpc-google-cloud-retail-v2beta:2.31.0:2.31.0 +google-cloud-run:0.29.0:0.29.0 +proto-google-cloud-run-v2:0.29.0:0.29.0 +grpc-google-cloud-run-v2:0.29.0:0.29.0 +google-cloud-scheduler:2.29.0:2.29.0 +grpc-google-cloud-scheduler-v1beta1:0.114.0:0.114.0 +grpc-google-cloud-scheduler-v1:2.29.0:2.29.0 +proto-google-cloud-scheduler-v1beta1:0.114.0:0.114.0 +proto-google-cloud-scheduler-v1:2.29.0:2.29.0 +google-cloud-secretmanager:2.29.0:2.29.0 +grpc-google-cloud-secretmanager-v1:2.29.0:2.29.0 +grpc-google-cloud-secretmanager-v1beta1:2.29.0:2.29.0 +proto-google-cloud-secretmanager-v1:2.29.0:2.29.0 +proto-google-cloud-secretmanager-v1beta1:2.29.0:2.29.0 +google-cloud-securitycenter:2.37.0:2.37.0 +grpc-google-cloud-securitycenter-v1:2.37.0:2.37.0 +grpc-google-cloud-securitycenter-v1beta1:0.132.0:0.132.0 +grpc-google-cloud-securitycenter-v1p1beta1:0.132.0:0.132.0 +proto-google-cloud-securitycenter-v1:2.37.0:2.37.0 +proto-google-cloud-securitycenter-v1beta1:0.132.0:0.132.0 +proto-google-cloud-securitycenter-v1p1beta1:0.132.0:0.132.0 +google-cloud-securitycenter-settings:0.32.0:0.32.0 +grpc-google-cloud-securitycenter-settings-v1beta1:0.32.0:0.32.0 +proto-google-cloud-securitycenter-settings-v1beta1:0.32.0:0.32.0 +google-cloud-security-private-ca:2.31.0:2.31.0 +grpc-google-cloud-security-private-ca-v1beta1:0.38.0:0.38.0 +grpc-google-cloud-security-private-ca-v1:2.31.0:2.31.0 +proto-google-cloud-security-private-ca-v1beta1:0.38.0:0.38.0 +proto-google-cloud-security-private-ca-v1:2.31.0:2.31.0 +google-cloud-service-control:1.29.0:1.29.0 +grpc-google-cloud-service-control-v1:1.29.0:1.29.0 +proto-google-cloud-service-control-v1:1.29.0:1.29.0 +proto-google-cloud-service-control-v2:1.29.0:1.29.0 +grpc-google-cloud-service-control-v2:1.29.0:1.29.0 +google-cloud-servicedirectory:2.30.0:2.30.0 +grpc-google-cloud-servicedirectory-v1beta1:0.38.0:0.38.0 +grpc-google-cloud-servicedirectory-v1:2.30.0:2.30.0 +proto-google-cloud-servicedirectory-v1beta1:0.38.0:0.38.0 +proto-google-cloud-servicedirectory-v1:2.30.0:2.30.0 +google-cloud-service-management:3.27.0:3.27.0 +grpc-google-cloud-service-management-v1:3.27.0:3.27.0 +proto-google-cloud-service-management-v1:3.27.0:3.27.0 +google-cloud-service-usage:2.29.0:2.29.0 +grpc-google-cloud-service-usage-v1beta1:0.33.0:0.33.0 +grpc-google-cloud-service-usage-v1:2.29.0:2.29.0 +proto-google-cloud-service-usage-v1:2.29.0:2.29.0 +proto-google-cloud-service-usage-v1beta1:0.33.0:0.33.0 +google-cloud-shell:2.28.0:2.28.0 +grpc-google-cloud-shell-v1:2.28.0:2.28.0 +proto-google-cloud-shell-v1:2.28.0:2.28.0 +google-cloud-speech:4.24.0:4.24.0 +grpc-google-cloud-speech-v1:4.24.0:4.24.0 +grpc-google-cloud-speech-v1beta1:2.24.0:2.24.0 +grpc-google-cloud-speech-v1p1beta1:2.24.0:2.24.0 +proto-google-cloud-speech-v1:4.24.0:4.24.0 +proto-google-cloud-speech-v1beta1:2.24.0:2.24.0 +proto-google-cloud-speech-v1p1beta1:2.24.0:2.24.0 +proto-google-cloud-speech-v2:4.24.0:4.24.0 +grpc-google-cloud-speech-v2:4.24.0:4.24.0 +google-cloud-storage-transfer:1.29.0:1.29.0 +grpc-google-cloud-storage-transfer-v1:1.29.0:1.29.0 +proto-google-cloud-storage-transfer-v1:1.29.0:1.29.0 +google-cloud-talent:2.30.0:2.30.0 +grpc-google-cloud-talent-v4:2.30.0:2.30.0 +grpc-google-cloud-talent-v4beta1:0.73.0:0.73.0 +proto-google-cloud-talent-v4:2.30.0:2.30.0 +proto-google-cloud-talent-v4beta1:0.73.0:0.73.0 +google-cloud-tasks:2.29.0:2.29.0 +grpc-google-cloud-tasks-v2beta3:0.119.0:0.119.0 +grpc-google-cloud-tasks-v2beta2:0.119.0:0.119.0 +grpc-google-cloud-tasks-v2:2.29.0:2.29.0 +proto-google-cloud-tasks-v2beta3:0.119.0:0.119.0 +proto-google-cloud-tasks-v2beta2:0.119.0:0.119.0 +proto-google-cloud-tasks-v2:2.29.0:2.29.0 +google-cloud-texttospeech:2.30.0:2.30.0 +grpc-google-cloud-texttospeech-v1beta1:0.119.0:0.119.0 +grpc-google-cloud-texttospeech-v1:2.30.0:2.30.0 +proto-google-cloud-texttospeech-v1:2.30.0:2.30.0 +proto-google-cloud-texttospeech-v1beta1:0.119.0:0.119.0 +google-cloud-tpu:2.30.0:2.30.0 +grpc-google-cloud-tpu-v1:2.30.0:2.30.0 +grpc-google-cloud-tpu-v2alpha1:2.30.0:2.30.0 +proto-google-cloud-tpu-v1:2.30.0:2.30.0 +proto-google-cloud-tpu-v2alpha1:2.30.0:2.30.0 +google-cloud-trace:2.29.0:2.29.0 +grpc-google-cloud-trace-v1:2.29.0:2.29.0 +grpc-google-cloud-trace-v2:2.29.0:2.29.0 +proto-google-cloud-trace-v1:2.29.0:2.29.0 +proto-google-cloud-trace-v2:2.29.0:2.29.0 +google-cloud-translate:2.29.0:2.29.0 +grpc-google-cloud-translate-v3beta1:0.111.0:0.111.0 +grpc-google-cloud-translate-v3:2.29.0:2.29.0 +proto-google-cloud-translate-v3beta1:0.111.0:0.111.0 +proto-google-cloud-translate-v3:2.29.0:2.29.0 +google-cloud-video-intelligence:2.28.0:2.28.0 +grpc-google-cloud-video-intelligence-v1p1beta1:0.118.0:0.118.0 +grpc-google-cloud-video-intelligence-v1beta2:0.118.0:0.118.0 +grpc-google-cloud-video-intelligence-v1:2.28.0:2.28.0 +grpc-google-cloud-video-intelligence-v1p2beta1:0.118.0:0.118.0 +grpc-google-cloud-video-intelligence-v1p3beta1:0.118.0:0.118.0 +proto-google-cloud-video-intelligence-v1p3beta1:0.118.0:0.118.0 +proto-google-cloud-video-intelligence-v1beta2:0.118.0:0.118.0 +proto-google-cloud-video-intelligence-v1p1beta1:0.118.0:0.118.0 +proto-google-cloud-video-intelligence-v1:2.28.0:2.28.0 +proto-google-cloud-video-intelligence-v1p2beta1:0.118.0:0.118.0 +google-cloud-live-stream:0.31.0:0.31.0 +proto-google-cloud-live-stream-v1:0.31.0:0.31.0 +grpc-google-cloud-live-stream-v1:0.31.0:0.31.0 +google-cloud-video-stitcher:0.29.0:0.29.0 +proto-google-cloud-video-stitcher-v1:0.29.0:0.29.0 +grpc-google-cloud-video-stitcher-v1:0.29.0:0.29.0 +google-cloud-video-transcoder:1.28.0:1.28.0 +grpc-google-cloud-video-transcoder-v1:1.28.0:1.28.0 +proto-google-cloud-video-transcoder-v1:1.28.0:1.28.0 +google-cloud-vision:3.27.0:3.27.0 +grpc-google-cloud-vision-v1p3beta1:0.116.0:0.116.0 +grpc-google-cloud-vision-v1p1beta1:0.116.0:0.116.0 +grpc-google-cloud-vision-v1p4beta1:0.116.0:0.116.0 +grpc-google-cloud-vision-v1p2beta1:3.27.0:3.27.0 +grpc-google-cloud-vision-v1:3.27.0:3.27.0 +proto-google-cloud-vision-v1p4beta1:0.116.0:0.116.0 +proto-google-cloud-vision-v1:3.27.0:3.27.0 +proto-google-cloud-vision-v1p1beta1:0.116.0:0.116.0 +proto-google-cloud-vision-v1p3beta1:0.116.0:0.116.0 +proto-google-cloud-vision-v1p2beta1:3.27.0:3.27.0 +google-cloud-vmmigration:1.29.0:1.29.0 +grpc-google-cloud-vmmigration-v1:1.29.0:1.29.0 +proto-google-cloud-vmmigration-v1:1.29.0:1.29.0 +google-cloud-vpcaccess:2.30.0:2.30.0 +grpc-google-cloud-vpcaccess-v1:2.30.0:2.30.0 +proto-google-cloud-vpcaccess-v1:2.30.0:2.30.0 +google-cloud-webrisk:2.28.0:2.28.0 +grpc-google-cloud-webrisk-v1:2.28.0:2.28.0 +grpc-google-cloud-webrisk-v1beta1:0.65.0:0.65.0 +proto-google-cloud-webrisk-v1:2.28.0:2.28.0 +proto-google-cloud-webrisk-v1beta1:0.65.0:0.65.0 +google-cloud-websecurityscanner:2.29.0:2.29.0 +grpc-google-cloud-websecurityscanner-v1alpha:0.116.0:0.116.0 +grpc-google-cloud-websecurityscanner-v1beta:0.116.0:0.116.0 +grpc-google-cloud-websecurityscanner-v1:2.29.0:2.29.0 +proto-google-cloud-websecurityscanner-v1alpha:0.116.0:0.116.0 +proto-google-cloud-websecurityscanner-v1beta:0.116.0:0.116.0 +proto-google-cloud-websecurityscanner-v1:2.29.0:2.29.0 +google-cloud-workflow-executions:2.29.0:2.29.0 +grpc-google-cloud-workflow-executions-v1beta:0.33.0:0.33.0 +grpc-google-cloud-workflow-executions-v1:2.29.0:2.29.0 +proto-google-cloud-workflow-executions-v1beta:0.33.0:0.33.0 +proto-google-cloud-workflow-executions-v1:2.29.0:2.29.0 +google-cloud-workflows:2.29.0:2.29.0 +grpc-google-cloud-workflows-v1beta:0.35.0:0.35.0 +grpc-google-cloud-workflows-v1:2.29.0:2.29.0 +proto-google-cloud-workflows-v1beta:0.35.0:0.35.0 +proto-google-cloud-workflows-v1:2.29.0:2.29.0 +google-cloud-dns:2.27.0:2.27.0 +google-maps-routing:1.14.0:1.14.0 +proto-google-maps-routing-v2:1.14.0:1.14.0 +grpc-google-maps-routing-v2:1.14.0:1.14.0 +google-cloud-vmwareengine:0.23.0:0.23.0 +proto-google-cloud-vmwareengine-v1:0.23.0:0.23.0 +grpc-google-cloud-vmwareengine-v1:0.23.0:0.23.0 +google-maps-addressvalidation:0.23.0:0.23.0 +proto-google-maps-addressvalidation-v1:0.23.0:0.23.0 +grpc-google-maps-addressvalidation-v1:0.23.0:0.23.0 +proto-google-cloud-bigquerydatapolicy-v1:0.26.0:0.26.0 +grpc-google-cloud-bigquerydatapolicy-v1:0.26.0:0.26.0 +google-cloud-monitoring-metricsscope:0.23.0:0.23.0 +proto-google-cloud-monitoring-metricsscope-v1:0.23.0:0.23.0 +grpc-google-cloud-monitoring-metricsscope-v1:0.23.0:0.23.0 +proto-google-cloud-tpu-v2:2.30.0:2.30.0 +grpc-google-cloud-tpu-v2:2.30.0:2.30.0 +google-cloud-datalineage:0.21.0:0.21.0 +proto-google-cloud-datalineage-v1:0.21.0:0.21.0 +grpc-google-cloud-datalineage-v1:0.21.0:0.21.0 +google-iam-policy:1.27.0:1.27.0 +proto-google-cloud-build-v2:3.31.0:3.31.0 +grpc-google-cloud-build-v2:3.31.0:3.31.0 +google-cloud-advisorynotifications:0.18.0:0.18.0 +proto-google-cloud-advisorynotifications-v1:0.18.0:0.18.0 +grpc-google-cloud-advisorynotifications-v1:0.18.0:0.18.0 +google-maps-mapsplatformdatasets:0.18.0:0.18.0 +proto-google-maps-mapsplatformdatasets-v1alpha:0.18.0:0.18.0 +grpc-google-maps-mapsplatformdatasets-v1alpha:0.18.0:0.18.0 +google-cloud-kmsinventory:0.18.0:0.18.0 +proto-google-cloud-kmsinventory-v1:0.18.0:0.18.0 +grpc-google-cloud-kmsinventory-v1:0.18.0:0.18.0 +google-cloud-alloydb:0.18.0:0.18.0 +proto-google-cloud-alloydb-v1:0.18.0:0.18.0 +proto-google-cloud-alloydb-v1beta:0.18.0:0.18.0 +proto-google-cloud-alloydb-v1alpha:0.18.0:0.18.0 +grpc-google-cloud-alloydb-v1beta:0.18.0:0.18.0 +grpc-google-cloud-alloydb-v1:0.18.0:0.18.0 +grpc-google-cloud-alloydb-v1alpha:0.18.0:0.18.0 +google-cloud-biglake:0.17.0:0.17.0 +proto-google-cloud-biglake-v1alpha1:0.17.0:0.17.0 +grpc-google-cloud-biglake-v1alpha1:0.17.0:0.17.0 +google-cloud-workstations:0.17.0:0.17.0 +proto-google-cloud-workstations-v1beta:0.17.0:0.17.0 +grpc-google-cloud-workstations-v1beta:0.17.0:0.17.0 +google-cloud-confidentialcomputing:0.15.0:0.15.0 +proto-google-cloud-confidentialcomputing-v1:0.15.0:0.15.0 +proto-google-cloud-confidentialcomputing-v1alpha1:0.15.0:0.15.0 +grpc-google-cloud-confidentialcomputing-v1:0.15.0:0.15.0 +grpc-google-cloud-confidentialcomputing-v1alpha1:0.15.0:0.15.0 +proto-google-cloud-workstations-v1:0.17.0:0.17.0 +grpc-google-cloud-workstations-v1:0.17.0:0.17.0 +proto-google-cloud-biglake-v1:0.17.0:0.17.0 +grpc-google-cloud-biglake-v1:0.17.0:0.17.0 +google-cloud-storageinsights:0.14.0:0.14.0 +proto-google-cloud-storageinsights-v1:0.14.0:0.14.0 +grpc-google-cloud-storageinsights-v1:0.14.0:0.14.0 +google-cloud-cloudsupport:0.13.0:0.13.0 +proto-google-cloud-cloudsupport-v2:0.13.0:0.13.0 +grpc-google-cloud-cloudsupport-v2:0.13.0:0.13.0 +google-cloud-rapidmigrationassessment:0.12.0:0.12.0 +proto-google-cloud-rapidmigrationassessment-v1:0.12.0:0.12.0 +grpc-google-cloud-rapidmigrationassessment-v1:0.12.0:0.12.0 +proto-google-maps-mapsplatformdatasets-v1:0.18.0:0.18.0 +grpc-google-maps-mapsplatformdatasets-v1:0.18.0:0.18.0 +proto-google-cloud-discoveryengine-v1:0.25.0:0.25.0 +grpc-google-cloud-discoveryengine-v1:0.25.0:0.25.0 +google-cloud-migrationcenter:0.11.0:0.11.0 +proto-google-cloud-migrationcenter-v1:0.11.0:0.11.0 +grpc-google-cloud-migrationcenter-v1:0.11.0:0.11.0 +google-cloud-policysimulator:0.8.0:0.8.0 +proto-google-cloud-policysimulator-v1:0.8.0:0.8.0 +grpc-google-cloud-policysimulator-v1:0.8.0:0.8.0 +google-cloud-netapp:0.8.0:0.8.0 +proto-google-cloud-netapp-v1beta1:0.8.0:0.8.0 +grpc-google-cloud-netapp-v1beta1:0.8.0:0.8.0 +proto-google-cloud-netapp-v1:0.8.0:0.8.0 +grpc-google-cloud-netapp-v1:0.8.0:0.8.0 +proto-google-cloud-cloudcommerceconsumerprocurement-v1:0.27.0:0.27.0 +grpc-google-cloud-cloudcommerceconsumerprocurement-v1:0.27.0:0.27.0 +google-cloud-java-alloydb-connectors:0.7.0:0.7.0 +proto-google-cloud-java-alloydb-connectors-v1alpha:0.7.0:0.7.0 +google-cloud-alloydb-connectors:0.7.0:0.7.0 +proto-google-cloud-alloydb-connectors-v1alpha:0.7.0:0.7.0 +proto-google-cloud-language-v2:2.30.0:2.30.0 +grpc-google-cloud-language-v2:2.30.0:2.30.0 +google-cloud-infra-manager:0.6.0:0.6.0 +proto-google-cloud-infra-manager-v1:0.6.0:0.6.0 +grpc-google-cloud-infra-manager-v1:0.6.0:0.6.0 +proto-google-cloud-notebooks-v2:1.27.0:1.27.0 +grpc-google-cloud-notebooks-v2:1.27.0:1.27.0 +proto-google-cloud-alloydb-connectors-v1beta:0.7.0:0.7.0 +google-shopping-merchant-inventories:0.5.0:0.5.0 +proto-google-shopping-merchant-inventories-v1beta:0.5.0:0.5.0 +grpc-google-shopping-merchant-inventories-v1beta:0.5.0:0.5.0 +proto-google-cloud-policy-troubleshooter-v3:1.28.0:1.28.0 +grpc-google-cloud-policy-troubleshooter-v3:1.28.0:1.28.0 +google-shopping-merchant-reports:0.5.0:0.5.0 +proto-google-shopping-merchant-reports-v1beta:0.5.0:0.5.0 +grpc-google-shopping-merchant-reports-v1beta:0.5.0:0.5.0 +proto-google-cloud-alloydb-connectors-v1:0.7.0:0.7.0 +proto-google-cloud-discoveryengine-v1alpha:0.25.0:0.25.0 +grpc-google-cloud-discoveryengine-v1alpha:0.25.0:0.25.0 +google-cloud-redis-cluster:0.1.0:0.1.0 +proto-google-cloud-redis-cluster-v1beta1:0.1.0:0.1.0 +proto-google-cloud-redis-cluster-v1:0.1.0:0.1.0 +grpc-google-cloud-redis-cluster-v1:0.1.0:0.1.0 +grpc-google-cloud-redis-cluster-v1beta1:0.1.0:0.1.0